[pypy-issue] [issue1161] numpypy.bool missing (numpy boolean dtype)
Peter
tracker at bugs.pypy.org
Sat Jun 9 23:52:37 CEST 2012
New submission from Peter <p.j.a.cock at googlemail.com>:
Here I am creating an array of booleans in NumPy,
$ python
Python 2.7.1 (r271:86832, Jun 25 2011, 05:09:01)
[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy as np
>>> np.__version__
'1.5.1'
>>> np.zeros([4,4], np.bool)
array([[False, False, False, False],
[False, False, False, False],
[False, False, False, False],
[False, False, False, False]], dtype=bool)
>>> np.zeros([4,4], np.bool).dtype
dtype('bool')
Under numpypy, the boolean datatype is missing:
$ ~/Downloads/pypy-1.9/bin/pypy
Python 2.7.2 (341e1e3821ff, Jun 07 2012, 15:42:54)
[PyPy 1.9.0 with GCC 4.2.1] on darwin
Type "help", "copyright", "credits" or "license" for more information.
And now for something completely different: ``pypy is a better kind of
foolishness - lac''
>>>> import numpypy
>>>> import numpy as np
>>>> np.zeros([4,4], np.bool)
Traceback (most recent call last):
File "<console>", line 1, in <module>
AttributeError: 'module' object has no attribute 'bool'
See also numpypy.int missing on issue 1160
----------
messages: 4395
nosy: peterjc, pypy-issue
priority: bug
status: unread
title: numpypy.bool missing (numpy boolean dtype)
________________________________________
PyPy bug tracker <tracker at bugs.pypy.org>
<https://bugs.pypy.org/issue1161>
________________________________________
More information about the pypy-issue
mailing list