From 25606ebecaaccf8db9e0a21615bace876f231ae9 Mon Sep 17 00:00:00 2001 From: Mickanos <62935178+Mickanos@users.noreply.github.com> Date: Tue, 20 Aug 2024 12:50:30 +0300 Subject: [PATCH 1/2] corrected docstring of new_vec method: it returns a column vector. --- src/tensors/matrix.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tensors/matrix.rs b/src/tensors/matrix.rs index 91ec7f40..ab9bbfed 100644 --- a/src/tensors/matrix.rs +++ b/src/tensors/matrix.rs @@ -59,7 +59,7 @@ impl Matrix { 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, field: F) -> Matrix { Matrix { nrows: data.len() as u32, From f78df65a9d08cf9055128c47e10c848d3236f583 Mon Sep 17 00:00:00 2001 From: Mickanos <62935178+Mickanos@users.noreply.github.com> Date: Wed, 21 Aug 2024 13:26:54 +0300 Subject: [PATCH 2/2] Added correction to Python documentation --- src/api/python.rs | 2 +- symbolica.pyi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/api/python.rs b/src/api/python.rs index 3ddb78e3..ce287ed7 100644 --- a/src/api/python.rs +++ b/src/api/python.rs @@ -8743,7 +8743,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, diff --git a/symbolica.pyi b/symbolica.pyi index 987a20e7..8090fc3e 100644 --- a/symbolica.pyi +++ b/symbolica.pyi @@ -2755,7 +2755,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: