MCPcopy Create free account
hub / github.com/numpy/numpy / __getattr__

Method __getattr__

numpy/distutils/cpuinfo.py:75–83  ·  view source on GitHub ↗
(self, name)

Source from the content-addressed store, hash-verified

73 pass
74
75 def __getattr__(self, name):
76 if not name.startswith('_'):
77 if hasattr(self, '_'+name):
78 attr = getattr(self, '_'+name)
79 if isinstance(attr, types.MethodType):
80 return lambda func=self._try_call,attr=attr : func(attr)
81 else:
82 return lambda : None
83 raise AttributeError(name)
84
85 def _getNCPUs(self):
86 return 1

Callers

nothing calls this directly

Calls 2

startswithMethod · 0.80
funcFunction · 0.50

Tested by

no test coverage detected