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 saw similar reports in #6074 and #4707, but I didn't find any report matching this issue exacly.
When multiplying arrays a and b, a*=b and a=a*b are not equivalent if their types are different.
The same happens with addition.
In Numpy 1.8.2, on python 3.4, different behaviour is observed in the following two cases:
There is no inconsistency here, because the first example corresponds to:
a1[...] = a1 * c
since it is in-place the data type cannot change, so that there is an (unsafe) cast involved. Note that there is a deprecation warning about this, and it may be turned into an error in the future (or maybe it was already in 1.10). Which will force the user to make the cast manually.
If you have any further questions, feel free to ask.
I saw similar reports in #6074 and #4707, but I didn't find any report matching this issue exacly.
When multiplying arrays
a
andb
,a*=b
anda=a*b
are not equivalent if their types are different.The same happens with addition.
In Numpy 1.8.2, on python 3.4, different behaviour is observed in the following two cases:
#1
Output:
[0 1] int64
#2
Output
[ 0.7 1.4] float64
However, I'm not sure whether this is a bug, or just a matter of semantics.
The text was updated successfully, but these errors were encountered: