- gstools.transform.discrete(fld, values, thresholds='arithmetic', field='field', store=True, process=False, keep_mean=True)
After this transformation, the field has only len(values) discrete values.
Field) – Field class containing a generated field.
numpy.ndarray) – The discrete values the field will take
numpy.ndarray, optional) – the thresholds, where the value classes are separated possible values are: * “arithmetic”: the mean of the 2 neighbouring values * “equal”: devide the field into equal parts * an array of explicitly given thresholds Default: “arithmetic”
str, optional) – Name of field to be transformed. The default is “field”.
bool, optional) – Whether to process in/out fields with trend, normalizer and mean of given Field instance. The default is False.
bool, optional) – Whether to keep the mean of the field if process=True. The default is True.
- Return type