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

feat: add similarto keyword to build_function #1421

Conversation

AayushSabharwal
Copy link
Member

No description provided.

@codecov-commenter
Copy link

codecov-commenter commented Jan 29, 2025

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Project coverage is 8.88%. Comparing base (6202fa4) to head (7152f58).
Report is 74 commits behind head on master.

Files with missing lines Patch % Lines
src/build_function.jl 0.00% 2 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff            @@
##           master   #1421      +/-   ##
=========================================
+ Coverage    3.95%   8.88%   +4.92%     
=========================================
  Files          51      51              
  Lines        4824    4873      +49     
=========================================
+ Hits          191     433     +242     
+ Misses       4633    4440     -193     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ChrisRackauckas
Copy link
Member

what's this used for?

@AayushSabharwal
Copy link
Member Author

If MTK generates a function that takes MTKParameters as the first argument and returns an array, build_function tries to call SymbolicUtils.Code.create_array(::Type{<:MTKParameters}, ...) which errors. This makes it so those kinds of functions can explicitly say "create an Array".

@AayushSabharwal
Copy link
Member Author

The only other alternative is force_SA = true which forces it to return a StaticArray and isn't always desirable.

@ChrisRackauckas
Copy link
Member

We should document this argument then?

@AayushSabharwal
Copy link
Member Author

Right, I'll add that.

@ChrisRackauckas ChrisRackauckas merged commit 046f3b4 into JuliaSymbolics:master Jan 29, 2025
10 of 13 checks passed
@AayushSabharwal AayushSabharwal deleted the as/build-function-similarto branch January 29, 2025 11:32
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