Limited printing?
bearophile
bearophileHUGS at lycos.com
Wed Jan 16 03:16:40 PST 2013
In Mathematica and NumPy (and other systems used with REPL) if
you print a very large array you receive a shortened output. In
Mathematica:
http://reference.wolfram.com/mathematica/tutorial/ShortAndShallowOutput.html
Mathematica uses a representation like (but on default it shows
more items. There is a way to print them all):
Range[100]
{0, 1, 2, <<94>>, 97, 98, 99}
While numpy visualization is a bit simpler:
>>> from numpy import array
>>> array([0] * 10)
array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0])
>>> array([0] * 10000)
array([0, 0, 0, ..., 0, 0, 0])
Currently In D this shows all the items:
writeln(iota(10_000));
Do you desire some way to have a shortened printing if the
generated text is going to be huge?
Bye,
bearophile
More information about the Digitalmars-d
mailing list