Skip to content

Commit 170e975

Browse files
committed
Split method docstrings
1 parent d3d9383 commit 170e975

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/data/data.jl

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -401,12 +401,18 @@ _isnan(x::Number) = isnan(x)
401401

402402
skipnan(x) = Iterators.filter(!_isnan, x)
403403

404+
isinvalid(x) = ismissing(x) || _isnan(x)
405+
404406
"""
405407
skipinvalid(itr)
406408
407409
Return an iterator over the elements in `itr` skipping `missing` and
408410
`NaN` values. Behaviour is similar to [`skipmissing`](@ref).
409411
412+
"""
413+
skipinvalid(v) = v |> skipmissing |> skipnan
414+
415+
"""
410416
skipinvalid(A, B)
411417
412418
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
417423
types if present in the original iterators.
418424
419425
"""
420-
skipinvalid(v) = v |> skipmissing |> skipnan
421-
422-
isinvalid(x) = ismissing(x) || _isnan(x)
423-
424426
function skipinvalid(yhat, y)
425427
mask = .!(isinvalid.(yhat) .| isinvalid.(y))
426428
return yhat[mask], y[mask]

0 commit comments

Comments
 (0)