holoviz / holoviz/param

improve validation for param.Array

Open
#352 2 comments 0 reactions 0 assignees View on GitHub
component: type/value stuff status: discussion type-feature
Dominant language
Python
Stars
521
Forks
86
Avg merge
1d 13h
Merged PRs (30d)
35

Description

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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.