NanTransformer#
- class NanTransformer[source]#
Bases:
RasterTransformer
Removes NaN values from float raster.
- __init__(to_value: float = 0.0)[source]#
Construct a new NanTransformer.
- Parameters
to_value (float) – (float) NaN values are replaced with this
Methods
__init__
([to_value])Construct a new NanTransformer.
transform
(chip[, channel_order])Transform a chip.
- __init__(to_value: float = 0.0)[source]#
Construct a new NanTransformer.
- Parameters
to_value (float) – (float) NaN values are replaced with this
- transform(chip, channel_order=None)[source]#
Transform a chip.
Removes NaN values.
- Parameters
chip – ndarray of shape [height, width, channels] This is assumed to already have the channel_order applied to it if channel_order is set. In other words, channels should be equal to len(channel_order).
- Returns
[height, width, channels] numpy array