Skip to content

Sanity Checks for Params #6

Description

@lruthotto

I'd like to get your thoughts (or even help) on some changes that, I think, would improve the usability of our code. I found that we almost never prevent the user from things like putting into a negative maxStep in an InverseParam. I just did (not consciously) and found that it is very hard to trace back this error.

To prevent some of these things in the future, I was thinking about putting some sanity checks when constructing our types. What do you think?

Concretely, I suggest we check that in InverseParam

boundsLow .<= boundsHigh
alpha > 0 
length(mref) == MInv.nc
maxStep > 0 

maybe more? do you see other places where this might be useful?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions