Skip to content

Commit

Permalink
protect against negative nans
Browse files Browse the repository at this point in the history
  • Loading branch information
20DM committed Mar 8, 2024
1 parent cd72583 commit 9edc748
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion hepdata_converter/writers/yoda1_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ def _create_scatter(self):
err_dn.append(self.xerr_minus[dim_i][i])
err_up.append(self.xerr_plus[dim_i][i])
if skipPoint: continue
vals.append(self.yval[i])
y = abs(self.yval[i]) if math.isnan(self.yval[i]) else self.yval[i]
vals.append(y)
err_dn.append(self.yerr_minus[i])
err_up.append(self.yerr_plus[i])
args = [ vals, err_dn, err_up ]
Expand Down

0 comments on commit 9edc748

Please sign in to comment.