
    Ph                    4   d Z ddlmZ ddlZddlZddlmZ ddlZddlZ	ddl
mZ  G d d      Z G d d	      Zej                  j!                  d
e	j"                  e	j$                  e	j&                  e	j(                  e	j*                  g       G d d             Zy)z
This file tests the generic aspects of ArrayMethod.  At the time of writing
this is private API, but when added, public API may be added here.
    )annotationsN)Any)_get_castingimplc                     e Zd Z e e ej                  d             e ej                  d                  Zej                  j                  ddddd ej                  d      dff ej                  d      d	ffg      d
        Zy	)TestResolveDescriptorsdfargsTN)NNN)NNTNc                    t        j                  t              5   | j                  j                  |  d d d        y # 1 sw Y   y xY wr   )pytestraises	TypeErrormethod_resolve_descriptors)selfr
   s     lC:\Users\daisl\Desktop\realtime-object-detection\venv\Lib\site-packages\numpy/core/tests/test_arraymethod.pytest_invalid_argumentsz-TestResolveDescriptors.test_invalid_arguments   s0     ]]9%,DKK,,d3 &%%s	   =A)__name__
__module____qualname__get_castingimpltypenpdtyper   r   markparametrizer        r   r   r      s    
 T("((3-0$xrxx}2EFF[[V	
"((3-	 
"((3-	 & 44r"   r   c                  r   e Zd Z e e ej                  d             e ej                  d                  Zej                  j                  ddgdefdefdefdef ej                  d	       ej                  d	      ffef ej                  d	d
       ej                  d	d      ffef ej                  dd       ej                  dd      ffef ej                  d	d       ej                  dd      ffef ej                  dd       ej                  dd      ffefg	      d        Zy)TestSimpleStridedCallr   r	   r
   errorr   )r   r   r      z>d)r   z<f)   r'      s    x00 x00 x00 x00 x00 x00s    x00 x00 x00c                    t        j                  |      5   | j                  j                  |  d d d        y # 1 sw Y   y xY wr   )r   r   r   _simple_strided_call)r   r
   r%   s      r   r   z,TestSimpleStridedCall.test_invalid_arguments-   s0    $ ]]5!,DKK,,d3 "!!s	   9AN)r   r   r   r   r   r   r   r   r   r   r    r   arangeones
ValueError
frombufferr   r!   r"   r   r$   r$   &   sX   
 T("((3-0$xrxx}2EFF[[fg.	)	Y	y!		*299Q<1
&	()42771D!72771D#9
:	<		2776%wrwwvS'A
B	D		2771C '"''!3"7
8	:
	2==S12==3/1 
3		1  4! 4r"   r$   clsc                  f    e Zd ZddZej
                  j                  d ed            dd       Zy)TestClassGetItemc                z    |t         t         f   }t        |t        j                        sJ |j                  |u sJ y)z!Test `ndarray.__class_getitem__`.N)r   
isinstancetypesGenericAlias
__origin__)r   r/   aliass      r   test_class_getitemz#TestClassGetItem.test_class_getitemG   s9    CH%!3!34443&&&r"   arg_lenr(   c                    t         f|z  }|dv r||   sJ y d|dk(  rdnd d}t        j                  t        |      5  ||    d d d        y # 1 sw Y   y xY w)N)   r'   zToo r   fewmanyz
 arguments)match)r   r   r   r   )r   r/   r9   arg_tupr>   s        r   test_subscript_tupz#TestClassGetItem.test_subscript_tupM   sZ    &7"fw<<GqL5f=ZHEy6G 766s   AAN)r/   type[np.ndarray]returnNone)r/   rA   r9   intrB   rC   )	r   r   r   r8   r   r   r    ranger@   r!   r"   r   r1   r1   C   s0    ' [[Ya1 2r"   r1   )__doc__
__future__r   sysr4   typingr   r   numpyr   numpy.core._multiarray_umathr   r   r   r$   r   r    ndarrayrecarray	chararraymatrixmemmapr1   r!   r"   r   <module>rQ      s   
 # 
     L4 4(4 4: 	BJJR\\299biiH r"   