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

set a DD with NoLookup does not work #920

Open
DylanMMarques opened this issue Jan 31, 2025 · 1 comment
Open

set a DD with NoLookup does not work #920

DylanMMarques opened this issue Jan 31, 2025 · 1 comment

Comments

@DylanMMarques
Copy link

Hello,

I was trying to set a dimension for a DD with NoLookup but it does not work as I would expect:

dd =  rand(X(10))
┌ 10-element DimArray{Float64, 1} ┐
├─────────────────────────── dims ┤
   X
└─────────────────────────────────┘
 0.384326
 0.324998
 0.793331
 0.809005
 0.59616
 0.873009
 0.459957
 0.149364
 0.197038
 0.245582
dd_new = set(dd, X => 1:10)
┌ 10-element DimArray{Float64, 1} ┐
├─────────────────────────── dims ┤
   X
└─────────────────────────────────┘
 0.384326
 0.324998
 0.793331
 0.809005
 0.59616
 0.873009
 0.459957
 0.149364
 0.197038
 0.245582

Thanks

@rafaqz
Copy link
Owner

rafaqz commented Jan 31, 2025

Yeah, it's just setting the NoLookup values. (They need to hold a range or something so that length works)

set still doesn't fix absolutely everything for you in the smartest way, but we should really get it to completion where you can expect it to always make sense.

Probably you need X => Sampled(1:10; order=ForwardOrdered())

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

2 participants