aperiosoftware / astropy

Repository for the Astropy core package
www.astropy.org
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Properly accept/return new-style buffers from codecs, and expand test suite #19

Closed astrofrog closed 1 year ago

astrofrog commented 1 year ago

Neither bytes or numpy arrays are strictly buffer objects - this updates the test suite to make sure that we can pass memoryview objects (which are buffer-compliant) and also updates the decode functions to return actual buffer objects that can be used to then reconstruct Numpy arrays. I've also expanded the test suite to cover all int types and endian.

Interestingly io.fits seems to just not work with 64-bit types for compression, even though technically speaking GZIP_1, GZIP_2 and HCOMPRESS could support it (so maybe this is something we could improve in future).