There are quite some unwraps but it is not so easy to get rid of them within closures.
Currently, I check the first entry of a np.ndarray[Object] to make sure it is of type Self. That's not an exhaustive check because an array np.array([Dual64.from_re(1.0), "hi"]) would be considered as OK.
The error message of an incompatible np.ndarray[Object] (where Object != Self) simply returns <class numpy.ndarray> which is not very helpful.
Open points
unwrap
s but it is not so easy to get rid of them within closures.np.ndarray[Object]
to make sure it is of typeSelf
. That's not an exhaustive check because an arraynp.array([Dual64.from_re(1.0), "hi"])
would be considered as OK.np.ndarray[Object]
(whereObject != Self
) simply returns<class numpy.ndarray>
which is not very helpful.