Mentions légales du service

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

Add uncomplete doc for both pyfaust and matfaust Faust.normalize().

parent c3076ec4
Branches
Tags
No related merge requests found
......@@ -1397,6 +1397,18 @@ classdef Faust
end
%===============================================================================
%> Normalized F.
%===
%> @b Usage
%>
%> &nbsp;&nbsp;&nbsp; @b normalize(F,'norm') normalizes columns with vector 2-norm.<br/>
%> &nbsp;&nbsp;&nbsp; @b normalize(F,'norm',p) normalizes columns with vector p-norm (see Faust.norm).<br/>
%> &nbsp;&nbsp;&nbsp; @b normalize(F,DIM,'norm') normalizes rows (DIM=1) or columns (DIM=2, default) with vector 2-norm.<br/>
%> &nbsp;&nbsp;&nbsp; @b normalize(F,DIM,'norm',p) normalizes rows (DIM=1) or columns (DIM=2, default) with vector p-norm.<br/>
%>
%> <p>@b See @b also Faust.norm
%===============================================================================
function NF = normalize(F, varargin)
nargs = length(varargin);
dim = 2;
......
......@@ -1080,6 +1080,16 @@ class Faust:
def normalize(F, ord='fro', axis=1):
"""
Normalize F along the axis dimension using the ord-norm.
Args:
ord: the norm order to use (see Faust.norm).
axis: if 1 the columns are normalized, if 0 the rows.
Returns:
the normalized Faust
<b/> See also: Faust.norm
"""
if(ord not in [1, 2, np.inf, "fro"]):
raise ValueError("ord must have the value 1, 2, 'fro' or "
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment