Charles R Harris
2017-01-03 02:27:09 UTC
Hi All,
Currently functions like trace use the C long type as the default
accumulator for integer types of lesser precision:
dtype : dtype, optional
platform so that the result varies, see gh-8433
<https://github.com/numpy/numpy/issues/8433> for a complaint about this.
There are two possible alternatives that seem reasonable to me:
1. Use 32 bit accumulators on 32 bit platforms and 64 bit accumulators
on 64 bit platforms.
2. Always use 64 bit accumulators.
Thoughts?
Chuck
Currently functions like trace use the C long type as the default
accumulator for integer types of lesser precision:
dtype : dtype, optional
Determines the data-type of the returned array and of the accumulator
where the elements are summed. If dtype has the value None and `a` is
of integer type of precision less than the default integer
precision, then the default integer precision is used. Otherwise,
the precision is the same as that of `a`.
The problem with this is that the precision of long varies with thewhere the elements are summed. If dtype has the value None and `a` is
of integer type of precision less than the default integer
precision, then the default integer precision is used. Otherwise,
the precision is the same as that of `a`.
platform so that the result varies, see gh-8433
<https://github.com/numpy/numpy/issues/8433> for a complaint about this.
There are two possible alternatives that seem reasonable to me:
1. Use 32 bit accumulators on 32 bit platforms and 64 bit accumulators
on 64 bit platforms.
2. Always use 64 bit accumulators.
Thoughts?
Chuck