Skip to content

np.load System.Exception #484

Closed
Closed

Description

@Kiord

I am loading several arrays in Unity using NumSharp's np.load. It works well for most of them but one throws an exception :

image

In NumPy np.load works fine for this this array.

here is a link to download this specific array.

What is the reason behind this exception ?

Thank you

Activity

  1. Nucs commented on Sep 7, 2026

    @Nucs
    Member

    I downloaded the array.zip attached to this issue and loaded it on 0.70.0 - it loads correctly now (float64, shape 56×56):

    var a = np.load_npy("array.npy");
    Console.WriteLine(a.dtype);                      // System.Double
    Console.WriteLine(string.Join(",", a.shape));    // 56,56

    The .npy/.npz stack was re-ported byte-exact from NumPy's _format_impl.py (#617, in 0.70.0 #628), which fixed the header/parse path that threw on your file. Closing - please reopen if a different file still fails.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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