[Matrix-SIG] I have working code that implements active-casting concept.
Andrew P. Mullhaupt
amullhau@zen-pharaohs.com
Fri, 4 Feb 2000 15:52:37 -0500
> When a universal function involving NumPy arrays is encountered, if all
> arrays are passive (active flag = 0) then the current coercion rules are
> used. If any of the arguments to the function are active arrays, then the
> active array with the largest typecode (enumerated types in arrayobject.h)
> determines the output types. All other arrays are automatically cast
> (even if it means loss of precision) to that type, before the operation
> begins. The output arrays from the function are all active arrays.
As long as there is a simple, completely global way for me to make sure this
never happens - i.e. that I can turn off active arrays globally and
permanently without regard to modules that get imported, etc., I'm OK.
It's a real annoyance to detect, let alone have to track down an unexpected
loss of precision bug when it's not in code you wrote.
I can always hack my own source copy so that if active flag=1 is ever
detected core gets dumped, but that seems a bit extreme.
Later,
Andrew Mullhaupt