Skip to content

Add fromspan method for NDArray and optimize NDArray loading performance #522

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

embeddetech
Copy link

@embeddetech embeddetech commented Apr 12, 2025

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
Copy link
Author

embeddetech commented Apr 12, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant