summaryrefslogtreecommitdiff
path: root/numpy/core/_internal.py
diff options
context:
space:
mode:
authorStephan Hoyer <shoyer@gmail.com>2018-10-26 08:27:54 -0700
committerGitHub <noreply@github.com>2018-10-26 08:27:54 -0700
commitfbc3ad69d2396fc5edbb2f145c82965756185f82 (patch)
treecccb607a97f06146613946983fc2aa7bf0ddfabf /numpy/core/_internal.py
parent1b8996e9477f38c8ced522c85df9ab9d73fcd339 (diff)
parent3debe9772ea1b68d997dba3440929a467ad11c52 (diff)
downloadnumpy-fbc3ad69d2396fc5edbb2f145c82965756185f82.tar.gz
Merge branch 'master' into fix-overloaded-repr
Diffstat (limited to 'numpy/core/_internal.py')
-rw-r--r--numpy/core/_internal.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/numpy/core/_internal.py b/numpy/core/_internal.py
index c4d967dc2..30069f0ca 100644
--- a/numpy/core/_internal.py
+++ b/numpy/core/_internal.py
@@ -796,13 +796,13 @@ def _ufunc_doc_signature_formatter(ufunc):
)
-def _is_from_ctypes(obj):
- # determine if an object comes from ctypes, in order to work around
+def npy_ctypes_check(cls):
+ # determine if a class comes from ctypes, in order to work around
# a bug in the buffer protocol for those objects, bpo-10746
try:
# ctypes class are new-style, so have an __mro__. This probably fails
# for ctypes classes with multiple inheritance.
- ctype_base = type(obj).__mro__[-2]
+ ctype_base = cls.__mro__[-2]
# right now, they're part of the _ctypes module
return 'ctypes' in ctype_base.__module__
except Exception: