diff options
author | Nathaniel J. Smith <njs@pobox.com> | 2015-06-21 18:41:34 -0700 |
---|---|---|
committer | Nathaniel J. Smith <njs@pobox.com> | 2015-06-27 19:21:39 -0700 |
commit | 1adcdf7aa5b20a9afd778290105ec327b705c93e (patch) | |
tree | b8117375595d7c0c05ef332b298891294c1b79f8 /numpy/core/defchararray.py | |
parent | f0c898b6017cc011561d7f1e611e08283ecfdb08 (diff) | |
download | numpy-1adcdf7aa5b20a9afd778290105ec327b705c93e.tar.gz |
BUG: Make a @= b error out
Before this change, we defined a nb_matrix_multiply slot but not a
nb_inplace_matrix_multiply slot, which means that a statement like
a @= b
would be silently expanded by the CPython interpreter to become
a = a @ b
This is undesireable, because it produces unexpected memory
allocations, breaks view relationships, and so forth.
This commit adds a nb_inplace_matrix_multiply slot which simply errors
out, and suggests that users write 'a = a @ b' explicitly if that's
what they want.
Diffstat (limited to 'numpy/core/defchararray.py')
0 files changed, 0 insertions, 0 deletions