@@ -128,18 +128,18 @@ def test_obj_5D_strcat_intcat_rectangular(use_weights):
128
128
storage = storage ,
129
129
)
130
130
for i in range (25 ):
131
- h .fill (f"testcat{ i + 1 } " , i + 1 , * (x .T ), weight = weights )
131
+ h .fill (f"testcat{ i + 1 } " , i + 1 , * (x .T ), weight = weights )
132
132
h = h .compute ()
133
133
134
134
control = bh .Histogram (* h .axes , storage = h .storage_type ())
135
135
if use_weights :
136
136
for i in range (25 ):
137
137
control .fill (
138
- f"testcat{ i + 1 } " , i + 1 , * (x .compute ().T ), weight = weights .compute ()
138
+ f"testcat{ i + 1 } " , i + 1 , * (x .compute ().T ), weight = weights .compute ()
139
139
)
140
140
else :
141
141
for i in range (25 ):
142
- control .fill (f"testcat{ i + 1 } " , i + 1 , * (x .compute ().T ))
142
+ control .fill (f"testcat{ i + 1 } " , i + 1 , * (x .compute ().T ))
143
143
144
144
assert np .allclose (h .counts (), control .counts ())
145
145
if use_weights :
@@ -183,19 +183,21 @@ def test_obj_5D_strcat_intcat_rectangular_dak(use_weights):
183
183
assert h .__dask_optimize__ == dak .lib .optimize .all_optimizations
184
184
185
185
for i in range (25 ):
186
- h .fill (f"testcat{ i + 1 } " , i + 1 , x , y , z , weight = weights [i ] if weights else None )
186
+ h .fill (
187
+ f"testcat{ i + 1 } " , i + 1 , x , y , z , weight = weights [i ] if weights else None
188
+ )
187
189
h = h .compute ()
188
190
189
191
control = bh .Histogram (* h .axes , storage = h .storage_type ())
190
192
x_c , y_c , z_c = x .compute (), y .compute (), z .compute ()
191
193
if use_weights :
192
194
for i in range (25 ):
193
195
control .fill (
194
- f"testcat{ i + 1 } " , i + 1 , x_c , y_c , z_c , weight = weights [i ].compute ()
196
+ f"testcat{ i + 1 } " , i + 1 , x_c , y_c , z_c , weight = weights [i ].compute ()
195
197
)
196
198
else :
197
199
for i in range (25 ):
198
- control .fill (f"testcat{ i + 1 } " , i + 1 , x_c , y_c , z_c )
200
+ control .fill (f"testcat{ i + 1 } " , i + 1 , x_c , y_c , z_c )
199
201
200
202
assert np .allclose (h .counts (), control .counts ())
201
203
if use_weights :
0 commit comments