Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
# 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()
# 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()
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()
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()