Wed Jul 18 08:18:38 CDT 2012
On Wed, 2012-07-18 at 15:14 +0200, Molinaro Céline wrote:
> In : numpy.real(arange(3))
> Out: array([0, 1, 2])
> In : numpy.complex(arange(3))
> TypeError: only length-1 arrays can be converted to Python scalars
> Are there any reasons why numpy.complex doesn't work on arrays?
> Should it be bug reported?
numpy.complex is just a reference to the built in complex, so only works
In : numpy.complex is complex
Try numpy.complex128 (or another numpy.complexN, with N being the bit
More information about the NumPy-Discussion