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

Method test_large_power

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

Source from the content-addressed store, hash-verified

1008 dtnoinv = [object, np.dtype('e'), np.dtype('g'), np.dtype('G')]
1009
1010 def test_large_power(self, dt):
1011 rshft = self.rshft_1.astype(dt)
1012 assert_equal(
1013 matrix_power(rshft, 2**100 + 2**10 + 2**5 + 0), self.rshft_0)
1014 assert_equal(
1015 matrix_power(rshft, 2**100 + 2**10 + 2**5 + 1), self.rshft_1)
1016 assert_equal(
1017 matrix_power(rshft, 2**100 + 2**10 + 2**5 + 2), self.rshft_2)
1018 assert_equal(
1019 matrix_power(rshft, 2**100 + 2**10 + 2**5 + 3), self.rshft_3)
1020
1021 def test_power_is_zero(self, dt):
1022 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