3
½ìœ]!<  ã               @   sô   d Z ddlm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jejjdkdƒG dd„ de	ƒƒZG dd„ de	ƒZej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
        Indexing
        Index list
        Boolean mask
        Field names
é    )Úabsolute_importNé   )ÚutÚTestCasec               @   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 )Ú	TestEmptyc             C   sh   t j| ƒ tjjtjjƒ}tjjjƒ }|j	dƒ tj
j| jjd||ƒ}tj|ƒ| _tjtj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   ú?/tmp/pip-build-pcqn41bp/h5py/h5py/tests/test_dataset_getitem.pyr	   6   s    

zTestEmpty.setUpc             C   s   | j | jjdƒ dS )z Verify number of dimensions r   N)ÚassertEqualr   Úndim)r   r   r   r   Ú	test_ndim?   s    zTestEmpty.test_ndimc             C   s   | j | jjdƒ dS )z Verify shape N)r   r   Úshape)r   r   r   r   Ú
test_shapeC   s    zTestEmpty.test_shapec             C   s   | j | jjdƒ dS )z Verify shape N)r   r   Úsize)r   r   r   r   Ú	test_sizeG   s    zTestEmpty.test_sizec             C   s   | j | jd | jƒ dS )z Ellipsis -> ValueError .N)r   r   r   )r   r   r   r   Útest_ellipsisK   s    zTestEmpty.test_ellipsisc             C   s   | j | jf  | jƒ dS )z () -> IOError N)r   r   r   )r   r   r   r   Ú
test_tupleO   s    zTestEmpty.test_tuplec          
   C   s(   | j tƒ� | jdd…  W dQ R X dS )z slice -> ValueError r   é   N)ÚassertRaisesÚ
ValueErrorr   )r   r   r   r   Ú
test_sliceS   s    zTestEmpty.test_slicec          	   C   s$   | j tƒ� | jd  W dQ R X dS )z index -> ValueError r   N)r"   r#   r   )r   r   r   r   Ú
test_indexX   s    zTestEmpty.test_indexc             C   s*   | j tƒ� | jdddg  W dQ R X dS )z index list -> ValueError r   é   é   N)r"   r#   r   )r   r   r   r   Útest_indexlist]   s    zTestEmpty.test_indexlistc          	   C   s2   t jddd�}| jtƒ� | j|  W dQ R X dS )z mask -> ValueError TÚbool)r   N)r   Úarrayr"   r#   r   )r   Úmaskr   r   r   Ú	test_maskb   s    zTestEmpty.test_maskc          	   C   s$   | j tƒ� | jd  W dQ R X dS )z field name -> ValueError ÚfieldN)r"   r#   r   )r   r   r   r   Útest_fieldnamesh   s    zTestEmpty.test_fieldnamesN)Ú__name__Ú
__module__Ú__qualname__r	   r   r   r   r   r    r$   r%   r(   r,   r.   r   r   r   r   r   4   s   	r   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S )ÚTestScalarFloatc             C   s2   t j| ƒ tjddd�| _| jjd| jd�| _d S )Ng     @E@r   )r   Úx)Údata)r   r	   r   r*   r4   r   Úcreate_datasetr   )r   r   r   r   r	   p   s    
zTestScalarFloat.setUpc             C   s   | j | jjdƒ dS )z Verify number of dimensions r   N)r   r   r   )r   r   r   r   r   u   s    zTestScalarFloat.test_ndimc             C   s   | j | jjtƒ ƒ dS )z Verify shape N)r   r   r   Útuple)r   r   r   r   r   y   s    zTestScalarFloat.test_shapec             C   s   | j d }| j|| jƒ dS )z Ellipsis -> scalar ndarray .N)r   ÚassertArrayEqualr4   )r   Úoutr   r   r   r   }   s    
zTestScalarFloat.test_ellipsisc             C   s    | j f  }| j|| jjƒ ƒ dS )z () -> bare item N)r   r7   r4   Úitem)r   r8   r   r   r   r    ‚   s    
zTestScalarFloat.test_tuplec          
   C   s(   | j tƒ� | jdd…  W dQ R X dS )z slice -> ValueError r   r!   N)r"   r#   r   )r   r   r   r   r$   ‡   s    zTestScalarFloat.test_slicec          	   C   s$   | j tƒ� | jd  W dQ R X dS )z index -> ValueError r   N)r"   r#   r   )r   r   r   r   r%   Œ   s    zTestScalarFloat.test_indexc             C   s*   | j tƒ� | jdddg  W dQ R X dS )z index list -> ValueError r   r&   r'   N)r"   r#   r   )r   r   r   r   r(   ’   s    zTestScalarFloat.test_indexlistc          	   C   s2   t jddd�}| jtƒ� | j|  W dQ R X dS )z mask -> ValueError Tr)   )r   N)r   r*   r"   r#   r   )r   r+   r   r   r   r,   ˜   s    zTestScalarFloat.test_maskc          	   C   s$   | j tƒ� | jd  W dQ R X dS )z& field name -> ValueError (no fields) r-   N)r"   r#   r   )r   r   r   r   r.   ž   s    zTestScalarFloat.test_fieldnamesN)r/   r0   r1   r	   r   r   r   r    r$   r%   r(   r,   r.   r   r   r   r   r2   n   s   r2   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S )ÚTestScalarCompoundc             C   s8   t j| ƒ tjddddgd
�| _| jjd| jd�| _d S )Nç     @E@év   ÚHelloÚar   ÚbÚiÚcú|S10)r   r3   )r4   éŠÿÿÿ)r;   rC   r=   )r>   r   )r?   r@   )rA   rB   )r   r	   r   r*   r4   r   r5   r   )r   r   r   r   r	   ¦   s    
zTestScalarCompound.setUpc             C   s   | j | jjdƒ dS )z Verify number of dimensions r   N)r   r   r   )r   r   r   r   r   «   s    zTestScalarCompound.test_ndimc             C   s   | j | jjtƒ ƒ dS )z Verify shape N)r   r   r   r6   )r   r   r   r   r   ¯   s    zTestScalarCompound.test_shapec             C   s@   | j d }| j|tjƒ | j|j| jjƒ | j|j| jjƒ dS )z Ellipsis -> scalar ndarray .N)r   ÚassertIsInstancer   Zndarrayr   r   r4   r   )r   r8   r   r   r   r   ³   s    
z TestScalarCompound.test_ellipsisc             C   s.   | j f  }| j|tjƒ | j|j| jjƒ dS )z () -> np.void instance N)r   rD   r   Úvoidr   r   r4   )r   r8   r   r   r   r    »   s    
zTestScalarCompound.test_tuplec          
   C   s(   | j tƒ� | jdd…  W dQ R X dS )z slice -> ValueError r   r!   N)r"   r#   r   )r   r   r   r   r$   Á   s    zTestScalarCompound.test_slicec          	   C   s$   | j tƒ� | jd  W dQ R X dS )z index -> ValueError r   N)r"   r#   r   )r   r   r   r   r%   Æ   s    zTestScalarCompound.test_indexc             C   s*   | j tƒ� | jdddg  W dQ R X dS )z index list -> ValueError r   r&   r'   N)r"   r#   r   )r   r   r   r   r(   Ì   s    z!TestScalarCompound.test_indexlistc          	   C   s2   t jddd�}| jtƒ� | j|  W dQ R X dS )z mask -> ValueError  Tr)   )r   N)r   r*   r"   r#   r   )r   r+   r   r   r   r,   Ò   s    zTestScalarCompound.test_maskc             C   s.   | j d }| j|tjƒ | j|| j d ƒ dS )z field name -> bare value r>   N)r   rD   r   Zfloat32r   )r   r8   r   r   r   r.   Ù   s    
z"TestScalarCompound.test_fieldnamesN)r/   r0   r1   r	   r   r   r   r    r$   r%   r(   r,   r.   r   r   r   r   r:   ¤   s   r:   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S )ÚTestScalarArrayc             C   sR   t j| ƒ tjdƒ| _tjdddgdd	�| _| jjd
f | jd	�| _	| j| j	d< d S )Nz(3,2)fçš™™™™™	@éw   é*   ç33333óX@ç…ëQ¸	@r   r   )r   r3   .é‰ÿÿÿ)rG   rL   )rI   rJ   )rK   r   )
r   r	   r   r   Údtr*   r4   r   r5   r   )r   r   r   r   r	   â   s
    
zTestScalarArray.setUpc             C   s$   | j | jjdƒ | j | jjdƒ dS )z Verify number of dimensions r&   r   N)r   r4   r   r   )r   r   r   r   r   é   s    zTestScalarArray.test_ndimc             C   s&   | j | jjdƒ | j | jjtƒ ƒ dS )z Verify shape é   r&   N)rN   r&   )r   r4   r   r   r6   )r   r   r   r   r   î   s    zTestScalarArray.test_shapec             C   s   | j d }| j|| jƒ dS )z2 Ellipsis -> ndarray promoted to underlying shape .N)r   r7   r4   )r   r8   r   r   r   r   ó   s    
zTestScalarArray.test_ellipsisc             C   s   | j d }| j|| jƒ dS )z () -> same as ellipsis .N)r   r7   r4   )r   r8   r   r   r   r    ø   s    
zTestScalarArray.test_tuplec          
   C   s(   | j tƒ� | jdd…  W dQ R X dS )z slice -> ValueError r   r!   N)r"   r#   r   )r   r   r   r   r$   ý   s    zTestScalarArray.test_slicec          	   C   s$   | j tƒ� | jd  W dQ R X dS )z index -> ValueError r   N)r"   r#   r   )r   r   r   r   r%     s    zTestScalarArray.test_indexc          	   C   s$   | j tƒ� | jg   W dQ R X dS )z index list -> ValueError N)r"   r#   r   )r   r   r   r   r(     s    zTestScalarArray.test_indexlistc          	   C   s2   t jddd�}| jtƒ� | j|  W dQ R X dS )z mask -> ValueError Tr)   )r   N)r   r*   r"   r#   r   )r   r+   r   r   r   r,     s    zTestScalarArray.test_maskc          	   C   s$   | j tƒ� | jd  W dQ R X dS )z& field name -> ValueError (no fields) r-   N)r"   r#   r   )r   r   r   r   r.     s    zTestScalarArray.test_fieldnamesN)r/   r0   r1   r	   r   r   r   r    r$   r%   r(   r,   r.   r   r   r   r   rF   à   s   rF   é   é   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 j| ƒ tjddd�| _| jjd| jd�| _d S )Nr   r   )r   r3   )r4   )r   )r   r	   r   Úonesr4   r   r5   r   )r   r   r   r   r	     s    
zTest1DZeroFloat.setUpc             C   s   | j | jjdƒ dS )z Verify number of dimensions r   N)r   r   r   )r   r   r   r   r      s    zTest1DZeroFloat.test_ndimc             C   s   | j | jjdƒ dS )z Verify shape r   N)r   )r   r   r   )r   r   r   r   r   $  s    zTest1DZeroFloat.test_shapec             C   s   | j | j| jtjd ƒ dS )z' Ellipsis -> ndarray of matching shape .N)ÚassertNumpyBehaviorr   r4   r   Ús_)r   r   r   r   r   (  s    zTest1DZeroFloat.test_ellipsisc             C   s   | j | j| jtjf  ƒ dS )z () -> same as ellipsis N)rS   r   r4   r   rT   )r   r   r   r   r    ,  s    zTest1DZeroFloat.test_tuplec             C   s    | j | j| jtjdd… ƒ dS )z  slice -> ndarray of shape (0,) r   r!   N)rS   r   r4   r   rT   )r   r   r   r   r$   0  s    zTest1DZeroFloat.test_slicec             C   s    | j | j| jtjdd… ƒ d S )NrP   r'   )rS   r   r4   r   rT   )r   r   r   r   Útest_slice_stop_less_than_start4  s    z/Test1DZeroFloat.test_slice_stop_less_than_startc          	   C   s$   | j tƒ� | jd  W dQ R X dS )z index -> out of range r   N)r"   r#   r   )r   r   r   r   r%   8  s    zTest1DZeroFloat.test_indexc             C   s   | j | j| jtjg  ƒ dS )z index list N)rS   r   r4   r   rT   )r   r   r   r   r(   =  s    zTest1DZeroFloat.test_indexlistc             C   s*   t jddd�}| j| j| jt j| ƒ dS )z# mask -> ndarray of matching shape r   r)   )r   N)r   )r   rR   rS   r   r4   rT   )r   r+   r   r   r   r,   A  s    zTest1DZeroFloat.test_maskc          	   C   s$   | j tƒ� | jd  W dQ R X dS )z& field name -> ValueError (no fields) r-   N)r"   r#   r   )r   r   r   r   r.   F  s    zTest1DZeroFloat.test_fieldnamesN)r/   r0   r1   r	   r   r   r   r    r$   rU   r%   r(   r,   r.   r   r   r   r   rQ     s   rQ   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ej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$dAS )BÚTest1DFloatc             C   s4   t j| ƒ tjdƒjdƒ| _| jjd| jd�| _d S )Né   r   r3   )r4   )	r   r	   r   ZarangeZastyper4   r   r5   r   )r   r   r   r   r	   N  s    
zTest1DFloat.setUpc             C   s   | j | jjdƒ dS )z Verify number of dimensions r   N)r   r   r   )r   r   r   r   r   S  s    zTest1DFloat.test_ndimc             C   s   | j | jjdƒ dS )z Verify shape rW   N)rW   )r   r   r   )r   r   r   r   r   W  s    zTest1DFloat.test_shapec             C   s   | j | j| jtjd ƒ d S )N.)rS   r   r4   r   rT   )r   r   r   r   r   [  s    zTest1DFloat.test_ellipsisc             C   s   | j | j| jtjf  ƒ d S )N)rS   r   r4   r   rT   )r   r   r   r   r    ^  s    zTest1DFloat.test_tuplec             C   s    | j | j| jtjdd… ƒ d S )Nr   r!   )rS   r   r4   r   rT   )r   r   r   r   Útest_slice_simplea  s    zTest1DFloat.test_slice_simplec             C   s    | j | j| jtjdd… ƒ d S )Nr!   )rS   r   r4   r   rT   )r   r   r   r   Útest_slice_zerosized  s    zTest1DFloat.test_slice_zerosizec             C   s"   | j | j| jtjddd… ƒ d S )Nr   rP   rN   )rS   r   r4   r   rT   )r   r   r   r   Útest_slice_stridesg  s    zTest1DFloat.test_slice_stridesc             C   s"   | j | j| jtjddd… ƒ d S )NrO   r&   rN   iøÿÿÿéþÿÿÿ)rS   r   r4   r   rT   )r   r   r   r   Útest_slice_negindexesj  s    z!Test1DFloat.test_slice_negindexesc             C   s    | j | j| jtjdd… ƒ d S )NrP   r'   )rS   r   r4   r   rT   )r   r   r   r   rU   m  s    z+Test1DFloat.test_slice_stop_less_than_startc             C   s"   | j | j| jtjddd… ƒ d S )Néd   i�  rN   )rS   r   r4   r   rT   )r   r   r   r   Útest_slice_outofrangep  s    z!Test1DFloat.test_slice_outofrangec             C   s*   | j tƒ� | jddd…  W dQ R X dS )z we disallow negative steps Nr   éÿÿÿÿ)r"   r#   r   )r   r   r   r   Útest_slice_backwardss  s    z Test1DFloat.test_slice_backwardsc             C   s"   | j | j| jtjd d d… ƒ d S )Nr   )rS   r   r4   r   rT   )r   r   r   r   Útest_slice_zerostridex  s    z!Test1DFloat.test_slice_zerostridec             C   s   | j | j| jtjd ƒ d S )NrN   )rS   r   r4   r   rT   )r   r   r   r   Útest_index_simple{  s    zTest1DFloat.test_index_simplec             C   s   | j | j| jtjd ƒ d S )Nr!   éüÿÿÿ)rS   r   r4   r   rT   )r   r   r   r   Útest_index_neg~  s    zTest1DFloat.test_index_negc          	   C   s$   | j tƒ� | jd   W d Q R X d S )N)r"   Ú	TypeErrorr   )r   r   r   r   Útest_index_none‚  s    zTest1DFloat.test_index_nonec          	   C   s$   | j tƒ� | ji   W dQ R X dS )z Illegal slicing argument N)r"   re   r   )r   r   r   r   Útest_index_illegalˆ  s    zTest1DFloat.test_index_illegalc          	   C   s$   | j tƒ� | jd  W d Q R X d S )Nr]   )r"   r#   r   )r   r   r   r   Útest_index_outofrange�  s    z!Test1DFloat.test_index_outofrangec             C   s"   | j | j| jtjdddg ƒ d S )Nr   r&   r'   )rS   r   r4   r   rT   )r   r   r   r   Útest_indexlist_simple“  s    z!Test1DFloat.test_indexlist_simplec             C   s(   | j | j| jtjtjdddgƒ ƒ d S )Nr   r&   r'   )rS   r   r4   r   rT   r*   )r   r   r   r   Útest_indexlist_numpyarray–  s    z%Test1DFloat.test_indexlist_numpyarrayc             C   s"   | j | j| jtjdgdf ƒ d S )Nr   .)rS   r   r4   r   rT   )r   r   r   r   Ú$test_indexlist_single_index_ellipsis™  s    z0Test1DFloat.test_indexlist_single_index_ellipsisc             C   s(   | j | j| jtjtjdgƒdf ƒ d S )Nr   .)rS   r   r4   r   rT   r*   )r   r   r   r   Ú/test_indexlist_numpyarray_single_index_ellipsisœ  s    z;Test1DFloat.test_indexlist_numpyarray_single_index_ellipsisc             C   s,   | j | j| jtjtjdddgƒdf ƒ d S )Nr   r&   r'   .)rS   r   r4   r   rT   r*   )r   r   r   r   Ú"test_indexlist_numpyarray_ellipsisŸ  s    z.Test1DFloat.test_indexlist_numpyarray_ellipsisc             C   s   | j | j| jtjg  ƒ d S )N)rS   r   r4   r   rT   )r   r   r   r   Útest_indexlist_empty¢  s    z Test1DFloat.test_indexlist_emptyc          	   C   s&   | j tƒ� | jdg  W d Q R X d S )Nr]   )r"   r#   r   )r   r   r   r   Útest_indexlist_outofrange¦  s    z%Test1DFloat.test_indexlist_outofrangec             C   s*   | j tƒ� | jdddg  W dQ R X dS )z8 we require index list values to be strictly increasing r   rN   r&   N)r"   re   r   )r   r   r   r   Útest_indexlist_nonmonotonicª  s    z'Test1DFloat.test_indexlist_nonmonotonicc             C   s*   | j tƒ� | jdddg  W dQ R X dS )z! we forbid repeated index values r   r&   N)r"   re   r   )r   r   r   r   Útest_indexlist_repeated¯  s    z#Test1DFloat.test_indexlist_repeatedc             C   s"   | j | j| jtj| jdk ƒ d S )Nr]   iœÿÿÿ)rS   r   r4   r   rT   )r   r   r   r   Útest_mask_true´  s    zTest1DFloat.test_mask_truec             C   s"   | j | j| jtj| jdk ƒ d S )Nr]   )rS   r   r4   r   rT   )r   r   r   r   Útest_mask_false·  s    zTest1DFloat.test_mask_falsec             C   s"   | j | j| jtj| jdk ƒ d S )Nr'   )rS   r   r4   r   rT   )r   r   r   r   Útest_mask_partialº  s    zTest1DFloat.test_mask_partialc             C   s.   | j tƒ� | jtjddd�  W dQ R X dS )z4 we require the boolean mask shape to match exactly r&   r)   )r   N)r&   )r"   re   r   r   rR   )r   r   r   r   Útest_mask_wrongsize½  s    zTest1DFloat.test_mask_wrongsizec          	   C   s$   | j tƒ� | jd  W dQ R X dS )z& field name -> ValueError (no fields) r-   N)r"   r#   r   )r   r   r   r   r.   Â  s    zTest1DFloat.test_fieldnamesN)%r/   r0   r1   r	   r   r   r   r    rX   rY   rZ   r\   rU   r^   r`   ra   rb   rd   rf   r   ZexpectedFailurerg   rh   ri   rj   rk   rl   rm   rn   ro   rp   rq   rr   rs   rt   ru   r.   r   r   r   r   rV   L  s@   rV   c               @   s,   e Zd Zdd„ Zdd„ Zdd„ Zdd„ Zd	S )
ÚTest2DZeroFloatc             C   s2   t j| ƒ tjddd�| _| jjd| jd�| _d S )Nr   rN   r   )r   r3   )r4   )r   rN   )r   r	   r   rR   r4   r   r5   r   )r   r   r   r   r	   Ë  s    
zTest2DZeroFloat.setUpc             C   s   | j | jjdƒ dS )z Verify number of dimensions r&   N)r   r   r   )r   r   r   r   r   Ð  s    zTest2DZeroFloat.test_ndimc             C   s   | j | jjdƒ dS )z Verify shape r   rN   N)r   rN   )r   r   r   )r   r   r   r   r   Ô  s    zTest2DZeroFloat.test_shapec             C   s*   | j | j| jtjdd…dddgf ƒ dS )z see issue #473 Nr   r   r&   )rS   r   r4   r   rT   )r   r   r   r   r(   Ø  s    zTest2DZeroFloat.test_indexlistN)r/   r0   r1   r	   r   r   r(   r   r   r   r   rv   È  s   rv   c               @   s4   e Zd Zdd„ Zdd„ Zdd„ Zdd„ Zd	d
„ ZdS )ÚTest2DFloatc             C   s2   t j| ƒ tjddd�| _| jjd| jd�| _d S )Nr'   rN   r   )r   r3   )r4   )r'   rN   )r   r	   r   rR   r4   r   r5   r   )r   r   r   r   r	   ß  s    
zTest2DFloat.setUpc             C   s   | j | jjdƒ dS )z Verify number of dimensions r&   N)r   r   r   )r   r   r   r   r   ä  s    zTest2DFloat.test_ndimc             C   s   | j | jjdƒ dS )z Verify shape r'   rN   N)r'   rN   )r   r   r   )r   r   r   r   r   è  s    zTest2DFloat.test_shapec             C   s*   | j | j| jtjdd…dddgf ƒ dS )z see issue #473 Nr   r   r&   )rS   r   r4   r   rT   )r   r   r   r   r(   ì  s    zTest2DFloat.test_indexlistc             C   s<   | j | j| jtjd d …g f ƒ | j | j| jtjg  ƒ d S )N)rS   r   r4   r   rT   )r   r   r   r   Útest_index_emptylistð  s     z Test2DFloat.test_index_emptylistN)r/   r0   r1   r	   r   r   r(   rx   r   r   r   r   rw   Ý  s
   rw   c               @   s.   e Zd Zdd„ Zejejd	k dƒdd„ ƒZdS )
ÚTestVeryLargeArrayc             C   s    t j| ƒ | jjddd�| _d S )	Nr3   r&   é   é   )r   é €  é   )r|   r}   )r   r	   r   r5   r   )r   r   r   r   r	   ÷  s    
zTestVeryLargeArray.setUpr&   é   z&Maximum integer size >= 2**31 requiredc             C   s   | j | jjdƒ d S )Nr&   r~   l        )r   r   r   )r   r   r   r   r   û  s    zTestVeryLargeArray.test_sizeNl        )	r/   r0   r1   r	   r   ZskipIfÚsysÚmaxsizer   r   r   r   r   ry   õ  s   ry   )r   rO   rP   )r   rO   rP   )Ú__doc__Ú
__future__r   r   Znumpyr   r
   Úcommonr   r   r   r2   r:   rF   Z
skipUnlessÚversionZhdf5_version_tuplerQ   rV   rv   rw   ry   r   r   r   r   Ú<module>)   s    :6<83|