On Fri, Jul 18, 2014 at 3:37 AM, Nathaniel Smith <njs@pobox.com> wrote:
On Thu, Jul 17, 2014 at 11:10 PM, Charles G. Waldman <charles@crunch.io> wrote:
>
> -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'.

Well, it's definitely not a good idea if we name it something like that :-).

The whole motivation is to provide a quick way to type 2d arrays
interactively, hence the current name "np.mat". (The fact that it
happens to match matlab syntax is a nice bonus, because stealing is
always better than inventing when it works.)

 
Some minor confusion on my part. If the true goal is to just allow quick entry of a 2d array, why not just advocate using
 
a = numpy.array(numpy.mat("1 2 3; 4 5 6; 7 8 9"))
 
If anyone is really set on having this functionality, they could just write a one-line wrapper function and call it a day.
 
Note that I would personally not use this type of shorthand syntax for teaching or presentations. I'd prefer to use proper python syntax myself from the get go rather than having to start over from square one and teach a completely different syntax for constructing >2d arrays.
 
"There should be one-- and preferably only one --obvious way to do it." -Zen of Python
-Mark
 
_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion