PyO3 / rust-numpy

PyO3-based Rust bindings of the NumPy C-API
BSD 2-Clause "Simplified" License
1.07k stars 98 forks source link

Use a transparent repr for PyReadonly/ReadwriteArray as this has become as single field struct. #384

Closed adamreichold closed 1 year ago

adamreichold commented 1 year ago

Using #[repr(C)] was necessary when it had multiple fields so that the Deref implementation from PyReadwriteArray to PyReadonlyArray is sound.