[Numpy-discussion] Added atleast_nd, request for clarification/cleanup of atleast_3d
Marten van Kerkwijk
m.h.vankerkwijk at gmail.com
Wed Jul 6 10:22:05 EDT 2016
Hi All,
I'm with Nathaniel here, in that I don't really see the point of these
routines in the first place: broadcasting takes care of many of the initial
use cases one might think of, and others are generally not all that well
served by them: the examples from scipy to me do not really support
`at_least?d`, but rather suggest that little thought has been put into
higher-dimensional objects which should be treated as stacks of row or
column vectors. My sense is that we're better off developing the direction
started with `matmul`, perhaps adding `matvecmul` etc.
More to the point of the initial inquiry: what is the advantage of having a
general `np.at_leastnd` routine over doing
```
np.array(a, copy=False, ndim=n)
```
or, for a list of inputs,
```
[np.array(a, copy=False, ndim=n) for a in input_list]
```
All the best,
Marten
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20160706/75f87f2d/attachment.html>
More information about the NumPy-Discussion
mailing list