@@ -168,14 +168,14 @@ function Base.Broadcast.broadcasted(
168
168
" Arrays could not be broadcast to a common size; " *
169
169
" got a dimension with lengths $(length (u)) and $(length (v)) " ))
170
170
171
- v_loc_flat = [(ismissing (x) ? missing : findfirst (x , classes (u)), i)
171
+ v_loc_flat = [(ismissing (x) ? missing : findfirst (== (x) , classes (u)), i)
172
172
for (i, x) in enumerate (v)]
173
173
any (isequal (0 ), v_loc_flat) && throw (err_missing_class (cv))
174
174
175
175
getter ((cv_loc, i), dtype) =
176
176
_getindex (get (u. prob_given_ref, cv_loc, nothing ), i, dtype)
177
177
getter (:: Tuple{Missing,Any} , dtype) = missing
178
- ret_flat = getter .(v_flat , P)
178
+ ret_flat = getter .(v_loc_flat , P)
179
179
return reshape (ret_flat, size (u))
180
180
end
181
181
@@ -274,7 +274,7 @@ const ERR_EMPTY_UNIVARIATE_FINITE = ArgumentError(
274
274
" No `UnivariateFinite` object found from which to extract classes. " )
275
275
276
276
function classes (yhat:: AbstractArray{<:Union{Missing,UnivariateFinite}} )
277
- i = findfirst (x -> ! ismissing (x) , yhat)
277
+ i = findfirst (! ismissing, yhat)
278
278
i === nothing && throw (ERR_EMPTY_UNIVARIATE_FINITE)
279
279
return classes (yhat[i])
280
280
end
0 commit comments