imgaug.dtypes
Functions to interact/analyze with numpy dtypes.
- imgaug.dtypes.allow_only_uint8(dtypes, augmenter=None)[source]
Verify that input dtypes are uint8.
Added in 0.5.0.
- Parameters:
dtypes (numpy.ndarray or iterable of numpy.ndarray or iterable of numpy.dtype) – One or more input dtypes to verify.
augmenter (None or imgaug.augmenters.meta.Augmenter, optional) – If the gating happens for an augmenter, it should be provided here. This information will be used to improve output error messages and warnings.
- imgaug.dtypes.clip_to_dtype_value_range_(array, dtype, validate=True, validate_values=None)[source]
- imgaug.dtypes.gate_dtypes(dtypes, allowed, disallowed, augmenter=None)[source]
Deprecated. Use
imgaug.dtypes.gate_dtypes_strsinstead.
- imgaug.dtypes.gate_dtypes_strs(dtypes, allowed, disallowed, augmenter=None)[source]
Verify that input dtypes match allowed/disallowed dtype strings.
Added in 0.5.0.
- Parameters:
dtypes (numpy.ndarray or iterable of numpy.ndarray or iterable of numpy.dtype) – One or more input dtypes to verify.
allowed (str) – Names of one or more allowed dtypes, separated by single spaces.
disallowed (str) – Names of disallowed dtypes, separated by single spaces. Must not intersect with allowed dtypes.
augmenter (None or imgaug.augmenters.meta.Augmenter, optional) – If the gating happens for an augmenter, it should be provided here. This information will be used to improve output error messages and warnings.