MCPcopy Index your code
hub / github.com/numpy/numpy / test_large_power

Method test_large_power

numpy/linalg/tests/test_linalg.py:1103–1112  ·  view source on GitHub ↗
(self, dt)

Source from the content-addressed store, hash-verified

1101 dtnoinv = [object, np.dtype('e'), np.dtype('g'), np.dtype('G')]
1102
1103 def test_large_power(self, dt):
1104 rshft = self.rshft_1.astype(dt)
1105 assert_equal(
1106 matrix_power(rshft, 2**100 + 2**10 + 2**5 + 0), self.rshft_0)
1107 assert_equal(
1108 matrix_power(rshft, 2**100 + 2**10 + 2**5 + 1), self.rshft_1)
1109 assert_equal(
1110 matrix_power(rshft, 2**100 + 2**10 + 2**5 + 2), self.rshft_2)
1111 assert_equal(
1112 matrix_power(rshft, 2**100 + 2**10 + 2**5 + 3), self.rshft_3)
1113
1114 def test_power_is_zero(self, dt):
1115 def tz(M):

Callers

nothing calls this directly

Calls 3

assert_equalFunction · 0.90
matrix_powerFunction · 0.90
astypeMethod · 0.80

Tested by

no test coverage detected