Repository: pints-team/pints (language: python)

Issue:
Typo in RectangularBoundariesTransformation docs
https://github.com/pints-team/pints/blob/a6a1a39c322c8419ff929b82f73ed3f7aa8b72ef/pints/_transformation.py#L708-L723


Discussion / hints:

Fix patch:
diff --git a/pints/_transformation.py b/pints/_transformation.py
index 350b39258..ea91101d6 100644
--- a/pints/_transformation.py
+++ b/pints/_transformation.py
@@ -708,19 +708,18 @@ def to_search(self, p):
 class RectangularBoundariesTransformation(Transformation):
     r"""
     A generalised version of the logit transformation for the model parameters,
-    which transform an interval or rectangular boundaries :math:`[a, b)` to
+    which transforms an interval or rectangular boundaries :math:`[a, b)` to
     all real number.
 
     The transformation is given by
 
     .. math::
-        q = f(p) = \text{logit}\left(\frac{p - a}{b - a}\right)
+        q = f(p) = \text{logit}\left(\frac{p - a}{b - p}\right)
                  = \log(p - a) - \log(b - p),
 
     where :math:`p` is the model parameter vector and :math:`q` is the
-    search space vector. The range includes the lower (:math:`a`), but not the
-    upper (:math:`b`) boundaries. Note that :class:`LogitTransformation` is a
-    special case where :math:`a = 0` and :math:`b = 1`.
+    search space vector. Note that :class:`LogitTransformation` is a special
+    case where :math:`a = 0` and :math:`b = 1`.
 
     The Jacobian adjustment of the transformation is given by
 


Test patch:
diff --git a/pints/tests/test_transformation.py b/pints/tests/test_transformation.py
index 8ecc53509..5c78462b5 100755
--- a/pints/tests/test_transformation.py
+++ b/pints/tests/test_transformation.py
@@ -157,7 +157,7 @@ def test_jacobian_S1(self):
 
     def test_log_jacobian_det(self):
         # Test log-Jacobian determinant
-        self.assertEqual(self.t.log_jacobian_det(self.x), self.log_j_det)
+        self.assertAlmostEqual(self.t.log_jacobian_det(self.x), self.log_j_det)
 
     def test_log_jacobian_det_S1(self):
         # Test log-Jacobian determinant derivatives