compute
numcodecs_safeguards.compute
Helper classes for configuring the compute behaviour of the SafeguardedCodec.
Classes:
-
Compute–Compute configuration with options that may affect the compression
Compute
dataclass
Compute configuration with options that may affect the compression ratio and time cost of computing the safeguards corrections.
While these options can change the particular corrections that are produced, the resulting corrections always satisfy the safety requirements.
Some configuration options are unstable, i.e. they should not be relied upon in production code since they might be removed or changed without a breaking major version bump.
Methods:
-
get_config–Returns the compute configuration.
-
from_config–Instantiate the compute configuration from a
dict.
unstable_iterative
class-attribute
instance-attribute
unstable_iterative: bool = False
Unstable option to use an iterative algorithm that can reduce the number of corrections that need to be applied, which can improve the compression ratio at the cost of requiring additional time to compute the corrections.
unstable_lossless_corrections
class-attribute
instance-attribute
unstable_lossless_corrections: bool = False
Unstable option to compute lossless corrections that reproduce the original data exactly.
If lossless corrections are used without iterative corrections, all data elements will be corrected (whether or not they need corrections).