[SciPy-dev] bool8 link returns bool_ docstring

Pauli Virtanen pav+sp@iki...
Sat Jul 18 18:15:12 CDT 2009

On 2009-07-18, Scott David Daniels <Scott.Daniels@Acm.Org> wrote:
> Stéfan van der Walt wrote:
>> 2009/7/16 David Goldsmith <d_l_goldsmith@yahoo.com>:
>>> Once again I believe I've answered my own question (I need to have more faith in my research abilities and not cry for help so quickly): Figure 2.2 in "Guide To Numpy" illustrating the hierarchy of scalar types -
>>> the names used there are the "base" names, any equivalent is considered an "alias," yes?  Oh, but this doesn't answer my first question: is the fact that the Wiki returns the same docstring for equivalent types a bug or a feature?  (At this point I'm assuming "feature," but confirmation would be appreciated.)  Thanks,
>> It's the same object:
>> In [8]: np.bool_
>> Out[8]: <type 'numpy.bool_'>
>> In [9]: np.bool8
>> Out[9]: <type 'numpy.bool_'>
> All that shows is that the two classes print the same thing.
> This is how you can tell:
> >>> np.bool8 is np.bool_
> True
> >>>

ThereÃ's a slightissue in that eg. the np.intp may either point 
to int32 or int64. This is decided by Numpy at the build time.

The docstrings should reflect the bit-width versions, I believe. 
The aliases and their behavior is documented manually in 

Pauli Virtanen

More information about the Scipy-dev mailing list