Skip to content

Commit

Permalink
Merge pull request #59 from 20DM/cg_patch_for_newline_symbols
Browse files Browse the repository at this point in the history
Avoid 'new line' symbols in string edges (YODA writer)
GraemeWatt authored Aug 22, 2024
2 parents d543b76 + c05d905 commit 193f60c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hepdata_converter/writers/yoda_writer.py
Original file line number Diff line number Diff line change
@@ -103,7 +103,7 @@ def _create_estimate(self):
v = self.xval[dim_i][i]
m = self.xerr_minus[dim_i][i]
p = self.xerr_plus[dim_i][i]
edge = '{0} - {1}'.format(v-m, v+p) if m and p else str(v)
edge = '{0} - {1}'.format(v-m, v+p) if m and p else str(v).replace('\n', ' ')
if edge not in thisaxis:
thisaxis.append(edge)
edges.append(sorted(thisaxis) if isCAxis[-1] else thisaxis)
@@ -145,7 +145,7 @@ def _create_estimate(self):
elif isIntAxis[dim_i]:
edges.append(int(v))
else:
newedge = '{0} - {1}'.format(v-m, v+p) if m and p else str(v)
newedge = '{0} - {1}'.format(v-m, v+p) if m and p else str(v).replace('\n', ' ')
edges.append(newedge)
# calculate global index
idx = rtn.indexAt(*edges)

0 comments on commit 193f60c

Please sign in to comment.