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

Method __new__

numpy/matrixlib/tests/test_masked_matrix.py:14–17  ·  view source on GitHub ↗
(cls, data, mask=nomask)

Source from the content-addressed store, hash-verified

12class MMatrix(MaskedArray, np.matrix,):
13
14 def __new__(cls, data, mask=nomask):
15 mat = np.matrix(data)
16 _data = MaskedArray.__new__(cls, data=mat, mask=mask)
17 return _data
18
19 def __array_finalize__(self, obj):
20 np.matrix.__array_finalize__(self, obj)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected