dtype.hasobject value

Travis Oliphant oliphant at ee.byu.edu
Tue Oct 31 12:25:20 EST 2006


Travis Oliphant wrote:

>Matthew Brett wrote:
>  
>
>>Hi,
>>
>>I notice that the value for:
>>
>>zeros((1,), dtype=object).dtype.hasobject
>>
>>is now 63, whereas previously it had been 1.  Is this intended?
>>
>>  
>>    
>>
>
>Yes.  We are using hasobject as an 8-bit flag now and separating out 
>some of the concepts that make object arrays object arrays.
>
>This will be in 1.0.1 which will come out soon.  It should be binary 
>compatible with 1.0.
>  
>
Let me follow up with this.   I've changed back dtype.hasobject so that 
it returns a Python boolean object.  Thus comparisons to 1 should work 
fine.  Under the covers it is

(dtype->hasobject & NPY_ITEM_HASOBJECT) == NPY_ITEM_HASOBJECT)

There is a new attribute (flags) that contains all the flags in the 
hasobject variable.  

-Travis


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642




More information about the NumPy-Discussion mailing list