Skip to content

ENH: CreateSortedStridePerm suboptimal #434

Closed
@seberg

Description

@seberg

The CreateSortedStridePerm does not work correctly when it comes to non C ordered arrays that include a 1 dimensional axis somewhere in the middle (and are not contiguous as this is typically optimized anyways). Its a corner case, but since I noticed thought I would post it.

For these cases it will fail to sort the array and this results unnecessarily slow operations for some things. (IE: e = np.empty(400,400,400)[::2,::2,::2]; e[:,0,:] = 5) is much faster then e[:,0:1,:] = 5. Also this means that e.copy('k') is not Fortran order, which maybe it never was, but seems not what one would expect.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions