8000 MAINT: stats.UnivariateDistribution: add attribute _discrete by mdhaber · Pull Request #13 · j-bowhay/scipy · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

MAINT: stats.UnivariateDistribution: add attribute _discrete #13

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

Draft
wants to merge 2 commits into
base: discrete_shift
Choose a base branch
from

Conversation

mdhaber
Copy link
@mdhaber mdhaber commented May 15, 2025

I think this solves the immediate problem. There are a few others to work out.

I probably should have used a _type string instead of _discrete boolean, but it's OK for now.

8000

@mdhaber mdhaber force-pushed the discrete_shift_patch branch from 3b61043 to f546110 Compare May 23, 2025 05:50
Comment on lines -3621 to -3622
integral = (loc == np.round(loc))
loc[~integral] = np.nan
Copy link
Author
@mdhaber mdhaber May 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If non-integral values are going to result in NaN, we'd want to use the parameter infrastructure to deal with this. This suggests the need for different discrete and continuous shifted/scaled distributions - the continuous ones accept continuous loc/scale parameters, the discrete versions only accept integral ones.

I need to think about exactly how I want to do this, though. I'm not certain there should be se 8000 parate discrete and continuous shifted/scaled classes.

@mdhaber mdhaber marked this pull request as draft May 23, 2025 05:54
@j-bowhay
Copy link
Owner

Sorry I completely missed the notification for this. I'll take a look

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

Successfully merging this pull request may close these issues.

2 participants
0