Skip to content

Commit

Permalink
avoid new line symbols in string edges
Browse files Browse the repository at this point in the history
  • Loading branch information
20DM committed Aug 12, 2024
1 parent d543b76 commit 9a05a10
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
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 9a05a10

Please sign in to comment.