a
    ö¦»aSE  ã                   @   sè   d Z ddlZddlZddlZddlmZmZ G dd„ deƒZG dd„ deƒZ	G d	d
„ d
eƒZ
G dd„ deƒZe ejjdkd¡G dd„ deƒƒZG dd„ deƒZe ejjdkd¡G dd„ deƒƒZG dd„ deƒZG dd„ deƒZdS )aó  
    Tests the h5py.Dataset.__getitem__ method.

    This module does not specifically test type conversion.  The "type" axis
    therefore only tests objects which interact with the slicing system in
    unreliable ways; for example, compound and array types.

    See test_dataset_getitem_types for type-conversion tests.

    Tests are organized into TestCases by dataset shape and type.  Test
    methods vary by slicing arg type.

    1. Dataset shape:
        Empty
        Scalar
        1D
        3D

    2. Type:
        Float
        Compound
        Array

    3. Slicing arg types:
        Ellipsis
        Empty tuple
        Regular slice
        MultiBlockSlice
        Indexing
        Index list
        Boolean mask
        Field names
é    Né   )ÚutÚTestCasec                   @   st   e Zd Zdd„ Zdd„ Zdd„ Zdd„ Zd	d
„ Zdd„ Zdd„ Z	dd„ Z
dd„ Zdd„ Zdd„ Zdd„ Zdd„ ZdS )Ú	TestEmptyc                 C   sh   t  | ¡ tj tjj¡}tjj ¡ }| 	d¡ tj
 | jjd||¡}t |¡| _t t d¡¡| _d S )Né
   ó   xZS10)r   ÚsetUpÚh5pyZh5sÚcreateZNULLZh5tZC_S1ÚcopyZset_sizeZh5dÚfÚidZDatasetÚdsetÚEmptyÚnpÚdtypeÚ	empty_obj)ÚselfZsidÚtidZdsid© r   úY/home/yuhw/wc/pochoir/venv/lib/python3.9/site-packages/h5py/tests/test_dataset_getitem.pyr   6   s    

zTestEmpty.setUpc                 C   s   |   | jjd¡ dS ©ú Verify number of dimensions r   N©ÚassertEqualr   Úndim©r   r   r   r   Ú	test_ndim?   s    zTestEmpty.test_ndimc                 C   s   |   | jjd¡ dS ©ú Verify shape N©r   r   Úshaper   r   r   r   Ú
test_shapeC   s    zTestEmpty.test_shapec                 C   s   |   | jjd¡ dS r   ©r   r   Úsizer   r   r   r   Ú	test_sizeG   s    zTestEmpty.test_sizec                 C   s   |   | jjd¡ dS )ú Verify nbytes r   N)r   r   Únbytesr   r   r   r   Útest_nbytesK   s    zTestEmpty.test_nbytesc                 C   s   |   | jd | j¡ d S ©N.©r   r   r   r   r   r   r   Útest_ellipsisO   s    zTestEmpty.test_ellipsisc                 C   s   |   | jd | j¡ d S ©Nr   r*   r   r   r   r   Ú
test_tupleR   s    zTestEmpty.test_tuplec                 C   s<   |   t¡� | jdd…  W d  ƒ n1 s.0    Y  dS ©z slice -> ValueError r   é   N©ÚassertRaisesÚ
ValueErrorr   r   r   r   r   Ú
test_sliceU   s    zTestEmpty.test_slicec                 C   s<   |   t¡� | jt ¡   W d  ƒ n1 s.0    Y  dS ©z MultiBlockSlice -> ValueError N©r1   r2   r   r	   ZMultiBlockSlicer   r   r   r   Útest_multi_block_sliceZ   s    z TestEmpty.test_multi_block_slicec                 C   s8   |   t¡� | jd  W d  ƒ n1 s*0    Y  dS ©z index -> ValueError r   Nr0   r   r   r   r   Ú
test_index_   s    zTestEmpty.test_indexc                 C   s<   |   t¡� | jg d¢  W d  ƒ n1 s.0    Y  dS ©ú index list -> ValueError ©r   é   é   Nr0   r   r   r   r   Útest_indexlistd   s    zTestEmpty.test_indexlistc                 C   sF   t jddd�}|  t¡� | j|  W d  ƒ n1 s80    Y  dS ©z mask -> ValueError TÚbool©r   N©r   Úarrayr1   r2   r   ©r   Úmaskr   r   r   Ú	test_maski   s    zTestEmpty.test_maskc                 C   s8   |   t¡� | jd  W d  ƒ n1 s*0    Y  dS )z field name -> ValueError ÚfieldNr0   r   r   r   r   Útest_fieldnameso   s    zTestEmpty.test_fieldnamesN©Ú__name__Ú
__module__Ú__qualname__r   r   r"   r%   r(   r+   r-   r3   r6   r8   r>   rF   rH   r   r   r   r   r   4   s   	r   c                   @   st   e Zd Zdd„ Zdd„ Zdd„ Zdd„ Zd	d
„ Zdd„ Zdd„ Z	dd„ Z
dd„ Zdd„ Zdd„ Zdd„ Zdd„ ZdS )ÚTestScalarFloatc                 C   s2   t  | ¡ tjddd�| _| jjd| jd�| _d S )Nç     @E@r   rA   Úx©Údata©r   r   r   rC   rQ   r   Úcreate_datasetr   r   r   r   r   r   w   s    
zTestScalarFloat.setUpc                 C   s   |   | jjd¡ dS r   r   r   r   r   r   r   |   s    zTestScalarFloat.test_ndimc                 C   s   |   | jjd¡ dS ©ú Verify size r   Nr#   r   r   r   r   r%   €   s    zTestScalarFloat.test_sizec                 C   s   |   | jj| jjj¡ dS ©r&   N©r   r   r'   rQ   r   Úitemsizer   r   r   r   r(   „   s    zTestScalarFloat.test_nbytesc                 C   s   |   | jjtƒ ¡ dS r   ©r   r   r!   Útupler   r   r   r   r"   ˆ   s    zTestScalarFloat.test_shapec                 C   s   | j d }|  || j¡ dS ©z Ellipsis -> scalar ndarray .N©r   ÚassertArrayEqualrQ   ©r   Úoutr   r   r   r+   Œ   s    
zTestScalarFloat.test_ellipsisc                 C   s    | j d }|  || j ¡ ¡ dS )z () -> bare item r   N)r   r]   rQ   Úitemr^   r   r   r   r-   ‘   s    
zTestScalarFloat.test_tuplec                 C   s<   |   t¡� | jdd…  W d  ƒ n1 s.0    Y  dS r.   r0   r   r   r   r   r3   –   s    zTestScalarFloat.test_slicec                 C   s<   |   t¡� | jt ¡   W d  ƒ n1 s.0    Y  dS r4   r5   r   r   r   r   r6   ›   s    z&TestScalarFloat.test_multi_block_slicec                 C   s8   |   t¡� | jd  W d  ƒ n1 s*0    Y  dS r7   r0   r   r   r   r   r8       s    zTestScalarFloat.test_indexc                 C   s<   |   t¡� | jg d¢  W d  ƒ n1 s.0    Y  dS r9   r0   r   r   r   r   r>   ¦   s    zTestScalarFloat.test_indexlistc                 C   sF   t jddd�}|  t¡� | j|  W d  ƒ n1 s80    Y  dS r?   rB   rD   r   r   r   rF   ¬   s    zTestScalarFloat.test_maskc                 C   s8   |   t¡� | jd  W d  ƒ n1 s*0    Y  dS ©z& field name -> ValueError (no fields) rG   Nr0   r   r   r   r   rH   ²   s    zTestScalarFloat.test_fieldnamesN©rJ   rK   rL   r   r   r%   r(   r"   r+   r-   r3   r6   r8   r>   rF   rH   r   r   r   r   rM   u   s   rM   c                   @   st   e Zd Zdd„ Zdd„ Zdd„ Zdd„ Zd	d
„ Zdd„ Zdd„ Z	dd„ Z
dd„ Zdd„ Zdd„ Zdd„ Zdd„ ZdS )ÚTestScalarCompoundc                 C   s6   t  | ¡ tjdg d¢d�| _| jjd| jd�| _d S )N)rN   iŠÿÿÿZHello))Úar   )ÚbÚi)Úcz|S10rA   rO   rP   rR   r   r   r   r   r   º   s    
zTestScalarCompound.setUpc                 C   s   |   | jjd¡ dS r   r   r   r   r   r   r   ¿   s    zTestScalarCompound.test_ndimc                 C   s   |   | jjtƒ ¡ dS r   rY   r   r   r   r   r"   Ã   s    zTestScalarCompound.test_shapec                 C   s   |   | jjd¡ dS rT   r#   r   r   r   r   r%   Ç   s    zTestScalarCompound.test_sizec                 C   s   |   | jj| jjj¡ dS rV   rW   r   r   r   r   r(   Ë   s    zTestScalarCompound.test_nbytesc                 C   s@   | j d }|  |tj¡ |  |j| jj¡ |  |j| jj¡ dS r[   )r   ÚassertIsInstancer   Zndarrayr   r!   rQ   r   r^   r   r   r   r+   Ï   s    
z TestScalarCompound.test_ellipsisc                 C   s.   | j d }|  |tj¡ |  |j| jj¡ dS )z () -> np.void instance r   N)r   rh   r   Úvoidr   r   rQ   r^   r   r   r   r-   ×   s    
zTestScalarCompound.test_tuplec                 C   s<   |   t¡� | jdd…  W d  ƒ n1 s.0    Y  dS r.   r0   r   r   r   r   r3   Ý   s    zTestScalarCompound.test_slicec                 C   s<   |   t¡� | jt ¡   W d  ƒ n1 s.0    Y  dS r4   r5   r   r   r   r   r6   â   s    z)TestScalarCompound.test_multi_block_slicec                 C   s8   |   t¡� | jd  W d  ƒ n1 s*0    Y  dS r7   r0   r   r   r   r   r8   ç   s    zTestScalarCompound.test_indexc                 C   s<   |   t¡� | jg d¢  W d  ƒ n1 s.0    Y  dS r9   r0   r   r   r   r   r>   í   s    z!TestScalarCompound.test_indexlistc                 C   sF   t jddd�}|  t¡� | j|  W d  ƒ n1 s80    Y  dS )z mask -> ValueError  Tr@   rA   NrB   rD   r   r   r   rF   ó   s    zTestScalarCompound.test_maskc                 C   s.   | j d }|  |tj¡ |  || j d ¡ dS )z field name -> bare value rd   N)r   rh   r   Úfloat32r   r^   r   r   r   rH   ú   s    
z"TestScalarCompound.test_fieldnamesNrI   r   r   r   r   rc   ¸   s   rc   c                   @   st   e Zd Zdd„ Zdd„ Zdd„ Zdd„ Zd	d
„ Zdd„ Zdd„ Z	dd„ Z
dd„ Zdd„ Zdd„ Zdd„ Zdd„ ZdS )ÚTestScalarArrayc                 C   sP   t  | ¡ t d¡| _tjg d¢dd�| _| jjdd| jd�| _	| j| j	d< d S )Nz(3,2)f))gš™™™™™	@i‰ÿÿÿ)é*   g33333óX@)g…ëQ¸	@r   r   rA   rO   r   .)
r   r   r   r   ÚdtrC   rQ   r   rS   r   r   r   r   r   r     s
    
