summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
authorEric Wieser <wieser.eric@gmail.com>2017-12-27 17:49:42 +0000
committerEric Wieser <wieser.eric@gmail.com>2017-12-27 17:49:42 +0000
commit2adb9298e4bad5b961143293d9ba19dbd10a2786 (patch)
tree0c5b7a06ea91779d109fd27b45b1d23f2f7eb69d /numpy
parent8a05dfde430393244bc86f23186c3bd487a729da (diff)
downloadnumpy-2adb9298e4bad5b961143293d9ba19dbd10a2786.tar.gz
BUG: Remove broken divmod O->OO loop until it is fixed
A function that produces the wrong results is worse than no function at all See gh-9730
Diffstat (limited to 'numpy')
-rw-r--r--numpy/core/code_generators/generate_umath.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/numpy/core/code_generators/generate_umath.py b/numpy/core/code_generators/generate_umath.py
index ec62df590..9470e882a 100644
--- a/numpy/core/code_generators/generate_umath.py
+++ b/numpy/core/code_generators/generate_umath.py
@@ -789,7 +789,7 @@ defdict = {
docstrings.get('numpy.core.umath.divmod'),
None,
TD(intflt),
- TD(O, f='PyNumber_Divmod'),
+ # TD(O, f='PyNumber_Divmod'), # gh-9730
),
'hypot':
Ufunc(2, 1, Zero,
@@ -942,12 +942,6 @@ def make_arrays(funcdict):
k = 0
sub = 0
- if uf.nin > 1:
- assert uf.nin == 2
- thedict = chartotype2 # two inputs and one output
- else:
- thedict = chartotype1 # one input and one output
-
for t in uf.type_descriptions:
if t.func_data is FullTypeDescr:
tname = english_upper(chartoname[t.type])
@@ -977,6 +971,13 @@ def make_arrays(funcdict):
))
else:
funclist.append('NULL')
+ if (uf.nin, uf.nout) == (2, 1):
+ thedict = chartotype2
+ elif (uf.nin, uf.nout) == (1, 1):
+ thedict = chartotype1
+ else:
+ raise ValueError("Could not handle {}[{}]".format(name, t.type))
+
astype = ''
if not t.astype is None:
astype = '_As_%s' % thedict[t.astype]