Ejemplo n.º 1
0
 def matrix_pair(self, rng, size, request):
     lower = request.param
     array = rng.standard_normal((size, size))
     inv_tri_array = np.tril(array) if lower else np.triu(array)
     return (
         matrices.InverseTriangularMatrix(inv_tri_array, lower),
         nla.inv(inv_tri_array),
     )
Ejemplo n.º 2
0
 def __init__(self):
     super().__init__()
     for sz in SIZES:
         for lower in [True, False]:
             array = self.rng.standard_normal((sz, sz))
             inv_tri_array = np.tril(array) if lower else np.triu(array)
             self.matrices[sz] = matrices.InverseTriangularMatrix(
                 inv_tri_array, lower)
             self.np_matrices[sz] = nla.inv(inv_tri_array)
Ejemplo n.º 3
0
 def __init__(self):
     matrix_pairs = {}
     rng = np.random.RandomState(SEED)
     for sz in SIZES:
         for lower in [True, False]:
             array = rng.standard_normal((sz, sz))
             inv_tri_array = np.tril(array) if lower else np.triu(array)
             matrix_pairs[(sz, lower)] = (matrices.InverseTriangularMatrix(
                 inv_tri_array, lower), nla.inv(inv_tri_array))
     super().__init__(matrix_pairs, rng)