diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2016-10-08 12:21:20 -0600 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2016-10-20 13:43:52 -0600 |
commit | f4f8a1c01c701e92c8b290b58682da8dfbdaac67 (patch) | |
tree | 5a48f5131999f459a45234385ec8bdd05b8d32b6 /numpy/core/setup_common.py | |
parent | f236760314d5c32bf4d9398f1cffc3c68be5eaea (diff) | |
download | numpy-f4f8a1c01c701e92c8b290b58682da8dfbdaac67.tar.gz |
ENH: Power ufunc raises error for integer to negative integer powers.
This is a change in behaviour. Previously
* zero to negative integer powers returned least integral value.
* 1, -1 to negative integer powers returned correct values
* all remaining integers returned zero when raised to negative integer
powers.
All of these cases now raise a ``ValueError``. It was felt that a simple
rule was the best way to go rather than have special exceptions for the
units. If you need negative powers, use an inexact type.
Diffstat (limited to 'numpy/core/setup_common.py')
0 files changed, 0 insertions, 0 deletions