skpro
skpro copied to clipboard
Allow scalar distributions to accept vector inputs
Summary
- Allow scalar (0‑D) distributions to accept vector inputs by relaxing the coercion helpers so they no longer broadcast every input to shape
(), while still returning scalars for scalar calls. - Adjust the boilerplate to only unwrap true 0‑D numpy outputs, ensuring vectorized results remain arrays.
- Add regression tests for scalar Normal and Poisson showing that pdf/log-pdf/cdf (and pmf/log-pmf) now work on numpy arrays without manual loops.
Testing
- pytest skpro/distributions/tests/test_base_scalar.py