NumSharp icon indicating copy to clipboard operation
NumSharp copied to clipboard

Add fromspan method for NDArray and optimize NDArray loading performance

Open embeddetech opened this issue 8 months ago • 1 comments

Added the ability to load an NDArray from span< bytes >, completed loading of various missing types, and optimized the loading time using marshaling instead of BitConverter.

embeddetech avatar Apr 12 '25 20:04 embeddetech

Note: I added the fromspan method to the np.frombuffer.cs file. It may be preferable to create a separate np.fromspan.cs file, but I did not do that. Using span< bytes > is faster in parsing scenarios to avoid allocating byte arrays.

embeddetech avatar Apr 12 '25 20:04 embeddetech