@@ -173,11 +173,11 @@ def size(self):
173173
174174 @property
175175 def real (self ):
176- return DOFArray (self .array_context , tuple ([ subary .real for subary in self ] ))
176+ return DOFArray (self .array_context , tuple (subary .real for subary in self ))
177177
178178 @property
179179 def imag (self ):
180- return DOFArray (self .array_context , tuple ([ subary .imag for subary in self ] ))
180+ return DOFArray (self .array_context , tuple (subary .imag for subary in self ))
181181
182182
183183@serialize_container .register (DOFArray )
@@ -261,9 +261,8 @@ def _get_test_containers(actx, ambient_dim=2, shapes=50_000):
261261 if isinstance (shapes , (Number , tuple )):
262262 shapes = [shapes ]
263263
264- x = DOFArray (actx , tuple ([
265- actx .from_numpy (randn (shape , np .float64 ))
266- for shape in shapes ]))
264+ x = DOFArray (actx , tuple (actx .from_numpy (randn (shape , np .float64 ))
265+ for shape in shapes ))
267266
268267 # pylint: disable=unexpected-keyword-arg, no-value-for-parameter
269268 dataclass_of_dofs = MyContainer (
@@ -1084,13 +1083,11 @@ def test_flatten_array_container(actx_factory, shapes):
10841083 if isinstance (shapes , (int , tuple )):
10851084 shapes = [shapes ]
10861085
1087- ary = DOFArray (actx , tuple ([
1088- actx .from_numpy (randn (shape , np .float64 ))
1089- for shape in shapes ]))
1086+ ary = DOFArray (actx , tuple (actx .from_numpy (randn (shape , np .float64 ))
1087+ for shape in shapes ))
10901088
1091- template = DOFArray (actx , tuple ([
1092- actx .from_numpy (randn (shape , np .complex128 ))
1093- for shape in shapes ]))
1089+ template = DOFArray (actx , tuple (actx .from_numpy (randn (shape , np .complex128 ))
1090+ for shape in shapes ))
10941091
10951092 flat = flatten (ary , actx )
10961093 ary_roundtrip = unflatten (template , flat , actx , strict = False )
0 commit comments