hi all, I have tried the example from numpy/add_newdocs.py np.ldexp(5., 2) but instead of the 20 declared there it yields TypeError: function not supported for these types, and can't coerce safely to supported types I have tried arrays but it yields same error
np.ldexp(np.array([5., 2.]), np.array([2, 1])) Traceback (innermost last): File "<stdin>", line 1, in <module> TypeError: function not supported for these types, and can't coerce safely to supported types
So, how can I use ldexp? np.__version__ = '1.4.0.dev6972' Thank you in advance, D.
dmitrey wrote:
hi all, I have tried the example from numpy/add_newdocs.py
np.ldexp(5., 2) but instead of the 20 declared there it yields TypeError: function not supported for these types, and can't coerce safely to supported types
Which OS/Compiler are you using ? David
I have updated numpy to latest '1.4.0.dev7008', but the bug still remains. I use KUBUNTU 9.04, compilers - gcc (using build-essential), gfortran. D. On May 21, 11:21 am, David Cournapeau <da...@ar.media.kyoto-u.ac.jp> wrote:
dmitrey wrote:
hi all, I have tried the example from numpy/add_newdocs.py
np.ldexp(5., 2) but instead of the 20 declared there it yields TypeError: function not supported for these types, and can't coerce safely to supported types
Which OS/Compiler are you using ?
David _______________________________________________ Numpy-discussion mailing list Numpy-discuss...@scipy.orghttp://mail.scipy.org/mailman/listinfo/numpy-discussion
dmitrey wrote:
I have updated numpy to latest '1.4.0.dev7008', but the bug still remains. I use KUBUNTU 9.04, compilers - gcc (using build-essential), gfortran. D.
Can you post the build output (after having removed the build directory : rm -rf build && python setup.py build &> build.log) ? David
On May 21, 11:29 am, David Cournapeau <da...@ar.media.kyoto-u.ac.jp> wrote:
dmitrey wrote:
I have updated numpy to latest '1.4.0.dev7008', but the bug still remains. I use KUBUNTU 9.04, compilers - gcc (using build-essential), gfortran. D.
Can you post the build output (after having removed the build directory : rm -rf build && python setup.py build &> build.log) ?
David
ok, it's here http://pastebin.com/mb021e11 D.
Thu, 21 May 2009 01:45:54 -0700, dmitrey wrote:
I have updated numpy to latest '1.4.0.dev7008', but the bug still remains. I use KUBUNTU 9.04, compilers - gcc (using build-essential), gfortran.
Worksforme on Ubuntu 9.04, on python2.6 and python2.5. Should be the same platform. -- Pauli Virtanen
Thu, 21 May 2009 09:26:18 +0000, Pauli Virtanen wrote:
Thu, 21 May 2009 01:45:54 -0700, dmitrey wrote:
I have updated numpy to latest '1.4.0.dev7008', but the bug still remains. I use KUBUNTU 9.04, compilers - gcc (using build-essential), gfortran.
Worksforme on Ubuntu 9.04, on python2.6 and python2.5. Should be the same platform.
This was on 32-bit machine. I can reproduce this on a 64-bit platform, current SVN head:
np.ldexp(5, 2) Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: function not supported for these types, and can't coerce safely to supported types np.ldexp(5, np.int32(2)) 20.0 np.ldexp.types ['fi->f', 'di->d', 'gi->g']
So for some reason the second argument tries to cast Python int to int64, and there's no loop to handle this. -- Pauli Virtanen
Hi Dmitrey 2009/5/21 dmitrey <dmitrey.kroshko@scipy.org>:
hi all, I have tried the example from numpy/add_newdocs.py
np.ldexp(5., 2) but instead of the 20 declared there it yields TypeError: function not supported for these types, and can't coerce safely to supported types
I could not reproduce the problem on current SVN: In [6]: np.ldexp(5., 2) Out[6]: 20.0 In [7]: np.ldexp(np.array([5., 2.]), np.array([2, 1])) Out[7]: array([ 20., 4.]) Regards Stéfan
participants (4)
-
David Cournapeau
-
dmitrey
-
Pauli Virtanen
-
Stéfan van der Walt