From 8cedcb68b2fdad9ca059c8c27c83038da64e28a2 Mon Sep 17 00:00:00 2001 From: Datseris Date: Wed, 13 Mar 2024 10:48:16 +0000 Subject: [PATCH] fix type on convert parameters --- Project.toml | 2 +- src/utils.jl | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Project.toml b/Project.toml index da4bdc6..a951973 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "ProcessBasedModelling" uuid = "ca969041-2cf3-4b10-bc21-86f4417093eb" authors = ["Datseris "] -version = "1.0.2" +version = "1.0.3" [deps] ModelingToolkit = "961ee093-0014-501f-94e3-6117800e7a78" diff --git a/src/utils.jl b/src/utils.jl index 6bffc53..571af50 100644 --- a/src/utils.jl +++ b/src/utils.jl @@ -135,7 +135,8 @@ and default value the same as the value of `vars`. The macro leaves unaltered inputs that are of type `Num`, assumming they are already parameters. It also replaces [`LiteralParameter`](@ref) inputs with its literal values. This macro is extremely useful to convert e.g., keyword arguments into named parameters, -while also allowing the user to give custom parameter names. +while also allowing the user to give custom parameter names, +or to leave some keywords as numeric literals. Example: @@ -159,6 +160,7 @@ julia> default_value(A) julia> C # the binding `C` still corresponds to parameter named `:X`! X +``` """ macro convert_to_parameters(vars...) expr = Expr(:block)