diff --git a/pints/_abc/__init__.py b/pints/_abc/__init__.py index 9982bcdec..580589744 100644 --- a/pints/_abc/__init__.py +++ b/pints/_abc/__init__.py @@ -37,7 +37,7 @@ def tell(self, x): raise NotImplementedError -class ABCController(object): +class ABCController(): """ Samples from a :class:`pints.LogPrior`. diff --git a/pints/_boundaries.py b/pints/_boundaries.py index d5c8c18d0..0e8b82c0c 100644 --- a/pints/_boundaries.py +++ b/pints/_boundaries.py @@ -9,7 +9,7 @@ import numpy as np -class Boundaries(object): +class Boundaries(): """ Abstract class representing boundaries on a parameter space. """ diff --git a/pints/_core.py b/pints/_core.py index 620fbf279..86f966a2e 100644 --- a/pints/_core.py +++ b/pints/_core.py @@ -9,7 +9,7 @@ import pints -class ForwardModel(object): +class ForwardModel(): """ Defines an interface for user-supplied forward models. @@ -99,7 +99,7 @@ def simulateS1(self, parameters, times): raise NotImplementedError -class SingleOutputProblem(object): +class SingleOutputProblem(): """ Represents an inference problem where a model is fit to a single time @@ -210,7 +210,7 @@ def values(self): return self._values -class MultiOutputProblem(object): +class MultiOutputProblem(): """ Represents an inference problem where a model is fit to a multi-valued time @@ -327,7 +327,7 @@ def values(self): return self._values -class TunableMethod(object): +class TunableMethod(): """ Defines an interface for a numerical method with a given number of diff --git a/pints/_error_measures.py b/pints/_error_measures.py index 0017d075b..8d691906f 100644 --- a/pints/_error_measures.py +++ b/pints/_error_measures.py @@ -9,7 +9,7 @@ import numpy as np -class ErrorMeasure(object): +class ErrorMeasure(): """ Abstract base class for objects that calculate some scalar measure of goodness-of-fit (for a model and a data set), such that a smaller value diff --git a/pints/_evaluation.py b/pints/_evaluation.py index 26c991363..81b4fea77 100644 --- a/pints/_evaluation.py +++ b/pints/_evaluation.py @@ -60,7 +60,7 @@ def evaluate(f, x, parallel=False, args=None): return evaluator.evaluate(x) -class Evaluator(object): +class Evaluator(): """ Abstract base class for classes that take a function (or callable object) ``f(x)`` and evaluate it for list of input values ``x``. diff --git a/pints/_log_pdfs.py b/pints/_log_pdfs.py index 6139368f3..590bb095b 100644 --- a/pints/_log_pdfs.py +++ b/pints/_log_pdfs.py @@ -8,7 +8,7 @@ import numpy as np -class LogPDF(object): +class LogPDF(): """ Represents the natural logarithm of a (not necessarily normalised) probability density function (PDF). diff --git a/pints/_logger.py b/pints/_logger.py index 709213c23..22900a18e 100644 --- a/pints/_logger.py +++ b/pints/_logger.py @@ -17,7 +17,7 @@ _TEXT = 4 -class Logger(object): +class Logger(): """ Logs numbers to screen and/or a file. @@ -467,7 +467,7 @@ def _format_time(self, seconds): return '{:>3d}:{:0>4.1f}'.format(minutes, seconds) -class Loggable(object): +class Loggable(): """ Interface for classes that can log to a :class:`Logger`. """ diff --git a/pints/_mcmc/__init__.py b/pints/_mcmc/__init__.py index 24913e091..287175dd7 100644 --- a/pints/_mcmc/__init__.py +++ b/pints/_mcmc/__init__.py @@ -239,7 +239,7 @@ def tell(self, fxs): raise NotImplementedError -class MCMCController(object): +class MCMCController(): """ Samples from a :class:`pints.LogPDF` using a Markov Chain Monte Carlo (MCMC) method. diff --git a/pints/_mcmc/_dual_averaging.py b/pints/_mcmc/_dual_averaging.py index 979682c17..f220d8b33 100644 --- a/pints/_mcmc/_dual_averaging.py +++ b/pints/_mcmc/_dual_averaging.py @@ -9,7 +9,7 @@ import numpy as np -class DualAveragingAdaption(object): +class DualAveragingAdaption(): r""" Dual Averaging method to adaptively tune the step size and mass matrix of a Hamiltonian Monte Carlo (HMC) routine (as used e.g. in NUTS). diff --git a/pints/_mcmc/_nuts.py b/pints/_mcmc/_nuts.py index a1fb3c9c8..ec028b4c5 100644 --- a/pints/_mcmc/_nuts.py +++ b/pints/_mcmc/_nuts.py @@ -11,7 +11,7 @@ import numpy as np -class NutsState(object): +class NutsState(): """ Class to hold information about the current state of the NUTS hamiltonian integration path. diff --git a/pints/_mcmc/_summary.py b/pints/_mcmc/_summary.py index 4970cdd57..5787cc742 100644 --- a/pints/_mcmc/_summary.py +++ b/pints/_mcmc/_summary.py @@ -13,7 +13,7 @@ from tabulate import tabulate -class MCMCSummary(object): +class MCMCSummary(): """ Calculates and prints key summaries of posterior samples and diagnostic quantities from MCMC chains. diff --git a/pints/_nested/__init__.py b/pints/_nested/__init__.py index 93c26e92d..f837cb033 100644 --- a/pints/_nested/__init__.py +++ b/pints/_nested/__init__.py @@ -227,7 +227,7 @@ def tell(self, fx): return proposed, winners -class NestedController(object): +class NestedController(): """ Uses nested sampling to sample from a posterior distribution. diff --git a/pints/_optimisers/__init__.py b/pints/_optimisers/__init__.py index cedc2213f..06ce225ac 100644 --- a/pints/_optimisers/__init__.py +++ b/pints/_optimisers/__init__.py @@ -336,7 +336,7 @@ def set_hyper_parameters(self, x): self.set_population_size(x[0]) -class OptimisationController(object): +class OptimisationController(): """ Finds the parameter values that minimise an :class:`ErrorMeasure` or maximise a :class:`LogPDF`. diff --git a/pints/_transformation.py b/pints/_transformation.py index 2162a92bd..bfcee66a6 100644 --- a/pints/_transformation.py +++ b/pints/_transformation.py @@ -10,7 +10,7 @@ from scipy.special import logit, expit -class Transformation(object): +class Transformation(): """ Abstract base class for objects that provide transformations between two parameter spaces: the model parameter space and a search space. diff --git a/pints/_util.py b/pints/_util.py index 5238c6532..4dceb9aec 100644 --- a/pints/_util.py +++ b/pints/_util.py @@ -17,7 +17,7 @@ def strfloat(x): return pints.FLOAT_FORMAT.format(float(x)) -class Timer(object): +class Timer(): """ Provides accurate timing. diff --git a/pints/tests/shared.py b/pints/tests/shared.py index cbc14fd52..a3d12f25e 100644 --- a/pints/tests/shared.py +++ b/pints/tests/shared.py @@ -15,7 +15,7 @@ import pints -class StreamCapture(object): +class StreamCapture(): """ A context manager that redirects and captures the output stdout, stderr, or both. @@ -131,7 +131,7 @@ def text(self): return self._stderr_captured # Could be None -class SubCapture(object): +class SubCapture(): """ A context manager that redirects and captures the standard and error output of the current process, using low-level file descriptor duplication.