This repository was archived by the owner on May 4, 2019. It is now read-only.
This repository was archived by the owner on May 4, 2019. It is now read-only.
Unhelpful error with quantile!(x, q) #174
Open
Description
Hi there,
When computing quantiles on DataArrays, if the DataArray contains an NA I get an error that could be more helpful. See example below.
using DataArrays
x = DataArray(Int64, 3)
x[1] = 1
x[2] = 2
x[3] = 3
quantile!(x, [0.5]) # OK, no problem
x[3] = NA
quantile!(x, [0.5]) # Unhelpful error
The error is:
ERROR: MethodError: isnan
has no method matching isnan(::DataArrays.NAtype) in quantile! at statistics.jl:528
The source code of statistics.jl has the message "quantiles are undefined in presence of NaNs", which is more helpful. How can this message be shown rather than the one currently shown?
Metadata
Metadata
Assignees
Labels
No labels