为什么≈(isapprox)在版本1.2中不能与atol参数一起使用

时间:2019-10-19 12:52:25

标签: julia

Julia文档中有一个unit test example

using Test
@test π ≈ 3.14 atol=0.01

当我在当前版本为1.0.3的Juliabox中运行时,测试通过。

当我在使用Julia版本1.2的Windows 10计算机上运行它时,我得到:

Error During Test at In[25]:2
  Test threw exception
  Expression: ≈(π, 3.14, atol=0.01)
  function ≈ does not accept keyword arguments

@test ≈(π, 3.14, atol=0.01)给出相同的结果。

0 个答案:

没有答案