I'm trying to produce the MargeStats for a run I made with COBAYA, with 4 chains:
Code: Select all
sample = loadMCSamples('path/to/chains/CLASS', no_cache=True)
MargeStats = sample.getMargeStats()
Code: Select all
/path/to/cobaya/getdist/mcsamples.py:1416: RuntimeWarning: invalid value encountered in cast
ix = ((paramVec - binmin) / fine_width + 0.5).astype(int)
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
Cell In[3], line 1
----> 1 MargeStats = sample_SPT.getMargeStats()
File /path/to/cobaya/getdist/mcsamples.py:2190, in MCSamples.getMargeStats(self, include_bestfit)
2183 def getMargeStats(self, include_bestfit=False):
2184 """
2185 Returns a :class:`~.types.MargeStats` object with marginalized 1D parameter constraints
2186
2187 :param include_bestfit: if True, set best fit values by loading from root_name.minimum file (assuming it exists)
2188 :return: A :class:`~.types.MargeStats` instance
2189 """
-> 2190 self._setDensitiesandMarge1D()
2191 m = types.MargeStats()
2192 m.hasBestFit = False
File /path/to/cobaya/getdist/mcsamples.py:2284, in MCSamples._setDensitiesandMarge1D(self, max_frac_twotail, meanlikes)
2282 for j in range(self.n):
2283 paramConfid = self.initParamConfidenceData(self.samples[:, j])
-> 2284 self.get1DDensityGridData(j, paramConfid=paramConfid, meanlikes=meanlikes)
2285 self._setMargeLimits(self.paramNames.names[j], paramConfid, max_frac_twotail)
2287 self.done_1Dbins = True
File /path/to/cobaya/getdist/mcsamples.py:1473, in MCSamples.get1DDensityGridData(self, j, paramConfid, meanlikes, **kwargs)
1470 width = paramrange / (num_bins - 1)
1472 bin_indices, fine_width, binmin, binmax = self._binSamples(self.samples[:, j], par, fine_bins)
-> 1473 bins = np.bincount(bin_indices, weights=self.weights, minlength=fine_bins)
1475 if meanlikes:
1476 if self.shade_likes_is_mean_loglikes:
ValueError: 'list' argument must have no negative elements
Code: Select all
ix = ((paramVec - binmin) / fine_width + 0.5).astype(int)
[-9223372036854775808 -9223372036854775808 -9223372036854775808 ...
-9223372036854775808 -9223372036854775808 -9223372036854775808]
I've never had this error before, even tho I did run this model before, and I ran similar chains(with different data sets) but didn't get such an error.
Did anyone face this problem?
I would appreciate the help!
Cheers,
Ali