pzivich / Delicatessen

Delicatessen: the Python one-stop sandwich (variance) shop 🥪
https://deli.readthedocs.io/en/latest/index.html
MIT License
22 stars 2 forks source link

Improved errors for `init` output mistmatches #8

Closed pzivich closed 2 years ago

pzivich commented 2 years ago

Is your feature request related to a problem? Please describe. Right now, we don't check the shape of the returned values versus the init's. The length of the inits should match one of the dimensions. This means, that something like scipy handles those errors. However, I think we can be more informative (error-wise) on bad shapes of objects returned by psi.

Describe the solution you'd like A check on the shape of the returned object. We already extract n via one of the 2D. So, just check the other dimension and assert if it matches len(init).

Will also need to add a quick tests to make sure functions as intended error-wise

Describe alternatives you've considered None.

Additional context None.

pzivich commented 2 years ago

Released in v0.4