Skip to content

Type-generic zeromatrix for arraypartition #444

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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

ChrisRackauckas
Copy link
Member

@ChrisRackauckas
Copy link
Member Author

@oscardssmith this is blocked by a version-specific inference failure. Could I get some help with that? I assume it's because of some v1.10 vs v1.11 difference in mapreduce inference.

Snowd1n and others added 3 commits May 12, 2025 14:42
A function similar to what is implemented commit 2094a78 but for NamedArrayPartitions rather than ArrayPartitions. Tested privately to work with Implicit solvers in OrdinaryDiffEq.jl
NamedArrayPartition zeromatrix
@@ -166,7 +166,7 @@ Base.:(==)(A::ArrayPartition, B::ArrayPartition) = A.x == B.x

Base.map(f, A::ArrayPartition) = ArrayPartition(map(x -> map(f, x), A.x))
function Base.mapreduce(f, op, A::ArrayPartition{T}; kwargs...) where {T}
mapreduce(f, op, (i for i in A); kwargs...)
mapreduce(x->mapreduce(f, op, x; kwargs...), op, (i for i in A.x); kwargs...)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm guessing this is probably the inference issue. Our mapreduce framework is rather baroque.

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