Package ComboCode :: Package cc :: Package ivs :: Package sigproc :: Package lmfit :: Package uncertainties :: Package unumpy :: Module core :: Class matrix
[hide private]
[frames] | no frames]

Class matrix

source code


Class equivalent to numpy.matrix, but that behaves better when the matrix contains numbers with uncertainties.

Instance Methods [hide private]
 
__rmul__(self, other)
y*x
source code
 
getI(self)
Matrix inverse of pseudo-inverse
source code
 
std_devs(arr)
Returns the standard deviations of the numbers in NumPy array arr.
source code

Inherited from numpy.matrixlib.defmatrix.matrix: __array_finalize__, __getitem__, __imul__, __ipow__, __mul__, __pow__, __repr__, __rpow__, __str__, all, any, argmax, argmin, flatten, getA, getA1, getH, getT, max, mean, min, prod, ptp, ravel, squeeze, std, sum, tolist, var

Inherited from numpy.matrixlib.defmatrix.matrix (private): _align, _collapse

Inherited from numpy.ndarray: __abs__, __add__, __and__, __array__, __array_prepare__, __array_wrap__, __contains__, __copy__, __deepcopy__, __delitem__, __delslice__, __div__, __divmod__, __eq__, __float__, __floordiv__, __ge__, __getslice__, __gt__, __hex__, __iadd__, __iand__, __idiv__, __ifloordiv__, __ilshift__, __imod__, __index__, __int__, __invert__, __ior__, __irshift__, __isub__, __iter__, __itruediv__, __ixor__, __le__, __len__, __long__, __lshift__, __lt__, __mod__, __ne__, __neg__, __nonzero__, __oct__, __or__, __pos__, __radd__, __rand__, __rdiv__, __rdivmod__, __reduce__, __rfloordiv__, __rlshift__, __rmod__, __ror__, __rrshift__, __rshift__, __rsub__, __rtruediv__, __rxor__, __setitem__, __setslice__, __setstate__, __sizeof__, __sub__, __truediv__, __xor__, argpartition, argsort, astype, byteswap, choose, clip, compress, conj, conjugate, copy, cumprod, cumsum, diagonal, dot, dump, dumps, fill, getfield, item, itemset, newbyteorder, nonzero, partition, put, repeat, reshape, resize, round, searchsorted, setfield, setflags, sort, swapaxes, take, tobytes, tofile, tostring, trace, transpose, view

Inherited from object: __delattr__, __format__, __getattribute__, __init__, __reduce_ex__, __setattr__, __subclasshook__

Static Methods [hide private]

Inherited from numpy.matrixlib.defmatrix.matrix: __new__

Class Variables [hide private]

Inherited from numpy.matrixlib.defmatrix.matrix: __array_priority__

Inherited from numpy.ndarray: __hash__

Properties [hide private]
  I
Returns the (multiplicative) inverse of invertible `self`.
  nominal_values
Nominal value of all the elements of the matrix.

Inherited from numpy.matrixlib.defmatrix.matrix: A, A1, H, T

Inherited from numpy.ndarray: __array_interface__, __array_struct__, base, ctypes, data, dtype, flags, flat, imag, itemsize, nbytes, ndim, real, shape, size, strides

Inherited from object: __class__

Method Details [hide private]

__rmul__(self, other)

source code 

y*x

Overrides: numpy.ndarray.__rmul__
(inherited documentation)

getI(self)

source code 

Matrix inverse of pseudo-inverse

Overrides: numpy.matrixlib.defmatrix.matrix.getI

std_devs(arr)

source code 

Returns the standard deviations of the numbers in NumPy array arr.

Elements that are not uncertainties.AffineScalarFunc are given a zero uncertainty ((because a numpy.array can contain numbers with uncertainties and pure floats simultaneously)..

If arr is of type unumpy.matrix, the returned array is a numpy.matrix, because the resulting matrix does not contain numbers with uncertainties.


Property Details [hide private]

I


Returns the (multiplicative) inverse of invertible `self`.

Parameters
----------
None

Returns
-------
ret : matrix object
    If `self` is non-singular, `ret` is such that ``ret * self`` ==
    ``self * ret`` == ``np.matrix(np.eye(self[0,:].size)`` all return
    ``True``.

Raises
------
numpy.linalg.LinAlgError: Singular matrix
    If `self` is singular.

See Also
--------
linalg.inv

Examples
--------
>>> m = np.matrix('[1, 2; 3, 4]'); m
matrix([[1, 2],
        [3, 4]])
>>> m.getI()
matrix([[-2. ,  1. ],
        [ 1.5, -0.5]])
>>> m.getI() * m
matrix([[ 1.,  0.],
        [ 0.,  1.]])

Get Method:
getI(self) - Matrix inverse of pseudo-inverse

nominal_values

Nominal value of all the elements of the matrix.

Get Method:
unreachable.nominal_values(self) - Nominal value of all the elements of the matrix.