alexriss / SkipNan.jl

skipnan for Julia (analogous to skipmissing)
MIT License
0 stars 0 forks source link

SkipNan

Stable Dev Build Status Coverage

About

Use skipnan as you would use skipmissing.

Installation

SkipNan can be installed from the Julia package registry via:

using Pkg
Pkg.add("SkipNan")

Use

using SkipNan
x = skipnan([1., NaN, 2.])

sum(x)  # 3.0
argmax(x)  # 3

collect(x)  # [1.0, 2.0]
collect(keys(x))  # [1, 3]

x[1]  # 1.0
x[3]  # 3.0
x[2]  # MissingException