Mentions légales du service

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

Update pyfaust.Faust.imshow() as asked by #102.

It closes #102.
parent 3ee8947c
Branches
Tags
No related merge requests found
...@@ -97,7 +97,7 @@ class Faust: ...@@ -97,7 +97,7 @@ class Faust:
use filepath you must explicitely set argument with the keyword. use filepath you must explicitely set argument with the keyword.
Examples: Examples:
>>> from pyfaust import FaustFactory, Faust >>> from pyfaust import Faust
>>> import numpy as np >>> import numpy as np
>>> from scipy import sparse >>> from scipy import sparse
>>> factors = [] >>> factors = []
...@@ -1488,7 +1488,7 @@ class Faust: ...@@ -1488,7 +1488,7 @@ class Faust:
if(not isinstance(fac, np.ndarray)): if(not isinstance(fac, np.ndarray)):
fac = fac.toarray() fac = fac.toarray()
plt.xticks([]); plt.yticks([]) plt.xticks([]); plt.yticks([])
plt.suptitle('Faust '+ name +'\'s factors') plt.suptitle('Factors of the Faust '+ name)
if(fac.dtype == np.complex): if(fac.dtype == np.complex):
plt.imshow(abs(fac),aspect='equal') plt.imshow(abs(fac),aspect='equal')
else: else:
...@@ -1530,7 +1530,7 @@ def faust_fact(*args, **kwargs): ...@@ -1530,7 +1530,7 @@ def faust_fact(*args, **kwargs):
""" """
This function is a shorthand for pyfaust.fact.hierarchical. This function is a shorthand for pyfaust.fact.hierarchical.
<b/> See also FaustFactory.fact_hierarchical <b/> See also pyfaust.fact.hierarchical
""" """
import pyfaust.fact import pyfaust.fact
return pyfaust.fact.hierarchical(*args, **kwargs) return pyfaust.fact.hierarchical(*args, **kwargs)
...@@ -1634,7 +1634,7 @@ def isFaust(obj): ...@@ -1634,7 +1634,7 @@ def isFaust(obj):
Returns True if obj is a Faust object, False otherwise. Returns True if obj is a Faust object, False otherwise.
Examples: Examples:
>>> from pyfaust import isFaust, FaustFactory >>> from pyfaust import isFaust
>>> isFaust(2) >>> isFaust(2)
False False
>>> isFaust(rand(5,10)) >>> isFaust(rand(5,10))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment