Skip to content

Fix series conversion in hdf5 encoding

Gregory Ashton requested to merge series-conversion-in-hdf5 into master

Currently, the pandas Series conversion creates a dictionary of key-value pairs where the keys are integers corresponding to the rows of the series. AFAIK, we do not ever intend to use Series to store data where the row ordering matters. But, there are cases where the extraction from the DataFrame yields a Series rather than an array (for example, the log-likelihood evaluations).

The issue is that, as noted in !1143 (closed), this then trips up the path conversion, which tries to add a string and integer together. In this MR, the Series is converted to an array, losing the row information but enabling the hdf5 file to save.

My understanding is that without the MR, bilby_mcmc is unable to save complete hdf5 files so we should get this (or an alternative) merged.

Merge request reports

Loading