Skip to content

Commit 70a7bcb

Browse files
committed
add __init__.py and warning
1 parent df9399a commit 70a7bcb

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/isotropic/algos/__init__.py

Whitespace-only changes.

src/isotropic/utils/distribution.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
"""This module contains functions for relevant probability distributions"""
22

3+
import warnings
4+
35
import jax.numpy as jnp
46
from jax import Array
57
from scipy.special import factorial2
@@ -77,6 +79,10 @@ def double_factorial_ratio_jax(num: int, den: int) -> Array:
7779
-----
7880
For very large numbers, this is numerically stable only when |num - den| is ~5.
7981
"""
82+
warnings.warn(
83+
"This is an experimental implementation. There are known issues when with using this for numbers larger than 2**8",
84+
UserWarning,
85+
)
8086
if abs(num - den) > 4:
8187
raise ValueError("num and den should be close to each other")
8288
num_elems = jnp.arange(num, 0, -2, dtype=jnp.uint64)

0 commit comments

Comments
 (0)