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

Method __new__

numpy/lib/tests/test_stride_tricks.py:526–529  ·  view source on GitHub ↗
(cls, *args, **kwargs)

Source from the content-addressed store, hash-verified

524
525class SimpleSubClass(VerySimpleSubClass):
526 def __new__(cls, *args, **kwargs):
527 self = np.array(*args, subok=True, **kwargs).view(cls)
528 self.info = 'simple'
529 return self
530
531 def __array_finalize__(self, obj):
532 self.info = getattr(obj, 'info', '') + ' finalized'

Callers

nothing calls this directly

Calls 1

viewMethod · 0.45

Tested by

no test coverage detected