probabilistic-numerics / probnum

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

Tidy up initialization of RandomVariable #41

Closed JonathanWenger closed 4 years ago

JonathanWenger commented 4 years ago

https://github.com/probabilistic-numerics/probnum/blob/d0a953fd36121cd7ea73d1b976a743de223afcdc/src/probnum/probability.py#L48-L83

Also if my comments above are wrong, I think there is value in tidying up this function. E.g., as you say in the comment below, by extracting methods self._set_dtype(...), self._set_shape(...) and self._set_distribution(...).

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

pnkraemer commented 4 years ago

I'll take care of it while refactoring Normal anyway

pnkraemer commented 4 years ago

Resolved if you approve of the changes in the last commit :)