Skip to content

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

Open
@isaac-you

Description

@isaac-you
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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugperfPerformance impreovement or regression

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions