{ } Raw JSON

bundles / scipy latest / scipy / stats / _stats_py / _put_val_to_limits

function

scipy.stats._stats_py:_put_val_to_limits

source: /scipy/stats/_stats_py.py :599

Signature

def   _put_val_to_limits ( a limits inclusive val = nan xp = None )

Summary

Replace elements outside limits with a value.

Extended Summary

This is primarily a utility function.

Parameters

a : array
limits : (float or None, float or None)

A tuple consisting of the (lower limit, upper limit). Elements in the input array less than the lower limit or greater than the upper limit will be replaced with val. None implies no limit.

inclusive : (bool, bool)

A tuple consisting of the (lower flag, upper flag). These flags determine whether values exactly equal to lower or upper are allowed.

val : float, default: NaN

The value with which extreme elements of the array are replaced.

Aliases

  • scipy.stats._stats_py._put_val_to_limits