From: Travis O. <oli...@ee...> - 2006-10-31 17:25:31
|
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 |