[SciPy-user] NumPy arrays of Python objects (it was Re: How to start with SciPy and NumPy)
Mon Jan 26 01:53:47 CST 2009
I have a doubt, related with all what was talked in the last posts of the
I've managed to build a NumPy array whose elements (scalars?) are objects
from a class. That class was defined by me previously.
Each object contains several properties. For example, they have the property
For each object, the property "value" can contain many different things, for
example, an integer value, a boolean value or a "float". SO, I think it
wouldn't be possible to replace that "object"/class with a NumPy data-type
or "struct", in case I wanted.
My question: is that a problem? I mean, is that NumPy array going to be
"slow" to search, and so on, because its elements are not "optimized" NumPy
types?? Maybe this question has no sense, but, actually, I would like to
know if there is any kind of problem with that kind of "mixed structure":
using NumPy arrays of developer-defined (non-NumPy) objects.
Thank you in advance!
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the SciPy-user