- changed title to promote_types needed for polyfit()
promote_types needed for polyfit()
Issue #15
resolved
When I try to use polifit an TypeError occour: 'NoneType' object is not callable
testscript:
import numpy as np
np.polyfit([1,2],[1,2],1)
result with pypy
TypeError Traceback (most recent call last)
<ipython-input-2-812315395059> in <module>()
----> 1 np.polyfit([1,2],[1,2],1)
/home/andreas/python/env/pypy/site-packages/numpy/lib/polynomial.pyc in polyfit(x, y, deg, rcond, full, w, cov)
561
562 # set up least squares equation for powers of x
--> 563 lhs = vander(x, order)
564 rhs = y
565
/home/andreas/python/env/pypy/site-packages/numpy/lib/twodim_base.pyc in vander(x, N, increasing)
564 N = len(x)
565
--> 566 v = empty((len(x), N), dtype=promote_types(x.dtype, int))
567 tmp = v[:, ::-1] if not increasing else v
568
TypeError: 'NoneType' object is not callable
pypy version:
sys.version
'2.7.8 (f5dcc2477b97, Sep 18 2014, 11:33:30)\n[PyPy 2.4.0 with GCC 4.6.3]'
using numpy 1.9.0
Comments (2)
-
-
- changed status to resolved
With pypy 2.6, this works, though we still have test failures related to
np.polyfit
. - Log in to comment
changed title, promote_types is not implemented yet