@@ -170,11 +170,11 @@ def size(self):
170170
171171 @property
172172 def real (self ):
173- return DOFArray (self .array_context , tuple ([ subary .real for subary in self ] ))
173+ return DOFArray (self .array_context , tuple (subary .real for subary in self ))
174174
175175 @property
176176 def imag (self ):
177- return DOFArray (self .array_context , tuple ([ subary .imag for subary in self ] ))
177+ return DOFArray (self .array_context , tuple (subary .imag for subary in self ))
178178
179179
180180@serialize_container .register (DOFArray )
@@ -258,9 +258,8 @@ def _get_test_containers(actx, ambient_dim=2, shapes=50_000):
258258 if isinstance (shapes , (Number , tuple )):
259259 shapes = [shapes ]
260260
261- x = DOFArray (actx , tuple ([
262- actx .from_numpy (randn (shape , np .float64 ))
263- for shape in shapes ]))
261+ x = DOFArray (actx , tuple (actx .from_numpy (randn (shape , np .float64 ))
262+ for shape in shapes ))
264263
265264 # pylint: disable=unexpected-keyword-arg, no-value-for-parameter
266265 dataclass_of_dofs = MyContainer (
@@ -1081,13 +1080,11 @@ def test_flatten_array_container(actx_factory, shapes):
10811080 if isinstance (shapes , (int , tuple )):
10821081 shapes = [shapes ]
10831082
1084- ary = DOFArray (actx , tuple ([
1085- actx .from_numpy (randn (shape , np .float64 ))
1086- for shape in shapes ]))
1083+ ary = DOFArray (actx , tuple (actx .from_numpy (randn (shape , np .float64 ))
1084+ for shape in shapes ))
10871085
1088- template = DOFArray (actx , tuple ([
1089- actx .from_numpy (randn (shape , np .complex128 ))
1090- for shape in shapes ]))
1086+ template = DOFArray (actx , tuple (actx .from_numpy (randn (shape , np .complex128 ))
1087+ for shape in shapes ))
10911088
10921089 flat = flatten (ary , actx )
10931090 ary_roundtrip = unflatten (template , flat , actx , strict = False )
0 commit comments