Skip to content

fix: allow vector defaults in @mtkmodel #2830

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

Merged
merged 1 commit into from
Jul 27, 2024

Conversation

ven-k
Copy link
Member

@ven-k ven-k commented Jun 29, 2024

Closes #2810

These work now:

   @mtkmodel VectorDefaultWithMetadata begin
        @parameters begin
            n[1:3] = [1, 2, 3], [description = "Vector defaults"]
        end
    end

   @mtkmodel VectorConditionalDefault begin
        @structural_parameters begin
           flag = true
        end
        @parameters begin
            n[1:3] = if flag
                [2, 2, 2]
            else
               1
            end
        end
    end

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

@ven-k ven-k force-pushed the vkb/vector-defaults branch from 8bc1fd9 to 716a627 Compare June 29, 2024 07:34
@ChrisRackauckas ChrisRackauckas merged commit c91b53e into SciML:master Jul 27, 2024
20 of 22 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.

Cannot provide default value for array parameter
2 participants