Пример #1
0
 def test_param_copy(self):
     """Test the copy function for Parameters.
     """
     x = Parameter((3, 4), name="x", nonneg=True)
     y = x.copy()
     self.assertEqual(y.shape, (3, 4))
     self.assertEqual(y.name(), "x")
     self.assertEqual(y.sign, "NONNEGATIVE")
Пример #2
0
 def test_param_copy(self):
     """Test the copy function for Parameters.
     """
     x = Parameter(3, 4, name="x", sign="positive")
     y = x.copy()
     self.assertEquals(y.size, (3, 4))
     self.assertEquals(y.name(), "x")
     self.assertEquals(y.sign, "POSITIVE")
Пример #3
0
 def test_param_copy(self):
     """Test the copy function for Parameters.
     """
     x = Parameter(3, 4, name="x", sign="positive")
     y = x.copy()
     self.assertEqual(y.size, (3, 4))
     self.assertEqual(y.name(), "x")
     self.assertEqual(y.sign, "POSITIVE")