[Numpy-discussion] converting scalar to array with dimension 1
Pierre GM
pgmdevlist at gmail.com
Fri Mar 30 18:18:29 EDT 2007
On Friday 30 March 2007 17:43:42 Bill Baxter wrote:
> Actually I
> didn't realize that it had a loop in it, so thanks for pointing that
> out. I thought it was just and alias for array with some args.
I just realized that myself, going directly in the sources: that's how I found
that the ndmin argument was available in the Python interface.
> Actually, I tend to use subok=False more and more. Matrix, despite
> being a subclass of ndarray, is too incompatible with ndarray to
> really mix and match most of the time. So it seems safest just to
> force everything to be a bog-stock ndarray. I made some convenience
> functions that provide the right args to array for my own use.
Yes, Matrix objects are tricky beasts... I use quite regularly masked arrays
and time series (as ndarray subclasses), and don't want to lose the extra
information w/ subok=False. But it's all matter of personal goals, I agree.
More information about the NumPy-Discussion
mailing list