From 627b7083775dce88fa8f42acb36221d242d38de9 Mon Sep 17 00:00:00 2001 From: pbrod Date: Sun, 15 Jan 2017 13:51:34 +0100 Subject: [PATCH] Simplified code --- wafo/stats/estimation.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/wafo/stats/estimation.py b/wafo/stats/estimation.py index 464cea7..a1b879d 100644 --- a/wafo/stats/estimation.py +++ b/wafo/stats/estimation.py @@ -11,8 +11,8 @@ from __future__ import division, absolute_import import warnings from wafo.plotbackend import plotbackend as plt -from wafo.misc import ecross, findcross, argsreduce -from wafo.stats._constants import _EPS, _XMAX, _XMIN +from wafo.misc import ecross, findcross +from wafo.stats._constants import _EPS from wafo.stats._distn_infrastructure import rv_frozen, rv_continuous from scipy._lib.six import string_types import numdifftools as nd # @UnresolvedImport @@ -1121,7 +1121,6 @@ class FitDistribution(rv_frozen): def _nnlf(self, theta, x): return self.dist._penalized_nnlf(theta, x) - def _nlogps(self, theta, x): """ Moran's negative log Product Spacings statistic @@ -1155,7 +1154,7 @@ class FitDistribution(rv_frozen): # convert string to function in scipy.optimize if not callable(optimizer) and isinstance(optimizer, string_types): if not optimizer.startswith('fmin_'): - optimizer = '_'.join(("fmin_", optimizer)) + optimizer = '_'.join(("fmin", optimizer)) try: optimizer = getattr(optimize, optimizer) except AttributeError: