Got error: 'float64' object has no attribute 'size'

Issue #13 resolved
Lin Yan created an issue

Run following command:

$ pypy -c 'import numpy as np; np.average([1,2,3])'
Traceback (most recent call last):
 File "app_main.py", line 72, in run_toplevel
  File "app_main.py", line 578, in run_it
  File "<string>", line 1, in <module>
  File "/home/skyan/pypy/site-packages/numpy/lib/function_base.py", line 496, in average
    scl = avg.dtype.type(a.size/avg.size)
AttributeError: 'float64' object has no attribute 'size'

From the message, it is said that 'float64' object in pypy/numpy has no attribute 'size' but in cpython numpy it does has such attribute. So I wonder is there any interface difference between pypy and cpython numpy? At least, I cannot use 'average' function in numpy.

My environment is:

PyPy 2.2.1 with GCC 4.8.2

pypy/numpy is installed from git repository.

If there is any other useful information that helps, please let me know.

Comments (3)

  1. Log in to comment