diff --git a/isochrones/starmodel.py b/isochrones/starmodel.py index 01305cf..45fa62c 100644 --- a/isochrones/starmodel.py +++ b/isochrones/starmodel.py @@ -786,6 +786,11 @@ def _make_samples(self): if not self.use_emcee: chain = np.loadtxt('{}post_equal_weights.dat'.format(self._mnest_basename)) + + #for purposes of unit test, sometimes there will be 1-length chain... + if chain.ndim==1: + chain = np.array([chain]) + mass = chain[:,0] age = chain[:,1] feh = chain[:,2] @@ -1353,6 +1358,11 @@ def _make_samples(self): if not self.use_emcee: chain = np.loadtxt('{}post_equal_weights.dat'.format(self._mnest_basename)) + + #for purposes of unit test, sometimes there will be 1-length chain... + if chain.ndim==1: + chain = np.array([chain]) + mass_A = chain[:,0] mass_B = chain[:,1] age = chain[:,2] @@ -1698,6 +1708,11 @@ def _make_samples(self): if not self.use_emcee: chain = np.loadtxt('{}post_equal_weights.dat'.format(self._mnest_basename)) + + #for purposes of unit test, sometimes there will be 1-length chain... + if chain.ndim==1: + chain = np.array([chain]) + mass_A = chain[:,0] mass_B = chain[:,1] mass_C = chain[:,2]