summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatti Picus <matti.picus@gmail.com>2019-12-03 11:05:34 +0200
committerGitHub <noreply@github.com>2019-12-03 11:05:34 +0200
commitfc860a2b279d5c370e2b332995b33528ebd97deb (patch)
tree3385c0992201b21f35cd3b0650746ee35d30961c
parent3a9a63f81aa37b48bc3eb4efdc2e695210805aa5 (diff)
parentf0c6e41202e725debfe4c2a4694e791681210dbd (diff)
downloadnumpy-fc860a2b279d5c370e2b332995b33528ebd97deb.tar.gz
Merge pull request #15032 from madphysicist/mintypecode-cleanup
MAINT: Cleaned up mintypecode for Py3 (pt. 2)
-rw-r--r--numpy/lib/type_check.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/lib/type_check.py b/numpy/lib/type_check.py
index 8b9e4b8ab..977117235 100644
--- a/numpy/lib/type_check.py
+++ b/numpy/lib/type_check.py
@@ -75,7 +75,7 @@ def mintypecode(typechars, typeset='GDFgdf', default='d'):
return default
if 'F' in intersection and 'd' in intersection:
return 'D'
- return min((_typecodes_by_elsize.index(t), t) for t in intersection)[1]
+ return min(intersection, key=_typecodes_by_elsize.index)
def _asfarray_dispatcher(a, dtype=None):