HOME


sh-3ll 1.0
DIR:/usr/local/lib/python3.6/site-packages/xarray/backends/__pycache__/
Upload File :
Current File : //usr/local/lib/python3.6/site-packages/xarray/backends/__pycache__/pynio_.cpython-36.pyc
3

���h6�@sdddlZddlmZddlmZmZmZddlm	Z	ddl
mZGdd	�d	e�ZGd
d�de�Z
dS)�N�)�Variable)�FrozenOrderedDict�Frozen�NDArrayMixin)�indexing�)�AbstractDataStorec@s(eZdZdd�Zedd��Zdd�ZdS)�NioArrayWrappercCs||_||_dS)N)�arrayZ_ds)�selfr�ds�r�6/tmp/pip-build-5_djhm0z/xray/xarray/backends/pynio_.py�__init__szNioArrayWrapper.__init__cCstj|jj��S)N)�np�dtyper�typecode)rrrrrszNioArrayWrapper.dtypecCs&|fkr|jdkr|jj�S|j|S)Nr)�ndimr�	get_value)r�keyrrr�__getitem__s
zNioArrayWrapper.__getitem__N)�__name__�
__module__�__qualname__r�propertyrrrrrrr

sr
c@sBeZdZdZddd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dS)�NioDataStorez+Store for accessing datasets via PyNIO
    �rcCsddl}|j||d�|_dS)Nr)�mode)�Nio�	open_filer
)r�filenamerrrrrrszNioDataStore.__init__cCs"tjt||j��}t|j||j�S)N)rZLazilyIndexedArrayr
r
r�
dimensions�
attributes)r�var�datarrr�open_store_variable sz NioDataStore.open_store_variablecst�fdd��jjj�D��S)Nc3s |]\}}|�j|�fVqdS)N)r&)�.0�k�v)rrr�	<genexpr>%sz-NioDataStore.get_variables.<locals>.<genexpr>)rr
�	variables�	iteritems)rr)rr�
get_variables$szNioDataStore.get_variablescCst|jj�S)N)rr
r#)rrrr�	get_attrs(szNioDataStore.get_attrscCst|jj�S)N)rr
r")rrrr�get_dimensions+szNioDataStore.get_dimensionscCs|jj�dS)N)r
�close)rrrrr0.szNioDataStore.closeN)r)
rrr�__doc__rr&r-r.r/r0rrrrrs
r)Znumpyr�rZ
core.utilsrrr�corer�commonr	r
rrrrr�<module>s