Skip to content

Commit 8f5351c

Browse files
authored
Merge pull request numpy#28502 from guan404ming/stub-numpy-random-common
TYP: stub `numpy.random._common`
2 parents c79af59 + e59f132 commit 8f5351c

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

numpy/random/_common.pyi

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
from collections.abc import Callable
2+
from typing import Any, NamedTuple, TypeAlias
3+
4+
import numpy as np
5+
6+
__all__: list[str] = ["interface"]
7+
8+
_CDataVoidPointer: TypeAlias = Any
9+
10+
class interface(NamedTuple):
11+
state_address: int
12+
state: _CDataVoidPointer
13+
next_uint64: Callable[..., np.uint64]
14+
next_uint32: Callable[..., np.uint32]
15+
next_double: Callable[..., np.float64]
16+
bit_generator: _CDataVoidPointer

numpy/random/meson.build

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ py.install_sources(
101101
'__init__.pyi',
102102
'_bounded_integers.pyi',
103103
'_common.pxd',
104+
'_common.pyi',
104105
'_generator.pyi',
105106
'_mt19937.pyi',
106107
'_pcg64.pyi',

0 commit comments

Comments
 (0)