-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Labels
enhancementNew feature or requestNew feature or request
Description
If you want to get e.g. &[f64] from an NPY file, you currently need to call NpyData::to_vec, but chances are that opened files are created at memory addresses with pretty big alignment, and the internal data of the NPY is most likely such that the data will already be aligned to any reasonable size.
Should also check endianness of course.
We could have an unsafe trait to allow NpyData to produce Cow for a type, using Cow::Borrowed whenever the data is already sufficiently aligned. (It should be unsafe because it will need to transmute a byte slice, which has all sorts of safety implications...)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request