psf/black code formatting (#1277)

This commit is contained in:
William Zhang
2019-10-05 01:14:13 -04:00
committed by Christian Clauss
parent 07f04a2e55
commit 9eac17a408
291 changed files with 6014 additions and 4571 deletions

View File

@ -311,8 +311,10 @@ class Matrix:
return Matrix([[element * other for element in row] for row in self.rows])
elif isinstance(other, Matrix):
if self.num_columns != other.num_rows:
raise ValueError("The number of columns in the first matrix must "
"be equal to the number of rows in the second")
raise ValueError(
"The number of columns in the first matrix must "
"be equal to the number of rows in the second"
)
return Matrix(
[
[Matrix.dot_product(row, column) for column in other.columns()]
@ -320,7 +322,9 @@ class Matrix:
]
)
else:
raise TypeError("A Matrix can only be multiplied by an int, float, or another matrix")
raise TypeError(
"A Matrix can only be multiplied by an int, float, or another matrix"
)
def __pow__(self, other):
if not isinstance(other, int):