bottleneck
bottleneck copied to clipboard
np.nansum is not slow than bn.nansum when use float32
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
I believe this is simple to fix, thanks for reporting!