Skip to content

Commit

Permalink
format type
Browse files Browse the repository at this point in the history
  • Loading branch information
gaoxinge committed Nov 17, 2021
1 parent ebfe99d commit 51a59ee
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions python/taichi/lang/matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class Matrix(TaichiOperations):
"""The matrix class.
Args:
n (int, list, tuple, np.ndarray): the first dimension of a matrix.
n (Union[int, list, tuple], np.ndarray): the first dimension of a matrix.
m (int): the second dimension of a matrix.
dt (DataType): the element data type.
keep_raw (Bool, optional): Keep the contents in `n` as is.
Expand Down Expand Up @@ -611,7 +611,7 @@ def diag(dim, val):
Args:
dim (int): the dimension of a square matrix.
val (TypeVar): the diagonal elment value.
val (TypeVar): the diagonal element value.
Returns:
The constructed diagonal square matrix.
Expand Down Expand Up @@ -678,7 +678,7 @@ def max(self):

@kern_mod.pyfunc
def min(self):
"""Return the minumum element value."""
"""Return the minimum element value."""
return ops_mod.ti_min(*self.entries)

def any(self):
Expand Down Expand Up @@ -994,7 +994,7 @@ def _Vector_ndarray(cls, n, dtype, shape, layout=Layout.AOS):

@staticmethod
def rows(rows):
"""Construct a Matrix instance by concactinating Vectors/lists row by row.
"""Construct a Matrix instance by concatenating Vectors/lists row by row.
Args:
rows (List): A list of Vector (1-D Matrix) or a list of list.
Expand Down Expand Up @@ -1027,7 +1027,7 @@ def rows(rows):

@staticmethod
def cols(cols):
"""Construct a Matrix instance by concactinating Vectors/lists column by column.
"""Construct a Matrix instance by concatenating Vectors/lists column by column.
Args:
cols (List): A list of Vector (1-D Matrix) or a list of list.
Expand Down Expand Up @@ -1148,7 +1148,7 @@ def Vector(n, dt=None, **kwargs):
"""Construct a `Vector` instance i.e. 1-D Matrix.
Args:
n (int, list, tuple, np.ndarray): The desired number of entries of the Vector.
n (Union[int, list, tuple], np.ndarray): The desired number of entries of the Vector.
dt (DataType, optional): The desired data type of the Vector.
Returns:
Expand Down

0 comments on commit 51a59ee

Please sign in to comment.