-
-
Notifications
You must be signed in to change notification settings - Fork 210
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
Support symbolic arrays in @mtkmodel
#2282
Conversation
5074956
to
ccc6935
Compare
ccc6935
to
491314f
Compare
The test failure is unrelated to this PR; I checked that even master throws the same error. |
442cba7
to
6520fd0
Compare
Model Parsing tests pass for Julia 1.61 Footnotes |
src/systems/model_parsing.jl
Outdated
var = if indices === nothing | ||
Symbolics.variable(a, T = SymbolicUtils.FnType{Tuple{Real}, Real})(iv) | ||
else | ||
vd[a][:length] = lastindex(indices) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This won't work for general arrays. Shouldn't it be size
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As we use Unitranges here, it uses lastindex
; but yeah for general arrays that should be broadcasted.
And I've added tests for general arrays; and renamed :length
as :size
- and adds relevant tests
- Otherwise test fails with this[^1] deprecation warning. [^1]:https://github.com/SciML/NonlinearSolve.jl/blob/01b067a7d3b8a67d185c11e0d47676903b83e349/src/utils.jl#L37
c9b8eb3
to
af0a95e
Compare
Bump |
@mtkmodel
@extend
in the docs