Marcus Karr
Marcus Karr
This might help ```python NP_NDARRAY_CODE = 1 class NumpyStruct(msgspec.Struct): arr: np.ndarray def enc_hook(obj: Any) -> Any: if isinstance(obj, np.ndarray): f = io.BytesIO() np.save(f, obj) data = f.getvalue() return msgspec.msgpack.Ext(NP_NDARRAY_CODE, data)...
> @nightsailer I sure hope this passes you don't know how annoying it has been to try and turn Msgspec into an Object Relational Mapping Library. If this passes it...
@wreimers Thanks for sharing the workaround. It's odd that `aiosqlite.register_adapter` seems to work but the converter does not.
There are lots of numpy datatypes and ndarray shapes, I wouldn't be surprised if native support is a hassle. I keep track of metadata like shape and dtype in the...