[Numpy-discussion] Using new numeric instances in NumArray and RecArray.

Todd Miller jmiller at stsci.edu
Mon Dec 13 04:54:00 EST 2004

On Mon, 2004-12-13 at 12:39 +0100, Ivan Vilata i Balaguer wrote:
>   Hi all!  I am trying to define new numeric types to use them in
>   NumArray and RecArray objects.  My intention is to define them as
>   equivalent to other types, but also make possible to distinguish them.
>   I tried "MyInt32 = IntegralType(4, 'MyType')", which registered OK, is
>   equivalent to Int32, but distinguishable from it.  However, I am not
>   allowe to create a NumArray based on it: "a = array([1,2], MyInt32)"
>   fails with "RuntimeError: _numarray_init: can't get typeno for type".
>       Is it possible to integrate new types seamlessly into NumArray and
>   RecArray objects?  

I don't know.  No one else has asked for it yet so you're in unfamiliar
territory.  It does seem (to me anyway) like it would complicate an
already complex system.  What are you trying to do?

> Is this the right approach, or am I getting that
>   wrong?

The system as it stands is not designed for that.


More information about the NumPy-Discussion mailing list