SentinelViews.jl

Author JuliaAPlavin
Popularity
0 Stars
Updated Last
10 Months Ago
Started In
February 2024

SentinelViews.jl

sentinelview(X, I, [sentinel=nothing]): like view(X, I), but propagates sentinel.

A = [10, 20, 30]

Av = sentinelview(A, [1, 2, 3])  # equivalent to view(A, [1, 2, 3])
Av == [10, 20, 30]

Av = sentinelview(A, [1, nothing, 3])  # propagates nothing in indices to the result
Av == [10, nothing, 30]

Required Packages

No packages found.

Used By Packages