From eef324bdf8d4754fe44c2592d0c1a660936d4095 Mon Sep 17 00:00:00 2001 From: Evgeni Burovski Date: Fri, 22 Nov 2024 17:02:34 +0200 Subject: [PATCH] DOC: add `np.vecmat` to the recommendation table --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a07d474..92139f5 100644 --- a/README.md +++ b/README.md @@ -63,6 +63,7 @@ explicitly namespaced with `np.`) | `gulinalg` | `np.linalg` | |:------------------------|:----------------------------------| | `matrix_multiply(a, b)` | `a @ b`, `np.matmul(a, b)` | +| `matvec_multiply(a, b)` | `np.matvec(a, b)` (`numpy >= 2.2.0`) | | `inner1d(a, b)` | `vecdot(a.conj(), b)` | | `dotc1d(a, b)` | `vecdot(a, b)` | | `cholesky(a, b)` | `cholesky(a, b)` | @@ -79,8 +80,6 @@ explicitly namespaced with `np.`) - - A few things to keep in mind when porting from `gulinalg` to `np.linalg`: 1. `np.linalg.vecdot` complex conjugates its first argument. Therefore for @@ -88,7 +87,8 @@ A few things to keep in mind when porting from `gulinalg` to `np.linalg`: real-valued arguments it is equivalent to `gulinalg.inner1d`. 2. For matrix factorization, `gulinalg` functions return tuples of arrays, while `np.linalg` analogs return namedtuples. -3. For matrix factorizationsWhere the result is not unique (e.g., the +3. `np.matvec` and `np.vecmat` functions are new in NumPy version 2.2.0. +4. For matrix factorizationsWhere the result is not unique (e.g., the `QR`factorization is unique only up to a matching permutation of the rows of the `Q` matrix and the columns of the `R` matrix), `np.linalg` and `gulinalg` functions may return different, if equivalent, results.