File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -248,15 +248,12 @@ def _fit_biascorr( # type: ignore
248
248
if isinstance (diff , np .ndarray ):
249
249
ydata = diff [subsample_mask ].flatten ()
250
250
xdata = np .array ([var [subsample_mask ].flatten () for var in bias_vars .values ()]).squeeze ()
251
- # TODO - there is a bug here still
252
- # sigma = (weights[subsample_mask].flatten() if weights is not None else None,)
253
- sigma = None
251
+ sigma = weights [subsample_mask ].flatten () if weights is not None else None
254
252
elif isinstance (diff , da .Array ):
255
253
ydata = diff .vindex [subsample_mask ].flatten ().compute () # type:ignore [assignment]
256
254
xdata = np .array ([var .vindex [subsample_mask ].flatten ().compute () for var in bias_vars .values ()])
257
- # TODO - there is a bug here still
258
- # sigma = (weights[subsample_mask].flatten() if weights is not None else None,)
259
- sigma = None
255
+ # TODO - where do the weights come from? Are they also dask arrays?
256
+ sigma = weights .vindex [subsample_mask ].flatten () if weights is not None else None
260
257
else :
261
258
raise TypeError (f"Incompatible input type for arrays { type (diff )} ." )
262
259
You can’t perform that action at this time.
0 commit comments