[pypy-issue] [issue1546] numpy.array(..., numpy.character) fails

Peter tracker at bugs.pypy.org
Wed Jul 17 13:28:21 CEST 2013


New submission from Peter <p.j.a.cock at googlemail.com>:

Simple example using C Python 2.7 and NumPy 1.6.1,

$ python
Python 2.7.2 (default, Oct 11 2012, 20:14:37) 
[GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy as np
>>> np.character
<type 'numpy.character'>
>>> x = np.array([["A", "B"], ["C", "D"]], np.character)
>>> x
array([['A', 'B'],
       ['C', 'D']], 
      dtype='|S1')
>>> quit()

Attempting to repeat this on PyPy 2.0 using numpypy,

$ pypy
Python 2.7.3 (5acfe049a5b0, May 21 2013, 13:47:22)
[PyPy 2.0.2 with GCC 4.2.1 Compatible Apple LLVM 4.2 (clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
And now for something completely different: ``Therefore, specific information,
I was in an ideal context, I had to realize the faith''
>>>> import numpypy
>>>> import numpy as np
>>>> np.character
<type 'numpypy.character'>
>>>> x = np.array([["A", "B"], ["C", "D"]], np.character)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: data type not understood (value of type type not expected here)
>>>> quit()

----------
messages: 5945
nosy: peterjc, pypy-issue
priority: bug
release: 2.0
status: unread
title: numpy.array(..., numpy.character) fails

________________________________________
PyPy bug tracker <tracker at bugs.pypy.org>
<https://bugs.pypy.org/issue1546>
________________________________________


More information about the pypy-issue mailing list