Skip to content

get_unit not supported for callable parameter #3420

@TorkelE

Description

@TorkelE

Also means these cannot be used in Catalyst, as we automatically calls get_unit on all parameters when we perform unit checks.

Example:

using ModelingToolkit

ts = collect(0.0:0.1:10.0)
spline = LinearInterpolation(ts .^ 2, ts)
Tspline = typeof(spline)
@parameters (interp::Tspline)(..)
@parameters p

ModelingToolkit.get_unit(p) # 1.0
ModelingToolkit.get_unit(interp) # ERROR: ArgumentError: Unsupported value interp⋆.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions