Open jturner314 opened 3 years ago
Move .npz functionality into a separate crate
I'm not for or against, but I wonder why you want to do that. Is there a problem with the current feature gate?
The current feature gate is fine as-is, but there are a few advantages to moving the .npz
functionality into a separate crate:
zip
dependency could be updated without a breaking change to the ndarray-npy
crate. (Updating zip
would be a breaking change only for the .npz
crate.)use ndarray_npy as npy; use (the npz crate) as npz;
, then e.g. write_zeroed_npy
would be npy::write_zeroed
and NpzReader
would be npz::Reader
.)
I'm considering changing the public API as follows:
.npz
functionality into a separate crateReadableElement
toReadElement
WritableElement
toWriteElement
read_npy
tofrom_reader
orread
and change it to takeR: Read
instead of a pathwrite_npy
toto_writer
orwrite
and change it to takeW: Write
instead of a pathwrite_zeroed_npy
toto_writer_zeroed
orwrite_zeroed