Skip to content

Commit

Permalink
updated docstring examples for hpss
Browse files Browse the repository at this point in the history
  • Loading branch information
bmcfee committed Aug 16, 2016
1 parent 33eca06 commit 39e283b
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions librosa/decompose.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,18 +297,17 @@ def hpss(S, kernel_size=31, power=2.0, mask=False, margin=1.0):
>>> mask_H, mask_P = librosa.decompose.hpss(D, mask=True)
>>> mask_H
array([[ 1., 0., ..., 0., 0.],
[ 1., 0., ..., 0., 0.],
array([[ 1.000e+00, 1.469e-01, ..., 2.648e-03, 2.164e-03],
[ 1.000e+00, 2.368e-01, ..., 9.413e-03, 7.703e-03],
...,
[ 0., 0., ..., 0., 0.],
[ 0., 0., ..., 0., 0.]])
[ 8.869e-01, 5.673e-02, ..., 4.603e-02, 1.247e-05],
[ 7.068e-01, 2.194e-02, ..., 4.453e-02, 1.205e-05]], dtype=float32)
>>> mask_P
array([[ 0., 1., ..., 1., 1.],
[ 0., 1., ..., 1., 1.],
array([[ 2.858e-05, 8.531e-01, ..., 9.974e-01, 9.978e-01],
[ 1.586e-05, 7.632e-01, ..., 9.906e-01, 9.923e-01],
...,
[ 1., 1., ..., 1., 1.],
[ 1., 1., ..., 1., 1.]])
[ 1.131e-01, 9.433e-01, ..., 9.540e-01, 1.000e+00],
[ 2.932e-01, 9.781e-01, ..., 9.555e-01, 1.000e+00]], dtype=float32)
Separate into harmonic/percussive/residual components by using a margin > 1.0
Expand Down

0 comments on commit 39e283b

Please sign in to comment.