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

X.pdf(x) for Symbol x returns 0 #10075

Closed
gxyd opened this Issue Oct 30, 2015 · 1 comment

Comments

Projects
None yet
2 participants
@gxyd
Copy link
Member

gxyd commented Oct 30, 2015

>>> x = Symbol('x')
>>> from sympy.stats.frv_types import DieDistribution
>>> X = DieDistribution(6)
>>> X.pdf(x)
0

Either this should raise a ValueError or unevaluated. Returning unevaluated seems more favourable.

@jksuom

This comment has been minimized.

Copy link
Member

jksuom commented Oct 30, 2015

X is a uniform discrete distribution with value 1/6 at each point of its space {1, 2, ..., 6}. This could be returned. (And maybe ValueError for invalid argument values.)

gxyd pushed a commit to gxyd/sympy that referenced this issue Oct 30, 2015

gxyd pushed a commit to gxyd/sympy that referenced this issue Oct 30, 2015

gxyd pushed a commit to gxyd/sympy that referenced this issue Nov 4, 2015

gxyd pushed a commit to gxyd/sympy that referenced this issue Nov 4, 2015

Gaurav Dhingra
X.pdf(x) for invalid x in DieDistribution raises ValueError
fixes sympy#10075

PEP-8

KroneckerDelta for X.pdf(x) for Symbol x returned instead of ValueError

`Sum` used instead of `AddWithLimits`

error message changed

@jksuom jksuom closed this in #10083 Nov 5, 2015

skirpichev added a commit to skirpichev/diofant that referenced this issue Jul 16, 2016

X.pdf(x) for invalid x in DieDistribution raises ValueError
This fixes sympy/sympy#10075

KroneckerDelta for X.pdf(x) for Symbol x returned instead of ValueError

`Sum` used instead of `AddWithLimits`

error message changed

// edited by skirpichev

Signed-off-by: Sergey B Kirpichev <skirpichev@gmail.com>

skirpichev added a commit to skirpichev/diofant that referenced this issue Jul 17, 2016

X.pdf(x) for invalid x in DieDistribution raises ValueError
This fixes sympy/sympy#10075

KroneckerDelta for X.pdf(x) for Symbol x returned instead of ValueError

`Sum` used instead of `AddWithLimits`

error message changed

// edited by skirpichev

Signed-off-by: Sergey B Kirpichev <skirpichev@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment