Skip to content

np.nansum is not slow than bn.nansum when use float32 #342

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
isaac-you opened this issue Apr 4, 2020 · 1 comment
Open

np.nansum is not slow than bn.nansum when use float32 #342

isaac-you opened this issue Apr 4, 2020 · 1 comment
Labels
bug perf Performance impreovement or regression
Milestone

Comments

@isaac-you
Copy link

import bottleneck as bn
import numpy as np

m1 = np.random.randn(300,3000)
m1_32 = m1.astype(np.float32)

%timeit np.nansum(m1,axis=1)
%timeit bn.nansum(m1,axis=1)

%timeit np.nansum(m1_32,axis=1)
%timeit bn.nansum(m1_32,axis=1)

when use float64 then bottleneck is faster
but float32 bottleneck is slower

@qwhelan qwhelan added bug perf Performance impreovement or regression labels Apr 10, 2020
@qwhelan qwhelan added this to the 1.4.0 milestone Apr 10, 2020
@qwhelan
Copy link
Collaborator

qwhelan commented Apr 10, 2020

I believe this is simple to fix, thanks for reporting!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug perf Performance impreovement or regression
Projects
None yet
Development

No branches or pull requests

2 participants