def test_3d_with_weights(self): lsq = leastsquare(self.data, self.model3D, np.ones(100), self.x, self.y, self.z) assert_almost_equal(lsq, self.lsq_exp)
def test_shape_mismatch(self): with pytest.raises(ValueError): leastsquare(0, self.model1D, None, self.x)
def test_3d_no_weights(self): lsq = leastsquare(self.data, self.model3D, None, self.x, self.y, self.z) assert_almost_equal(lsq, self.lsq_exp)