Skip to content

brahmap.base.IdentityOperator

Bases: LinearOperator

A linear operator for the identity matrix of size nargin

Parameters:

Name Type Description Default
nargin int

description

required
**kwargs Any

description

{}
Source code in brahmap/base/linop.py
class IdentityOperator(LinearOperator):
    """A linear operator for the identity matrix of size `nargin`

    Parameters
    ----------
    nargin : int
        _description_
    **kwargs: Any
        _description_
    """

    def __init__(self, nargin: int, **kwargs: Any):
        if "symmetric" in kwargs:
            kwargs.pop("symmetric")
        if "matvec" in kwargs:
            kwargs.pop("matvec")

        super(IdentityOperator, self).__init__(
            nargin, nargin, symmetric=True, matvec=lambda x: x, **kwargs
        )