Skip to content

Commit

Permalink
allow quoting data entries
Browse files Browse the repository at this point in the history
---
Signed-off-by: Andy Stone <[email protected]>
  • Loading branch information
stonea committed Sep 21, 2023
1 parent 7ecf7b0 commit 3a5b06d
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions util/test/chpl_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -666,16 +666,18 @@ def loadDatFile(filename):
for dn in datanames:
results[dn] = []
else:
splitEntries = shlex.split(l)

# read one config var and the rest are data
if not l.split()[0].isnumeric():
areYValuesNumbers = False
if not splitEntries[0].isnumeric():
areYValuesNumbers = False

if areYValuesNumbers:
config_vars.append(float(l.split()[0]))
config_vars.append(float(splitEntries[0]))
else:
config_vars.append(l.split()[0])
config_vars.append(splitEntries[0])

for dn, data in zip(datanames, l.split()[1:]):
for dn, data in zip(datanames, splitEntries[1:]):
results[dn].append(float(data))

return Table(None, filename, config_vars, results, kvPairs)
Expand Down

0 comments on commit 3a5b06d

Please sign in to comment.