Typing for tensor shapes #2402
Labels
feat/enhancement
New feature or request
needs-triage
Needs a maintainer to categorize and assign
user request
Request coming form a pyhf user
Summary
Type information that includes tensor shapes could be a powerful way of extended validation (including runtime via
typeguard
/beartype
). The https://github.com/google/jaxtyping project looks rather promising for this. See also https://kidger.site/thoughts/jaxtyping/, specifically:There are a few places where I can imagine this to be helpful, e.g. returns from
infer
that are one-element tensors (where users might expect floats) or predictions from batched models.Additional Information
n/a
Code of Conduct
The text was updated successfully, but these errors were encountered: