Skip to content

Commit 6a82d75

Browse files
committed
exception for optional scipy import
1 parent 0d57280 commit 6a82d75

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

padasip/detection/__init__.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,13 @@
3232
"""
3333
from padasip.detection.le import learning_entropy
3434
from padasip.detection.elbnd import ELBND
35-
from padasip.detection.ese import ESE
35+
36+
37+
def ese_not_imported(*args, **kwargs):
38+
raise ImportError('You have to install scipy package in order to use ESE.')
39+
40+
try:
41+
from padasip.detection.ese import ESE
42+
except ImportError:
43+
ESE = ese_not_imported
3644

padasip/detection/ese.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@
7474
"""
7575
import numpy as np
7676
from scipy.stats import genpareto
77-
import math
7877

7978
def pot(data, method):
8079
"""

padasip/filters/ocnlms.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
"""
2-
.. versionadded::
3-
.. versionchanged::
2+
.. versionadded:: 1.2.0
43
54
The online-centered normalized least-mean-squares (OCNLMS) adaptive filter
65
(proposed in https://doi.org/10.14311/nnw.2021.31.019)

0 commit comments

Comments
 (0)