Skip to content

adding NamedArrayPartition type - #293

Merged
ChrisRackauckas merged 12 commits into
SciML:masterfrom
jlchan:jc/NamedArrayPartition
Jan 4, 2024
Merged

ChrisRackauckas merged 12 commits into
SciML:masterfrom
jlchan:jc/NamedArrayPartition

Conversation

@jlchan

@jlchan jlchan commented Nov 28, 2023 •

Copy link
Copy Markdown
Contributor

I added a NamedArrayPartition type in https://github.com/jlchan/StartUpDG.jl; in case it's useful, here are the changes as a PR.

The array type is just an array partition with named fields, e.g.,

julia> x = NamedArrayPartition(a = randn(10), b = randn(2,2))
julia> x.a # should return the stored result from randn(10)

The main difference from ArrayPartition is that I require each individual array to have the same eltype. I forgot why I did this originally, but I'm happy to fix this if needed.

@jlchan jlchan mentioned this pull request Nov 28, 2023
6 tasks
Comment thread test/named_array_partition_tests.jl Outdated
@jlchan

jlchan commented Dec 12, 2023

Copy link
Copy Markdown
Contributor Author

Sorry, dismissed the review after fixing a conflict

@ChrisRackauckas

Copy link
Copy Markdown
Member

bump the version down to test it.

@jlchan

jlchan commented Dec 13, 2023

Copy link
Copy Markdown
Contributor Author

bump the version down to test it.

Thanks for the tip. Done in e6d2680, mind approving CI once more?

@jlchan

jlchan commented Dec 13, 2023

Copy link
Copy Markdown
Contributor Author

Formatting tests were failing for a bunch of files; is it OK if I just lump a bunch of formatting commits into this PR or would you prefer that in a separate one?

@ChrisRackauckas

Copy link
Copy Markdown
Member

Don't run the formatter, it needs an update.

Comment thread test/named_array_partition_tests.jl Outdated
Comment thread test/named_array_partition_tests.jl
Comment thread test/named_array_partition_tests.jl Outdated
@jlchan
jlchan requested a review from ChrisRackauckas January 4, 2024 04:02
@jlchan

jlchan commented Jan 4, 2024

Copy link
Copy Markdown
Contributor Author

Thanks for catching that I forgot to load the packages in my tests @ChrisRackauckas. I think I've fixed the last failing test - would you mind approving the CI again?

@ChrisRackauckas

Copy link
Copy Markdown
Member

Last thing, just add to the docs.

@ChrisRackauckas
ChrisRackauckas merged commit 3e2dcdb into SciML:master Jan 4, 2024
@jlchan

jlchan commented Jan 4, 2024

Copy link
Copy Markdown
Contributor Author

Thanks!

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.

2 participants