{ } Raw JSON

bundles / scipy 1.17.1 / scipy / stats / _distribution_infrastructure / _RealParameter / validate

function

scipy.stats._distribution_infrastructure:_RealParameter.validate

source: /scipy/stats/_distribution_infrastructure.py :733

Signature

def   validate ( self arr parameter_values )

Summary

Input validation/standardization of numerical values of a parameter.

Extended Summary

Checks whether elements of the argument arr are reals, ensuring that the dtype reflects this. Also produces a logical array that indicates which elements meet the requirements.

Parameters

arr : ndarray

The argument array to be validated and standardized.

parameter_values : dict

Map of parameter names to parameter value arrays.

Returns

arr : ndarray

The argument array that has been validated and standardized (converted to an appropriate dtype, if necessary).

dtype : NumPy dtype

The appropriate floating point dtype of the parameter.

valid : boolean ndarray

Logical array indicating which elements are valid (True) and which are not (False). The arrays of all distribution parameters will be broadcasted, and elements for which any parameter value does not meet the requirements will be replaced with NaN.

Aliases

  • scipy.stats._distribution_infrastructure._RealParameter.validate