On 05.05.2011, at 2:40AM, Paul Anton Letnes wrote:
> But: Isn't the numpy.atleast_2d and numpy.atleast_1d functions written for
> this? Shouldn't we reuse them? Perhaps it's overkill, and perhaps it will
> reintroduce the 'transposed' problem?
Yes, good point, one could replace the
X.shape = (X.size, ) with X = np.atleast_1d(X),
but for the ndmin=2 case, we'd need to replace
X.shape = (X.size, 1) with X = np.atleast_2d(X).T -
not sure which solution is more efficient in terms of memory access etc...
Cheers,
Derek
_______________________________________________
NumPy-Discussion mailing list
[email protected]
http://mail.scipy.org/mailman/listinfo/numpy-discussion