From 4a52a71956a8d46fcb7294ac71734504bb09bcc2 Mon Sep 17 00:00:00 2001 From: S. Solomon Darnell Date: Fri, 28 Mar 2025 21:52:21 -0500 Subject: two version of R2R are here --- .../site-packages/numpy/matrixlib/tests/test_numeric.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .venv/lib/python3.12/site-packages/numpy/matrixlib/tests/test_numeric.py (limited to '.venv/lib/python3.12/site-packages/numpy/matrixlib/tests/test_numeric.py') diff --git a/.venv/lib/python3.12/site-packages/numpy/matrixlib/tests/test_numeric.py b/.venv/lib/python3.12/site-packages/numpy/matrixlib/tests/test_numeric.py new file mode 100644 index 00000000..a772bb38 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/numpy/matrixlib/tests/test_numeric.py @@ -0,0 +1,17 @@ +import numpy as np +from numpy.testing import assert_equal + +class TestDot: + def test_matscalar(self): + b1 = np.matrix(np.ones((3, 3), dtype=complex)) + assert_equal(b1*1.0, b1) + + +def test_diagonal(): + b1 = np.matrix([[1,2],[3,4]]) + diag_b1 = np.matrix([[1, 4]]) + array_b1 = np.array([1, 4]) + + assert_equal(b1.diagonal(), diag_b1) + assert_equal(np.diagonal(b1), array_b1) + assert_equal(np.diag(b1), array_b1) -- cgit 1.4.1