Blosc / python-blosc2

https://www.blosc.org/python-blosc2
Other
84 stars 19 forks source link

Type inference that is closer to NumPy #321

Closed FrancescAlted closed 2 weeks ago

FrancescAlted commented 2 weeks ago

This PR enhances the dtype inference so that it mimics now more NumPy than the numexpr one. Although perfect adherence to NumPy casting conventions is not there yet, it is a big step forward towards better compatibility with NumPy. In particular, support for e.g. 'a + np.int8(1)' string expressions allows to serialize them, while keeping NumPy type inference when expression is re-opened from disk.

Most of the np.int, np.float, np.str and np.bytes casting funcs for constants are supported.