Home | Trees | Indices | Help |
---|
|
object --+ | interface.LinearOperator --+ | SymmetricOperator --+ | DiagonalOperator --+ | MaskOperator
A subclass of DiagonalOperator with a boolean diagonal. Elements corresponding to zeros of the diagonal are masked out in the output vector.
Attributes ----------- mask : ndarray of type bool and ndim==1
|
|||
|
|||
Inherited from Inherited from Inherited from Inherited from |
|
|||
Inherited from Inherited from |
|
Parameters ---------- mask : ndarray of ones and zeros. If mask[i] = 0, the corresponding value will be masked. If mask is not a boolean array, it is converted to boolean. Returns ------- A MaskOperator instance. Exemple ------- >>> import numpy as np >>> import linear_operators as lo >>> M = lo.MaskOperator(np.arange(4) % 2) >>> M.todense() array([[ 0., 0., 0., 0.], [ 0., 1., 0., 0.], [ 0., 0., 0., 0.], [ 0., 0., 0., 1.]])
|
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Thu Jun 2 17:46:16 2011 | http://epydoc.sourceforge.net |