This is a pre-release version (2.0.0.dev0+git20260907.41eeb59).Go to latest (1.18.0)
{ } Raw JSON

bundles / scipy 2.0.0.dev0+git20260907.41eeb59 / scipy / stats / _stats_py / _put_val_to_limits

function

scipy.stats._stats_py:_put_val_to_limits

source: build-install/usr/lib/python3.14/site-packages/scipy/stats/_stats_py.py:632

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