[SciPy-user] How to start with SciPy and NumPy
Sun Jan 25 10:45:58 CST 2009
On Sun, Jan 25, 2009 at 13:26, Vicent <firstname.lastname@example.org> wrote:
> If I used NumPy arrays, then every value would be stored as "float" (I
> guess), and then an extra field would be necessary in order to store and get
> the actual type for each variable.
> I mean, I would have a "variable" class which would contain "value" and
> "type" as properties (among others), and then I would have a NumPy array of
> "variable" objects.
> Stop! [ I am thinking...]
> Anyway, I'll have a "variable" object, because I need to store some
> information for each variable, it doesn't depend on wether I use lists or
> arrays to store "variables".
> So, within each "variable" element in the NumPy array, the "value" property
> for that "variable" can contain an integer value, or a boolean value, etc.
> No matter about "different types of elements", because all of them are
> "wrapped" with the "variable" structure.
I've been reading a little about NumPy arrays and "dtypes" or data-types.
I understand I can create arrays where each element follows a specific
But, if I create a class, can objects (which are instances) from that class
be elements of a NumPy array?
I mean, can I build a NumPy array whose elements are objects of a class I've
Sorry if my expressions are not right enough...
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the SciPy-user