zTestScalarArray.setUpc                 C   s$   |   | jjd¡ |   | jjd¡ dS )r   r<   r   N)r   rQ   r   r   r   r   r   r   r   
  s    zTestScalarArray.test_ndimc                 C   s   |   | jjd¡ dS rT   r#   r   r   r   r   r%     s    zTestScalarArray.test_sizec                 C   s   |   | jj| jjj¡ dS rV   )r   r   r'   r   rX   r   r   r   r   r(     s    zTestScalarArray.test_nbytesc                 C   s&   |   | jjd¡ |   | jjtƒ ¡ dS )r   )é   r<   N)r   rQ   r!   r   rZ   r   r   r   r   r"     s    zTestScalarArray.test_shapec                 C   s   | j d }|  || j¡ dS )z2 Ellipsis -> ndarray promoted to underlying shape .Nr\   r^   r   r   r   r+     s    
zTestScalarArray.test_ellipsisc                 C   s   | j d }|  || j¡ dS )ú () -> same as ellipsis .Nr\   r^   r   r   r   r-   !  s    
zTestScalarArray.test_tuplec                 C   s<   |   t¡� | jdd…  W d  ƒ n1 s.0    Y  dS r.   r0   r   r   r   r   r3   &  s    zTestScalarArray.test_slicec                 C   s<   |   t¡� | jt ¡   W d  ƒ n1 s.0    Y  dS r4   r5   r   r   r   r   r6   +  s    z&TestScalarArray.test_multi_block_slicec                 C   s8   |   t¡� | jd  W d  ƒ n1 s*0    Y  dS r7   r0   r   r   r   r   r8   0  s    zTestScalarArray.test_indexc                 C   s8   |   t¡� | jg   W d  ƒ n1 s*0    Y  dS )r:   Nr0   r   r   r   r   r>   5  s    zTestScalarArray.test_indexlistc                 C   sF   t jddd�}|  t¡� | j|  W d  ƒ n1 s80    Y  dS r?   rB   rD   r   r   r   rF   :  s    zTestScalarArray.test_maskc                 C   s8   |   t¡� | jd  W d  ƒ n1 s*0    Y  dS ra   r0   r   r   r   r   rH   @  s    zTestScalarArray.test_fieldnamesNrb   r   r   r   r   rk     s   rk   )r   é   é   zHDF5 1.8.7+ requiredc                   @   sd   e Zd Zdd„ Zdd„ Zdd„ Zdd„ Zd	d
„ Zdd„ Zdd„ Z	dd„ Z
dd„ Zdd„ Zdd„ ZdS )ÚTest1DZeroFloatc                 C   s2   t  | ¡ tjddd�| _| jjd| jd�| _d S )N©r   r   rA   rO   rP   ©r   r   r   ÚonesrQ   r   rS   r   r   r   r   r   r   I  s    
zTest1DZeroFloat.setUpc                 C   s   |   | jjd¡ dS ©r   r   Nr   r   r   r   r   r   N  s    zTest1DZeroFloat.test_ndimc                 C   s   |   | jjd¡ dS )r   rs   Nr    r   r   r   r   r"   R  s    zTest1DZeroFloat.test_shapec                 C   s   |   | j| jtjd ¡ dS )z' Ellipsis -> ndarray of matching shape .N©ÚassertNumpyBehaviorr   rQ   r   Ús_r   r   r   r   r+   V  s    zTest1DZeroFloat.test_ellipsisc                 C   s   |   | j| jtjd ¡ dS )ro   r   Nrw   r   r   r   r   r-   Z  s    zTest1DZeroFloat.test_tuplec                 C   s    |   | j| jtjdd… ¡ dS )z  slice -> ndarray of shape (0,) r   r/   Nrw   r   r   r   r   r3   ^  s    zTest1DZeroFloat.test_slicec                 C   s    |   | j| jtjdd… ¡ d S ©Nrq   r=   rw   r   r   r   r   Útest_slice_stop_less_than_startb  s    z/Test1DZeroFloat.test_slice_stop_less_than_startc                 C   s8   |   t¡� | jd  W d  ƒ n1 s*0    Y  dS )z index -> out of range r   N©r1   Ú
IndexErrorr   r   r   r   r   r8   e  s    zTest1DZeroFloat.test_indexc                 C   s   |   | j| jtjg  ¡ dS )z index list Nrw   r   r   r   r   r>   j  s    zTest1DZeroFloat.test_indexlistc                 C   s.   t jddd�}| j| j| jt j| dd� dS )z# mask -> ndarray of matching shape rs   r@   rA   T©Zskip_fast_readerN)r   ru   rx   r   rQ   ry   rD   r   r   r   rF   n  s    ûzTest1DZeroFloat.test_maskc                 C   s8   |   t¡� | jd  W d  ƒ n1 s*0    Y  dS ra   r0   r   r   r   r   rH   y  s    zTest1DZeroFloat.test_fieldnamesN)rJ   rK   rL   r   r   r"   r+   r-   r3   r{   r8   r>   rF   rH   r   r   r   r   rr   F  s   rr   c                   @   s  e Zd Zdd„ Zdd„ Zdd„ Zdd„ Zd	d
„ Zdd„ Zdd„ Z	dd„ Z
dd„ Zdd„ Zdd„ Zdd„ Zdd„ Zdd„ Zdd„ Zdd „ Zd!d"„ Zd#d$„ Zd%d&„ Zd'd(„ Zd)d*„ Zd+d,„ Zd-d.„ Zd/d0„ Zd1d2„ Zd3d4„ Zd5d6„ Zd7d8„ Zd9d:„ Zd;d<„ Z d=d>„ Z!d?d@„ Z"dAdB„ Z#dCS )DÚTest1DFloatc                 C   s4   t  | ¡ t d¡ d¡| _| jjd| jd�| _d S )Né   r   rO   rP   )	r   r   r   ZarangeZastyperQ   r   rS   r   r   r   r   r   r   �  s    
zTest1DFloat.setUpc                 C   s   |   | jjd¡ dS rv   r   r   r   r   r   r   †  s    zTest1DFloat.test_ndimc                 C   s   |   | jjd¡ dS )r   )r€   Nr    r   r   r   r   r"   Š  s    zTest1DFloat.test_shapec                 C   s   |   | j| jtjd ¡ d S r)   rw   r   r   r   r   r+   Ž  s    zTest1DFloat.test_ellipsisc                 C   s   |   | j| jtjd ¡ d S r,   rw   r   r   r   r   r-   ‘  s    zTest1DFloat.test_tuplec                 C   s    |   | j| jtjdd… ¡ d S )Nr   r/   rw   r   r   r   r   Útest_slice_simple”  s    zTest1DFloat.test_slice_simplec                 C   s    |   | j| jtjdd… ¡ d S )Nr/   rw   r   r   r   r   Útest_slice_zerosize—  s    zTest1DFloat.test_slice_zerosizec                 C   s"   |   | j| jtjddd… ¡ d S )Nr   rq   rn   rw   r   r   r   r   Útest_slice_stridesš  s    zTest1DFloat.test_slice_stridesc                 C   s"   |   | j| jtjddd… ¡ d S )Niøÿÿÿéþÿÿÿrn   rw   r   r   r   r   Útest_slice_negindexes�  s    z!Test1DFloat.test_slice_negindexesc                 C   s    |   | j| jtjdd… ¡ d S rz   rw   r   r   r   r   r{      s    z+Test1DFloat.test_slice_stop_less_than_startc                 C   s"   |   | j| jtjddd… ¡ d S )Néd   i�  rn   rw   r   r   r   r   Útest_slice_outofrange£  s    z!Test1DFloat.test_slice_outofrangec                 C   s>   |   t¡�  | jddd…  W d  ƒ n1 s00    Y  dS )z we disallow negative steps Néÿÿÿÿr0   r   r   r   r   Útest_slice_backwards¦  s    z Test1DFloat.test_slice_backwardsc                 C   s"   |   | j| jtjd d d… ¡ d S )Nr   rw   r   r   r   r   Útest_slice_zerostride«  s    z!Test1DFloat.test_slice_zerostridec                 C   s   |   | j| jtjd ¡ d S )Nrn   rw   r   r   r   r   Útest_index_simple®  s    zTest1DFloat.test_index_simplec                 C   s   |   | j| jtjd ¡ d S )Néüÿÿÿrw   r   r   r   r   Útest_index_neg±  s    zTest1DFloat.test_index_negc                 C   s8   |   t¡� | jd   W d   ƒ n1 s*0    Y  d S ©N©r1   Ú	TypeErrorr   r   r   r   r   Útest_index_noneµ  s    zTest1DFloat.test_index_nonec                 C   s8   |   t¡� | ji   W d  ƒ n1 s*0    Y  dS )z Illegal slicing argument Nr�   r   r   r   r   Útest_index_illegal¹  s    zTest1DFloat.test_index_illegalc                 C   s8   |   t¡� | jd  W d   ƒ n1 s*0    Y  d S ©Nr†   r|   r   r   r   r   Útest_index_outofrange¾  s    z!Test1DFloat.test_index_outofrangec                 C   s    |   | j| jtjg d¢ ¡ d S ©Nr;   rw   r   r   r   r   Útest_indexlist_simpleÂ  s    z!Test1DFloat.test_indexlist_simplec              	   C   s&   |   | j| jtjt g d¢¡ ¡ d S r•   ©rx   r   rQ   r   ry   rC   r   r   r   r   Útest_indexlist_numpyarrayÅ  s    z%Test1DFloat.test_indexlist_numpyarrayc                 C   s"   |   | j| jtjdgdf ¡ d S ©Nr   .rw   r   r   r   r   Ú$test_indexlist_single_index_ellipsisÈ  s    z0Test1DFloat.test_indexlist_single_index_ellipsisc                 C   s(   |   | j| jtjt dg¡df ¡ d S r™   r—   r   r   r   r   Ú/test_indexlist_numpyarray_single_index_ellipsisË  s    z;Test1DFloat.test_indexlist_numpyarray_single_index_ellipsisc              	   C   s*   |   | j| jtjt g d¢¡df ¡ d S )Nr;   .r—   r   r   r   r   Ú"test_indexlist_numpyarray_ellipsisÎ  s    z.Test1DFloat.test_indexlist_numpyarray_ellipsisc                 C   s   |   | j| jtjg  ¡ d S rŽ   rw   r   r   r   r   Útest_indexlist_emptyÑ  s    z Test1DFloat.test_indexlist_emptyc                 C   s:   |   t¡� | jdg  W d   ƒ n1 s,0    Y  d S r“   r|   r   r   r   r   Útest_indexlist_outofrangeÔ  s    z%Test1DFloat.test_indexlist_outofrangec                 C   s<   |   t¡� | jg d¢  W d  ƒ n1 s.0    Y  dS )z8 we require index list values to be strictly increasing )r   rn   r<   Nr�   r   r   r   r   Útest_indexlist_nonmonotonicØ  s    z'Test1DFloat.test_indexlist_nonmonotonicc                 C   sX   |   | j| jtjg d¢ ¡ |  t¡� | jddg  W d   ƒ n1 sJ0    Y  d S )N)r   r<   r„   r„   éýÿÿÿ)rx   r   rQ   r   ry   r1   r�   r   r   r   r   Ú!test_indexlist_monotonic_negativeÝ  s    z-Test1DFloat.test_indexlist_monotonic_negativec                 C   s<   |   t¡� | jg d¢  W d  ƒ n1 s.0    Y  dS )z! we forbid repeated index values )r   r   r<   Nr�   r   r   r   r   Útest_indexlist_repeatedä  s    z#Test1DFloat.test_indexlist_repeatedc                 C   s&   | j | j| jtj| jdk dd� d S )NiœÿÿÿTr~   rw   r   r   r   r   Útest_mask_trueé  s    ûzTest1DFloat.test_mask_truec                 C   s&   | j | j| jtj| jdk dd� d S )Nr†   Tr~   rw   r   r   r   r   Útest_mask_falseò  s    ûzTest1DFloat.test_mask_falsec                 C   s&   | j | j| jtj| jdk dd� d S )Nr=   Tr~   rw   r   r   r   r   Útest_mask_partialû  s    ûzTest1DFloat.test_mask_partialc                 C   sB   |   t¡�$ | jtjddd�  W d  ƒ n1 s40    Y  dS )z4 we require the boolean mask shape to match exactly )r<   r@   rA   N)r1   r�   r   r   ru   r   r   r   r   Útest_mask_wrongsize  s    zTest1DFloat.test_mask_wrongsizec                 C   s8   |   t¡� | jd  W d  ƒ n1 s*0    Y  dS ra   r0   r   r   r   r   rH   	  s    zTest1DFloat.test_fieldnamesN)$rJ   rK   rL   r   r   r"   r+   r-   r�   r‚   rƒ   r…   r{   r‡   r‰   rŠ   r‹   r�   r‘   r’   r”   r–   r˜   rš   r›   rœ   r�   rž   rŸ   r¡   r¢   r£   r¤   r¥   r¦   rH   r   r   r   r   r     sB   			r   c                   @   s,   e Zd Zdd„ Zdd„ Zdd„ Zdd„ Zd	S )
ÚTest2DZeroFloatc                 C   s2   t  | ¡ tjddd�| _| jjd| jd�| _d S )N©r   rn   r   rA   rO   rP   rt   r   r   r   r   r     s    
zTest2DZeroFloat.setUpc                 C   s   |   | jjd¡ dS ©r   r<   Nr   r   r   r   r   r     s    zTest2DZeroFloat.test_ndimc                 C   s   |   | jjd¡ dS )r   r¨   Nr    r   r   r   r   r"     s    zTest2DZeroFloat.test_shapec                 C   s(   |   | j| jtjdd…g d¢f ¡ dS ©z see issue #473 N)r   r   r<   rw   r   r   r   r   r>     s    zTest2DZeroFloat.test_indexlistN)rJ   rK   rL   r   r   r"   r>   r   r   r   r   r§     s   r§   c                   @   sD   e Zd Zdd„ Zdd„ Zdd„ Zdd„ Zd	d
„ Zdd„ Zdd„ Z	dS )ÚTest2DFloatc                 C   s2   t  | ¡ tjddd�| _| jjd| jd�| _d S )N©r=   rn   r   rA   rO   rP   rt   r   r   r   r   r   &  s    
zTest2DFloat.setUpc                 C   s   |   | jjd¡ dS r©   r   r   r   r   r   r   +  s    zTest2DFloat.test_ndimc                 C   s   |   | jjd¡ dS )rU   é   Nr#   r   r   r   r   r%   /  s    zTest2DFloat.test_sizec                 C   s   |   | jjd| jjj ¡ dS )r&   r­   NrW   r   r   r   r   r(   3  s    zTest2DFloat.test_nbytesc                 C   s   |   | jjd¡ dS )r   r¬   Nr    r   r   r   r   r"   7  s    zTest2DFloat.test_shapec                 C   s(   |   | j| jtjdd…g d¢f ¡ dS rª   rw   r   r   r   r   r>   ;  s    zTest2DFloat.test_indexlistc                 C   s<   |   | j| jtjd d …g f ¡ |   | j| jtjg  ¡ d S rŽ   rw   r   r   r   r   Útest_index_emptylist?  s     z Test2DFloat.test_index_emptylistN)
rJ   rK   rL   r   r   r%   r(   r"   r>   r®   r   r   r   r   r«   $  s   r«   c                   @   s.   e Zd Zdd„ Ze ejdk d¡dd„ ƒZdS )ÚTestVeryLargeArrayc                 C   s    t  | ¡ | jjddd�| _d S )NrO   )i €  i   )r!   )r   r   r   rS   r   r   r   r   r   r   F  s    
zTestVeryLargeArray.setUpì        z&Maximum integer size >= 2**31 requiredc                 C   s   |   | jjd¡ d S )Nr°   r#   r   r   r   r   r%   J  s    zTestVeryLargeArray.test_sizeN)	rJ   rK   rL   r   r   ZskipIfÚsysÚmaxsizer%   r   r   r   r   r¯   D  s   r¯   )Ú__doc__r±   Únumpyr   r	   Úcommonr   r   r   rM   rc   rk   Z
skipUnlessÚversionZhdf5_version_tuplerr   r   r§   r«   r¯   r   r   r   r   Ú<module>
   s    "ACIE8  