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

Charles G. Waldman charles at crunch.io
Thu Jul 17 18:10:14 EDT 2014


-1 on the 'arr' name.  I think if we're going to support this function at
all (which I'm not convinced is a good idea), it should be np.fromsomething
like the other from* functions.

Maybe frommatlab?

I think that 'arr' is just too generic and too close to 'array'.





On Tue, Jul 15, 2014 at 3:55 AM, Nathaniel Smith <njs at pobox.com> wrote:

> On Sun, Jul 13, 2014 at 6:31 PM, Alexander Belopolsky <ndarray at mac.com>
> wrote:
>
>> Also, the use of strings will confuse most syntax highlighters.  Compare
>> the two options in this screenshot:
>>
>> [image: Inline image 2]
>>
>
> I guess this is a minor issue for "real" code, but even IPython doesn't
> (yet?) provide syntax highlighting for lines as they're typed, and this is
> a tool intended mainly for interactive use.
>
> That screenshot also I think illustrates why people have such a preference
> for the first syntax. The second line looks nice, but try typing it quickly
> and getting all the commas located correctly inside versus outside of each
> of the triply-nested brackets...
>
> No-one's come up with any names for this that are nearly as good as "arr".
> Is it really that bad to have to type one extra character, np.array instead
> of np.arr<tab>?
>
> -n
>
> --
> Nathaniel J. Smith
> Postdoctoral researcher - Informatics - University of Edinburgh
> http://vorpus.org
>
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion at scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20140717/6b0ea8c3/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screen Shot 2014-07-13 at 1.29.20 PM.png
Type: image/png
Size: 26129 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20140717/6b0ea8c3/attachment.png>


More information about the NumPy-Discussion mailing list