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

Alexander Belopolsky ndarray at mac.com
Mon Jul 7 00:29:33 EDT 2014


On Sun, Jul 6, 2014 at 10:59 PM, Eric Firing <efiring at hawaii.edu> wrote:

> > I would suggest calling it something like np.array_simple or
> > np.array_from_string, but the best choice IMO, would be
> > np.ndarray.from_string (a static constructor method).
>
>
> I think the problem is that this defeats the point: minimizing typing
> when doing an off-the-cuff demo or test.


You can always put np.arr = np.ndarray.from_string or even arr =
np.ndarray.from_string right next to the line where you define np.  (Which
makes me wonder if something like this belongs to ipython magic.)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20140707/ea182d8e/attachment.html>


More information about the NumPy-Discussion mailing list