diff --git a/examples/analysis.py b/examples/analysis.py index 8075444..894b597 100644 --- a/examples/analysis.py +++ b/examples/analysis.py @@ -1,8 +1,12 @@ -from sdft import SDFT +import os, sys +src = os.path.join(os.path.dirname(__file__), '..', 'src', 'python') +sys.path.insert(0, src) import matplotlib.pyplot as plot import numpy as np +from sdft import SDFT + def phase(t, f): diff --git a/examples/latency.py b/examples/latency.py index 94da194..4040c9c 100644 --- a/examples/latency.py +++ b/examples/latency.py @@ -1,8 +1,12 @@ -from sdft import SDFT +import os, sys +src = os.path.join(os.path.dirname(__file__), '..', 'src', 'python') +sys.path.insert(0, src) import matplotlib.pyplot as plot import numpy as np +from sdft import SDFT + def signal(n): diff --git a/test/main.py b/test/main.py index 168c718..5287f1d 100644 --- a/test/main.py +++ b/test/main.py @@ -1,9 +1,8 @@ -import numpy as np -import os -import sys +import os, sys +src = os.path.join(os.path.dirname(__file__), '..', 'src', 'python') +sys.path.insert(0, src) -sys.path.insert(0, os.path.join( - os.path.dirname(__file__), '..', 'src', 'python')) +import numpy as np from plot import spectrogram, figure, show from sdft import STFT diff --git a/test/test.py b/test/test.py index ee97095..173c813 100644 --- a/test/test.py +++ b/test/test.py @@ -1,9 +1,8 @@ -import numpy as np -import os -import sys +import os, sys +src = os.path.join(os.path.dirname(__file__), '..', 'src', 'python') +sys.path.insert(0, src) -sys.path.insert(0, os.path.join( - os.path.dirname(__file__), '..', 'src', 'python')) +import numpy as np from sdft import SDFT from wav import readwav, writewav