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

Method __new__

numpy/core/tests/test_numeric.py:2509–2510  ·  view source on GitHub ↗
(cls, *args, **kwargs)

Source from the content-addressed store, hash-verified

2507 # Check that allclose does not preserve subtypes
2508 class Foo(np.ndarray):
2509 def __new__(cls, *args, **kwargs):
2510 return np.array(*args, **kwargs).view(cls)
2511
2512 a = Foo([1])
2513 assert_(type(np.allclose(a, a)) is bool)

Callers

nothing calls this directly

Calls 1

viewMethod · 0.45

Tested by

no test coverage detected