diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2022-01-11 11:04:43 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-11 11:04:43 -0700 |
commit | 879ec4100214f92877f148230c6cfec6dd2ecb99 (patch) | |
tree | 4034ebb58fb6557ed7a8bff0a7387d5f567e50aa /numpy | |
parent | 313b02db79f09ca976ee7e78b2e79c1e335cff52 (diff) | |
parent | 9cdc23720a594384125ffbf6e1ef381a3b8310bc (diff) | |
download | numpy-879ec4100214f92877f148230c6cfec6dd2ecb99.tar.gz |
Merge pull request #20786 from melissawm/f2py-scipy-docs
BUG, DOC: Fixes SciPy docs build warnings
Diffstat (limited to 'numpy')
-rw-r--r-- | numpy/f2py/symbolic.py | 2 | ||||
-rw-r--r-- | numpy/f2py/tests/test_symbolic.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/numpy/f2py/symbolic.py b/numpy/f2py/symbolic.py index 1b7b35458..c2ab0f140 100644 --- a/numpy/f2py/symbolic.py +++ b/numpy/f2py/symbolic.py @@ -381,7 +381,7 @@ class Expr: language=language) for a in self.data] if language is Language.C: - r = f'({cond} ? {expr1} : {expr2})' + r = f'({cond}?{expr1}:{expr2})' elif language is Language.Python: r = f'({expr1} if {cond} else {expr2})' elif language is Language.Fortran: diff --git a/numpy/f2py/tests/test_symbolic.py b/numpy/f2py/tests/test_symbolic.py index e8dec72f0..845278311 100644 --- a/numpy/f2py/tests/test_symbolic.py +++ b/numpy/f2py/tests/test_symbolic.py @@ -201,7 +201,7 @@ class TestSymbolic(util.F2PyTest): assert (x + (x - y) / (x + y) + n).tostring(language=language) == "123 + x + (x - y) / (x + y)" - assert as_ternary(x, y, z).tostring(language=language) == "(x ? y : z)" + assert as_ternary(x, y, z).tostring(language=language) == "(x?y:z)" assert as_eq(x, y).tostring(language=language) == "x == y" assert as_ne(x, y).tostring(language=language) == "x != y" assert as_lt(x, y).tostring(language=language) == "x < y" |