Closed nfrancque closed 2 years ago
fxpmath works with numpy through dispatching methods __array_function__
and __array_ufunc__
(more info here) where a Fxp
is converted to a ndarray
before call the numpy function and create a new Fxp
with the returned value. If a numpy function doesn't support this protocol maybe an error could happen.
According to the error you reported, it seems that the problem is with the creation of a Fxp
with the returned value. It would be useful to have a piece of code to reproduce the error and perform the debug.
Closing this issue due it's inactive.
Should we expect all numpy functions to work with fxpmath, or just the common ones?
I'm trying to call
numpy.linalg._umath_linalg.eigh_lo
and getting the following exception:I tried messing with handling for tuples vs. lists a bit but wasn't able to figure much out.
Calling the same code but removing the fixed point conversion before calling
eigh_lo
works, so it must be something with the fxpmath compatibility.