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 --- .../numpy/matrixlib/tests/test_multiarray.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .venv/lib/python3.12/site-packages/numpy/matrixlib/tests/test_multiarray.py (limited to '.venv/lib/python3.12/site-packages/numpy/matrixlib/tests/test_multiarray.py') diff --git a/.venv/lib/python3.12/site-packages/numpy/matrixlib/tests/test_multiarray.py b/.venv/lib/python3.12/site-packages/numpy/matrixlib/tests/test_multiarray.py new file mode 100644 index 00000000..638d0d15 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/numpy/matrixlib/tests/test_multiarray.py @@ -0,0 +1,16 @@ +import numpy as np +from numpy.testing import assert_, assert_equal, assert_array_equal + +class TestView: + def test_type(self): + x = np.array([1, 2, 3]) + assert_(isinstance(x.view(np.matrix), np.matrix)) + + def test_keywords(self): + x = np.array([(1, 2)], dtype=[('a', np.int8), ('b', np.int8)]) + # We must be specific about the endianness here: + y = x.view(dtype='