-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #97 from convexengineering/another_plotfit_fix
plotfit fix
- Loading branch information
Showing
3 changed files
with
36 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
"unit tests for gpfit.print_fit module" | ||
import unittest | ||
import numpy as np | ||
from gpfit.plot_fit import plot_fit_1d | ||
|
||
|
||
class TestPlotFit(unittest.TestCase): | ||
"Unit tests for plot_fit_1d" | ||
|
||
def test_plot_fit_1d(self): | ||
N = 51 | ||
U = np.logspace(0, np.log10(3), N) | ||
W = (U**2+3) / (U+1)**2 | ||
plot_fit_1d(U, W, K=2, fitclass='SMA', plotspace="linear") | ||
|
||
|
||
TESTS = [TestPlotFit] | ||
|
||
if __name__ == '__main__': | ||
SUITE = unittest.TestSuite() | ||
LOADER = unittest.TestLoader() | ||
|
||
for t in TESTS: | ||
SUITE.addTests(LOADER.loadTestsFromTestCase(t)) | ||
|
||
unittest.TextTestRunner(verbosity=2).run(SUITE) |