Mentions légales du service

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

Review matfaust/pyfaust.eye doc.

parent 83507e9d
Branches
Tags
No related merge requests found
%========================================================================================== %==========================================================================================
%> @brief Faust identity. %> @brief Identity Faust.
%> %>
%> @b Usage %> @b Usage
%> %>
%> &nbsp;&nbsp;&nbsp; @b eye(m,n) or eye([m,n]) forms a M-by-N Faust F = Faust(speye(M,N)).<br/> %> &nbsp;&nbsp;&nbsp; @b eye(m,n) or eye([m,n]) forms a M-by-N Faust F = Faust(speye(M,N)).<br/>
%> &nbsp;&nbsp;&nbsp; @b eye(m) is a short for eye(m,m).<br/> %> &nbsp;&nbsp;&nbsp; @b eye(m) is a short for eye(m,m).<br/>
%> &nbsp;&nbsp;&nbsp; @b eye(S, 'complex') with S the size, does the same as above but returns a complex Faust.</br> %> &nbsp;&nbsp;&nbsp; @b eye(S, 'complex') with S the size, does the same as above but returns a complex Faust.<br/>
%> &nbsp;&nbsp;&nbsp; @b eye(S, 'complex', 'dev', 'gpu') or eye(S, 'dev', 'gpu') same as above but creates the Faust on GPU.</br> %> &nbsp;&nbsp;&nbsp; @b eye(S, 'complex', 'dev', 'gpu') or eye(S, 'dev', 'gpu') same as above but creates the Faust on GPU.<br/>
%> %>
%> @param 'dev', 'gpu or 'cpu' (optional) to create the Faust on CPU or GPU (by default on CPU). %> @param 'dev',str 'gpu or 'cpu' to create the Faust on CPU or GPU (by default on CPU).
%> @param 'dtype', 'double' (by default) or 'float' (optional) to select the scalar type used for the Faust generated. %> @param 'dtype',str 'double' (by default) or 'float' to select the scalar type used for the Faust generated.
%> %>
%> @b Example %> @b Example
%> %>
......
...@@ -2714,23 +2714,22 @@ def dft(n, normed=True, dev='cpu'): ...@@ -2714,23 +2714,22 @@ def dft(n, normed=True, dev='cpu'):
def eye(m, n=None, t='real', dev="cpu"): def eye(m, n=None, t='real', dev="cpu"):
""" """
Identity matrix as a Faust object. Faust identity.
Args: Args:
m: number of rows, m: number of rows,
n (optional): number of columns, set to m if not specified. n: number of columns, set to m by default.
t (optional): 'complex' to return a complex Faust otherwise (by default) t: 'complex' to return a complex Faust, otherwise it's a real Faust.
it's a real Faust.
Examples: Examples:
>>> from pyfaust import eye >>> from pyfaust import eye
>>> eye(5) >>> eye(5)
Faust size 5x5, density 0.2, nnz_sum 5, 1 factor(s):<br/> Faust size 5x5, density 0.2, nnz_sum 5, 1 factor(s):<br/>
FACTOR 0 (real) SPARSE, size 5x5, density 0.2, nnz 5<br/> FACTOR 0 (real) SPARSE, size 5x5, density 0.2, nnz 5<br/>
>>> eye(5,4) >>> eye(5, 4)
Faust size 5x4, density 0.2, nnz_sum 4, 1 factor(s):<br/> Faust size 5x4, density 0.2, nnz_sum 4, 1 factor(s):<br/>
FACTOR 0 (real) SPARSE, size 5x4, density 0.2, nnz 4<br/> FACTOR 0 (real) SPARSE, size 5x4, density 0.2, nnz 4<br/>
>>> eye(5,t='complex') >>> eye(5, t='complex')
Faust size 5x4, density 0.2, nnz_sum 4, 1 factor(s):<br/> Faust size 5x4, density 0.2, nnz_sum 4, 1 factor(s):<br/>
FACTOR 0 (complex) SPARSE, size 5x4, density 0.2, nnz 4<br/> FACTOR 0 (complex) SPARSE, size 5x4, density 0.2, nnz 4<br/>
""" """
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment