[SciPy-user] NumPy arrays of Python objects (it was Re: How to start with SciPy and NumPy)

Vicent vginer@gmail....
Mon Jan 26 01:53:47 CST 2009


Hello again.

I have a doubt, related with all what was talked in the last posts of the
previous thread.

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
"value".

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!

--
Vicent
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/scipy-user/attachments/20090126/02ac8fe2/attachment.html 


More information about the SciPy-user mailing list