-
Notifications
You must be signed in to change notification settings - Fork 972
[QDP] Numpy IO support #777
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
Conversation
|
@ryankert01 thanks for the patch |
|
Should we add a file size check like other format to prevent OOM? |
| let path = path.as_ref(); | ||
|
|
||
| // Verify file exists | ||
| if !path.exists() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we could add this path.exists() in other format.
|
|
||
| // Flatten to Vec<f64> | ||
| // Handle both C-contiguous (row-major) and Fortran-contiguous (column-major) | ||
| let data = if array.is_standard_layout() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this one it's great!
|
overall LGTM |
I agree with this one. |
|
I have thought of 2 more memory-friendly alternatives to the current
We can do this in a follow up if needed. |
400Ping
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall LGTM
This one is a nice suggestion! |
Purpose of PR
ran some benchmark + test(maybe) on colab.
https://colab.research.google.com/drive/1NuAyAFsko3uD8MMBTDQpob4zSxg_GeiC?usp=sharing
Related Issues or PRs
Closes #722
Changes Made
Breaking Changes
Checklist