gstools.transform.array_discrete

gstools.transform.array_discrete(field, values, thresholds='arithmetic', mean=None, var=None)[source]

Discrete transformation.

After this transformation, the field has only len(values) discrete values.

Parameters:
  • field (numpy.ndarray) – Normal distributed values.

  • values (numpy.ndarray) – The discrete values the field will take

  • thresholds (str or numpy.ndarray, optional) – the thresholds, where the value classes are separated possible values are: * “arithmetic”: the mean of the 2 neighbouring values * “equal”: divide the field into equal parts * an array of explicitly given thresholds Default: “arithmetic”

  • mean (float`or :any:`None) – Mean of the field for “equal” thresholds. Default: np.mean(field)

  • var (float`or :any:`None) – Variance of the field for “equal” thresholds. Default: np.var(field)

Returns:

Transformed field.

Return type:

numpy.ndarray