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
There seems to have been a bug introduced in a recent development version in the ndarray class.
The following MWE completes and works as intended in 1.14.0.dev0+029863e / 029863e (full version / git revision) but fails with a ValueError in 1.14.0.dev0+565e8ca / 565e8ca .
ValueError: setting an array element with a sequence.
Fluff
Tested on Ubuntu 16.04, 17.04, and 17.10 in virtual environments with only numpy, scipy, matplotlib and dependencies installed (numpy and scipy from source, rest via pip). Python versions tested: 2.7.13 and 3.5.2. Additional numpy versions tested: 1.11 (from Ubuntu/canonical repositories), for which the MWE completes successfully.
The text was updated successfully, but these errors were encountered:
Yes, we did disable that kind of assignment. It is actually doing some very unsafe things under the hood and was probably never intended. See #3351, #6806, #6314, #7058 and the PR that fixed them, #6053. In retrospect, we should have added a deprecation warning though.
What that assignment actually does is copy from the src to dst byte-by-byte, with no account of casting, endianness, size, etc. For instance, note you can assign an array with both the wrong size and the wrong type to your array:
Thanks for the quick response, and the clarification. Your otherwise customary depreciation warnings are very much appreciated. ;-) Will now update all my servers to the very newest and brightest if this behaviour is here to stay. Keep up the good work!
Uh oh!
There was an error while loading. Please reload this page.
There seems to have been a bug introduced in a recent development version in the ndarray class.
The following MWE completes and works as intended in 1.14.0.dev0+029863e / 029863e (full version / git revision) but fails with a ValueError in 1.14.0.dev0+565e8ca / 565e8ca .
MWE:
Error message:
Fluff
Tested on Ubuntu 16.04, 17.04, and 17.10 in virtual environments with only numpy, scipy, matplotlib and dependencies installed (numpy and scipy from source, rest via pip). Python versions tested: 2.7.13 and 3.5.2. Additional numpy versions tested: 1.11 (from Ubuntu/canonical repositories), for which the MWE completes successfully.
The text was updated successfully, but these errors were encountered: