numpy/numpy-user-dtypes

SleefQuadPrecision arrays are missing isnan, isinf, isfinite, sign, copysign ufuncs

Closed this issue · 3 comments

isnan, isinf, isfinite, and sign should be implementable using comparison functions, for copysign sleef contains an implementation.

I'd be happy to submit a PR for these ufuncs if you could point me in the right direction of where to add them.

Makes sense to me.

Look inside umath.cpp. Here's where StringDType sets up isnan inside NumPy: https://github.com/numpy/numpy/blob/85708b3c0bd3d2fdbcb00cb08d0a7b323ce3af2d/numpy/_core/src/umath/stringdtype_ufuncs.cpp#L2650-L2655

There's an older version of StringDType in this repo too.

Also big thanks to you and @SwayamInSync for this package - I've been using it for ~half a year now and despite these small inconveniences I've had to patch over it is such a big help!

sign, signbit, and copysign are implemented in #118