提交 b45337b5 authored 作者: Frederic Bastien's avatar Frederic Bastien

flake8 and skip test if no scipy

上级 73283bb2
......@@ -27,6 +27,7 @@ except (ImportError, ValueError):
class Erf(UnaryScalarOp):
nfunc_spec = ('scipy.special.erf', 1, 1)
def impl(self, x):
if imported_scipy_special:
return scipy.special.erf(x)
......@@ -146,6 +147,7 @@ class Erfinv(UnaryScalarOp):
(TODO) Find a C implementation of erfinv for CPU.
"""
nfunc_spec = ('scipy.special.erfinv', 1, 1)
def impl(self, x):
if imported_scipy_special:
return scipy.special.erfinv(x)
......
......@@ -2017,7 +2017,8 @@ def test_verify_jv_grad():
# Verify Jv gradient.
# Implemented separately due to need to fix first input for which grad is
# not defined.
if skip_scipy:
raise SkipTest("SciPy needed")
v_val, x_val = _grad_broadcast_binary_bessel['normal']
def fixed_first_input_jv(x):
......@@ -2084,6 +2085,8 @@ def test_verify_iv_grad():
# Verify Iv gradient.
# Implemented separately due to need to fix first input for which grad is
# not defined.
if skip_scipy:
raise SkipTest("SciPy needed")
v_val, x_val = _grad_broadcast_binary_bessel['normal']
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论