8000 BUG: Move ctypes ImportError catching to appropriate place by davidjn · Pull Request #8898 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

BUG: Move ctypes ImportError catching to appropriate place #8898

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 15 commits into from
May 7, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
BUG: move numpy import into _getintp_ctype
  • Loading branch information
davidjn authored Apr 7, 2017
commit 3af4fe51033c0d45095ad67bfe8011d5189335fe
3 changes: 2 additions & 1 deletion numpy/core/_internal.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import re
import sys
import numpy as np

from numpy.compat import basestring
from .multiarray import dtype, array, ndarray
try:
Expand Down Expand Up @@ -207,6 +207,7 @@ def __call__(self, *other):

def _getintp_ctype():
if ctypes is None:
import numpy as np
return dummy_ctype(np.intp)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Th 558D is should make use of the cache, that the normal code path takes

val = _getintp_ctype.cache
if val is not None:
Expand Down
0