summaryrefslogtreecommitdiff
path: root/numpy/polynomial/polynomial.py
diff options
context:
space:
mode:
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}}}"