Ejemplo n.º 1
0
 def setup_class(cls):
     x0 = np.linspace(-0.2, 0.2, 11)
     cls.params = np.column_stack((x0, x0))
     cls.pen = smpen.L2()
Ejemplo n.º 2
0
 def test_deprecated_priority(self):
     weights = [1.0]
     pen = smpen.L2(weights=weights)
     assert_equal(pen.weights, weights)
Ejemplo n.º 3
0
 def test_weights_assignment(self):
     weights = [1.0, 2.0]
     pen = smpen.L2(weights=weights)
     assert_equal(pen.weights, weights)
Ejemplo n.º 4
0
 def test_backward_compatibility(self):
     wts = [0.5]
     pen = smpen.L2(weights=wts)
     assert_equal(pen.weights, wts)