rc.data.functions§

Test functions, taken from SALib.

Classes§

Scalar

A scalar function scalar such that scalar(x, kwargs) calls

Vector

A vector functon, which is little more than a named dictionary of Scalar functions,

Methods§

linspace(start, stop, shape)

A multi-dimensional version of np.linspace, distributing values throughout shape.

Module Contents§

class Scalar(call, loc, scale, m, **kwargs)[source]§

A scalar function scalar such that scalar(x, kwargs) calls self.call(self.loc + self.scale * x[:, :self.m], **(self.kwargs | kwargs).

Parameters:
  • call (rc.base.Callable[rc.base.Np.Matrix, float])

  • loc (rc.base.Np.Vector)

  • scale (rc.base.Np.Vector)

  • m (int)

  • kwargs (rc.base.Np.Array)

class Vector(name, **kwargs)[source]§

Bases: dict

Inheritance diagram of rc.data.functions.Vector

A vector functon, which is little more than a named dictionary of Scalar functions, such that vector(x, **kwargs) concatenates scalar(x, **kwargs) for each dictionary item key: Scalar.

Parameters:
classmethod concat(name, vectors)[source]§

Concatenate vectors.

Parameters:
  • name (str) – The name of the returned Vector.

  • vectors (rc.base.Sequence[Vector]) – A sequence of Vector functions to concatenate.

Return type:

Vector

Returns: The concatenation of vectors, named name.

property meta: rc.base.Dict§

Meta data for providing to data.storage.

Return type:

rc.base.Dict

subVector(name, scalars)[source]§

Create a subVector of self.

Parameters:
  • name (str) – The name of the subVector.

  • scalars (rc.base.Sequence[str]) – The keys of the items of self to be included in subVector.

Return type:

Vector

Returns: A new instance of Vector named name containing the Scalars keyed scalars.

Effectively the pseudo-slice self[scalars].

linspace(start, stop, shape)[source]§

A multi-dimensional version of np.linspace, distributing values throughout shape.

Parameters:
  • start (float) – Start value, which will be returned in linspace(...)[0,...,0].

  • stop (float) – Stop value, which will be returned in linspace(...)[-1,...,-1].

  • shape (rc.base.Sequence[int]) – The linspace.shape to return.

Return type:

rc.base.Np.Matrix

Returns: np.reshape(np.linspace(start, stop, int(np.prod(shape)), endpoint=True), newshape=shape).