当前位置: 首页>>代码示例>>Python>>正文


Python arithmeticExpressions.Func类代码示例

本文整理汇总了Python中arithmeticExpressions.Func的典型用法代码示例。如果您正苦于以下问题:Python Func类的具体用法?Python Func怎么用?Python Func使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了Func类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_evaluated_variable_abs

 def test_evaluated_variable_abs(self):
     a1 = ALitteral(Variable('X'))
     absr = Func(a1, abs)
     self.assertEqual(absr.value(self.eval2), abs(pi))
开发者ID:mouton5000,项目名称:DiscreteEventApplicationEditor,代码行数:4,代码来源:testAbs.py

示例2: test_string_log_with_non_empty_evaluation

 def test_string_log_with_non_empty_evaluation(self):
     a1 = ALitteral('abc')
     logr = Func(a1, log)
     with self.assertRaises(TypeError):
         logr.value(self.eval2)
开发者ID:mouton5000,项目名称:DiscreteEventApplicationEditor,代码行数:5,代码来源:testLog.py

示例3: test_evaluated_variable_log

 def test_evaluated_variable_log(self):
     a1 = ALitteral(Variable('X'))
     logr = Func(a1, log)
     self.assertEqual(logr.value(self.eval2), log(pi))
开发者ID:mouton5000,项目名称:DiscreteEventApplicationEditor,代码行数:4,代码来源:testLog.py

示例4: test_integer_log_with_non_empty_evaluation

 def test_integer_log_with_non_empty_evaluation(self):
     a1 = ALitteral(1)
     logr = Func(a1, log)
     self.assertEqual(logr.value(self.eval2), log(1))
开发者ID:mouton5000,项目名称:DiscreteEventApplicationEditor,代码行数:4,代码来源:testLog.py

示例5: test_bad_integer_log_with_empty_evaluation

 def test_bad_integer_log_with_empty_evaluation(self):
     a1 = ALitteral(-1)
     logr = Func(a1, log)
     with self.assertRaises(ValueError):
         logr.value(self.eval1)
开发者ID:mouton5000,项目名称:DiscreteEventApplicationEditor,代码行数:5,代码来源:testLog.py

示例6: test_evaluated_variable_asinh

 def test_evaluated_variable_asinh(self):
     a1 = ALitteral(Variable('X'))
     expr = Func(a1, asinh)
     self.assertEqual(expr.value(self.eval2), asinh(pi))
开发者ID:mouton5000,项目名称:DiscreteEventApplicationEditor,代码行数:4,代码来源:testASh.py

示例7: test_self_litteral_asinh_with_non_empty_evaluation

 def test_self_litteral_asinh_with_non_empty_evaluation(self):
     a1 = SelfLitteral()
     expr = Func(a1, asinh)
     self.assertEqual(expr.value(self.eval2, pi), asinh(pi))
开发者ID:mouton5000,项目名称:DiscreteEventApplicationEditor,代码行数:4,代码来源:testASh.py

示例8: test_self_litteral_exp_with_empty_evaluation

 def test_self_litteral_exp_with_empty_evaluation(self):
     a1 = SelfLitteral()
     expr = Func(a1, exp)
     self.assertEqual(expr.value(self.eval1, pi), exp(pi))
开发者ID:mouton5000,项目名称:DiscreteEventApplicationEditor,代码行数:4,代码来源:testExp.py

示例9: test_integer_len_with_empty_evaluation

 def test_integer_len_with_empty_evaluation(self):
     a1 = ALitteral(1)
     expr = Func(a1, len)
     with self.assertRaises(TypeError):
         expr.value(self.eval1)
开发者ID:mouton5000,项目名称:DiscreteEventApplicationEditor,代码行数:5,代码来源:testLen.py

示例10: test_float_exp_with_non_empty_evaluation

 def test_float_exp_with_non_empty_evaluation(self):
     a1 = ALitteral(pi)
     expr = Func(a1, exp)
     self.assertEqual(expr.value(self.eval2), exp(pi))
开发者ID:mouton5000,项目名称:DiscreteEventApplicationEditor,代码行数:4,代码来源:testExp.py

示例11: test_string_exp_with_empty_evaluation

 def test_string_exp_with_empty_evaluation(self):
     a1 = ALitteral('abc')
     expr = Func(a1, exp)
     with self.assertRaises(TypeError):
         expr.value(self.eval1)
开发者ID:mouton5000,项目名称:DiscreteEventApplicationEditor,代码行数:5,代码来源:testExp.py

示例12: test_integer_exp_with_empty_evaluation

 def test_integer_exp_with_empty_evaluation(self):
     a1 = ALitteral(1)
     expr = Func(a1, exp)
     self.assertEqual(expr.value(self.eval1), exp(1))
开发者ID:mouton5000,项目名称:DiscreteEventApplicationEditor,代码行数:4,代码来源:testExp.py

示例13: test_self_litteral_abs_with_non_empty_evaluation

 def test_self_litteral_abs_with_non_empty_evaluation(self):
     a1 = SelfLitteral()
     absr = Func(a1, abs)
     self.assertEqual(absr.value(self.eval2, pi), abs(pi))
开发者ID:mouton5000,项目名称:DiscreteEventApplicationEditor,代码行数:4,代码来源:testAbs.py

示例14: test_unevaluated_variable_abs

 def test_unevaluated_variable_abs(self):
     a1 = ALitteral(Variable('Y'))
     absr = Func(a1, abs)
     with self.assertRaises(ValueError):
         absr.value(self.eval2)
开发者ID:mouton5000,项目名称:DiscreteEventApplicationEditor,代码行数:5,代码来源:testAbs.py

示例15: test_string_asinh_with_non_empty_evaluation

 def test_string_asinh_with_non_empty_evaluation(self):
     a1 = ALitteral('abc')
     expr = Func(a1, asinh)
     with self.assertRaises(TypeError):
         expr.value(self.eval2)
开发者ID:mouton5000,项目名称:DiscreteEventApplicationEditor,代码行数:5,代码来源:testASh.py


注:本文中的arithmeticExpressions.Func类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。