[pypy-issue] [issue1160] numpypy.int missing and numpy.integer doesn't work

Valery tracker at bugs.pypy.org
Wed Oct 3 08:55:06 CEST 2012

Valery <khamenya at gmail.com> added the comment:

Update: np.integer is *not* an alias of np.int. Proof in CPython 2.7.1 / numpy 1.6.1:

  >>> set(dir(np.int))==set(dir(np.integer))

In fact np.integer is an abstract class 

Sadly, http://docs.scipy.org/doc/numpy/user/basics.types.html also states ambiguously:

  "int	-- Platform integer (normally either int32 or int64)"

However at least as for numpy 1.6.1 it is neither numpy.int32 nor numpy.int64. They rather 
just meant the number of bits in __builtin__.int in this fancy ambiguous way.


  >>> np.int == __builtin__.int

  >>> np.int
  <type 'int'>

  >>> np.bool == __builtin__.bool

  >>> np.bool
  <type 'bool'>

nosy: +agaynor

PyPy bug tracker <tracker at bugs.pypy.org>

More information about the pypy-issue mailing list