Skip to content

User facing split does not match numpy #1344

Open
@ricardoV94

Description

@ricardoV94

Description

Our implementation of Split expects the sizes of the subarrays (instead of the truncation points like numpy) and these must match to the full size of the input.

This is arguably a more sensible implementation as this is valid in numpy:

import numpy as np
np.split(np.zeros(10), [5, 2])

However users wanting to use split may be tripped by the fact it is different than the numpy one. We should offer a helper for the numpy one and keep ours internally. We can canonicalize to ours when we know all split sizes are non-decreasing.

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