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 / _censored_data / CensoredData / left_censored

classmethod

scipy.stats._censored_data:CensoredData.left_censored

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

Summary

Create a CensoredData instance of left-censored data.

Parameters

x : array_like

x is the array of observed data or measurements. x must be a one-dimensional sequence of finite numbers.

censored : array_like of bool

censored must be a one-dimensional sequence of boolean values. If censored[k] is True, the corresponding value in x is left-censored. That is, the value x[k] is the upper bound of the true (but unknown) value.

Returns

data : `CensoredData`

An instance of CensoredData that represents the collection of uncensored and left-censored values.

Examples

from scipy.stats import CensoredData
✓
Two uncensored values (0.12 and 0.033) and two left-censored values (both 1e-3).
data = CensoredData.left_censored([0.12, 0.033, 1e-3, 1e-3],
                                  [False, False, True, True])
✓
data
✗
CensoredData(uncensored=array([0.12 , 0.033]), left=array([0.001, 0.001]), right=array([], dtype=float64), interval=array([], shape=(0, 2), dtype=float64))
print(data)
✓
CensoredData(4 values: 2 not censored, 2 left-censored)

Aliases

  • scipy.stats.CensoredData.left_censored