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

josef.pktd at gmail.com josef.pktd at gmail.com
Mon Jul 7 09:50:35 EDT 2014


On Mon, Jul 7, 2014 at 9:11 AM, Sebastian Berg <sebastian at sipsolutions.net>
wrote:

> On Mo, 2014-07-07 at 08:25 -0400, Alan G Isaac wrote:
> > On 7/7/2014 7:17 AM, Daπid wrote:
> > > How about a new one? np.matarray, for MATLAB array.
> >
> >
> > How about `str2arr` or even `build`, since teaching appears to be a
> focus.
> > Also, I agree '1 2 3' shd become 1d and '1 2 3;' shd become 2d.
> > It seems unambiguous to allow '1 2 3;;' to be 3d, or even
> > '1 2;3 4;;5 6;7 8' (two 2d arrays), but I'm just noting
> > that, not urging that it be implemented.
> >
>
> Probably overdoing it, but if we plan on more then just this, what about
> banning such functions to something like numpy.interactive/numpy.helpers
> which you can then import * (or better specific functions) from?
>
> I think the fact that you need many imports on startup should rather be
> fixed by an ipython scientific mode or other startup imports.
>


Is this whole thing really worth it? We get back to a numpy pylab.

First users learn the dirty shortcuts, and then they have to learn how to
do it "properly".

(I'm using quite often string split and reshape for copy-pasted text
tables.)

Josef



>
> - Sebastian
>
> > Alan Isaac
> >
> > _______________________________________________
> > NumPy-Discussion mailing list
> > NumPy-Discussion at scipy.org
> > http://mail.scipy.org/mailman/listinfo/numpy-discussion
>
>
> _______________________________________________
> 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/20140707/013719db/attachment.html>


More information about the NumPy-Discussion mailing list