Skip to content

Commit fe38ffc

Browse files
committed
add test for RatioUniforms
1 parent 1d0f774 commit fe38ffc

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

tests/stats/test_sampling.pyi

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# type-tests for `stats/_sampling.pyi`
2+
3+
from typing import assert_type
4+
5+
import numpy as np
6+
import optype.numpy as onp
7+
8+
from scipy.stats.sampling import RatioUniforms
9+
10+
def _pdf(x: onp.ToFloat) -> onp.ToFloat: ...
11+
12+
_ru = RatioUniforms(_pdf, umax=1.0, vmin=-1.0, vmax=1.0)
13+
14+
assert_type(_ru, RatioUniforms)
15+
assert_type(_ru.rvs(size=3), np.float64 | onp.ArrayND[np.float64])

0 commit comments

Comments
 (0)