Exemplo n.º 1
0
 def test_scalar_algebra(self):
     a = self._check_algebra(ScalarAlgebra())
     self.assertEqual(type(a), AD)
Exemplo n.º 2
0
 def test_scalar_algebra(self):
     xv, e_xv = self._check_algebra(ScalarAlgebra())
     self.assertIsInstance(xv, sym.Variable)
     self.assertIsInstance(e_xv, sym.Expression)
Exemplo n.º 3
0
 def test_scalar_algebra(self):
     xv, e_xv = self._check_algebra(
         ScalarAlgebra(self._check_scalar,
                       scalar_to_float=lambda x: x.Evaluate()))
     self.assertIsInstance(xv, sym.Variable)
     self.assertIsInstance(e_xv, sym.Expression)
Exemplo n.º 4
0
 def test_scalar_algebra(self):
     a = self._check_algebra(
         ScalarAlgebra(self._check_scalar,
                       scalar_to_float=lambda x: x.value()))
     self.assertEqual(type(a), AD)