There is a NEP to support custom DTypes that define custom arithmetic and storage. As that becomes more stable, we can adapt the API to have a DType factory that yields a new dtype for each finite field.
This will be a large refactor, but will support the future direction of NumPy. If done, it will require a big bump in the minimum NumPy version supported. We may just have to leave galois versions < X to be the ones that support the previous paradigm (ndarray subclasses that implement finite field math).
There is a NEP to support custom DTypes that define custom arithmetic and storage. As that becomes more stable, we can adapt the API to have a DType factory that yields a new dtype for each finite field.
This will be a large refactor, but will support the future direction of NumPy. If done, it will require a big bump in the minimum NumPy version supported. We may just have to leave galois versions < X to be the ones that support the previous paradigm (
ndarraysubclasses that implement finite field math).