From e4915c2f7f8b52e6edd0488c61d301b8a3a192b2 Mon Sep 17 00:00:00 2001 From: Andrew Hearin Date: Mon, 23 Apr 2018 20:29:05 -0500 Subject: [PATCH] Added bug fix suggested by @johannesulf in Issue #900 --- .../subhalo_based_models/subhalo_phase_space.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/halotools/empirical_models/phase_space_models/subhalo_based_models/subhalo_phase_space.py b/halotools/empirical_models/phase_space_models/subhalo_based_models/subhalo_phase_space.py index 45bc5b88c..b4e0c3b7c 100644 --- a/halotools/empirical_models/phase_space_models/subhalo_based_models/subhalo_phase_space.py +++ b/halotools/empirical_models/phase_space_models/subhalo_based_models/subhalo_phase_space.py @@ -351,8 +351,8 @@ def _sign_pbc(x1, x2, period=None, equality_fill_val=0., return_pbc_correction=F try: assert np.all(x1 >= 0) assert np.all(x2 >= 0) - assert np.all(x1 < period) - assert np.all(x2 < period) + assert np.all(x1 <= period) + assert np.all(x2 <= period) except AssertionError: msg = "If period is not None, all values of x and y must be between [0, period)" raise ValueError(msg)