[SciPy-Dev] review request - test noise clean up

Pauli Virtanen pav at iki.fi
Wed Jan 12 05:49:55 EST 2011


Wed, 12 Jan 2011 18:18:12 +0800, Ralf Gommers wrote:
> https://github.com/rgommers/scipy/commit/fdf18166. They were calls to
> fblas funcs with the wrong dtype, obscured a bit by subclassing the test
> classes. So the only ones left are for ndarray.astype(), which should be
> fixed in numpy.

np.array(1+2j).astype(np.float64)

IMHO should still raise a ComplexWarning. Cast, even explicit, from 
complex to float should strictly speaking be undefined. One should do

np.array(1+2j).real.astype(np.float64)

to be explicit.

-- 
Pauli Virtanen




More information about the SciPy-Dev mailing list