[Numpy-discussion] Performance issue in covariance function in Numpy 1.9 and later
ralf.gommers at gmail.com
Tue Jul 19 15:44:23 EDT 2016
On Tue, Jul 19, 2016 at 3:53 PM, Ecem sogancıoglu <ecemsogancioglu at gmail.com
> Hello All,
> there seems to be a performance issue with the covariance function in
> numpy 1.9 and later.
> Code example:
> In numpy 1.8, this line of code requires 4.5755 seconds.
> In numpy 1.9 and later, the same line of code requires more than 30.3709 s
> execution time.
Hi Ecem, can you make sure to use the exact same random array as input to
np.cov when testing this? Also timing just the function call you're
interested in would be good; the creating of your 2-D array takes longer
than the np.cov call:
In : np.random.seed(1234)
In : x = np.random.randn(700,37000)
In : %timeit np.cov(x)
1 loops, best of 3: 572 ms per loop
In : %timeit np.random.randn(700, 37000)
1 loops, best of 3: 1.26 s per loop
> Has anyone else observed this problem and is there a known bugfix?
> NumPy-Discussion mailing list
> NumPy-Discussion at scipy.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the NumPy-Discussion