[Numpy-discussion] Should bool_ subclass int?

Robert Kern robert.kern at gmail.com
Fri Jul 6 17:25:27 EDT 2007

Timothy Hochberg wrote:
> I'm working on getting some old code working with numpy and I noticed
> that bool_ is not a subclass of int. Given that python's bool subclasses
> into and that the other scalar types are subclasses of their respective
> counterparts it seems at first glance that numpy.bool_ should subclass
> python's bool, which in turn subclasses int. Or am I missing something here?

That would certainly be desirable. There might be a technical reason why it's
not, but if you can do it, and it seems to work for you, let's check it in.

Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
 that is made terrible by our own mad attempt to interpret it as though it had
 an underlying truth."
  -- Umberto Eco

More information about the NumPy-Discussion mailing list