From 728e50f79e26618782ea41894969233aa0da0fe0 Mon Sep 17 00:00:00 2001 From: Philip Eisenlohr Date: Mon, 16 Aug 2021 13:24:34 -0400 Subject: [PATCH] capture special case early instead of failing --- python/damask/util.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python/damask/util.py b/python/damask/util.py index d59b41b16..b34955659 100644 --- a/python/damask/util.py +++ b/python/damask/util.py @@ -375,6 +375,8 @@ def shapeshifter(fro,to,mode='left',keep_ones=False): """ + if not len(fro) and not len(to): return () + beg = dict(left ='(^.*\\b)', right='(^.*?\\b)') sep = dict(left ='(.*\\b)',