probabilistic-numerics / probnum

Probabilistic Numerics in Python.
http://probnum.org
MIT License
438 stars 57 forks source link

Dimensions of random variables #39

Closed JonathanWenger closed 4 years ago

JonathanWenger commented 4 years ago

https://github.com/probabilistic-numerics/probnum/blob/9a4e6cf4aee888ad447fe4228e576c7284aa90dd/src/probnum/probability/distribution.py#L527-L528

One thing that might be useful to think about is whether we restrict Diracs, Gaussians, etc. to be supported on (d,) arrays and make scalars etc. raise errors. Everybody can transform a scalar into an array, but it is more convenient to work with numpy arrays only (we can then use operations like @ and others).

Originally posted by @pnkraemer in https://github.com/probabilistic-numerics/probnum/issues/38#issuecomment-608270253

JonathanWenger commented 4 years ago

This is also relevant for linear solvers #18.

JonathanWenger commented 4 years ago

Result from discussion:

pnkraemer commented 4 years ago

Great, thanks!

Any opinion about making _Univariate, _Multivariate, etc. public? We'd keep the Normal facade, but allow more specific choices. I am not sure whether that is a good idea, would like to hear your opinion.

JonathanWenger commented 4 years ago

Could go either way. As a general rule I would err on the side of only having the most necessary classes public.