summaryrefslogtreecommitdiff
path: root/numpy/polynomial/polynomial.py
diff options
context:
space:
mode:
authorAnton Ritter-Gogerly <anton@antonviktor.com>2020-01-26 14:12:31 +1100
committerAnton Ritter-Gogerly <anton@antonviktor.com>2020-01-27 09:20:55 +1100
commit764c25bb8a9e5be60455ac7d6947318efbbb93aa (patch)
tree16f4f9b133ac94139f1abf398ef0dae55841f767 /numpy/polynomial/polynomial.py
parent9b7e890b014f6ad3b4288246f0565f7afd6eca84 (diff)
downloadnumpy-764c25bb8a9e5be60455ac7d6947318efbbb93aa.tar.gz
Updated files in polynomial/ to use fstrings
Diffstat (limited to 'numpy/polynomial/polynomial.py')
-rw-r--r--numpy/polynomial/polynomial.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/polynomial/polynomial.py b/numpy/polynomial/polynomial.py
index 94c722628..97f66a152 100644
--- a/numpy/polynomial/polynomial.py
+++ b/numpy/polynomial/polynomial.py
@@ -1481,10 +1481,10 @@ class Polynomial(ABCPolyBase):
@staticmethod
def _repr_latex_term(i, arg_str, needs_parens):
if needs_parens:
- arg_str = r'\left({}\right)'.format(arg_str)
+ arg_str = rf"\left({arg_str}\right)"
if i == 0:
return '1'
elif i == 1:
return arg_str
else:
- return '{}^{{{}}}'.format(arg_str, i)
+ return f"{arg_str}^{{{i}}}"