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

Method __getattr__

numpy/core/tests/test_protocols.py:20–24  ·  view source on GitHub ↗
(self, name)

Source from the content-addressed store, hash-verified

18 return type(self)(self.array[item])
19
20 def __getattr__(self, name):
21 if name.startswith("__array_"):
22 warnings.warn("object got converted", UserWarning, stacklevel=1)
23
24 return getattr(self.array, name)
25
26 def __repr__(self):
27 return "<Wrapper({self.array})>".format(self=self)

Callers

nothing calls this directly

Calls 2

startswithMethod · 0.80
warnMethod · 0.80

Tested by

no test coverage detected