diff options
author | Ruediger Meier <ruediger.meier@ga-group.nl> | 2015-09-26 14:01:26 +0200 |
---|---|---|
committer | Ruediger Meier <ruediger.meier@ga-group.nl> | 2015-09-30 23:18:55 +0200 |
commit | 08e8c1415670b029c26ae8ce0585fb9ea0b11e63 (patch) | |
tree | 38bce83f7f4bcf6ffa1c23894996135321d27939 /numpy/core/fromnumeric.py | |
parent | e6dbcead884019bd2aee802f78c41f6a9c46cd61 (diff) | |
download | numpy-08e8c1415670b029c26ae8ce0585fb9ea0b11e63.tar.gz |
MAINT: corrcoef, memory usage optimization
We calculate sqrt on the small vector rather than on that huge
product matrix and we combine the "outer" product with element-wise
devision. So even though we have a slower loop over the rows now ... this
code snippet runs about 3 times faster than before.
However the speed improvement of the whole function is not really
significant because cov() takes 80-99% of the time (dependent on
blas/lapack implementation and number of CPU cores).
More important is that we will safe 1/3 memory. For example corrcoef()
for a [23k, m] matrix needs 8GB now instead of 12GB.
Diffstat (limited to 'numpy/core/fromnumeric.py')
0 files changed, 0 insertions, 0 deletions