Skip to content
This repository has been archived by the owner on May 4, 2019. It is now read-only.

Commit

Permalink
Deprecate PooledDataArray
Browse files Browse the repository at this point in the history
Recommend either CategoricalArrays (for categorical data) or PooledArrays (for compressed storage) as replacements. Do not ajust tests for now.
  • Loading branch information
nalimilan committed Oct 21, 2017
1 parent 8a7003b commit 164d206
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/pooleddataarray.jl
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ mutable struct PooledDataArray{T, R<:Integer, N} <: AbstractDataArray{T, N}
pool::Vector{T}

function PooledDataArray{T,R,N}(rs::RefArray{R, N}, p::Vector{T}) where {T,R,N}
Base.depwarn("PooledDataArray is deprecated, use CategoricalArray " *
"from the CategoricalArrays package or PooledArray " *
"from the PooledArrays package instead.", :PooledDataArray)
# refs mustn't overflow pool
if length(rs.a) > 0 && maximum(rs.a) > prod(size(p))
throw(ArgumentError("Reference array points beyond the end of the pool"))
Expand Down

0 comments on commit 164d206

Please sign in to comment.