Skip to content

nd.split does not behave as expected #176

@Ivorforce

Description

@Ivorforce

Reported by @nonyx777 on Discord.

The following code does not work as expected:

var a := nd.linspace(0, 8, 9).reshape([3, 3])

print(nd.split(a, 3, 0))

The code prints behaves like the axis=1 version (reportedly):

>>> np.split(a, 3, 1)
[array([[0.],
       [3.],
       [6.]]), array([[1.],
       [4.],
       [7.]]), array([[2.],
       [5.],
       [8.]])]

The code should be behaving as numpy:

>>> np.split(a, 3, 0)
[array([[0., 1., 2.]]), array([[3., 4., 5.]]), array([[6., 7., 8.]])]

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions