c3b9b054a6be1854cc9bc390af9d54fc9a4e66a3,hyperspy/tests/model/test_fitting.py,TestModelFitBinnedLeastSquares,setup_method,#TestModelFitBinnedLeastSquares#Any#,30
Before Change
@lazifyTestClass
class TestModelFitBinnedLeastSquares:
def setup_method(self, method):
np.random.seed(1)
s = hs.signals.Signal1D(np.random.normal(scale=2, size=10000)).get_histogram()
s.metadata.Signal.binned = True
g = hs.model.components1D.Gaussian()
self.m = s.create_model()
self.m.append(g)
g.sigma.value = 1
g.centre.value = 0.5
g.A.value = 1000
def _check_model_values(self, model, expected, **kwargs):
np.testing.assert_allclose(model.A.value, expected[0], **kwargs)
np.testing.assert_allclose(model.centre.value, expected[1], **kwargs)
After Change
@lazifyTestClass
class TestModelFitBinnedLeastSquares:
def setup_method(self, method):
self.m = _create_toy_1d_gaussian_model()
def _check_model_values(self, model, expected, **kwargs):
np.testing.assert_allclose(model.A.value, expected[0], **kwargs)
np.testing.assert_allclose(model.centre.value, expected[1], **kwargs)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 31
Instances
Project Name: hyperspy/hyperspy
Commit Name: c3b9b054a6be1854cc9bc390af9d54fc9a4e66a3
Time: 2020-07-22
Author: tjof2@cam.ac.uk
File Name: hyperspy/tests/model/test_fitting.py
Class Name: TestModelFitBinnedLeastSquares
Method Name: setup_method
Project Name: hyperspy/hyperspy
Commit Name: c3b9b054a6be1854cc9bc390af9d54fc9a4e66a3
Time: 2020-07-22
Author: tjof2@cam.ac.uk
File Name: hyperspy/tests/model/test_fitting.py
Class Name: TestModelFitBinnedLeastSquares
Method Name: setup_method
Project Name: hyperspy/hyperspy
Commit Name: c3b9b054a6be1854cc9bc390af9d54fc9a4e66a3
Time: 2020-07-22
Author: tjof2@cam.ac.uk
File Name: hyperspy/tests/model/test_fitting.py
Class Name: TestModelFitBinnedGlobal
Method Name: setup_method
Project Name: hyperspy/hyperspy
Commit Name: c3b9b054a6be1854cc9bc390af9d54fc9a4e66a3
Time: 2020-07-22
Author: tjof2@cam.ac.uk
File Name: hyperspy/tests/model/test_fitting.py
Class Name: TestModelFitBinnedScipyMinimize
Method Name: setup_method