{ } Raw JSON

bundles / scipy 1.17.1 / scipy / stats / _distribution_infrastructure / _Interval

ABCMeta

scipy.stats._distribution_infrastructure:_Interval

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

Signature

def   _Interval ( endpoints = (-inf, inf) inclusive = (False, False) )

Members

Summary

Representation of an interval defined by two endpoints.

Extended Summary

Each endpoint may be a finite scalar, positive or negative infinity, or be given by a single parameter. The domain may include the endpoints or not.

This class still does not provide an implementation of the __str__ method, so it is meant for subclassing (e.g. a subclass for domains on the real line).

Attributes

symbols : dict

Inherited. A map from special values to symbols for use in __str__.

endpoints : 2-tuple of float(s) and/or str(s) and/or callable(s).

A tuple with two values. Each may be either a float (the numerical value of the endpoints of the domain), a string (the name of the parameters that will define the endpoint), or a callable taking the parameters used to define the endpoints of the domain as keyword only arguments and returning a numerical value for the endpoint.

inclusive : 2-tuple of bools

A tuple with two boolean values; each indicates whether the corresponding endpoint is included within the domain or not.

Methods

define_parameters(*parameters)

Records any parameters used to define the endpoints of the domain

get_numerical_endpoints(parameter_values)

Gets the numerical values of the domain endpoints, which may have been defined symbolically or through a callable.

contains(item, parameter_values)

Determines whether the argument is contained within the domain

draw(size, rng, proportions, parameter_values)

Draws random values based on the domain.

Aliases

  • scipy.stats._distribution_infrastructure._Interval