[Numpy-discussion] how to use ldexp?

dmitrey dmitrey.kroshko at scipy.org
Thu May 21 03:50:45 EDT 2009


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.



More information about the NumPy-Discussion mailing list