G*ͭ d Z ddlZddlZddlZddlZddlmZmZm Z m Z mZmZm Z d Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Z G d d Z!d Z"d Z#dS )zTests of interaction of matrix with other parts of numpy. Note that tests with MaskedArray and linalg are done in separate files. N)assert_assert_equal assert_raisesassert_raises_regexassert_array_equalassert_almost_equalassert_array_almost_equalc t j ddgddgg } t t | g dd d f t j t j t j d dd }t |d dt j d f |d dd f j d S ) N )r r r 2 ) npmatrixr isinstanceasmatrixarangereshaper arrayT)mxs z/builddir/build/BUILD/cloudlinux-venv-1.0.10/venv/lib64/python3.11/site-packages/numpy/matrixlib/tests/test_interaction.pytest_fancy_indexingr s Aq6Aq6"##AJqAAA 22333 BIbMM))!R0011A2A2rx||#$aBik22222 c ddg} ddg}t j | | g }t j j || | }t t |t j d S )Nr r r r )r r polynomial polyutils mapdomainr r )dom1dom2r ress r test_polynomial_mapdomainr' se q6D q6D 4,A - ! + +AtT : :CJsBI&&'''''r c t j g dg } t j | d }t j g dg }t || t t | t j u d S )Nr r r axisr r r )r r sortr r typeaactualexpecteds r test_sort_matrix_noner3 ) sq 999+A WQT " " "Fy)))%%H"""DNNbi'(((((r c t j g dg } t j | dd }t j g dg }t || t t | t j u d S )Nr) r r* r, )r r partitionr r r. r/ s r test_partition_matrix_noner6 2 su 999+A \!QT * * *Fy)))%%H"""DNNbi'(((((r c t j ddgt } t j ddggt }t t j | d | t t j d| | d S Nr r dtyper )r r objectr dotarrdesireds r %test_dot_scalar_and_matrix_of_objectsrA <