From 20e4e0652a283e9e5105ed9454441c013ff48294 Mon Sep 17 00:00:00 2001 From: pbrod Date: Mon, 16 Jan 2017 01:49:47 +0100 Subject: [PATCH] Replaced string interpolation operator with 'format()' --- wafo/stats/_distn_infrastructure.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wafo/stats/_distn_infrastructure.py b/wafo/stats/_distn_infrastructure.py index 990c630..11f7566 100644 --- a/wafo/stats/_distn_infrastructure.py +++ b/wafo/stats/_distn_infrastructure.py @@ -208,9 +208,9 @@ def _convert_fshapes2num(self, kwds): for j, s in enumerate(shapes): val = kwds.pop('f' + s, None) or kwds.pop('fix_' + s, None) if val is not None: - key = 'f%d' % j + key = 'f{0:d}'.format(j) if key in kwds: - raise ValueError("Duplicate entry for %s." % key) + raise ValueError("Duplicate entry for {0:s}.".format(key)) else: kwds[key] = val return kwds @@ -413,7 +413,7 @@ def _fit(self, data, *args, **kwargs): # by now kwds must be empty, since everybody took what they needed if kwds: - raise TypeError("Unknown arguments: %s." % kwds) + raise TypeError("Unknown arguments: {}.".format(kwds)) output = optimizer(func, x0, args=(ravel(data),), full_output=True, disp=0)