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

Auto bumping ref type to the next larger int type #6

Closed
tk3369 opened this issue Jan 4, 2018 · 5 comments
Closed

Auto bumping ref type to the next larger int type #6

tk3369 opened this issue Jan 4, 2018 · 5 comments

Comments

@tk3369
Copy link

tk3369 commented Jan 4, 2018

Hi there. Great package!

Is there any reason not to make it smarter by automatically bumping to the next larger int type? I can do that manually but thought it could be a nice feature.

julia> x = PooledArray(fill(1,300));

julia> typeof(x)
PooledArrays.PooledArray{Int64,UInt8,1,Array{UInt8,1}}

julia> x[1:300] = 1:300
ERROR: You're using a PooledArray with ref type UInt8, which can only hold 255 values,
and you just tried to add the 256th reference.  Please change the ref type
to a larger int type, or use the default ref type (UInt32).
@shashi
Copy link
Collaborator

shashi commented Apr 12, 2018

This is not possible since we would have to change the type of x...

@bkamins
Copy link
Member

bkamins commented Jun 4, 2019

Can this be closed?

@tk3369
Copy link
Author

tk3369 commented Jun 4, 2019

I’m ok if there’s no interest.

@bkamins
Copy link
Member

bkamins commented Jun 4, 2019

I think what @shashi says that that this size is a part of type parametrization of the PooledArray type.

@bkamins bkamins closed this as completed Jun 4, 2019
@tk3369
Copy link
Author

tk3369 commented Jun 4, 2019

That’s true 😅

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

No branches or pull requests

3 participants