2011/11/11 Peter Prettenhofer <[email protected]>:
> Nonetheless, when one tries to build scikit-learn with numpy dev-0.2
> 12 tests fail due to regressions. I traced the most common error to
> the fact that `X -= mean` fails on numpy-dev if (X - mean) cannot be
> cast safely to X.dtype. This is the case for X.dtype == int64 and mean
> == float64. Here is the trace::
>
>    X -= X_mean
>    TypeError: Cannot cast ufunc subtract output from dtype('float64')
> to dtype('int64') with casting rule 'same_kind'
>
> I see two ways to deal with that: a) cast X to either float32 or
> float64 or b) compute X = X - mean. I prefer b).

Both of these copy X, right?

-- 
Lars Buitinck
Scientific programmer, ILPS
University of Amsterdam

------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
Scikit-learn-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general

Reply via email to