@@ -80,7 +80,7 @@ def mesh_Cuboid(cuboid, target_elems, verbose=False, **kwargs):
8080 # inside position grid
8181 xs , ys , zs = (
8282 np .linspace (d / 2 * (1 / n - 1 ), d / 2 * (1 - 1 / n ), n )
83- for d , n in zip (dim0 , nnn )
83+ for d , n in zip (dim0 , nnn , strict = False )
8484 )
8585 grid = np .array ([(x , y , z ) for x in xs for y in ys for z in zs ])
8686
@@ -243,7 +243,7 @@ def mesh_thin_CylinderSegment_with_cuboids(
243243 rots = R .from_euler ("z" , phi_vec )
244244 cells = []
245245 for z in np .linspace (- h / 2 + dh / 2 , h / 2 - dh / 2 , nh ):
246- for pos , orient in zip (poss , rots ):
246+ for pos , orient in zip (poss , rots , strict = False ):
247247 child = magpy .magnet .Cuboid (
248248 polarization = orient .inv ().apply (pol0 ),
249249 dimension = dim ,
@@ -297,7 +297,7 @@ def slice_Cuboid(cuboid, shift=0.5, axis="z", **kwargs):
297297 dims_k = dim_k * (1 - shift ), dim_k * (shift )
298298 shift_k = (dim_k - dims_k [0 ]) / 2 , - (dim_k - dims_k [1 ]) / 2
299299 cells = []
300- for d , s in zip (dims_k , shift_k ):
300+ for d , s in zip (dims_k , shift_k , strict = False ):
301301 dimension = dim0 .copy ()
302302 dimension [ind ] = d
303303 position = np .array ([0 , 0 , 0 ], dtype = float )
@@ -337,7 +337,9 @@ def voxelize(obj, target_elems, strict_inside=True, **kwargs):
337337 grid_elems = [int ((vol_ratio * target_elems ) ** (1 / 3 ))] * 3
338338 grid_dim = [containing_cube_edge ] * 3
339339
340- slices = [slice (- d / 2 , d / 2 , N * 1j ) for d , N in zip (grid_dim , grid_elems )]
340+ slices = [
341+ slice (- d / 2 , d / 2 , N * 1j ) for d , N in zip (grid_dim , grid_elems , strict = False )
342+ ]
341343 grid = np .mgrid [slices ].reshape (len (slices ), - 1 ).T
342344 grid = grid [mask_inside (obj , grid , tolerance = 1e-14 )]
343345 cube_cell_dim = np .array ([containing_cube_edge / (grid_elems [0 ] - 1 )] * 3 )
@@ -427,7 +429,7 @@ def mesh_all(
427429 f"\n Supported: { [s .__name__ for s in supported ]} ."
428430 )
429431 raise TypeError (msg )
430- for child , targ_elems in zip (supported_objs , target_elems_by_child ):
432+ for child , targ_elems in zip (supported_objs , target_elems_by_child , strict = False ):
431433 parent = child .parent
432434 kw = kwargs if parent is None else {}
433435 child_meshed = None
0 commit comments