Ruff pandas vet (#10281)
* Python linting: Add ruff rules for Pandas-vet and Pytest-style
* updating DIRECTORY.md
---------
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
This commit is contained in:
@@ -114,7 +114,8 @@ class Matrix:
|
||||
|
||||
# Validation
|
||||
assert isinstance(another, Matrix)
|
||||
assert self.row == another.row and self.column == another.column
|
||||
assert self.row == another.row
|
||||
assert self.column == another.column
|
||||
|
||||
# Add
|
||||
result = Matrix(self.row, self.column)
|
||||
@@ -225,7 +226,8 @@ class Matrix:
|
||||
"""
|
||||
|
||||
# Size validation
|
||||
assert isinstance(u, Matrix) and isinstance(v, Matrix)
|
||||
assert isinstance(u, Matrix)
|
||||
assert isinstance(v, Matrix)
|
||||
assert self.row == self.column == u.row == v.row # u, v should be column vector
|
||||
assert u.column == v.column == 1 # u, v should be column vector
|
||||
|
||||
|
||||
Reference in New Issue
Block a user