Skip to content

improve validation for param.Array #352

Description

@JoyMonteiro

Hello,

are there some examples on how I could use param for numpy arrays?
I have some code where I'm validating the input manually:
https://github.com/JoyMonteiro/spyRaTE/blob/b943aee2cd2afdb13b6703c8f2ea8ff1b8b8b203/spyrate/rte/rte_interface.py#L712-L734

esp. the assert_shapes code. Is this something I could do more elegantly with Param?
The traittypes project seems to allow something like this, but not sure how Param and traittypes compare, or which I should prefer.

TIA,
Joy

Metadata

Metadata

Assignees

No one assigned

    Labels

    component: type/value stuffsystem of parameter type/value checking, inheritnace, etc etcstatus: discussionDiscussion. Not yet a specific feature/bug. Likely to result in multiple PRs/issues.type-featureFeature request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions