Skip to content

Conversation

@albertomercurio
Copy link
Contributor

@albertomercurio albertomercurio commented Sep 9, 2025

Checklist

  • Appropriate tests were added
  • Any code changes were done in a way that does not break public API
  • All documentation related to code changes were updated
  • The new code follows the
    contributor guidelines, in particular the SciML Style Guide and
    COLPRAC.
  • Any new documentation only uses public API

Additional context

The code I added in the runtests fails using the master branch with Julia v1.10. Here I have fixed some type instabilities and added a few new methods for AddedOperator, in order to simplify some operations.

If this PR will be merged, releasing a new version would be appreciated.

@albertomercurio
Copy link
Contributor Author

Any thoughts about it?

@assert !isempty(ops)
_check_AddedOperator_sizes(ops)
T = promote_type(eltype.(ops)...)
T = mapreduce(eltype, promote_type, ops)
Copy link
Member

Choose a reason for hiding this comment

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

make sure this doesn't allocate? Usually mapreduce is expensive.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I had to change it because the broadcasting was actually making type instabilities.

Copy link
Member

Choose a reason for hiding this comment

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

oh it's on a tuple, that works.

@ChrisRackauckas ChrisRackauckas merged commit 753ae0e into SciML:master Sep 15, 2025
13 of 15 checks passed
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