How to use the hdf5plugin.FILTERS function in hdf5plugin

To help you get started, we’ve selected a few hdf5plugin 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 tensorwerk / hangar-py / src / hangar / backends / hdf5_01.py View on Github external
from collections import ChainMap
from functools import partial
from pathlib import Path
from typing import MutableMapping, NamedTuple, Tuple, Optional, Union, Callable

import h5py
import numpy as np

try:
    # hdf5plugin warns if a filter is already loaded. we temporarily surpress
    # that here, then reset the logger level to it's initial version.
    _logger = logging.getLogger('hdf5plugin')
    _initialLevel = _logger.getEffectiveLevel()
    _logger.setLevel(logging.ERROR)
    import hdf5plugin
    assert 'blosc' in hdf5plugin.FILTERS
except (ImportError, ModuleNotFoundError):  # pragma: no cover
    pass
finally:
    _logger.setLevel(_initialLevel)
from xxhash import xxh64_hexdigest

from .. import __version__
from ..constants import DIR_DATA_REMOTE, DIR_DATA_STAGE, DIR_DATA_STORE, DIR_DATA
from ..utils import find_next_prime, random_string, set_blosc_nthreads


set_blosc_nthreads()


# ----------------------------- Configuration ---------------------------------
github tensorwerk / hangar-py / src / hangar / backends / hdf5_00.py View on Github external
import time
from collections import ChainMap
from functools import partial
from pathlib import Path
from typing import MutableMapping, NamedTuple, Tuple, Optional, Union, Callable

import h5py
import numpy as np
try:
    # hdf5plugin warns if a filter is already loaded. we temporarily surpress
    # that here, then reset the logger level to it's initial version.
    _logger = logging.getLogger('hdf5plugin')
    _initialLevel = _logger.getEffectiveLevel()
    _logger.setLevel(logging.ERROR)
    import hdf5plugin
    assert 'blosc' in hdf5plugin.FILTERS
except (ImportError, ModuleNotFoundError):  # pragma: no cover
    pass
finally:
    _logger.setLevel(_initialLevel)
from xxhash import xxh64_hexdigest

from .. import __version__
from ..constants import DIR_DATA_REMOTE, DIR_DATA_STAGE, DIR_DATA_STORE, DIR_DATA
from ..utils import find_next_prime, random_string, set_blosc_nthreads


set_blosc_nthreads()


# ----------------------------- Configuration ---------------------------------

hdf5plugin

HDF5 Plugins for Windows, MacOS, and Linux

(BSD-2-Clause OR MIT OR Zlib)
Latest version published 3 months ago

Package Health Score

75 / 100
Full package analysis

Similar packages