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

make cat_disk run on a vector rather than a vararg #234

Closed
wants to merge 1 commit into from

Conversation

asinghvi17
Copy link
Member

Ideally this should allow us to run cat across a large number of arrays.

@felixcremer
Copy link
Contributor

Shouldn't we rather implement Base.stack instead? From the docstring below it seems to me, that this is the function we aim for when we want to concatenate a list of DiskArrays:

  stack(iter; [dims])

  Combine a collection of arrays (or other iterable objects) of equal size into one larger array, by arranging them
  along one or more new dimensions.

@asinghvi17
Copy link
Member Author

The key word there is new dimensions...the problem here was to cat along a preexisting one

@rafaqz
Copy link
Collaborator

rafaqz commented Feb 14, 2025

I don't get what's achieved here, there's already a splat into the base function cat.

If your going to call a DiskArrays method anyway ConcatDiskArray already works how you want, even on multidimensional arrays, I suggest doing that. cat_disk is literally just cat for disk arrays, and it's internal. It's just defined separately so it's not stuck inside the macro

@asinghvi17
Copy link
Member Author

Yeah, I had wondered if this might speed up the compilation a bit so tried it on my phone. Tested it and apparently try not :D

@asinghvi17 asinghvi17 closed this Feb 14, 2025
@rafaqz
Copy link
Collaborator

rafaqz commented Feb 14, 2025

Where we could do this is with a reduce vcat hack that Base also has...

@asinghvi17
Copy link
Member Author

Should we just use that method for combine on a stack as well then,

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 this pull request may close these issues.

3 participants