You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to make a signature of two inputs:int32, int32 returning output; float64 and this failed.
I notice some inputs like int16 return float32.
On sqrt, some inputs, like int8, return float16.
I thought it was common practice for these operations to return float64 unless the input is a float16, float32 or float128.
Second issue: I believe these are examples of internal upcast loops. That is, no need to convert int32 to float64 (in a first pass creating a temp array), then divide. Rather the loop can upcast ints to floats and then divide.
The text was updated successfully, but these errors were encountered:
I tried to make a signature of two inputs:int32, int32 returning output; float64 and this failed
I am pretty sure you cannot do this via PyUFunc_ReplaceLoopBySignature . The only way (unfortunately) to add a signature is at UFunc creation time. The way NumPy does this is that a generator function spits out __umath_generated.c, which has static arrays of functions and signatures, here is the part for arccosh:
I tried to make a signature of two inputs:int32, int32 returning output; float64 and this failed.
I notice some inputs like int16 return float32.
On sqrt, some inputs, like int8, return float16.
I thought it was common practice for these operations to return float64 unless the input is a float16, float32 or float128.
Second issue: I believe these are examples of internal upcast loops. That is, no need to convert int32 to float64 (in a first pass creating a temp array), then divide. Rather the loop can upcast ints to floats and then divide.
The text was updated successfully, but these errors were encountered: