Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pints/_abc/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def tell(self, x):
raise NotImplementedError


class ABCController(object):
class ABCController():
"""
Samples from a :class:`pints.LogPrior`.

Expand Down
2 changes: 1 addition & 1 deletion pints/_boundaries.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import numpy as np


class Boundaries(object):
class Boundaries():
"""
Abstract class representing boundaries on a parameter space.
"""
Expand Down
8 changes: 4 additions & 4 deletions pints/_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import pints


class ForwardModel(object):
class ForwardModel():

"""
Defines an interface for user-supplied forward models.
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pints/_error_measures.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pints/_evaluation.py
Original file line number Diff line number Diff line change
Expand Up @@ -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``.
Expand Down
2 changes: 1 addition & 1 deletion pints/_log_pdfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
4 changes: 2 additions & 2 deletions pints/_logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
_TEXT = 4


class Logger(object):
class Logger():
"""
Logs numbers to screen and/or a file.

Expand Down Expand Up @@ -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`.
"""
Expand Down
2 changes: 1 addition & 1 deletion pints/_mcmc/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion pints/_mcmc/_dual_averaging.py
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
2 changes: 1 addition & 1 deletion pints/_mcmc/_nuts.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion pints/_mcmc/_summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion pints/_nested/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion pints/_optimisers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down
2 changes: 1 addition & 1 deletion pints/_transformation.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion pints/_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def strfloat(x):
return pints.FLOAT_FORMAT.format(float(x))


class Timer(object):
class Timer():
"""
Provides accurate timing.

Expand Down
4 changes: 2 additions & 2 deletions pints/tests/shared.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import pints


class StreamCapture(object):
class StreamCapture():
"""
A context manager that redirects and captures the output stdout, stderr,
or both.
Expand Down Expand Up @@ -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.
Expand Down