rc.data.functions§
Test functions, taken from SALib.
Classes§
Methods§
|
A multi-dimensional version of |
Module Contents§
- class Scalar(call, loc, scale, m, **kwargs)[source]§
A scalar function
scalar
such thatscalar(x, kwargs)
callsself.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
A vector functon, which is little more than a named dictionary of Scalar functions, such that
vector(x, **kwargs)
concatenatesscalar(x, **kwargs)
for each dictionary itemkey: Scalar
.- Parameters:
name (str)
kwargs (Scalar)
- 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:
Returns: The concatenation of
vectors
, namedname
.
- 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:
- Returns: A new instance of
Vector
namedname
containing theScalars
keyedscalars
. Effectively the pseudo-slice
self[scalars]
.
- linspace(start, stop, shape)[source]§
A multi-dimensional version of
np.linspace
, distributing values throughoutshape
.- 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)
.