Skip to main content
atoti.array.replace(
    measure: VariableMeasureConvertible,
    replacements: Mapping[float, float] | Mapping[int, int],
    /,
) → MeasureDefinition
Return a measure where elements equal to a key of the replacements mapping are replaced with the corresponding value.

Parameters

measure

The array measure in which to replace the elements.

replacements

The mapping from the old values to the new ones.