Skip to content

Conversation

ChrisRackauckas-Claude
Copy link

Summary

Changes

  • Added vector expression check in src/integral.jl before the expand call
  • Added comprehensive tests in test/runtests.jl to verify:
    • Vector expressions throw the appropriate error
    • Scalar integration still works correctly
    • Element-wise integration works as expected

Test plan

  • Added unit tests for vector expression error handling
  • Verified scalar integration continues to work
  • Confirmed element-wise integration is the recommended workaround

This change prevents confusing behavior where vectors were incorrectly treated as constants and provides clear guidance to users on the correct approach for integrating multiple expressions.

🤖 Generated with Claude Code

ChrisRackauckas and others added 2 commits September 28, 2025 17:25
Fixes SciML#58 and SciML#106 by throwing an informative error when vector expressions are passed to integrate().

The error message guides users to use element-wise integration instead: integrate.([expr1, expr2, ...], x)

Added tests to verify:
- Vector expressions throw appropriate error
- Scalar integration still works
- Element-wise integration works as expected

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@ChrisRackauckas ChrisRackauckas merged commit 4d9abe3 into SciML:main Sep 28, 2025
4 of 6 checks passed
@karlwessel
Copy link
Contributor

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.

Vector{Num} expressions.
3 participants