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

Piracy! #10

Closed
rafaqz opened this issue Feb 15, 2024 · 3 comments
Closed

Piracy! #10

rafaqz opened this issue Feb 15, 2024 · 3 comments

Comments

@rafaqz
Copy link

rafaqz commented Feb 15, 2024

Hi! was just looking through your code for our integration section of the DImensionalData.jl docs, and I just noticed some friendly piracy going on here 🏴‍☠️ !!

function Base.stack(D::DimensionalData.Dimension, args::AbstractVector{<:AbstractDimArray};

Maybe this should go in DimensionalData.jl proper so we are all above board? Currently this will mean stack will only work when TimeseriesTools.jl is loaded, which might confuse some users....

Its also kind of confusing that we already have something called a DimStack that is totally different to Base.stack, but it would be useful to have stack working all the same.

@rafaqz
Copy link
Author

rafaqz commented Feb 15, 2024

This one too

[:($(S)(D::Dimension) = $(S)(D.val.data)) for S in Selectors] .|> eval

Whats the use-case here?

@brendanjohnharris
Copy link
Owner

brendanjohnharris commented Feb 23, 2024

Hey, sorry for the wait; busy week! I've been learning more about DimensionalData.jl as I go, so much of this code is sub-optimal. There are definitely some cases of lazy piracy here 😅; would be good to get them expunged.

Extending Base.stack is probably better handled like this: rafaqz/DimensionalData.jl#645

This one too

[:($(S)(D::Dimension) = $(S)(D.val.data)) for S in Selectors] .|> eval

Whats the use-case here?

Often I'd have two DimArrays with a common dimension, say A and B. I'd one dimension of A through some pipeline, then later want to match the dimensions of B with the reduced A: e.g. B[At(dims(A, 1)]. IIRC this was supported behavior until a little while ago; at some point I must have tried to recreate the behavior without looking for a better solution...

@brendanjohnharris
Copy link
Owner

Closed by adding custom DimArray and Dimension subtypes in #14

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