Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] StudentT: Distribution name is incorrectly overwritten when subclassing #1070

Open
AKuederle opened this issue Nov 9, 2023 · 0 comments

Comments

@AKuederle
Copy link
Contributor

Describe the bug
As the name of the distribution is set in the __init__, any distribution that subclasses another distribution, needs to make sure that name is set after calling super.

This goes wrong for the StudentT distribution.

StudentT().name # <- prints "Normal"

This is an easy fix in this case, but it might be worse it to change the way name is set.
As it is a class and not an instance variable, it might be easier to just define it in the class body directly and not the __init__. This way it can be overwritten without worrying about the correct order in the init.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant