Skip to content

Poor ndarray.take performance on Fortran order arrays (Trac #2065) #2657

Description

@numpy-gitbot

Original ticket http://projects.scipy.org/numpy/ticket/2065 on 2012-02-26 by @wesm, assigned to unknown.

3000x slowdown observed:

In [25]: arr = np.random.randn(350000, 5)

In [26]: timeit arr.take(np.arange(5), axis=0)
100000 loops, best of 3: 2.86 us per loop

In [27]: arr = np.random.randn(350000, 5).copy('F')

In [28]: timeit arr.take(np.arange(5), axis=0)
100 loops, best of 3: 9.03 ms per loop

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions