From 5fdf112f78de93711a5bd03fa11163c9d6536587 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Thu, 5 Dec 2019 05:45:27 +0100 Subject: [PATCH] allow strings as data in ASCII file --- python/damask/table.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python/damask/table.py b/python/damask/table.py index bb195122d..140665ab2 100644 --- a/python/damask/table.py +++ b/python/damask/table.py @@ -82,7 +82,10 @@ class Table(): else: shapes[label]=(1,) - return Table(np.loadtxt(f),shapes,comments) + data = pd.read_csv(f,names=[i for i in range(len(labels))],sep='\s+').to_numpy() + + return Table(data,shapes,comments) + def get_array(self,label): """