File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -401,12 +401,18 @@ _isnan(x::Number) = isnan(x)
401
401
402
402
skipnan (x) = Iterators. filter (! _isnan, x)
403
403
404
+ isinvalid (x) = ismissing (x) || _isnan (x)
405
+
404
406
"""
405
407
skipinvalid(itr)
406
408
407
409
Return an iterator over the elements in `itr` skipping `missing` and
408
410
`NaN` values. Behaviour is similar to [`skipmissing`](@ref).
409
411
412
+ """
413
+ skipinvalid (v) = v |> skipmissing |> skipnan
414
+
415
+ """
410
416
skipinvalid(A, B)
411
417
412
418
For vectors `A` and `B` of the same length, return a tuple of vectors
@@ -417,10 +423,6 @@ always returns a vector. Does not remove `Missing` from the element
417
423
types if present in the original iterators.
418
424
419
425
"""
420
- skipinvalid (v) = v |> skipmissing |> skipnan
421
-
422
- isinvalid (x) = ismissing (x) || _isnan (x)
423
-
424
426
function skipinvalid (yhat, y)
425
427
mask = .! (isinvalid .(yhat) .| isinvalid .(y))
426
428
return yhat[mask], y[mask]
You can’t perform that action at this time.
0 commit comments