Skip to content

Commit

Permalink
Correct docstring of new_vec method (#19)
Browse files Browse the repository at this point in the history
- Correct docstring of new_vec method: it returns a column vector
- Add correction to Python documentation
  • Loading branch information
Mickanos authored Aug 21, 2024
1 parent b19bcb5 commit c182de1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/api/python.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8765,7 +8765,7 @@ impl PythonMatrix {
})
}

/// Create a new row vector from a list of scalars.
/// Create a new column vector from a list of scalars.
#[classmethod]
pub fn vec(
_cls: &PyType,
Expand Down
2 changes: 1 addition & 1 deletion src/tensors/matrix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ impl<F: Ring> Matrix<F> {
m
}

/// Create a new row vector from a list of scalars.
/// Create a new column vector from a list of scalars.
pub fn new_vec(data: Vec<F::Element>, field: F) -> Matrix<F> {
Matrix {
nrows: data.len() as u32,
Expand Down
2 changes: 1 addition & 1 deletion symbolica.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -2768,7 +2768,7 @@ class Matrix:

@classmethod
def vec(cls, entries: Sequence[RationalPolynomial | Polynomial | Expression | int]) -> Matrix:
"""Create a new row vector from a list of scalars."""
"""Create a new column vector from a list of scalars."""

@classmethod
def from_linear(cls, nrows: int, ncols: int, entries: Sequence[RationalPolynomial | Polynomial | Expression | int]) -> Matrix:
Expand Down

0 comments on commit c182de1

Please sign in to comment.