diff options
| author | Stephan Hoyer <shoyer@gmail.com> | 2018-10-26 08:27:54 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-10-26 08:27:54 -0700 |
| commit | fbc3ad69d2396fc5edbb2f145c82965756185f82 (patch) | |
| tree | cccb607a97f06146613946983fc2aa7bf0ddfabf /numpy/core/_internal.py | |
| parent | 1b8996e9477f38c8ced522c85df9ab9d73fcd339 (diff) | |
| parent | 3debe9772ea1b68d997dba3440929a467ad11c52 (diff) | |
| download | numpy-fbc3ad69d2396fc5edbb2f145c82965756185f82.tar.gz | |
Merge branch 'master' into fix-overloaded-repr
Diffstat (limited to 'numpy/core/_internal.py')
| -rw-r--r-- | numpy/core/_internal.py | 6 |
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: |
