MCPcopy
hub / github.com/numpy/numpy / do

Method do

numpy/linalg/tests/test_linalg.py:906–912  ·  view source on GitHub ↗
(self, a, b, tags)

Source from the content-addressed store, hash-verified

904 LinalgGeneralizedNonsquareTestCase):
905
906 def do(self, a, b, tags):
907 a_ginv = linalg.pinv(a)
908 # `a @ a_ginv == I` does not hold if a is singular
909 dot = matmul
910 result = dot(dot(a, a_ginv), a)
911 assert_almost_equal(result, a, single_decimal=5, double_decimal=11)
912 assert_(consistent_subclass(a_ginv, a))
913
914
915class TestPinv(PinvCases):

Callers

nothing calls this directly

Calls 4

dotFunction · 0.90
assert_almost_equalFunction · 0.90
assert_Function · 0.90
consistent_subclassFunction · 0.85

Tested by

no test coverage detected