From 407990decdc126808d49b2aacc2df59ebe9f3c1e Mon Sep 17 00:00:00 2001 From: PharmCat Date: Tue, 3 Aug 2021 16:24:26 +0300 Subject: [PATCH] update --- Project.toml | 2 +- src/abstracttype.jl | 4 +++- src/types.jl | 2 +- src/utils.jl | 4 ++++ 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Project.toml b/Project.toml index 796bfe8..db4d3d1 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "MetidaBase" uuid = "075456b7-4006-432f-9324-2f8453996c49" authors = ["PharmCat and contributors"] -version = "0.3.0" +version = "0.3.1" [deps] #StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91" diff --git a/src/abstracttype.jl b/src/abstracttype.jl index 3552f3a..e55dde5 100644 --- a/src/abstracttype.jl +++ b/src/abstracttype.jl @@ -16,6 +16,8 @@ abstract type AbstractLMMDataBlocks end abstract type AbstractData end +abstract type AbstractDataSet{AbstractData} end + # All have field: id::Dict abstract type AbstractIdData <: AbstractData end @@ -41,4 +43,4 @@ abstract type AbstractSubject <: AbstractIdData end abstract type AbstractSubjectResult{AbstractSubject} <: AbstractIDResult{AbstractSubject} end -# Descriptive +# Descriptive diff --git a/src/types.jl b/src/types.jl index d216577..adbc49c 100644 --- a/src/types.jl +++ b/src/types.jl @@ -82,7 +82,7 @@ end ################################################################################ # DATASET ################################################################################ -struct DataSet{T <: AbstractData} +struct DataSet{T <: AbstractData} <: AbstractDataSet{AbstractData} ds::Vector{T} end diff --git a/src/utils.jl b/src/utils.jl index 019bf6f..e541c6d 100644 --- a/src/utils.jl +++ b/src/utils.jl @@ -12,3 +12,7 @@ function indsdict!(d::Dict{T}, cdata::Tuple) where T end d end + + +isnanormissing(x::Number) = isnan(x) +isnanormissing(x::Missing) = true