Hi All, 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 the 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
_______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org https://mail.scipy.org/mailman/listinfo/numpy-discussion