def make_random(cls, num_rows: int, num_columns: int): """A Matrix built out of random unit row vectors. """ return cls(Vector.make_random(num_columns) for _ in range(num_rows))
def make_random(self): dim = 3 vec = Vector.make_random(dim) self.assertEqual(vec.norm, 1, PRECISION)