* Use astype(.., copy=False) when possible
* Use Use astype(.., copy=False) also in tests
* Fix CI
* Guillaume's comments
* Address review comments
* Add what's new
* Fix CI
* Lint
* Fix merge issues
* More merge conflict fixes
* Fix failing test
* Lint
* Use copy=True in cluster/hierarchical
* More fixes
Part of #11992.
These were all the things that seemed pretty straight-forward. It's actually a bit bulky but should still be easy to review, hopefully.
* ENH Ensure randomized_svd_low_rank doesn't upcast float to double
* ENH ensure PCA does not upcase f32 to f64; (int is upcast to f32)
* ENH ensure that when input is of type int, the output is float32/64
* ENH prefer float64 over float32; Use float64 for int inputs
* Make sure int types are upcasted to float64; Address Olivier's comments
* FIX check only for 4 decimals when dtype is float32
* Fix spurious line removal
* FIX unstable cumsum in utils.random
* equal_nan = true for isclose
since numpy < 1.9 sum is as unstable as cumsum, fallback to np.cumsum
* added axis parameter to stable_cumsum
* FIX unstable sumsum in ensemble.weight_boosting and utils.stats
* FIX axis problem in stable_cumsum
* FIX unstable cumsum in mixture.gmm and mixture.dpgmm
* FIX unstable cumsum in cluster.k_means_, decomposition.pca, and manifold.locally_linear
* FIX unstable sumsum in dataset.samples_generator
* added docstring for parameter axis of stable_cumsum
* added comment for why fall back to np.cumsum when np version < 1.9
* remove unneeded stable_cumsum
* added stable_cumsum's axis testing
* FIX numpy docstring for make_sparse_spd_matrix
* change stable_cumsum from error to warning
SciPy 0.10 already has an implementation of the logistic function called
scipy.special.expit.
Using this makes RBM training 12% faster, as measured by observing the time
per iteration as reported by the plot_rbm_logistic_classification.py example,
disregarding the first iteration as an outlier (it's consistently faster than
the rest, not sure why). The speedup is in the expit function, not the
inplace operations; those are there to make benchmarking easier, but they
certainly won't hurt.