How to use the h5netcdf.compat.ChainMap function in h5netcdf

To help you get started, we’ve selected a few h5netcdf examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github shoyer / h5netcdf / h5netcdf / core.py View on Github external
# phony dimension handling
        self._phony_dims_mode = phony_dims
        if phony_dims is not None:
            self._phony_dim_count = 0
            if phony_dims not in ['sort', 'access']:
                raise ValueError('unknown value %r for phony_dims\n'
                                 'Use phony_dims=%r for sorted naming, '
                                 'phony_dims=%r for per access naming.'
                                 % (phony_dims, 'sort', 'access'))

        # These maps keep track of dimensions in terms of size (might be
        # unlimited), current size (identical to size for limited dimensions),
        # their position, and look-up for HDF5 datasets corresponding to a
        # dimension.
        self._dim_sizes = ChainMap()
        self._current_dim_sizes = ChainMap()
        self._dim_order = ChainMap()
        self._all_h5groups = ChainMap(self._h5group)
        super(File, self).__init__(self, self._h5path)
        # initialize all groups to detect/create phony dimensions
        # mimics netcdf-c style naming
        if phony_dims == 'sort':
            self._determine_phony_dimensions()
github shoyer / h5netcdf / h5netcdf / core.py View on Github external
# phony dimension handling
        self._phony_dims_mode = phony_dims
        if phony_dims is not None:
            self._phony_dim_count = 0
            if phony_dims not in ['sort', 'access']:
                raise ValueError('unknown value %r for phony_dims\n'
                                 'Use phony_dims=%r for sorted naming, '
                                 'phony_dims=%r for per access naming.'
                                 % (phony_dims, 'sort', 'access'))

        # These maps keep track of dimensions in terms of size (might be
        # unlimited), current size (identical to size for limited dimensions),
        # their position, and look-up for HDF5 datasets corresponding to a
        # dimension.
        self._dim_sizes = ChainMap()
        self._current_dim_sizes = ChainMap()
        self._dim_order = ChainMap()
        self._all_h5groups = ChainMap(self._h5group)
        super(File, self).__init__(self, self._h5path)
        # initialize all groups to detect/create phony dimensions
        # mimics netcdf-c style naming
        if phony_dims == 'sort':
            self._determine_phony_dimensions()
github shoyer / h5netcdf / h5netcdf / core.py View on Github external
self._phony_dims_mode = phony_dims
        if phony_dims is not None:
            self._phony_dim_count = 0
            if phony_dims not in ['sort', 'access']:
                raise ValueError('unknown value %r for phony_dims\n'
                                 'Use phony_dims=%r for sorted naming, '
                                 'phony_dims=%r for per access naming.'
                                 % (phony_dims, 'sort', 'access'))

        # These maps keep track of dimensions in terms of size (might be
        # unlimited), current size (identical to size for limited dimensions),
        # their position, and look-up for HDF5 datasets corresponding to a
        # dimension.
        self._dim_sizes = ChainMap()
        self._current_dim_sizes = ChainMap()
        self._dim_order = ChainMap()
        self._all_h5groups = ChainMap(self._h5group)
        super(File, self).__init__(self, self._h5path)
        # initialize all groups to detect/create phony dimensions
        # mimics netcdf-c style naming
        if phony_dims == 'sort':
            self._determine_phony_dimensions()
github shoyer / h5netcdf / h5netcdf / core.py View on Github external
if phony_dims is not None:
            self._phony_dim_count = 0
            if phony_dims not in ['sort', 'access']:
                raise ValueError('unknown value %r for phony_dims\n'
                                 'Use phony_dims=%r for sorted naming, '
                                 'phony_dims=%r for per access naming.'
                                 % (phony_dims, 'sort', 'access'))

        # These maps keep track of dimensions in terms of size (might be
        # unlimited), current size (identical to size for limited dimensions),
        # their position, and look-up for HDF5 datasets corresponding to a
        # dimension.
        self._dim_sizes = ChainMap()
        self._current_dim_sizes = ChainMap()
        self._dim_order = ChainMap()
        self._all_h5groups = ChainMap(self._h5group)
        super(File, self).__init__(self, self._h5path)
        # initialize all groups to detect/create phony dimensions
        # mimics netcdf-c style naming
        if phony_dims == 'sort':
            self._determine_phony_dimensions()