From da46e5ea9a79ef922deb39350991d14391d3b590 Mon Sep 17 00:00:00 2001 From: Philip Eisenlohr Date: Wed, 26 Aug 2020 15:32:48 -0400 Subject: [PATCH] cannot use np.linalg.norm when dealing with exponent triple --- python/damask/_geom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/damask/_geom.py b/python/damask/_geom.py index c9848e641..08b0b8757 100644 --- a/python/damask/_geom.py +++ b/python/damask/_geom.py @@ -585,7 +585,7 @@ class Geom: coords_rot = R.broadcast_to(tuple(self.grid))@coords with np.errstate(over='ignore',under='ignore'): - mask = np.where(np.linalg.norm(coords_rot/r,2.0**exponent,axis=-1) <= 1.0,False,True) + mask = np.where(np.sum(np.power(coords_rot/r,2.0**exponent),axis=-1) <= 1.0,False,True) if periodic: # translate back to center mask = np.roll(mask,((c-np.ones(3)*.5)*self.grid).astype(int),(0,1,2))