[Numpy-discussion] Updates to NumPy

Travis Oliphant oliphant.travis at ieee.org
Fri Jun 2 18:28:25 EDT 2006


I've been busy with NumPy and it has resulted in some C-API changes.  
So, after checking out a new SVN version of NumPy you will need to 
re-build extension modules (It stinks for me too --- SciPy takes a while 
to build).

The API changes have made it possible to allow user-defined data-types 
to optionally participate in the coercion and casting infrastructure.   
Previously, casting was limited to built-in data-types. Now, there is a 
mechanism for users to define casting to and from their own data-type 
(and whether or not it can be done safely and whether or not a 
particular kind of user-defined scalar can be cast --- remember a scalar 
mixed with an array has a different set of casting rules).

This should make user-defined data-types much more useful, but the 
facility needs to be tested.   Does anybody have a data-type they want 
to add to try out the new system.

The restriction on adding another data-type is that it must have a fixed 
element size (a variable-precision float for example would have to use a 
pointer to the actual structure as the "data-type").


-Travis






More information about the NumPy-Discussion mailing list