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

reorder(x, y) doesn't work #167

Open
nalimilan opened this issue Sep 12, 2015 · 1 comment
Open

reorder(x, y) doesn't work #167

nalimilan opened this issue Sep 12, 2015 · 1 comment

Comments

@nalimilan
Copy link
Member

I'm not sure what reorder(x::PooledDataArray, y::AbstractVector...) is supposed to do, but it seems to rely on a function that doesn't exist. Better remove it at that point...

julia> x = pool(["A", "B", "C"])
3-element DataArrays.PooledDataArray{ASCIIString,UInt8,1}:
 "A"
 "B"
 "C"

julia> reorder(x, [1,2])
ERROR: MethodError: `reorder` has no method matching reorder(::Function, ::DataArrays.PooledDataArray{ASCIIString,UInt8,1}, ::Array{Int64,1})
Closest candidates are:
  reorder(::DataArrays.PooledDataArray{T,R<:Integer,N}, ::AbstractArray{T,1}...)
 in reorder at /home/milan/.julia/DataArrays/src/pooleddataarray.jl:438
@diegozea
Copy link

I just found the same problem

julia> a
9-element DataArrays.PooledDataArray{Char,UInt32,1}:
 'L'
 'M'
 'H'
 'L'
 'M'
 'H'
 'L'
 'M'
 'H'

julia> levels(a)
3-element Array{Char,1}:
 'H'
 'L'
 'M'

julia> reorder(a,['L','M','H'])
ERROR: MethodError: `reorder` has no method matching reorder(::Function, ::DataArrays.PooledDataArray{Char,UInt32,1}, ::Array{Char,1})
Closest candidates are:
  reorder(::DataArrays.PooledDataArray{T,R<:Integer,N}, ::AbstractArray{T,1}...)
 in reorder at /home/dzea/.julia/v0.4/DataArrays/src/pooleddataarray.jl:438

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants