diff --git a/lib/damask/asciitable.py b/lib/damask/asciitable.py index 3509a5284..d3a7ad693 100644 --- a/lib/damask/asciitable.py +++ b/lib/damask/asciitable.py @@ -600,8 +600,11 @@ class ASCIItable(): while i < N and self.data_read(): items = self.data if len(items) > 2: - if items[1].lower() == 'of': items = np.ones(datatype(items[0]))*datatype(items[2]) - elif items[1].lower() == 'to': items = np.arange(datatype(items[0]),1+datatype(items[2])) + if items[1].lower() == 'of': + items = np.ones(datatype(items[0]))*datatype(items[2]) + elif items[1].lower() == 'to': + items = np.linspace(datatype(items[0]),datatype(items[2]), + abs(datatype(items[2])-datatype(items[0]))+1,dtype=int) else: items = list(map(datatype,items)) else: items = list(map(datatype,items)) diff --git a/processing/pre/geom_pack.py b/processing/pre/geom_pack.py index bf528a052..286abd180 100755 --- a/processing/pre/geom_pack.py +++ b/processing/pre/geom_pack.py @@ -81,7 +81,7 @@ for name in filenames: else: items = map(int,items) for current in items: - if current == former+1 and start+reps == former+1: + if abs(current - former) == 1 and abs(start-former) == reps - 1: compressType = 'to' reps += 1 elif current == former and start == former: