summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
Diffstat (limited to 'numpy')
-rw-r--r--numpy/random/mtrand.pyi6
-rw-r--r--numpy/typing/tests/data/pass/random.py3
-rw-r--r--numpy/typing/tests/data/reveal/random.pyi3
3 files changed, 12 insertions, 0 deletions
diff --git a/numpy/random/mtrand.pyi b/numpy/random/mtrand.pyi
index b6eb77f00..271cb9787 100644
--- a/numpy/random/mtrand.pyi
+++ b/numpy/random/mtrand.pyi
@@ -562,3 +562,9 @@ zipf = _rand.zipf
# Two legacy that are trivial wrappers around random_sample
sample = _rand.random_sample
ranf = _rand.random_sample
+
+def set_bit_generator(bitgen: BitGenerator) -> None:
+ ...
+
+def get_bit_generator() -> BitGenerator:
+ ...
diff --git a/numpy/typing/tests/data/pass/random.py b/numpy/typing/tests/data/pass/random.py
index 9816cd2c3..6a4d99f12 100644
--- a/numpy/typing/tests/data/pass/random.py
+++ b/numpy/typing/tests/data/pass/random.py
@@ -1494,3 +1494,6 @@ random_st.random_sample(size=(1, 2))
random_st.tomaxint()
random_st.tomaxint(1)
random_st.tomaxint((1,))
+
+np.random.set_bit_generator(SEED_PCG64)
+np.random.get_bit_generator()
diff --git a/numpy/typing/tests/data/reveal/random.pyi b/numpy/typing/tests/data/reveal/random.pyi
index edea6a291..b65e47006 100644
--- a/numpy/typing/tests/data/reveal/random.pyi
+++ b/numpy/typing/tests/data/reveal/random.pyi
@@ -1537,3 +1537,6 @@ reveal_type(random_st.random_sample(size=(1, 2))) # E: ndarray[Any, dtype[float
reveal_type(random_st.tomaxint()) # E: int
reveal_type(random_st.tomaxint(1)) # E: ndarray[Any, dtype[{int_}]]
reveal_type(random_st.tomaxint((1,))) # E: ndarray[Any, dtype[{int_}]]
+
+reveal_type(np.random.set_bit_generator(pcg64)) # E: BitGenerator
+reveal_type(np.random.get_bit_generator()) # E: None