bundles / scipy latest / scipy / stats / _censored_data / CensoredData / right_censored
classmethod
scipy.stats._censored_data:CensoredData.right_censored
source: build-install/usr/lib/python3.14/site-packages/scipy/stats/_censored_data.py:312
Summary
Create a CensoredData instance of right-censored data.
Parameters
x: array_likex is the array of observed data or measurements. x must be a one-dimensional sequence of finite numbers.
censored: array_like of boolcensored must be a one-dimensional sequence of boolean values. If
censored[k]is True, the corresponding value in x is right-censored. That is, the valuex[k]is the lower bound of the true (but unknown) value.
Returns
data: `CensoredData`An instance of CensoredData that represents the collection of uncensored and right-censored values.
Examples
from scipy.stats import CensoredData
✓data = CensoredData.right_censored([4, 10, 24, 25], [False, False, True, True])✓
data
✗CensoredData(uncensored=array([ 4., 10.]), left=array([], dtype=float64), right=array([24., 25.]), interval=array([], shape=(0, 2), dtype=float64))
print(data)
✓CensoredData(4 values: 2 not censored, 2 right-censored)
Aliases
scipy.stats.CensoredData.right_censored