diff --git a/orbitize/system.py b/orbitize/system.py index 1da30d3f..ec085ec4 100644 --- a/orbitize/system.py +++ b/orbitize/system.py @@ -555,7 +555,9 @@ def compute_all_orbits(self, params_arr, epochs=None, comp_rebound=False): if self.fitting_basis == "XYZ": # Find and filter out unbound orbits - bad_orbits = np.where(np.logical_or(ecc >= 1.0, ecc < 0.0))[0] + if ecc.size == 1: + ecc_as_array = np.array([ecc]) + bad_orbits = np.where(np.logical_or(ecc_as_array >= 1.0, ecc_as_array < 0.0))[0] if bad_orbits.size != 0: raoff[:, :, bad_orbits] = np.inf deoff[:, :, bad_orbits] = np.inf