Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

_addcounts_radix_sort_loop! unsafe for OffsetVectors #721

Closed
LilithHafner opened this issue Oct 2, 2021 · 0 comments · Fixed by #722
Closed

_addcounts_radix_sort_loop! unsafe for OffsetVectors #721

LilithHafner opened this issue Oct 2, 2021 · 0 comments · Fixed by #722

Comments

@LilithHafner
Copy link
Contributor

This is because _addcounts_radix_sort_loop! uses absolute indexing starting at 1.

using StatsBase
using OffsetArrays

v = OffsetVector([5,6,7], -2)

display(countmap(v; alg=:dict))
#=
Dict{Int64, Int64} with 3 entries:
  5 => 1
  6 => 1
  7 => 1
=#
display(countmap(v; alg=:radixsort))
#=
Dict{Int64, Int64} with 2 entries:
  7                   => 1
  7205759405604732928 => 1
=#
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant