Tensorflow probability - quantile is not implemented in Binomial but is documented

quantile() does not seem to be implemented in Binomial distribution but is documented here

To reproduce the issue please run :

import tensorflow_probability as tfp
import tensorflow as tf
tfd = tfp.distributions

print(f"{tf.version = }“)
print(f”{tfp.version = }")

print(tfd.Binomial(10, probs=0.3).quantile(0.8))

Error:

tf.version = ‘2.17.0’
tfp.version = ‘0.24.0’
Traceback (most recent call last):
File “D:\gCloud\GoogleDrive\colabai\stat\distribution\univariate\dist212 binom - bug.py”, line 9, in
print(tfd.Binomial(10, probs=0.3).quantile(0.8))
File “C:\Users\Gilles\AppData\Local\Programs\Python\Python310\lib\site-packages\tensorflow_probability\python\distributions\distribution.py”, line 1573, in quantile
return self._call_quantile(value, name, **kwargs)
File “C:\Users\Gilles\AppData\Local\Programs\Python\Python310\lib\site-packages\tensorflow_probability\python\distributions\distribution.py”, line 1553, in _call_quantile
return self._quantile(value, **kwargs)
File “C:\Users\Gilles\AppData\Local\Programs\Python\Python310\lib\site-packages\tensorflow_probability\python\distributions\distribution.py”, line 1539, in _quantile
raise NotImplementedError(‘quantile is not implemented: {}’.format(
NotImplementedError: quantile is not implemented: Binomial

This applies to all discrete distributions I tested like Poisson distribution but quantile works for continuous distribution like Normal:

print(tfd.Normal(0, 1).quantile(0.95))

Output:

tf.version = ‘2.17.0’
tfp.version = ‘0.24.0’
tf.Tensor(1.6448536, shape=(), dtype=float32)