Mentions légales du service

Skip to content
Snippets Groups Projects
Commit cb487b60 authored by hhakim's avatar hhakim
Browse files

Add pyfaust.Faust.pinv().

It closes issue #55.
parent b438ce6e
No related branches found
No related tags found
No related merge requests found
......@@ -101,7 +101,8 @@ class Faust:
In this documentation, the expression 'full matrix' designates the array
Faust.toarray() obtained by the multiplication of the Faust factors.
List of functions that are memory costly: toarray(), todense().
List of functions that are memory costly: Faust.toarray(), Faust.todense(),
Faust.pinv().
For more information about FAµST take a look at http://faust.inria.fr.
"""
......@@ -1156,6 +1157,14 @@ class Faust:
plt.xticks([]); plt.yticks([])
plt.imshow(abs(fac),extent=[0,100,0,1], aspect='auto')
def pinv(F):
"""
Computes the (Moore-Penrose) pseudo-inverse of a Faust full matrix.
"""
from numpy.linalg.linalg import pinv
return pinv(F.toarray())
class FaustFactory:
"""
This factory class provides methods for generating a Faust especially by factorization of a dense matrix.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment