Mentions légales du service

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

Add the function pyfaust/matfaust.Faust.isFaust().

It closes issue #40.
parent 493f1f7e
Branches
Tags
No related merge requests found
......@@ -1758,6 +1758,15 @@ classdef Faust
end
methods(Static)
%================================================================
%> Returns true if obj is a Faust object, false otherwise.
%===
%>
%> <p> @b See @b also Faust.Faust
%================================================================
function bool = isFaust(obj)
bool = isa(obj, 'matfaust.Faust');
end
end
end
......@@ -1218,6 +1218,14 @@ class Faust:
from numpy.linalg.linalg import pinv
return pinv(F.toarray())
@staticmethod
def isFaust(obj):
"""
Returns True if obj is a Faust object, False otherwise.
"""
return isinstance(obj, Faust)
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