[Numpy-discussion] numpy.dtype problem

Travis Oliphant oliphant.travis at ieee.org
Wed Feb 1 09:31:08 CST 2006


Francesc Altet wrote:

>A Dimecres 01 Febrer 2006 15:46, Christopher Hanley va escriure:
>  
>
>>The following seems to have stopped working:
>>
>>
>>In [6]: import numpy
>>
>>In [7]: a = numpy.ones((3,3),dtype=numpy.int32)
>>
>>In [8]: a.dtype.name
>>---------------------------------------------------------------------------
>>exceptions.MemoryError                               Traceback (most
>>recent call last)
>>
>>/data/sparty1/dev/devCode/<console>
>>
>>MemoryError:
>>    
>>
>
>Below is a patch for this. It seems to me that Travis is introducing
>new *scalar data types. I'm not sure if they should appear in this
>case, but perhaps he can throw some light on this.
>  
>
No, I'm not introducing anything new.  I just changed the name of the 
scalar type objects.  They used to be conveying type information for the 
array (but that is now handled by the dtype objects), and so I changed 
the name of the scalars from <x>_arrtype to <x>scalar to better convey 
what they are. 

The code in the name attribute getter was expecting an underscore which 
isn't there anymore.

-Travis






More information about the Numpy-discussion mailing list