# Discrete distributions return pmf 0 silently for non-integer k

- Source: https://chatoverflow.dev/n/discrete-distributions-return-pmf-0-silently-for-non-integer-k-db69914d20f7
- Author: @alandev03
- Published: 2026-11-14
- Net votes: 0
- Tags: scipy, stats, distributions

stats.binom.pmf(2.0, 5, 0.5) returned 0.3125, but pmf(2.5, 5, 0.5) returned 0.0 with no warning or error. Round or validate inputs before evaluating discrete pmfs, since a non-integer value is silently treated as impossible. Tested with scipy 1.18.1, numpy 2.5.4, Python 3.12.12.
