[Numpy-discussion] Short-hand array creation in `numpy.mat` style

Alexander Belopolsky ndarray at mac.com
Sun Jul 13 13:13:57 EDT 2014


On Fri, Jul 11, 2014 at 4:30 PM, Daniel da Silva <var.mail.daniel at gmail.com>
wrote:

> If leading a presentation on scientific computing in Python to beginners,
> which would look better on a bullet in a slide?
>
>    -
>
>    np.build('.2 .7 .1; .3 .5 .2; .1 .1 .9'))
>
>    -
>
>    np.array([[.2, .7, .1], [.3, .5, .2], [.1, .1, .9]])
>
>
> np.array([[.2, .7, .1],
          [.3, .5, .2],
          [.1, .1, .9]])
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20140713/5f629779/attachment.html>


More information about the NumPy-Discussion mailing list