On Wed, Feb 11, 2009 at 10:47 PM, Pierre GM pgmdevl...@gmail.com wrote:
On Feb 11, 2009, at 11:38 PM, Ryan May wrote:
Pierre,
I noticed that using dtype=None with a heterogeneous set of data,
trying to use unpack=True to get the columns into separate arrays
(instead of a structured array) doesn't work. I've attached a patch
that, in the case of dtype=None, unpacks the fields in the final
array into a list of separate arrays. Does this seem like a good
idea to you?
Nope, as it breaks consistency: depending on some input parameters,
you either get an array or a list. I think it's better to leave it as
it is, maybe adding an extra line in the doc precising that
unpack=True doesn't do anything for structured arrays.
Ah, I hadn't thought of that. I was only thinking in terms of the behavior
of unpacking on return, not in the actual returned object. You're right,
it's a bad idea.
Ryan
--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion