mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
This was the reason a numeric array to a real power was not working.
This commit is contained in:
parent
88c6bdf042
commit
f7d590c93d
1 changed files with 2 additions and 1 deletions
|
@ -463,7 +463,8 @@ do_pow(v, w)
|
|||
"pow() requires numeric arguments");
|
||||
return NULL;
|
||||
}
|
||||
if (PyFloat_Check(w) && PyFloat_AsDouble(v) < 0.0) {
|
||||
if (PyFloat_Check(v) && PyFloat_Check(w) &&
|
||||
PyFloat_AsDouble(v) < 0.0) {
|
||||
if (!PyErr_Occurred())
|
||||
PyErr_SetString(PyExc_ValueError,
|
||||
"negative number to float power");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue