-  3.39.25
pyfaust.proj.proj_id Class Reference

Functor for the identity projector. More...

Public Member Functions

def __init__ (self, shape)
- Public Member Functions inherited from pyfaust.proj.proj_gen
def __call__ (self, M)

Public Attributes

- Public Attributes inherited from pyfaust.proj.proj_gen

Detailed Description

Functor for the identity projector.

This projector simply returns the same array as the one passed as argument.

It's not useless for example in PALM4MSA (pyfaust.fact.palm4msa, pyfaust.fact.hierarchical) it might serve to avoid any constraint on a factor.


>>> from pyfaust.proj import proj_id
>>> from numpy import allclose
>>> from numpy.random import rand
>>> M = rand(5,5)
>>> p = proj_id(M.shape)
>>> allclose(p(M), M)

Constructor & Destructor Documentation

◆ __init__()

def pyfaust.proj.proj_id.__init__ (   self,
shape(tuple(int,int)) the size of the input matrix.

Reimplemented from pyfaust.proj.proj_gen.

Member Data Documentation

◆ constraint


The documentation for this class was generated from the following file:
def rand(num_rows, num_cols, num_factors=None, dim_sizes=None, density=None, fac_type='sparse', per_row=True, dev='cpu', dtype='float64', field=None, seed=0)
Generates a random Faust.
Definition: __init__.py:5016
This module provides matrix projectors.
Definition: proj.py:1