diff --git a/lib/python3.12/site-packages/aiohappyeyeballs/__init__.py b/lib/python3.12/site-packages/aiohappyeyeballs/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..71c689cc83ffdec6c079a22984cf80a5ab7bb272 --- /dev/null +++ b/lib/python3.12/site-packages/aiohappyeyeballs/__init__.py @@ -0,0 +1,14 @@ +__version__ = "2.6.1" + +from .impl import start_connection +from .types import AddrInfoType, SocketFactoryType +from .utils import addr_to_addr_infos, pop_addr_infos_interleave, remove_addr_infos + +__all__ = ( + "AddrInfoType", + "SocketFactoryType", + "addr_to_addr_infos", + "pop_addr_infos_interleave", + "remove_addr_infos", + "start_connection", +) diff --git a/lib/python3.12/site-packages/aiohappyeyeballs/__pycache__/__init__.cpython-312.pyc b/lib/python3.12/site-packages/aiohappyeyeballs/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e693ce5ac094a57e7e3b46efb102b8801d3f5046 Binary files /dev/null and b/lib/python3.12/site-packages/aiohappyeyeballs/__pycache__/__init__.cpython-312.pyc differ diff --git a/lib/python3.12/site-packages/aiohappyeyeballs/__pycache__/_staggered.cpython-312.pyc b/lib/python3.12/site-packages/aiohappyeyeballs/__pycache__/_staggered.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..739077ba929e8228965a13499358140bc9e71697 Binary files /dev/null and b/lib/python3.12/site-packages/aiohappyeyeballs/__pycache__/_staggered.cpython-312.pyc differ diff --git a/lib/python3.12/site-packages/aiohappyeyeballs/__pycache__/impl.cpython-312.pyc b/lib/python3.12/site-packages/aiohappyeyeballs/__pycache__/impl.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..3af0dc8d358ea5c812e9635827ce851e65b32906 Binary files /dev/null and b/lib/python3.12/site-packages/aiohappyeyeballs/__pycache__/impl.cpython-312.pyc differ diff --git a/lib/python3.12/site-packages/aiohappyeyeballs/__pycache__/types.cpython-312.pyc b/lib/python3.12/site-packages/aiohappyeyeballs/__pycache__/types.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7f986cfac95f6adba0a7152137706843c7d45728 Binary files /dev/null and b/lib/python3.12/site-packages/aiohappyeyeballs/__pycache__/types.cpython-312.pyc differ diff --git a/lib/python3.12/site-packages/aiohappyeyeballs/__pycache__/utils.cpython-312.pyc b/lib/python3.12/site-packages/aiohappyeyeballs/__pycache__/utils.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..29b13f4a787fe7d47a8af560d2f8d6d74ee159b1 Binary files /dev/null and b/lib/python3.12/site-packages/aiohappyeyeballs/__pycache__/utils.cpython-312.pyc differ diff --git a/lib/python3.12/site-packages/aiohappyeyeballs/_staggered.py b/lib/python3.12/site-packages/aiohappyeyeballs/_staggered.py new file mode 100644 index 0000000000000000000000000000000000000000..9a4ba7205eda2ddeb2ebb6c5a34108c1a61cce6d --- /dev/null +++ b/lib/python3.12/site-packages/aiohappyeyeballs/_staggered.py @@ -0,0 +1,207 @@ +import asyncio +import contextlib + +# PY3.9: Import Callable from typing until we drop Python 3.9 support +# https://github.com/python/cpython/issues/87131 +from typing import ( + TYPE_CHECKING, + Any, + Awaitable, + Callable, + Iterable, + List, + Optional, + Set, + Tuple, + TypeVar, + Union, +) + +_T = TypeVar("_T") + +RE_RAISE_EXCEPTIONS = (SystemExit, KeyboardInterrupt) + + +def _set_result(wait_next: "asyncio.Future[None]") -> None: + """Set the result of a future if it is not already done.""" + if not wait_next.done(): + wait_next.set_result(None) + + +async def _wait_one( + futures: "Iterable[asyncio.Future[Any]]", + loop: asyncio.AbstractEventLoop, +) -> _T: + """Wait for the first future to complete.""" + wait_next = loop.create_future() + + def _on_completion(fut: "asyncio.Future[Any]") -> None: + if not wait_next.done(): + wait_next.set_result(fut) + + for f in futures: + f.add_done_callback(_on_completion) + + try: + return await wait_next + finally: + for f in futures: + f.remove_done_callback(_on_completion) + + +async def staggered_race( + coro_fns: Iterable[Callable[[], Awaitable[_T]]], + delay: Optional[float], + *, + loop: Optional[asyncio.AbstractEventLoop] = None, +) -> Tuple[Optional[_T], Optional[int], List[Optional[BaseException]]]: + """ + Run coroutines with staggered start times and take the first to finish. + + This method takes an iterable of coroutine functions. The first one is + started immediately. From then on, whenever the immediately preceding one + fails (raises an exception), or when *delay* seconds has passed, the next + coroutine is started. This continues until one of the coroutines complete + successfully, in which case all others are cancelled, or until all + coroutines fail. + + The coroutines provided should be well-behaved in the following way: + + * They should only ``return`` if completed successfully. + + * They should always raise an exception if they did not complete + successfully. In particular, if they handle cancellation, they should + probably reraise, like this:: + + try: + # do work + except asyncio.CancelledError: + # undo partially completed work + raise + + Args: + ---- + coro_fns: an iterable of coroutine functions, i.e. callables that + return a coroutine object when called. Use ``functools.partial`` or + lambdas to pass arguments. + + delay: amount of time, in seconds, between starting coroutines. If + ``None``, the coroutines will run sequentially. + + loop: the event loop to use. If ``None``, the running loop is used. + + Returns: + ------- + tuple *(winner_result, winner_index, exceptions)* where + + - *winner_result*: the result of the winning coroutine, or ``None`` + if no coroutines won. + + - *winner_index*: the index of the winning coroutine in + ``coro_fns``, or ``None`` if no coroutines won. If the winning + coroutine may return None on success, *winner_index* can be used + to definitively determine whether any coroutine won. + + - *exceptions*: list of exceptions returned by the coroutines. + ``len(exceptions)`` is equal to the number of coroutines actually + started, and the order is the same as in ``coro_fns``. The winning + coroutine's entry is ``None``. + + """ + loop = loop or asyncio.get_running_loop() + exceptions: List[Optional[BaseException]] = [] + tasks: Set[asyncio.Task[Optional[Tuple[_T, int]]]] = set() + + async def run_one_coro( + coro_fn: Callable[[], Awaitable[_T]], + this_index: int, + start_next: "asyncio.Future[None]", + ) -> Optional[Tuple[_T, int]]: + """ + Run a single coroutine. + + If the coroutine fails, set the exception in the exceptions list and + start the next coroutine by setting the result of the start_next. + + If the coroutine succeeds, return the result and the index of the + coroutine in the coro_fns list. + + If SystemExit or KeyboardInterrupt is raised, re-raise it. + """ + try: + result = await coro_fn() + except RE_RAISE_EXCEPTIONS: + raise + except BaseException as e: + exceptions[this_index] = e + _set_result(start_next) # Kickstart the next coroutine + return None + + return result, this_index + + start_next_timer: Optional[asyncio.TimerHandle] = None + start_next: Optional[asyncio.Future[None]] + task: asyncio.Task[Optional[Tuple[_T, int]]] + done: Union[asyncio.Future[None], asyncio.Task[Optional[Tuple[_T, int]]]] + coro_iter = iter(coro_fns) + this_index = -1 + try: + while True: + if coro_fn := next(coro_iter, None): + this_index += 1 + exceptions.append(None) + start_next = loop.create_future() + task = loop.create_task(run_one_coro(coro_fn, this_index, start_next)) + tasks.add(task) + start_next_timer = ( + loop.call_later(delay, _set_result, start_next) if delay else None + ) + elif not tasks: + # We exhausted the coro_fns list and no tasks are running + # so we have no winner and all coroutines failed. + break + + while tasks or start_next: + done = await _wait_one( + (*tasks, start_next) if start_next else tasks, loop + ) + if done is start_next: + # The current task has failed or the timer has expired + # so we need to start the next task. + start_next = None + if start_next_timer: + start_next_timer.cancel() + start_next_timer = None + + # Break out of the task waiting loop to start the next + # task. + break + + if TYPE_CHECKING: + assert isinstance(done, asyncio.Task) + + tasks.remove(done) + if winner := done.result(): + return *winner, exceptions + finally: + # We either have: + # - a winner + # - all tasks failed + # - a KeyboardInterrupt or SystemExit. + + # + # If the timer is still running, cancel it. + # + if start_next_timer: + start_next_timer.cancel() + + # + # If there are any tasks left, cancel them and than + # wait them so they fill the exceptions list. + # + for task in tasks: + task.cancel() + with contextlib.suppress(asyncio.CancelledError): + await task + + return None, None, exceptions diff --git a/lib/python3.12/site-packages/aiohappyeyeballs/impl.py b/lib/python3.12/site-packages/aiohappyeyeballs/impl.py new file mode 100644 index 0000000000000000000000000000000000000000..8f3919a0c959f6dc84cbdfce470218a9ac7fac65 --- /dev/null +++ b/lib/python3.12/site-packages/aiohappyeyeballs/impl.py @@ -0,0 +1,259 @@ +"""Base implementation.""" + +import asyncio +import collections +import contextlib +import functools +import itertools +import socket +from typing import List, Optional, Sequence, Set, Union + +from . import _staggered +from .types import AddrInfoType, SocketFactoryType + + +async def start_connection( + addr_infos: Sequence[AddrInfoType], + *, + local_addr_infos: Optional[Sequence[AddrInfoType]] = None, + happy_eyeballs_delay: Optional[float] = None, + interleave: Optional[int] = None, + loop: Optional[asyncio.AbstractEventLoop] = None, + socket_factory: Optional[SocketFactoryType] = None, +) -> socket.socket: + """ + Connect to a TCP server. + + Create a socket connection to a specified destination. The + destination is specified as a list of AddrInfoType tuples as + returned from getaddrinfo(). + + The arguments are, in order: + + * ``family``: the address family, e.g. ``socket.AF_INET`` or + ``socket.AF_INET6``. + * ``type``: the socket type, e.g. ``socket.SOCK_STREAM`` or + ``socket.SOCK_DGRAM``. + * ``proto``: the protocol, e.g. ``socket.IPPROTO_TCP`` or + ``socket.IPPROTO_UDP``. + * ``canonname``: the canonical name of the address, e.g. + ``"www.python.org"``. + * ``sockaddr``: the socket address + + This method is a coroutine which will try to establish the connection + in the background. When successful, the coroutine returns a + socket. + + The expected use case is to use this method in conjunction with + loop.create_connection() to establish a connection to a server:: + + socket = await start_connection(addr_infos) + transport, protocol = await loop.create_connection( + MyProtocol, sock=socket, ...) + """ + if not (current_loop := loop): + current_loop = asyncio.get_running_loop() + + single_addr_info = len(addr_infos) == 1 + + if happy_eyeballs_delay is not None and interleave is None: + # If using happy eyeballs, default to interleave addresses by family + interleave = 1 + + if interleave and not single_addr_info: + addr_infos = _interleave_addrinfos(addr_infos, interleave) + + sock: Optional[socket.socket] = None + # uvloop can raise RuntimeError instead of OSError + exceptions: List[List[Union[OSError, RuntimeError]]] = [] + if happy_eyeballs_delay is None or single_addr_info: + # not using happy eyeballs + for addrinfo in addr_infos: + try: + sock = await _connect_sock( + current_loop, + exceptions, + addrinfo, + local_addr_infos, + None, + socket_factory, + ) + break + except (RuntimeError, OSError): + continue + else: # using happy eyeballs + open_sockets: Set[socket.socket] = set() + try: + sock, _, _ = await _staggered.staggered_race( + ( + functools.partial( + _connect_sock, + current_loop, + exceptions, + addrinfo, + local_addr_infos, + open_sockets, + socket_factory, + ) + for addrinfo in addr_infos + ), + happy_eyeballs_delay, + ) + finally: + # If we have a winner, staggered_race will + # cancel the other tasks, however there is a + # small race window where any of the other tasks + # can be done before they are cancelled which + # will leave the socket open. To avoid this problem + # we pass a set to _connect_sock to keep track of + # the open sockets and close them here if there + # are any "runner up" sockets. + for s in open_sockets: + if s is not sock: + with contextlib.suppress(OSError): + s.close() + open_sockets = None # type: ignore[assignment] + + if sock is None: + all_exceptions = [exc for sub in exceptions for exc in sub] + try: + first_exception = all_exceptions[0] + if len(all_exceptions) == 1: + raise first_exception + else: + # If they all have the same str(), raise one. + model = str(first_exception) + if all(str(exc) == model for exc in all_exceptions): + raise first_exception + # Raise a combined exception so the user can see all + # the various error messages. + msg = "Multiple exceptions: {}".format( + ", ".join(str(exc) for exc in all_exceptions) + ) + # If the errno is the same for all exceptions, raise + # an OSError with that errno. + if isinstance(first_exception, OSError): + first_errno = first_exception.errno + if all( + isinstance(exc, OSError) and exc.errno == first_errno + for exc in all_exceptions + ): + raise OSError(first_errno, msg) + elif isinstance(first_exception, RuntimeError) and all( + isinstance(exc, RuntimeError) for exc in all_exceptions + ): + raise RuntimeError(msg) + # We have a mix of OSError and RuntimeError + # so we have to pick which one to raise. + # and we raise OSError for compatibility + raise OSError(msg) + finally: + all_exceptions = None # type: ignore[assignment] + exceptions = None # type: ignore[assignment] + + return sock + + +async def _connect_sock( + loop: asyncio.AbstractEventLoop, + exceptions: List[List[Union[OSError, RuntimeError]]], + addr_info: AddrInfoType, + local_addr_infos: Optional[Sequence[AddrInfoType]] = None, + open_sockets: Optional[Set[socket.socket]] = None, + socket_factory: Optional[SocketFactoryType] = None, +) -> socket.socket: + """ + Create, bind and connect one socket. + + If open_sockets is passed, add the socket to the set of open sockets. + Any failure caught here will remove the socket from the set and close it. + + Callers can use this set to close any sockets that are not the winner + of all staggered tasks in the result there are runner up sockets aka + multiple winners. + """ + my_exceptions: List[Union[OSError, RuntimeError]] = [] + exceptions.append(my_exceptions) + family, type_, proto, _, address = addr_info + sock = None + try: + if socket_factory is not None: + sock = socket_factory(addr_info) + else: + sock = socket.socket(family=family, type=type_, proto=proto) + if open_sockets is not None: + open_sockets.add(sock) + sock.setblocking(False) + if local_addr_infos is not None: + for lfamily, _, _, _, laddr in local_addr_infos: + # skip local addresses of different family + if lfamily != family: + continue + try: + sock.bind(laddr) + break + except OSError as exc: + msg = ( + f"error while attempting to bind on " + f"address {laddr!r}: " + f"{(exc.strerror or '').lower()}" + ) + exc = OSError(exc.errno, msg) + my_exceptions.append(exc) + else: # all bind attempts failed + if my_exceptions: + raise my_exceptions.pop() + else: + raise OSError(f"no matching local address with {family=} found") + await loop.sock_connect(sock, address) + return sock + except (RuntimeError, OSError) as exc: + my_exceptions.append(exc) + if sock is not None: + if open_sockets is not None: + open_sockets.remove(sock) + try: + sock.close() + except OSError as e: + my_exceptions.append(e) + raise + raise + except: + if sock is not None: + if open_sockets is not None: + open_sockets.remove(sock) + try: + sock.close() + except OSError as e: + my_exceptions.append(e) + raise + raise + finally: + exceptions = my_exceptions = None # type: ignore[assignment] + + +def _interleave_addrinfos( + addrinfos: Sequence[AddrInfoType], first_address_family_count: int = 1 +) -> List[AddrInfoType]: + """Interleave list of addrinfo tuples by family.""" + # Group addresses by family + addrinfos_by_family: collections.OrderedDict[int, List[AddrInfoType]] = ( + collections.OrderedDict() + ) + for addr in addrinfos: + family = addr[0] + if family not in addrinfos_by_family: + addrinfos_by_family[family] = [] + addrinfos_by_family[family].append(addr) + addrinfos_lists = list(addrinfos_by_family.values()) + + reordered: List[AddrInfoType] = [] + if first_address_family_count > 1: + reordered.extend(addrinfos_lists[0][: first_address_family_count - 1]) + del addrinfos_lists[0][: first_address_family_count - 1] + reordered.extend( + a + for a in itertools.chain.from_iterable(itertools.zip_longest(*addrinfos_lists)) + if a is not None + ) + return reordered diff --git a/lib/python3.12/site-packages/aiohappyeyeballs/py.typed b/lib/python3.12/site-packages/aiohappyeyeballs/py.typed new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/lib/python3.12/site-packages/aiohappyeyeballs/types.py b/lib/python3.12/site-packages/aiohappyeyeballs/types.py new file mode 100644 index 0000000000000000000000000000000000000000..e8c75074e7ab397af7ee1d1eb57cf04957a7a619 --- /dev/null +++ b/lib/python3.12/site-packages/aiohappyeyeballs/types.py @@ -0,0 +1,17 @@ +"""Types for aiohappyeyeballs.""" + +import socket + +# PY3.9: Import Callable from typing until we drop Python 3.9 support +# https://github.com/python/cpython/issues/87131 +from typing import Callable, Tuple, Union + +AddrInfoType = Tuple[ + Union[int, socket.AddressFamily], + Union[int, socket.SocketKind], + int, + str, + Tuple, # type: ignore[type-arg] +] + +SocketFactoryType = Callable[[AddrInfoType], socket.socket] diff --git a/lib/python3.12/site-packages/aiohappyeyeballs/utils.py b/lib/python3.12/site-packages/aiohappyeyeballs/utils.py new file mode 100644 index 0000000000000000000000000000000000000000..ea29adb9be9edd751cd6d7b93ca9c4bd8d08b658 --- /dev/null +++ b/lib/python3.12/site-packages/aiohappyeyeballs/utils.py @@ -0,0 +1,97 @@ +"""Utility functions for aiohappyeyeballs.""" + +import ipaddress +import socket +from typing import Dict, List, Optional, Tuple, Union + +from .types import AddrInfoType + + +def addr_to_addr_infos( + addr: Optional[ + Union[Tuple[str, int, int, int], Tuple[str, int, int], Tuple[str, int]] + ], +) -> Optional[List[AddrInfoType]]: + """Convert an address tuple to a list of addr_info tuples.""" + if addr is None: + return None + host = addr[0] + port = addr[1] + is_ipv6 = ":" in host + if is_ipv6: + flowinfo = 0 + scopeid = 0 + addr_len = len(addr) + if addr_len >= 4: + scopeid = addr[3] # type: ignore[misc] + if addr_len >= 3: + flowinfo = addr[2] # type: ignore[misc] + addr = (host, port, flowinfo, scopeid) + family = socket.AF_INET6 + else: + addr = (host, port) + family = socket.AF_INET + return [(family, socket.SOCK_STREAM, socket.IPPROTO_TCP, "", addr)] + + +def pop_addr_infos_interleave( + addr_infos: List[AddrInfoType], interleave: Optional[int] = None +) -> None: + """ + Pop addr_info from the list of addr_infos by family up to interleave times. + + The interleave parameter is used to know how many addr_infos for + each family should be popped of the top of the list. + """ + seen: Dict[int, int] = {} + if interleave is None: + interleave = 1 + to_remove: List[AddrInfoType] = [] + for addr_info in addr_infos: + family = addr_info[0] + if family not in seen: + seen[family] = 0 + if seen[family] < interleave: + to_remove.append(addr_info) + seen[family] += 1 + for addr_info in to_remove: + addr_infos.remove(addr_info) + + +def _addr_tuple_to_ip_address( + addr: Union[Tuple[str, int], Tuple[str, int, int, int]], +) -> Union[ + Tuple[ipaddress.IPv4Address, int], Tuple[ipaddress.IPv6Address, int, int, int] +]: + """Convert an address tuple to an IPv4Address.""" + return (ipaddress.ip_address(addr[0]), *addr[1:]) + + +def remove_addr_infos( + addr_infos: List[AddrInfoType], + addr: Union[Tuple[str, int], Tuple[str, int, int, int]], +) -> None: + """ + Remove an address from the list of addr_infos. + + The addr value is typically the return value of + sock.getpeername(). + """ + bad_addrs_infos: List[AddrInfoType] = [] + for addr_info in addr_infos: + if addr_info[-1] == addr: + bad_addrs_infos.append(addr_info) + if bad_addrs_infos: + for bad_addr_info in bad_addrs_infos: + addr_infos.remove(bad_addr_info) + return + # Slow path in case addr is formatted differently + match_addr = _addr_tuple_to_ip_address(addr) + for addr_info in addr_infos: + if match_addr == _addr_tuple_to_ip_address(addr_info[-1]): + bad_addrs_infos.append(addr_info) + if bad_addrs_infos: + for bad_addr_info in bad_addrs_infos: + addr_infos.remove(bad_addr_info) + return + raise ValueError(f"Address {addr} not found in addr_infos") diff --git a/lib/python3.12/site-packages/charset_normalizer/__init__.py b/lib/python3.12/site-packages/charset_normalizer/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..0d3a37990145e94ad85406166dbaf52f4c311e5e --- /dev/null +++ b/lib/python3.12/site-packages/charset_normalizer/__init__.py @@ -0,0 +1,48 @@ +""" +Charset-Normalizer +~~~~~~~~~~~~~~ +The Real First Universal Charset Detector. +A library that helps you read text from an unknown charset encoding. +Motivated by chardet, This package is trying to resolve the issue by taking a new approach. +All IANA character set names for which the Python core library provides codecs are supported. + +Basic usage: + >>> from charset_normalizer import from_bytes + >>> results = from_bytes('Bсеки човек има право на образование. Oбразованието!'.encode('utf_8')) + >>> best_guess = results.best() + >>> str(best_guess) + 'Bсеки човек има право на образование. Oбразованието!' + +Others methods and usages are available - see the full documentation +at . +:copyright: (c) 2021 by Ahmed TAHRI +:license: MIT, see LICENSE for more details. +""" + +from __future__ import annotations + +import logging + +from .api import from_bytes, from_fp, from_path, is_binary +from .legacy import detect +from .models import CharsetMatch, CharsetMatches +from .utils import set_logging_handler +from .version import VERSION, __version__ + +__all__ = ( + "from_fp", + "from_path", + "from_bytes", + "is_binary", + "detect", + "CharsetMatch", + "CharsetMatches", + "__version__", + "VERSION", + "set_logging_handler", +) + +# Attach a NullHandler to the top level logger by default +# https://docs.python.org/3.3/howto/logging.html#configuring-logging-for-a-library + +logging.getLogger("charset_normalizer").addHandler(logging.NullHandler()) diff --git a/lib/python3.12/site-packages/charset_normalizer/__main__.py b/lib/python3.12/site-packages/charset_normalizer/__main__.py new file mode 100644 index 0000000000000000000000000000000000000000..e0e76f7bfbb411d4424d3a1834b0ea803d80ea7e --- /dev/null +++ b/lib/python3.12/site-packages/charset_normalizer/__main__.py @@ -0,0 +1,6 @@ +from __future__ import annotations + +from .cli import cli_detect + +if __name__ == "__main__": + cli_detect() diff --git a/lib/python3.12/site-packages/charset_normalizer/__pycache__/__init__.cpython-312.pyc b/lib/python3.12/site-packages/charset_normalizer/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b9e3a4b2aba81149e477a3062bc55a79217e641e Binary files /dev/null and b/lib/python3.12/site-packages/charset_normalizer/__pycache__/__init__.cpython-312.pyc differ diff --git a/lib/python3.12/site-packages/charset_normalizer/__pycache__/__main__.cpython-312.pyc b/lib/python3.12/site-packages/charset_normalizer/__pycache__/__main__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..846923aba5535b51504366bbb101cd4d58643850 Binary files /dev/null and b/lib/python3.12/site-packages/charset_normalizer/__pycache__/__main__.cpython-312.pyc differ diff --git a/lib/python3.12/site-packages/charset_normalizer/__pycache__/api.cpython-312.pyc b/lib/python3.12/site-packages/charset_normalizer/__pycache__/api.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..591f43c64f8832ded15ca36275f3e8275c93c6d8 Binary files /dev/null and b/lib/python3.12/site-packages/charset_normalizer/__pycache__/api.cpython-312.pyc differ diff --git a/lib/python3.12/site-packages/charset_normalizer/__pycache__/cd.cpython-312.pyc b/lib/python3.12/site-packages/charset_normalizer/__pycache__/cd.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b5725eb8b69f92d63c2ccf20fbc0c55e4852ce7f Binary files /dev/null and b/lib/python3.12/site-packages/charset_normalizer/__pycache__/cd.cpython-312.pyc differ diff --git a/lib/python3.12/site-packages/charset_normalizer/__pycache__/constant.cpython-312.pyc b/lib/python3.12/site-packages/charset_normalizer/__pycache__/constant.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9ae222875faaf2bc7da2297a9cec827f4cccbed3 Binary files /dev/null and b/lib/python3.12/site-packages/charset_normalizer/__pycache__/constant.cpython-312.pyc differ diff --git a/lib/python3.12/site-packages/charset_normalizer/__pycache__/legacy.cpython-312.pyc b/lib/python3.12/site-packages/charset_normalizer/__pycache__/legacy.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4038c91ed7a784e41400a934394a5b1d5fee3f1f Binary files /dev/null and b/lib/python3.12/site-packages/charset_normalizer/__pycache__/legacy.cpython-312.pyc differ diff --git a/lib/python3.12/site-packages/charset_normalizer/__pycache__/md.cpython-312.pyc b/lib/python3.12/site-packages/charset_normalizer/__pycache__/md.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7a333ffe3d8c67486ed5d66593b783d1e1711563 Binary files /dev/null and b/lib/python3.12/site-packages/charset_normalizer/__pycache__/md.cpython-312.pyc differ diff --git a/lib/python3.12/site-packages/charset_normalizer/__pycache__/models.cpython-312.pyc b/lib/python3.12/site-packages/charset_normalizer/__pycache__/models.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ffbfd4a0ab6d88b8a819b04e0a9d38d62e6990ab Binary files /dev/null and b/lib/python3.12/site-packages/charset_normalizer/__pycache__/models.cpython-312.pyc differ diff --git a/lib/python3.12/site-packages/charset_normalizer/__pycache__/utils.cpython-312.pyc b/lib/python3.12/site-packages/charset_normalizer/__pycache__/utils.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c0bdaef74cf04ff6269dead8e437f52f930650a5 Binary files /dev/null and b/lib/python3.12/site-packages/charset_normalizer/__pycache__/utils.cpython-312.pyc differ diff --git a/lib/python3.12/site-packages/charset_normalizer/__pycache__/version.cpython-312.pyc b/lib/python3.12/site-packages/charset_normalizer/__pycache__/version.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..3224b41b9d2796ac2731ba9a25211a2f152979db Binary files /dev/null and b/lib/python3.12/site-packages/charset_normalizer/__pycache__/version.cpython-312.pyc differ diff --git a/lib/python3.12/site-packages/charset_normalizer/api.py b/lib/python3.12/site-packages/charset_normalizer/api.py new file mode 100644 index 0000000000000000000000000000000000000000..ebd96390507bac07ae21d513b45777011a539892 --- /dev/null +++ b/lib/python3.12/site-packages/charset_normalizer/api.py @@ -0,0 +1,669 @@ +from __future__ import annotations + +import logging +from os import PathLike +from typing import BinaryIO + +from .cd import ( + coherence_ratio, + encoding_languages, + mb_encoding_languages, + merge_coherence_ratios, +) +from .constant import IANA_SUPPORTED, TOO_BIG_SEQUENCE, TOO_SMALL_SEQUENCE, TRACE +from .md import mess_ratio +from .models import CharsetMatch, CharsetMatches +from .utils import ( + any_specified_encoding, + cut_sequence_chunks, + iana_name, + identify_sig_or_bom, + is_cp_similar, + is_multi_byte_encoding, + should_strip_sig_or_bom, +) + +logger = logging.getLogger("charset_normalizer") +explain_handler = logging.StreamHandler() +explain_handler.setFormatter( + logging.Formatter("%(asctime)s | %(levelname)s | %(message)s") +) + + +def from_bytes( + sequences: bytes | bytearray, + steps: int = 5, + chunk_size: int = 512, + threshold: float = 0.2, + cp_isolation: list[str] | None = None, + cp_exclusion: list[str] | None = None, + preemptive_behaviour: bool = True, + explain: bool = False, + language_threshold: float = 0.1, + enable_fallback: bool = True, +) -> CharsetMatches: + """ + Given a raw bytes sequence, return the best possibles charset usable to render str objects. + If there is no results, it is a strong indicator that the source is binary/not text. + By default, the process will extract 5 blocks of 512o each to assess the mess and coherence of a given sequence. + And will give up a particular code page after 20% of measured mess. Those criteria are customizable at will. + + The preemptive behavior DOES NOT replace the traditional detection workflow, it prioritize a particular code page + but never take it for granted. Can improve the performance. + + You may want to focus your attention to some code page or/and not others, use cp_isolation and cp_exclusion for that + purpose. + + This function will strip the SIG in the payload/sequence every time except on UTF-16, UTF-32. + By default the library does not setup any handler other than the NullHandler, if you choose to set the 'explain' + toggle to True it will alter the logger configuration to add a StreamHandler that is suitable for debugging. + Custom logging format and handler can be set manually. + """ + + if not isinstance(sequences, (bytearray, bytes)): + raise TypeError( + "Expected object of type bytes or bytearray, got: {}".format( + type(sequences) + ) + ) + + if explain: + previous_logger_level: int = logger.level + logger.addHandler(explain_handler) + logger.setLevel(TRACE) + + length: int = len(sequences) + + if length == 0: + logger.debug("Encoding detection on empty bytes, assuming utf_8 intention.") + if explain: # Defensive: ensure exit path clean handler + logger.removeHandler(explain_handler) + logger.setLevel(previous_logger_level or logging.WARNING) + return CharsetMatches([CharsetMatch(sequences, "utf_8", 0.0, False, [], "")]) + + if cp_isolation is not None: + logger.log( + TRACE, + "cp_isolation is set. use this flag for debugging purpose. " + "limited list of encoding allowed : %s.", + ", ".join(cp_isolation), + ) + cp_isolation = [iana_name(cp, False) for cp in cp_isolation] + else: + cp_isolation = [] + + if cp_exclusion is not None: + logger.log( + TRACE, + "cp_exclusion is set. use this flag for debugging purpose. " + "limited list of encoding excluded : %s.", + ", ".join(cp_exclusion), + ) + cp_exclusion = [iana_name(cp, False) for cp in cp_exclusion] + else: + cp_exclusion = [] + + if length <= (chunk_size * steps): + logger.log( + TRACE, + "override steps (%i) and chunk_size (%i) as content does not fit (%i byte(s) given) parameters.", + steps, + chunk_size, + length, + ) + steps = 1 + chunk_size = length + + if steps > 1 and length / steps < chunk_size: + chunk_size = int(length / steps) + + is_too_small_sequence: bool = len(sequences) < TOO_SMALL_SEQUENCE + is_too_large_sequence: bool = len(sequences) >= TOO_BIG_SEQUENCE + + if is_too_small_sequence: + logger.log( + TRACE, + "Trying to detect encoding from a tiny portion of ({}) byte(s).".format( + length + ), + ) + elif is_too_large_sequence: + logger.log( + TRACE, + "Using lazy str decoding because the payload is quite large, ({}) byte(s).".format( + length + ), + ) + + prioritized_encodings: list[str] = [] + + specified_encoding: str | None = ( + any_specified_encoding(sequences) if preemptive_behaviour else None + ) + + if specified_encoding is not None: + prioritized_encodings.append(specified_encoding) + logger.log( + TRACE, + "Detected declarative mark in sequence. Priority +1 given for %s.", + specified_encoding, + ) + + tested: set[str] = set() + tested_but_hard_failure: list[str] = [] + tested_but_soft_failure: list[str] = [] + + fallback_ascii: CharsetMatch | None = None + fallback_u8: CharsetMatch | None = None + fallback_specified: CharsetMatch | None = None + + results: CharsetMatches = CharsetMatches() + + early_stop_results: CharsetMatches = CharsetMatches() + + sig_encoding, sig_payload = identify_sig_or_bom(sequences) + + if sig_encoding is not None: + prioritized_encodings.append(sig_encoding) + logger.log( + TRACE, + "Detected a SIG or BOM mark on first %i byte(s). Priority +1 given for %s.", + len(sig_payload), + sig_encoding, + ) + + prioritized_encodings.append("ascii") + + if "utf_8" not in prioritized_encodings: + prioritized_encodings.append("utf_8") + + for encoding_iana in prioritized_encodings + IANA_SUPPORTED: + if cp_isolation and encoding_iana not in cp_isolation: + continue + + if cp_exclusion and encoding_iana in cp_exclusion: + continue + + if encoding_iana in tested: + continue + + tested.add(encoding_iana) + + decoded_payload: str | None = None + bom_or_sig_available: bool = sig_encoding == encoding_iana + strip_sig_or_bom: bool = bom_or_sig_available and should_strip_sig_or_bom( + encoding_iana + ) + + if encoding_iana in {"utf_16", "utf_32"} and not bom_or_sig_available: + logger.log( + TRACE, + "Encoding %s won't be tested as-is because it require a BOM. Will try some sub-encoder LE/BE.", + encoding_iana, + ) + continue + if encoding_iana in {"utf_7"} and not bom_or_sig_available: + logger.log( + TRACE, + "Encoding %s won't be tested as-is because detection is unreliable without BOM/SIG.", + encoding_iana, + ) + continue + + try: + is_multi_byte_decoder: bool = is_multi_byte_encoding(encoding_iana) + except (ModuleNotFoundError, ImportError): + logger.log( + TRACE, + "Encoding %s does not provide an IncrementalDecoder", + encoding_iana, + ) + continue + + try: + if is_too_large_sequence and is_multi_byte_decoder is False: + str( + ( + sequences[: int(50e4)] + if strip_sig_or_bom is False + else sequences[len(sig_payload) : int(50e4)] + ), + encoding=encoding_iana, + ) + else: + decoded_payload = str( + ( + sequences + if strip_sig_or_bom is False + else sequences[len(sig_payload) :] + ), + encoding=encoding_iana, + ) + except (UnicodeDecodeError, LookupError) as e: + if not isinstance(e, LookupError): + logger.log( + TRACE, + "Code page %s does not fit given bytes sequence at ALL. %s", + encoding_iana, + str(e), + ) + tested_but_hard_failure.append(encoding_iana) + continue + + similar_soft_failure_test: bool = False + + for encoding_soft_failed in tested_but_soft_failure: + if is_cp_similar(encoding_iana, encoding_soft_failed): + similar_soft_failure_test = True + break + + if similar_soft_failure_test: + logger.log( + TRACE, + "%s is deemed too similar to code page %s and was consider unsuited already. Continuing!", + encoding_iana, + encoding_soft_failed, + ) + continue + + r_ = range( + 0 if not bom_or_sig_available else len(sig_payload), + length, + int(length / steps), + ) + + multi_byte_bonus: bool = ( + is_multi_byte_decoder + and decoded_payload is not None + and len(decoded_payload) < length + ) + + if multi_byte_bonus: + logger.log( + TRACE, + "Code page %s is a multi byte encoding table and it appear that at least one character " + "was encoded using n-bytes.", + encoding_iana, + ) + + max_chunk_gave_up: int = int(len(r_) / 4) + + max_chunk_gave_up = max(max_chunk_gave_up, 2) + early_stop_count: int = 0 + lazy_str_hard_failure = False + + md_chunks: list[str] = [] + md_ratios = [] + + try: + for chunk in cut_sequence_chunks( + sequences, + encoding_iana, + r_, + chunk_size, + bom_or_sig_available, + strip_sig_or_bom, + sig_payload, + is_multi_byte_decoder, + decoded_payload, + ): + md_chunks.append(chunk) + + md_ratios.append( + mess_ratio( + chunk, + threshold, + explain is True and 1 <= len(cp_isolation) <= 2, + ) + ) + + if md_ratios[-1] >= threshold: + early_stop_count += 1 + + if (early_stop_count >= max_chunk_gave_up) or ( + bom_or_sig_available and strip_sig_or_bom is False + ): + break + except ( + UnicodeDecodeError + ) as e: # Lazy str loading may have missed something there + logger.log( + TRACE, + "LazyStr Loading: After MD chunk decode, code page %s does not fit given bytes sequence at ALL. %s", + encoding_iana, + str(e), + ) + early_stop_count = max_chunk_gave_up + lazy_str_hard_failure = True + + # We might want to check the sequence again with the whole content + # Only if initial MD tests passes + if ( + not lazy_str_hard_failure + and is_too_large_sequence + and not is_multi_byte_decoder + ): + try: + sequences[int(50e3) :].decode(encoding_iana, errors="strict") + except UnicodeDecodeError as e: + logger.log( + TRACE, + "LazyStr Loading: After final lookup, code page %s does not fit given bytes sequence at ALL. %s", + encoding_iana, + str(e), + ) + tested_but_hard_failure.append(encoding_iana) + continue + + mean_mess_ratio: float = sum(md_ratios) / len(md_ratios) if md_ratios else 0.0 + if mean_mess_ratio >= threshold or early_stop_count >= max_chunk_gave_up: + tested_but_soft_failure.append(encoding_iana) + logger.log( + TRACE, + "%s was excluded because of initial chaos probing. Gave up %i time(s). " + "Computed mean chaos is %f %%.", + encoding_iana, + early_stop_count, + round(mean_mess_ratio * 100, ndigits=3), + ) + # Preparing those fallbacks in case we got nothing. + if ( + enable_fallback + and encoding_iana + in ["ascii", "utf_8", specified_encoding, "utf_16", "utf_32"] + and not lazy_str_hard_failure + ): + fallback_entry = CharsetMatch( + sequences, + encoding_iana, + threshold, + bom_or_sig_available, + [], + decoded_payload, + preemptive_declaration=specified_encoding, + ) + if encoding_iana == specified_encoding: + fallback_specified = fallback_entry + elif encoding_iana == "ascii": + fallback_ascii = fallback_entry + else: + fallback_u8 = fallback_entry + continue + + logger.log( + TRACE, + "%s passed initial chaos probing. Mean measured chaos is %f %%", + encoding_iana, + round(mean_mess_ratio * 100, ndigits=3), + ) + + if not is_multi_byte_decoder: + target_languages: list[str] = encoding_languages(encoding_iana) + else: + target_languages = mb_encoding_languages(encoding_iana) + + if target_languages: + logger.log( + TRACE, + "{} should target any language(s) of {}".format( + encoding_iana, str(target_languages) + ), + ) + + cd_ratios = [] + + # We shall skip the CD when its about ASCII + # Most of the time its not relevant to run "language-detection" on it. + if encoding_iana != "ascii": + for chunk in md_chunks: + chunk_languages = coherence_ratio( + chunk, + language_threshold, + ",".join(target_languages) if target_languages else None, + ) + + cd_ratios.append(chunk_languages) + + cd_ratios_merged = merge_coherence_ratios(cd_ratios) + + if cd_ratios_merged: + logger.log( + TRACE, + "We detected language {} using {}".format( + cd_ratios_merged, encoding_iana + ), + ) + + current_match = CharsetMatch( + sequences, + encoding_iana, + mean_mess_ratio, + bom_or_sig_available, + cd_ratios_merged, + ( + decoded_payload + if ( + is_too_large_sequence is False + or encoding_iana in [specified_encoding, "ascii", "utf_8"] + ) + else None + ), + preemptive_declaration=specified_encoding, + ) + + results.append(current_match) + + if ( + encoding_iana in [specified_encoding, "ascii", "utf_8"] + and mean_mess_ratio < 0.1 + ): + # If md says nothing to worry about, then... stop immediately! + if mean_mess_ratio == 0.0: + logger.debug( + "Encoding detection: %s is most likely the one.", + current_match.encoding, + ) + if explain: # Defensive: ensure exit path clean handler + logger.removeHandler(explain_handler) + logger.setLevel(previous_logger_level) + return CharsetMatches([current_match]) + + early_stop_results.append(current_match) + + if ( + len(early_stop_results) + and (specified_encoding is None or specified_encoding in tested) + and "ascii" in tested + and "utf_8" in tested + ): + probable_result: CharsetMatch = early_stop_results.best() # type: ignore[assignment] + logger.debug( + "Encoding detection: %s is most likely the one.", + probable_result.encoding, + ) + if explain: # Defensive: ensure exit path clean handler + logger.removeHandler(explain_handler) + logger.setLevel(previous_logger_level) + + return CharsetMatches([probable_result]) + + if encoding_iana == sig_encoding: + logger.debug( + "Encoding detection: %s is most likely the one as we detected a BOM or SIG within " + "the beginning of the sequence.", + encoding_iana, + ) + if explain: # Defensive: ensure exit path clean handler + logger.removeHandler(explain_handler) + logger.setLevel(previous_logger_level) + return CharsetMatches([results[encoding_iana]]) + + if len(results) == 0: + if fallback_u8 or fallback_ascii or fallback_specified: + logger.log( + TRACE, + "Nothing got out of the detection process. Using ASCII/UTF-8/Specified fallback.", + ) + + if fallback_specified: + logger.debug( + "Encoding detection: %s will be used as a fallback match", + fallback_specified.encoding, + ) + results.append(fallback_specified) + elif ( + (fallback_u8 and fallback_ascii is None) + or ( + fallback_u8 + and fallback_ascii + and fallback_u8.fingerprint != fallback_ascii.fingerprint + ) + or (fallback_u8 is not None) + ): + logger.debug("Encoding detection: utf_8 will be used as a fallback match") + results.append(fallback_u8) + elif fallback_ascii: + logger.debug("Encoding detection: ascii will be used as a fallback match") + results.append(fallback_ascii) + + if results: + logger.debug( + "Encoding detection: Found %s as plausible (best-candidate) for content. With %i alternatives.", + results.best().encoding, # type: ignore + len(results) - 1, + ) + else: + logger.debug("Encoding detection: Unable to determine any suitable charset.") + + if explain: + logger.removeHandler(explain_handler) + logger.setLevel(previous_logger_level) + + return results + + +def from_fp( + fp: BinaryIO, + steps: int = 5, + chunk_size: int = 512, + threshold: float = 0.20, + cp_isolation: list[str] | None = None, + cp_exclusion: list[str] | None = None, + preemptive_behaviour: bool = True, + explain: bool = False, + language_threshold: float = 0.1, + enable_fallback: bool = True, +) -> CharsetMatches: + """ + Same thing than the function from_bytes but using a file pointer that is already ready. + Will not close the file pointer. + """ + return from_bytes( + fp.read(), + steps, + chunk_size, + threshold, + cp_isolation, + cp_exclusion, + preemptive_behaviour, + explain, + language_threshold, + enable_fallback, + ) + + +def from_path( + path: str | bytes | PathLike, # type: ignore[type-arg] + steps: int = 5, + chunk_size: int = 512, + threshold: float = 0.20, + cp_isolation: list[str] | None = None, + cp_exclusion: list[str] | None = None, + preemptive_behaviour: bool = True, + explain: bool = False, + language_threshold: float = 0.1, + enable_fallback: bool = True, +) -> CharsetMatches: + """ + Same thing than the function from_bytes but with one extra step. Opening and reading given file path in binary mode. + Can raise IOError. + """ + with open(path, "rb") as fp: + return from_fp( + fp, + steps, + chunk_size, + threshold, + cp_isolation, + cp_exclusion, + preemptive_behaviour, + explain, + language_threshold, + enable_fallback, + ) + + +def is_binary( + fp_or_path_or_payload: PathLike | str | BinaryIO | bytes, # type: ignore[type-arg] + steps: int = 5, + chunk_size: int = 512, + threshold: float = 0.20, + cp_isolation: list[str] | None = None, + cp_exclusion: list[str] | None = None, + preemptive_behaviour: bool = True, + explain: bool = False, + language_threshold: float = 0.1, + enable_fallback: bool = False, +) -> bool: + """ + Detect if the given input (file, bytes, or path) points to a binary file. aka. not a string. + Based on the same main heuristic algorithms and default kwargs at the sole exception that fallbacks match + are disabled to be stricter around ASCII-compatible but unlikely to be a string. + """ + if isinstance(fp_or_path_or_payload, (str, PathLike)): + guesses = from_path( + fp_or_path_or_payload, + steps=steps, + chunk_size=chunk_size, + threshold=threshold, + cp_isolation=cp_isolation, + cp_exclusion=cp_exclusion, + preemptive_behaviour=preemptive_behaviour, + explain=explain, + language_threshold=language_threshold, + enable_fallback=enable_fallback, + ) + elif isinstance( + fp_or_path_or_payload, + ( + bytes, + bytearray, + ), + ): + guesses = from_bytes( + fp_or_path_or_payload, + steps=steps, + chunk_size=chunk_size, + threshold=threshold, + cp_isolation=cp_isolation, + cp_exclusion=cp_exclusion, + preemptive_behaviour=preemptive_behaviour, + explain=explain, + language_threshold=language_threshold, + enable_fallback=enable_fallback, + ) + else: + guesses = from_fp( + fp_or_path_or_payload, + steps=steps, + chunk_size=chunk_size, + threshold=threshold, + cp_isolation=cp_isolation, + cp_exclusion=cp_exclusion, + preemptive_behaviour=preemptive_behaviour, + explain=explain, + language_threshold=language_threshold, + enable_fallback=enable_fallback, + ) + + return not guesses diff --git a/lib/python3.12/site-packages/charset_normalizer/cd.py b/lib/python3.12/site-packages/charset_normalizer/cd.py new file mode 100644 index 0000000000000000000000000000000000000000..71a3ed5197f788135bb700a15a64594780aa6337 --- /dev/null +++ b/lib/python3.12/site-packages/charset_normalizer/cd.py @@ -0,0 +1,395 @@ +from __future__ import annotations + +import importlib +from codecs import IncrementalDecoder +from collections import Counter +from functools import lru_cache +from typing import Counter as TypeCounter + +from .constant import ( + FREQUENCIES, + KO_NAMES, + LANGUAGE_SUPPORTED_COUNT, + TOO_SMALL_SEQUENCE, + ZH_NAMES, +) +from .md import is_suspiciously_successive_range +from .models import CoherenceMatches +from .utils import ( + is_accentuated, + is_latin, + is_multi_byte_encoding, + is_unicode_range_secondary, + unicode_range, +) + + +def encoding_unicode_range(iana_name: str) -> list[str]: + """ + Return associated unicode ranges in a single byte code page. + """ + if is_multi_byte_encoding(iana_name): + raise OSError("Function not supported on multi-byte code page") + + decoder = importlib.import_module(f"encodings.{iana_name}").IncrementalDecoder + + p: IncrementalDecoder = decoder(errors="ignore") + seen_ranges: dict[str, int] = {} + character_count: int = 0 + + for i in range(0x40, 0xFF): + chunk: str = p.decode(bytes([i])) + + if chunk: + character_range: str | None = unicode_range(chunk) + + if character_range is None: + continue + + if is_unicode_range_secondary(character_range) is False: + if character_range not in seen_ranges: + seen_ranges[character_range] = 0 + seen_ranges[character_range] += 1 + character_count += 1 + + return sorted( + [ + character_range + for character_range in seen_ranges + if seen_ranges[character_range] / character_count >= 0.15 + ] + ) + + +def unicode_range_languages(primary_range: str) -> list[str]: + """ + Return inferred languages used with a unicode range. + """ + languages: list[str] = [] + + for language, characters in FREQUENCIES.items(): + for character in characters: + if unicode_range(character) == primary_range: + languages.append(language) + break + + return languages + + +@lru_cache() +def encoding_languages(iana_name: str) -> list[str]: + """ + Single-byte encoding language association. Some code page are heavily linked to particular language(s). + This function does the correspondence. + """ + unicode_ranges: list[str] = encoding_unicode_range(iana_name) + primary_range: str | None = None + + for specified_range in unicode_ranges: + if "Latin" not in specified_range: + primary_range = specified_range + break + + if primary_range is None: + return ["Latin Based"] + + return unicode_range_languages(primary_range) + + +@lru_cache() +def mb_encoding_languages(iana_name: str) -> list[str]: + """ + Multi-byte encoding language association. Some code page are heavily linked to particular language(s). + This function does the correspondence. + """ + if ( + iana_name.startswith("shift_") + or iana_name.startswith("iso2022_jp") + or iana_name.startswith("euc_j") + or iana_name == "cp932" + ): + return ["Japanese"] + if iana_name.startswith("gb") or iana_name in ZH_NAMES: + return ["Chinese"] + if iana_name.startswith("iso2022_kr") or iana_name in KO_NAMES: + return ["Korean"] + + return [] + + +@lru_cache(maxsize=LANGUAGE_SUPPORTED_COUNT) +def get_target_features(language: str) -> tuple[bool, bool]: + """ + Determine main aspects from a supported language if it contains accents and if is pure Latin. + """ + target_have_accents: bool = False + target_pure_latin: bool = True + + for character in FREQUENCIES[language]: + if not target_have_accents and is_accentuated(character): + target_have_accents = True + if target_pure_latin and is_latin(character) is False: + target_pure_latin = False + + return target_have_accents, target_pure_latin + + +def alphabet_languages( + characters: list[str], ignore_non_latin: bool = False +) -> list[str]: + """ + Return associated languages associated to given characters. + """ + languages: list[tuple[str, float]] = [] + + source_have_accents = any(is_accentuated(character) for character in characters) + + for language, language_characters in FREQUENCIES.items(): + target_have_accents, target_pure_latin = get_target_features(language) + + if ignore_non_latin and target_pure_latin is False: + continue + + if target_have_accents is False and source_have_accents: + continue + + character_count: int = len(language_characters) + + character_match_count: int = len( + [c for c in language_characters if c in characters] + ) + + ratio: float = character_match_count / character_count + + if ratio >= 0.2: + languages.append((language, ratio)) + + languages = sorted(languages, key=lambda x: x[1], reverse=True) + + return [compatible_language[0] for compatible_language in languages] + + +def characters_popularity_compare( + language: str, ordered_characters: list[str] +) -> float: + """ + Determine if a ordered characters list (by occurrence from most appearance to rarest) match a particular language. + The result is a ratio between 0. (absolutely no correspondence) and 1. (near perfect fit). + Beware that is function is not strict on the match in order to ease the detection. (Meaning close match is 1.) + """ + if language not in FREQUENCIES: + raise ValueError(f"{language} not available") + + character_approved_count: int = 0 + FREQUENCIES_language_set = set(FREQUENCIES[language]) + + ordered_characters_count: int = len(ordered_characters) + target_language_characters_count: int = len(FREQUENCIES[language]) + + large_alphabet: bool = target_language_characters_count > 26 + + for character, character_rank in zip( + ordered_characters, range(0, ordered_characters_count) + ): + if character not in FREQUENCIES_language_set: + continue + + character_rank_in_language: int = FREQUENCIES[language].index(character) + expected_projection_ratio: float = ( + target_language_characters_count / ordered_characters_count + ) + character_rank_projection: int = int(character_rank * expected_projection_ratio) + + if ( + large_alphabet is False + and abs(character_rank_projection - character_rank_in_language) > 4 + ): + continue + + if ( + large_alphabet is True + and abs(character_rank_projection - character_rank_in_language) + < target_language_characters_count / 3 + ): + character_approved_count += 1 + continue + + characters_before_source: list[str] = FREQUENCIES[language][ + 0:character_rank_in_language + ] + characters_after_source: list[str] = FREQUENCIES[language][ + character_rank_in_language: + ] + characters_before: list[str] = ordered_characters[0:character_rank] + characters_after: list[str] = ordered_characters[character_rank:] + + before_match_count: int = len( + set(characters_before) & set(characters_before_source) + ) + + after_match_count: int = len( + set(characters_after) & set(characters_after_source) + ) + + if len(characters_before_source) == 0 and before_match_count <= 4: + character_approved_count += 1 + continue + + if len(characters_after_source) == 0 and after_match_count <= 4: + character_approved_count += 1 + continue + + if ( + before_match_count / len(characters_before_source) >= 0.4 + or after_match_count / len(characters_after_source) >= 0.4 + ): + character_approved_count += 1 + continue + + return character_approved_count / len(ordered_characters) + + +def alpha_unicode_split(decoded_sequence: str) -> list[str]: + """ + Given a decoded text sequence, return a list of str. Unicode range / alphabet separation. + Ex. a text containing English/Latin with a bit a Hebrew will return two items in the resulting list; + One containing the latin letters and the other hebrew. + """ + layers: dict[str, str] = {} + + for character in decoded_sequence: + if character.isalpha() is False: + continue + + character_range: str | None = unicode_range(character) + + if character_range is None: + continue + + layer_target_range: str | None = None + + for discovered_range in layers: + if ( + is_suspiciously_successive_range(discovered_range, character_range) + is False + ): + layer_target_range = discovered_range + break + + if layer_target_range is None: + layer_target_range = character_range + + if layer_target_range not in layers: + layers[layer_target_range] = character.lower() + continue + + layers[layer_target_range] += character.lower() + + return list(layers.values()) + + +def merge_coherence_ratios(results: list[CoherenceMatches]) -> CoherenceMatches: + """ + This function merge results previously given by the function coherence_ratio. + The return type is the same as coherence_ratio. + """ + per_language_ratios: dict[str, list[float]] = {} + for result in results: + for sub_result in result: + language, ratio = sub_result + if language not in per_language_ratios: + per_language_ratios[language] = [ratio] + continue + per_language_ratios[language].append(ratio) + + merge = [ + ( + language, + round( + sum(per_language_ratios[language]) / len(per_language_ratios[language]), + 4, + ), + ) + for language in per_language_ratios + ] + + return sorted(merge, key=lambda x: x[1], reverse=True) + + +def filter_alt_coherence_matches(results: CoherenceMatches) -> CoherenceMatches: + """ + We shall NOT return "English—" in CoherenceMatches because it is an alternative + of "English". This function only keeps the best match and remove the em-dash in it. + """ + index_results: dict[str, list[float]] = dict() + + for result in results: + language, ratio = result + no_em_name: str = language.replace("—", "") + + if no_em_name not in index_results: + index_results[no_em_name] = [] + + index_results[no_em_name].append(ratio) + + if any(len(index_results[e]) > 1 for e in index_results): + filtered_results: CoherenceMatches = [] + + for language in index_results: + filtered_results.append((language, max(index_results[language]))) + + return filtered_results + + return results + + +@lru_cache(maxsize=2048) +def coherence_ratio( + decoded_sequence: str, threshold: float = 0.1, lg_inclusion: str | None = None +) -> CoherenceMatches: + """ + Detect ANY language that can be identified in given sequence. The sequence will be analysed by layers. + A layer = Character extraction by alphabets/ranges. + """ + + results: list[tuple[str, float]] = [] + ignore_non_latin: bool = False + + sufficient_match_count: int = 0 + + lg_inclusion_list = lg_inclusion.split(",") if lg_inclusion is not None else [] + if "Latin Based" in lg_inclusion_list: + ignore_non_latin = True + lg_inclusion_list.remove("Latin Based") + + for layer in alpha_unicode_split(decoded_sequence): + sequence_frequencies: TypeCounter[str] = Counter(layer) + most_common = sequence_frequencies.most_common() + + character_count: int = sum(o for c, o in most_common) + + if character_count <= TOO_SMALL_SEQUENCE: + continue + + popular_character_ordered: list[str] = [c for c, o in most_common] + + for language in lg_inclusion_list or alphabet_languages( + popular_character_ordered, ignore_non_latin + ): + ratio: float = characters_popularity_compare( + language, popular_character_ordered + ) + + if ratio < threshold: + continue + elif ratio >= 0.8: + sufficient_match_count += 1 + + results.append((language, round(ratio, 4))) + + if sufficient_match_count >= 3: + break + + return sorted( + filter_alt_coherence_matches(results), key=lambda x: x[1], reverse=True + ) diff --git a/lib/python3.12/site-packages/charset_normalizer/cli/__init__.py b/lib/python3.12/site-packages/charset_normalizer/cli/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..543a5a4de49d07690e73df778aa580589d0789c6 --- /dev/null +++ b/lib/python3.12/site-packages/charset_normalizer/cli/__init__.py @@ -0,0 +1,8 @@ +from __future__ import annotations + +from .__main__ import cli_detect, query_yes_no + +__all__ = ( + "cli_detect", + "query_yes_no", +) diff --git a/lib/python3.12/site-packages/charset_normalizer/cli/__main__.py b/lib/python3.12/site-packages/charset_normalizer/cli/__main__.py new file mode 100644 index 0000000000000000000000000000000000000000..cb64156a0fc164442acc4f4517975a5699d26354 --- /dev/null +++ b/lib/python3.12/site-packages/charset_normalizer/cli/__main__.py @@ -0,0 +1,381 @@ +from __future__ import annotations + +import argparse +import sys +import typing +from json import dumps +from os.path import abspath, basename, dirname, join, realpath +from platform import python_version +from unicodedata import unidata_version + +import charset_normalizer.md as md_module +from charset_normalizer import from_fp +from charset_normalizer.models import CliDetectionResult +from charset_normalizer.version import __version__ + + +def query_yes_no(question: str, default: str = "yes") -> bool: + """Ask a yes/no question via input() and return their answer. + + "question" is a string that is presented to the user. + "default" is the presumed answer if the user just hits . + It must be "yes" (the default), "no" or None (meaning + an answer is required of the user). + + The "answer" return value is True for "yes" or False for "no". + + Credit goes to (c) https://stackoverflow.com/questions/3041986/apt-command-line-interface-like-yes-no-input + """ + valid = {"yes": True, "y": True, "ye": True, "no": False, "n": False} + if default is None: + prompt = " [y/n] " + elif default == "yes": + prompt = " [Y/n] " + elif default == "no": + prompt = " [y/N] " + else: + raise ValueError("invalid default answer: '%s'" % default) + + while True: + sys.stdout.write(question + prompt) + choice = input().lower() + if default is not None and choice == "": + return valid[default] + elif choice in valid: + return valid[choice] + else: + sys.stdout.write("Please respond with 'yes' or 'no' (or 'y' or 'n').\n") + + +class FileType: + """Factory for creating file object types + + Instances of FileType are typically passed as type= arguments to the + ArgumentParser add_argument() method. + + Keyword Arguments: + - mode -- A string indicating how the file is to be opened. Accepts the + same values as the builtin open() function. + - bufsize -- The file's desired buffer size. Accepts the same values as + the builtin open() function. + - encoding -- The file's encoding. Accepts the same values as the + builtin open() function. + - errors -- A string indicating how encoding and decoding errors are to + be handled. Accepts the same value as the builtin open() function. + + Backported from CPython 3.12 + """ + + def __init__( + self, + mode: str = "r", + bufsize: int = -1, + encoding: str | None = None, + errors: str | None = None, + ): + self._mode = mode + self._bufsize = bufsize + self._encoding = encoding + self._errors = errors + + def __call__(self, string: str) -> typing.IO: # type: ignore[type-arg] + # the special argument "-" means sys.std{in,out} + if string == "-": + if "r" in self._mode: + return sys.stdin.buffer if "b" in self._mode else sys.stdin + elif any(c in self._mode for c in "wax"): + return sys.stdout.buffer if "b" in self._mode else sys.stdout + else: + msg = f'argument "-" with mode {self._mode}' + raise ValueError(msg) + + # all other arguments are used as file names + try: + return open(string, self._mode, self._bufsize, self._encoding, self._errors) + except OSError as e: + message = f"can't open '{string}': {e}" + raise argparse.ArgumentTypeError(message) + + def __repr__(self) -> str: + args = self._mode, self._bufsize + kwargs = [("encoding", self._encoding), ("errors", self._errors)] + args_str = ", ".join( + [repr(arg) for arg in args if arg != -1] + + [f"{kw}={arg!r}" for kw, arg in kwargs if arg is not None] + ) + return f"{type(self).__name__}({args_str})" + + +def cli_detect(argv: list[str] | None = None) -> int: + """ + CLI assistant using ARGV and ArgumentParser + :param argv: + :return: 0 if everything is fine, anything else equal trouble + """ + parser = argparse.ArgumentParser( + description="The Real First Universal Charset Detector. " + "Discover originating encoding used on text file. " + "Normalize text to unicode." + ) + + parser.add_argument( + "files", type=FileType("rb"), nargs="+", help="File(s) to be analysed" + ) + parser.add_argument( + "-v", + "--verbose", + action="store_true", + default=False, + dest="verbose", + help="Display complementary information about file if any. " + "Stdout will contain logs about the detection process.", + ) + parser.add_argument( + "-a", + "--with-alternative", + action="store_true", + default=False, + dest="alternatives", + help="Output complementary possibilities if any. Top-level JSON WILL be a list.", + ) + parser.add_argument( + "-n", + "--normalize", + action="store_true", + default=False, + dest="normalize", + help="Permit to normalize input file. If not set, program does not write anything.", + ) + parser.add_argument( + "-m", + "--minimal", + action="store_true", + default=False, + dest="minimal", + help="Only output the charset detected to STDOUT. Disabling JSON output.", + ) + parser.add_argument( + "-r", + "--replace", + action="store_true", + default=False, + dest="replace", + help="Replace file when trying to normalize it instead of creating a new one.", + ) + parser.add_argument( + "-f", + "--force", + action="store_true", + default=False, + dest="force", + help="Replace file without asking if you are sure, use this flag with caution.", + ) + parser.add_argument( + "-i", + "--no-preemptive", + action="store_true", + default=False, + dest="no_preemptive", + help="Disable looking at a charset declaration to hint the detector.", + ) + parser.add_argument( + "-t", + "--threshold", + action="store", + default=0.2, + type=float, + dest="threshold", + help="Define a custom maximum amount of noise allowed in decoded content. 0. <= noise <= 1.", + ) + parser.add_argument( + "--version", + action="version", + version="Charset-Normalizer {} - Python {} - Unicode {} - SpeedUp {}".format( + __version__, + python_version(), + unidata_version, + "OFF" if md_module.__file__.lower().endswith(".py") else "ON", + ), + help="Show version information and exit.", + ) + + args = parser.parse_args(argv) + + if args.replace is True and args.normalize is False: + if args.files: + for my_file in args.files: + my_file.close() + print("Use --replace in addition of --normalize only.", file=sys.stderr) + return 1 + + if args.force is True and args.replace is False: + if args.files: + for my_file in args.files: + my_file.close() + print("Use --force in addition of --replace only.", file=sys.stderr) + return 1 + + if args.threshold < 0.0 or args.threshold > 1.0: + if args.files: + for my_file in args.files: + my_file.close() + print("--threshold VALUE should be between 0. AND 1.", file=sys.stderr) + return 1 + + x_ = [] + + for my_file in args.files: + matches = from_fp( + my_file, + threshold=args.threshold, + explain=args.verbose, + preemptive_behaviour=args.no_preemptive is False, + ) + + best_guess = matches.best() + + if best_guess is None: + print( + 'Unable to identify originating encoding for "{}". {}'.format( + my_file.name, + ( + "Maybe try increasing maximum amount of chaos." + if args.threshold < 1.0 + else "" + ), + ), + file=sys.stderr, + ) + x_.append( + CliDetectionResult( + abspath(my_file.name), + None, + [], + [], + "Unknown", + [], + False, + 1.0, + 0.0, + None, + True, + ) + ) + else: + x_.append( + CliDetectionResult( + abspath(my_file.name), + best_guess.encoding, + best_guess.encoding_aliases, + [ + cp + for cp in best_guess.could_be_from_charset + if cp != best_guess.encoding + ], + best_guess.language, + best_guess.alphabets, + best_guess.bom, + best_guess.percent_chaos, + best_guess.percent_coherence, + None, + True, + ) + ) + + if len(matches) > 1 and args.alternatives: + for el in matches: + if el != best_guess: + x_.append( + CliDetectionResult( + abspath(my_file.name), + el.encoding, + el.encoding_aliases, + [ + cp + for cp in el.could_be_from_charset + if cp != el.encoding + ], + el.language, + el.alphabets, + el.bom, + el.percent_chaos, + el.percent_coherence, + None, + False, + ) + ) + + if args.normalize is True: + if best_guess.encoding.startswith("utf") is True: + print( + '"{}" file does not need to be normalized, as it already came from unicode.'.format( + my_file.name + ), + file=sys.stderr, + ) + if my_file.closed is False: + my_file.close() + continue + + dir_path = dirname(realpath(my_file.name)) + file_name = basename(realpath(my_file.name)) + + o_: list[str] = file_name.split(".") + + if args.replace is False: + o_.insert(-1, best_guess.encoding) + if my_file.closed is False: + my_file.close() + elif ( + args.force is False + and query_yes_no( + 'Are you sure to normalize "{}" by replacing it ?'.format( + my_file.name + ), + "no", + ) + is False + ): + if my_file.closed is False: + my_file.close() + continue + + try: + x_[0].unicode_path = join(dir_path, ".".join(o_)) + + with open(x_[0].unicode_path, "wb") as fp: + fp.write(best_guess.output()) + except OSError as e: + print(str(e), file=sys.stderr) + if my_file.closed is False: + my_file.close() + return 2 + + if my_file.closed is False: + my_file.close() + + if args.minimal is False: + print( + dumps( + [el.__dict__ for el in x_] if len(x_) > 1 else x_[0].__dict__, + ensure_ascii=True, + indent=4, + ) + ) + else: + for my_file in args.files: + print( + ", ".join( + [ + el.encoding or "undefined" + for el in x_ + if el.path == abspath(my_file.name) + ] + ) + ) + + return 0 + + +if __name__ == "__main__": + cli_detect() diff --git a/lib/python3.12/site-packages/charset_normalizer/cli/__pycache__/__init__.cpython-312.pyc b/lib/python3.12/site-packages/charset_normalizer/cli/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e95d69647960339d0a98f18c3613574429213403 Binary files /dev/null and b/lib/python3.12/site-packages/charset_normalizer/cli/__pycache__/__init__.cpython-312.pyc differ diff --git a/lib/python3.12/site-packages/charset_normalizer/cli/__pycache__/__main__.cpython-312.pyc b/lib/python3.12/site-packages/charset_normalizer/cli/__pycache__/__main__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1679ad8baa69abf8eb05dd0cbc1ea9613c6622e6 Binary files /dev/null and b/lib/python3.12/site-packages/charset_normalizer/cli/__pycache__/__main__.cpython-312.pyc differ diff --git a/lib/python3.12/site-packages/charset_normalizer/constant.py b/lib/python3.12/site-packages/charset_normalizer/constant.py new file mode 100644 index 0000000000000000000000000000000000000000..cc71a019c7fdd7b99c7fdd5b6bb084ab2840ff63 --- /dev/null +++ b/lib/python3.12/site-packages/charset_normalizer/constant.py @@ -0,0 +1,2015 @@ +from __future__ import annotations + +from codecs import BOM_UTF8, BOM_UTF16_BE, BOM_UTF16_LE, BOM_UTF32_BE, BOM_UTF32_LE +from encodings.aliases import aliases +from re import IGNORECASE +from re import compile as re_compile + +# Contain for each eligible encoding a list of/item bytes SIG/BOM +ENCODING_MARKS: dict[str, bytes | list[bytes]] = { + "utf_8": BOM_UTF8, + "utf_7": [ + b"\x2b\x2f\x76\x38", + b"\x2b\x2f\x76\x39", + b"\x2b\x2f\x76\x2b", + b"\x2b\x2f\x76\x2f", + b"\x2b\x2f\x76\x38\x2d", + ], + "gb18030": b"\x84\x31\x95\x33", + "utf_32": [BOM_UTF32_BE, BOM_UTF32_LE], + "utf_16": [BOM_UTF16_BE, BOM_UTF16_LE], +} + +TOO_SMALL_SEQUENCE: int = 32 +TOO_BIG_SEQUENCE: int = int(10e6) + +UTF8_MAXIMAL_ALLOCATION: int = 1_112_064 + +# Up-to-date Unicode ucd/15.0.0 +UNICODE_RANGES_COMBINED: dict[str, range] = { + "Control character": range(32), + "Basic Latin": range(32, 128), + "Latin-1 Supplement": range(128, 256), + "Latin Extended-A": range(256, 384), + "Latin Extended-B": range(384, 592), + "IPA Extensions": range(592, 688), + "Spacing Modifier Letters": range(688, 768), + "Combining Diacritical Marks": range(768, 880), + "Greek and Coptic": range(880, 1024), + "Cyrillic": range(1024, 1280), + "Cyrillic Supplement": range(1280, 1328), + "Armenian": range(1328, 1424), + "Hebrew": range(1424, 1536), + "Arabic": range(1536, 1792), + "Syriac": range(1792, 1872), + "Arabic Supplement": range(1872, 1920), + "Thaana": range(1920, 1984), + "NKo": range(1984, 2048), + "Samaritan": range(2048, 2112), + "Mandaic": range(2112, 2144), + "Syriac Supplement": range(2144, 2160), + "Arabic Extended-B": range(2160, 2208), + "Arabic Extended-A": range(2208, 2304), + "Devanagari": range(2304, 2432), + "Bengali": range(2432, 2560), + "Gurmukhi": range(2560, 2688), + "Gujarati": range(2688, 2816), + "Oriya": range(2816, 2944), + "Tamil": range(2944, 3072), + "Telugu": range(3072, 3200), + "Kannada": range(3200, 3328), + "Malayalam": range(3328, 3456), + "Sinhala": range(3456, 3584), + "Thai": range(3584, 3712), + "Lao": range(3712, 3840), + "Tibetan": range(3840, 4096), + "Myanmar": range(4096, 4256), + "Georgian": range(4256, 4352), + "Hangul Jamo": range(4352, 4608), + "Ethiopic": range(4608, 4992), + "Ethiopic Supplement": range(4992, 5024), + "Cherokee": range(5024, 5120), + "Unified Canadian Aboriginal Syllabics": range(5120, 5760), + "Ogham": range(5760, 5792), + "Runic": range(5792, 5888), + "Tagalog": range(5888, 5920), + "Hanunoo": range(5920, 5952), + "Buhid": range(5952, 5984), + "Tagbanwa": range(5984, 6016), + "Khmer": range(6016, 6144), + "Mongolian": range(6144, 6320), + "Unified Canadian Aboriginal Syllabics Extended": range(6320, 6400), + "Limbu": range(6400, 6480), + "Tai Le": range(6480, 6528), + "New Tai Lue": range(6528, 6624), + "Khmer Symbols": range(6624, 6656), + "Buginese": range(6656, 6688), + "Tai Tham": range(6688, 6832), + "Combining Diacritical Marks Extended": range(6832, 6912), + "Balinese": range(6912, 7040), + "Sundanese": range(7040, 7104), + "Batak": range(7104, 7168), + "Lepcha": range(7168, 7248), + "Ol Chiki": range(7248, 7296), + "Cyrillic Extended-C": range(7296, 7312), + "Georgian Extended": range(7312, 7360), + "Sundanese Supplement": range(7360, 7376), + "Vedic Extensions": range(7376, 7424), + "Phonetic Extensions": range(7424, 7552), + "Phonetic Extensions Supplement": range(7552, 7616), + "Combining Diacritical Marks Supplement": range(7616, 7680), + "Latin Extended Additional": range(7680, 7936), + "Greek Extended": range(7936, 8192), + "General Punctuation": range(8192, 8304), + "Superscripts and Subscripts": range(8304, 8352), + "Currency Symbols": range(8352, 8400), + "Combining Diacritical Marks for Symbols": range(8400, 8448), + "Letterlike Symbols": range(8448, 8528), + "Number Forms": range(8528, 8592), + "Arrows": range(8592, 8704), + "Mathematical Operators": range(8704, 8960), + "Miscellaneous Technical": range(8960, 9216), + "Control Pictures": range(9216, 9280), + "Optical Character Recognition": range(9280, 9312), + "Enclosed Alphanumerics": range(9312, 9472), + "Box Drawing": range(9472, 9600), + "Block Elements": range(9600, 9632), + "Geometric Shapes": range(9632, 9728), + "Miscellaneous Symbols": range(9728, 9984), + "Dingbats": range(9984, 10176), + "Miscellaneous Mathematical Symbols-A": range(10176, 10224), + "Supplemental Arrows-A": range(10224, 10240), + "Braille Patterns": range(10240, 10496), + "Supplemental Arrows-B": range(10496, 10624), + "Miscellaneous Mathematical Symbols-B": range(10624, 10752), + "Supplemental Mathematical Operators": range(10752, 11008), + "Miscellaneous Symbols and Arrows": range(11008, 11264), + "Glagolitic": range(11264, 11360), + "Latin Extended-C": range(11360, 11392), + "Coptic": range(11392, 11520), + "Georgian Supplement": range(11520, 11568), + "Tifinagh": range(11568, 11648), + "Ethiopic Extended": range(11648, 11744), + "Cyrillic Extended-A": range(11744, 11776), + "Supplemental Punctuation": range(11776, 11904), + "CJK Radicals Supplement": range(11904, 12032), + "Kangxi Radicals": range(12032, 12256), + "Ideographic Description Characters": range(12272, 12288), + "CJK Symbols and Punctuation": range(12288, 12352), + "Hiragana": range(12352, 12448), + "Katakana": range(12448, 12544), + "Bopomofo": range(12544, 12592), + "Hangul Compatibility Jamo": range(12592, 12688), + "Kanbun": range(12688, 12704), + "Bopomofo Extended": range(12704, 12736), + "CJK Strokes": range(12736, 12784), + "Katakana Phonetic Extensions": range(12784, 12800), + "Enclosed CJK Letters and Months": range(12800, 13056), + "CJK Compatibility": range(13056, 13312), + "CJK Unified Ideographs Extension A": range(13312, 19904), + "Yijing Hexagram Symbols": range(19904, 19968), + "CJK Unified Ideographs": range(19968, 40960), + "Yi Syllables": range(40960, 42128), + "Yi Radicals": range(42128, 42192), + "Lisu": range(42192, 42240), + "Vai": range(42240, 42560), + "Cyrillic Extended-B": range(42560, 42656), + "Bamum": range(42656, 42752), + "Modifier Tone Letters": range(42752, 42784), + "Latin Extended-D": range(42784, 43008), + "Syloti Nagri": range(43008, 43056), + "Common Indic Number Forms": range(43056, 43072), + "Phags-pa": range(43072, 43136), + "Saurashtra": range(43136, 43232), + "Devanagari Extended": range(43232, 43264), + "Kayah Li": range(43264, 43312), + "Rejang": range(43312, 43360), + "Hangul Jamo Extended-A": range(43360, 43392), + "Javanese": range(43392, 43488), + "Myanmar Extended-B": range(43488, 43520), + "Cham": range(43520, 43616), + "Myanmar Extended-A": range(43616, 43648), + "Tai Viet": range(43648, 43744), + "Meetei Mayek Extensions": range(43744, 43776), + "Ethiopic Extended-A": range(43776, 43824), + "Latin Extended-E": range(43824, 43888), + "Cherokee Supplement": range(43888, 43968), + "Meetei Mayek": range(43968, 44032), + "Hangul Syllables": range(44032, 55216), + "Hangul Jamo Extended-B": range(55216, 55296), + "High Surrogates": range(55296, 56192), + "High Private Use Surrogates": range(56192, 56320), + "Low Surrogates": range(56320, 57344), + "Private Use Area": range(57344, 63744), + "CJK Compatibility Ideographs": range(63744, 64256), + "Alphabetic Presentation Forms": range(64256, 64336), + "Arabic Presentation Forms-A": range(64336, 65024), + "Variation Selectors": range(65024, 65040), + "Vertical Forms": range(65040, 65056), + "Combining Half Marks": range(65056, 65072), + "CJK Compatibility Forms": range(65072, 65104), + "Small Form Variants": range(65104, 65136), + "Arabic Presentation Forms-B": range(65136, 65280), + "Halfwidth and Fullwidth Forms": range(65280, 65520), + "Specials": range(65520, 65536), + "Linear B Syllabary": range(65536, 65664), + "Linear B Ideograms": range(65664, 65792), + "Aegean Numbers": range(65792, 65856), + "Ancient Greek Numbers": range(65856, 65936), + "Ancient Symbols": range(65936, 66000), + "Phaistos Disc": range(66000, 66048), + "Lycian": range(66176, 66208), + "Carian": range(66208, 66272), + "Coptic Epact Numbers": range(66272, 66304), + "Old Italic": range(66304, 66352), + "Gothic": range(66352, 66384), + "Old Permic": range(66384, 66432), + "Ugaritic": range(66432, 66464), + "Old Persian": range(66464, 66528), + "Deseret": range(66560, 66640), + "Shavian": range(66640, 66688), + "Osmanya": range(66688, 66736), + "Osage": range(66736, 66816), + "Elbasan": range(66816, 66864), + "Caucasian Albanian": range(66864, 66928), + "Vithkuqi": range(66928, 67008), + "Linear A": range(67072, 67456), + "Latin Extended-F": range(67456, 67520), + "Cypriot Syllabary": range(67584, 67648), + "Imperial Aramaic": range(67648, 67680), + "Palmyrene": range(67680, 67712), + "Nabataean": range(67712, 67760), + "Hatran": range(67808, 67840), + "Phoenician": range(67840, 67872), + "Lydian": range(67872, 67904), + "Meroitic Hieroglyphs": range(67968, 68000), + "Meroitic Cursive": range(68000, 68096), + "Kharoshthi": range(68096, 68192), + "Old South Arabian": range(68192, 68224), + "Old North Arabian": range(68224, 68256), + "Manichaean": range(68288, 68352), + "Avestan": range(68352, 68416), + "Inscriptional Parthian": range(68416, 68448), + "Inscriptional Pahlavi": range(68448, 68480), + "Psalter Pahlavi": range(68480, 68528), + "Old Turkic": range(68608, 68688), + "Old Hungarian": range(68736, 68864), + "Hanifi Rohingya": range(68864, 68928), + "Rumi Numeral Symbols": range(69216, 69248), + "Yezidi": range(69248, 69312), + "Arabic Extended-C": range(69312, 69376), + "Old Sogdian": range(69376, 69424), + "Sogdian": range(69424, 69488), + "Old Uyghur": range(69488, 69552), + "Chorasmian": range(69552, 69600), + "Elymaic": range(69600, 69632), + "Brahmi": range(69632, 69760), + "Kaithi": range(69760, 69840), + "Sora Sompeng": range(69840, 69888), + "Chakma": range(69888, 69968), + "Mahajani": range(69968, 70016), + "Sharada": range(70016, 70112), + "Sinhala Archaic Numbers": range(70112, 70144), + "Khojki": range(70144, 70224), + "Multani": range(70272, 70320), + "Khudawadi": range(70320, 70400), + "Grantha": range(70400, 70528), + "Newa": range(70656, 70784), + "Tirhuta": range(70784, 70880), + "Siddham": range(71040, 71168), + "Modi": range(71168, 71264), + "Mongolian Supplement": range(71264, 71296), + "Takri": range(71296, 71376), + "Ahom": range(71424, 71504), + "Dogra": range(71680, 71760), + "Warang Citi": range(71840, 71936), + "Dives Akuru": range(71936, 72032), + "Nandinagari": range(72096, 72192), + "Zanabazar Square": range(72192, 72272), + "Soyombo": range(72272, 72368), + "Unified Canadian Aboriginal Syllabics Extended-A": range(72368, 72384), + "Pau Cin Hau": range(72384, 72448), + "Devanagari Extended-A": range(72448, 72544), + "Bhaiksuki": range(72704, 72816), + "Marchen": range(72816, 72896), + "Masaram Gondi": range(72960, 73056), + "Gunjala Gondi": range(73056, 73136), + "Makasar": range(73440, 73472), + "Kawi": range(73472, 73568), + "Lisu Supplement": range(73648, 73664), + "Tamil Supplement": range(73664, 73728), + "Cuneiform": range(73728, 74752), + "Cuneiform Numbers and Punctuation": range(74752, 74880), + "Early Dynastic Cuneiform": range(74880, 75088), + "Cypro-Minoan": range(77712, 77824), + "Egyptian Hieroglyphs": range(77824, 78896), + "Egyptian Hieroglyph Format Controls": range(78896, 78944), + "Anatolian Hieroglyphs": range(82944, 83584), + "Bamum Supplement": range(92160, 92736), + "Mro": range(92736, 92784), + "Tangsa": range(92784, 92880), + "Bassa Vah": range(92880, 92928), + "Pahawh Hmong": range(92928, 93072), + "Medefaidrin": range(93760, 93856), + "Miao": range(93952, 94112), + "Ideographic Symbols and Punctuation": range(94176, 94208), + "Tangut": range(94208, 100352), + "Tangut Components": range(100352, 101120), + "Khitan Small Script": range(101120, 101632), + "Tangut Supplement": range(101632, 101760), + "Kana Extended-B": range(110576, 110592), + "Kana Supplement": range(110592, 110848), + "Kana Extended-A": range(110848, 110896), + "Small Kana Extension": range(110896, 110960), + "Nushu": range(110960, 111360), + "Duployan": range(113664, 113824), + "Shorthand Format Controls": range(113824, 113840), + "Znamenny Musical Notation": range(118528, 118736), + "Byzantine Musical Symbols": range(118784, 119040), + "Musical Symbols": range(119040, 119296), + "Ancient Greek Musical Notation": range(119296, 119376), + "Kaktovik Numerals": range(119488, 119520), + "Mayan Numerals": range(119520, 119552), + "Tai Xuan Jing Symbols": range(119552, 119648), + "Counting Rod Numerals": range(119648, 119680), + "Mathematical Alphanumeric Symbols": range(119808, 120832), + "Sutton SignWriting": range(120832, 121520), + "Latin Extended-G": range(122624, 122880), + "Glagolitic Supplement": range(122880, 122928), + "Cyrillic Extended-D": range(122928, 123024), + "Nyiakeng Puachue Hmong": range(123136, 123216), + "Toto": range(123536, 123584), + "Wancho": range(123584, 123648), + "Nag Mundari": range(124112, 124160), + "Ethiopic Extended-B": range(124896, 124928), + "Mende Kikakui": range(124928, 125152), + "Adlam": range(125184, 125280), + "Indic Siyaq Numbers": range(126064, 126144), + "Ottoman Siyaq Numbers": range(126208, 126288), + "Arabic Mathematical Alphabetic Symbols": range(126464, 126720), + "Mahjong Tiles": range(126976, 127024), + "Domino Tiles": range(127024, 127136), + "Playing Cards": range(127136, 127232), + "Enclosed Alphanumeric Supplement": range(127232, 127488), + "Enclosed Ideographic Supplement": range(127488, 127744), + "Miscellaneous Symbols and Pictographs": range(127744, 128512), + "Emoticons range(Emoji)": range(128512, 128592), + "Ornamental Dingbats": range(128592, 128640), + "Transport and Map Symbols": range(128640, 128768), + "Alchemical Symbols": range(128768, 128896), + "Geometric Shapes Extended": range(128896, 129024), + "Supplemental Arrows-C": range(129024, 129280), + "Supplemental Symbols and Pictographs": range(129280, 129536), + "Chess Symbols": range(129536, 129648), + "Symbols and Pictographs Extended-A": range(129648, 129792), + "Symbols for Legacy Computing": range(129792, 130048), + "CJK Unified Ideographs Extension B": range(131072, 173792), + "CJK Unified Ideographs Extension C": range(173824, 177984), + "CJK Unified Ideographs Extension D": range(177984, 178208), + "CJK Unified Ideographs Extension E": range(178208, 183984), + "CJK Unified Ideographs Extension F": range(183984, 191472), + "CJK Compatibility Ideographs Supplement": range(194560, 195104), + "CJK Unified Ideographs Extension G": range(196608, 201552), + "CJK Unified Ideographs Extension H": range(201552, 205744), + "Tags": range(917504, 917632), + "Variation Selectors Supplement": range(917760, 918000), + "Supplementary Private Use Area-A": range(983040, 1048576), + "Supplementary Private Use Area-B": range(1048576, 1114112), +} + + +UNICODE_SECONDARY_RANGE_KEYWORD: list[str] = [ + "Supplement", + "Extended", + "Extensions", + "Modifier", + "Marks", + "Punctuation", + "Symbols", + "Forms", + "Operators", + "Miscellaneous", + "Drawing", + "Block", + "Shapes", + "Supplemental", + "Tags", +] + +RE_POSSIBLE_ENCODING_INDICATION = re_compile( + r"(?:(?:encoding)|(?:charset)|(?:coding))(?:[\:= ]{1,10})(?:[\"\']?)([a-zA-Z0-9\-_]+)(?:[\"\']?)", + IGNORECASE, +) + +IANA_NO_ALIASES = [ + "cp720", + "cp737", + "cp856", + "cp874", + "cp875", + "cp1006", + "koi8_r", + "koi8_t", + "koi8_u", +] + +IANA_SUPPORTED: list[str] = sorted( + filter( + lambda x: x.endswith("_codec") is False + and x not in {"rot_13", "tactis", "mbcs"}, + list(set(aliases.values())) + IANA_NO_ALIASES, + ) +) + +IANA_SUPPORTED_COUNT: int = len(IANA_SUPPORTED) + +# pre-computed code page that are similar using the function cp_similarity. +IANA_SUPPORTED_SIMILAR: dict[str, list[str]] = { + "cp037": ["cp1026", "cp1140", "cp273", "cp500"], + "cp1026": ["cp037", "cp1140", "cp273", "cp500"], + "cp1125": ["cp866"], + "cp1140": ["cp037", "cp1026", "cp273", "cp500"], + "cp1250": ["iso8859_2"], + "cp1251": ["kz1048", "ptcp154"], + "cp1252": ["iso8859_15", "iso8859_9", "latin_1"], + "cp1253": ["iso8859_7"], + "cp1254": ["iso8859_15", "iso8859_9", "latin_1"], + "cp1257": ["iso8859_13"], + "cp273": ["cp037", "cp1026", "cp1140", "cp500"], + "cp437": ["cp850", "cp858", "cp860", "cp861", "cp862", "cp863", "cp865"], + "cp500": ["cp037", "cp1026", "cp1140", "cp273"], + "cp850": ["cp437", "cp857", "cp858", "cp865"], + "cp857": ["cp850", "cp858", "cp865"], + "cp858": ["cp437", "cp850", "cp857", "cp865"], + "cp860": ["cp437", "cp861", "cp862", "cp863", "cp865"], + "cp861": ["cp437", "cp860", "cp862", "cp863", "cp865"], + "cp862": ["cp437", "cp860", "cp861", "cp863", "cp865"], + "cp863": ["cp437", "cp860", "cp861", "cp862", "cp865"], + "cp865": ["cp437", "cp850", "cp857", "cp858", "cp860", "cp861", "cp862", "cp863"], + "cp866": ["cp1125"], + "iso8859_10": ["iso8859_14", "iso8859_15", "iso8859_4", "iso8859_9", "latin_1"], + "iso8859_11": ["tis_620"], + "iso8859_13": ["cp1257"], + "iso8859_14": [ + "iso8859_10", + "iso8859_15", + "iso8859_16", + "iso8859_3", + "iso8859_9", + "latin_1", + ], + "iso8859_15": [ + "cp1252", + "cp1254", + "iso8859_10", + "iso8859_14", + "iso8859_16", + "iso8859_3", + "iso8859_9", + "latin_1", + ], + "iso8859_16": [ + "iso8859_14", + "iso8859_15", + "iso8859_2", + "iso8859_3", + "iso8859_9", + "latin_1", + ], + "iso8859_2": ["cp1250", "iso8859_16", "iso8859_4"], + "iso8859_3": ["iso8859_14", "iso8859_15", "iso8859_16", "iso8859_9", "latin_1"], + "iso8859_4": ["iso8859_10", "iso8859_2", "iso8859_9", "latin_1"], + "iso8859_7": ["cp1253"], + "iso8859_9": [ + "cp1252", + "cp1254", + "cp1258", + "iso8859_10", + "iso8859_14", + "iso8859_15", + "iso8859_16", + "iso8859_3", + "iso8859_4", + "latin_1", + ], + "kz1048": ["cp1251", "ptcp154"], + "latin_1": [ + "cp1252", + "cp1254", + "cp1258", + "iso8859_10", + "iso8859_14", + "iso8859_15", + "iso8859_16", + "iso8859_3", + "iso8859_4", + "iso8859_9", + ], + "mac_iceland": ["mac_roman", "mac_turkish"], + "mac_roman": ["mac_iceland", "mac_turkish"], + "mac_turkish": ["mac_iceland", "mac_roman"], + "ptcp154": ["cp1251", "kz1048"], + "tis_620": ["iso8859_11"], +} + + +CHARDET_CORRESPONDENCE: dict[str, str] = { + "iso2022_kr": "ISO-2022-KR", + "iso2022_jp": "ISO-2022-JP", + "euc_kr": "EUC-KR", + "tis_620": "TIS-620", + "utf_32": "UTF-32", + "euc_jp": "EUC-JP", + "koi8_r": "KOI8-R", + "iso8859_1": "ISO-8859-1", + "iso8859_2": "ISO-8859-2", + "iso8859_5": "ISO-8859-5", + "iso8859_6": "ISO-8859-6", + "iso8859_7": "ISO-8859-7", + "iso8859_8": "ISO-8859-8", + "utf_16": "UTF-16", + "cp855": "IBM855", + "mac_cyrillic": "MacCyrillic", + "gb2312": "GB2312", + "gb18030": "GB18030", + "cp932": "CP932", + "cp866": "IBM866", + "utf_8": "utf-8", + "utf_8_sig": "UTF-8-SIG", + "shift_jis": "SHIFT_JIS", + "big5": "Big5", + "cp1250": "windows-1250", + "cp1251": "windows-1251", + "cp1252": "Windows-1252", + "cp1253": "windows-1253", + "cp1255": "windows-1255", + "cp1256": "windows-1256", + "cp1254": "Windows-1254", + "cp949": "CP949", +} + + +COMMON_SAFE_ASCII_CHARACTERS: set[str] = { + "<", + ">", + "=", + ":", + "/", + "&", + ";", + "{", + "}", + "[", + "]", + ",", + "|", + '"', + "-", + "(", + ")", +} + +# Sample character sets — replace with full lists if needed +COMMON_CHINESE_CHARACTERS = "的一是在不了有和人这中大为上个国我以要他时来用们生到作地于出就分对成会可主发年动同工也能下过子说产种面而方后多定行学法所民得经十三之进着等部度家电力里如水化高自二理起小物现实加量都两体制机当使点从业本去把性好应开它合还因由其些然前外天政四日那社义事平形相全表间样与关各重新线内数正心反你明看原又么利比或但质气第向道命此变条只没结解问意建月公无系军很情者最立代想已通并提直题党程展五果料象员革位入常文总次品式活设及管特件长求老头基资边流路级少图山统接知较将组见计别她手角期根论运农指几九区强放决西被干做必战先回则任取据处队南给色光门即保治北造百规热领七海口东导器压志世金增争济阶油思术极交受联什认六共权收证改清己美再采转更单风切打白教速花带安场身车例真务具万每目至达走积示议声报斗完类八离华名确才科张信马节话米整空元况今集温传土许步群广石记需段研界拉林律叫且究观越织装影算低持音众书布复容儿须际商非验连断深难近矿千周委素技备半办青省列习响约支般史感劳便团往酸历市克何除消构府太准精值号率族维划选标写存候毛亲快效斯院查江型眼王按格养易置派层片始却专状育厂京识适属圆包火住调满县局照参红细引听该铁价严龙飞" + +COMMON_JAPANESE_CHARACTERS = "日一国年大十二本中長出三時行見月分後前生五間上東四今金九入学高円子外八六下来気小七山話女北午百書先名川千水半男西電校語土木聞食車何南万毎白天母火右読友左休父雨" + +COMMON_KOREAN_CHARACTERS = "一二三四五六七八九十百千萬上下左右中人女子大小山川日月火水木金土父母天地國名年時文校學生" + +# Combine all into a set +COMMON_CJK_CHARACTERS = set( + "".join( + [ + COMMON_CHINESE_CHARACTERS, + COMMON_JAPANESE_CHARACTERS, + COMMON_KOREAN_CHARACTERS, + ] + ) +) + +KO_NAMES: set[str] = {"johab", "cp949", "euc_kr"} +ZH_NAMES: set[str] = {"big5", "cp950", "big5hkscs", "hz"} + +# Logging LEVEL below DEBUG +TRACE: int = 5 + + +# Language label that contain the em dash "—" +# character are to be considered alternative seq to origin +FREQUENCIES: dict[str, list[str]] = { + "English": [ + "e", + "a", + "t", + "i", + "o", + "n", + "s", + "r", + "h", + "l", + "d", + "c", + "u", + "m", + "f", + "p", + "g", + "w", + "y", + "b", + "v", + "k", + "x", + "j", + "z", + "q", + ], + "English—": [ + "e", + "a", + "t", + "i", + "o", + "n", + "s", + "r", + "h", + "l", + "d", + "c", + "m", + "u", + "f", + "p", + "g", + "w", + "b", + "y", + "v", + "k", + "j", + "x", + "z", + "q", + ], + "German": [ + "e", + "n", + "i", + "r", + "s", + "t", + "a", + "d", + "h", + "u", + "l", + "g", + "o", + "c", + "m", + "b", + "f", + "k", + "w", + "z", + "p", + "v", + "ü", + "ä", + "ö", + "j", + ], + "French": [ + "e", + "a", + "s", + "n", + "i", + "t", + "r", + "l", + "u", + "o", + "d", + "c", + "p", + "m", + "é", + "v", + "g", + "f", + "b", + "h", + "q", + "à", + "x", + "è", + "y", + "j", + ], + "Dutch": [ + "e", + "n", + "a", + "i", + "r", + "t", + "o", + "d", + "s", + "l", + "g", + "h", + "v", + "m", + "u", + "k", + "c", + "p", + "b", + "w", + "j", + "z", + "f", + "y", + "x", + "ë", + ], + "Italian": [ + "e", + "i", + "a", + "o", + "n", + "l", + "t", + "r", + "s", + "c", + "d", + "u", + "p", + "m", + "g", + "v", + "f", + "b", + "z", + "h", + "q", + "è", + "à", + "k", + "y", + "ò", + ], + "Polish": [ + "a", + "i", + "o", + "e", + "n", + "r", + "z", + "w", + "s", + "c", + "t", + "k", + "y", + "d", + "p", + "m", + "u", + "l", + "j", + "ł", + "g", + "b", + "h", + "ą", + "ę", + "ó", + ], + "Spanish": [ + "e", + "a", + "o", + "n", + "s", + "r", + "i", + "l", + "d", + "t", + "c", + "u", + "m", + "p", + "b", + "g", + "v", + "f", + "y", + "ó", + "h", + "q", + "í", + "j", + "z", + "á", + ], + "Russian": [ + "о", + "а", + "е", + "и", + "н", + "с", + "т", + "р", + "в", + "л", + "к", + "м", + "д", + "п", + "у", + "г", + "я", + "ы", + "з", + "б", + "й", + "ь", + "ч", + "х", + "ж", + "ц", + ], + # Jap-Kanji + "Japanese": [ + "人", + "一", + "大", + "亅", + "丁", + "丨", + "竹", + "笑", + "口", + "日", + "今", + "二", + "彳", + "行", + "十", + "土", + "丶", + "寸", + "寺", + "時", + "乙", + "丿", + "乂", + "气", + "気", + "冂", + "巾", + "亠", + "市", + "目", + "儿", + "見", + "八", + "小", + "凵", + "県", + "月", + "彐", + "門", + "間", + "木", + "東", + "山", + "出", + "本", + "中", + "刀", + "分", + "耳", + "又", + "取", + "最", + "言", + "田", + "心", + "思", + "刂", + "前", + "京", + "尹", + "事", + "生", + "厶", + "云", + "会", + "未", + "来", + "白", + "冫", + "楽", + "灬", + "馬", + "尸", + "尺", + "駅", + "明", + "耂", + "者", + "了", + "阝", + "都", + "高", + "卜", + "占", + "厂", + "广", + "店", + "子", + "申", + "奄", + "亻", + "俺", + "上", + "方", + "冖", + "学", + "衣", + "艮", + "食", + "自", + ], + # Jap-Katakana + "Japanese—": [ + "ー", + "ン", + "ス", + "・", + "ル", + "ト", + "リ", + "イ", + "ア", + "ラ", + "ッ", + "ク", + "ド", + "シ", + "レ", + "ジ", + "タ", + "フ", + "ロ", + "カ", + "テ", + "マ", + "ィ", + "グ", + "バ", + "ム", + "プ", + "オ", + "コ", + "デ", + "ニ", + "ウ", + "メ", + "サ", + "ビ", + "ナ", + "ブ", + "ャ", + "エ", + "ュ", + "チ", + "キ", + "ズ", + "ダ", + "パ", + "ミ", + "ェ", + "ョ", + "ハ", + "セ", + "ベ", + "ガ", + "モ", + "ツ", + "ネ", + "ボ", + "ソ", + "ノ", + "ァ", + "ヴ", + "ワ", + "ポ", + "ペ", + "ピ", + "ケ", + "ゴ", + "ギ", + "ザ", + "ホ", + "ゲ", + "ォ", + "ヤ", + "ヒ", + "ユ", + "ヨ", + "ヘ", + "ゼ", + "ヌ", + "ゥ", + "ゾ", + "ヶ", + "ヂ", + "ヲ", + "ヅ", + "ヵ", + "ヱ", + "ヰ", + "ヮ", + "ヽ", + "゠", + "ヾ", + "ヷ", + "ヿ", + "ヸ", + "ヹ", + "ヺ", + ], + # Jap-Hiragana + "Japanese——": [ + "の", + "に", + "る", + "た", + "と", + "は", + "し", + "い", + "を", + "で", + "て", + "が", + "な", + "れ", + "か", + "ら", + "さ", + "っ", + "り", + "す", + "あ", + "も", + "こ", + "ま", + "う", + "く", + "よ", + "き", + "ん", + "め", + "お", + "け", + "そ", + "つ", + "だ", + "や", + "え", + "ど", + "わ", + "ち", + "み", + "せ", + "じ", + "ば", + "へ", + "び", + "ず", + "ろ", + "ほ", + "げ", + "む", + "べ", + "ひ", + "ょ", + "ゆ", + "ぶ", + "ご", + "ゃ", + "ね", + "ふ", + "ぐ", + "ぎ", + "ぼ", + "ゅ", + "づ", + "ざ", + "ぞ", + "ぬ", + "ぜ", + "ぱ", + "ぽ", + "ぷ", + "ぴ", + "ぃ", + "ぁ", + "ぇ", + "ぺ", + "ゞ", + "ぢ", + "ぉ", + "ぅ", + "ゐ", + "ゝ", + "ゑ", + "゛", + "゜", + "ゎ", + "ゔ", + "゚", + "ゟ", + "゙", + "ゕ", + "ゖ", + ], + "Portuguese": [ + "a", + "e", + "o", + "s", + "i", + "r", + "d", + "n", + "t", + "m", + "u", + "c", + "l", + "p", + "g", + "v", + "b", + "f", + "h", + "ã", + "q", + "é", + "ç", + "á", + "z", + "í", + ], + "Swedish": [ + "e", + "a", + "n", + "r", + "t", + "s", + "i", + "l", + "d", + "o", + "m", + "k", + "g", + "v", + "h", + "f", + "u", + "p", + "ä", + "c", + "b", + "ö", + "å", + "y", + "j", + "x", + ], + "Chinese": [ + "的", + "一", + "是", + "不", + "了", + "在", + "人", + "有", + "我", + "他", + "这", + "个", + "们", + "中", + "来", + "上", + "大", + "为", + "和", + "国", + "地", + "到", + "以", + "说", + "时", + "要", + "就", + "出", + "会", + "可", + "也", + "你", + "对", + "生", + "能", + "而", + "子", + "那", + "得", + "于", + "着", + "下", + "自", + "之", + "年", + "过", + "发", + "后", + "作", + "里", + "用", + "道", + "行", + "所", + "然", + "家", + "种", + "事", + "成", + "方", + "多", + "经", + "么", + "去", + "法", + "学", + "如", + "都", + "同", + "现", + "当", + "没", + "动", + "面", + "起", + "看", + "定", + "天", + "分", + "还", + "进", + "好", + "小", + "部", + "其", + "些", + "主", + "样", + "理", + "心", + "她", + "本", + "前", + "开", + "但", + "因", + "只", + "从", + "想", + "实", + ], + "Ukrainian": [ + "о", + "а", + "н", + "і", + "и", + "р", + "в", + "т", + "е", + "с", + "к", + "л", + "у", + "д", + "м", + "п", + "з", + "я", + "ь", + "б", + "г", + "й", + "ч", + "х", + "ц", + "ї", + ], + "Norwegian": [ + "e", + "r", + "n", + "t", + "a", + "s", + "i", + "o", + "l", + "d", + "g", + "k", + "m", + "v", + "f", + "p", + "u", + "b", + "h", + "å", + "y", + "j", + "ø", + "c", + "æ", + "w", + ], + "Finnish": [ + "a", + "i", + "n", + "t", + "e", + "s", + "l", + "o", + "u", + "k", + "ä", + "m", + "r", + "v", + "j", + "h", + "p", + "y", + "d", + "ö", + "g", + "c", + "b", + "f", + "w", + "z", + ], + "Vietnamese": [ + "n", + "h", + "t", + "i", + "c", + "g", + "a", + "o", + "u", + "m", + "l", + "r", + "à", + "đ", + "s", + "e", + "v", + "p", + "b", + "y", + "ư", + "d", + "á", + "k", + "ộ", + "ế", + ], + "Czech": [ + "o", + "e", + "a", + "n", + "t", + "s", + "i", + "l", + "v", + "r", + "k", + "d", + "u", + "m", + "p", + "í", + "c", + "h", + "z", + "á", + "y", + "j", + "b", + "ě", + "é", + "ř", + ], + "Hungarian": [ + "e", + "a", + "t", + "l", + "s", + "n", + "k", + "r", + "i", + "o", + "z", + "á", + "é", + "g", + "m", + "b", + "y", + "v", + "d", + "h", + "u", + "p", + "j", + "ö", + "f", + "c", + ], + "Korean": [ + "이", + "다", + "에", + "의", + "는", + "로", + "하", + "을", + "가", + "고", + "지", + "서", + "한", + "은", + "기", + "으", + "년", + "대", + "사", + "시", + "를", + "리", + "도", + "인", + "스", + "일", + ], + "Indonesian": [ + "a", + "n", + "e", + "i", + "r", + "t", + "u", + "s", + "d", + "k", + "m", + "l", + "g", + "p", + "b", + "o", + "h", + "y", + "j", + "c", + "w", + "f", + "v", + "z", + "x", + "q", + ], + "Turkish": [ + "a", + "e", + "i", + "n", + "r", + "l", + "ı", + "k", + "d", + "t", + "s", + "m", + "y", + "u", + "o", + "b", + "ü", + "ş", + "v", + "g", + "z", + "h", + "c", + "p", + "ç", + "ğ", + ], + "Romanian": [ + "e", + "i", + "a", + "r", + "n", + "t", + "u", + "l", + "o", + "c", + "s", + "d", + "p", + "m", + "ă", + "f", + "v", + "î", + "g", + "b", + "ș", + "ț", + "z", + "h", + "â", + "j", + ], + "Farsi": [ + "ا", + "ی", + "ر", + "د", + "ن", + "ه", + "و", + "م", + "ت", + "ب", + "س", + "ل", + "ک", + "ش", + "ز", + "ف", + "گ", + "ع", + "خ", + "ق", + "ج", + "آ", + "پ", + "ح", + "ط", + "ص", + ], + "Arabic": [ + "ا", + "ل", + "ي", + "م", + "و", + "ن", + "ر", + "ت", + "ب", + "ة", + "ع", + "د", + "س", + "ف", + "ه", + "ك", + "ق", + "أ", + "ح", + "ج", + "ش", + "ط", + "ص", + "ى", + "خ", + "إ", + ], + "Danish": [ + "e", + "r", + "n", + "t", + "a", + "i", + "s", + "d", + "l", + "o", + "g", + "m", + "k", + "f", + "v", + "u", + "b", + "h", + "p", + "å", + "y", + "ø", + "æ", + "c", + "j", + "w", + ], + "Serbian": [ + "а", + "и", + "о", + "е", + "н", + "р", + "с", + "у", + "т", + "к", + "ј", + "в", + "д", + "м", + "п", + "л", + "г", + "з", + "б", + "a", + "i", + "e", + "o", + "n", + "ц", + "ш", + ], + "Lithuanian": [ + "i", + "a", + "s", + "o", + "r", + "e", + "t", + "n", + "u", + "k", + "m", + "l", + "p", + "v", + "d", + "j", + "g", + "ė", + "b", + "y", + "ų", + "š", + "ž", + "c", + "ą", + "į", + ], + "Slovene": [ + "e", + "a", + "i", + "o", + "n", + "r", + "s", + "l", + "t", + "j", + "v", + "k", + "d", + "p", + "m", + "u", + "z", + "b", + "g", + "h", + "č", + "c", + "š", + "ž", + "f", + "y", + ], + "Slovak": [ + "o", + "a", + "e", + "n", + "i", + "r", + "v", + "t", + "s", + "l", + "k", + "d", + "m", + "p", + "u", + "c", + "h", + "j", + "b", + "z", + "á", + "y", + "ý", + "í", + "č", + "é", + ], + "Hebrew": [ + "י", + "ו", + "ה", + "ל", + "ר", + "ב", + "ת", + "מ", + "א", + "ש", + "נ", + "ע", + "ם", + "ד", + "ק", + "ח", + "פ", + "ס", + "כ", + "ג", + "ט", + "צ", + "ן", + "ז", + "ך", + ], + "Bulgarian": [ + "а", + "и", + "о", + "е", + "н", + "т", + "р", + "с", + "в", + "л", + "к", + "д", + "п", + "м", + "з", + "г", + "я", + "ъ", + "у", + "б", + "ч", + "ц", + "й", + "ж", + "щ", + "х", + ], + "Croatian": [ + "a", + "i", + "o", + "e", + "n", + "r", + "j", + "s", + "t", + "u", + "k", + "l", + "v", + "d", + "m", + "p", + "g", + "z", + "b", + "c", + "č", + "h", + "š", + "ž", + "ć", + "f", + ], + "Hindi": [ + "क", + "र", + "स", + "न", + "त", + "म", + "ह", + "प", + "य", + "ल", + "व", + "ज", + "द", + "ग", + "ब", + "श", + "ट", + "अ", + "ए", + "थ", + "भ", + "ड", + "च", + "ध", + "ष", + "इ", + ], + "Estonian": [ + "a", + "i", + "e", + "s", + "t", + "l", + "u", + "n", + "o", + "k", + "r", + "d", + "m", + "v", + "g", + "p", + "j", + "h", + "ä", + "b", + "õ", + "ü", + "f", + "c", + "ö", + "y", + ], + "Thai": [ + "า", + "น", + "ร", + "อ", + "ก", + "เ", + "ง", + "ม", + "ย", + "ล", + "ว", + "ด", + "ท", + "ส", + "ต", + "ะ", + "ป", + "บ", + "ค", + "ห", + "แ", + "จ", + "พ", + "ช", + "ข", + "ใ", + ], + "Greek": [ + "α", + "τ", + "ο", + "ι", + "ε", + "ν", + "ρ", + "σ", + "κ", + "η", + "π", + "ς", + "υ", + "μ", + "λ", + "ί", + "ό", + "ά", + "γ", + "έ", + "δ", + "ή", + "ω", + "χ", + "θ", + "ύ", + ], + "Tamil": [ + "க", + "த", + "ப", + "ட", + "ர", + "ம", + "ல", + "ன", + "வ", + "ற", + "ய", + "ள", + "ச", + "ந", + "இ", + "ண", + "அ", + "ஆ", + "ழ", + "ங", + "எ", + "உ", + "ஒ", + "ஸ", + ], + "Kazakh": [ + "а", + "ы", + "е", + "н", + "т", + "р", + "л", + "і", + "д", + "с", + "м", + "қ", + "к", + "о", + "б", + "и", + "у", + "ғ", + "ж", + "ң", + "з", + "ш", + "й", + "п", + "г", + "ө", + ], +} + +LANGUAGE_SUPPORTED_COUNT: int = len(FREQUENCIES) diff --git a/lib/python3.12/site-packages/charset_normalizer/legacy.py b/lib/python3.12/site-packages/charset_normalizer/legacy.py new file mode 100644 index 0000000000000000000000000000000000000000..360a3107bdce817594db33de158e71d9fe793a3b --- /dev/null +++ b/lib/python3.12/site-packages/charset_normalizer/legacy.py @@ -0,0 +1,80 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any +from warnings import warn + +from .api import from_bytes +from .constant import CHARDET_CORRESPONDENCE, TOO_SMALL_SEQUENCE + +# TODO: remove this check when dropping Python 3.7 support +if TYPE_CHECKING: + from typing_extensions import TypedDict + + class ResultDict(TypedDict): + encoding: str | None + language: str + confidence: float | None + + +def detect( + byte_str: bytes, should_rename_legacy: bool = False, **kwargs: Any +) -> ResultDict: + """ + chardet legacy method + Detect the encoding of the given byte string. It should be mostly backward-compatible. + Encoding name will match Chardet own writing whenever possible. (Not on encoding name unsupported by it) + This function is deprecated and should be used to migrate your project easily, consult the documentation for + further information. Not planned for removal. + + :param byte_str: The byte sequence to examine. + :param should_rename_legacy: Should we rename legacy encodings + to their more modern equivalents? + """ + if len(kwargs): + warn( + f"charset-normalizer disregard arguments '{','.join(list(kwargs.keys()))}' in legacy function detect()" + ) + + if not isinstance(byte_str, (bytearray, bytes)): + raise TypeError( # pragma: nocover + f"Expected object of type bytes or bytearray, got: {type(byte_str)}" + ) + + if isinstance(byte_str, bytearray): + byte_str = bytes(byte_str) + + r = from_bytes(byte_str).best() + + encoding = r.encoding if r is not None else None + language = r.language if r is not None and r.language != "Unknown" else "" + confidence = 1.0 - r.chaos if r is not None else None + + # automatically lower confidence + # on small bytes samples. + # https://github.com/jawah/charset_normalizer/issues/391 + if ( + confidence is not None + and confidence >= 0.9 + and encoding + not in { + "utf_8", + "ascii", + } + and r.bom is False # type: ignore[union-attr] + and len(byte_str) < TOO_SMALL_SEQUENCE + ): + confidence -= 0.2 + + # Note: CharsetNormalizer does not return 'UTF-8-SIG' as the sig get stripped in the detection/normalization process + # but chardet does return 'utf-8-sig' and it is a valid codec name. + if r is not None and encoding == "utf_8" and r.bom: + encoding += "_sig" + + if should_rename_legacy is False and encoding in CHARDET_CORRESPONDENCE: + encoding = CHARDET_CORRESPONDENCE[encoding] + + return { + "encoding": encoding, + "language": language, + "confidence": confidence, + } diff --git a/lib/python3.12/site-packages/charset_normalizer/md.cpython-312-x86_64-linux-gnu.so b/lib/python3.12/site-packages/charset_normalizer/md.cpython-312-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..857d7474b7a5a0c5b81989346cf9d845174eed68 Binary files /dev/null and b/lib/python3.12/site-packages/charset_normalizer/md.cpython-312-x86_64-linux-gnu.so differ diff --git a/lib/python3.12/site-packages/charset_normalizer/md.py b/lib/python3.12/site-packages/charset_normalizer/md.py new file mode 100644 index 0000000000000000000000000000000000000000..12ce024bd34c7eee369ddf438f5534e855a59839 --- /dev/null +++ b/lib/python3.12/site-packages/charset_normalizer/md.py @@ -0,0 +1,635 @@ +from __future__ import annotations + +from functools import lru_cache +from logging import getLogger + +from .constant import ( + COMMON_SAFE_ASCII_CHARACTERS, + TRACE, + UNICODE_SECONDARY_RANGE_KEYWORD, +) +from .utils import ( + is_accentuated, + is_arabic, + is_arabic_isolated_form, + is_case_variable, + is_cjk, + is_emoticon, + is_hangul, + is_hiragana, + is_katakana, + is_latin, + is_punctuation, + is_separator, + is_symbol, + is_thai, + is_unprintable, + remove_accent, + unicode_range, + is_cjk_uncommon, +) + + +class MessDetectorPlugin: + """ + Base abstract class used for mess detection plugins. + All detectors MUST extend and implement given methods. + """ + + def eligible(self, character: str) -> bool: + """ + Determine if given character should be fed in. + """ + raise NotImplementedError # pragma: nocover + + def feed(self, character: str) -> None: + """ + The main routine to be executed upon character. + Insert the logic in witch the text would be considered chaotic. + """ + raise NotImplementedError # pragma: nocover + + def reset(self) -> None: # pragma: no cover + """ + Permit to reset the plugin to the initial state. + """ + raise NotImplementedError + + @property + def ratio(self) -> float: + """ + Compute the chaos ratio based on what your feed() has seen. + Must NOT be lower than 0.; No restriction gt 0. + """ + raise NotImplementedError # pragma: nocover + + +class TooManySymbolOrPunctuationPlugin(MessDetectorPlugin): + def __init__(self) -> None: + self._punctuation_count: int = 0 + self._symbol_count: int = 0 + self._character_count: int = 0 + + self._last_printable_char: str | None = None + self._frenzy_symbol_in_word: bool = False + + def eligible(self, character: str) -> bool: + return character.isprintable() + + def feed(self, character: str) -> None: + self._character_count += 1 + + if ( + character != self._last_printable_char + and character not in COMMON_SAFE_ASCII_CHARACTERS + ): + if is_punctuation(character): + self._punctuation_count += 1 + elif ( + character.isdigit() is False + and is_symbol(character) + and is_emoticon(character) is False + ): + self._symbol_count += 2 + + self._last_printable_char = character + + def reset(self) -> None: # Abstract + self._punctuation_count = 0 + self._character_count = 0 + self._symbol_count = 0 + + @property + def ratio(self) -> float: + if self._character_count == 0: + return 0.0 + + ratio_of_punctuation: float = ( + self._punctuation_count + self._symbol_count + ) / self._character_count + + return ratio_of_punctuation if ratio_of_punctuation >= 0.3 else 0.0 + + +class TooManyAccentuatedPlugin(MessDetectorPlugin): + def __init__(self) -> None: + self._character_count: int = 0 + self._accentuated_count: int = 0 + + def eligible(self, character: str) -> bool: + return character.isalpha() + + def feed(self, character: str) -> None: + self._character_count += 1 + + if is_accentuated(character): + self._accentuated_count += 1 + + def reset(self) -> None: # Abstract + self._character_count = 0 + self._accentuated_count = 0 + + @property + def ratio(self) -> float: + if self._character_count < 8: + return 0.0 + + ratio_of_accentuation: float = self._accentuated_count / self._character_count + return ratio_of_accentuation if ratio_of_accentuation >= 0.35 else 0.0 + + +class UnprintablePlugin(MessDetectorPlugin): + def __init__(self) -> None: + self._unprintable_count: int = 0 + self._character_count: int = 0 + + def eligible(self, character: str) -> bool: + return True + + def feed(self, character: str) -> None: + if is_unprintable(character): + self._unprintable_count += 1 + self._character_count += 1 + + def reset(self) -> None: # Abstract + self._unprintable_count = 0 + + @property + def ratio(self) -> float: + if self._character_count == 0: + return 0.0 + + return (self._unprintable_count * 8) / self._character_count + + +class SuspiciousDuplicateAccentPlugin(MessDetectorPlugin): + def __init__(self) -> None: + self._successive_count: int = 0 + self._character_count: int = 0 + + self._last_latin_character: str | None = None + + def eligible(self, character: str) -> bool: + return character.isalpha() and is_latin(character) + + def feed(self, character: str) -> None: + self._character_count += 1 + if ( + self._last_latin_character is not None + and is_accentuated(character) + and is_accentuated(self._last_latin_character) + ): + if character.isupper() and self._last_latin_character.isupper(): + self._successive_count += 1 + # Worse if its the same char duplicated with different accent. + if remove_accent(character) == remove_accent(self._last_latin_character): + self._successive_count += 1 + self._last_latin_character = character + + def reset(self) -> None: # Abstract + self._successive_count = 0 + self._character_count = 0 + self._last_latin_character = None + + @property + def ratio(self) -> float: + if self._character_count == 0: + return 0.0 + + return (self._successive_count * 2) / self._character_count + + +class SuspiciousRange(MessDetectorPlugin): + def __init__(self) -> None: + self._suspicious_successive_range_count: int = 0 + self._character_count: int = 0 + self._last_printable_seen: str | None = None + + def eligible(self, character: str) -> bool: + return character.isprintable() + + def feed(self, character: str) -> None: + self._character_count += 1 + + if ( + character.isspace() + or is_punctuation(character) + or character in COMMON_SAFE_ASCII_CHARACTERS + ): + self._last_printable_seen = None + return + + if self._last_printable_seen is None: + self._last_printable_seen = character + return + + unicode_range_a: str | None = unicode_range(self._last_printable_seen) + unicode_range_b: str | None = unicode_range(character) + + if is_suspiciously_successive_range(unicode_range_a, unicode_range_b): + self._suspicious_successive_range_count += 1 + + self._last_printable_seen = character + + def reset(self) -> None: # Abstract + self._character_count = 0 + self._suspicious_successive_range_count = 0 + self._last_printable_seen = None + + @property + def ratio(self) -> float: + if self._character_count <= 13: + return 0.0 + + ratio_of_suspicious_range_usage: float = ( + self._suspicious_successive_range_count * 2 + ) / self._character_count + + return ratio_of_suspicious_range_usage + + +class SuperWeirdWordPlugin(MessDetectorPlugin): + def __init__(self) -> None: + self._word_count: int = 0 + self._bad_word_count: int = 0 + self._foreign_long_count: int = 0 + + self._is_current_word_bad: bool = False + self._foreign_long_watch: bool = False + + self._character_count: int = 0 + self._bad_character_count: int = 0 + + self._buffer: str = "" + self._buffer_accent_count: int = 0 + self._buffer_glyph_count: int = 0 + + def eligible(self, character: str) -> bool: + return True + + def feed(self, character: str) -> None: + if character.isalpha(): + self._buffer += character + if is_accentuated(character): + self._buffer_accent_count += 1 + if ( + self._foreign_long_watch is False + and (is_latin(character) is False or is_accentuated(character)) + and is_cjk(character) is False + and is_hangul(character) is False + and is_katakana(character) is False + and is_hiragana(character) is False + and is_thai(character) is False + ): + self._foreign_long_watch = True + if ( + is_cjk(character) + or is_hangul(character) + or is_katakana(character) + or is_hiragana(character) + or is_thai(character) + ): + self._buffer_glyph_count += 1 + return + if not self._buffer: + return + if ( + character.isspace() or is_punctuation(character) or is_separator(character) + ) and self._buffer: + self._word_count += 1 + buffer_length: int = len(self._buffer) + + self._character_count += buffer_length + + if buffer_length >= 4: + if self._buffer_accent_count / buffer_length >= 0.5: + self._is_current_word_bad = True + # Word/Buffer ending with an upper case accentuated letter are so rare, + # that we will consider them all as suspicious. Same weight as foreign_long suspicious. + elif ( + is_accentuated(self._buffer[-1]) + and self._buffer[-1].isupper() + and all(_.isupper() for _ in self._buffer) is False + ): + self._foreign_long_count += 1 + self._is_current_word_bad = True + elif self._buffer_glyph_count == 1: + self._is_current_word_bad = True + self._foreign_long_count += 1 + if buffer_length >= 24 and self._foreign_long_watch: + camel_case_dst = [ + i + for c, i in zip(self._buffer, range(0, buffer_length)) + if c.isupper() + ] + probable_camel_cased: bool = False + + if camel_case_dst and (len(camel_case_dst) / buffer_length <= 0.3): + probable_camel_cased = True + + if not probable_camel_cased: + self._foreign_long_count += 1 + self._is_current_word_bad = True + + if self._is_current_word_bad: + self._bad_word_count += 1 + self._bad_character_count += len(self._buffer) + self._is_current_word_bad = False + + self._foreign_long_watch = False + self._buffer = "" + self._buffer_accent_count = 0 + self._buffer_glyph_count = 0 + elif ( + character not in {"<", ">", "-", "=", "~", "|", "_"} + and character.isdigit() is False + and is_symbol(character) + ): + self._is_current_word_bad = True + self._buffer += character + + def reset(self) -> None: # Abstract + self._buffer = "" + self._is_current_word_bad = False + self._foreign_long_watch = False + self._bad_word_count = 0 + self._word_count = 0 + self._character_count = 0 + self._bad_character_count = 0 + self._foreign_long_count = 0 + + @property + def ratio(self) -> float: + if self._word_count <= 10 and self._foreign_long_count == 0: + return 0.0 + + return self._bad_character_count / self._character_count + + +class CjkUncommonPlugin(MessDetectorPlugin): + """ + Detect messy CJK text that probably means nothing. + """ + + def __init__(self) -> None: + self._character_count: int = 0 + self._uncommon_count: int = 0 + + def eligible(self, character: str) -> bool: + return is_cjk(character) + + def feed(self, character: str) -> None: + self._character_count += 1 + + if is_cjk_uncommon(character): + self._uncommon_count += 1 + return + + def reset(self) -> None: # Abstract + self._character_count = 0 + self._uncommon_count = 0 + + @property + def ratio(self) -> float: + if self._character_count < 8: + return 0.0 + + uncommon_form_usage: float = self._uncommon_count / self._character_count + + # we can be pretty sure it's garbage when uncommon characters are widely + # used. otherwise it could just be traditional chinese for example. + return uncommon_form_usage / 10 if uncommon_form_usage > 0.5 else 0.0 + + +class ArchaicUpperLowerPlugin(MessDetectorPlugin): + def __init__(self) -> None: + self._buf: bool = False + + self._character_count_since_last_sep: int = 0 + + self._successive_upper_lower_count: int = 0 + self._successive_upper_lower_count_final: int = 0 + + self._character_count: int = 0 + + self._last_alpha_seen: str | None = None + self._current_ascii_only: bool = True + + def eligible(self, character: str) -> bool: + return True + + def feed(self, character: str) -> None: + is_concerned = character.isalpha() and is_case_variable(character) + chunk_sep = is_concerned is False + + if chunk_sep and self._character_count_since_last_sep > 0: + if ( + self._character_count_since_last_sep <= 64 + and character.isdigit() is False + and self._current_ascii_only is False + ): + self._successive_upper_lower_count_final += ( + self._successive_upper_lower_count + ) + + self._successive_upper_lower_count = 0 + self._character_count_since_last_sep = 0 + self._last_alpha_seen = None + self._buf = False + self._character_count += 1 + self._current_ascii_only = True + + return + + if self._current_ascii_only is True and character.isascii() is False: + self._current_ascii_only = False + + if self._last_alpha_seen is not None: + if (character.isupper() and self._last_alpha_seen.islower()) or ( + character.islower() and self._last_alpha_seen.isupper() + ): + if self._buf is True: + self._successive_upper_lower_count += 2 + self._buf = False + else: + self._buf = True + else: + self._buf = False + + self._character_count += 1 + self._character_count_since_last_sep += 1 + self._last_alpha_seen = character + + def reset(self) -> None: # Abstract + self._character_count = 0 + self._character_count_since_last_sep = 0 + self._successive_upper_lower_count = 0 + self._successive_upper_lower_count_final = 0 + self._last_alpha_seen = None + self._buf = False + self._current_ascii_only = True + + @property + def ratio(self) -> float: + if self._character_count == 0: + return 0.0 + + return self._successive_upper_lower_count_final / self._character_count + + +class ArabicIsolatedFormPlugin(MessDetectorPlugin): + def __init__(self) -> None: + self._character_count: int = 0 + self._isolated_form_count: int = 0 + + def reset(self) -> None: # Abstract + self._character_count = 0 + self._isolated_form_count = 0 + + def eligible(self, character: str) -> bool: + return is_arabic(character) + + def feed(self, character: str) -> None: + self._character_count += 1 + + if is_arabic_isolated_form(character): + self._isolated_form_count += 1 + + @property + def ratio(self) -> float: + if self._character_count < 8: + return 0.0 + + isolated_form_usage: float = self._isolated_form_count / self._character_count + + return isolated_form_usage + + +@lru_cache(maxsize=1024) +def is_suspiciously_successive_range( + unicode_range_a: str | None, unicode_range_b: str | None +) -> bool: + """ + Determine if two Unicode range seen next to each other can be considered as suspicious. + """ + if unicode_range_a is None or unicode_range_b is None: + return True + + if unicode_range_a == unicode_range_b: + return False + + if "Latin" in unicode_range_a and "Latin" in unicode_range_b: + return False + + if "Emoticons" in unicode_range_a or "Emoticons" in unicode_range_b: + return False + + # Latin characters can be accompanied with a combining diacritical mark + # eg. Vietnamese. + if ("Latin" in unicode_range_a or "Latin" in unicode_range_b) and ( + "Combining" in unicode_range_a or "Combining" in unicode_range_b + ): + return False + + keywords_range_a, keywords_range_b = ( + unicode_range_a.split(" "), + unicode_range_b.split(" "), + ) + + for el in keywords_range_a: + if el in UNICODE_SECONDARY_RANGE_KEYWORD: + continue + if el in keywords_range_b: + return False + + # Japanese Exception + range_a_jp_chars, range_b_jp_chars = ( + unicode_range_a + in ( + "Hiragana", + "Katakana", + ), + unicode_range_b in ("Hiragana", "Katakana"), + ) + if (range_a_jp_chars or range_b_jp_chars) and ( + "CJK" in unicode_range_a or "CJK" in unicode_range_b + ): + return False + if range_a_jp_chars and range_b_jp_chars: + return False + + if "Hangul" in unicode_range_a or "Hangul" in unicode_range_b: + if "CJK" in unicode_range_a or "CJK" in unicode_range_b: + return False + if unicode_range_a == "Basic Latin" or unicode_range_b == "Basic Latin": + return False + + # Chinese/Japanese use dedicated range for punctuation and/or separators. + if ("CJK" in unicode_range_a or "CJK" in unicode_range_b) or ( + unicode_range_a in ["Katakana", "Hiragana"] + and unicode_range_b in ["Katakana", "Hiragana"] + ): + if "Punctuation" in unicode_range_a or "Punctuation" in unicode_range_b: + return False + if "Forms" in unicode_range_a or "Forms" in unicode_range_b: + return False + if unicode_range_a == "Basic Latin" or unicode_range_b == "Basic Latin": + return False + + return True + + +@lru_cache(maxsize=2048) +def mess_ratio( + decoded_sequence: str, maximum_threshold: float = 0.2, debug: bool = False +) -> float: + """ + Compute a mess ratio given a decoded bytes sequence. The maximum threshold does stop the computation earlier. + """ + + detectors: list[MessDetectorPlugin] = [ + md_class() for md_class in MessDetectorPlugin.__subclasses__() + ] + + length: int = len(decoded_sequence) + 1 + + mean_mess_ratio: float = 0.0 + + if length < 512: + intermediary_mean_mess_ratio_calc: int = 32 + elif length <= 1024: + intermediary_mean_mess_ratio_calc = 64 + else: + intermediary_mean_mess_ratio_calc = 128 + + for character, index in zip(decoded_sequence + "\n", range(length)): + for detector in detectors: + if detector.eligible(character): + detector.feed(character) + + if ( + index > 0 and index % intermediary_mean_mess_ratio_calc == 0 + ) or index == length - 1: + mean_mess_ratio = sum(dt.ratio for dt in detectors) + + if mean_mess_ratio >= maximum_threshold: + break + + if debug: + logger = getLogger("charset_normalizer") + + logger.log( + TRACE, + "Mess-detector extended-analysis start. " + f"intermediary_mean_mess_ratio_calc={intermediary_mean_mess_ratio_calc} mean_mess_ratio={mean_mess_ratio} " + f"maximum_threshold={maximum_threshold}", + ) + + if len(decoded_sequence) > 16: + logger.log(TRACE, f"Starting with: {decoded_sequence[:16]}") + logger.log(TRACE, f"Ending with: {decoded_sequence[-16::]}") + + for dt in detectors: + logger.log(TRACE, f"{dt.__class__}: {dt.ratio}") + + return round(mean_mess_ratio, 3) diff --git a/lib/python3.12/site-packages/charset_normalizer/models.py b/lib/python3.12/site-packages/charset_normalizer/models.py new file mode 100644 index 0000000000000000000000000000000000000000..1042758f873d2a54f7078c5411b17ffc11dca4ee --- /dev/null +++ b/lib/python3.12/site-packages/charset_normalizer/models.py @@ -0,0 +1,360 @@ +from __future__ import annotations + +from encodings.aliases import aliases +from hashlib import sha256 +from json import dumps +from re import sub +from typing import Any, Iterator, List, Tuple + +from .constant import RE_POSSIBLE_ENCODING_INDICATION, TOO_BIG_SEQUENCE +from .utils import iana_name, is_multi_byte_encoding, unicode_range + + +class CharsetMatch: + def __init__( + self, + payload: bytes, + guessed_encoding: str, + mean_mess_ratio: float, + has_sig_or_bom: bool, + languages: CoherenceMatches, + decoded_payload: str | None = None, + preemptive_declaration: str | None = None, + ): + self._payload: bytes = payload + + self._encoding: str = guessed_encoding + self._mean_mess_ratio: float = mean_mess_ratio + self._languages: CoherenceMatches = languages + self._has_sig_or_bom: bool = has_sig_or_bom + self._unicode_ranges: list[str] | None = None + + self._leaves: list[CharsetMatch] = [] + self._mean_coherence_ratio: float = 0.0 + + self._output_payload: bytes | None = None + self._output_encoding: str | None = None + + self._string: str | None = decoded_payload + + self._preemptive_declaration: str | None = preemptive_declaration + + def __eq__(self, other: object) -> bool: + if not isinstance(other, CharsetMatch): + if isinstance(other, str): + return iana_name(other) == self.encoding + return False + return self.encoding == other.encoding and self.fingerprint == other.fingerprint + + def __lt__(self, other: object) -> bool: + """ + Implemented to make sorted available upon CharsetMatches items. + """ + if not isinstance(other, CharsetMatch): + raise ValueError + + chaos_difference: float = abs(self.chaos - other.chaos) + coherence_difference: float = abs(self.coherence - other.coherence) + + # Below 1% difference --> Use Coherence + if chaos_difference < 0.01 and coherence_difference > 0.02: + return self.coherence > other.coherence + elif chaos_difference < 0.01 and coherence_difference <= 0.02: + # When having a difficult decision, use the result that decoded as many multi-byte as possible. + # preserve RAM usage! + if len(self._payload) >= TOO_BIG_SEQUENCE: + return self.chaos < other.chaos + return self.multi_byte_usage > other.multi_byte_usage + + return self.chaos < other.chaos + + @property + def multi_byte_usage(self) -> float: + return 1.0 - (len(str(self)) / len(self.raw)) + + def __str__(self) -> str: + # Lazy Str Loading + if self._string is None: + self._string = str(self._payload, self._encoding, "strict") + return self._string + + def __repr__(self) -> str: + return f"" + + def add_submatch(self, other: CharsetMatch) -> None: + if not isinstance(other, CharsetMatch) or other == self: + raise ValueError( + "Unable to add instance <{}> as a submatch of a CharsetMatch".format( + other.__class__ + ) + ) + + other._string = None # Unload RAM usage; dirty trick. + self._leaves.append(other) + + @property + def encoding(self) -> str: + return self._encoding + + @property + def encoding_aliases(self) -> list[str]: + """ + Encoding name are known by many name, using this could help when searching for IBM855 when it's listed as CP855. + """ + also_known_as: list[str] = [] + for u, p in aliases.items(): + if self.encoding == u: + also_known_as.append(p) + elif self.encoding == p: + also_known_as.append(u) + return also_known_as + + @property + def bom(self) -> bool: + return self._has_sig_or_bom + + @property + def byte_order_mark(self) -> bool: + return self._has_sig_or_bom + + @property + def languages(self) -> list[str]: + """ + Return the complete list of possible languages found in decoded sequence. + Usually not really useful. Returned list may be empty even if 'language' property return something != 'Unknown'. + """ + return [e[0] for e in self._languages] + + @property + def language(self) -> str: + """ + Most probable language found in decoded sequence. If none were detected or inferred, the property will return + "Unknown". + """ + if not self._languages: + # Trying to infer the language based on the given encoding + # Its either English or we should not pronounce ourselves in certain cases. + if "ascii" in self.could_be_from_charset: + return "English" + + # doing it there to avoid circular import + from charset_normalizer.cd import encoding_languages, mb_encoding_languages + + languages = ( + mb_encoding_languages(self.encoding) + if is_multi_byte_encoding(self.encoding) + else encoding_languages(self.encoding) + ) + + if len(languages) == 0 or "Latin Based" in languages: + return "Unknown" + + return languages[0] + + return self._languages[0][0] + + @property + def chaos(self) -> float: + return self._mean_mess_ratio + + @property + def coherence(self) -> float: + if not self._languages: + return 0.0 + return self._languages[0][1] + + @property + def percent_chaos(self) -> float: + return round(self.chaos * 100, ndigits=3) + + @property + def percent_coherence(self) -> float: + return round(self.coherence * 100, ndigits=3) + + @property + def raw(self) -> bytes: + """ + Original untouched bytes. + """ + return self._payload + + @property + def submatch(self) -> list[CharsetMatch]: + return self._leaves + + @property + def has_submatch(self) -> bool: + return len(self._leaves) > 0 + + @property + def alphabets(self) -> list[str]: + if self._unicode_ranges is not None: + return self._unicode_ranges + # list detected ranges + detected_ranges: list[str | None] = [unicode_range(char) for char in str(self)] + # filter and sort + self._unicode_ranges = sorted(list({r for r in detected_ranges if r})) + return self._unicode_ranges + + @property + def could_be_from_charset(self) -> list[str]: + """ + The complete list of encoding that output the exact SAME str result and therefore could be the originating + encoding. + This list does include the encoding available in property 'encoding'. + """ + return [self._encoding] + [m.encoding for m in self._leaves] + + def output(self, encoding: str = "utf_8") -> bytes: + """ + Method to get re-encoded bytes payload using given target encoding. Default to UTF-8. + Any errors will be simply ignored by the encoder NOT replaced. + """ + if self._output_encoding is None or self._output_encoding != encoding: + self._output_encoding = encoding + decoded_string = str(self) + if ( + self._preemptive_declaration is not None + and self._preemptive_declaration.lower() + not in ["utf-8", "utf8", "utf_8"] + ): + patched_header = sub( + RE_POSSIBLE_ENCODING_INDICATION, + lambda m: m.string[m.span()[0] : m.span()[1]].replace( + m.groups()[0], + iana_name(self._output_encoding).replace("_", "-"), # type: ignore[arg-type] + ), + decoded_string[:8192], + count=1, + ) + + decoded_string = patched_header + decoded_string[8192:] + + self._output_payload = decoded_string.encode(encoding, "replace") + + return self._output_payload # type: ignore + + @property + def fingerprint(self) -> str: + """ + Retrieve the unique SHA256 computed using the transformed (re-encoded) payload. Not the original one. + """ + return sha256(self.output()).hexdigest() + + +class CharsetMatches: + """ + Container with every CharsetMatch items ordered by default from most probable to the less one. + Act like a list(iterable) but does not implements all related methods. + """ + + def __init__(self, results: list[CharsetMatch] | None = None): + self._results: list[CharsetMatch] = sorted(results) if results else [] + + def __iter__(self) -> Iterator[CharsetMatch]: + yield from self._results + + def __getitem__(self, item: int | str) -> CharsetMatch: + """ + Retrieve a single item either by its position or encoding name (alias may be used here). + Raise KeyError upon invalid index or encoding not present in results. + """ + if isinstance(item, int): + return self._results[item] + if isinstance(item, str): + item = iana_name(item, False) + for result in self._results: + if item in result.could_be_from_charset: + return result + raise KeyError + + def __len__(self) -> int: + return len(self._results) + + def __bool__(self) -> bool: + return len(self._results) > 0 + + def append(self, item: CharsetMatch) -> None: + """ + Insert a single match. Will be inserted accordingly to preserve sort. + Can be inserted as a submatch. + """ + if not isinstance(item, CharsetMatch): + raise ValueError( + "Cannot append instance '{}' to CharsetMatches".format( + str(item.__class__) + ) + ) + # We should disable the submatch factoring when the input file is too heavy (conserve RAM usage) + if len(item.raw) < TOO_BIG_SEQUENCE: + for match in self._results: + if match.fingerprint == item.fingerprint and match.chaos == item.chaos: + match.add_submatch(item) + return + self._results.append(item) + self._results = sorted(self._results) + + def best(self) -> CharsetMatch | None: + """ + Simply return the first match. Strict equivalent to matches[0]. + """ + if not self._results: + return None + return self._results[0] + + def first(self) -> CharsetMatch | None: + """ + Redundant method, call the method best(). Kept for BC reasons. + """ + return self.best() + + +CoherenceMatch = Tuple[str, float] +CoherenceMatches = List[CoherenceMatch] + + +class CliDetectionResult: + def __init__( + self, + path: str, + encoding: str | None, + encoding_aliases: list[str], + alternative_encodings: list[str], + language: str, + alphabets: list[str], + has_sig_or_bom: bool, + chaos: float, + coherence: float, + unicode_path: str | None, + is_preferred: bool, + ): + self.path: str = path + self.unicode_path: str | None = unicode_path + self.encoding: str | None = encoding + self.encoding_aliases: list[str] = encoding_aliases + self.alternative_encodings: list[str] = alternative_encodings + self.language: str = language + self.alphabets: list[str] = alphabets + self.has_sig_or_bom: bool = has_sig_or_bom + self.chaos: float = chaos + self.coherence: float = coherence + self.is_preferred: bool = is_preferred + + @property + def __dict__(self) -> dict[str, Any]: # type: ignore + return { + "path": self.path, + "encoding": self.encoding, + "encoding_aliases": self.encoding_aliases, + "alternative_encodings": self.alternative_encodings, + "language": self.language, + "alphabets": self.alphabets, + "has_sig_or_bom": self.has_sig_or_bom, + "chaos": self.chaos, + "coherence": self.coherence, + "unicode_path": self.unicode_path, + "is_preferred": self.is_preferred, + } + + def to_json(self) -> str: + return dumps(self.__dict__, ensure_ascii=True, indent=4) diff --git a/lib/python3.12/site-packages/charset_normalizer/py.typed b/lib/python3.12/site-packages/charset_normalizer/py.typed new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/lib/python3.12/site-packages/charset_normalizer/utils.py b/lib/python3.12/site-packages/charset_normalizer/utils.py new file mode 100644 index 0000000000000000000000000000000000000000..6bf0384ccf94216f79881674f54182a93e17def0 --- /dev/null +++ b/lib/python3.12/site-packages/charset_normalizer/utils.py @@ -0,0 +1,414 @@ +from __future__ import annotations + +import importlib +import logging +import unicodedata +from codecs import IncrementalDecoder +from encodings.aliases import aliases +from functools import lru_cache +from re import findall +from typing import Generator + +from _multibytecodec import ( # type: ignore[import-not-found,import] + MultibyteIncrementalDecoder, +) + +from .constant import ( + ENCODING_MARKS, + IANA_SUPPORTED_SIMILAR, + RE_POSSIBLE_ENCODING_INDICATION, + UNICODE_RANGES_COMBINED, + UNICODE_SECONDARY_RANGE_KEYWORD, + UTF8_MAXIMAL_ALLOCATION, + COMMON_CJK_CHARACTERS, +) + + +@lru_cache(maxsize=UTF8_MAXIMAL_ALLOCATION) +def is_accentuated(character: str) -> bool: + try: + description: str = unicodedata.name(character) + except ValueError: # Defensive: unicode database outdated? + return False + return ( + "WITH GRAVE" in description + or "WITH ACUTE" in description + or "WITH CEDILLA" in description + or "WITH DIAERESIS" in description + or "WITH CIRCUMFLEX" in description + or "WITH TILDE" in description + or "WITH MACRON" in description + or "WITH RING ABOVE" in description + ) + + +@lru_cache(maxsize=UTF8_MAXIMAL_ALLOCATION) +def remove_accent(character: str) -> str: + decomposed: str = unicodedata.decomposition(character) + if not decomposed: + return character + + codes: list[str] = decomposed.split(" ") + + return chr(int(codes[0], 16)) + + +@lru_cache(maxsize=UTF8_MAXIMAL_ALLOCATION) +def unicode_range(character: str) -> str | None: + """ + Retrieve the Unicode range official name from a single character. + """ + character_ord: int = ord(character) + + for range_name, ord_range in UNICODE_RANGES_COMBINED.items(): + if character_ord in ord_range: + return range_name + + return None + + +@lru_cache(maxsize=UTF8_MAXIMAL_ALLOCATION) +def is_latin(character: str) -> bool: + try: + description: str = unicodedata.name(character) + except ValueError: # Defensive: unicode database outdated? + return False + return "LATIN" in description + + +@lru_cache(maxsize=UTF8_MAXIMAL_ALLOCATION) +def is_punctuation(character: str) -> bool: + character_category: str = unicodedata.category(character) + + if "P" in character_category: + return True + + character_range: str | None = unicode_range(character) + + if character_range is None: + return False + + return "Punctuation" in character_range + + +@lru_cache(maxsize=UTF8_MAXIMAL_ALLOCATION) +def is_symbol(character: str) -> bool: + character_category: str = unicodedata.category(character) + + if "S" in character_category or "N" in character_category: + return True + + character_range: str | None = unicode_range(character) + + if character_range is None: + return False + + return "Forms" in character_range and character_category != "Lo" + + +@lru_cache(maxsize=UTF8_MAXIMAL_ALLOCATION) +def is_emoticon(character: str) -> bool: + character_range: str | None = unicode_range(character) + + if character_range is None: + return False + + return "Emoticons" in character_range or "Pictographs" in character_range + + +@lru_cache(maxsize=UTF8_MAXIMAL_ALLOCATION) +def is_separator(character: str) -> bool: + if character.isspace() or character in {"|", "+", "<", ">"}: + return True + + character_category: str = unicodedata.category(character) + + return "Z" in character_category or character_category in {"Po", "Pd", "Pc"} + + +@lru_cache(maxsize=UTF8_MAXIMAL_ALLOCATION) +def is_case_variable(character: str) -> bool: + return character.islower() != character.isupper() + + +@lru_cache(maxsize=UTF8_MAXIMAL_ALLOCATION) +def is_cjk(character: str) -> bool: + try: + character_name = unicodedata.name(character) + except ValueError: # Defensive: unicode database outdated? + return False + + return "CJK" in character_name + + +@lru_cache(maxsize=UTF8_MAXIMAL_ALLOCATION) +def is_hiragana(character: str) -> bool: + try: + character_name = unicodedata.name(character) + except ValueError: # Defensive: unicode database outdated? + return False + + return "HIRAGANA" in character_name + + +@lru_cache(maxsize=UTF8_MAXIMAL_ALLOCATION) +def is_katakana(character: str) -> bool: + try: + character_name = unicodedata.name(character) + except ValueError: # Defensive: unicode database outdated? + return False + + return "KATAKANA" in character_name + + +@lru_cache(maxsize=UTF8_MAXIMAL_ALLOCATION) +def is_hangul(character: str) -> bool: + try: + character_name = unicodedata.name(character) + except ValueError: # Defensive: unicode database outdated? + return False + + return "HANGUL" in character_name + + +@lru_cache(maxsize=UTF8_MAXIMAL_ALLOCATION) +def is_thai(character: str) -> bool: + try: + character_name = unicodedata.name(character) + except ValueError: # Defensive: unicode database outdated? + return False + + return "THAI" in character_name + + +@lru_cache(maxsize=UTF8_MAXIMAL_ALLOCATION) +def is_arabic(character: str) -> bool: + try: + character_name = unicodedata.name(character) + except ValueError: # Defensive: unicode database outdated? + return False + + return "ARABIC" in character_name + + +@lru_cache(maxsize=UTF8_MAXIMAL_ALLOCATION) +def is_arabic_isolated_form(character: str) -> bool: + try: + character_name = unicodedata.name(character) + except ValueError: # Defensive: unicode database outdated? + return False + + return "ARABIC" in character_name and "ISOLATED FORM" in character_name + + +@lru_cache(maxsize=UTF8_MAXIMAL_ALLOCATION) +def is_cjk_uncommon(character: str) -> bool: + return character not in COMMON_CJK_CHARACTERS + + +@lru_cache(maxsize=len(UNICODE_RANGES_COMBINED)) +def is_unicode_range_secondary(range_name: str) -> bool: + return any(keyword in range_name for keyword in UNICODE_SECONDARY_RANGE_KEYWORD) + + +@lru_cache(maxsize=UTF8_MAXIMAL_ALLOCATION) +def is_unprintable(character: str) -> bool: + return ( + character.isspace() is False # includes \n \t \r \v + and character.isprintable() is False + and character != "\x1a" # Why? Its the ASCII substitute character. + and character != "\ufeff" # bug discovered in Python, + # Zero Width No-Break Space located in Arabic Presentation Forms-B, Unicode 1.1 not acknowledged as space. + ) + + +def any_specified_encoding(sequence: bytes, search_zone: int = 8192) -> str | None: + """ + Extract using ASCII-only decoder any specified encoding in the first n-bytes. + """ + if not isinstance(sequence, bytes): + raise TypeError + + seq_len: int = len(sequence) + + results: list[str] = findall( + RE_POSSIBLE_ENCODING_INDICATION, + sequence[: min(seq_len, search_zone)].decode("ascii", errors="ignore"), + ) + + if len(results) == 0: + return None + + for specified_encoding in results: + specified_encoding = specified_encoding.lower().replace("-", "_") + + encoding_alias: str + encoding_iana: str + + for encoding_alias, encoding_iana in aliases.items(): + if encoding_alias == specified_encoding: + return encoding_iana + if encoding_iana == specified_encoding: + return encoding_iana + + return None + + +@lru_cache(maxsize=128) +def is_multi_byte_encoding(name: str) -> bool: + """ + Verify is a specific encoding is a multi byte one based on it IANA name + """ + return name in { + "utf_8", + "utf_8_sig", + "utf_16", + "utf_16_be", + "utf_16_le", + "utf_32", + "utf_32_le", + "utf_32_be", + "utf_7", + } or issubclass( + importlib.import_module(f"encodings.{name}").IncrementalDecoder, + MultibyteIncrementalDecoder, + ) + + +def identify_sig_or_bom(sequence: bytes) -> tuple[str | None, bytes]: + """ + Identify and extract SIG/BOM in given sequence. + """ + + for iana_encoding in ENCODING_MARKS: + marks: bytes | list[bytes] = ENCODING_MARKS[iana_encoding] + + if isinstance(marks, bytes): + marks = [marks] + + for mark in marks: + if sequence.startswith(mark): + return iana_encoding, mark + + return None, b"" + + +def should_strip_sig_or_bom(iana_encoding: str) -> bool: + return iana_encoding not in {"utf_16", "utf_32"} + + +def iana_name(cp_name: str, strict: bool = True) -> str: + """Returns the Python normalized encoding name (Not the IANA official name).""" + cp_name = cp_name.lower().replace("-", "_") + + encoding_alias: str + encoding_iana: str + + for encoding_alias, encoding_iana in aliases.items(): + if cp_name in [encoding_alias, encoding_iana]: + return encoding_iana + + if strict: + raise ValueError(f"Unable to retrieve IANA for '{cp_name}'") + + return cp_name + + +def cp_similarity(iana_name_a: str, iana_name_b: str) -> float: + if is_multi_byte_encoding(iana_name_a) or is_multi_byte_encoding(iana_name_b): + return 0.0 + + decoder_a = importlib.import_module(f"encodings.{iana_name_a}").IncrementalDecoder + decoder_b = importlib.import_module(f"encodings.{iana_name_b}").IncrementalDecoder + + id_a: IncrementalDecoder = decoder_a(errors="ignore") + id_b: IncrementalDecoder = decoder_b(errors="ignore") + + character_match_count: int = 0 + + for i in range(255): + to_be_decoded: bytes = bytes([i]) + if id_a.decode(to_be_decoded) == id_b.decode(to_be_decoded): + character_match_count += 1 + + return character_match_count / 254 + + +def is_cp_similar(iana_name_a: str, iana_name_b: str) -> bool: + """ + Determine if two code page are at least 80% similar. IANA_SUPPORTED_SIMILAR dict was generated using + the function cp_similarity. + """ + return ( + iana_name_a in IANA_SUPPORTED_SIMILAR + and iana_name_b in IANA_SUPPORTED_SIMILAR[iana_name_a] + ) + + +def set_logging_handler( + name: str = "charset_normalizer", + level: int = logging.INFO, + format_string: str = "%(asctime)s | %(levelname)s | %(message)s", +) -> None: + logger = logging.getLogger(name) + logger.setLevel(level) + + handler = logging.StreamHandler() + handler.setFormatter(logging.Formatter(format_string)) + logger.addHandler(handler) + + +def cut_sequence_chunks( + sequences: bytes, + encoding_iana: str, + offsets: range, + chunk_size: int, + bom_or_sig_available: bool, + strip_sig_or_bom: bool, + sig_payload: bytes, + is_multi_byte_decoder: bool, + decoded_payload: str | None = None, +) -> Generator[str, None, None]: + if decoded_payload and is_multi_byte_decoder is False: + for i in offsets: + chunk = decoded_payload[i : i + chunk_size] + if not chunk: + break + yield chunk + else: + for i in offsets: + chunk_end = i + chunk_size + if chunk_end > len(sequences) + 8: + continue + + cut_sequence = sequences[i : i + chunk_size] + + if bom_or_sig_available and strip_sig_or_bom is False: + cut_sequence = sig_payload + cut_sequence + + chunk = cut_sequence.decode( + encoding_iana, + errors="ignore" if is_multi_byte_decoder else "strict", + ) + + # multi-byte bad cutting detector and adjustment + # not the cleanest way to perform that fix but clever enough for now. + if is_multi_byte_decoder and i > 0: + chunk_partial_size_chk: int = min(chunk_size, 16) + + if ( + decoded_payload + and chunk[:chunk_partial_size_chk] not in decoded_payload + ): + for j in range(i, i - 4, -1): + cut_sequence = sequences[j:chunk_end] + + if bom_or_sig_available and strip_sig_or_bom is False: + cut_sequence = sig_payload + cut_sequence + + chunk = cut_sequence.decode(encoding_iana, errors="ignore") + + if chunk[:chunk_partial_size_chk] in decoded_payload: + break + + yield chunk diff --git a/lib/python3.12/site-packages/charset_normalizer/version.py b/lib/python3.12/site-packages/charset_normalizer/version.py new file mode 100644 index 0000000000000000000000000000000000000000..c843e5331131fe69b5bba96d3f0c1160dcaa943b --- /dev/null +++ b/lib/python3.12/site-packages/charset_normalizer/version.py @@ -0,0 +1,8 @@ +""" +Expose version +""" + +from __future__ import annotations + +__version__ = "3.4.4" +VERSION = __version__.split(".") diff --git a/lib/python3.12/site-packages/decorator-5.2.1.dist-info/INSTALLER b/lib/python3.12/site-packages/decorator-5.2.1.dist-info/INSTALLER new file mode 100644 index 0000000000000000000000000000000000000000..a1b589e38a32041e49332e5e81c2d363dc418d68 --- /dev/null +++ b/lib/python3.12/site-packages/decorator-5.2.1.dist-info/INSTALLER @@ -0,0 +1 @@ +pip diff --git a/lib/python3.12/site-packages/decorator-5.2.1.dist-info/LICENSE.txt b/lib/python3.12/site-packages/decorator-5.2.1.dist-info/LICENSE.txt new file mode 100644 index 0000000000000000000000000000000000000000..3e01d05b189d7ebe54b01717c4e365fe45bb765b --- /dev/null +++ b/lib/python3.12/site-packages/decorator-5.2.1.dist-info/LICENSE.txt @@ -0,0 +1,27 @@ +Copyright (c) 2005-2025, Michele Simionato +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +* Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR +TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE +USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +DAMAGE. diff --git a/lib/python3.12/site-packages/decorator-5.2.1.dist-info/METADATA b/lib/python3.12/site-packages/decorator-5.2.1.dist-info/METADATA new file mode 100644 index 0000000000000000000000000000000000000000..be5072eb0dd78161fe026992cf7010d5a05a8adb --- /dev/null +++ b/lib/python3.12/site-packages/decorator-5.2.1.dist-info/METADATA @@ -0,0 +1,124 @@ +Metadata-Version: 2.2 +Name: decorator +Version: 5.2.1 +Summary: Decorators for Humans +Author-email: Michele Simionato +License: BSD-2-Clause +Keywords: decorators +Classifier: Development Status :: 5 - Production/Stable +Classifier: Intended Audience :: Developers +Classifier: License :: OSI Approved :: BSD License +Classifier: Natural Language :: English +Classifier: Operating System :: OS Independent +Classifier: Programming Language :: Python +Classifier: Programming Language :: Python :: 3.8 +Classifier: Programming Language :: Python :: 3.9 +Classifier: Programming Language :: Python :: 3.10 +Classifier: Programming Language :: Python :: 3.11 +Classifier: Programming Language :: Python :: 3.12 +Classifier: Programming Language :: Python :: 3.13 +Classifier: Programming Language :: Python :: Implementation :: CPython +Classifier: Topic :: Software Development :: Libraries +Classifier: Topic :: Utilities +Requires-Python: >=3.8 +Description-Content-Type: text/x-rst +License-File: LICENSE.txt + +Decorators for Humans +===================== + +The goal of the decorator module is to make it easy to define +signature-preserving function decorators and decorator factories. +It also includes an implementation of multiple dispatch and other niceties +(please check the docs). It is released under a two-clauses +BSD license, i.e. basically you can do whatever you want with it but I am not +responsible. + +Installation +------------- + +If you are lazy, just perform + + ``$ pip install decorator`` + +which will install just the module on your system. + +If you prefer to install the full distribution from source, including +the documentation, clone the `GitHub repo`_ or download the tarball_, unpack it and run + + ``$ pip install .`` + +in the main directory, possibly as superuser. + +.. _tarball: https://pypi.org/project/decorator/#files +.. _GitHub repo: https://github.com/micheles/decorator + +Testing +-------- + +If you have the source code installation you can run the tests with + + `$ python src/tests/test.py -v` + +or (if you have setuptools installed) + + `$ python setup.py test` + +Notice that you may run into trouble if in your system there +is an older version of the decorator module; in such a case remove the +old version. It is safe even to copy the module `decorator.py` over +an existing one, since we kept backward-compatibility for a long time. + +Repository +--------------- + +The project is hosted on GitHub. You can look at the source here: + + https://github.com/micheles/decorator + +Documentation +--------------- + +The documentation has been moved to https://github.com/micheles/decorator/blob/master/docs/documentation.md + +From there you can get a PDF version by simply using the print +functionality of your browser. + +Here is the documentation for previous versions of the module: + +https://github.com/micheles/decorator/blob/4.3.2/docs/tests.documentation.rst +https://github.com/micheles/decorator/blob/4.2.1/docs/tests.documentation.rst +https://github.com/micheles/decorator/blob/4.1.2/docs/tests.documentation.rst +https://github.com/micheles/decorator/blob/4.0.0/documentation.rst +https://github.com/micheles/decorator/blob/3.4.2/documentation.rst + +For the impatient +----------------- + +Here is an example of how to define a family of decorators tracing slow +operations: + +.. code-block:: python + + from decorator import decorator + + @decorator + def warn_slow(func, timelimit=60, *args, **kw): + t0 = time.time() + result = func(*args, **kw) + dt = time.time() - t0 + if dt > timelimit: + logging.warning('%s took %d seconds', func.__name__, dt) + else: + logging.info('%s took %d seconds', func.__name__, dt) + return result + + @warn_slow # warn if it takes more than 1 minute + def preprocess_input_files(inputdir, tempdir): + ... + + @warn_slow(timelimit=600) # warn if it takes more than 10 minutes + def run_calculation(tempdir, outdir): + ... + +Enjoy! diff --git a/lib/python3.12/site-packages/decorator-5.2.1.dist-info/RECORD b/lib/python3.12/site-packages/decorator-5.2.1.dist-info/RECORD new file mode 100644 index 0000000000000000000000000000000000000000..5f74b6bab842540b61e9109ded30ff75aa917e96 --- /dev/null +++ b/lib/python3.12/site-packages/decorator-5.2.1.dist-info/RECORD @@ -0,0 +1,9 @@ +__pycache__/decorator.cpython-312.pyc,, +decorator-5.2.1.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4 +decorator-5.2.1.dist-info/LICENSE.txt,sha256=kU7m7Xil78FzvaaY8nCERMqdFA_MQIDGDQUD1A2znaY,1308 +decorator-5.2.1.dist-info/METADATA,sha256=i76fp7lNo0QbinX3NBJjSu_GhVp9A8iuab--m-8mKB4,3934 +decorator-5.2.1.dist-info/RECORD,, +decorator-5.2.1.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91 +decorator-5.2.1.dist-info/pbr.json,sha256=AL84oUUWQHwkd8OCPhLRo2NJjU5MDdmXMqRHv-posqs,47 +decorator-5.2.1.dist-info/top_level.txt,sha256=Kn6eQjo83ctWxXVyBMOYt0_YpjRjBznKYVuNyuC_DSI,10 +decorator.py,sha256=cWnO6cKKohQrXNEG1-Fauiw8djwE3f2PA2gJGofwgXA,17067 diff --git a/lib/python3.12/site-packages/decorator-5.2.1.dist-info/WHEEL b/lib/python3.12/site-packages/decorator-5.2.1.dist-info/WHEEL new file mode 100644 index 0000000000000000000000000000000000000000..505164bc02d63fe6b0b3299f849a77c5f1beeb41 --- /dev/null +++ b/lib/python3.12/site-packages/decorator-5.2.1.dist-info/WHEEL @@ -0,0 +1,5 @@ +Wheel-Version: 1.0 +Generator: setuptools (75.8.0) +Root-Is-Purelib: true +Tag: py3-none-any + diff --git a/lib/python3.12/site-packages/decorator-5.2.1.dist-info/pbr.json b/lib/python3.12/site-packages/decorator-5.2.1.dist-info/pbr.json new file mode 100644 index 0000000000000000000000000000000000000000..cd04599789742039ac2f3b2b5cd60ce7a6d81c71 --- /dev/null +++ b/lib/python3.12/site-packages/decorator-5.2.1.dist-info/pbr.json @@ -0,0 +1 @@ +{"is_release": false, "git_version": "8608a46"} \ No newline at end of file diff --git a/lib/python3.12/site-packages/decorator-5.2.1.dist-info/top_level.txt b/lib/python3.12/site-packages/decorator-5.2.1.dist-info/top_level.txt new file mode 100644 index 0000000000000000000000000000000000000000..3fe18a4d1c20592171597e32e7f633bc61fff1ed --- /dev/null +++ b/lib/python3.12/site-packages/decorator-5.2.1.dist-info/top_level.txt @@ -0,0 +1 @@ +decorator diff --git a/lib/python3.12/site-packages/filelock-3.18.0.dist-info/INSTALLER b/lib/python3.12/site-packages/filelock-3.18.0.dist-info/INSTALLER new file mode 100644 index 0000000000000000000000000000000000000000..a1b589e38a32041e49332e5e81c2d363dc418d68 --- /dev/null +++ b/lib/python3.12/site-packages/filelock-3.18.0.dist-info/INSTALLER @@ -0,0 +1 @@ +pip diff --git a/lib/python3.12/site-packages/filelock-3.18.0.dist-info/METADATA b/lib/python3.12/site-packages/filelock-3.18.0.dist-info/METADATA new file mode 100644 index 0000000000000000000000000000000000000000..b640fa40f1c602258661ece0aa29723df9a7c947 --- /dev/null +++ b/lib/python3.12/site-packages/filelock-3.18.0.dist-info/METADATA @@ -0,0 +1,58 @@ +Metadata-Version: 2.4 +Name: filelock +Version: 3.18.0 +Summary: A platform independent file lock. +Project-URL: Documentation, https://py-filelock.readthedocs.io +Project-URL: Homepage, https://github.com/tox-dev/py-filelock +Project-URL: Source, https://github.com/tox-dev/py-filelock +Project-URL: Tracker, https://github.com/tox-dev/py-filelock/issues +Maintainer-email: Bernát Gábor +License-Expression: Unlicense +License-File: LICENSE +Keywords: application,cache,directory,log,user +Classifier: Development Status :: 5 - Production/Stable +Classifier: Intended Audience :: Developers +Classifier: License :: OSI Approved :: The Unlicense (Unlicense) +Classifier: Operating System :: OS Independent +Classifier: Programming Language :: Python +Classifier: Programming Language :: Python :: 3 :: Only +Classifier: Programming Language :: Python :: 3.9 +Classifier: Programming Language :: Python :: 3.10 +Classifier: Programming Language :: Python :: 3.11 +Classifier: Programming Language :: Python :: 3.12 +Classifier: Programming Language :: Python :: 3.13 +Classifier: Topic :: Internet +Classifier: Topic :: Software Development :: Libraries +Classifier: Topic :: System +Requires-Python: >=3.9 +Provides-Extra: docs +Requires-Dist: furo>=2024.8.6; extra == 'docs' +Requires-Dist: sphinx-autodoc-typehints>=3; extra == 'docs' +Requires-Dist: sphinx>=8.1.3; extra == 'docs' +Provides-Extra: testing +Requires-Dist: covdefaults>=2.3; extra == 'testing' +Requires-Dist: coverage>=7.6.10; extra == 'testing' +Requires-Dist: diff-cover>=9.2.1; extra == 'testing' +Requires-Dist: pytest-asyncio>=0.25.2; extra == 'testing' +Requires-Dist: pytest-cov>=6; extra == 'testing' +Requires-Dist: pytest-mock>=3.14; extra == 'testing' +Requires-Dist: pytest-timeout>=2.3.1; extra == 'testing' +Requires-Dist: pytest>=8.3.4; extra == 'testing' +Requires-Dist: virtualenv>=20.28.1; extra == 'testing' +Provides-Extra: typing +Requires-Dist: typing-extensions>=4.12.2; (python_version < '3.11') and extra == 'typing' +Description-Content-Type: text/markdown + +# filelock + +[![PyPI](https://img.shields.io/pypi/v/filelock)](https://pypi.org/project/filelock/) +[![Supported Python +versions](https://img.shields.io/pypi/pyversions/filelock.svg)](https://pypi.org/project/filelock/) +[![Documentation +status](https://readthedocs.org/projects/py-filelock/badge/?version=latest)](https://py-filelock.readthedocs.io/en/latest/?badge=latest) +[![Code style: +black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) +[![Downloads](https://static.pepy.tech/badge/filelock/month)](https://pepy.tech/project/filelock) +[![check](https://github.com/tox-dev/py-filelock/actions/workflows/check.yaml/badge.svg)](https://github.com/tox-dev/py-filelock/actions/workflows/check.yaml) + +For more information checkout the [official documentation](https://py-filelock.readthedocs.io/en/latest/index.html). diff --git a/lib/python3.12/site-packages/filelock-3.18.0.dist-info/RECORD b/lib/python3.12/site-packages/filelock-3.18.0.dist-info/RECORD new file mode 100644 index 0000000000000000000000000000000000000000..b94304393b7084dfadafd223a291232cc2d89bda --- /dev/null +++ b/lib/python3.12/site-packages/filelock-3.18.0.dist-info/RECORD @@ -0,0 +1,25 @@ +filelock-3.18.0.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4 +filelock-3.18.0.dist-info/METADATA,sha256=bMzrZMIFytIbgg_WaLomH79i_7KEx8ahX0IJBxbx1_I,2897 +filelock-3.18.0.dist-info/RECORD,, +filelock-3.18.0.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +filelock-3.18.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87 +filelock-3.18.0.dist-info/licenses/LICENSE,sha256=iNm062BXnBkew5HKBMFhMFctfu3EqG2qWL8oxuFMm80,1210 +filelock/__init__.py,sha256=_t_-OAGXo_qyPa9lNQ1YnzVYEvSW3I0onPqzpomsVVg,1769 +filelock/__pycache__/__init__.cpython-312.pyc,, +filelock/__pycache__/_api.cpython-312.pyc,, +filelock/__pycache__/_error.cpython-312.pyc,, +filelock/__pycache__/_soft.cpython-312.pyc,, +filelock/__pycache__/_unix.cpython-312.pyc,, +filelock/__pycache__/_util.cpython-312.pyc,, +filelock/__pycache__/_windows.cpython-312.pyc,, +filelock/__pycache__/asyncio.cpython-312.pyc,, +filelock/__pycache__/version.cpython-312.pyc,, +filelock/_api.py,sha256=2aATBeJ3-jtMj5OSm7EE539iNaTBsf13KXtcBMoi8oM,14545 +filelock/_error.py,sha256=-5jMcjTu60YAvAO1UbqDD1GIEjVkwr8xCFwDBtMeYDg,787 +filelock/_soft.py,sha256=haqtc_TB_KJbYv2a8iuEAclKuM4fMG1vTcp28sK919c,1711 +filelock/_unix.py,sha256=eGOs4gDgZ-5fGnJUz-OkJDeZkAMzgvYcD8hVD6XH7e4,2351 +filelock/_util.py,sha256=QHBoNFIYfbAThhotH3Q8E2acFc84wpG49-T-uu017ZE,1715 +filelock/_windows.py,sha256=8k4XIBl_zZVfGC2gz0kEr8DZBvpNa8wdU9qeM1YrBb8,2179 +filelock/asyncio.py,sha256=EZdJVkbMnZMuQwzuPN5IvXD0Ugzt__vOtrMP4-siVeU,12451 +filelock/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +filelock/version.py,sha256=D9gAiF9PGH4dQFjbe6VcXhU8kyCLpU7-c7_vfZP--Hc,513 diff --git a/lib/python3.12/site-packages/filelock-3.18.0.dist-info/REQUESTED b/lib/python3.12/site-packages/filelock-3.18.0.dist-info/REQUESTED new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/lib/python3.12/site-packages/filelock-3.18.0.dist-info/WHEEL b/lib/python3.12/site-packages/filelock-3.18.0.dist-info/WHEEL new file mode 100644 index 0000000000000000000000000000000000000000..12228d414b6cfed7c39d3781c85c63256a1d7fb5 --- /dev/null +++ b/lib/python3.12/site-packages/filelock-3.18.0.dist-info/WHEEL @@ -0,0 +1,4 @@ +Wheel-Version: 1.0 +Generator: hatchling 1.27.0 +Root-Is-Purelib: true +Tag: py3-none-any diff --git a/lib/python3.12/site-packages/filelock-3.18.0.dist-info/licenses/LICENSE b/lib/python3.12/site-packages/filelock-3.18.0.dist-info/licenses/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..cf1ab25da0349f84a3fdd40032f0ce99db813b8b --- /dev/null +++ b/lib/python3.12/site-packages/filelock-3.18.0.dist-info/licenses/LICENSE @@ -0,0 +1,24 @@ +This is free and unencumbered software released into the public domain. + +Anyone is free to copy, modify, publish, use, compile, sell, or +distribute this software, either in source code form or as a compiled +binary, for any purpose, commercial or non-commercial, and by any +means. + +In jurisdictions that recognize copyright laws, the author or authors +of this software dedicate any and all copyright interest in the +software to the public domain. We make this dedication for the benefit +of the public at large and to the detriment of our heirs and +successors. We intend this dedication to be an overt act of +relinquishment in perpetuity of all present and future rights to this +software under copyright law. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +For more information, please refer to diff --git a/lib/python3.12/site-packages/grpcio-1.76.0.dist-info/INSTALLER b/lib/python3.12/site-packages/grpcio-1.76.0.dist-info/INSTALLER new file mode 100644 index 0000000000000000000000000000000000000000..a1b589e38a32041e49332e5e81c2d363dc418d68 --- /dev/null +++ b/lib/python3.12/site-packages/grpcio-1.76.0.dist-info/INSTALLER @@ -0,0 +1 @@ +pip diff --git a/lib/python3.12/site-packages/grpcio-1.76.0.dist-info/LICENSE b/lib/python3.12/site-packages/grpcio-1.76.0.dist-info/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..0e09a3e90900cb576f297c9558916a926312a5df --- /dev/null +++ b/lib/python3.12/site-packages/grpcio-1.76.0.dist-info/LICENSE @@ -0,0 +1,610 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +----------------------------------------------------------- + +BSD 3-Clause License + +Copyright 2016, Google Inc. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its +contributors may be used to endorse or promote products derived from this +software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF +THE POSSIBILITY OF SUCH DAMAGE. + +----------------------------------------------------------- + +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/lib/python3.12/site-packages/grpcio-1.76.0.dist-info/METADATA b/lib/python3.12/site-packages/grpcio-1.76.0.dist-info/METADATA new file mode 100644 index 0000000000000000000000000000000000000000..68ad851b732e171771c164175258570564c4b132 --- /dev/null +++ b/lib/python3.12/site-packages/grpcio-1.76.0.dist-info/METADATA @@ -0,0 +1,126 @@ +Metadata-Version: 2.1 +Name: grpcio +Version: 1.76.0 +Summary: HTTP/2-based RPC framework +Home-page: https://grpc.io +Author: The gRPC Authors +Author-email: grpc-io@googlegroups.com +License: Apache License 2.0 +Project-URL: Source Code, https://github.com/grpc/grpc +Project-URL: Bug Tracker, https://github.com/grpc/grpc/issues +Project-URL: Documentation, https://grpc.github.io/grpc/python +Classifier: Development Status :: 5 - Production/Stable +Classifier: Programming Language :: Python +Classifier: Programming Language :: Python :: 3 +Classifier: Programming Language :: Python :: 3.9 +Classifier: Programming Language :: Python :: 3.10 +Classifier: Programming Language :: Python :: 3.11 +Classifier: Programming Language :: Python :: 3.12 +Classifier: Programming Language :: Python :: 3.13 +Classifier: Programming Language :: Python :: 3.14 +Classifier: License :: OSI Approved :: Apache Software License +Requires-Python: >=3.9 +Description-Content-Type: text/x-rst +License-File: LICENSE +Requires-Dist: typing-extensions ~=4.12 +Provides-Extra: protobuf +Requires-Dist: grpcio-tools >=1.76.0 ; extra == 'protobuf' + +gRPC Python +=========== + +Package for gRPC Python. + + +Installation +------------ + +gRPC Python is available for Linux, macOS, and Windows. + +Installing From PyPI +~~~~~~~~~~~~~~~~~~~~ + +If you are installing locally... + +:: + + $ pip install grpcio + +Else system wide (on Ubuntu)... + +:: + + $ sudo pip install grpcio + +If you're on Windows make sure that you installed the :code:`pip.exe` component +when you installed Python (if not go back and install it!) then invoke: + +:: + + $ pip.exe install grpcio + +Windows users may need to invoke :code:`pip.exe` from a command line ran as +administrator. + +n.b. On Windows and on Mac OS X one *must* have a recent release of :code:`pip` +to retrieve the proper wheel from PyPI. Be sure to upgrade to the latest +version! + +Installing From Source +~~~~~~~~~~~~~~~~~~~~~~ + +Building from source requires that you have the Python headers (usually a +package named :code:`python-dev`). + +:: + + $ export REPO_ROOT=grpc # REPO_ROOT can be any directory of your choice + $ git clone -b RELEASE_TAG_HERE https://github.com/grpc/grpc $REPO_ROOT + $ cd $REPO_ROOT + $ git submodule update --init + + # To include systemd socket-activation feature in the build, + # first install the `libsystemd-dev` package, then : + $ export GRPC_PYTHON_BUILD_WITH_SYSTEMD=1 + + # For the next two commands do `sudo pip install` if you get permission-denied errors + $ pip install -r requirements.txt + $ GRPC_PYTHON_BUILD_WITH_CYTHON=1 pip install . + +You cannot currently install Python from source on Windows. Things might work +out for you in MSYS2 (follow the Linux instructions), but it isn't officially +supported at the moment. + +Troubleshooting +~~~~~~~~~~~~~~~ + +Help, I ... + +* **... see the following error on some platforms** + + :: + + /tmp/pip-build-U8pSsr/cython/Cython/Plex/Scanners.c:4:20: fatal error: Python.h: No such file or directory + #include "Python.h" + ^ + compilation terminated. + + You can fix it by installing `python-dev` package. i.e + + :: + + sudo apt-get install python-dev + + +Versioning +~~~~~~~~~~ + +gRPC Python is developed in a monorepo shared with implementations of gRPC in +other programming languages. While the minor versions are released in +lock-step with other languages in the repo (e.g. 1.63.0 is guaranteed to exist +for all languages), patch versions may be specific to only a single +language. For example, if 1.63.1 is a C++-specific patch, 1.63.1 may not be +uploaded to PyPi. As a result, it is __not__ a good assumption that the latest +patch for a given minor version on Github is also the latest patch for that +same minor version on PyPi. + diff --git a/lib/python3.12/site-packages/grpcio-1.76.0.dist-info/RECORD b/lib/python3.12/site-packages/grpcio-1.76.0.dist-info/RECORD new file mode 100644 index 0000000000000000000000000000000000000000..fff5e83b3953fff1ce6f00ec54f6a1793ebf1a35 --- /dev/null +++ b/lib/python3.12/site-packages/grpcio-1.76.0.dist-info/RECORD @@ -0,0 +1,120 @@ +grpc/__init__.py,sha256=2gSGeVb1zy84j1E2XJLX9C2QIFdENk8-DcT785qzMuU,82325 +grpc/__pycache__/__init__.cpython-312.pyc,, +grpc/__pycache__/_auth.cpython-312.pyc,, +grpc/__pycache__/_channel.cpython-312.pyc,, +grpc/__pycache__/_common.cpython-312.pyc,, +grpc/__pycache__/_compression.cpython-312.pyc,, +grpc/__pycache__/_grpcio_metadata.cpython-312.pyc,, +grpc/__pycache__/_interceptor.cpython-312.pyc,, +grpc/__pycache__/_observability.cpython-312.pyc,, +grpc/__pycache__/_plugin_wrapping.cpython-312.pyc,, +grpc/__pycache__/_runtime_protos.cpython-312.pyc,, +grpc/__pycache__/_server.cpython-312.pyc,, +grpc/__pycache__/_simple_stubs.cpython-312.pyc,, +grpc/__pycache__/_typing.cpython-312.pyc,, +grpc/__pycache__/_utilities.cpython-312.pyc,, +grpc/_auth.py,sha256=8vetiVy5gLCth77IsRGdhOgHFrC1rWGe_36lpMG8NyM,2650 +grpc/_channel.py,sha256=Smt1GsRP49uPklGYsTDRs2JgfS5sPj-uxZq9Kb8nkmw,80768 +grpc/_common.py,sha256=W8MJz-AmjrnLtsnZRcOLioO-7zLWnDHnx4zDlV3eQdY,6740 +grpc/_compression.py,sha256=0P9yfNIn33BmcQmOdnMUTogbLIPR0eT_Lmmnm3llcFg,1983 +grpc/_cython/__init__.py,sha256=w3kqSAyaZgP-W0890xR4L4WeBPGrtsQCQJe0FUFR0K0,577 +grpc/_cython/__pycache__/__init__.cpython-312.pyc,, +grpc/_cython/_credentials/roots.pem,sha256=lhQzRMSuEJWIElssQdXa9lSl-vxuI_rDf3uj0p2n53Y,264440 +grpc/_cython/_cygrpc/__init__.py,sha256=w3kqSAyaZgP-W0890xR4L4WeBPGrtsQCQJe0FUFR0K0,577 +grpc/_cython/_cygrpc/__pycache__/__init__.cpython-312.pyc,, +grpc/_cython/cygrpc.cpython-312-x86_64-linux-gnu.so,sha256=32jIEAlh6ynfRlHX_cvhLoXxL_fUrcu9_0zJ1Che59Y,15398104 +grpc/_grpcio_metadata.py,sha256=8gZJkz96r2oTd1NVv_cCDvR3irvrz9fPk7E0MoB1YgQ,26 +grpc/_interceptor.py,sha256=sbVfBJ5Jynjkxk3m95rQyRAcH6NmSk8Z3Jae4bDKajw,25804 +grpc/_observability.py,sha256=CeIlfW5qBv5ykleFq0ThFbY45A7CFZ2yxwrUC1thX6A,10551 +grpc/_plugin_wrapping.py,sha256=b6r6RdjdDrnhcyvGd3w7yLTHTzy-qNa0H7V8SjS8Y8E,4433 +grpc/_runtime_protos.py,sha256=cE71tgs0dZXgaTN8a1k7ToY3x1oIMDDp5bSzcxHLqSE,5787 +grpc/_server.py,sha256=z1vPMps7qfBIjiEkbERywyR3CEcWKBZshBQYSKBvF5o,50395 +grpc/_simple_stubs.py,sha256=kBQ8oKG0oE_f10mQyTYOLphvf1-2vZu2kAK8l9yY6Ig,24558 +grpc/_typing.py,sha256=yYDT3PaWG8RYbHzT_y9OalmMOldE6pBGobEoQmBtbj4,2790 +grpc/_utilities.py,sha256=Jh4C5FDnT5nAvzZ3dPdLePAq7QPAF_owR1hPPetVi5Y,6955 +grpc/aio/__init__.py,sha256=80Ho1FolpueFqIIvyl7d5b9FJgvw5ilZgHcXxN1NmUs,3160 +grpc/aio/__pycache__/__init__.cpython-312.pyc,, +grpc/aio/__pycache__/_base_call.cpython-312.pyc,, +grpc/aio/__pycache__/_base_channel.cpython-312.pyc,, +grpc/aio/__pycache__/_base_server.cpython-312.pyc,, +grpc/aio/__pycache__/_call.cpython-312.pyc,, +grpc/aio/__pycache__/_channel.cpython-312.pyc,, +grpc/aio/__pycache__/_interceptor.cpython-312.pyc,, +grpc/aio/__pycache__/_metadata.cpython-312.pyc,, +grpc/aio/__pycache__/_server.cpython-312.pyc,, +grpc/aio/__pycache__/_typing.cpython-312.pyc,, +grpc/aio/__pycache__/_utils.cpython-312.pyc,, +grpc/aio/_base_call.py,sha256=THFXG0o0ISn40Jrw0sNlcFzfobD8UrjgjddMWtg8ZJA,7560 +grpc/aio/_base_channel.py,sha256=wVwElJ73bfTTkYC9J6NZjCq-q2MEvTOLSbOseNPzr8k,13893 +grpc/aio/_base_server.py,sha256=eHq9EDUn1UM6M-e-wSax3ZMgrFGO8DDKkTuYwobJTYQ,12583 +grpc/aio/_call.py,sha256=L-B2P8mvipUgL8JbsT56UWa13qToXaqigpCmtA-C36k,25426 +grpc/aio/_channel.py,sha256=tePVjdJ5GOabQ5wz_oaSC5FFLNlKPdWpGetMExsimXA,22163 +grpc/aio/_interceptor.py,sha256=VF5z2ADvNeMwd0xkBi0iFfd24e-En7ZzO19Oof0bLdE,41458 +grpc/aio/_metadata.py,sha256=4wC8TttgCrFJF8_Qx2yuCXBpmKnTpJQ2DXV50fzeg3Y,5054 +grpc/aio/_server.py,sha256=4LbmHnMMLVZzddx3E58BC4prrSlEz7PAFGox7pYbbJs,8969 +grpc/aio/_typing.py,sha256=xMlG33vn_UkdkRv39Udx421BWVgt5RHCu8gJXAQ18do,1378 +grpc/aio/_utils.py,sha256=Bh5-lQO2xszdZeTFAWFfFhhaKy20ll4kucD6f_YZTlg,821 +grpc/beta/__init__.py,sha256=w3kqSAyaZgP-W0890xR4L4WeBPGrtsQCQJe0FUFR0K0,577 +grpc/beta/__pycache__/__init__.cpython-312.pyc,, +grpc/beta/__pycache__/_client_adaptations.cpython-312.pyc,, +grpc/beta/__pycache__/_metadata.cpython-312.pyc,, +grpc/beta/__pycache__/_server_adaptations.cpython-312.pyc,, +grpc/beta/__pycache__/implementations.cpython-312.pyc,, +grpc/beta/__pycache__/interfaces.cpython-312.pyc,, +grpc/beta/__pycache__/utilities.cpython-312.pyc,, +grpc/beta/_client_adaptations.py,sha256=8P3wtStROwGblFlhBLLnxxOI2GPbMgitG5gi0t5mJn0,26880 +grpc/beta/_metadata.py,sha256=Vst_z-wcZAg_O0SpcvIAWNTaXxN2oJW5cbSHWdyTnrQ,1598 +grpc/beta/_server_adaptations.py,sha256=bcAEiyq6eqCsB2exJhW83Sw3QaEy-3RUbeVj0zys-gY,14544 +grpc/beta/implementations.py,sha256=0yITggzqKKo8Lb8ZwPx2zIu414mIQxfan3jmenchIHk,12058 +grpc/beta/interfaces.py,sha256=mtQnvm7Bg2u5MQZf2_nmxUxKFCANDw7VUOHHvE7cBhM,6082 +grpc/beta/utilities.py,sha256=lHSxFpD5YDN7PJDuQVgoqmDHHQmXYl1T9eCuaUxu9eA,4893 +grpc/experimental/__init__.py,sha256=U63Siv_a2stJousVzgHSNfocczSmi7LU-HtlFWbgMT4,4053 +grpc/experimental/__pycache__/__init__.cpython-312.pyc,, +grpc/experimental/__pycache__/gevent.cpython-312.pyc,, +grpc/experimental/__pycache__/session_cache.cpython-312.pyc,, +grpc/experimental/aio/__init__.py,sha256=bIyDdGBbNHi5F_kHvwByONjc4M_74thy53YmBDr1ZPo,660 +grpc/experimental/aio/__pycache__/__init__.cpython-312.pyc,, +grpc/experimental/gevent.py,sha256=_YAk9aH2PCZCpaCnW9uGY77W21342dEWm8wOVApTx88,973 +grpc/experimental/session_cache.py,sha256=wAauvDzxvTC6-p3jMbPnTc7y74nhDKSRjb0ktfMPCm8,1533 +grpc/framework/__init__.py,sha256=w3kqSAyaZgP-W0890xR4L4WeBPGrtsQCQJe0FUFR0K0,577 +grpc/framework/__pycache__/__init__.cpython-312.pyc,, +grpc/framework/common/__init__.py,sha256=w3kqSAyaZgP-W0890xR4L4WeBPGrtsQCQJe0FUFR0K0,577 +grpc/framework/common/__pycache__/__init__.cpython-312.pyc,, +grpc/framework/common/__pycache__/cardinality.cpython-312.pyc,, +grpc/framework/common/__pycache__/style.cpython-312.pyc,, +grpc/framework/common/cardinality.py,sha256=ygWtrjjsk-SOPLHaey6-7ekD23Qhu3k4QUNmYI1ScVU,988 +grpc/framework/common/style.py,sha256=X9wN-af8T7WWhFfdtmFkdqPN5PbpI8FJsKGdmPivaAU,824 +grpc/framework/foundation/__init__.py,sha256=w3kqSAyaZgP-W0890xR4L4WeBPGrtsQCQJe0FUFR0K0,577 +grpc/framework/foundation/__pycache__/__init__.cpython-312.pyc,, +grpc/framework/foundation/__pycache__/abandonment.cpython-312.pyc,, +grpc/framework/foundation/__pycache__/callable_util.cpython-312.pyc,, +grpc/framework/foundation/__pycache__/future.cpython-312.pyc,, +grpc/framework/foundation/__pycache__/logging_pool.cpython-312.pyc,, +grpc/framework/foundation/__pycache__/stream.cpython-312.pyc,, +grpc/framework/foundation/__pycache__/stream_util.cpython-312.pyc,, +grpc/framework/foundation/abandonment.py,sha256=AF4Y734bGIVaX0CL8W9XaaPYuPUacgciBEZ9Wb4fpGA,878 +grpc/framework/foundation/callable_util.py,sha256=cfwcckzKe9mpjvz64k1Uxxz5uO1VPP2RsGHUOxBiSsA,3157 +grpc/framework/foundation/future.py,sha256=djoeNq-Wd5_tkzQwF_ZeL1nYAWKJ5rwzelGoTPdR1ME,8373 +grpc/framework/foundation/logging_pool.py,sha256=j8PFaWarQrnDebsDxmcJMzfFsJH8xGY2A4z6Plo_Q9c,2248 +grpc/framework/foundation/stream.py,sha256=F6XQUJC8rT-ciybPtHP7PTMlMXNoVXyzmnRwYKos0Ms,1377 +grpc/framework/foundation/stream_util.py,sha256=i5sKKSqRV3LssS6Ew-3oVFAe6IHfiXzgzCgKals2k_c,4748 +grpc/framework/interfaces/__init__.py,sha256=w3kqSAyaZgP-W0890xR4L4WeBPGrtsQCQJe0FUFR0K0,577 +grpc/framework/interfaces/__pycache__/__init__.cpython-312.pyc,, +grpc/framework/interfaces/base/__init__.py,sha256=w3kqSAyaZgP-W0890xR4L4WeBPGrtsQCQJe0FUFR0K0,577 +grpc/framework/interfaces/base/__pycache__/__init__.cpython-312.pyc,, +grpc/framework/interfaces/base/__pycache__/base.cpython-312.pyc,, +grpc/framework/interfaces/base/__pycache__/utilities.cpython-312.pyc,, +grpc/framework/interfaces/base/base.py,sha256=aDW-nCVA4brDc3ZRf_b1-MOZ4Jv7ss_F4V6jIeJugTc,12234 +grpc/framework/interfaces/base/utilities.py,sha256=buvlDv3ulHgsF4ej6DzQecoPGXwfMV2eyZ70lPMJfNA,2362 +grpc/framework/interfaces/face/__init__.py,sha256=w3kqSAyaZgP-W0890xR4L4WeBPGrtsQCQJe0FUFR0K0,577 +grpc/framework/interfaces/face/__pycache__/__init__.cpython-312.pyc,, +grpc/framework/interfaces/face/__pycache__/face.cpython-312.pyc,, +grpc/framework/interfaces/face/__pycache__/utilities.cpython-312.pyc,, +grpc/framework/interfaces/face/face.py,sha256=OGyApdjsZ8BF9nNq-2sd6WXd9bPpbvj4jvXrGdJu-nY,39700 +grpc/framework/interfaces/face/utilities.py,sha256=jRmAmV0hXPXcN5a6Vg7OlBbcltGB6B10bUfoqqHJmUc,6777 +grpcio-1.76.0.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4 +grpcio-1.76.0.dist-info/LICENSE,sha256=WQGY4_MF8sNH_eZNY3xlSSu-9VTbbINk4UnNN143l-4,29687 +grpcio-1.76.0.dist-info/METADATA,sha256=-__oJnfK2kFiRYUuPt-yjv3YSGngiNMUB7JEN2_DRS8,3707 +grpcio-1.76.0.dist-info/RECORD,, +grpcio-1.76.0.dist-info/WHEEL,sha256=OvtvnbpcaxHa5TgXgfC48E6JA7zLr7svMspPP7Vk5o8,152 +grpcio-1.76.0.dist-info/top_level.txt,sha256=eEd2Jq_aVQFp38bWW8Pfwjz_5iibqeOFT-2zXlPAq_8,5 diff --git a/lib/python3.12/site-packages/grpcio-1.76.0.dist-info/WHEEL b/lib/python3.12/site-packages/grpcio-1.76.0.dist-info/WHEEL new file mode 100644 index 0000000000000000000000000000000000000000..db05d97dfec047efda764b3f5b82e8145b8d6b66 --- /dev/null +++ b/lib/python3.12/site-packages/grpcio-1.76.0.dist-info/WHEEL @@ -0,0 +1,6 @@ +Wheel-Version: 1.0 +Generator: bdist_wheel (0.43.0) +Root-Is-Purelib: false +Tag: cp312-cp312-manylinux_2_17_x86_64 +Tag: cp312-cp312-manylinux2014_x86_64 + diff --git a/lib/python3.12/site-packages/grpcio-1.76.0.dist-info/top_level.txt b/lib/python3.12/site-packages/grpcio-1.76.0.dist-info/top_level.txt new file mode 100644 index 0000000000000000000000000000000000000000..3b2fe54cba7bccaa783f551549920c8e8927cf1e --- /dev/null +++ b/lib/python3.12/site-packages/grpcio-1.76.0.dist-info/top_level.txt @@ -0,0 +1 @@ +grpc diff --git a/lib/python3.12/site-packages/numpy/__pycache__/__config__.cpython-312.pyc b/lib/python3.12/site-packages/numpy/__pycache__/__config__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..66ff813954198c00bad5851b1d3e30cb3f39a0b5 Binary files /dev/null and b/lib/python3.12/site-packages/numpy/__pycache__/__config__.cpython-312.pyc differ diff --git a/lib/python3.12/site-packages/numpy/__pycache__/__init__.cpython-312.pyc b/lib/python3.12/site-packages/numpy/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f990b45ee2bbce6350583323d0514112c05289fc Binary files /dev/null and b/lib/python3.12/site-packages/numpy/__pycache__/__init__.cpython-312.pyc differ diff --git a/lib/python3.12/site-packages/numpy/__pycache__/_distributor_init.cpython-312.pyc b/lib/python3.12/site-packages/numpy/__pycache__/_distributor_init.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..cdaaeb6664635ca584c83ea903df424d7f9207a0 Binary files /dev/null and b/lib/python3.12/site-packages/numpy/__pycache__/_distributor_init.cpython-312.pyc differ diff --git a/lib/python3.12/site-packages/numpy/__pycache__/_globals.cpython-312.pyc b/lib/python3.12/site-packages/numpy/__pycache__/_globals.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..3e7420ff5b0bf80616a5d8908c9931eb6935311b Binary files /dev/null and b/lib/python3.12/site-packages/numpy/__pycache__/_globals.cpython-312.pyc differ diff --git a/lib/python3.12/site-packages/numpy/__pycache__/_pytesttester.cpython-312.pyc b/lib/python3.12/site-packages/numpy/__pycache__/_pytesttester.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6db31f6b4a243f95bec1dd226b2db21a091dbbed Binary files /dev/null and b/lib/python3.12/site-packages/numpy/__pycache__/_pytesttester.cpython-312.pyc differ diff --git a/lib/python3.12/site-packages/numpy/__pycache__/conftest.cpython-312.pyc b/lib/python3.12/site-packages/numpy/__pycache__/conftest.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..060a52b426c97a6156a1e6d556eaa3fd35ac00e0 Binary files /dev/null and b/lib/python3.12/site-packages/numpy/__pycache__/conftest.cpython-312.pyc differ diff --git a/lib/python3.12/site-packages/numpy/__pycache__/ctypeslib.cpython-312.pyc b/lib/python3.12/site-packages/numpy/__pycache__/ctypeslib.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..29858dd2c73a8e9bf2b378c7dbe28052f30af5aa Binary files /dev/null and b/lib/python3.12/site-packages/numpy/__pycache__/ctypeslib.cpython-312.pyc differ diff --git a/lib/python3.12/site-packages/numpy/__pycache__/dtypes.cpython-312.pyc b/lib/python3.12/site-packages/numpy/__pycache__/dtypes.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f1828c3df39b16a13269e4d39ed08fd1dd195308 Binary files /dev/null and b/lib/python3.12/site-packages/numpy/__pycache__/dtypes.cpython-312.pyc differ diff --git a/lib/python3.12/site-packages/numpy/__pycache__/exceptions.cpython-312.pyc b/lib/python3.12/site-packages/numpy/__pycache__/exceptions.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4a13b2b7602d60902ea1f8760c39fbed3f504c22 Binary files /dev/null and b/lib/python3.12/site-packages/numpy/__pycache__/exceptions.cpython-312.pyc differ diff --git a/lib/python3.12/site-packages/numpy/__pycache__/matlib.cpython-312.pyc b/lib/python3.12/site-packages/numpy/__pycache__/matlib.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..58d1cb42f2cffec410a770869a03f6ed53e38bad Binary files /dev/null and b/lib/python3.12/site-packages/numpy/__pycache__/matlib.cpython-312.pyc differ diff --git a/lib/python3.12/site-packages/numpy/__pycache__/version.cpython-312.pyc b/lib/python3.12/site-packages/numpy/__pycache__/version.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..89659f360fc5a1d3398e7fb182ee901dd171b98c Binary files /dev/null and b/lib/python3.12/site-packages/numpy/__pycache__/version.cpython-312.pyc differ diff --git a/lib/python3.12/site-packages/numpy/_pyinstaller/__init__.py b/lib/python3.12/site-packages/numpy/_pyinstaller/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/lib/python3.12/site-packages/numpy/_pyinstaller/__pycache__/__init__.cpython-312.pyc b/lib/python3.12/site-packages/numpy/_pyinstaller/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ef6ebe7647e68630c57c26f69820a7b22b138375 Binary files /dev/null and b/lib/python3.12/site-packages/numpy/_pyinstaller/__pycache__/__init__.cpython-312.pyc differ diff --git a/lib/python3.12/site-packages/numpy/_pyinstaller/__pycache__/hook-numpy.cpython-312.pyc b/lib/python3.12/site-packages/numpy/_pyinstaller/__pycache__/hook-numpy.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8e24c2eaa11b120615d4c5e64de658f573e9704f Binary files /dev/null and b/lib/python3.12/site-packages/numpy/_pyinstaller/__pycache__/hook-numpy.cpython-312.pyc differ diff --git a/lib/python3.12/site-packages/numpy/_pyinstaller/__pycache__/pyinstaller-smoke.cpython-312.pyc b/lib/python3.12/site-packages/numpy/_pyinstaller/__pycache__/pyinstaller-smoke.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..2c893d4584af4f1467d5c562969bf0319678c564 Binary files /dev/null and b/lib/python3.12/site-packages/numpy/_pyinstaller/__pycache__/pyinstaller-smoke.cpython-312.pyc differ diff --git a/lib/python3.12/site-packages/numpy/_pyinstaller/__pycache__/test_pyinstaller.cpython-312.pyc b/lib/python3.12/site-packages/numpy/_pyinstaller/__pycache__/test_pyinstaller.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5ac65c1d290759c251203cf551e11565ff0d3caa Binary files /dev/null and b/lib/python3.12/site-packages/numpy/_pyinstaller/__pycache__/test_pyinstaller.cpython-312.pyc differ diff --git a/lib/python3.12/site-packages/numpy/_pyinstaller/hook-numpy.py b/lib/python3.12/site-packages/numpy/_pyinstaller/hook-numpy.py new file mode 100644 index 0000000000000000000000000000000000000000..6f24318adf5d9eea1897c26b42fa444efa5c8022 --- /dev/null +++ b/lib/python3.12/site-packages/numpy/_pyinstaller/hook-numpy.py @@ -0,0 +1,37 @@ +"""This hook should collect all binary files and any hidden modules that numpy +needs. + +Our (some-what inadequate) docs for writing PyInstaller hooks are kept here: +https://pyinstaller.readthedocs.io/en/stable/hooks.html + +""" +from PyInstaller.compat import is_conda, is_pure_conda +from PyInstaller.utils.hooks import collect_dynamic_libs, is_module_satisfies + +# Collect all DLLs inside numpy's installation folder, dump them into built +# app's root. +binaries = collect_dynamic_libs("numpy", ".") + +# If using Conda without any non-conda virtual environment manager: +if is_pure_conda: + # Assume running the NumPy from Conda-forge and collect it's DLLs from the + # communal Conda bin directory. DLLs from NumPy's dependencies must also be + # collected to capture MKL, OpenBlas, OpenMP, etc. + from PyInstaller.utils.hooks import conda_support + datas = conda_support.collect_dynamic_libs("numpy", dependencies=True) + +# Submodules PyInstaller cannot detect. `_dtype_ctypes` is only imported +# from C and `_multiarray_tests` is used in tests (which are not packed). +hiddenimports = ['numpy.core._dtype_ctypes', 'numpy.core._multiarray_tests'] + +# Remove testing and building code and packages that are referenced throughout +# NumPy but are not really dependencies. +excludedimports = [ + "scipy", + "pytest", + "f2py", + "setuptools", + "numpy.f2py", + "distutils", + "numpy.distutils", +] diff --git a/lib/python3.12/site-packages/numpy/_pyinstaller/pyinstaller-smoke.py b/lib/python3.12/site-packages/numpy/_pyinstaller/pyinstaller-smoke.py new file mode 100644 index 0000000000000000000000000000000000000000..eb28070e38baf80223fe0178ac0a7c0f5732a2c8 --- /dev/null +++ b/lib/python3.12/site-packages/numpy/_pyinstaller/pyinstaller-smoke.py @@ -0,0 +1,32 @@ +"""A crude *bit of everything* smoke test to verify PyInstaller compatibility. + +PyInstaller typically goes wrong by forgetting to package modules, extension +modules or shared libraries. This script should aim to touch as many of those +as possible in an attempt to trip a ModuleNotFoundError or a DLL load failure +due to an uncollected resource. Missing resources are unlikely to lead to +arithmetic errors so there's generally no need to verify any calculation's +output - merely that it made it to the end OK. This script should not +explicitly import any of numpy's submodules as that gives PyInstaller undue +hints that those submodules exist and should be collected (accessing implicitly +loaded submodules is OK). + +""" +import numpy as np + +a = np.arange(1., 10.).reshape((3, 3)) % 5 +np.linalg.det(a) +a @ a +a @ a.T +np.linalg.inv(a) +np.sin(np.exp(a)) +np.linalg.svd(a) +np.linalg.eigh(a) + +np.unique(np.random.randint(0, 10, 100)) +np.sort(np.random.uniform(0, 10, 100)) + +np.fft.fft(np.exp(2j * np.pi * np.arange(8) / 8)) +np.ma.masked_array(np.arange(10), np.random.rand(10) < .5).sum() +np.polynomial.Legendre([7, 8, 9]).roots() + +print("I made it!") diff --git a/lib/python3.12/site-packages/numpy/_pyinstaller/test_pyinstaller.py b/lib/python3.12/site-packages/numpy/_pyinstaller/test_pyinstaller.py new file mode 100644 index 0000000000000000000000000000000000000000..a9061da19b88c4243a3fd28bf05fd2986292d836 --- /dev/null +++ b/lib/python3.12/site-packages/numpy/_pyinstaller/test_pyinstaller.py @@ -0,0 +1,35 @@ +import subprocess +from pathlib import Path + +import pytest + + +# PyInstaller has been very unproactive about replacing 'imp' with 'importlib'. +@pytest.mark.filterwarnings('ignore::DeprecationWarning') +# It also leaks io.BytesIO()s. +@pytest.mark.filterwarnings('ignore::ResourceWarning') +@pytest.mark.parametrize("mode", ["--onedir", "--onefile"]) +@pytest.mark.slow +def test_pyinstaller(mode, tmp_path): + """Compile and run pyinstaller-smoke.py using PyInstaller.""" + + pyinstaller_cli = pytest.importorskip("PyInstaller.__main__").run + + source = Path(__file__).with_name("pyinstaller-smoke.py").resolve() + args = [ + # Place all generated files in ``tmp_path``. + '--workpath', str(tmp_path / "build"), + '--distpath', str(tmp_path / "dist"), + '--specpath', str(tmp_path), + mode, + str(source), + ] + pyinstaller_cli(args) + + if mode == "--onefile": + exe = tmp_path / "dist" / source.stem + else: + exe = tmp_path / "dist" / source.stem / source.stem + + p = subprocess.run([str(exe)], check=True, stdout=subprocess.PIPE) + assert p.stdout.strip() == b"I made it!" diff --git a/lib/python3.12/site-packages/numpy/_utils/__init__.py b/lib/python3.12/site-packages/numpy/_utils/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..388dd9174f356c74d6cdd6ad9a8b1ad603234420 --- /dev/null +++ b/lib/python3.12/site-packages/numpy/_utils/__init__.py @@ -0,0 +1,29 @@ +""" +This is a module for defining private helpers which do not depend on the +rest of NumPy. + +Everything in here must be self-contained so that it can be +imported anywhere else without creating circular imports. +If a utility requires the import of NumPy, it probably belongs +in ``numpy.core``. +""" + +from ._convertions import asunicode, asbytes + + +def set_module(module): + """Private decorator for overriding __module__ on a function or class. + + Example usage:: + + @set_module('numpy') + def example(): + pass + + assert example.__module__ == 'numpy' + """ + def decorator(func): + if module is not None: + func.__module__ = module + return func + return decorator diff --git a/lib/python3.12/site-packages/numpy/_utils/__pycache__/__init__.cpython-312.pyc b/lib/python3.12/site-packages/numpy/_utils/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7e459c3c88b13e5759b63ba74fe3a6e11ed125f9 Binary files /dev/null and b/lib/python3.12/site-packages/numpy/_utils/__pycache__/__init__.cpython-312.pyc differ diff --git a/lib/python3.12/site-packages/numpy/_utils/__pycache__/_convertions.cpython-312.pyc b/lib/python3.12/site-packages/numpy/_utils/__pycache__/_convertions.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f2e2456ecef7fba2a4179b22be9ef6ae30110a74 Binary files /dev/null and b/lib/python3.12/site-packages/numpy/_utils/__pycache__/_convertions.cpython-312.pyc differ diff --git a/lib/python3.12/site-packages/numpy/_utils/__pycache__/_inspect.cpython-312.pyc b/lib/python3.12/site-packages/numpy/_utils/__pycache__/_inspect.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4d0481a61554e091ad42fe099c76bf8e202b7f96 Binary files /dev/null and b/lib/python3.12/site-packages/numpy/_utils/__pycache__/_inspect.cpython-312.pyc differ diff --git a/lib/python3.12/site-packages/numpy/_utils/__pycache__/_pep440.cpython-312.pyc b/lib/python3.12/site-packages/numpy/_utils/__pycache__/_pep440.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..07b6742a1496c8babf109b92baee5157d79bbfe3 Binary files /dev/null and b/lib/python3.12/site-packages/numpy/_utils/__pycache__/_pep440.cpython-312.pyc differ diff --git a/lib/python3.12/site-packages/numpy/_utils/_convertions.py b/lib/python3.12/site-packages/numpy/_utils/_convertions.py new file mode 100644 index 0000000000000000000000000000000000000000..ab15a8ba019f1b6a40ac3f562897fa4581323efc --- /dev/null +++ b/lib/python3.12/site-packages/numpy/_utils/_convertions.py @@ -0,0 +1,18 @@ +""" +A set of methods retained from np.compat module that +are still used across codebase. +""" + +__all__ = ["asunicode", "asbytes"] + + +def asunicode(s): + if isinstance(s, bytes): + return s.decode('latin1') + return str(s) + + +def asbytes(s): + if isinstance(s, bytes): + return s + return str(s).encode('latin1') diff --git a/lib/python3.12/site-packages/numpy/_utils/_inspect.py b/lib/python3.12/site-packages/numpy/_utils/_inspect.py new file mode 100644 index 0000000000000000000000000000000000000000..9a874a71dd0a53e25a671c51bfdceec850702bfe --- /dev/null +++ b/lib/python3.12/site-packages/numpy/_utils/_inspect.py @@ -0,0 +1,191 @@ +"""Subset of inspect module from upstream python + +We use this instead of upstream because upstream inspect is slow to import, and +significantly contributes to numpy import times. Importing this copy has almost +no overhead. + +""" +import types + +__all__ = ['getargspec', 'formatargspec'] + +# ----------------------------------------------------------- type-checking +def ismethod(object): + """Return true if the object is an instance method. + + Instance method objects provide these attributes: + __doc__ documentation string + __name__ name with which this method was defined + im_class class object in which this method belongs + im_func function object containing implementation of method + im_self instance to which this method is bound, or None + + """ + return isinstance(object, types.MethodType) + +def isfunction(object): + """Return true if the object is a user-defined function. + + Function objects provide these attributes: + __doc__ documentation string + __name__ name with which this function was defined + func_code code object containing compiled function bytecode + func_defaults tuple of any default values for arguments + func_doc (same as __doc__) + func_globals global namespace in which this function was defined + func_name (same as __name__) + + """ + return isinstance(object, types.FunctionType) + +def iscode(object): + """Return true if the object is a code object. + + Code objects provide these attributes: + co_argcount number of arguments (not including * or ** args) + co_code string of raw compiled bytecode + co_consts tuple of constants used in the bytecode + co_filename name of file in which this code object was created + co_firstlineno number of first line in Python source code + co_flags bitmap: 1=optimized | 2=newlocals | 4=*arg | 8=**arg + co_lnotab encoded mapping of line numbers to bytecode indices + co_name name with which this code object was defined + co_names tuple of names of local variables + co_nlocals number of local variables + co_stacksize virtual machine stack space required + co_varnames tuple of names of arguments and local variables + + """ + return isinstance(object, types.CodeType) + +# ------------------------------------------------ argument list extraction +# These constants are from Python's compile.h. +CO_OPTIMIZED, CO_NEWLOCALS, CO_VARARGS, CO_VARKEYWORDS = 1, 2, 4, 8 + +def getargs(co): + """Get information about the arguments accepted by a code object. + + Three things are returned: (args, varargs, varkw), where 'args' is + a list of argument names (possibly containing nested lists), and + 'varargs' and 'varkw' are the names of the * and ** arguments or None. + + """ + + if not iscode(co): + raise TypeError('arg is not a code object') + + nargs = co.co_argcount + names = co.co_varnames + args = list(names[:nargs]) + + # The following acrobatics are for anonymous (tuple) arguments. + # Which we do not need to support, so remove to avoid importing + # the dis module. + for i in range(nargs): + if args[i][:1] in ['', '.']: + raise TypeError("tuple function arguments are not supported") + varargs = None + if co.co_flags & CO_VARARGS: + varargs = co.co_varnames[nargs] + nargs = nargs + 1 + varkw = None + if co.co_flags & CO_VARKEYWORDS: + varkw = co.co_varnames[nargs] + return args, varargs, varkw + +def getargspec(func): + """Get the names and default values of a function's arguments. + + A tuple of four things is returned: (args, varargs, varkw, defaults). + 'args' is a list of the argument names (it may contain nested lists). + 'varargs' and 'varkw' are the names of the * and ** arguments or None. + 'defaults' is an n-tuple of the default values of the last n arguments. + + """ + + if ismethod(func): + func = func.__func__ + if not isfunction(func): + raise TypeError('arg is not a Python function') + args, varargs, varkw = getargs(func.__code__) + return args, varargs, varkw, func.__defaults__ + +def getargvalues(frame): + """Get information about arguments passed into a particular frame. + + A tuple of four things is returned: (args, varargs, varkw, locals). + 'args' is a list of the argument names (it may contain nested lists). + 'varargs' and 'varkw' are the names of the * and ** arguments or None. + 'locals' is the locals dictionary of the given frame. + + """ + args, varargs, varkw = getargs(frame.f_code) + return args, varargs, varkw, frame.f_locals + +def joinseq(seq): + if len(seq) == 1: + return '(' + seq[0] + ',)' + else: + return '(' + ', '.join(seq) + ')' + +def strseq(object, convert, join=joinseq): + """Recursively walk a sequence, stringifying each element. + + """ + if type(object) in [list, tuple]: + return join([strseq(_o, convert, join) for _o in object]) + else: + return convert(object) + +def formatargspec(args, varargs=None, varkw=None, defaults=None, + formatarg=str, + formatvarargs=lambda name: '*' + name, + formatvarkw=lambda name: '**' + name, + formatvalue=lambda value: '=' + repr(value), + join=joinseq): + """Format an argument spec from the 4 values returned by getargspec. + + The first four arguments are (args, varargs, varkw, defaults). The + other four arguments are the corresponding optional formatting functions + that are called to turn names and values into strings. The ninth + argument is an optional function to format the sequence of arguments. + + """ + specs = [] + if defaults: + firstdefault = len(args) - len(defaults) + for i in range(len(args)): + spec = strseq(args[i], formatarg, join) + if defaults and i >= firstdefault: + spec = spec + formatvalue(defaults[i - firstdefault]) + specs.append(spec) + if varargs is not None: + specs.append(formatvarargs(varargs)) + if varkw is not None: + specs.append(formatvarkw(varkw)) + return '(' + ', '.join(specs) + ')' + +def formatargvalues(args, varargs, varkw, locals, + formatarg=str, + formatvarargs=lambda name: '*' + name, + formatvarkw=lambda name: '**' + name, + formatvalue=lambda value: '=' + repr(value), + join=joinseq): + """Format an argument spec from the 4 values returned by getargvalues. + + The first four arguments are (args, varargs, varkw, locals). The + next four arguments are the corresponding optional formatting functions + that are called to turn names and values into strings. The ninth + argument is an optional function to format the sequence of arguments. + + """ + def convert(name, locals=locals, + formatarg=formatarg, formatvalue=formatvalue): + return formatarg(name) + formatvalue(locals[name]) + specs = [strseq(arg, convert, join) for arg in args] + + if varargs: + specs.append(formatvarargs(varargs) + formatvalue(locals[varargs])) + if varkw: + specs.append(formatvarkw(varkw) + formatvalue(locals[varkw])) + return '(' + ', '.join(specs) + ')' diff --git a/lib/python3.12/site-packages/numpy/_utils/_pep440.py b/lib/python3.12/site-packages/numpy/_utils/_pep440.py new file mode 100644 index 0000000000000000000000000000000000000000..73d0afb5e95f099f8b04253177e8a3ab3d80d0c4 --- /dev/null +++ b/lib/python3.12/site-packages/numpy/_utils/_pep440.py @@ -0,0 +1,487 @@ +"""Utility to compare pep440 compatible version strings. + +The LooseVersion and StrictVersion classes that distutils provides don't +work; they don't recognize anything like alpha/beta/rc/dev versions. +""" + +# Copyright (c) Donald Stufft and individual contributors. +# All rights reserved. + +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: + +# 1. Redistributions of source code must retain the above copyright notice, +# this list of conditions and the following disclaimer. + +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. + +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. + +import collections +import itertools +import re + + +__all__ = [ + "parse", "Version", "LegacyVersion", "InvalidVersion", "VERSION_PATTERN", +] + + +# BEGIN packaging/_structures.py + + +class Infinity: + def __repr__(self): + return "Infinity" + + def __hash__(self): + return hash(repr(self)) + + def __lt__(self, other): + return False + + def __le__(self, other): + return False + + def __eq__(self, other): + return isinstance(other, self.__class__) + + def __ne__(self, other): + return not isinstance(other, self.__class__) + + def __gt__(self, other): + return True + + def __ge__(self, other): + return True + + def __neg__(self): + return NegativeInfinity + + +Infinity = Infinity() + + +class NegativeInfinity: + def __repr__(self): + return "-Infinity" + + def __hash__(self): + return hash(repr(self)) + + def __lt__(self, other): + return True + + def __le__(self, other): + return True + + def __eq__(self, other): + return isinstance(other, self.__class__) + + def __ne__(self, other): + return not isinstance(other, self.__class__) + + def __gt__(self, other): + return False + + def __ge__(self, other): + return False + + def __neg__(self): + return Infinity + + +# BEGIN packaging/version.py + + +NegativeInfinity = NegativeInfinity() + +_Version = collections.namedtuple( + "_Version", + ["epoch", "release", "dev", "pre", "post", "local"], +) + + +def parse(version): + """ + Parse the given version string and return either a :class:`Version` object + or a :class:`LegacyVersion` object depending on if the given version is + a valid PEP 440 version or a legacy version. + """ + try: + return Version(version) + except InvalidVersion: + return LegacyVersion(version) + + +class InvalidVersion(ValueError): + """ + An invalid version was found, users should refer to PEP 440. + """ + + +class _BaseVersion: + + def __hash__(self): + return hash(self._key) + + def __lt__(self, other): + return self._compare(other, lambda s, o: s < o) + + def __le__(self, other): + return self._compare(other, lambda s, o: s <= o) + + def __eq__(self, other): + return self._compare(other, lambda s, o: s == o) + + def __ge__(self, other): + return self._compare(other, lambda s, o: s >= o) + + def __gt__(self, other): + return self._compare(other, lambda s, o: s > o) + + def __ne__(self, other): + return self._compare(other, lambda s, o: s != o) + + def _compare(self, other, method): + if not isinstance(other, _BaseVersion): + return NotImplemented + + return method(self._key, other._key) + + +class LegacyVersion(_BaseVersion): + + def __init__(self, version): + self._version = str(version) + self._key = _legacy_cmpkey(self._version) + + def __str__(self): + return self._version + + def __repr__(self): + return "".format(repr(str(self))) + + @property + def public(self): + return self._version + + @property + def base_version(self): + return self._version + + @property + def local(self): + return None + + @property + def is_prerelease(self): + return False + + @property + def is_postrelease(self): + return False + + +_legacy_version_component_re = re.compile( + r"(\d+ | [a-z]+ | \.| -)", re.VERBOSE, +) + +_legacy_version_replacement_map = { + "pre": "c", "preview": "c", "-": "final-", "rc": "c", "dev": "@", +} + + +def _parse_version_parts(s): + for part in _legacy_version_component_re.split(s): + part = _legacy_version_replacement_map.get(part, part) + + if not part or part == ".": + continue + + if part[:1] in "0123456789": + # pad for numeric comparison + yield part.zfill(8) + else: + yield "*" + part + + # ensure that alpha/beta/candidate are before final + yield "*final" + + +def _legacy_cmpkey(version): + # We hardcode an epoch of -1 here. A PEP 440 version can only have an epoch + # greater than or equal to 0. This will effectively put the LegacyVersion, + # which uses the defacto standard originally implemented by setuptools, + # as before all PEP 440 versions. + epoch = -1 + + # This scheme is taken from pkg_resources.parse_version setuptools prior to + # its adoption of the packaging library. + parts = [] + for part in _parse_version_parts(version.lower()): + if part.startswith("*"): + # remove "-" before a prerelease tag + if part < "*final": + while parts and parts[-1] == "*final-": + parts.pop() + + # remove trailing zeros from each series of numeric parts + while parts and parts[-1] == "00000000": + parts.pop() + + parts.append(part) + parts = tuple(parts) + + return epoch, parts + + +# Deliberately not anchored to the start and end of the string, to make it +# easier for 3rd party code to reuse +VERSION_PATTERN = r""" + v? + (?: + (?:(?P[0-9]+)!)? # epoch + (?P[0-9]+(?:\.[0-9]+)*) # release segment + (?P
                                          # pre-release
+            [-_\.]?
+            (?P(a|b|c|rc|alpha|beta|pre|preview))
+            [-_\.]?
+            (?P[0-9]+)?
+        )?
+        (?P                                         # post release
+            (?:-(?P[0-9]+))
+            |
+            (?:
+                [-_\.]?
+                (?Ppost|rev|r)
+                [-_\.]?
+                (?P[0-9]+)?
+            )
+        )?
+        (?P                                          # dev release
+            [-_\.]?
+            (?Pdev)
+            [-_\.]?
+            (?P[0-9]+)?
+        )?
+    )
+    (?:\+(?P[a-z0-9]+(?:[-_\.][a-z0-9]+)*))?       # local version
+"""
+
+
+class Version(_BaseVersion):
+
+    _regex = re.compile(
+        r"^\s*" + VERSION_PATTERN + r"\s*$",
+        re.VERBOSE | re.IGNORECASE,
+    )
+
+    def __init__(self, version):
+        # Validate the version and parse it into pieces
+        match = self._regex.search(version)
+        if not match:
+            raise InvalidVersion("Invalid version: '{0}'".format(version))
+
+        # Store the parsed out pieces of the version
+        self._version = _Version(
+            epoch=int(match.group("epoch")) if match.group("epoch") else 0,
+            release=tuple(int(i) for i in match.group("release").split(".")),
+            pre=_parse_letter_version(
+                match.group("pre_l"),
+                match.group("pre_n"),
+            ),
+            post=_parse_letter_version(
+                match.group("post_l"),
+                match.group("post_n1") or match.group("post_n2"),
+            ),
+            dev=_parse_letter_version(
+                match.group("dev_l"),
+                match.group("dev_n"),
+            ),
+            local=_parse_local_version(match.group("local")),
+        )
+
+        # Generate a key which will be used for sorting
+        self._key = _cmpkey(
+            self._version.epoch,
+            self._version.release,
+            self._version.pre,
+            self._version.post,
+            self._version.dev,
+            self._version.local,
+        )
+
+    def __repr__(self):
+        return "".format(repr(str(self)))
+
+    def __str__(self):
+        parts = []
+
+        # Epoch
+        if self._version.epoch != 0:
+            parts.append("{0}!".format(self._version.epoch))
+
+        # Release segment
+        parts.append(".".join(str(x) for x in self._version.release))
+
+        # Pre-release
+        if self._version.pre is not None:
+            parts.append("".join(str(x) for x in self._version.pre))
+
+        # Post-release
+        if self._version.post is not None:
+            parts.append(".post{0}".format(self._version.post[1]))
+
+        # Development release
+        if self._version.dev is not None:
+            parts.append(".dev{0}".format(self._version.dev[1]))
+
+        # Local version segment
+        if self._version.local is not None:
+            parts.append(
+                "+{0}".format(".".join(str(x) for x in self._version.local))
+            )
+
+        return "".join(parts)
+
+    @property
+    def public(self):
+        return str(self).split("+", 1)[0]
+
+    @property
+    def base_version(self):
+        parts = []
+
+        # Epoch
+        if self._version.epoch != 0:
+            parts.append("{0}!".format(self._version.epoch))
+
+        # Release segment
+        parts.append(".".join(str(x) for x in self._version.release))
+
+        return "".join(parts)
+
+    @property
+    def local(self):
+        version_string = str(self)
+        if "+" in version_string:
+            return version_string.split("+", 1)[1]
+
+    @property
+    def is_prerelease(self):
+        return bool(self._version.dev or self._version.pre)
+
+    @property
+    def is_postrelease(self):
+        return bool(self._version.post)
+
+
+def _parse_letter_version(letter, number):
+    if letter:
+        # We assume there is an implicit 0 in a pre-release if there is
+        # no numeral associated with it.
+        if number is None:
+            number = 0
+
+        # We normalize any letters to their lower-case form
+        letter = letter.lower()
+
+        # We consider some words to be alternate spellings of other words and
+        # in those cases we want to normalize the spellings to our preferred
+        # spelling.
+        if letter == "alpha":
+            letter = "a"
+        elif letter == "beta":
+            letter = "b"
+        elif letter in ["c", "pre", "preview"]:
+            letter = "rc"
+        elif letter in ["rev", "r"]:
+            letter = "post"
+
+        return letter, int(number)
+    if not letter and number:
+        # We assume that if we are given a number but not given a letter,
+        # then this is using the implicit post release syntax (e.g., 1.0-1)
+        letter = "post"
+
+        return letter, int(number)
+
+
+_local_version_seperators = re.compile(r"[\._-]")
+
+
+def _parse_local_version(local):
+    """
+    Takes a string like abc.1.twelve and turns it into ("abc", 1, "twelve").
+    """
+    if local is not None:
+        return tuple(
+            part.lower() if not part.isdigit() else int(part)
+            for part in _local_version_seperators.split(local)
+        )
+
+
+def _cmpkey(epoch, release, pre, post, dev, local):
+    # When we compare a release version, we want to compare it with all of the
+    # trailing zeros removed. So we'll use a reverse the list, drop all the now
+    # leading zeros until we come to something non-zero, then take the rest,
+    # re-reverse it back into the correct order, and make it a tuple and use
+    # that for our sorting key.
+    release = tuple(
+        reversed(list(
+            itertools.dropwhile(
+                lambda x: x == 0,
+                reversed(release),
+            )
+        ))
+    )
+
+    # We need to "trick" the sorting algorithm to put 1.0.dev0 before 1.0a0.
+    # We'll do this by abusing the pre-segment, but we _only_ want to do this
+    # if there is no pre- or a post-segment. If we have one of those, then
+    # the normal sorting rules will handle this case correctly.
+    if pre is None and post is None and dev is not None:
+        pre = -Infinity
+    # Versions without a pre-release (except as noted above) should sort after
+    # those with one.
+    elif pre is None:
+        pre = Infinity
+
+    # Versions without a post-segment should sort before those with one.
+    if post is None:
+        post = -Infinity
+
+    # Versions without a development segment should sort after those with one.
+    if dev is None:
+        dev = Infinity
+
+    if local is None:
+        # Versions without a local segment should sort before those with one.
+        local = -Infinity
+    else:
+        # Versions with a local segment need that segment parsed to implement
+        # the sorting rules in PEP440.
+        # - Alphanumeric segments sort before numeric segments
+        # - Alphanumeric segments sort lexicographically
+        # - Numeric segments sort numerically
+        # - Shorter versions sort before longer versions when the prefixes
+        #   match exactly
+        local = tuple(
+            (i, "") if isinstance(i, int) else (-Infinity, i)
+            for i in local
+        )
+
+    return epoch, release, pre, post, dev, local
diff --git a/lib/python3.12/site-packages/numpy/array_api/__pycache__/__init__.cpython-312.pyc b/lib/python3.12/site-packages/numpy/array_api/__pycache__/__init__.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..c205262ceddfb9fa19ef8e53e51a2a700213b3dd
Binary files /dev/null and b/lib/python3.12/site-packages/numpy/array_api/__pycache__/__init__.cpython-312.pyc differ
diff --git a/lib/python3.12/site-packages/numpy/array_api/__pycache__/_array_object.cpython-312.pyc b/lib/python3.12/site-packages/numpy/array_api/__pycache__/_array_object.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..7cb67088e0da564db7cfa3adac115a78f6fa65c3
Binary files /dev/null and b/lib/python3.12/site-packages/numpy/array_api/__pycache__/_array_object.cpython-312.pyc differ
diff --git a/lib/python3.12/site-packages/numpy/array_api/__pycache__/_constants.cpython-312.pyc b/lib/python3.12/site-packages/numpy/array_api/__pycache__/_constants.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..ad29cf7aafae5fff78622652c87fee421039ba0c
Binary files /dev/null and b/lib/python3.12/site-packages/numpy/array_api/__pycache__/_constants.cpython-312.pyc differ
diff --git a/lib/python3.12/site-packages/numpy/array_api/__pycache__/_creation_functions.cpython-312.pyc b/lib/python3.12/site-packages/numpy/array_api/__pycache__/_creation_functions.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..45afc000c84875c4adba1f4edaf3c7622c3f233e
Binary files /dev/null and b/lib/python3.12/site-packages/numpy/array_api/__pycache__/_creation_functions.cpython-312.pyc differ
diff --git a/lib/python3.12/site-packages/numpy/array_api/__pycache__/_dtypes.cpython-312.pyc b/lib/python3.12/site-packages/numpy/array_api/__pycache__/_dtypes.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..166a45a74541a21e8d02b3331691836838c62d0c
Binary files /dev/null and b/lib/python3.12/site-packages/numpy/array_api/__pycache__/_dtypes.cpython-312.pyc differ
diff --git a/lib/python3.12/site-packages/numpy/array_api/__pycache__/_set_functions.cpython-312.pyc b/lib/python3.12/site-packages/numpy/array_api/__pycache__/_set_functions.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..0df514a4958dec9f1f161c9c13cfb3847a501e02
Binary files /dev/null and b/lib/python3.12/site-packages/numpy/array_api/__pycache__/_set_functions.cpython-312.pyc differ
diff --git a/lib/python3.12/site-packages/numpy/array_api/__pycache__/_sorting_functions.cpython-312.pyc b/lib/python3.12/site-packages/numpy/array_api/__pycache__/_sorting_functions.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..151cce06bdd12e4c9989c61455bfa5de9394ff52
Binary files /dev/null and b/lib/python3.12/site-packages/numpy/array_api/__pycache__/_sorting_functions.cpython-312.pyc differ
diff --git a/lib/python3.12/site-packages/numpy/array_api/__pycache__/_statistical_functions.cpython-312.pyc b/lib/python3.12/site-packages/numpy/array_api/__pycache__/_statistical_functions.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..1a6aa081b51a0b7a9ee642f7abf5b54263c7880b
Binary files /dev/null and b/lib/python3.12/site-packages/numpy/array_api/__pycache__/_statistical_functions.cpython-312.pyc differ
diff --git a/lib/python3.12/site-packages/numpy/array_api/__pycache__/_typing.cpython-312.pyc b/lib/python3.12/site-packages/numpy/array_api/__pycache__/_typing.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..b66b5e699214f900abd1d9df2213144c1803f128
Binary files /dev/null and b/lib/python3.12/site-packages/numpy/array_api/__pycache__/_typing.cpython-312.pyc differ
diff --git a/lib/python3.12/site-packages/numpy/array_api/__pycache__/_utility_functions.cpython-312.pyc b/lib/python3.12/site-packages/numpy/array_api/__pycache__/_utility_functions.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..08bfe24e2f9502cb7dff196454a25fe312a50aa2
Binary files /dev/null and b/lib/python3.12/site-packages/numpy/array_api/__pycache__/_utility_functions.cpython-312.pyc differ
diff --git a/lib/python3.12/site-packages/numpy/array_api/__pycache__/setup.cpython-312.pyc b/lib/python3.12/site-packages/numpy/array_api/__pycache__/setup.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..5fbfafdc27af38863272f92fc1e6d6d1ec0939bf
Binary files /dev/null and b/lib/python3.12/site-packages/numpy/array_api/__pycache__/setup.cpython-312.pyc differ
diff --git a/lib/python3.12/site-packages/numpy/linalg/__init__.py b/lib/python3.12/site-packages/numpy/linalg/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..93943de3896c135dde00080d30fd6cbe55a86e5d
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/linalg/__init__.py
@@ -0,0 +1,80 @@
+"""
+``numpy.linalg``
+================
+
+The NumPy linear algebra functions rely on BLAS and LAPACK to provide efficient
+low level implementations of standard linear algebra algorithms. Those
+libraries may be provided by NumPy itself using C versions of a subset of their
+reference implementations but, when possible, highly optimized libraries that
+take advantage of specialized processor functionality are preferred. Examples
+of such libraries are OpenBLAS, MKL (TM), and ATLAS. Because those libraries
+are multithreaded and processor dependent, environmental variables and external
+packages such as threadpoolctl may be needed to control the number of threads
+or specify the processor architecture.
+
+- OpenBLAS: https://www.openblas.net/
+- threadpoolctl: https://github.com/joblib/threadpoolctl
+
+Please note that the most-used linear algebra functions in NumPy are present in
+the main ``numpy`` namespace rather than in ``numpy.linalg``.  There are:
+``dot``, ``vdot``, ``inner``, ``outer``, ``matmul``, ``tensordot``, ``einsum``,
+``einsum_path`` and ``kron``.
+
+Functions present in numpy.linalg are listed below.
+
+
+Matrix and vector products
+--------------------------
+
+   multi_dot
+   matrix_power
+
+Decompositions
+--------------
+
+   cholesky
+   qr
+   svd
+
+Matrix eigenvalues
+------------------
+
+   eig
+   eigh
+   eigvals
+   eigvalsh
+
+Norms and other numbers
+-----------------------
+
+   norm
+   cond
+   det
+   matrix_rank
+   slogdet
+
+Solving equations and inverting matrices
+----------------------------------------
+
+   solve
+   tensorsolve
+   lstsq
+   inv
+   pinv
+   tensorinv
+
+Exceptions
+----------
+
+   LinAlgError
+
+"""
+# To get sub-modules
+from . import linalg
+from .linalg import *
+
+__all__ = linalg.__all__.copy()
+
+from numpy._pytesttester import PytestTester
+test = PytestTester(__name__)
+del PytestTester
diff --git a/lib/python3.12/site-packages/numpy/linalg/__init__.pyi b/lib/python3.12/site-packages/numpy/linalg/__init__.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..d9acd55817325fb703ebddb7db594fac9cab5faf
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/linalg/__init__.pyi
@@ -0,0 +1,30 @@
+from numpy.linalg.linalg import (
+    matrix_power as matrix_power,
+    solve as solve,
+    tensorsolve as tensorsolve,
+    tensorinv as tensorinv,
+    inv as inv,
+    cholesky as cholesky,
+    eigvals as eigvals,
+    eigvalsh as eigvalsh,
+    pinv as pinv,
+    slogdet as slogdet,
+    det as det,
+    svd as svd,
+    eig as eig,
+    eigh as eigh,
+    lstsq as lstsq,
+    norm as norm,
+    qr as qr,
+    cond as cond,
+    matrix_rank as matrix_rank,
+    multi_dot as multi_dot,
+)
+
+from numpy._pytesttester import PytestTester
+
+__all__: list[str]
+__path__: list[str]
+test: PytestTester
+
+class LinAlgError(Exception): ...
diff --git a/lib/python3.12/site-packages/numpy/linalg/__pycache__/__init__.cpython-312.pyc b/lib/python3.12/site-packages/numpy/linalg/__pycache__/__init__.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..d32759a97ed49cd1c6ad9cc5a87490f2ebcac076
Binary files /dev/null and b/lib/python3.12/site-packages/numpy/linalg/__pycache__/__init__.cpython-312.pyc differ
diff --git a/lib/python3.12/site-packages/numpy/linalg/lapack_lite.cpython-312-x86_64-linux-gnu.so b/lib/python3.12/site-packages/numpy/linalg/lapack_lite.cpython-312-x86_64-linux-gnu.so
new file mode 100644
index 0000000000000000000000000000000000000000..d1e00858b938b63a153d8afa21b1c167161a0e5d
Binary files /dev/null and b/lib/python3.12/site-packages/numpy/linalg/lapack_lite.cpython-312-x86_64-linux-gnu.so differ
diff --git a/lib/python3.12/site-packages/numpy/linalg/linalg.py b/lib/python3.12/site-packages/numpy/linalg/linalg.py
new file mode 100644
index 0000000000000000000000000000000000000000..b838b9397024c028c1459e2e769e12d2fa767d88
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/linalg/linalg.py
@@ -0,0 +1,2836 @@
+"""Lite version of scipy.linalg.
+
+Notes
+-----
+This module is a lite version of the linalg.py module in SciPy which
+contains high-level Python interface to the LAPACK library.  The lite
+version only accesses the following LAPACK functions: dgesv, zgesv,
+dgeev, zgeev, dgesdd, zgesdd, dgelsd, zgelsd, dsyevd, zheevd, dgetrf,
+zgetrf, dpotrf, zpotrf, dgeqrf, zgeqrf, zungqr, dorgqr.
+"""
+
+__all__ = ['matrix_power', 'solve', 'tensorsolve', 'tensorinv', 'inv',
+           'cholesky', 'eigvals', 'eigvalsh', 'pinv', 'slogdet', 'det',
+           'svd', 'eig', 'eigh', 'lstsq', 'norm', 'qr', 'cond', 'matrix_rank',
+           'LinAlgError', 'multi_dot']
+
+import functools
+import operator
+import warnings
+from typing import NamedTuple, Any
+
+from .._utils import set_module
+from numpy.core import (
+    array, asarray, zeros, empty, empty_like, intc, single, double,
+    csingle, cdouble, inexact, complexfloating, newaxis, all, Inf, dot,
+    add, multiply, sqrt, sum, isfinite,
+    finfo, errstate, geterrobj, moveaxis, amin, amax, prod, abs,
+    atleast_2d, intp, asanyarray, object_, matmul,
+    swapaxes, divide, count_nonzero, isnan, sign, argsort, sort,
+    reciprocal
+)
+from numpy.core.multiarray import normalize_axis_index
+from numpy.core import overrides
+from numpy.lib.twodim_base import triu, eye
+from numpy.linalg import _umath_linalg
+
+from numpy._typing import NDArray
+
+class EigResult(NamedTuple):
+    eigenvalues: NDArray[Any]
+    eigenvectors: NDArray[Any]
+
+class EighResult(NamedTuple):
+    eigenvalues: NDArray[Any]
+    eigenvectors: NDArray[Any]
+
+class QRResult(NamedTuple):
+    Q: NDArray[Any]
+    R: NDArray[Any]
+
+class SlogdetResult(NamedTuple):
+    sign: NDArray[Any]
+    logabsdet: NDArray[Any]
+
+class SVDResult(NamedTuple):
+    U: NDArray[Any]
+    S: NDArray[Any]
+    Vh: NDArray[Any]
+
+array_function_dispatch = functools.partial(
+    overrides.array_function_dispatch, module='numpy.linalg')
+
+
+fortran_int = intc
+
+
+@set_module('numpy.linalg')
+class LinAlgError(ValueError):
+    """
+    Generic Python-exception-derived object raised by linalg functions.
+
+    General purpose exception class, derived from Python's ValueError
+    class, programmatically raised in linalg functions when a Linear
+    Algebra-related condition would prevent further correct execution of the
+    function.
+
+    Parameters
+    ----------
+    None
+
+    Examples
+    --------
+    >>> from numpy import linalg as LA
+    >>> LA.inv(np.zeros((2,2)))
+    Traceback (most recent call last):
+      File "", line 1, in 
+      File "...linalg.py", line 350,
+        in inv return wrap(solve(a, identity(a.shape[0], dtype=a.dtype)))
+      File "...linalg.py", line 249,
+        in solve
+        raise LinAlgError('Singular matrix')
+    numpy.linalg.LinAlgError: Singular matrix
+
+    """
+
+
+def _determine_error_states():
+    errobj = geterrobj()
+    bufsize = errobj[0]
+
+    with errstate(invalid='call', over='ignore',
+                  divide='ignore', under='ignore'):
+        invalid_call_errmask = geterrobj()[1]
+
+    return [bufsize, invalid_call_errmask, None]
+
+# Dealing with errors in _umath_linalg
+_linalg_error_extobj = _determine_error_states()
+del _determine_error_states
+
+def _raise_linalgerror_singular(err, flag):
+    raise LinAlgError("Singular matrix")
+
+def _raise_linalgerror_nonposdef(err, flag):
+    raise LinAlgError("Matrix is not positive definite")
+
+def _raise_linalgerror_eigenvalues_nonconvergence(err, flag):
+    raise LinAlgError("Eigenvalues did not converge")
+
+def _raise_linalgerror_svd_nonconvergence(err, flag):
+    raise LinAlgError("SVD did not converge")
+
+def _raise_linalgerror_lstsq(err, flag):
+    raise LinAlgError("SVD did not converge in Linear Least Squares")
+
+def _raise_linalgerror_qr(err, flag):
+    raise LinAlgError("Incorrect argument found while performing "
+                      "QR factorization")
+
+def get_linalg_error_extobj(callback):
+    extobj = list(_linalg_error_extobj)  # make a copy
+    extobj[2] = callback
+    return extobj
+
+def _makearray(a):
+    new = asarray(a)
+    wrap = getattr(a, "__array_prepare__", new.__array_wrap__)
+    return new, wrap
+
+def isComplexType(t):
+    return issubclass(t, complexfloating)
+
+_real_types_map = {single : single,
+                   double : double,
+                   csingle : single,
+                   cdouble : double}
+
+_complex_types_map = {single : csingle,
+                      double : cdouble,
+                      csingle : csingle,
+                      cdouble : cdouble}
+
+def _realType(t, default=double):
+    return _real_types_map.get(t, default)
+
+def _complexType(t, default=cdouble):
+    return _complex_types_map.get(t, default)
+
+def _commonType(*arrays):
+    # in lite version, use higher precision (always double or cdouble)
+    result_type = single
+    is_complex = False
+    for a in arrays:
+        type_ = a.dtype.type
+        if issubclass(type_, inexact):
+            if isComplexType(type_):
+                is_complex = True
+            rt = _realType(type_, default=None)
+            if rt is double:
+                result_type = double
+            elif rt is None:
+                # unsupported inexact scalar
+                raise TypeError("array type %s is unsupported in linalg" %
+                        (a.dtype.name,))
+        else:
+            result_type = double
+    if is_complex:
+        result_type = _complex_types_map[result_type]
+        return cdouble, result_type
+    else:
+        return double, result_type
+
+
+def _to_native_byte_order(*arrays):
+    ret = []
+    for arr in arrays:
+        if arr.dtype.byteorder not in ('=', '|'):
+            ret.append(asarray(arr, dtype=arr.dtype.newbyteorder('=')))
+        else:
+            ret.append(arr)
+    if len(ret) == 1:
+        return ret[0]
+    else:
+        return ret
+
+
+def _assert_2d(*arrays):
+    for a in arrays:
+        if a.ndim != 2:
+            raise LinAlgError('%d-dimensional array given. Array must be '
+                    'two-dimensional' % a.ndim)
+
+def _assert_stacked_2d(*arrays):
+    for a in arrays:
+        if a.ndim < 2:
+            raise LinAlgError('%d-dimensional array given. Array must be '
+                    'at least two-dimensional' % a.ndim)
+
+def _assert_stacked_square(*arrays):
+    for a in arrays:
+        m, n = a.shape[-2:]
+        if m != n:
+            raise LinAlgError('Last 2 dimensions of the array must be square')
+
+def _assert_finite(*arrays):
+    for a in arrays:
+        if not isfinite(a).all():
+            raise LinAlgError("Array must not contain infs or NaNs")
+
+def _is_empty_2d(arr):
+    # check size first for efficiency
+    return arr.size == 0 and prod(arr.shape[-2:]) == 0
+
+
+def transpose(a):
+    """
+    Transpose each matrix in a stack of matrices.
+
+    Unlike np.transpose, this only swaps the last two axes, rather than all of
+    them
+
+    Parameters
+    ----------
+    a : (...,M,N) array_like
+
+    Returns
+    -------
+    aT : (...,N,M) ndarray
+    """
+    return swapaxes(a, -1, -2)
+
+# Linear equations
+
+def _tensorsolve_dispatcher(a, b, axes=None):
+    return (a, b)
+
+
+@array_function_dispatch(_tensorsolve_dispatcher)
+def tensorsolve(a, b, axes=None):
+    """
+    Solve the tensor equation ``a x = b`` for x.
+
+    It is assumed that all indices of `x` are summed over in the product,
+    together with the rightmost indices of `a`, as is done in, for example,
+    ``tensordot(a, x, axes=x.ndim)``.
+
+    Parameters
+    ----------
+    a : array_like
+        Coefficient tensor, of shape ``b.shape + Q``. `Q`, a tuple, equals
+        the shape of that sub-tensor of `a` consisting of the appropriate
+        number of its rightmost indices, and must be such that
+        ``prod(Q) == prod(b.shape)`` (in which sense `a` is said to be
+        'square').
+    b : array_like
+        Right-hand tensor, which can be of any shape.
+    axes : tuple of ints, optional
+        Axes in `a` to reorder to the right, before inversion.
+        If None (default), no reordering is done.
+
+    Returns
+    -------
+    x : ndarray, shape Q
+
+    Raises
+    ------
+    LinAlgError
+        If `a` is singular or not 'square' (in the above sense).
+
+    See Also
+    --------
+    numpy.tensordot, tensorinv, numpy.einsum
+
+    Examples
+    --------
+    >>> a = np.eye(2*3*4)
+    >>> a.shape = (2*3, 4, 2, 3, 4)
+    >>> b = np.random.randn(2*3, 4)
+    >>> x = np.linalg.tensorsolve(a, b)
+    >>> x.shape
+    (2, 3, 4)
+    >>> np.allclose(np.tensordot(a, x, axes=3), b)
+    True
+
+    """
+    a, wrap = _makearray(a)
+    b = asarray(b)
+    an = a.ndim
+
+    if axes is not None:
+        allaxes = list(range(0, an))
+        for k in axes:
+            allaxes.remove(k)
+            allaxes.insert(an, k)
+        a = a.transpose(allaxes)
+
+    oldshape = a.shape[-(an-b.ndim):]
+    prod = 1
+    for k in oldshape:
+        prod *= k
+
+    if a.size != prod ** 2:
+        raise LinAlgError(
+            "Input arrays must satisfy the requirement \
+            prod(a.shape[b.ndim:]) == prod(a.shape[:b.ndim])"
+        )
+
+    a = a.reshape(prod, prod)
+    b = b.ravel()
+    res = wrap(solve(a, b))
+    res.shape = oldshape
+    return res
+
+
+def _solve_dispatcher(a, b):
+    return (a, b)
+
+
+@array_function_dispatch(_solve_dispatcher)
+def solve(a, b):
+    """
+    Solve a linear matrix equation, or system of linear scalar equations.
+
+    Computes the "exact" solution, `x`, of the well-determined, i.e., full
+    rank, linear matrix equation `ax = b`.
+
+    Parameters
+    ----------
+    a : (..., M, M) array_like
+        Coefficient matrix.
+    b : {(..., M,), (..., M, K)}, array_like
+        Ordinate or "dependent variable" values.
+
+    Returns
+    -------
+    x : {(..., M,), (..., M, K)} ndarray
+        Solution to the system a x = b.  Returned shape is identical to `b`.
+
+    Raises
+    ------
+    LinAlgError
+        If `a` is singular or not square.
+
+    See Also
+    --------
+    scipy.linalg.solve : Similar function in SciPy.
+
+    Notes
+    -----
+
+    .. versionadded:: 1.8.0
+
+    Broadcasting rules apply, see the `numpy.linalg` documentation for
+    details.
+
+    The solutions are computed using LAPACK routine ``_gesv``.
+
+    `a` must be square and of full-rank, i.e., all rows (or, equivalently,
+    columns) must be linearly independent; if either is not true, use
+    `lstsq` for the least-squares best "solution" of the
+    system/equation.
+
+    References
+    ----------
+    .. [1] G. Strang, *Linear Algebra and Its Applications*, 2nd Ed., Orlando,
+           FL, Academic Press, Inc., 1980, pg. 22.
+
+    Examples
+    --------
+    Solve the system of equations ``x0 + 2 * x1 = 1`` and ``3 * x0 + 5 * x1 = 2``:
+
+    >>> a = np.array([[1, 2], [3, 5]])
+    >>> b = np.array([1, 2])
+    >>> x = np.linalg.solve(a, b)
+    >>> x
+    array([-1.,  1.])
+
+    Check that the solution is correct:
+
+    >>> np.allclose(np.dot(a, x), b)
+    True
+
+    """
+    a, _ = _makearray(a)
+    _assert_stacked_2d(a)
+    _assert_stacked_square(a)
+    b, wrap = _makearray(b)
+    t, result_t = _commonType(a, b)
+
+    # We use the b = (..., M,) logic, only if the number of extra dimensions
+    # match exactly
+    if b.ndim == a.ndim - 1:
+        gufunc = _umath_linalg.solve1
+    else:
+        gufunc = _umath_linalg.solve
+
+    signature = 'DD->D' if isComplexType(t) else 'dd->d'
+    extobj = get_linalg_error_extobj(_raise_linalgerror_singular)
+    r = gufunc(a, b, signature=signature, extobj=extobj)
+
+    return wrap(r.astype(result_t, copy=False))
+
+
+def _tensorinv_dispatcher(a, ind=None):
+    return (a,)
+
+
+@array_function_dispatch(_tensorinv_dispatcher)
+def tensorinv(a, ind=2):
+    """
+    Compute the 'inverse' of an N-dimensional array.
+
+    The result is an inverse for `a` relative to the tensordot operation
+    ``tensordot(a, b, ind)``, i. e., up to floating-point accuracy,
+    ``tensordot(tensorinv(a), a, ind)`` is the "identity" tensor for the
+    tensordot operation.
+
+    Parameters
+    ----------
+    a : array_like
+        Tensor to 'invert'. Its shape must be 'square', i. e.,
+        ``prod(a.shape[:ind]) == prod(a.shape[ind:])``.
+    ind : int, optional
+        Number of first indices that are involved in the inverse sum.
+        Must be a positive integer, default is 2.
+
+    Returns
+    -------
+    b : ndarray
+        `a`'s tensordot inverse, shape ``a.shape[ind:] + a.shape[:ind]``.
+
+    Raises
+    ------
+    LinAlgError
+        If `a` is singular or not 'square' (in the above sense).
+
+    See Also
+    --------
+    numpy.tensordot, tensorsolve
+
+    Examples
+    --------
+    >>> a = np.eye(4*6)
+    >>> a.shape = (4, 6, 8, 3)
+    >>> ainv = np.linalg.tensorinv(a, ind=2)
+    >>> ainv.shape
+    (8, 3, 4, 6)
+    >>> b = np.random.randn(4, 6)
+    >>> np.allclose(np.tensordot(ainv, b), np.linalg.tensorsolve(a, b))
+    True
+
+    >>> a = np.eye(4*6)
+    >>> a.shape = (24, 8, 3)
+    >>> ainv = np.linalg.tensorinv(a, ind=1)
+    >>> ainv.shape
+    (8, 3, 24)
+    >>> b = np.random.randn(24)
+    >>> np.allclose(np.tensordot(ainv, b, 1), np.linalg.tensorsolve(a, b))
+    True
+
+    """
+    a = asarray(a)
+    oldshape = a.shape
+    prod = 1
+    if ind > 0:
+        invshape = oldshape[ind:] + oldshape[:ind]
+        for k in oldshape[ind:]:
+            prod *= k
+    else:
+        raise ValueError("Invalid ind argument.")
+    a = a.reshape(prod, -1)
+    ia = inv(a)
+    return ia.reshape(*invshape)
+
+
+# Matrix inversion
+
+def _unary_dispatcher(a):
+    return (a,)
+
+
+@array_function_dispatch(_unary_dispatcher)
+def inv(a):
+    """
+    Compute the (multiplicative) inverse of a matrix.
+
+    Given a square matrix `a`, return the matrix `ainv` satisfying
+    ``dot(a, ainv) = dot(ainv, a) = eye(a.shape[0])``.
+
+    Parameters
+    ----------
+    a : (..., M, M) array_like
+        Matrix to be inverted.
+
+    Returns
+    -------
+    ainv : (..., M, M) ndarray or matrix
+        (Multiplicative) inverse of the matrix `a`.
+
+    Raises
+    ------
+    LinAlgError
+        If `a` is not square or inversion fails.
+
+    See Also
+    --------
+    scipy.linalg.inv : Similar function in SciPy.
+
+    Notes
+    -----
+
+    .. versionadded:: 1.8.0
+
+    Broadcasting rules apply, see the `numpy.linalg` documentation for
+    details.
+
+    Examples
+    --------
+    >>> from numpy.linalg import inv
+    >>> a = np.array([[1., 2.], [3., 4.]])
+    >>> ainv = inv(a)
+    >>> np.allclose(np.dot(a, ainv), np.eye(2))
+    True
+    >>> np.allclose(np.dot(ainv, a), np.eye(2))
+    True
+
+    If a is a matrix object, then the return value is a matrix as well:
+
+    >>> ainv = inv(np.matrix(a))
+    >>> ainv
+    matrix([[-2. ,  1. ],
+            [ 1.5, -0.5]])
+
+    Inverses of several matrices can be computed at once:
+
+    >>> a = np.array([[[1., 2.], [3., 4.]], [[1, 3], [3, 5]]])
+    >>> inv(a)
+    array([[[-2.  ,  1.  ],
+            [ 1.5 , -0.5 ]],
+           [[-1.25,  0.75],
+            [ 0.75, -0.25]]])
+
+    """
+    a, wrap = _makearray(a)
+    _assert_stacked_2d(a)
+    _assert_stacked_square(a)
+    t, result_t = _commonType(a)
+
+    signature = 'D->D' if isComplexType(t) else 'd->d'
+    extobj = get_linalg_error_extobj(_raise_linalgerror_singular)
+    ainv = _umath_linalg.inv(a, signature=signature, extobj=extobj)
+    return wrap(ainv.astype(result_t, copy=False))
+
+
+def _matrix_power_dispatcher(a, n):
+    return (a,)
+
+
+@array_function_dispatch(_matrix_power_dispatcher)
+def matrix_power(a, n):
+    """
+    Raise a square matrix to the (integer) power `n`.
+
+    For positive integers `n`, the power is computed by repeated matrix
+    squarings and matrix multiplications. If ``n == 0``, the identity matrix
+    of the same shape as M is returned. If ``n < 0``, the inverse
+    is computed and then raised to the ``abs(n)``.
+
+    .. note:: Stacks of object matrices are not currently supported.
+
+    Parameters
+    ----------
+    a : (..., M, M) array_like
+        Matrix to be "powered".
+    n : int
+        The exponent can be any integer or long integer, positive,
+        negative, or zero.
+
+    Returns
+    -------
+    a**n : (..., M, M) ndarray or matrix object
+        The return value is the same shape and type as `M`;
+        if the exponent is positive or zero then the type of the
+        elements is the same as those of `M`. If the exponent is
+        negative the elements are floating-point.
+
+    Raises
+    ------
+    LinAlgError
+        For matrices that are not square or that (for negative powers) cannot
+        be inverted numerically.
+
+    Examples
+    --------
+    >>> from numpy.linalg import matrix_power
+    >>> i = np.array([[0, 1], [-1, 0]]) # matrix equiv. of the imaginary unit
+    >>> matrix_power(i, 3) # should = -i
+    array([[ 0, -1],
+           [ 1,  0]])
+    >>> matrix_power(i, 0)
+    array([[1, 0],
+           [0, 1]])
+    >>> matrix_power(i, -3) # should = 1/(-i) = i, but w/ f.p. elements
+    array([[ 0.,  1.],
+           [-1.,  0.]])
+
+    Somewhat more sophisticated example
+
+    >>> q = np.zeros((4, 4))
+    >>> q[0:2, 0:2] = -i
+    >>> q[2:4, 2:4] = i
+    >>> q # one of the three quaternion units not equal to 1
+    array([[ 0., -1.,  0.,  0.],
+           [ 1.,  0.,  0.,  0.],
+           [ 0.,  0.,  0.,  1.],
+           [ 0.,  0., -1.,  0.]])
+    >>> matrix_power(q, 2) # = -np.eye(4)
+    array([[-1.,  0.,  0.,  0.],
+           [ 0., -1.,  0.,  0.],
+           [ 0.,  0., -1.,  0.],
+           [ 0.,  0.,  0., -1.]])
+
+    """
+    a = asanyarray(a)
+    _assert_stacked_2d(a)
+    _assert_stacked_square(a)
+
+    try:
+        n = operator.index(n)
+    except TypeError as e:
+        raise TypeError("exponent must be an integer") from e
+
+    # Fall back on dot for object arrays. Object arrays are not supported by
+    # the current implementation of matmul using einsum
+    if a.dtype != object:
+        fmatmul = matmul
+    elif a.ndim == 2:
+        fmatmul = dot
+    else:
+        raise NotImplementedError(
+            "matrix_power not supported for stacks of object arrays")
+
+    if n == 0:
+        a = empty_like(a)
+        a[...] = eye(a.shape[-2], dtype=a.dtype)
+        return a
+
+    elif n < 0:
+        a = inv(a)
+        n = abs(n)
+
+    # short-cuts.
+    if n == 1:
+        return a
+
+    elif n == 2:
+        return fmatmul(a, a)
+
+    elif n == 3:
+        return fmatmul(fmatmul(a, a), a)
+
+    # Use binary decomposition to reduce the number of matrix multiplications.
+    # Here, we iterate over the bits of n, from LSB to MSB, raise `a` to
+    # increasing powers of 2, and multiply into the result as needed.
+    z = result = None
+    while n > 0:
+        z = a if z is None else fmatmul(z, z)
+        n, bit = divmod(n, 2)
+        if bit:
+            result = z if result is None else fmatmul(result, z)
+
+    return result
+
+
+# Cholesky decomposition
+
+
+@array_function_dispatch(_unary_dispatcher)
+def cholesky(a):
+    """
+    Cholesky decomposition.
+
+    Return the Cholesky decomposition, `L * L.H`, of the square matrix `a`,
+    where `L` is lower-triangular and .H is the conjugate transpose operator
+    (which is the ordinary transpose if `a` is real-valued).  `a` must be
+    Hermitian (symmetric if real-valued) and positive-definite. No
+    checking is performed to verify whether `a` is Hermitian or not.
+    In addition, only the lower-triangular and diagonal elements of `a`
+    are used. Only `L` is actually returned.
+
+    Parameters
+    ----------
+    a : (..., M, M) array_like
+        Hermitian (symmetric if all elements are real), positive-definite
+        input matrix.
+
+    Returns
+    -------
+    L : (..., M, M) array_like
+        Lower-triangular Cholesky factor of `a`.  Returns a matrix object if
+        `a` is a matrix object.
+
+    Raises
+    ------
+    LinAlgError
+       If the decomposition fails, for example, if `a` is not
+       positive-definite.
+
+    See Also
+    --------
+    scipy.linalg.cholesky : Similar function in SciPy.
+    scipy.linalg.cholesky_banded : Cholesky decompose a banded Hermitian
+                                   positive-definite matrix.
+    scipy.linalg.cho_factor : Cholesky decomposition of a matrix, to use in
+                              `scipy.linalg.cho_solve`.
+
+    Notes
+    -----
+
+    .. versionadded:: 1.8.0
+
+    Broadcasting rules apply, see the `numpy.linalg` documentation for
+    details.
+
+    The Cholesky decomposition is often used as a fast way of solving
+
+    .. math:: A \\mathbf{x} = \\mathbf{b}
+
+    (when `A` is both Hermitian/symmetric and positive-definite).
+
+    First, we solve for :math:`\\mathbf{y}` in
+
+    .. math:: L \\mathbf{y} = \\mathbf{b},
+
+    and then for :math:`\\mathbf{x}` in
+
+    .. math:: L.H \\mathbf{x} = \\mathbf{y}.
+
+    Examples
+    --------
+    >>> A = np.array([[1,-2j],[2j,5]])
+    >>> A
+    array([[ 1.+0.j, -0.-2.j],
+           [ 0.+2.j,  5.+0.j]])
+    >>> L = np.linalg.cholesky(A)
+    >>> L
+    array([[1.+0.j, 0.+0.j],
+           [0.+2.j, 1.+0.j]])
+    >>> np.dot(L, L.T.conj()) # verify that L * L.H = A
+    array([[1.+0.j, 0.-2.j],
+           [0.+2.j, 5.+0.j]])
+    >>> A = [[1,-2j],[2j,5]] # what happens if A is only array_like?
+    >>> np.linalg.cholesky(A) # an ndarray object is returned
+    array([[1.+0.j, 0.+0.j],
+           [0.+2.j, 1.+0.j]])
+    >>> # But a matrix object is returned if A is a matrix object
+    >>> np.linalg.cholesky(np.matrix(A))
+    matrix([[ 1.+0.j,  0.+0.j],
+            [ 0.+2.j,  1.+0.j]])
+
+    """
+    extobj = get_linalg_error_extobj(_raise_linalgerror_nonposdef)
+    gufunc = _umath_linalg.cholesky_lo
+    a, wrap = _makearray(a)
+    _assert_stacked_2d(a)
+    _assert_stacked_square(a)
+    t, result_t = _commonType(a)
+    signature = 'D->D' if isComplexType(t) else 'd->d'
+    r = gufunc(a, signature=signature, extobj=extobj)
+    return wrap(r.astype(result_t, copy=False))
+
+
+# QR decomposition
+
+def _qr_dispatcher(a, mode=None):
+    return (a,)
+
+
+@array_function_dispatch(_qr_dispatcher)
+def qr(a, mode='reduced'):
+    """
+    Compute the qr factorization of a matrix.
+
+    Factor the matrix `a` as *qr*, where `q` is orthonormal and `r` is
+    upper-triangular.
+
+    Parameters
+    ----------
+    a : array_like, shape (..., M, N)
+        An array-like object with the dimensionality of at least 2.
+    mode : {'reduced', 'complete', 'r', 'raw'}, optional
+        If K = min(M, N), then
+
+        * 'reduced'  : returns Q, R with dimensions (..., M, K), (..., K, N) (default)
+        * 'complete' : returns Q, R with dimensions (..., M, M), (..., M, N)
+        * 'r'        : returns R only with dimensions (..., K, N)
+        * 'raw'      : returns h, tau with dimensions (..., N, M), (..., K,)
+
+        The options 'reduced', 'complete, and 'raw' are new in numpy 1.8,
+        see the notes for more information. The default is 'reduced', and to
+        maintain backward compatibility with earlier versions of numpy both
+        it and the old default 'full' can be omitted. Note that array h
+        returned in 'raw' mode is transposed for calling Fortran. The
+        'economic' mode is deprecated.  The modes 'full' and 'economic' may
+        be passed using only the first letter for backwards compatibility,
+        but all others must be spelled out. See the Notes for more
+        explanation.
+
+
+    Returns
+    -------
+    When mode is 'reduced' or 'complete', the result will be a namedtuple with
+    the attributes `Q` and `R`.
+
+    Q : ndarray of float or complex, optional
+        A matrix with orthonormal columns. When mode = 'complete' the
+        result is an orthogonal/unitary matrix depending on whether or not
+        a is real/complex. The determinant may be either +/- 1 in that
+        case. In case the number of dimensions in the input array is
+        greater than 2 then a stack of the matrices with above properties
+        is returned.
+    R : ndarray of float or complex, optional
+        The upper-triangular matrix or a stack of upper-triangular
+        matrices if the number of dimensions in the input array is greater
+        than 2.
+    (h, tau) : ndarrays of np.double or np.cdouble, optional
+        The array h contains the Householder reflectors that generate q
+        along with r. The tau array contains scaling factors for the
+        reflectors. In the deprecated  'economic' mode only h is returned.
+
+    Raises
+    ------
+    LinAlgError
+        If factoring fails.
+
+    See Also
+    --------
+    scipy.linalg.qr : Similar function in SciPy.
+    scipy.linalg.rq : Compute RQ decomposition of a matrix.
+
+    Notes
+    -----
+    This is an interface to the LAPACK routines ``dgeqrf``, ``zgeqrf``,
+    ``dorgqr``, and ``zungqr``.
+
+    For more information on the qr factorization, see for example:
+    https://en.wikipedia.org/wiki/QR_factorization
+
+    Subclasses of `ndarray` are preserved except for the 'raw' mode. So if
+    `a` is of type `matrix`, all the return values will be matrices too.
+
+    New 'reduced', 'complete', and 'raw' options for mode were added in
+    NumPy 1.8.0 and the old option 'full' was made an alias of 'reduced'.  In
+    addition the options 'full' and 'economic' were deprecated.  Because
+    'full' was the previous default and 'reduced' is the new default,
+    backward compatibility can be maintained by letting `mode` default.
+    The 'raw' option was added so that LAPACK routines that can multiply
+    arrays by q using the Householder reflectors can be used. Note that in
+    this case the returned arrays are of type np.double or np.cdouble and
+    the h array is transposed to be FORTRAN compatible.  No routines using
+    the 'raw' return are currently exposed by numpy, but some are available
+    in lapack_lite and just await the necessary work.
+
+    Examples
+    --------
+    >>> a = np.random.randn(9, 6)
+    >>> Q, R = np.linalg.qr(a)
+    >>> np.allclose(a, np.dot(Q, R))  # a does equal QR
+    True
+    >>> R2 = np.linalg.qr(a, mode='r')
+    >>> np.allclose(R, R2)  # mode='r' returns the same R as mode='full'
+    True
+    >>> a = np.random.normal(size=(3, 2, 2)) # Stack of 2 x 2 matrices as input
+    >>> Q, R = np.linalg.qr(a)
+    >>> Q.shape
+    (3, 2, 2)
+    >>> R.shape
+    (3, 2, 2)
+    >>> np.allclose(a, np.matmul(Q, R))
+    True
+
+    Example illustrating a common use of `qr`: solving of least squares
+    problems
+
+    What are the least-squares-best `m` and `y0` in ``y = y0 + mx`` for
+    the following data: {(0,1), (1,0), (1,2), (2,1)}. (Graph the points
+    and you'll see that it should be y0 = 0, m = 1.)  The answer is provided
+    by solving the over-determined matrix equation ``Ax = b``, where::
+
+      A = array([[0, 1], [1, 1], [1, 1], [2, 1]])
+      x = array([[y0], [m]])
+      b = array([[1], [0], [2], [1]])
+
+    If A = QR such that Q is orthonormal (which is always possible via
+    Gram-Schmidt), then ``x = inv(R) * (Q.T) * b``.  (In numpy practice,
+    however, we simply use `lstsq`.)
+
+    >>> A = np.array([[0, 1], [1, 1], [1, 1], [2, 1]])
+    >>> A
+    array([[0, 1],
+           [1, 1],
+           [1, 1],
+           [2, 1]])
+    >>> b = np.array([1, 2, 2, 3])
+    >>> Q, R = np.linalg.qr(A)
+    >>> p = np.dot(Q.T, b)
+    >>> np.dot(np.linalg.inv(R), p)
+    array([  1.,   1.])
+
+    """
+    if mode not in ('reduced', 'complete', 'r', 'raw'):
+        if mode in ('f', 'full'):
+            # 2013-04-01, 1.8
+            msg = "".join((
+                    "The 'full' option is deprecated in favor of 'reduced'.\n",
+                    "For backward compatibility let mode default."))
+            warnings.warn(msg, DeprecationWarning, stacklevel=2)
+            mode = 'reduced'
+        elif mode in ('e', 'economic'):
+            # 2013-04-01, 1.8
+            msg = "The 'economic' option is deprecated."
+            warnings.warn(msg, DeprecationWarning, stacklevel=2)
+            mode = 'economic'
+        else:
+            raise ValueError(f"Unrecognized mode '{mode}'")
+
+    a, wrap = _makearray(a)
+    _assert_stacked_2d(a)
+    m, n = a.shape[-2:]
+    t, result_t = _commonType(a)
+    a = a.astype(t, copy=True)
+    a = _to_native_byte_order(a)
+    mn = min(m, n)
+
+    if m <= n:
+        gufunc = _umath_linalg.qr_r_raw_m
+    else:
+        gufunc = _umath_linalg.qr_r_raw_n
+
+    signature = 'D->D' if isComplexType(t) else 'd->d'
+    extobj = get_linalg_error_extobj(_raise_linalgerror_qr)
+    tau = gufunc(a, signature=signature, extobj=extobj)
+
+    # handle modes that don't return q
+    if mode == 'r':
+        r = triu(a[..., :mn, :])
+        r = r.astype(result_t, copy=False)
+        return wrap(r)
+
+    if mode == 'raw':
+        q = transpose(a)
+        q = q.astype(result_t, copy=False)
+        tau = tau.astype(result_t, copy=False)
+        return wrap(q), tau
+
+    if mode == 'economic':
+        a = a.astype(result_t, copy=False)
+        return wrap(a)
+
+    # mc is the number of columns in the resulting q
+    # matrix. If the mode is complete then it is
+    # same as number of rows, and if the mode is reduced,
+    # then it is the minimum of number of rows and columns.
+    if mode == 'complete' and m > n:
+        mc = m
+        gufunc = _umath_linalg.qr_complete
+    else:
+        mc = mn
+        gufunc = _umath_linalg.qr_reduced
+
+    signature = 'DD->D' if isComplexType(t) else 'dd->d'
+    extobj = get_linalg_error_extobj(_raise_linalgerror_qr)
+    q = gufunc(a, tau, signature=signature, extobj=extobj)
+    r = triu(a[..., :mc, :])
+
+    q = q.astype(result_t, copy=False)
+    r = r.astype(result_t, copy=False)
+
+    return QRResult(wrap(q), wrap(r))
+
+# Eigenvalues
+
+
+@array_function_dispatch(_unary_dispatcher)
+def eigvals(a):
+    """
+    Compute the eigenvalues of a general matrix.
+
+    Main difference between `eigvals` and `eig`: the eigenvectors aren't
+    returned.
+
+    Parameters
+    ----------
+    a : (..., M, M) array_like
+        A complex- or real-valued matrix whose eigenvalues will be computed.
+
+    Returns
+    -------
+    w : (..., M,) ndarray
+        The eigenvalues, each repeated according to its multiplicity.
+        They are not necessarily ordered, nor are they necessarily
+        real for real matrices.
+
+    Raises
+    ------
+    LinAlgError
+        If the eigenvalue computation does not converge.
+
+    See Also
+    --------
+    eig : eigenvalues and right eigenvectors of general arrays
+    eigvalsh : eigenvalues of real symmetric or complex Hermitian
+               (conjugate symmetric) arrays.
+    eigh : eigenvalues and eigenvectors of real symmetric or complex
+           Hermitian (conjugate symmetric) arrays.
+    scipy.linalg.eigvals : Similar function in SciPy.
+
+    Notes
+    -----
+
+    .. versionadded:: 1.8.0
+
+    Broadcasting rules apply, see the `numpy.linalg` documentation for
+    details.
+
+    This is implemented using the ``_geev`` LAPACK routines which compute
+    the eigenvalues and eigenvectors of general square arrays.
+
+    Examples
+    --------
+    Illustration, using the fact that the eigenvalues of a diagonal matrix
+    are its diagonal elements, that multiplying a matrix on the left
+    by an orthogonal matrix, `Q`, and on the right by `Q.T` (the transpose
+    of `Q`), preserves the eigenvalues of the "middle" matrix.  In other words,
+    if `Q` is orthogonal, then ``Q * A * Q.T`` has the same eigenvalues as
+    ``A``:
+
+    >>> from numpy import linalg as LA
+    >>> x = np.random.random()
+    >>> Q = np.array([[np.cos(x), -np.sin(x)], [np.sin(x), np.cos(x)]])
+    >>> LA.norm(Q[0, :]), LA.norm(Q[1, :]), np.dot(Q[0, :],Q[1, :])
+    (1.0, 1.0, 0.0)
+
+    Now multiply a diagonal matrix by ``Q`` on one side and by ``Q.T`` on the other:
+
+    >>> D = np.diag((-1,1))
+    >>> LA.eigvals(D)
+    array([-1.,  1.])
+    >>> A = np.dot(Q, D)
+    >>> A = np.dot(A, Q.T)
+    >>> LA.eigvals(A)
+    array([ 1., -1.]) # random
+
+    """
+    a, wrap = _makearray(a)
+    _assert_stacked_2d(a)
+    _assert_stacked_square(a)
+    _assert_finite(a)
+    t, result_t = _commonType(a)
+
+    extobj = get_linalg_error_extobj(
+        _raise_linalgerror_eigenvalues_nonconvergence)
+    signature = 'D->D' if isComplexType(t) else 'd->D'
+    w = _umath_linalg.eigvals(a, signature=signature, extobj=extobj)
+
+    if not isComplexType(t):
+        if all(w.imag == 0):
+            w = w.real
+            result_t = _realType(result_t)
+        else:
+            result_t = _complexType(result_t)
+
+    return w.astype(result_t, copy=False)
+
+
+def _eigvalsh_dispatcher(a, UPLO=None):
+    return (a,)
+
+
+@array_function_dispatch(_eigvalsh_dispatcher)
+def eigvalsh(a, UPLO='L'):
+    """
+    Compute the eigenvalues of a complex Hermitian or real symmetric matrix.
+
+    Main difference from eigh: the eigenvectors are not computed.
+
+    Parameters
+    ----------
+    a : (..., M, M) array_like
+        A complex- or real-valued matrix whose eigenvalues are to be
+        computed.
+    UPLO : {'L', 'U'}, optional
+        Specifies whether the calculation is done with the lower triangular
+        part of `a` ('L', default) or the upper triangular part ('U').
+        Irrespective of this value only the real parts of the diagonal will
+        be considered in the computation to preserve the notion of a Hermitian
+        matrix. It therefore follows that the imaginary part of the diagonal
+        will always be treated as zero.
+
+    Returns
+    -------
+    w : (..., M,) ndarray
+        The eigenvalues in ascending order, each repeated according to
+        its multiplicity.
+
+    Raises
+    ------
+    LinAlgError
+        If the eigenvalue computation does not converge.
+
+    See Also
+    --------
+    eigh : eigenvalues and eigenvectors of real symmetric or complex Hermitian
+           (conjugate symmetric) arrays.
+    eigvals : eigenvalues of general real or complex arrays.
+    eig : eigenvalues and right eigenvectors of general real or complex
+          arrays.
+    scipy.linalg.eigvalsh : Similar function in SciPy.
+
+    Notes
+    -----
+
+    .. versionadded:: 1.8.0
+
+    Broadcasting rules apply, see the `numpy.linalg` documentation for
+    details.
+
+    The eigenvalues are computed using LAPACK routines ``_syevd``, ``_heevd``.
+
+    Examples
+    --------
+    >>> from numpy import linalg as LA
+    >>> a = np.array([[1, -2j], [2j, 5]])
+    >>> LA.eigvalsh(a)
+    array([ 0.17157288,  5.82842712]) # may vary
+
+    >>> # demonstrate the treatment of the imaginary part of the diagonal
+    >>> a = np.array([[5+2j, 9-2j], [0+2j, 2-1j]])
+    >>> a
+    array([[5.+2.j, 9.-2.j],
+           [0.+2.j, 2.-1.j]])
+    >>> # with UPLO='L' this is numerically equivalent to using LA.eigvals()
+    >>> # with:
+    >>> b = np.array([[5.+0.j, 0.-2.j], [0.+2.j, 2.-0.j]])
+    >>> b
+    array([[5.+0.j, 0.-2.j],
+           [0.+2.j, 2.+0.j]])
+    >>> wa = LA.eigvalsh(a)
+    >>> wb = LA.eigvals(b)
+    >>> wa; wb
+    array([1., 6.])
+    array([6.+0.j, 1.+0.j])
+
+    """
+    UPLO = UPLO.upper()
+    if UPLO not in ('L', 'U'):
+        raise ValueError("UPLO argument must be 'L' or 'U'")
+
+    extobj = get_linalg_error_extobj(
+        _raise_linalgerror_eigenvalues_nonconvergence)
+    if UPLO == 'L':
+        gufunc = _umath_linalg.eigvalsh_lo
+    else:
+        gufunc = _umath_linalg.eigvalsh_up
+
+    a, wrap = _makearray(a)
+    _assert_stacked_2d(a)
+    _assert_stacked_square(a)
+    t, result_t = _commonType(a)
+    signature = 'D->d' if isComplexType(t) else 'd->d'
+    w = gufunc(a, signature=signature, extobj=extobj)
+    return w.astype(_realType(result_t), copy=False)
+
+def _convertarray(a):
+    t, result_t = _commonType(a)
+    a = a.astype(t).T.copy()
+    return a, t, result_t
+
+
+# Eigenvectors
+
+
+@array_function_dispatch(_unary_dispatcher)
+def eig(a):
+    """
+    Compute the eigenvalues and right eigenvectors of a square array.
+
+    Parameters
+    ----------
+    a : (..., M, M) array
+        Matrices for which the eigenvalues and right eigenvectors will
+        be computed
+
+    Returns
+    -------
+    A namedtuple with the following attributes:
+
+    eigenvalues : (..., M) array
+        The eigenvalues, each repeated according to its multiplicity.
+        The eigenvalues are not necessarily ordered. The resulting
+        array will be of complex type, unless the imaginary part is
+        zero in which case it will be cast to a real type. When `a`
+        is real the resulting eigenvalues will be real (0 imaginary
+        part) or occur in conjugate pairs
+
+    eigenvectors : (..., M, M) array
+        The normalized (unit "length") eigenvectors, such that the
+        column ``eigenvectors[:,i]`` is the eigenvector corresponding to the
+        eigenvalue ``eigenvalues[i]``.
+
+    Raises
+    ------
+    LinAlgError
+        If the eigenvalue computation does not converge.
+
+    See Also
+    --------
+    eigvals : eigenvalues of a non-symmetric array.
+    eigh : eigenvalues and eigenvectors of a real symmetric or complex
+           Hermitian (conjugate symmetric) array.
+    eigvalsh : eigenvalues of a real symmetric or complex Hermitian
+               (conjugate symmetric) array.
+    scipy.linalg.eig : Similar function in SciPy that also solves the
+                       generalized eigenvalue problem.
+    scipy.linalg.schur : Best choice for unitary and other non-Hermitian
+                         normal matrices.
+
+    Notes
+    -----
+
+    .. versionadded:: 1.8.0
+
+    Broadcasting rules apply, see the `numpy.linalg` documentation for
+    details.
+
+    This is implemented using the ``_geev`` LAPACK routines which compute
+    the eigenvalues and eigenvectors of general square arrays.
+
+    The number `w` is an eigenvalue of `a` if there exists a vector `v` such
+    that ``a @ v = w * v``. Thus, the arrays `a`, `eigenvalues`, and
+    `eigenvectors` satisfy the equations ``a @ eigenvectors[:,i] =
+    eigenvalues[i] * eigenvalues[:,i]`` for :math:`i \\in \\{0,...,M-1\\}`.
+
+    The array `eigenvectors` may not be of maximum rank, that is, some of the
+    columns may be linearly dependent, although round-off error may obscure
+    that fact. If the eigenvalues are all different, then theoretically the
+    eigenvectors are linearly independent and `a` can be diagonalized by a
+    similarity transformation using `eigenvectors`, i.e, ``inv(eigenvectors) @
+    a @ eigenvectors`` is diagonal.
+
+    For non-Hermitian normal matrices the SciPy function `scipy.linalg.schur`
+    is preferred because the matrix `eigenvectors` is guaranteed to be
+    unitary, which is not the case when using `eig`. The Schur factorization
+    produces an upper triangular matrix rather than a diagonal matrix, but for
+    normal matrices only the diagonal of the upper triangular matrix is
+    needed, the rest is roundoff error.
+
+    Finally, it is emphasized that `eigenvectors` consists of the *right* (as
+    in right-hand side) eigenvectors of `a`. A vector `y` satisfying ``y.T @ a
+    = z * y.T`` for some number `z` is called a *left* eigenvector of `a`,
+    and, in general, the left and right eigenvectors of a matrix are not
+    necessarily the (perhaps conjugate) transposes of each other.
+
+    References
+    ----------
+    G. Strang, *Linear Algebra and Its Applications*, 2nd Ed., Orlando, FL,
+    Academic Press, Inc., 1980, Various pp.
+
+    Examples
+    --------
+    >>> from numpy import linalg as LA
+
+    (Almost) trivial example with real eigenvalues and eigenvectors.
+
+    >>> eigenvalues, eigenvectors = LA.eig(np.diag((1, 2, 3)))
+    >>> eigenvalues
+    array([1., 2., 3.])
+    >>> eigenvectors
+    array([[1., 0., 0.],
+           [0., 1., 0.],
+           [0., 0., 1.]])
+
+    Real matrix possessing complex eigenvalues and eigenvectors; note that the
+    eigenvalues are complex conjugates of each other.
+
+    >>> eigenvalues, eigenvectors = LA.eig(np.array([[1, -1], [1, 1]]))
+    >>> eigenvalues
+    array([1.+1.j, 1.-1.j])
+    >>> eigenvectors
+    array([[0.70710678+0.j        , 0.70710678-0.j        ],
+           [0.        -0.70710678j, 0.        +0.70710678j]])
+
+    Complex-valued matrix with real eigenvalues (but complex-valued eigenvectors);
+    note that ``a.conj().T == a``, i.e., `a` is Hermitian.
+
+    >>> a = np.array([[1, 1j], [-1j, 1]])
+    >>> eigenvalues, eigenvectors = LA.eig(a)
+    >>> eigenvalues
+    array([2.+0.j, 0.+0.j])
+    >>> eigenvectors
+    array([[ 0.        +0.70710678j,  0.70710678+0.j        ], # may vary
+           [ 0.70710678+0.j        , -0.        +0.70710678j]])
+
+    Be careful about round-off error!
+
+    >>> a = np.array([[1 + 1e-9, 0], [0, 1 - 1e-9]])
+    >>> # Theor. eigenvalues are 1 +/- 1e-9
+    >>> eigenvalues, eigenvectors = LA.eig(a)
+    >>> eigenvalues
+    array([1., 1.])
+    >>> eigenvectors
+    array([[1., 0.],
+           [0., 1.]])
+
+    """
+    a, wrap = _makearray(a)
+    _assert_stacked_2d(a)
+    _assert_stacked_square(a)
+    _assert_finite(a)
+    t, result_t = _commonType(a)
+
+    extobj = get_linalg_error_extobj(
+        _raise_linalgerror_eigenvalues_nonconvergence)
+    signature = 'D->DD' if isComplexType(t) else 'd->DD'
+    w, vt = _umath_linalg.eig(a, signature=signature, extobj=extobj)
+
+    if not isComplexType(t) and all(w.imag == 0.0):
+        w = w.real
+        vt = vt.real
+        result_t = _realType(result_t)
+    else:
+        result_t = _complexType(result_t)
+
+    vt = vt.astype(result_t, copy=False)
+    return EigResult(w.astype(result_t, copy=False), wrap(vt))
+
+
+@array_function_dispatch(_eigvalsh_dispatcher)
+def eigh(a, UPLO='L'):
+    """
+    Return the eigenvalues and eigenvectors of a complex Hermitian
+    (conjugate symmetric) or a real symmetric matrix.
+
+    Returns two objects, a 1-D array containing the eigenvalues of `a`, and
+    a 2-D square array or matrix (depending on the input type) of the
+    corresponding eigenvectors (in columns).
+
+    Parameters
+    ----------
+    a : (..., M, M) array
+        Hermitian or real symmetric matrices whose eigenvalues and
+        eigenvectors are to be computed.
+    UPLO : {'L', 'U'}, optional
+        Specifies whether the calculation is done with the lower triangular
+        part of `a` ('L', default) or the upper triangular part ('U').
+        Irrespective of this value only the real parts of the diagonal will
+        be considered in the computation to preserve the notion of a Hermitian
+        matrix. It therefore follows that the imaginary part of the diagonal
+        will always be treated as zero.
+
+    Returns
+    -------
+    A namedtuple with the following attributes:
+
+    eigenvalues : (..., M) ndarray
+        The eigenvalues in ascending order, each repeated according to
+        its multiplicity.
+    eigenvectors : {(..., M, M) ndarray, (..., M, M) matrix}
+        The column ``eigenvectors[:, i]`` is the normalized eigenvector
+        corresponding to the eigenvalue ``eigenvalues[i]``.  Will return a
+        matrix object if `a` is a matrix object.
+
+    Raises
+    ------
+    LinAlgError
+        If the eigenvalue computation does not converge.
+
+    See Also
+    --------
+    eigvalsh : eigenvalues of real symmetric or complex Hermitian
+               (conjugate symmetric) arrays.
+    eig : eigenvalues and right eigenvectors for non-symmetric arrays.
+    eigvals : eigenvalues of non-symmetric arrays.
+    scipy.linalg.eigh : Similar function in SciPy (but also solves the
+                        generalized eigenvalue problem).
+
+    Notes
+    -----
+
+    .. versionadded:: 1.8.0
+
+    Broadcasting rules apply, see the `numpy.linalg` documentation for
+    details.
+
+    The eigenvalues/eigenvectors are computed using LAPACK routines ``_syevd``,
+    ``_heevd``.
+
+    The eigenvalues of real symmetric or complex Hermitian matrices are always
+    real. [1]_ The array `eigenvalues` of (column) eigenvectors is unitary and
+    `a`, `eigenvalues`, and `eigenvectors` satisfy the equations ``dot(a,
+    eigenvectors[:, i]) = eigenvalues[i] * eigenvectors[:, i]``.
+
+    References
+    ----------
+    .. [1] G. Strang, *Linear Algebra and Its Applications*, 2nd Ed., Orlando,
+           FL, Academic Press, Inc., 1980, pg. 222.
+
+    Examples
+    --------
+    >>> from numpy import linalg as LA
+    >>> a = np.array([[1, -2j], [2j, 5]])
+    >>> a
+    array([[ 1.+0.j, -0.-2.j],
+           [ 0.+2.j,  5.+0.j]])
+    >>> eigenvalues, eigenvectors = LA.eigh(a)
+    >>> eigenvalues
+    array([0.17157288, 5.82842712])
+    >>> eigenvectors
+    array([[-0.92387953+0.j        , -0.38268343+0.j        ], # may vary
+           [ 0.        +0.38268343j,  0.        -0.92387953j]])
+
+    >>> np.dot(a, eigenvectors[:, 0]) - eigenvalues[0] * eigenvectors[:, 0] # verify 1st eigenval/vec pair
+    array([5.55111512e-17+0.0000000e+00j, 0.00000000e+00+1.2490009e-16j])
+    >>> np.dot(a, eigenvectors[:, 1]) - eigenvalues[1] * eigenvectors[:, 1] # verify 2nd eigenval/vec pair
+    array([0.+0.j, 0.+0.j])
+
+    >>> A = np.matrix(a) # what happens if input is a matrix object
+    >>> A
+    matrix([[ 1.+0.j, -0.-2.j],
+            [ 0.+2.j,  5.+0.j]])
+    >>> eigenvalues, eigenvectors = LA.eigh(A)
+    >>> eigenvalues
+    array([0.17157288, 5.82842712])
+    >>> eigenvectors
+    matrix([[-0.92387953+0.j        , -0.38268343+0.j        ], # may vary
+            [ 0.        +0.38268343j,  0.        -0.92387953j]])
+
+    >>> # demonstrate the treatment of the imaginary part of the diagonal
+    >>> a = np.array([[5+2j, 9-2j], [0+2j, 2-1j]])
+    >>> a
+    array([[5.+2.j, 9.-2.j],
+           [0.+2.j, 2.-1.j]])
+    >>> # with UPLO='L' this is numerically equivalent to using LA.eig() with:
+    >>> b = np.array([[5.+0.j, 0.-2.j], [0.+2.j, 2.-0.j]])
+    >>> b
+    array([[5.+0.j, 0.-2.j],
+           [0.+2.j, 2.+0.j]])
+    >>> wa, va = LA.eigh(a)
+    >>> wb, vb = LA.eig(b)
+    >>> wa; wb
+    array([1., 6.])
+    array([6.+0.j, 1.+0.j])
+    >>> va; vb
+    array([[-0.4472136 +0.j        , -0.89442719+0.j        ], # may vary
+           [ 0.        +0.89442719j,  0.        -0.4472136j ]])
+    array([[ 0.89442719+0.j       , -0.        +0.4472136j],
+           [-0.        +0.4472136j,  0.89442719+0.j       ]])
+
+    """
+    UPLO = UPLO.upper()
+    if UPLO not in ('L', 'U'):
+        raise ValueError("UPLO argument must be 'L' or 'U'")
+
+    a, wrap = _makearray(a)
+    _assert_stacked_2d(a)
+    _assert_stacked_square(a)
+    t, result_t = _commonType(a)
+
+    extobj = get_linalg_error_extobj(
+        _raise_linalgerror_eigenvalues_nonconvergence)
+    if UPLO == 'L':
+        gufunc = _umath_linalg.eigh_lo
+    else:
+        gufunc = _umath_linalg.eigh_up
+
+    signature = 'D->dD' if isComplexType(t) else 'd->dd'
+    w, vt = gufunc(a, signature=signature, extobj=extobj)
+    w = w.astype(_realType(result_t), copy=False)
+    vt = vt.astype(result_t, copy=False)
+    return EighResult(w, wrap(vt))
+
+
+# Singular value decomposition
+
+def _svd_dispatcher(a, full_matrices=None, compute_uv=None, hermitian=None):
+    return (a,)
+
+
+@array_function_dispatch(_svd_dispatcher)
+def svd(a, full_matrices=True, compute_uv=True, hermitian=False):
+    """
+    Singular Value Decomposition.
+
+    When `a` is a 2D array, and ``full_matrices=False``, then it is
+    factorized as ``u @ np.diag(s) @ vh = (u * s) @ vh``, where
+    `u` and the Hermitian transpose of `vh` are 2D arrays with
+    orthonormal columns and `s` is a 1D array of `a`'s singular
+    values. When `a` is higher-dimensional, SVD is applied in
+    stacked mode as explained below.
+
+    Parameters
+    ----------
+    a : (..., M, N) array_like
+        A real or complex array with ``a.ndim >= 2``.
+    full_matrices : bool, optional
+        If True (default), `u` and `vh` have the shapes ``(..., M, M)`` and
+        ``(..., N, N)``, respectively.  Otherwise, the shapes are
+        ``(..., M, K)`` and ``(..., K, N)``, respectively, where
+        ``K = min(M, N)``.
+    compute_uv : bool, optional
+        Whether or not to compute `u` and `vh` in addition to `s`.  True
+        by default.
+    hermitian : bool, optional
+        If True, `a` is assumed to be Hermitian (symmetric if real-valued),
+        enabling a more efficient method for finding singular values.
+        Defaults to False.
+
+        .. versionadded:: 1.17.0
+
+    Returns
+    -------
+    When `compute_uv` is True, the result is a namedtuple with the following
+    attribute names:
+
+    U : { (..., M, M), (..., M, K) } array
+        Unitary array(s). The first ``a.ndim - 2`` dimensions have the same
+        size as those of the input `a`. The size of the last two dimensions
+        depends on the value of `full_matrices`. Only returned when
+        `compute_uv` is True.
+    S : (..., K) array
+        Vector(s) with the singular values, within each vector sorted in
+        descending order. The first ``a.ndim - 2`` dimensions have the same
+        size as those of the input `a`.
+    Vh : { (..., N, N), (..., K, N) } array
+        Unitary array(s). The first ``a.ndim - 2`` dimensions have the same
+        size as those of the input `a`. The size of the last two dimensions
+        depends on the value of `full_matrices`. Only returned when
+        `compute_uv` is True.
+
+    Raises
+    ------
+    LinAlgError
+        If SVD computation does not converge.
+
+    See Also
+    --------
+    scipy.linalg.svd : Similar function in SciPy.
+    scipy.linalg.svdvals : Compute singular values of a matrix.
+
+    Notes
+    -----
+
+    .. versionchanged:: 1.8.0
+       Broadcasting rules apply, see the `numpy.linalg` documentation for
+       details.
+
+    The decomposition is performed using LAPACK routine ``_gesdd``.
+
+    SVD is usually described for the factorization of a 2D matrix :math:`A`.
+    The higher-dimensional case will be discussed below. In the 2D case, SVD is
+    written as :math:`A = U S V^H`, where :math:`A = a`, :math:`U= u`,
+    :math:`S= \\mathtt{np.diag}(s)` and :math:`V^H = vh`. The 1D array `s`
+    contains the singular values of `a` and `u` and `vh` are unitary. The rows
+    of `vh` are the eigenvectors of :math:`A^H A` and the columns of `u` are
+    the eigenvectors of :math:`A A^H`. In both cases the corresponding
+    (possibly non-zero) eigenvalues are given by ``s**2``.
+
+    If `a` has more than two dimensions, then broadcasting rules apply, as
+    explained in :ref:`routines.linalg-broadcasting`. This means that SVD is
+    working in "stacked" mode: it iterates over all indices of the first
+    ``a.ndim - 2`` dimensions and for each combination SVD is applied to the
+    last two indices. The matrix `a` can be reconstructed from the
+    decomposition with either ``(u * s[..., None, :]) @ vh`` or
+    ``u @ (s[..., None] * vh)``. (The ``@`` operator can be replaced by the
+    function ``np.matmul`` for python versions below 3.5.)
+
+    If `a` is a ``matrix`` object (as opposed to an ``ndarray``), then so are
+    all the return values.
+
+    Examples
+    --------
+    >>> a = np.random.randn(9, 6) + 1j*np.random.randn(9, 6)
+    >>> b = np.random.randn(2, 7, 8, 3) + 1j*np.random.randn(2, 7, 8, 3)
+
+    Reconstruction based on full SVD, 2D case:
+
+    >>> U, S, Vh = np.linalg.svd(a, full_matrices=True)
+    >>> U.shape, S.shape, Vh.shape
+    ((9, 9), (6,), (6, 6))
+    >>> np.allclose(a, np.dot(U[:, :6] * S, Vh))
+    True
+    >>> smat = np.zeros((9, 6), dtype=complex)
+    >>> smat[:6, :6] = np.diag(S)
+    >>> np.allclose(a, np.dot(U, np.dot(smat, Vh)))
+    True
+
+    Reconstruction based on reduced SVD, 2D case:
+
+    >>> U, S, Vh = np.linalg.svd(a, full_matrices=False)
+    >>> U.shape, S.shape, Vh.shape
+    ((9, 6), (6,), (6, 6))
+    >>> np.allclose(a, np.dot(U * S, Vh))
+    True
+    >>> smat = np.diag(S)
+    >>> np.allclose(a, np.dot(U, np.dot(smat, Vh)))
+    True
+
+    Reconstruction based on full SVD, 4D case:
+
+    >>> U, S, Vh = np.linalg.svd(b, full_matrices=True)
+    >>> U.shape, S.shape, Vh.shape
+    ((2, 7, 8, 8), (2, 7, 3), (2, 7, 3, 3))
+    >>> np.allclose(b, np.matmul(U[..., :3] * S[..., None, :], Vh))
+    True
+    >>> np.allclose(b, np.matmul(U[..., :3], S[..., None] * Vh))
+    True
+
+    Reconstruction based on reduced SVD, 4D case:
+
+    >>> U, S, Vh = np.linalg.svd(b, full_matrices=False)
+    >>> U.shape, S.shape, Vh.shape
+    ((2, 7, 8, 3), (2, 7, 3), (2, 7, 3, 3))
+    >>> np.allclose(b, np.matmul(U * S[..., None, :], Vh))
+    True
+    >>> np.allclose(b, np.matmul(U, S[..., None] * Vh))
+    True
+
+    """
+    import numpy as _nx
+    a, wrap = _makearray(a)
+
+    if hermitian:
+        # note: lapack svd returns eigenvalues with s ** 2 sorted descending,
+        # but eig returns s sorted ascending, so we re-order the eigenvalues
+        # and related arrays to have the correct order
+        if compute_uv:
+            s, u = eigh(a)
+            sgn = sign(s)
+            s = abs(s)
+            sidx = argsort(s)[..., ::-1]
+            sgn = _nx.take_along_axis(sgn, sidx, axis=-1)
+            s = _nx.take_along_axis(s, sidx, axis=-1)
+            u = _nx.take_along_axis(u, sidx[..., None, :], axis=-1)
+            # singular values are unsigned, move the sign into v
+            vt = transpose(u * sgn[..., None, :]).conjugate()
+            return SVDResult(wrap(u), s, wrap(vt))
+        else:
+            s = eigvalsh(a)
+            s = abs(s)
+            return sort(s)[..., ::-1]
+
+    _assert_stacked_2d(a)
+    t, result_t = _commonType(a)
+
+    extobj = get_linalg_error_extobj(_raise_linalgerror_svd_nonconvergence)
+
+    m, n = a.shape[-2:]
+    if compute_uv:
+        if full_matrices:
+            if m < n:
+                gufunc = _umath_linalg.svd_m_f
+            else:
+                gufunc = _umath_linalg.svd_n_f
+        else:
+            if m < n:
+                gufunc = _umath_linalg.svd_m_s
+            else:
+                gufunc = _umath_linalg.svd_n_s
+
+        signature = 'D->DdD' if isComplexType(t) else 'd->ddd'
+        u, s, vh = gufunc(a, signature=signature, extobj=extobj)
+        u = u.astype(result_t, copy=False)
+        s = s.astype(_realType(result_t), copy=False)
+        vh = vh.astype(result_t, copy=False)
+        return SVDResult(wrap(u), s, wrap(vh))
+    else:
+        if m < n:
+            gufunc = _umath_linalg.svd_m
+        else:
+            gufunc = _umath_linalg.svd_n
+
+        signature = 'D->d' if isComplexType(t) else 'd->d'
+        s = gufunc(a, signature=signature, extobj=extobj)
+        s = s.astype(_realType(result_t), copy=False)
+        return s
+
+
+def _cond_dispatcher(x, p=None):
+    return (x,)
+
+
+@array_function_dispatch(_cond_dispatcher)
+def cond(x, p=None):
+    """
+    Compute the condition number of a matrix.
+
+    This function is capable of returning the condition number using
+    one of seven different norms, depending on the value of `p` (see
+    Parameters below).
+
+    Parameters
+    ----------
+    x : (..., M, N) array_like
+        The matrix whose condition number is sought.
+    p : {None, 1, -1, 2, -2, inf, -inf, 'fro'}, optional
+        Order of the norm used in the condition number computation:
+
+        =====  ============================
+        p      norm for matrices
+        =====  ============================
+        None   2-norm, computed directly using the ``SVD``
+        'fro'  Frobenius norm
+        inf    max(sum(abs(x), axis=1))
+        -inf   min(sum(abs(x), axis=1))
+        1      max(sum(abs(x), axis=0))
+        -1     min(sum(abs(x), axis=0))
+        2      2-norm (largest sing. value)
+        -2     smallest singular value
+        =====  ============================
+
+        inf means the `numpy.inf` object, and the Frobenius norm is
+        the root-of-sum-of-squares norm.
+
+    Returns
+    -------
+    c : {float, inf}
+        The condition number of the matrix. May be infinite.
+
+    See Also
+    --------
+    numpy.linalg.norm
+
+    Notes
+    -----
+    The condition number of `x` is defined as the norm of `x` times the
+    norm of the inverse of `x` [1]_; the norm can be the usual L2-norm
+    (root-of-sum-of-squares) or one of a number of other matrix norms.
+
+    References
+    ----------
+    .. [1] G. Strang, *Linear Algebra and Its Applications*, Orlando, FL,
+           Academic Press, Inc., 1980, pg. 285.
+
+    Examples
+    --------
+    >>> from numpy import linalg as LA
+    >>> a = np.array([[1, 0, -1], [0, 1, 0], [1, 0, 1]])
+    >>> a
+    array([[ 1,  0, -1],
+           [ 0,  1,  0],
+           [ 1,  0,  1]])
+    >>> LA.cond(a)
+    1.4142135623730951
+    >>> LA.cond(a, 'fro')
+    3.1622776601683795
+    >>> LA.cond(a, np.inf)
+    2.0
+    >>> LA.cond(a, -np.inf)
+    1.0
+    >>> LA.cond(a, 1)
+    2.0
+    >>> LA.cond(a, -1)
+    1.0
+    >>> LA.cond(a, 2)
+    1.4142135623730951
+    >>> LA.cond(a, -2)
+    0.70710678118654746 # may vary
+    >>> min(LA.svd(a, compute_uv=False))*min(LA.svd(LA.inv(a), compute_uv=False))
+    0.70710678118654746 # may vary
+
+    """
+    x = asarray(x)  # in case we have a matrix
+    if _is_empty_2d(x):
+        raise LinAlgError("cond is not defined on empty arrays")
+    if p is None or p == 2 or p == -2:
+        s = svd(x, compute_uv=False)
+        with errstate(all='ignore'):
+            if p == -2:
+                r = s[..., -1] / s[..., 0]
+            else:
+                r = s[..., 0] / s[..., -1]
+    else:
+        # Call inv(x) ignoring errors. The result array will
+        # contain nans in the entries where inversion failed.
+        _assert_stacked_2d(x)
+        _assert_stacked_square(x)
+        t, result_t = _commonType(x)
+        signature = 'D->D' if isComplexType(t) else 'd->d'
+        with errstate(all='ignore'):
+            invx = _umath_linalg.inv(x, signature=signature)
+            r = norm(x, p, axis=(-2, -1)) * norm(invx, p, axis=(-2, -1))
+        r = r.astype(result_t, copy=False)
+
+    # Convert nans to infs unless the original array had nan entries
+    r = asarray(r)
+    nan_mask = isnan(r)
+    if nan_mask.any():
+        nan_mask &= ~isnan(x).any(axis=(-2, -1))
+        if r.ndim > 0:
+            r[nan_mask] = Inf
+        elif nan_mask:
+            r[()] = Inf
+
+    # Convention is to return scalars instead of 0d arrays
+    if r.ndim == 0:
+        r = r[()]
+
+    return r
+
+
+def _matrix_rank_dispatcher(A, tol=None, hermitian=None):
+    return (A,)
+
+
+@array_function_dispatch(_matrix_rank_dispatcher)
+def matrix_rank(A, tol=None, hermitian=False):
+    """
+    Return matrix rank of array using SVD method
+
+    Rank of the array is the number of singular values of the array that are
+    greater than `tol`.
+
+    .. versionchanged:: 1.14
+       Can now operate on stacks of matrices
+
+    Parameters
+    ----------
+    A : {(M,), (..., M, N)} array_like
+        Input vector or stack of matrices.
+    tol : (...) array_like, float, optional
+        Threshold below which SVD values are considered zero. If `tol` is
+        None, and ``S`` is an array with singular values for `M`, and
+        ``eps`` is the epsilon value for datatype of ``S``, then `tol` is
+        set to ``S.max() * max(M, N) * eps``.
+
+        .. versionchanged:: 1.14
+           Broadcasted against the stack of matrices
+    hermitian : bool, optional
+        If True, `A` is assumed to be Hermitian (symmetric if real-valued),
+        enabling a more efficient method for finding singular values.
+        Defaults to False.
+
+        .. versionadded:: 1.14
+
+    Returns
+    -------
+    rank : (...) array_like
+        Rank of A.
+
+    Notes
+    -----
+    The default threshold to detect rank deficiency is a test on the magnitude
+    of the singular values of `A`.  By default, we identify singular values less
+    than ``S.max() * max(M, N) * eps`` as indicating rank deficiency (with
+    the symbols defined above). This is the algorithm MATLAB uses [1].  It also
+    appears in *Numerical recipes* in the discussion of SVD solutions for linear
+    least squares [2].
+
+    This default threshold is designed to detect rank deficiency accounting for
+    the numerical errors of the SVD computation.  Imagine that there is a column
+    in `A` that is an exact (in floating point) linear combination of other
+    columns in `A`. Computing the SVD on `A` will not produce a singular value
+    exactly equal to 0 in general: any difference of the smallest SVD value from
+    0 will be caused by numerical imprecision in the calculation of the SVD.
+    Our threshold for small SVD values takes this numerical imprecision into
+    account, and the default threshold will detect such numerical rank
+    deficiency.  The threshold may declare a matrix `A` rank deficient even if
+    the linear combination of some columns of `A` is not exactly equal to
+    another column of `A` but only numerically very close to another column of
+    `A`.
+
+    We chose our default threshold because it is in wide use.  Other thresholds
+    are possible.  For example, elsewhere in the 2007 edition of *Numerical
+    recipes* there is an alternative threshold of ``S.max() *
+    np.finfo(A.dtype).eps / 2. * np.sqrt(m + n + 1.)``. The authors describe
+    this threshold as being based on "expected roundoff error" (p 71).
+
+    The thresholds above deal with floating point roundoff error in the
+    calculation of the SVD.  However, you may have more information about the
+    sources of error in `A` that would make you consider other tolerance values
+    to detect *effective* rank deficiency.  The most useful measure of the
+    tolerance depends on the operations you intend to use on your matrix.  For
+    example, if your data come from uncertain measurements with uncertainties
+    greater than floating point epsilon, choosing a tolerance near that
+    uncertainty may be preferable.  The tolerance may be absolute if the
+    uncertainties are absolute rather than relative.
+
+    References
+    ----------
+    .. [1] MATLAB reference documentation, "Rank"
+           https://www.mathworks.com/help/techdoc/ref/rank.html
+    .. [2] W. H. Press, S. A. Teukolsky, W. T. Vetterling and B. P. Flannery,
+           "Numerical Recipes (3rd edition)", Cambridge University Press, 2007,
+           page 795.
+
+    Examples
+    --------
+    >>> from numpy.linalg import matrix_rank
+    >>> matrix_rank(np.eye(4)) # Full rank matrix
+    4
+    >>> I=np.eye(4); I[-1,-1] = 0. # rank deficient matrix
+    >>> matrix_rank(I)
+    3
+    >>> matrix_rank(np.ones((4,))) # 1 dimension - rank 1 unless all 0
+    1
+    >>> matrix_rank(np.zeros((4,)))
+    0
+    """
+    A = asarray(A)
+    if A.ndim < 2:
+        return int(not all(A==0))
+    S = svd(A, compute_uv=False, hermitian=hermitian)
+    if tol is None:
+        tol = S.max(axis=-1, keepdims=True) * max(A.shape[-2:]) * finfo(S.dtype).eps
+    else:
+        tol = asarray(tol)[..., newaxis]
+    return count_nonzero(S > tol, axis=-1)
+
+
+# Generalized inverse
+
+def _pinv_dispatcher(a, rcond=None, hermitian=None):
+    return (a,)
+
+
+@array_function_dispatch(_pinv_dispatcher)
+def pinv(a, rcond=1e-15, hermitian=False):
+    """
+    Compute the (Moore-Penrose) pseudo-inverse of a matrix.
+
+    Calculate the generalized inverse of a matrix using its
+    singular-value decomposition (SVD) and including all
+    *large* singular values.
+
+    .. versionchanged:: 1.14
+       Can now operate on stacks of matrices
+
+    Parameters
+    ----------
+    a : (..., M, N) array_like
+        Matrix or stack of matrices to be pseudo-inverted.
+    rcond : (...) array_like of float
+        Cutoff for small singular values.
+        Singular values less than or equal to
+        ``rcond * largest_singular_value`` are set to zero.
+        Broadcasts against the stack of matrices.
+    hermitian : bool, optional
+        If True, `a` is assumed to be Hermitian (symmetric if real-valued),
+        enabling a more efficient method for finding singular values.
+        Defaults to False.
+
+        .. versionadded:: 1.17.0
+
+    Returns
+    -------
+    B : (..., N, M) ndarray
+        The pseudo-inverse of `a`. If `a` is a `matrix` instance, then so
+        is `B`.
+
+    Raises
+    ------
+    LinAlgError
+        If the SVD computation does not converge.
+
+    See Also
+    --------
+    scipy.linalg.pinv : Similar function in SciPy.
+    scipy.linalg.pinvh : Compute the (Moore-Penrose) pseudo-inverse of a
+                         Hermitian matrix.
+
+    Notes
+    -----
+    The pseudo-inverse of a matrix A, denoted :math:`A^+`, is
+    defined as: "the matrix that 'solves' [the least-squares problem]
+    :math:`Ax = b`," i.e., if :math:`\\bar{x}` is said solution, then
+    :math:`A^+` is that matrix such that :math:`\\bar{x} = A^+b`.
+
+    It can be shown that if :math:`Q_1 \\Sigma Q_2^T = A` is the singular
+    value decomposition of A, then
+    :math:`A^+ = Q_2 \\Sigma^+ Q_1^T`, where :math:`Q_{1,2}` are
+    orthogonal matrices, :math:`\\Sigma` is a diagonal matrix consisting
+    of A's so-called singular values, (followed, typically, by
+    zeros), and then :math:`\\Sigma^+` is simply the diagonal matrix
+    consisting of the reciprocals of A's singular values
+    (again, followed by zeros). [1]_
+
+    References
+    ----------
+    .. [1] G. Strang, *Linear Algebra and Its Applications*, 2nd Ed., Orlando,
+           FL, Academic Press, Inc., 1980, pp. 139-142.
+
+    Examples
+    --------
+    The following example checks that ``a * a+ * a == a`` and
+    ``a+ * a * a+ == a+``:
+
+    >>> a = np.random.randn(9, 6)
+    >>> B = np.linalg.pinv(a)
+    >>> np.allclose(a, np.dot(a, np.dot(B, a)))
+    True
+    >>> np.allclose(B, np.dot(B, np.dot(a, B)))
+    True
+
+    """
+    a, wrap = _makearray(a)
+    rcond = asarray(rcond)
+    if _is_empty_2d(a):
+        m, n = a.shape[-2:]
+        res = empty(a.shape[:-2] + (n, m), dtype=a.dtype)
+        return wrap(res)
+    a = a.conjugate()
+    u, s, vt = svd(a, full_matrices=False, hermitian=hermitian)
+
+    # discard small singular values
+    cutoff = rcond[..., newaxis] * amax(s, axis=-1, keepdims=True)
+    large = s > cutoff
+    s = divide(1, s, where=large, out=s)
+    s[~large] = 0
+
+    res = matmul(transpose(vt), multiply(s[..., newaxis], transpose(u)))
+    return wrap(res)
+
+
+# Determinant
+
+
+@array_function_dispatch(_unary_dispatcher)
+def slogdet(a):
+    """
+    Compute the sign and (natural) logarithm of the determinant of an array.
+
+    If an array has a very small or very large determinant, then a call to
+    `det` may overflow or underflow. This routine is more robust against such
+    issues, because it computes the logarithm of the determinant rather than
+    the determinant itself.
+
+    Parameters
+    ----------
+    a : (..., M, M) array_like
+        Input array, has to be a square 2-D array.
+
+    Returns
+    -------
+    A namedtuple with the following attributes:
+
+    sign : (...) array_like
+        A number representing the sign of the determinant. For a real matrix,
+        this is 1, 0, or -1. For a complex matrix, this is a complex number
+        with absolute value 1 (i.e., it is on the unit circle), or else 0.
+    logabsdet : (...) array_like
+        The natural log of the absolute value of the determinant.
+
+    If the determinant is zero, then `sign` will be 0 and `logabsdet` will be
+    -Inf. In all cases, the determinant is equal to ``sign * np.exp(logabsdet)``.
+
+    See Also
+    --------
+    det
+
+    Notes
+    -----
+
+    .. versionadded:: 1.8.0
+
+    Broadcasting rules apply, see the `numpy.linalg` documentation for
+    details.
+
+    .. versionadded:: 1.6.0
+
+    The determinant is computed via LU factorization using the LAPACK
+    routine ``z/dgetrf``.
+
+
+    Examples
+    --------
+    The determinant of a 2-D array ``[[a, b], [c, d]]`` is ``ad - bc``:
+
+    >>> a = np.array([[1, 2], [3, 4]])
+    >>> (sign, logabsdet) = np.linalg.slogdet(a)
+    >>> (sign, logabsdet)
+    (-1, 0.69314718055994529) # may vary
+    >>> sign * np.exp(logabsdet)
+    -2.0
+
+    Computing log-determinants for a stack of matrices:
+
+    >>> a = np.array([ [[1, 2], [3, 4]], [[1, 2], [2, 1]], [[1, 3], [3, 1]] ])
+    >>> a.shape
+    (3, 2, 2)
+    >>> sign, logabsdet = np.linalg.slogdet(a)
+    >>> (sign, logabsdet)
+    (array([-1., -1., -1.]), array([ 0.69314718,  1.09861229,  2.07944154]))
+    >>> sign * np.exp(logabsdet)
+    array([-2., -3., -8.])
+
+    This routine succeeds where ordinary `det` does not:
+
+    >>> np.linalg.det(np.eye(500) * 0.1)
+    0.0
+    >>> np.linalg.slogdet(np.eye(500) * 0.1)
+    (1, -1151.2925464970228)
+
+    """
+    a = asarray(a)
+    _assert_stacked_2d(a)
+    _assert_stacked_square(a)
+    t, result_t = _commonType(a)
+    real_t = _realType(result_t)
+    signature = 'D->Dd' if isComplexType(t) else 'd->dd'
+    sign, logdet = _umath_linalg.slogdet(a, signature=signature)
+    sign = sign.astype(result_t, copy=False)
+    logdet = logdet.astype(real_t, copy=False)
+    return SlogdetResult(sign, logdet)
+
+
+@array_function_dispatch(_unary_dispatcher)
+def det(a):
+    """
+    Compute the determinant of an array.
+
+    Parameters
+    ----------
+    a : (..., M, M) array_like
+        Input array to compute determinants for.
+
+    Returns
+    -------
+    det : (...) array_like
+        Determinant of `a`.
+
+    See Also
+    --------
+    slogdet : Another way to represent the determinant, more suitable
+      for large matrices where underflow/overflow may occur.
+    scipy.linalg.det : Similar function in SciPy.
+
+    Notes
+    -----
+
+    .. versionadded:: 1.8.0
+
+    Broadcasting rules apply, see the `numpy.linalg` documentation for
+    details.
+
+    The determinant is computed via LU factorization using the LAPACK
+    routine ``z/dgetrf``.
+
+    Examples
+    --------
+    The determinant of a 2-D array [[a, b], [c, d]] is ad - bc:
+
+    >>> a = np.array([[1, 2], [3, 4]])
+    >>> np.linalg.det(a)
+    -2.0 # may vary
+
+    Computing determinants for a stack of matrices:
+
+    >>> a = np.array([ [[1, 2], [3, 4]], [[1, 2], [2, 1]], [[1, 3], [3, 1]] ])
+    >>> a.shape
+    (3, 2, 2)
+    >>> np.linalg.det(a)
+    array([-2., -3., -8.])
+
+    """
+    a = asarray(a)
+    _assert_stacked_2d(a)
+    _assert_stacked_square(a)
+    t, result_t = _commonType(a)
+    signature = 'D->D' if isComplexType(t) else 'd->d'
+    r = _umath_linalg.det(a, signature=signature)
+    r = r.astype(result_t, copy=False)
+    return r
+
+
+# Linear Least Squares
+
+def _lstsq_dispatcher(a, b, rcond=None):
+    return (a, b)
+
+
+@array_function_dispatch(_lstsq_dispatcher)
+def lstsq(a, b, rcond="warn"):
+    r"""
+    Return the least-squares solution to a linear matrix equation.
+
+    Computes the vector `x` that approximately solves the equation
+    ``a @ x = b``. The equation may be under-, well-, or over-determined
+    (i.e., the number of linearly independent rows of `a` can be less than,
+    equal to, or greater than its number of linearly independent columns).
+    If `a` is square and of full rank, then `x` (but for round-off error)
+    is the "exact" solution of the equation. Else, `x` minimizes the
+    Euclidean 2-norm :math:`||b - ax||`. If there are multiple minimizing
+    solutions, the one with the smallest 2-norm :math:`||x||` is returned.
+
+    Parameters
+    ----------
+    a : (M, N) array_like
+        "Coefficient" matrix.
+    b : {(M,), (M, K)} array_like
+        Ordinate or "dependent variable" values. If `b` is two-dimensional,
+        the least-squares solution is calculated for each of the `K` columns
+        of `b`.
+    rcond : float, optional
+        Cut-off ratio for small singular values of `a`.
+        For the purposes of rank determination, singular values are treated
+        as zero if they are smaller than `rcond` times the largest singular
+        value of `a`.
+
+        .. versionchanged:: 1.14.0
+           If not set, a FutureWarning is given. The previous default
+           of ``-1`` will use the machine precision as `rcond` parameter,
+           the new default will use the machine precision times `max(M, N)`.
+           To silence the warning and use the new default, use ``rcond=None``,
+           to keep using the old behavior, use ``rcond=-1``.
+
+    Returns
+    -------
+    x : {(N,), (N, K)} ndarray
+        Least-squares solution. If `b` is two-dimensional,
+        the solutions are in the `K` columns of `x`.
+    residuals : {(1,), (K,), (0,)} ndarray
+        Sums of squared residuals: Squared Euclidean 2-norm for each column in
+        ``b - a @ x``.
+        If the rank of `a` is < N or M <= N, this is an empty array.
+        If `b` is 1-dimensional, this is a (1,) shape array.
+        Otherwise the shape is (K,).
+    rank : int
+        Rank of matrix `a`.
+    s : (min(M, N),) ndarray
+        Singular values of `a`.
+
+    Raises
+    ------
+    LinAlgError
+        If computation does not converge.
+
+    See Also
+    --------
+    scipy.linalg.lstsq : Similar function in SciPy.
+
+    Notes
+    -----
+    If `b` is a matrix, then all array results are returned as matrices.
+
+    Examples
+    --------
+    Fit a line, ``y = mx + c``, through some noisy data-points:
+
+    >>> x = np.array([0, 1, 2, 3])
+    >>> y = np.array([-1, 0.2, 0.9, 2.1])
+
+    By examining the coefficients, we see that the line should have a
+    gradient of roughly 1 and cut the y-axis at, more or less, -1.
+
+    We can rewrite the line equation as ``y = Ap``, where ``A = [[x 1]]``
+    and ``p = [[m], [c]]``.  Now use `lstsq` to solve for `p`:
+
+    >>> A = np.vstack([x, np.ones(len(x))]).T
+    >>> A
+    array([[ 0.,  1.],
+           [ 1.,  1.],
+           [ 2.,  1.],
+           [ 3.,  1.]])
+
+    >>> m, c = np.linalg.lstsq(A, y, rcond=None)[0]
+    >>> m, c
+    (1.0 -0.95) # may vary
+
+    Plot the data along with the fitted line:
+
+    >>> import matplotlib.pyplot as plt
+    >>> _ = plt.plot(x, y, 'o', label='Original data', markersize=10)
+    >>> _ = plt.plot(x, m*x + c, 'r', label='Fitted line')
+    >>> _ = plt.legend()
+    >>> plt.show()
+
+    """
+    a, _ = _makearray(a)
+    b, wrap = _makearray(b)
+    is_1d = b.ndim == 1
+    if is_1d:
+        b = b[:, newaxis]
+    _assert_2d(a, b)
+    m, n = a.shape[-2:]
+    m2, n_rhs = b.shape[-2:]
+    if m != m2:
+        raise LinAlgError('Incompatible dimensions')
+
+    t, result_t = _commonType(a, b)
+    result_real_t = _realType(result_t)
+
+    # Determine default rcond value
+    if rcond == "warn":
+        # 2017-08-19, 1.14.0
+        warnings.warn("`rcond` parameter will change to the default of "
+                      "machine precision times ``max(M, N)`` where M and N "
+                      "are the input matrix dimensions.\n"
+                      "To use the future default and silence this warning "
+                      "we advise to pass `rcond=None`, to keep using the old, "
+                      "explicitly pass `rcond=-1`.",
+                      FutureWarning, stacklevel=2)
+        rcond = -1
+    if rcond is None:
+        rcond = finfo(t).eps * max(n, m)
+
+    if m <= n:
+        gufunc = _umath_linalg.lstsq_m
+    else:
+        gufunc = _umath_linalg.lstsq_n
+
+    signature = 'DDd->Ddid' if isComplexType(t) else 'ddd->ddid'
+    extobj = get_linalg_error_extobj(_raise_linalgerror_lstsq)
+    if n_rhs == 0:
+        # lapack can't handle n_rhs = 0 - so allocate the array one larger in that axis
+        b = zeros(b.shape[:-2] + (m, n_rhs + 1), dtype=b.dtype)
+    x, resids, rank, s = gufunc(a, b, rcond, signature=signature, extobj=extobj)
+    if m == 0:
+        x[...] = 0
+    if n_rhs == 0:
+        # remove the item we added
+        x = x[..., :n_rhs]
+        resids = resids[..., :n_rhs]
+
+    # remove the axis we added
+    if is_1d:
+        x = x.squeeze(axis=-1)
+        # we probably should squeeze resids too, but we can't
+        # without breaking compatibility.
+
+    # as documented
+    if rank != n or m <= n:
+        resids = array([], result_real_t)
+
+    # coerce output arrays
+    s = s.astype(result_real_t, copy=False)
+    resids = resids.astype(result_real_t, copy=False)
+    x = x.astype(result_t, copy=True)  # Copying lets the memory in r_parts be freed
+    return wrap(x), wrap(resids), rank, s
+
+
+def _multi_svd_norm(x, row_axis, col_axis, op):
+    """Compute a function of the singular values of the 2-D matrices in `x`.
+
+    This is a private utility function used by `numpy.linalg.norm()`.
+
+    Parameters
+    ----------
+    x : ndarray
+    row_axis, col_axis : int
+        The axes of `x` that hold the 2-D matrices.
+    op : callable
+        This should be either numpy.amin or `numpy.amax` or `numpy.sum`.
+
+    Returns
+    -------
+    result : float or ndarray
+        If `x` is 2-D, the return values is a float.
+        Otherwise, it is an array with ``x.ndim - 2`` dimensions.
+        The return values are either the minimum or maximum or sum of the
+        singular values of the matrices, depending on whether `op`
+        is `numpy.amin` or `numpy.amax` or `numpy.sum`.
+
+    """
+    y = moveaxis(x, (row_axis, col_axis), (-2, -1))
+    result = op(svd(y, compute_uv=False), axis=-1)
+    return result
+
+
+def _norm_dispatcher(x, ord=None, axis=None, keepdims=None):
+    return (x,)
+
+
+@array_function_dispatch(_norm_dispatcher)
+def norm(x, ord=None, axis=None, keepdims=False):
+    """
+    Matrix or vector norm.
+
+    This function is able to return one of eight different matrix norms,
+    or one of an infinite number of vector norms (described below), depending
+    on the value of the ``ord`` parameter.
+
+    Parameters
+    ----------
+    x : array_like
+        Input array.  If `axis` is None, `x` must be 1-D or 2-D, unless `ord`
+        is None. If both `axis` and `ord` are None, the 2-norm of
+        ``x.ravel`` will be returned.
+    ord : {non-zero int, inf, -inf, 'fro', 'nuc'}, optional
+        Order of the norm (see table under ``Notes``). inf means numpy's
+        `inf` object. The default is None.
+    axis : {None, int, 2-tuple of ints}, optional.
+        If `axis` is an integer, it specifies the axis of `x` along which to
+        compute the vector norms.  If `axis` is a 2-tuple, it specifies the
+        axes that hold 2-D matrices, and the matrix norms of these matrices
+        are computed.  If `axis` is None then either a vector norm (when `x`
+        is 1-D) or a matrix norm (when `x` is 2-D) is returned. The default
+        is None.
+
+        .. versionadded:: 1.8.0
+
+    keepdims : bool, optional
+        If this is set to True, the axes which are normed over are left in the
+        result as dimensions with size one.  With this option the result will
+        broadcast correctly against the original `x`.
+
+        .. versionadded:: 1.10.0
+
+    Returns
+    -------
+    n : float or ndarray
+        Norm of the matrix or vector(s).
+
+    See Also
+    --------
+    scipy.linalg.norm : Similar function in SciPy.
+
+    Notes
+    -----
+    For values of ``ord < 1``, the result is, strictly speaking, not a
+    mathematical 'norm', but it may still be useful for various numerical
+    purposes.
+
+    The following norms can be calculated:
+
+    =====  ============================  ==========================
+    ord    norm for matrices             norm for vectors
+    =====  ============================  ==========================
+    None   Frobenius norm                2-norm
+    'fro'  Frobenius norm                --
+    'nuc'  nuclear norm                  --
+    inf    max(sum(abs(x), axis=1))      max(abs(x))
+    -inf   min(sum(abs(x), axis=1))      min(abs(x))
+    0      --                            sum(x != 0)
+    1      max(sum(abs(x), axis=0))      as below
+    -1     min(sum(abs(x), axis=0))      as below
+    2      2-norm (largest sing. value)  as below
+    -2     smallest singular value       as below
+    other  --                            sum(abs(x)**ord)**(1./ord)
+    =====  ============================  ==========================
+
+    The Frobenius norm is given by [1]_:
+
+        :math:`||A||_F = [\\sum_{i,j} abs(a_{i,j})^2]^{1/2}`
+
+    The nuclear norm is the sum of the singular values.
+
+    Both the Frobenius and nuclear norm orders are only defined for
+    matrices and raise a ValueError when ``x.ndim != 2``.
+
+    References
+    ----------
+    .. [1] G. H. Golub and C. F. Van Loan, *Matrix Computations*,
+           Baltimore, MD, Johns Hopkins University Press, 1985, pg. 15
+
+    Examples
+    --------
+    >>> from numpy import linalg as LA
+    >>> a = np.arange(9) - 4
+    >>> a
+    array([-4, -3, -2, ...,  2,  3,  4])
+    >>> b = a.reshape((3, 3))
+    >>> b
+    array([[-4, -3, -2],
+           [-1,  0,  1],
+           [ 2,  3,  4]])
+
+    >>> LA.norm(a)
+    7.745966692414834
+    >>> LA.norm(b)
+    7.745966692414834
+    >>> LA.norm(b, 'fro')
+    7.745966692414834
+    >>> LA.norm(a, np.inf)
+    4.0
+    >>> LA.norm(b, np.inf)
+    9.0
+    >>> LA.norm(a, -np.inf)
+    0.0
+    >>> LA.norm(b, -np.inf)
+    2.0
+
+    >>> LA.norm(a, 1)
+    20.0
+    >>> LA.norm(b, 1)
+    7.0
+    >>> LA.norm(a, -1)
+    -4.6566128774142013e-010
+    >>> LA.norm(b, -1)
+    6.0
+    >>> LA.norm(a, 2)
+    7.745966692414834
+    >>> LA.norm(b, 2)
+    7.3484692283495345
+
+    >>> LA.norm(a, -2)
+    0.0
+    >>> LA.norm(b, -2)
+    1.8570331885190563e-016 # may vary
+    >>> LA.norm(a, 3)
+    5.8480354764257312 # may vary
+    >>> LA.norm(a, -3)
+    0.0
+
+    Using the `axis` argument to compute vector norms:
+
+    >>> c = np.array([[ 1, 2, 3],
+    ...               [-1, 1, 4]])
+    >>> LA.norm(c, axis=0)
+    array([ 1.41421356,  2.23606798,  5.        ])
+    >>> LA.norm(c, axis=1)
+    array([ 3.74165739,  4.24264069])
+    >>> LA.norm(c, ord=1, axis=1)
+    array([ 6.,  6.])
+
+    Using the `axis` argument to compute matrix norms:
+
+    >>> m = np.arange(8).reshape(2,2,2)
+    >>> LA.norm(m, axis=(1,2))
+    array([  3.74165739,  11.22497216])
+    >>> LA.norm(m[0, :, :]), LA.norm(m[1, :, :])
+    (3.7416573867739413, 11.224972160321824)
+
+    """
+    x = asarray(x)
+
+    if not issubclass(x.dtype.type, (inexact, object_)):
+        x = x.astype(float)
+
+    # Immediately handle some default, simple, fast, and common cases.
+    if axis is None:
+        ndim = x.ndim
+        if ((ord is None) or
+            (ord in ('f', 'fro') and ndim == 2) or
+            (ord == 2 and ndim == 1)):
+
+            x = x.ravel(order='K')
+            if isComplexType(x.dtype.type):
+                x_real = x.real
+                x_imag = x.imag
+                sqnorm = x_real.dot(x_real) + x_imag.dot(x_imag)
+            else:
+                sqnorm = x.dot(x)
+            ret = sqrt(sqnorm)
+            if keepdims:
+                ret = ret.reshape(ndim*[1])
+            return ret
+
+    # Normalize the `axis` argument to a tuple.
+    nd = x.ndim
+    if axis is None:
+        axis = tuple(range(nd))
+    elif not isinstance(axis, tuple):
+        try:
+            axis = int(axis)
+        except Exception as e:
+            raise TypeError("'axis' must be None, an integer or a tuple of integers") from e
+        axis = (axis,)
+
+    if len(axis) == 1:
+        if ord == Inf:
+            return abs(x).max(axis=axis, keepdims=keepdims)
+        elif ord == -Inf:
+            return abs(x).min(axis=axis, keepdims=keepdims)
+        elif ord == 0:
+            # Zero norm
+            return (x != 0).astype(x.real.dtype).sum(axis=axis, keepdims=keepdims)
+        elif ord == 1:
+            # special case for speedup
+            return add.reduce(abs(x), axis=axis, keepdims=keepdims)
+        elif ord is None or ord == 2:
+            # special case for speedup
+            s = (x.conj() * x).real
+            return sqrt(add.reduce(s, axis=axis, keepdims=keepdims))
+        # None of the str-type keywords for ord ('fro', 'nuc')
+        # are valid for vectors
+        elif isinstance(ord, str):
+            raise ValueError(f"Invalid norm order '{ord}' for vectors")
+        else:
+            absx = abs(x)
+            absx **= ord
+            ret = add.reduce(absx, axis=axis, keepdims=keepdims)
+            ret **= reciprocal(ord, dtype=ret.dtype)
+            return ret
+    elif len(axis) == 2:
+        row_axis, col_axis = axis
+        row_axis = normalize_axis_index(row_axis, nd)
+        col_axis = normalize_axis_index(col_axis, nd)
+        if row_axis == col_axis:
+            raise ValueError('Duplicate axes given.')
+        if ord == 2:
+            ret =  _multi_svd_norm(x, row_axis, col_axis, amax)
+        elif ord == -2:
+            ret = _multi_svd_norm(x, row_axis, col_axis, amin)
+        elif ord == 1:
+            if col_axis > row_axis:
+                col_axis -= 1
+            ret = add.reduce(abs(x), axis=row_axis).max(axis=col_axis)
+        elif ord == Inf:
+            if row_axis > col_axis:
+                row_axis -= 1
+            ret = add.reduce(abs(x), axis=col_axis).max(axis=row_axis)
+        elif ord == -1:
+            if col_axis > row_axis:
+                col_axis -= 1
+            ret = add.reduce(abs(x), axis=row_axis).min(axis=col_axis)
+        elif ord == -Inf:
+            if row_axis > col_axis:
+                row_axis -= 1
+            ret = add.reduce(abs(x), axis=col_axis).min(axis=row_axis)
+        elif ord in [None, 'fro', 'f']:
+            ret = sqrt(add.reduce((x.conj() * x).real, axis=axis))
+        elif ord == 'nuc':
+            ret = _multi_svd_norm(x, row_axis, col_axis, sum)
+        else:
+            raise ValueError("Invalid norm order for matrices.")
+        if keepdims:
+            ret_shape = list(x.shape)
+            ret_shape[axis[0]] = 1
+            ret_shape[axis[1]] = 1
+            ret = ret.reshape(ret_shape)
+        return ret
+    else:
+        raise ValueError("Improper number of dimensions to norm.")
+
+
+# multi_dot
+
+def _multidot_dispatcher(arrays, *, out=None):
+    yield from arrays
+    yield out
+
+
+@array_function_dispatch(_multidot_dispatcher)
+def multi_dot(arrays, *, out=None):
+    """
+    Compute the dot product of two or more arrays in a single function call,
+    while automatically selecting the fastest evaluation order.
+
+    `multi_dot` chains `numpy.dot` and uses optimal parenthesization
+    of the matrices [1]_ [2]_. Depending on the shapes of the matrices,
+    this can speed up the multiplication a lot.
+
+    If the first argument is 1-D it is treated as a row vector.
+    If the last argument is 1-D it is treated as a column vector.
+    The other arguments must be 2-D.
+
+    Think of `multi_dot` as::
+
+        def multi_dot(arrays): return functools.reduce(np.dot, arrays)
+
+
+    Parameters
+    ----------
+    arrays : sequence of array_like
+        If the first argument is 1-D it is treated as row vector.
+        If the last argument is 1-D it is treated as column vector.
+        The other arguments must be 2-D.
+    out : ndarray, optional
+        Output argument. This must have the exact kind that would be returned
+        if it was not used. In particular, it must have the right type, must be
+        C-contiguous, and its dtype must be the dtype that would be returned
+        for `dot(a, b)`. This is a performance feature. Therefore, if these
+        conditions are not met, an exception is raised, instead of attempting
+        to be flexible.
+
+        .. versionadded:: 1.19.0
+
+    Returns
+    -------
+    output : ndarray
+        Returns the dot product of the supplied arrays.
+
+    See Also
+    --------
+    numpy.dot : dot multiplication with two arguments.
+
+    References
+    ----------
+
+    .. [1] Cormen, "Introduction to Algorithms", Chapter 15.2, p. 370-378
+    .. [2] https://en.wikipedia.org/wiki/Matrix_chain_multiplication
+
+    Examples
+    --------
+    `multi_dot` allows you to write::
+
+    >>> from numpy.linalg import multi_dot
+    >>> # Prepare some data
+    >>> A = np.random.random((10000, 100))
+    >>> B = np.random.random((100, 1000))
+    >>> C = np.random.random((1000, 5))
+    >>> D = np.random.random((5, 333))
+    >>> # the actual dot multiplication
+    >>> _ = multi_dot([A, B, C, D])
+
+    instead of::
+
+    >>> _ = np.dot(np.dot(np.dot(A, B), C), D)
+    >>> # or
+    >>> _ = A.dot(B).dot(C).dot(D)
+
+    Notes
+    -----
+    The cost for a matrix multiplication can be calculated with the
+    following function::
+
+        def cost(A, B):
+            return A.shape[0] * A.shape[1] * B.shape[1]
+
+    Assume we have three matrices
+    :math:`A_{10x100}, B_{100x5}, C_{5x50}`.
+
+    The costs for the two different parenthesizations are as follows::
+
+        cost((AB)C) = 10*100*5 + 10*5*50   = 5000 + 2500   = 7500
+        cost(A(BC)) = 10*100*50 + 100*5*50 = 50000 + 25000 = 75000
+
+    """
+    n = len(arrays)
+    # optimization only makes sense for len(arrays) > 2
+    if n < 2:
+        raise ValueError("Expecting at least two arrays.")
+    elif n == 2:
+        return dot(arrays[0], arrays[1], out=out)
+
+    arrays = [asanyarray(a) for a in arrays]
+
+    # save original ndim to reshape the result array into the proper form later
+    ndim_first, ndim_last = arrays[0].ndim, arrays[-1].ndim
+    # Explicitly convert vectors to 2D arrays to keep the logic of the internal
+    # _multi_dot_* functions as simple as possible.
+    if arrays[0].ndim == 1:
+        arrays[0] = atleast_2d(arrays[0])
+    if arrays[-1].ndim == 1:
+        arrays[-1] = atleast_2d(arrays[-1]).T
+    _assert_2d(*arrays)
+
+    # _multi_dot_three is much faster than _multi_dot_matrix_chain_order
+    if n == 3:
+        result = _multi_dot_three(arrays[0], arrays[1], arrays[2], out=out)
+    else:
+        order = _multi_dot_matrix_chain_order(arrays)
+        result = _multi_dot(arrays, order, 0, n - 1, out=out)
+
+    # return proper shape
+    if ndim_first == 1 and ndim_last == 1:
+        return result[0, 0]  # scalar
+    elif ndim_first == 1 or ndim_last == 1:
+        return result.ravel()  # 1-D
+    else:
+        return result
+
+
+def _multi_dot_three(A, B, C, out=None):
+    """
+    Find the best order for three arrays and do the multiplication.
+
+    For three arguments `_multi_dot_three` is approximately 15 times faster
+    than `_multi_dot_matrix_chain_order`
+
+    """
+    a0, a1b0 = A.shape
+    b1c0, c1 = C.shape
+    # cost1 = cost((AB)C) = a0*a1b0*b1c0 + a0*b1c0*c1
+    cost1 = a0 * b1c0 * (a1b0 + c1)
+    # cost2 = cost(A(BC)) = a1b0*b1c0*c1 + a0*a1b0*c1
+    cost2 = a1b0 * c1 * (a0 + b1c0)
+
+    if cost1 < cost2:
+        return dot(dot(A, B), C, out=out)
+    else:
+        return dot(A, dot(B, C), out=out)
+
+
+def _multi_dot_matrix_chain_order(arrays, return_costs=False):
+    """
+    Return a np.array that encodes the optimal order of mutiplications.
+
+    The optimal order array is then used by `_multi_dot()` to do the
+    multiplication.
+
+    Also return the cost matrix if `return_costs` is `True`
+
+    The implementation CLOSELY follows Cormen, "Introduction to Algorithms",
+    Chapter 15.2, p. 370-378.  Note that Cormen uses 1-based indices.
+
+        cost[i, j] = min([
+            cost[prefix] + cost[suffix] + cost_mult(prefix, suffix)
+            for k in range(i, j)])
+
+    """
+    n = len(arrays)
+    # p stores the dimensions of the matrices
+    # Example for p: A_{10x100}, B_{100x5}, C_{5x50} --> p = [10, 100, 5, 50]
+    p = [a.shape[0] for a in arrays] + [arrays[-1].shape[1]]
+    # m is a matrix of costs of the subproblems
+    # m[i,j]: min number of scalar multiplications needed to compute A_{i..j}
+    m = zeros((n, n), dtype=double)
+    # s is the actual ordering
+    # s[i, j] is the value of k at which we split the product A_i..A_j
+    s = empty((n, n), dtype=intp)
+
+    for l in range(1, n):
+        for i in range(n - l):
+            j = i + l
+            m[i, j] = Inf
+            for k in range(i, j):
+                q = m[i, k] + m[k+1, j] + p[i]*p[k+1]*p[j+1]
+                if q < m[i, j]:
+                    m[i, j] = q
+                    s[i, j] = k  # Note that Cormen uses 1-based index
+
+    return (s, m) if return_costs else s
+
+
+def _multi_dot(arrays, order, i, j, out=None):
+    """Actually do the multiplication with the given order."""
+    if i == j:
+        # the initial call with non-None out should never get here
+        assert out is None
+
+        return arrays[i]
+    else:
+        return dot(_multi_dot(arrays, order, i, order[i, j]),
+                   _multi_dot(arrays, order, order[i, j] + 1, j),
+                   out=out)
diff --git a/lib/python3.12/site-packages/numpy/linalg/linalg.pyi b/lib/python3.12/site-packages/numpy/linalg/linalg.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..c0b2f29b28d9528556151bb0139e671c5ecbb4c4
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/linalg/linalg.pyi
@@ -0,0 +1,297 @@
+from collections.abc import Iterable
+from typing import (
+    Literal as L,
+    overload,
+    TypeVar,
+    Any,
+    SupportsIndex,
+    SupportsInt,
+    NamedTuple,
+    Generic,
+)
+
+from numpy import (
+    generic,
+    floating,
+    complexfloating,
+    int32,
+    float64,
+    complex128,
+)
+
+from numpy.linalg import LinAlgError as LinAlgError
+
+from numpy._typing import (
+    NDArray,
+    ArrayLike,
+    _ArrayLikeInt_co,
+    _ArrayLikeFloat_co,
+    _ArrayLikeComplex_co,
+    _ArrayLikeTD64_co,
+    _ArrayLikeObject_co,
+)
+
+_T = TypeVar("_T")
+_ArrayType = TypeVar("_ArrayType", bound=NDArray[Any])
+_SCT = TypeVar("_SCT", bound=generic, covariant=True)
+_SCT2 = TypeVar("_SCT2", bound=generic, covariant=True)
+
+_2Tuple = tuple[_T, _T]
+_ModeKind = L["reduced", "complete", "r", "raw"]
+
+__all__: list[str]
+
+class EigResult(NamedTuple):
+    eigenvalues: NDArray[Any]
+    eigenvectors: NDArray[Any]
+
+class EighResult(NamedTuple):
+    eigenvalues: NDArray[Any]
+    eigenvectors: NDArray[Any]
+
+class QRResult(NamedTuple):
+    Q: NDArray[Any]
+    R: NDArray[Any]
+
+class SlogdetResult(NamedTuple):
+    # TODO: `sign` and `logabsdet` are scalars for input 2D arrays and
+    # a `(x.ndim - 2)`` dimensionl arrays otherwise
+    sign: Any
+    logabsdet: Any
+
+class SVDResult(NamedTuple):
+    U: NDArray[Any]
+    S: NDArray[Any]
+    Vh: NDArray[Any]
+
+@overload
+def tensorsolve(
+    a: _ArrayLikeInt_co,
+    b: _ArrayLikeInt_co,
+    axes: None | Iterable[int] =...,
+) -> NDArray[float64]: ...
+@overload
+def tensorsolve(
+    a: _ArrayLikeFloat_co,
+    b: _ArrayLikeFloat_co,
+    axes: None | Iterable[int] =...,
+) -> NDArray[floating[Any]]: ...
+@overload
+def tensorsolve(
+    a: _ArrayLikeComplex_co,
+    b: _ArrayLikeComplex_co,
+    axes: None | Iterable[int] =...,
+) -> NDArray[complexfloating[Any, Any]]: ...
+
+@overload
+def solve(
+    a: _ArrayLikeInt_co,
+    b: _ArrayLikeInt_co,
+) -> NDArray[float64]: ...
+@overload
+def solve(
+    a: _ArrayLikeFloat_co,
+    b: _ArrayLikeFloat_co,
+) -> NDArray[floating[Any]]: ...
+@overload
+def solve(
+    a: _ArrayLikeComplex_co,
+    b: _ArrayLikeComplex_co,
+) -> NDArray[complexfloating[Any, Any]]: ...
+
+@overload
+def tensorinv(
+    a: _ArrayLikeInt_co,
+    ind: int = ...,
+) -> NDArray[float64]: ...
+@overload
+def tensorinv(
+    a: _ArrayLikeFloat_co,
+    ind: int = ...,
+) -> NDArray[floating[Any]]: ...
+@overload
+def tensorinv(
+    a: _ArrayLikeComplex_co,
+    ind: int = ...,
+) -> NDArray[complexfloating[Any, Any]]: ...
+
+@overload
+def inv(a: _ArrayLikeInt_co) -> NDArray[float64]: ...
+@overload
+def inv(a: _ArrayLikeFloat_co) -> NDArray[floating[Any]]: ...
+@overload
+def inv(a: _ArrayLikeComplex_co) -> NDArray[complexfloating[Any, Any]]: ...
+
+# TODO: The supported input and output dtypes are dependent on the value of `n`.
+# For example: `n < 0` always casts integer types to float64
+def matrix_power(
+    a: _ArrayLikeComplex_co | _ArrayLikeObject_co,
+    n: SupportsIndex,
+) -> NDArray[Any]: ...
+
+@overload
+def cholesky(a: _ArrayLikeInt_co) -> NDArray[float64]: ...
+@overload
+def cholesky(a: _ArrayLikeFloat_co) -> NDArray[floating[Any]]: ...
+@overload
+def cholesky(a: _ArrayLikeComplex_co) -> NDArray[complexfloating[Any, Any]]: ...
+
+@overload
+def qr(a: _ArrayLikeInt_co, mode: _ModeKind = ...) -> QRResult: ...
+@overload
+def qr(a: _ArrayLikeFloat_co, mode: _ModeKind = ...) -> QRResult: ...
+@overload
+def qr(a: _ArrayLikeComplex_co, mode: _ModeKind = ...) -> QRResult: ...
+
+@overload
+def eigvals(a: _ArrayLikeInt_co) -> NDArray[float64] | NDArray[complex128]: ...
+@overload
+def eigvals(a: _ArrayLikeFloat_co) -> NDArray[floating[Any]] | NDArray[complexfloating[Any, Any]]: ...
+@overload
+def eigvals(a: _ArrayLikeComplex_co) -> NDArray[complexfloating[Any, Any]]: ...
+
+@overload
+def eigvalsh(a: _ArrayLikeInt_co, UPLO: L["L", "U", "l", "u"] = ...) -> NDArray[float64]: ...
+@overload
+def eigvalsh(a: _ArrayLikeComplex_co, UPLO: L["L", "U", "l", "u"] = ...) -> NDArray[floating[Any]]: ...
+
+@overload
+def eig(a: _ArrayLikeInt_co) -> EigResult: ...
+@overload
+def eig(a: _ArrayLikeFloat_co) -> EigResult: ...
+@overload
+def eig(a: _ArrayLikeComplex_co) -> EigResult: ...
+
+@overload
+def eigh(
+    a: _ArrayLikeInt_co,
+    UPLO: L["L", "U", "l", "u"] = ...,
+) -> EighResult: ...
+@overload
+def eigh(
+    a: _ArrayLikeFloat_co,
+    UPLO: L["L", "U", "l", "u"] = ...,
+) -> EighResult: ...
+@overload
+def eigh(
+    a: _ArrayLikeComplex_co,
+    UPLO: L["L", "U", "l", "u"] = ...,
+) -> EighResult: ...
+
+@overload
+def svd(
+    a: _ArrayLikeInt_co,
+    full_matrices: bool = ...,
+    compute_uv: L[True] = ...,
+    hermitian: bool = ...,
+) -> SVDResult: ...
+@overload
+def svd(
+    a: _ArrayLikeFloat_co,
+    full_matrices: bool = ...,
+    compute_uv: L[True] = ...,
+    hermitian: bool = ...,
+) -> SVDResult: ...
+@overload
+def svd(
+    a: _ArrayLikeComplex_co,
+    full_matrices: bool = ...,
+    compute_uv: L[True] = ...,
+    hermitian: bool = ...,
+) -> SVDResult: ...
+@overload
+def svd(
+    a: _ArrayLikeInt_co,
+    full_matrices: bool = ...,
+    compute_uv: L[False] = ...,
+    hermitian: bool = ...,
+) -> NDArray[float64]: ...
+@overload
+def svd(
+    a: _ArrayLikeComplex_co,
+    full_matrices: bool = ...,
+    compute_uv: L[False] = ...,
+    hermitian: bool = ...,
+) -> NDArray[floating[Any]]: ...
+
+# TODO: Returns a scalar for 2D arrays and
+# a `(x.ndim - 2)`` dimensionl array otherwise
+def cond(x: _ArrayLikeComplex_co, p: None | float | L["fro", "nuc"] = ...) -> Any: ...
+
+# TODO: Returns `int` for <2D arrays and `intp` otherwise
+def matrix_rank(
+    A: _ArrayLikeComplex_co,
+    tol: None | _ArrayLikeFloat_co = ...,
+    hermitian: bool = ...,
+) -> Any: ...
+
+@overload
+def pinv(
+    a: _ArrayLikeInt_co,
+    rcond: _ArrayLikeFloat_co = ...,
+    hermitian: bool = ...,
+) -> NDArray[float64]: ...
+@overload
+def pinv(
+    a: _ArrayLikeFloat_co,
+    rcond: _ArrayLikeFloat_co = ...,
+    hermitian: bool = ...,
+) -> NDArray[floating[Any]]: ...
+@overload
+def pinv(
+    a: _ArrayLikeComplex_co,
+    rcond: _ArrayLikeFloat_co = ...,
+    hermitian: bool = ...,
+) -> NDArray[complexfloating[Any, Any]]: ...
+
+# TODO: Returns a 2-tuple of scalars for 2D arrays and
+# a 2-tuple of `(a.ndim - 2)`` dimensionl arrays otherwise
+def slogdet(a: _ArrayLikeComplex_co) -> SlogdetResult: ...
+
+# TODO: Returns a 2-tuple of scalars for 2D arrays and
+# a 2-tuple of `(a.ndim - 2)`` dimensionl arrays otherwise
+def det(a: _ArrayLikeComplex_co) -> Any: ...
+
+@overload
+def lstsq(a: _ArrayLikeInt_co, b: _ArrayLikeInt_co, rcond: None | float = ...) -> tuple[
+    NDArray[float64],
+    NDArray[float64],
+    int32,
+    NDArray[float64],
+]: ...
+@overload
+def lstsq(a: _ArrayLikeFloat_co, b: _ArrayLikeFloat_co, rcond: None | float = ...) -> tuple[
+    NDArray[floating[Any]],
+    NDArray[floating[Any]],
+    int32,
+    NDArray[floating[Any]],
+]: ...
+@overload
+def lstsq(a: _ArrayLikeComplex_co, b: _ArrayLikeComplex_co, rcond: None | float = ...) -> tuple[
+    NDArray[complexfloating[Any, Any]],
+    NDArray[floating[Any]],
+    int32,
+    NDArray[floating[Any]],
+]: ...
+
+@overload
+def norm(
+    x: ArrayLike,
+    ord: None | float | L["fro", "nuc"] = ...,
+    axis: None = ...,
+    keepdims: bool = ...,
+) -> floating[Any]: ...
+@overload
+def norm(
+    x: ArrayLike,
+    ord: None | float | L["fro", "nuc"] = ...,
+    axis: SupportsInt | SupportsIndex | tuple[int, ...] = ...,
+    keepdims: bool = ...,
+) -> Any: ...
+
+# TODO: Returns a scalar or array
+def multi_dot(
+    arrays: Iterable[_ArrayLikeComplex_co | _ArrayLikeObject_co | _ArrayLikeTD64_co],
+    *,
+    out: None | NDArray[Any] = ...,
+) -> Any: ...
diff --git a/lib/python3.12/site-packages/numpy/linalg/tests/__init__.py b/lib/python3.12/site-packages/numpy/linalg/tests/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/lib/python3.12/site-packages/numpy/linalg/tests/__pycache__/__init__.cpython-312.pyc b/lib/python3.12/site-packages/numpy/linalg/tests/__pycache__/__init__.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..dbc92f50f6cae142fbd568d49414e603dd6be219
Binary files /dev/null and b/lib/python3.12/site-packages/numpy/linalg/tests/__pycache__/__init__.cpython-312.pyc differ
diff --git a/lib/python3.12/site-packages/numpy/linalg/tests/__pycache__/test_deprecations.cpython-312.pyc b/lib/python3.12/site-packages/numpy/linalg/tests/__pycache__/test_deprecations.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..2d1d29e65207c49833eb1e9f6e9ed84bb5b165e9
Binary files /dev/null and b/lib/python3.12/site-packages/numpy/linalg/tests/__pycache__/test_deprecations.cpython-312.pyc differ
diff --git a/lib/python3.12/site-packages/numpy/linalg/tests/__pycache__/test_regression.cpython-312.pyc b/lib/python3.12/site-packages/numpy/linalg/tests/__pycache__/test_regression.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..1bede829bdc43da87ebbb30cd8e751480f702ef4
Binary files /dev/null and b/lib/python3.12/site-packages/numpy/linalg/tests/__pycache__/test_regression.cpython-312.pyc differ
diff --git a/lib/python3.12/site-packages/numpy/linalg/tests/test_deprecations.py b/lib/python3.12/site-packages/numpy/linalg/tests/test_deprecations.py
new file mode 100644
index 0000000000000000000000000000000000000000..cd4c10832e7e7240175571605a07541f0c188f89
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/linalg/tests/test_deprecations.py
@@ -0,0 +1,20 @@
+"""Test deprecation and future warnings.
+
+"""
+import numpy as np
+from numpy.testing import assert_warns
+
+
+def test_qr_mode_full_future_warning():
+    """Check mode='full' FutureWarning.
+
+    In numpy 1.8 the mode options 'full' and 'economic' in linalg.qr were
+    deprecated. The release date will probably be sometime in the summer
+    of 2013.
+
+    """
+    a = np.eye(2)
+    assert_warns(DeprecationWarning, np.linalg.qr, a, mode='full')
+    assert_warns(DeprecationWarning, np.linalg.qr, a, mode='f')
+    assert_warns(DeprecationWarning, np.linalg.qr, a, mode='economic')
+    assert_warns(DeprecationWarning, np.linalg.qr, a, mode='e')
diff --git a/lib/python3.12/site-packages/numpy/linalg/tests/test_linalg.py b/lib/python3.12/site-packages/numpy/linalg/tests/test_linalg.py
new file mode 100644
index 0000000000000000000000000000000000000000..5dabdfdf010a336741a1f89af101b36c4f62f5ab
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/linalg/tests/test_linalg.py
@@ -0,0 +1,2198 @@
+""" Test functions for linalg module
+
+"""
+import os
+import sys
+import itertools
+import traceback
+import textwrap
+import subprocess
+import pytest
+
+import numpy as np
+from numpy import array, single, double, csingle, cdouble, dot, identity, matmul
+from numpy.core import swapaxes
+from numpy import multiply, atleast_2d, inf, asarray
+from numpy import linalg
+from numpy.linalg import matrix_power, norm, matrix_rank, multi_dot, LinAlgError
+from numpy.linalg.linalg import _multi_dot_matrix_chain_order
+from numpy.testing import (
+    assert_, assert_equal, assert_raises, assert_array_equal,
+    assert_almost_equal, assert_allclose, suppress_warnings,
+    assert_raises_regex, HAS_LAPACK64, IS_WASM
+    )
+try:
+    import numpy.linalg.lapack_lite
+except ImportError:
+    # May be broken when numpy was built without BLAS/LAPACK present
+    # If so, ensure we don't break the whole test suite - the `lapack_lite`
+    # submodule should be removed, it's only used in two tests in this file.
+    pass
+
+
+def consistent_subclass(out, in_):
+    # For ndarray subclass input, our output should have the same subclass
+    # (non-ndarray input gets converted to ndarray).
+    return type(out) is (type(in_) if isinstance(in_, np.ndarray)
+                         else np.ndarray)
+
+
+old_assert_almost_equal = assert_almost_equal
+
+
+def assert_almost_equal(a, b, single_decimal=6, double_decimal=12, **kw):
+    if asarray(a).dtype.type in (single, csingle):
+        decimal = single_decimal
+    else:
+        decimal = double_decimal
+    old_assert_almost_equal(a, b, decimal=decimal, **kw)
+
+
+def get_real_dtype(dtype):
+    return {single: single, double: double,
+            csingle: single, cdouble: double}[dtype]
+
+
+def get_complex_dtype(dtype):
+    return {single: csingle, double: cdouble,
+            csingle: csingle, cdouble: cdouble}[dtype]
+
+
+def get_rtol(dtype):
+    # Choose a safe rtol
+    if dtype in (single, csingle):
+        return 1e-5
+    else:
+        return 1e-11
+
+
+# used to categorize tests
+all_tags = {
+  'square', 'nonsquare', 'hermitian',  # mutually exclusive
+  'generalized', 'size-0', 'strided' # optional additions
+}
+
+
+class LinalgCase:
+    def __init__(self, name, a, b, tags=set()):
+        """
+        A bundle of arguments to be passed to a test case, with an identifying
+        name, the operands a and b, and a set of tags to filter the tests
+        """
+        assert_(isinstance(name, str))
+        self.name = name
+        self.a = a
+        self.b = b
+        self.tags = frozenset(tags)  # prevent shared tags
+
+    def check(self, do):
+        """
+        Run the function `do` on this test case, expanding arguments
+        """
+        do(self.a, self.b, tags=self.tags)
+
+    def __repr__(self):
+        return f''
+
+
+def apply_tag(tag, cases):
+    """
+    Add the given tag (a string) to each of the cases (a list of LinalgCase
+    objects)
+    """
+    assert tag in all_tags, "Invalid tag"
+    for case in cases:
+        case.tags = case.tags | {tag}
+    return cases
+
+
+#
+# Base test cases
+#
+
+np.random.seed(1234)
+
+CASES = []
+
+# square test cases
+CASES += apply_tag('square', [
+    LinalgCase("single",
+               array([[1., 2.], [3., 4.]], dtype=single),
+               array([2., 1.], dtype=single)),
+    LinalgCase("double",
+               array([[1., 2.], [3., 4.]], dtype=double),
+               array([2., 1.], dtype=double)),
+    LinalgCase("double_2",
+               array([[1., 2.], [3., 4.]], dtype=double),
+               array([[2., 1., 4.], [3., 4., 6.]], dtype=double)),
+    LinalgCase("csingle",
+               array([[1. + 2j, 2 + 3j], [3 + 4j, 4 + 5j]], dtype=csingle),
+               array([2. + 1j, 1. + 2j], dtype=csingle)),
+    LinalgCase("cdouble",
+               array([[1. + 2j, 2 + 3j], [3 + 4j, 4 + 5j]], dtype=cdouble),
+               array([2. + 1j, 1. + 2j], dtype=cdouble)),
+    LinalgCase("cdouble_2",
+               array([[1. + 2j, 2 + 3j], [3 + 4j, 4 + 5j]], dtype=cdouble),
+               array([[2. + 1j, 1. + 2j, 1 + 3j], [1 - 2j, 1 - 3j, 1 - 6j]], dtype=cdouble)),
+    LinalgCase("0x0",
+               np.empty((0, 0), dtype=double),
+               np.empty((0,), dtype=double),
+               tags={'size-0'}),
+    LinalgCase("8x8",
+               np.random.rand(8, 8),
+               np.random.rand(8)),
+    LinalgCase("1x1",
+               np.random.rand(1, 1),
+               np.random.rand(1)),
+    LinalgCase("nonarray",
+               [[1, 2], [3, 4]],
+               [2, 1]),
+])
+
+# non-square test-cases
+CASES += apply_tag('nonsquare', [
+    LinalgCase("single_nsq_1",
+               array([[1., 2., 3.], [3., 4., 6.]], dtype=single),
+               array([2., 1.], dtype=single)),
+    LinalgCase("single_nsq_2",
+               array([[1., 2.], [3., 4.], [5., 6.]], dtype=single),
+               array([2., 1., 3.], dtype=single)),
+    LinalgCase("double_nsq_1",
+               array([[1., 2., 3.], [3., 4., 6.]], dtype=double),
+               array([2., 1.], dtype=double)),
+    LinalgCase("double_nsq_2",
+               array([[1., 2.], [3., 4.], [5., 6.]], dtype=double),
+               array([2., 1., 3.], dtype=double)),
+    LinalgCase("csingle_nsq_1",
+               array(
+                   [[1. + 1j, 2. + 2j, 3. - 3j], [3. - 5j, 4. + 9j, 6. + 2j]], dtype=csingle),
+               array([2. + 1j, 1. + 2j], dtype=csingle)),
+    LinalgCase("csingle_nsq_2",
+               array(
+                   [[1. + 1j, 2. + 2j], [3. - 3j, 4. - 9j], [5. - 4j, 6. + 8j]], dtype=csingle),
+               array([2. + 1j, 1. + 2j, 3. - 3j], dtype=csingle)),
+    LinalgCase("cdouble_nsq_1",
+               array(
+                   [[1. + 1j, 2. + 2j, 3. - 3j], [3. - 5j, 4. + 9j, 6. + 2j]], dtype=cdouble),
+               array([2. + 1j, 1. + 2j], dtype=cdouble)),
+    LinalgCase("cdouble_nsq_2",
+               array(
+                   [[1. + 1j, 2. + 2j], [3. - 3j, 4. - 9j], [5. - 4j, 6. + 8j]], dtype=cdouble),
+               array([2. + 1j, 1. + 2j, 3. - 3j], dtype=cdouble)),
+    LinalgCase("cdouble_nsq_1_2",
+               array(
+                   [[1. + 1j, 2. + 2j, 3. - 3j], [3. - 5j, 4. + 9j, 6. + 2j]], dtype=cdouble),
+               array([[2. + 1j, 1. + 2j], [1 - 1j, 2 - 2j]], dtype=cdouble)),
+    LinalgCase("cdouble_nsq_2_2",
+               array(
+                   [[1. + 1j, 2. + 2j], [3. - 3j, 4. - 9j], [5. - 4j, 6. + 8j]], dtype=cdouble),
+               array([[2. + 1j, 1. + 2j], [1 - 1j, 2 - 2j], [1 - 1j, 2 - 2j]], dtype=cdouble)),
+    LinalgCase("8x11",
+               np.random.rand(8, 11),
+               np.random.rand(8)),
+    LinalgCase("1x5",
+               np.random.rand(1, 5),
+               np.random.rand(1)),
+    LinalgCase("5x1",
+               np.random.rand(5, 1),
+               np.random.rand(5)),
+    LinalgCase("0x4",
+               np.random.rand(0, 4),
+               np.random.rand(0),
+               tags={'size-0'}),
+    LinalgCase("4x0",
+               np.random.rand(4, 0),
+               np.random.rand(4),
+               tags={'size-0'}),
+])
+
+# hermitian test-cases
+CASES += apply_tag('hermitian', [
+    LinalgCase("hsingle",
+               array([[1., 2.], [2., 1.]], dtype=single),
+               None),
+    LinalgCase("hdouble",
+               array([[1., 2.], [2., 1.]], dtype=double),
+               None),
+    LinalgCase("hcsingle",
+               array([[1., 2 + 3j], [2 - 3j, 1]], dtype=csingle),
+               None),
+    LinalgCase("hcdouble",
+               array([[1., 2 + 3j], [2 - 3j, 1]], dtype=cdouble),
+               None),
+    LinalgCase("hempty",
+               np.empty((0, 0), dtype=double),
+               None,
+               tags={'size-0'}),
+    LinalgCase("hnonarray",
+               [[1, 2], [2, 1]],
+               None),
+    LinalgCase("matrix_b_only",
+               array([[1., 2.], [2., 1.]]),
+               None),
+    LinalgCase("hmatrix_1x1",
+               np.random.rand(1, 1),
+               None),
+])
+
+
+#
+# Gufunc test cases
+#
+def _make_generalized_cases():
+    new_cases = []
+
+    for case in CASES:
+        if not isinstance(case.a, np.ndarray):
+            continue
+
+        a = np.array([case.a, 2 * case.a, 3 * case.a])
+        if case.b is None:
+            b = None
+        else:
+            b = np.array([case.b, 7 * case.b, 6 * case.b])
+        new_case = LinalgCase(case.name + "_tile3", a, b,
+                              tags=case.tags | {'generalized'})
+        new_cases.append(new_case)
+
+        a = np.array([case.a] * 2 * 3).reshape((3, 2) + case.a.shape)
+        if case.b is None:
+            b = None
+        else:
+            b = np.array([case.b] * 2 * 3).reshape((3, 2) + case.b.shape)
+        new_case = LinalgCase(case.name + "_tile213", a, b,
+                              tags=case.tags | {'generalized'})
+        new_cases.append(new_case)
+
+    return new_cases
+
+
+CASES += _make_generalized_cases()
+
+
+#
+# Generate stride combination variations of the above
+#
+def _stride_comb_iter(x):
+    """
+    Generate cartesian product of strides for all axes
+    """
+
+    if not isinstance(x, np.ndarray):
+        yield x, "nop"
+        return
+
+    stride_set = [(1,)] * x.ndim
+    stride_set[-1] = (1, 3, -4)
+    if x.ndim > 1:
+        stride_set[-2] = (1, 3, -4)
+    if x.ndim > 2:
+        stride_set[-3] = (1, -4)
+
+    for repeats in itertools.product(*tuple(stride_set)):
+        new_shape = [abs(a * b) for a, b in zip(x.shape, repeats)]
+        slices = tuple([slice(None, None, repeat) for repeat in repeats])
+
+        # new array with different strides, but same data
+        xi = np.empty(new_shape, dtype=x.dtype)
+        xi.view(np.uint32).fill(0xdeadbeef)
+        xi = xi[slices]
+        xi[...] = x
+        xi = xi.view(x.__class__)
+        assert_(np.all(xi == x))
+        yield xi, "stride_" + "_".join(["%+d" % j for j in repeats])
+
+        # generate also zero strides if possible
+        if x.ndim >= 1 and x.shape[-1] == 1:
+            s = list(x.strides)
+            s[-1] = 0
+            xi = np.lib.stride_tricks.as_strided(x, strides=s)
+            yield xi, "stride_xxx_0"
+        if x.ndim >= 2 and x.shape[-2] == 1:
+            s = list(x.strides)
+            s[-2] = 0
+            xi = np.lib.stride_tricks.as_strided(x, strides=s)
+            yield xi, "stride_xxx_0_x"
+        if x.ndim >= 2 and x.shape[:-2] == (1, 1):
+            s = list(x.strides)
+            s[-1] = 0
+            s[-2] = 0
+            xi = np.lib.stride_tricks.as_strided(x, strides=s)
+            yield xi, "stride_xxx_0_0"
+
+
+def _make_strided_cases():
+    new_cases = []
+    for case in CASES:
+        for a, a_label in _stride_comb_iter(case.a):
+            for b, b_label in _stride_comb_iter(case.b):
+                new_case = LinalgCase(case.name + "_" + a_label + "_" + b_label, a, b,
+                                      tags=case.tags | {'strided'})
+                new_cases.append(new_case)
+    return new_cases
+
+
+CASES += _make_strided_cases()
+
+
+#
+# Test different routines against the above cases
+#
+class LinalgTestCase:
+    TEST_CASES = CASES
+
+    def check_cases(self, require=set(), exclude=set()):
+        """
+        Run func on each of the cases with all of the tags in require, and none
+        of the tags in exclude
+        """
+        for case in self.TEST_CASES:
+            # filter by require and exclude
+            if case.tags & require != require:
+                continue
+            if case.tags & exclude:
+                continue
+
+            try:
+                case.check(self.do)
+            except Exception as e:
+                msg = f'In test case: {case!r}\n\n'
+                msg += traceback.format_exc()
+                raise AssertionError(msg) from e
+
+
+class LinalgSquareTestCase(LinalgTestCase):
+
+    def test_sq_cases(self):
+        self.check_cases(require={'square'},
+                         exclude={'generalized', 'size-0'})
+
+    def test_empty_sq_cases(self):
+        self.check_cases(require={'square', 'size-0'},
+                         exclude={'generalized'})
+
+
+class LinalgNonsquareTestCase(LinalgTestCase):
+
+    def test_nonsq_cases(self):
+        self.check_cases(require={'nonsquare'},
+                         exclude={'generalized', 'size-0'})
+
+    def test_empty_nonsq_cases(self):
+        self.check_cases(require={'nonsquare', 'size-0'},
+                         exclude={'generalized'})
+
+
+class HermitianTestCase(LinalgTestCase):
+
+    def test_herm_cases(self):
+        self.check_cases(require={'hermitian'},
+                         exclude={'generalized', 'size-0'})
+
+    def test_empty_herm_cases(self):
+        self.check_cases(require={'hermitian', 'size-0'},
+                         exclude={'generalized'})
+
+
+class LinalgGeneralizedSquareTestCase(LinalgTestCase):
+
+    @pytest.mark.slow
+    def test_generalized_sq_cases(self):
+        self.check_cases(require={'generalized', 'square'},
+                         exclude={'size-0'})
+
+    @pytest.mark.slow
+    def test_generalized_empty_sq_cases(self):
+        self.check_cases(require={'generalized', 'square', 'size-0'})
+
+
+class LinalgGeneralizedNonsquareTestCase(LinalgTestCase):
+
+    @pytest.mark.slow
+    def test_generalized_nonsq_cases(self):
+        self.check_cases(require={'generalized', 'nonsquare'},
+                         exclude={'size-0'})
+
+    @pytest.mark.slow
+    def test_generalized_empty_nonsq_cases(self):
+        self.check_cases(require={'generalized', 'nonsquare', 'size-0'})
+
+
+class HermitianGeneralizedTestCase(LinalgTestCase):
+
+    @pytest.mark.slow
+    def test_generalized_herm_cases(self):
+        self.check_cases(require={'generalized', 'hermitian'},
+                         exclude={'size-0'})
+
+    @pytest.mark.slow
+    def test_generalized_empty_herm_cases(self):
+        self.check_cases(require={'generalized', 'hermitian', 'size-0'},
+                         exclude={'none'})
+
+
+def dot_generalized(a, b):
+    a = asarray(a)
+    if a.ndim >= 3:
+        if a.ndim == b.ndim:
+            # matrix x matrix
+            new_shape = a.shape[:-1] + b.shape[-1:]
+        elif a.ndim == b.ndim + 1:
+            # matrix x vector
+            new_shape = a.shape[:-1]
+        else:
+            raise ValueError("Not implemented...")
+        r = np.empty(new_shape, dtype=np.common_type(a, b))
+        for c in itertools.product(*map(range, a.shape[:-2])):
+            r[c] = dot(a[c], b[c])
+        return r
+    else:
+        return dot(a, b)
+
+
+def identity_like_generalized(a):
+    a = asarray(a)
+    if a.ndim >= 3:
+        r = np.empty(a.shape, dtype=a.dtype)
+        r[...] = identity(a.shape[-2])
+        return r
+    else:
+        return identity(a.shape[0])
+
+
+class SolveCases(LinalgSquareTestCase, LinalgGeneralizedSquareTestCase):
+    # kept apart from TestSolve for use for testing with matrices.
+    def do(self, a, b, tags):
+        x = linalg.solve(a, b)
+        assert_almost_equal(b, dot_generalized(a, x))
+        assert_(consistent_subclass(x, b))
+
+
+class TestSolve(SolveCases):
+    @pytest.mark.parametrize('dtype', [single, double, csingle, cdouble])
+    def test_types(self, dtype):
+        x = np.array([[1, 0.5], [0.5, 1]], dtype=dtype)
+        assert_equal(linalg.solve(x, x).dtype, dtype)
+
+    def test_0_size(self):
+        class ArraySubclass(np.ndarray):
+            pass
+        # Test system of 0x0 matrices
+        a = np.arange(8).reshape(2, 2, 2)
+        b = np.arange(6).reshape(1, 2, 3).view(ArraySubclass)
+
+        expected = linalg.solve(a, b)[:, 0:0, :]
+        result = linalg.solve(a[:, 0:0, 0:0], b[:, 0:0, :])
+        assert_array_equal(result, expected)
+        assert_(isinstance(result, ArraySubclass))
+
+        # Test errors for non-square and only b's dimension being 0
+        assert_raises(linalg.LinAlgError, linalg.solve, a[:, 0:0, 0:1], b)
+        assert_raises(ValueError, linalg.solve, a, b[:, 0:0, :])
+
+        # Test broadcasting error
+        b = np.arange(6).reshape(1, 3, 2)  # broadcasting error
+        assert_raises(ValueError, linalg.solve, a, b)
+        assert_raises(ValueError, linalg.solve, a[0:0], b[0:0])
+
+        # Test zero "single equations" with 0x0 matrices.
+        b = np.arange(2).reshape(1, 2).view(ArraySubclass)
+        expected = linalg.solve(a, b)[:, 0:0]
+        result = linalg.solve(a[:, 0:0, 0:0], b[:, 0:0])
+        assert_array_equal(result, expected)
+        assert_(isinstance(result, ArraySubclass))
+
+        b = np.arange(3).reshape(1, 3)
+        assert_raises(ValueError, linalg.solve, a, b)
+        assert_raises(ValueError, linalg.solve, a[0:0], b[0:0])
+        assert_raises(ValueError, linalg.solve, a[:, 0:0, 0:0], b)
+
+    def test_0_size_k(self):
+        # test zero multiple equation (K=0) case.
+        class ArraySubclass(np.ndarray):
+            pass
+        a = np.arange(4).reshape(1, 2, 2)
+        b = np.arange(6).reshape(3, 2, 1).view(ArraySubclass)
+
+        expected = linalg.solve(a, b)[:, :, 0:0]
+        result = linalg.solve(a, b[:, :, 0:0])
+        assert_array_equal(result, expected)
+        assert_(isinstance(result, ArraySubclass))
+
+        # test both zero.
+        expected = linalg.solve(a, b)[:, 0:0, 0:0]
+        result = linalg.solve(a[:, 0:0, 0:0], b[:, 0:0, 0:0])
+        assert_array_equal(result, expected)
+        assert_(isinstance(result, ArraySubclass))
+
+
+class InvCases(LinalgSquareTestCase, LinalgGeneralizedSquareTestCase):
+
+    def do(self, a, b, tags):
+        a_inv = linalg.inv(a)
+        assert_almost_equal(dot_generalized(a, a_inv),
+                            identity_like_generalized(a))
+        assert_(consistent_subclass(a_inv, a))
+
+
+class TestInv(InvCases):
+    @pytest.mark.parametrize('dtype', [single, double, csingle, cdouble])
+    def test_types(self, dtype):
+        x = np.array([[1, 0.5], [0.5, 1]], dtype=dtype)
+        assert_equal(linalg.inv(x).dtype, dtype)
+
+    def test_0_size(self):
+        # Check that all kinds of 0-sized arrays work
+        class ArraySubclass(np.ndarray):
+            pass
+        a = np.zeros((0, 1, 1), dtype=np.int_).view(ArraySubclass)
+        res = linalg.inv(a)
+        assert_(res.dtype.type is np.float64)
+        assert_equal(a.shape, res.shape)
+        assert_(isinstance(res, ArraySubclass))
+
+        a = np.zeros((0, 0), dtype=np.complex64).view(ArraySubclass)
+        res = linalg.inv(a)
+        assert_(res.dtype.type is np.complex64)
+        assert_equal(a.shape, res.shape)
+        assert_(isinstance(res, ArraySubclass))
+
+
+class EigvalsCases(LinalgSquareTestCase, LinalgGeneralizedSquareTestCase):
+
+    def do(self, a, b, tags):
+        ev = linalg.eigvals(a)
+        evalues, evectors = linalg.eig(a)
+        assert_almost_equal(ev, evalues)
+
+
+class TestEigvals(EigvalsCases):
+    @pytest.mark.parametrize('dtype', [single, double, csingle, cdouble])
+    def test_types(self, dtype):
+        x = np.array([[1, 0.5], [0.5, 1]], dtype=dtype)
+        assert_equal(linalg.eigvals(x).dtype, dtype)
+        x = np.array([[1, 0.5], [-1, 1]], dtype=dtype)
+        assert_equal(linalg.eigvals(x).dtype, get_complex_dtype(dtype))
+
+    def test_0_size(self):
+        # Check that all kinds of 0-sized arrays work
+        class ArraySubclass(np.ndarray):
+            pass
+        a = np.zeros((0, 1, 1), dtype=np.int_).view(ArraySubclass)
+        res = linalg.eigvals(a)
+        assert_(res.dtype.type is np.float64)
+        assert_equal((0, 1), res.shape)
+        # This is just for documentation, it might make sense to change:
+        assert_(isinstance(res, np.ndarray))
+
+        a = np.zeros((0, 0), dtype=np.complex64).view(ArraySubclass)
+        res = linalg.eigvals(a)
+        assert_(res.dtype.type is np.complex64)
+        assert_equal((0,), res.shape)
+        # This is just for documentation, it might make sense to change:
+        assert_(isinstance(res, np.ndarray))
+
+
+class EigCases(LinalgSquareTestCase, LinalgGeneralizedSquareTestCase):
+
+    def do(self, a, b, tags):
+        res = linalg.eig(a)
+        eigenvalues, eigenvectors = res.eigenvalues, res.eigenvectors
+        assert_allclose(dot_generalized(a, eigenvectors),
+                        np.asarray(eigenvectors) * np.asarray(eigenvalues)[..., None, :],
+                        rtol=get_rtol(eigenvalues.dtype))
+        assert_(consistent_subclass(eigenvectors, a))
+
+
+class TestEig(EigCases):
+    @pytest.mark.parametrize('dtype', [single, double, csingle, cdouble])
+    def test_types(self, dtype):
+        x = np.array([[1, 0.5], [0.5, 1]], dtype=dtype)
+        w, v = np.linalg.eig(x)
+        assert_equal(w.dtype, dtype)
+        assert_equal(v.dtype, dtype)
+
+        x = np.array([[1, 0.5], [-1, 1]], dtype=dtype)
+        w, v = np.linalg.eig(x)
+        assert_equal(w.dtype, get_complex_dtype(dtype))
+        assert_equal(v.dtype, get_complex_dtype(dtype))
+
+    def test_0_size(self):
+        # Check that all kinds of 0-sized arrays work
+        class ArraySubclass(np.ndarray):
+            pass
+        a = np.zeros((0, 1, 1), dtype=np.int_).view(ArraySubclass)
+        res, res_v = linalg.eig(a)
+        assert_(res_v.dtype.type is np.float64)
+        assert_(res.dtype.type is np.float64)
+        assert_equal(a.shape, res_v.shape)
+        assert_equal((0, 1), res.shape)
+        # This is just for documentation, it might make sense to change:
+        assert_(isinstance(a, np.ndarray))
+
+        a = np.zeros((0, 0), dtype=np.complex64).view(ArraySubclass)
+        res, res_v = linalg.eig(a)
+        assert_(res_v.dtype.type is np.complex64)
+        assert_(res.dtype.type is np.complex64)
+        assert_equal(a.shape, res_v.shape)
+        assert_equal((0,), res.shape)
+        # This is just for documentation, it might make sense to change:
+        assert_(isinstance(a, np.ndarray))
+
+
+class SVDBaseTests:
+    hermitian = False
+
+    @pytest.mark.parametrize('dtype', [single, double, csingle, cdouble])
+    def test_types(self, dtype):
+        x = np.array([[1, 0.5], [0.5, 1]], dtype=dtype)
+        res = linalg.svd(x)
+        U, S, Vh = res.U, res.S, res.Vh
+        assert_equal(U.dtype, dtype)
+        assert_equal(S.dtype, get_real_dtype(dtype))
+        assert_equal(Vh.dtype, dtype)
+        s = linalg.svd(x, compute_uv=False, hermitian=self.hermitian)
+        assert_equal(s.dtype, get_real_dtype(dtype))
+
+
+class SVDCases(LinalgSquareTestCase, LinalgGeneralizedSquareTestCase):
+
+    def do(self, a, b, tags):
+        u, s, vt = linalg.svd(a, False)
+        assert_allclose(a, dot_generalized(np.asarray(u) * np.asarray(s)[..., None, :],
+                                           np.asarray(vt)),
+                        rtol=get_rtol(u.dtype))
+        assert_(consistent_subclass(u, a))
+        assert_(consistent_subclass(vt, a))
+
+
+class TestSVD(SVDCases, SVDBaseTests):
+    def test_empty_identity(self):
+        """ Empty input should put an identity matrix in u or vh """
+        x = np.empty((4, 0))
+        u, s, vh = linalg.svd(x, compute_uv=True, hermitian=self.hermitian)
+        assert_equal(u.shape, (4, 4))
+        assert_equal(vh.shape, (0, 0))
+        assert_equal(u, np.eye(4))
+
+        x = np.empty((0, 4))
+        u, s, vh = linalg.svd(x, compute_uv=True, hermitian=self.hermitian)
+        assert_equal(u.shape, (0, 0))
+        assert_equal(vh.shape, (4, 4))
+        assert_equal(vh, np.eye(4))
+
+
+class SVDHermitianCases(HermitianTestCase, HermitianGeneralizedTestCase):
+
+    def do(self, a, b, tags):
+        u, s, vt = linalg.svd(a, False, hermitian=True)
+        assert_allclose(a, dot_generalized(np.asarray(u) * np.asarray(s)[..., None, :],
+                                           np.asarray(vt)),
+                        rtol=get_rtol(u.dtype))
+        def hermitian(mat):
+            axes = list(range(mat.ndim))
+            axes[-1], axes[-2] = axes[-2], axes[-1]
+            return np.conj(np.transpose(mat, axes=axes))
+
+        assert_almost_equal(np.matmul(u, hermitian(u)), np.broadcast_to(np.eye(u.shape[-1]), u.shape))
+        assert_almost_equal(np.matmul(vt, hermitian(vt)), np.broadcast_to(np.eye(vt.shape[-1]), vt.shape))
+        assert_equal(np.sort(s)[..., ::-1], s)
+        assert_(consistent_subclass(u, a))
+        assert_(consistent_subclass(vt, a))
+
+
+class TestSVDHermitian(SVDHermitianCases, SVDBaseTests):
+    hermitian = True
+
+
+class CondCases(LinalgSquareTestCase, LinalgGeneralizedSquareTestCase):
+    # cond(x, p) for p in (None, 2, -2)
+
+    def do(self, a, b, tags):
+        c = asarray(a)  # a might be a matrix
+        if 'size-0' in tags:
+            assert_raises(LinAlgError, linalg.cond, c)
+            return
+
+        # +-2 norms
+        s = linalg.svd(c, compute_uv=False)
+        assert_almost_equal(
+            linalg.cond(a), s[..., 0] / s[..., -1],
+            single_decimal=5, double_decimal=11)
+        assert_almost_equal(
+            linalg.cond(a, 2), s[..., 0] / s[..., -1],
+            single_decimal=5, double_decimal=11)
+        assert_almost_equal(
+            linalg.cond(a, -2), s[..., -1] / s[..., 0],
+            single_decimal=5, double_decimal=11)
+
+        # Other norms
+        cinv = np.linalg.inv(c)
+        assert_almost_equal(
+            linalg.cond(a, 1),
+            abs(c).sum(-2).max(-1) * abs(cinv).sum(-2).max(-1),
+            single_decimal=5, double_decimal=11)
+        assert_almost_equal(
+            linalg.cond(a, -1),
+            abs(c).sum(-2).min(-1) * abs(cinv).sum(-2).min(-1),
+            single_decimal=5, double_decimal=11)
+        assert_almost_equal(
+            linalg.cond(a, np.inf),
+            abs(c).sum(-1).max(-1) * abs(cinv).sum(-1).max(-1),
+            single_decimal=5, double_decimal=11)
+        assert_almost_equal(
+            linalg.cond(a, -np.inf),
+            abs(c).sum(-1).min(-1) * abs(cinv).sum(-1).min(-1),
+            single_decimal=5, double_decimal=11)
+        assert_almost_equal(
+            linalg.cond(a, 'fro'),
+            np.sqrt((abs(c)**2).sum(-1).sum(-1)
+                    * (abs(cinv)**2).sum(-1).sum(-1)),
+            single_decimal=5, double_decimal=11)
+
+
+class TestCond(CondCases):
+    def test_basic_nonsvd(self):
+        # Smoketest the non-svd norms
+        A = array([[1., 0, 1], [0, -2., 0], [0, 0, 3.]])
+        assert_almost_equal(linalg.cond(A, inf), 4)
+        assert_almost_equal(linalg.cond(A, -inf), 2/3)
+        assert_almost_equal(linalg.cond(A, 1), 4)
+        assert_almost_equal(linalg.cond(A, -1), 0.5)
+        assert_almost_equal(linalg.cond(A, 'fro'), np.sqrt(265 / 12))
+
+    def test_singular(self):
+        # Singular matrices have infinite condition number for
+        # positive norms, and negative norms shouldn't raise
+        # exceptions
+        As = [np.zeros((2, 2)), np.ones((2, 2))]
+        p_pos = [None, 1, 2, 'fro']
+        p_neg = [-1, -2]
+        for A, p in itertools.product(As, p_pos):
+            # Inversion may not hit exact infinity, so just check the
+            # number is large
+            assert_(linalg.cond(A, p) > 1e15)
+        for A, p in itertools.product(As, p_neg):
+            linalg.cond(A, p)
+
+    @pytest.mark.xfail(True, run=False,
+                       reason="Platform/LAPACK-dependent failure, "
+                              "see gh-18914")
+    def test_nan(self):
+        # nans should be passed through, not converted to infs
+        ps = [None, 1, -1, 2, -2, 'fro']
+        p_pos = [None, 1, 2, 'fro']
+
+        A = np.ones((2, 2))
+        A[0,1] = np.nan
+        for p in ps:
+            c = linalg.cond(A, p)
+            assert_(isinstance(c, np.float_))
+            assert_(np.isnan(c))
+
+        A = np.ones((3, 2, 2))
+        A[1,0,1] = np.nan
+        for p in ps:
+            c = linalg.cond(A, p)
+            assert_(np.isnan(c[1]))
+            if p in p_pos:
+                assert_(c[0] > 1e15)
+                assert_(c[2] > 1e15)
+            else:
+                assert_(not np.isnan(c[0]))
+                assert_(not np.isnan(c[2]))
+
+    def test_stacked_singular(self):
+        # Check behavior when only some of the stacked matrices are
+        # singular
+        np.random.seed(1234)
+        A = np.random.rand(2, 2, 2, 2)
+        A[0,0] = 0
+        A[1,1] = 0
+
+        for p in (None, 1, 2, 'fro', -1, -2):
+            c = linalg.cond(A, p)
+            assert_equal(c[0,0], np.inf)
+            assert_equal(c[1,1], np.inf)
+            assert_(np.isfinite(c[0,1]))
+            assert_(np.isfinite(c[1,0]))
+
+
+class PinvCases(LinalgSquareTestCase,
+                LinalgNonsquareTestCase,
+                LinalgGeneralizedSquareTestCase,
+                LinalgGeneralizedNonsquareTestCase):
+
+    def do(self, a, b, tags):
+        a_ginv = linalg.pinv(a)
+        # `a @ a_ginv == I` does not hold if a is singular
+        dot = dot_generalized
+        assert_almost_equal(dot(dot(a, a_ginv), a), a, single_decimal=5, double_decimal=11)
+        assert_(consistent_subclass(a_ginv, a))
+
+
+class TestPinv(PinvCases):
+    pass
+
+
+class PinvHermitianCases(HermitianTestCase, HermitianGeneralizedTestCase):
+
+    def do(self, a, b, tags):
+        a_ginv = linalg.pinv(a, hermitian=True)
+        # `a @ a_ginv == I` does not hold if a is singular
+        dot = dot_generalized
+        assert_almost_equal(dot(dot(a, a_ginv), a), a, single_decimal=5, double_decimal=11)
+        assert_(consistent_subclass(a_ginv, a))
+
+
+class TestPinvHermitian(PinvHermitianCases):
+    pass
+
+
+class DetCases(LinalgSquareTestCase, LinalgGeneralizedSquareTestCase):
+
+    def do(self, a, b, tags):
+        d = linalg.det(a)
+        res = linalg.slogdet(a)
+        s, ld = res.sign, res.logabsdet
+        if asarray(a).dtype.type in (single, double):
+            ad = asarray(a).astype(double)
+        else:
+            ad = asarray(a).astype(cdouble)
+        ev = linalg.eigvals(ad)
+        assert_almost_equal(d, multiply.reduce(ev, axis=-1))
+        assert_almost_equal(s * np.exp(ld), multiply.reduce(ev, axis=-1))
+
+        s = np.atleast_1d(s)
+        ld = np.atleast_1d(ld)
+        m = (s != 0)
+        assert_almost_equal(np.abs(s[m]), 1)
+        assert_equal(ld[~m], -inf)
+
+
+class TestDet(DetCases):
+    def test_zero(self):
+        assert_equal(linalg.det([[0.0]]), 0.0)
+        assert_equal(type(linalg.det([[0.0]])), double)
+        assert_equal(linalg.det([[0.0j]]), 0.0)
+        assert_equal(type(linalg.det([[0.0j]])), cdouble)
+
+        assert_equal(linalg.slogdet([[0.0]]), (0.0, -inf))
+        assert_equal(type(linalg.slogdet([[0.0]])[0]), double)
+        assert_equal(type(linalg.slogdet([[0.0]])[1]), double)
+        assert_equal(linalg.slogdet([[0.0j]]), (0.0j, -inf))
+        assert_equal(type(linalg.slogdet([[0.0j]])[0]), cdouble)
+        assert_equal(type(linalg.slogdet([[0.0j]])[1]), double)
+
+    @pytest.mark.parametrize('dtype', [single, double, csingle, cdouble])
+    def test_types(self, dtype):
+        x = np.array([[1, 0.5], [0.5, 1]], dtype=dtype)
+        assert_equal(np.linalg.det(x).dtype, dtype)
+        ph, s = np.linalg.slogdet(x)
+        assert_equal(s.dtype, get_real_dtype(dtype))
+        assert_equal(ph.dtype, dtype)
+
+    def test_0_size(self):
+        a = np.zeros((0, 0), dtype=np.complex64)
+        res = linalg.det(a)
+        assert_equal(res, 1.)
+        assert_(res.dtype.type is np.complex64)
+        res = linalg.slogdet(a)
+        assert_equal(res, (1, 0))
+        assert_(res[0].dtype.type is np.complex64)
+        assert_(res[1].dtype.type is np.float32)
+
+        a = np.zeros((0, 0), dtype=np.float64)
+        res = linalg.det(a)
+        assert_equal(res, 1.)
+        assert_(res.dtype.type is np.float64)
+        res = linalg.slogdet(a)
+        assert_equal(res, (1, 0))
+        assert_(res[0].dtype.type is np.float64)
+        assert_(res[1].dtype.type is np.float64)
+
+
+class LstsqCases(LinalgSquareTestCase, LinalgNonsquareTestCase):
+
+    def do(self, a, b, tags):
+        arr = np.asarray(a)
+        m, n = arr.shape
+        u, s, vt = linalg.svd(a, False)
+        x, residuals, rank, sv = linalg.lstsq(a, b, rcond=-1)
+        if m == 0:
+            assert_((x == 0).all())
+        if m <= n:
+            assert_almost_equal(b, dot(a, x))
+            assert_equal(rank, m)
+        else:
+            assert_equal(rank, n)
+        assert_almost_equal(sv, sv.__array_wrap__(s))
+        if rank == n and m > n:
+            expect_resids = (
+                np.asarray(abs(np.dot(a, x) - b)) ** 2).sum(axis=0)
+            expect_resids = np.asarray(expect_resids)
+            if np.asarray(b).ndim == 1:
+                expect_resids.shape = (1,)
+                assert_equal(residuals.shape, expect_resids.shape)
+        else:
+            expect_resids = np.array([]).view(type(x))
+        assert_almost_equal(residuals, expect_resids)
+        assert_(np.issubdtype(residuals.dtype, np.floating))
+        assert_(consistent_subclass(x, b))
+        assert_(consistent_subclass(residuals, b))
+
+
+class TestLstsq(LstsqCases):
+    def test_future_rcond(self):
+        a = np.array([[0., 1.,  0.,  1.,  2.,  0.],
+                      [0., 2.,  0.,  0.,  1.,  0.],
+                      [1., 0.,  1.,  0.,  0.,  4.],
+                      [0., 0.,  0.,  2.,  3.,  0.]]).T
+
+        b = np.array([1, 0, 0, 0, 0, 0])
+        with suppress_warnings() as sup:
+            w = sup.record(FutureWarning, "`rcond` parameter will change")
+            x, residuals, rank, s = linalg.lstsq(a, b)
+            assert_(rank == 4)
+            x, residuals, rank, s = linalg.lstsq(a, b, rcond=-1)
+            assert_(rank == 4)
+            x, residuals, rank, s = linalg.lstsq(a, b, rcond=None)
+            assert_(rank == 3)
+            # Warning should be raised exactly once (first command)
+            assert_(len(w) == 1)
+
+    @pytest.mark.parametrize(["m", "n", "n_rhs"], [
+        (4, 2, 2),
+        (0, 4, 1),
+        (0, 4, 2),
+        (4, 0, 1),
+        (4, 0, 2),
+        (4, 2, 0),
+        (0, 0, 0)
+    ])
+    def test_empty_a_b(self, m, n, n_rhs):
+        a = np.arange(m * n).reshape(m, n)
+        b = np.ones((m, n_rhs))
+        x, residuals, rank, s = linalg.lstsq(a, b, rcond=None)
+        if m == 0:
+            assert_((x == 0).all())
+        assert_equal(x.shape, (n, n_rhs))
+        assert_equal(residuals.shape, ((n_rhs,) if m > n else (0,)))
+        if m > n and n_rhs > 0:
+            # residuals are exactly the squared norms of b's columns
+            r = b - np.dot(a, x)
+            assert_almost_equal(residuals, (r * r).sum(axis=-2))
+        assert_equal(rank, min(m, n))
+        assert_equal(s.shape, (min(m, n),))
+
+    def test_incompatible_dims(self):
+        # use modified version of docstring example
+        x = np.array([0, 1, 2, 3])
+        y = np.array([-1, 0.2, 0.9, 2.1, 3.3])
+        A = np.vstack([x, np.ones(len(x))]).T
+        with assert_raises_regex(LinAlgError, "Incompatible dimensions"):
+            linalg.lstsq(A, y, rcond=None)
+
+
+@pytest.mark.parametrize('dt', [np.dtype(c) for c in '?bBhHiIqQefdgFDGO'])
+class TestMatrixPower:
+
+    rshft_0 = np.eye(4)
+    rshft_1 = rshft_0[[3, 0, 1, 2]]
+    rshft_2 = rshft_0[[2, 3, 0, 1]]
+    rshft_3 = rshft_0[[1, 2, 3, 0]]
+    rshft_all = [rshft_0, rshft_1, rshft_2, rshft_3]
+    noninv = array([[1, 0], [0, 0]])
+    stacked = np.block([[[rshft_0]]]*2)
+    #FIXME the 'e' dtype might work in future
+    dtnoinv = [object, np.dtype('e'), np.dtype('g'), np.dtype('G')]
+
+    def test_large_power(self, dt):
+        rshft = self.rshft_1.astype(dt)
+        assert_equal(
+            matrix_power(rshft, 2**100 + 2**10 + 2**5 + 0), self.rshft_0)
+        assert_equal(
+            matrix_power(rshft, 2**100 + 2**10 + 2**5 + 1), self.rshft_1)
+        assert_equal(
+            matrix_power(rshft, 2**100 + 2**10 + 2**5 + 2), self.rshft_2)
+        assert_equal(
+            matrix_power(rshft, 2**100 + 2**10 + 2**5 + 3), self.rshft_3)
+
+    def test_power_is_zero(self, dt):
+        def tz(M):
+            mz = matrix_power(M, 0)
+            assert_equal(mz, identity_like_generalized(M))
+            assert_equal(mz.dtype, M.dtype)
+
+        for mat in self.rshft_all:
+            tz(mat.astype(dt))
+            if dt != object:
+                tz(self.stacked.astype(dt))
+
+    def test_power_is_one(self, dt):
+        def tz(mat):
+            mz = matrix_power(mat, 1)
+            assert_equal(mz, mat)
+            assert_equal(mz.dtype, mat.dtype)
+
+        for mat in self.rshft_all:
+            tz(mat.astype(dt))
+            if dt != object:
+                tz(self.stacked.astype(dt))
+
+    def test_power_is_two(self, dt):
+        def tz(mat):
+            mz = matrix_power(mat, 2)
+            mmul = matmul if mat.dtype != object else dot
+            assert_equal(mz, mmul(mat, mat))
+            assert_equal(mz.dtype, mat.dtype)
+
+        for mat in self.rshft_all:
+            tz(mat.astype(dt))
+            if dt != object:
+                tz(self.stacked.astype(dt))
+
+    def test_power_is_minus_one(self, dt):
+        def tz(mat):
+            invmat = matrix_power(mat, -1)
+            mmul = matmul if mat.dtype != object else dot
+            assert_almost_equal(
+                mmul(invmat, mat), identity_like_generalized(mat))
+
+        for mat in self.rshft_all:
+            if dt not in self.dtnoinv:
+                tz(mat.astype(dt))
+
+    def test_exceptions_bad_power(self, dt):
+        mat = self.rshft_0.astype(dt)
+        assert_raises(TypeError, matrix_power, mat, 1.5)
+        assert_raises(TypeError, matrix_power, mat, [1])
+
+    def test_exceptions_non_square(self, dt):
+        assert_raises(LinAlgError, matrix_power, np.array([1], dt), 1)
+        assert_raises(LinAlgError, matrix_power, np.array([[1], [2]], dt), 1)
+        assert_raises(LinAlgError, matrix_power, np.ones((4, 3, 2), dt), 1)
+
+    @pytest.mark.skipif(IS_WASM, reason="fp errors don't work in wasm")
+    def test_exceptions_not_invertible(self, dt):
+        if dt in self.dtnoinv:
+            return
+        mat = self.noninv.astype(dt)
+        assert_raises(LinAlgError, matrix_power, mat, -1)
+
+
+class TestEigvalshCases(HermitianTestCase, HermitianGeneralizedTestCase):
+
+    def do(self, a, b, tags):
+        # note that eigenvalue arrays returned by eig must be sorted since
+        # their order isn't guaranteed.
+        ev = linalg.eigvalsh(a, 'L')
+        evalues, evectors = linalg.eig(a)
+        evalues.sort(axis=-1)
+        assert_allclose(ev, evalues, rtol=get_rtol(ev.dtype))
+
+        ev2 = linalg.eigvalsh(a, 'U')
+        assert_allclose(ev2, evalues, rtol=get_rtol(ev.dtype))
+
+
+class TestEigvalsh:
+    @pytest.mark.parametrize('dtype', [single, double, csingle, cdouble])
+    def test_types(self, dtype):
+        x = np.array([[1, 0.5], [0.5, 1]], dtype=dtype)
+        w = np.linalg.eigvalsh(x)
+        assert_equal(w.dtype, get_real_dtype(dtype))
+
+    def test_invalid(self):
+        x = np.array([[1, 0.5], [0.5, 1]], dtype=np.float32)
+        assert_raises(ValueError, np.linalg.eigvalsh, x, UPLO="lrong")
+        assert_raises(ValueError, np.linalg.eigvalsh, x, "lower")
+        assert_raises(ValueError, np.linalg.eigvalsh, x, "upper")
+
+    def test_UPLO(self):
+        Klo = np.array([[0, 0], [1, 0]], dtype=np.double)
+        Kup = np.array([[0, 1], [0, 0]], dtype=np.double)
+        tgt = np.array([-1, 1], dtype=np.double)
+        rtol = get_rtol(np.double)
+
+        # Check default is 'L'
+        w = np.linalg.eigvalsh(Klo)
+        assert_allclose(w, tgt, rtol=rtol)
+        # Check 'L'
+        w = np.linalg.eigvalsh(Klo, UPLO='L')
+        assert_allclose(w, tgt, rtol=rtol)
+        # Check 'l'
+        w = np.linalg.eigvalsh(Klo, UPLO='l')
+        assert_allclose(w, tgt, rtol=rtol)
+        # Check 'U'
+        w = np.linalg.eigvalsh(Kup, UPLO='U')
+        assert_allclose(w, tgt, rtol=rtol)
+        # Check 'u'
+        w = np.linalg.eigvalsh(Kup, UPLO='u')
+        assert_allclose(w, tgt, rtol=rtol)
+
+    def test_0_size(self):
+        # Check that all kinds of 0-sized arrays work
+        class ArraySubclass(np.ndarray):
+            pass
+        a = np.zeros((0, 1, 1), dtype=np.int_).view(ArraySubclass)
+        res = linalg.eigvalsh(a)
+        assert_(res.dtype.type is np.float64)
+        assert_equal((0, 1), res.shape)
+        # This is just for documentation, it might make sense to change:
+        assert_(isinstance(res, np.ndarray))
+
+        a = np.zeros((0, 0), dtype=np.complex64).view(ArraySubclass)
+        res = linalg.eigvalsh(a)
+        assert_(res.dtype.type is np.float32)
+        assert_equal((0,), res.shape)
+        # This is just for documentation, it might make sense to change:
+        assert_(isinstance(res, np.ndarray))
+
+
+class TestEighCases(HermitianTestCase, HermitianGeneralizedTestCase):
+
+    def do(self, a, b, tags):
+        # note that eigenvalue arrays returned by eig must be sorted since
+        # their order isn't guaranteed.
+        res = linalg.eigh(a)
+        ev, evc = res.eigenvalues, res.eigenvectors
+        evalues, evectors = linalg.eig(a)
+        evalues.sort(axis=-1)
+        assert_almost_equal(ev, evalues)
+
+        assert_allclose(dot_generalized(a, evc),
+                        np.asarray(ev)[..., None, :] * np.asarray(evc),
+                        rtol=get_rtol(ev.dtype))
+
+        ev2, evc2 = linalg.eigh(a, 'U')
+        assert_almost_equal(ev2, evalues)
+
+        assert_allclose(dot_generalized(a, evc2),
+                        np.asarray(ev2)[..., None, :] * np.asarray(evc2),
+                        rtol=get_rtol(ev.dtype), err_msg=repr(a))
+
+
+class TestEigh:
+    @pytest.mark.parametrize('dtype', [single, double, csingle, cdouble])
+    def test_types(self, dtype):
+        x = np.array([[1, 0.5], [0.5, 1]], dtype=dtype)
+        w, v = np.linalg.eigh(x)
+        assert_equal(w.dtype, get_real_dtype(dtype))
+        assert_equal(v.dtype, dtype)
+
+    def test_invalid(self):
+        x = np.array([[1, 0.5], [0.5, 1]], dtype=np.float32)
+        assert_raises(ValueError, np.linalg.eigh, x, UPLO="lrong")
+        assert_raises(ValueError, np.linalg.eigh, x, "lower")
+        assert_raises(ValueError, np.linalg.eigh, x, "upper")
+
+    def test_UPLO(self):
+        Klo = np.array([[0, 0], [1, 0]], dtype=np.double)
+        Kup = np.array([[0, 1], [0, 0]], dtype=np.double)
+        tgt = np.array([-1, 1], dtype=np.double)
+        rtol = get_rtol(np.double)
+
+        # Check default is 'L'
+        w, v = np.linalg.eigh(Klo)
+        assert_allclose(w, tgt, rtol=rtol)
+        # Check 'L'
+        w, v = np.linalg.eigh(Klo, UPLO='L')
+        assert_allclose(w, tgt, rtol=rtol)
+        # Check 'l'
+        w, v = np.linalg.eigh(Klo, UPLO='l')
+        assert_allclose(w, tgt, rtol=rtol)
+        # Check 'U'
+        w, v = np.linalg.eigh(Kup, UPLO='U')
+        assert_allclose(w, tgt, rtol=rtol)
+        # Check 'u'
+        w, v = np.linalg.eigh(Kup, UPLO='u')
+        assert_allclose(w, tgt, rtol=rtol)
+
+    def test_0_size(self):
+        # Check that all kinds of 0-sized arrays work
+        class ArraySubclass(np.ndarray):
+            pass
+        a = np.zeros((0, 1, 1), dtype=np.int_).view(ArraySubclass)
+        res, res_v = linalg.eigh(a)
+        assert_(res_v.dtype.type is np.float64)
+        assert_(res.dtype.type is np.float64)
+        assert_equal(a.shape, res_v.shape)
+        assert_equal((0, 1), res.shape)
+        # This is just for documentation, it might make sense to change:
+        assert_(isinstance(a, np.ndarray))
+
+        a = np.zeros((0, 0), dtype=np.complex64).view(ArraySubclass)
+        res, res_v = linalg.eigh(a)
+        assert_(res_v.dtype.type is np.complex64)
+        assert_(res.dtype.type is np.float32)
+        assert_equal(a.shape, res_v.shape)
+        assert_equal((0,), res.shape)
+        # This is just for documentation, it might make sense to change:
+        assert_(isinstance(a, np.ndarray))
+
+
+class _TestNormBase:
+    dt = None
+    dec = None
+
+    @staticmethod
+    def check_dtype(x, res):
+        if issubclass(x.dtype.type, np.inexact):
+            assert_equal(res.dtype, x.real.dtype)
+        else:
+            # For integer input, don't have to test float precision of output.
+            assert_(issubclass(res.dtype.type, np.floating))
+
+
+class _TestNormGeneral(_TestNormBase):
+
+    def test_empty(self):
+        assert_equal(norm([]), 0.0)
+        assert_equal(norm(array([], dtype=self.dt)), 0.0)
+        assert_equal(norm(atleast_2d(array([], dtype=self.dt))), 0.0)
+
+    def test_vector_return_type(self):
+        a = np.array([1, 0, 1])
+
+        exact_types = np.typecodes['AllInteger']
+        inexact_types = np.typecodes['AllFloat']
+
+        all_types = exact_types + inexact_types
+
+        for each_type in all_types:
+            at = a.astype(each_type)
+
+            an = norm(at, -np.inf)
+            self.check_dtype(at, an)
+            assert_almost_equal(an, 0.0)
+
+            with suppress_warnings() as sup:
+                sup.filter(RuntimeWarning, "divide by zero encountered")
+                an = norm(at, -1)
+                self.check_dtype(at, an)
+                assert_almost_equal(an, 0.0)
+
+            an = norm(at, 0)
+            self.check_dtype(at, an)
+            assert_almost_equal(an, 2)
+
+            an = norm(at, 1)
+            self.check_dtype(at, an)
+            assert_almost_equal(an, 2.0)
+
+            an = norm(at, 2)
+            self.check_dtype(at, an)
+            assert_almost_equal(an, an.dtype.type(2.0)**an.dtype.type(1.0/2.0))
+
+            an = norm(at, 4)
+            self.check_dtype(at, an)
+            assert_almost_equal(an, an.dtype.type(2.0)**an.dtype.type(1.0/4.0))
+
+            an = norm(at, np.inf)
+            self.check_dtype(at, an)
+            assert_almost_equal(an, 1.0)
+
+    def test_vector(self):
+        a = [1, 2, 3, 4]
+        b = [-1, -2, -3, -4]
+        c = [-1, 2, -3, 4]
+
+        def _test(v):
+            np.testing.assert_almost_equal(norm(v), 30 ** 0.5,
+                                           decimal=self.dec)
+            np.testing.assert_almost_equal(norm(v, inf), 4.0,
+                                           decimal=self.dec)
+            np.testing.assert_almost_equal(norm(v, -inf), 1.0,
+                                           decimal=self.dec)
+            np.testing.assert_almost_equal(norm(v, 1), 10.0,
+                                           decimal=self.dec)
+            np.testing.assert_almost_equal(norm(v, -1), 12.0 / 25,
+                                           decimal=self.dec)
+            np.testing.assert_almost_equal(norm(v, 2), 30 ** 0.5,
+                                           decimal=self.dec)
+            np.testing.assert_almost_equal(norm(v, -2), ((205. / 144) ** -0.5),
+                                           decimal=self.dec)
+            np.testing.assert_almost_equal(norm(v, 0), 4,
+                                           decimal=self.dec)
+
+        for v in (a, b, c,):
+            _test(v)
+
+        for v in (array(a, dtype=self.dt), array(b, dtype=self.dt),
+                  array(c, dtype=self.dt)):
+            _test(v)
+
+    def test_axis(self):
+        # Vector norms.
+        # Compare the use of `axis` with computing the norm of each row
+        # or column separately.
+        A = array([[1, 2, 3], [4, 5, 6]], dtype=self.dt)
+        for order in [None, -1, 0, 1, 2, 3, np.Inf, -np.Inf]:
+            expected0 = [norm(A[:, k], ord=order) for k in range(A.shape[1])]
+            assert_almost_equal(norm(A, ord=order, axis=0), expected0)
+            expected1 = [norm(A[k, :], ord=order) for k in range(A.shape[0])]
+            assert_almost_equal(norm(A, ord=order, axis=1), expected1)
+
+        # Matrix norms.
+        B = np.arange(1, 25, dtype=self.dt).reshape(2, 3, 4)
+        nd = B.ndim
+        for order in [None, -2, 2, -1, 1, np.Inf, -np.Inf, 'fro']:
+            for axis in itertools.combinations(range(-nd, nd), 2):
+                row_axis, col_axis = axis
+                if row_axis < 0:
+                    row_axis += nd
+                if col_axis < 0:
+                    col_axis += nd
+                if row_axis == col_axis:
+                    assert_raises(ValueError, norm, B, ord=order, axis=axis)
+                else:
+                    n = norm(B, ord=order, axis=axis)
+
+                    # The logic using k_index only works for nd = 3.
+                    # This has to be changed if nd is increased.
+                    k_index = nd - (row_axis + col_axis)
+                    if row_axis < col_axis:
+                        expected = [norm(B[:].take(k, axis=k_index), ord=order)
+                                    for k in range(B.shape[k_index])]
+                    else:
+                        expected = [norm(B[:].take(k, axis=k_index).T, ord=order)
+                                    for k in range(B.shape[k_index])]
+                    assert_almost_equal(n, expected)
+
+    def test_keepdims(self):
+        A = np.arange(1, 25, dtype=self.dt).reshape(2, 3, 4)
+
+        allclose_err = 'order {0}, axis = {1}'
+        shape_err = 'Shape mismatch found {0}, expected {1}, order={2}, axis={3}'
+
+        # check the order=None, axis=None case
+        expected = norm(A, ord=None, axis=None)
+        found = norm(A, ord=None, axis=None, keepdims=True)
+        assert_allclose(np.squeeze(found), expected,
+                        err_msg=allclose_err.format(None, None))
+        expected_shape = (1, 1, 1)
+        assert_(found.shape == expected_shape,
+                shape_err.format(found.shape, expected_shape, None, None))
+
+        # Vector norms.
+        for order in [None, -1, 0, 1, 2, 3, np.Inf, -np.Inf]:
+            for k in range(A.ndim):
+                expected = norm(A, ord=order, axis=k)
+                found = norm(A, ord=order, axis=k, keepdims=True)
+                assert_allclose(np.squeeze(found), expected,
+                                err_msg=allclose_err.format(order, k))
+                expected_shape = list(A.shape)
+                expected_shape[k] = 1
+                expected_shape = tuple(expected_shape)
+                assert_(found.shape == expected_shape,
+                        shape_err.format(found.shape, expected_shape, order, k))
+
+        # Matrix norms.
+        for order in [None, -2, 2, -1, 1, np.Inf, -np.Inf, 'fro', 'nuc']:
+            for k in itertools.permutations(range(A.ndim), 2):
+                expected = norm(A, ord=order, axis=k)
+                found = norm(A, ord=order, axis=k, keepdims=True)
+                assert_allclose(np.squeeze(found), expected,
+                                err_msg=allclose_err.format(order, k))
+                expected_shape = list(A.shape)
+                expected_shape[k[0]] = 1
+                expected_shape[k[1]] = 1
+                expected_shape = tuple(expected_shape)
+                assert_(found.shape == expected_shape,
+                        shape_err.format(found.shape, expected_shape, order, k))
+
+
+class _TestNorm2D(_TestNormBase):
+    # Define the part for 2d arrays separately, so we can subclass this
+    # and run the tests using np.matrix in matrixlib.tests.test_matrix_linalg.
+    array = np.array
+
+    def test_matrix_empty(self):
+        assert_equal(norm(self.array([[]], dtype=self.dt)), 0.0)
+
+    def test_matrix_return_type(self):
+        a = self.array([[1, 0, 1], [0, 1, 1]])
+
+        exact_types = np.typecodes['AllInteger']
+
+        # float32, complex64, float64, complex128 types are the only types
+        # allowed by `linalg`, which performs the matrix operations used
+        # within `norm`.
+        inexact_types = 'fdFD'
+
+        all_types = exact_types + inexact_types
+
+        for each_type in all_types:
+            at = a.astype(each_type)
+
+            an = norm(at, -np.inf)
+            self.check_dtype(at, an)
+            assert_almost_equal(an, 2.0)
+
+            with suppress_warnings() as sup:
+                sup.filter(RuntimeWarning, "divide by zero encountered")
+                an = norm(at, -1)
+                self.check_dtype(at, an)
+                assert_almost_equal(an, 1.0)
+
+            an = norm(at, 1)
+            self.check_dtype(at, an)
+            assert_almost_equal(an, 2.0)
+
+            an = norm(at, 2)
+            self.check_dtype(at, an)
+            assert_almost_equal(an, 3.0**(1.0/2.0))
+
+            an = norm(at, -2)
+            self.check_dtype(at, an)
+            assert_almost_equal(an, 1.0)
+
+            an = norm(at, np.inf)
+            self.check_dtype(at, an)
+            assert_almost_equal(an, 2.0)
+
+            an = norm(at, 'fro')
+            self.check_dtype(at, an)
+            assert_almost_equal(an, 2.0)
+
+            an = norm(at, 'nuc')
+            self.check_dtype(at, an)
+            # Lower bar needed to support low precision floats.
+            # They end up being off by 1 in the 7th place.
+            np.testing.assert_almost_equal(an, 2.7320508075688772, decimal=6)
+
+    def test_matrix_2x2(self):
+        A = self.array([[1, 3], [5, 7]], dtype=self.dt)
+        assert_almost_equal(norm(A), 84 ** 0.5)
+        assert_almost_equal(norm(A, 'fro'), 84 ** 0.5)
+        assert_almost_equal(norm(A, 'nuc'), 10.0)
+        assert_almost_equal(norm(A, inf), 12.0)
+        assert_almost_equal(norm(A, -inf), 4.0)
+        assert_almost_equal(norm(A, 1), 10.0)
+        assert_almost_equal(norm(A, -1), 6.0)
+        assert_almost_equal(norm(A, 2), 9.1231056256176615)
+        assert_almost_equal(norm(A, -2), 0.87689437438234041)
+
+        assert_raises(ValueError, norm, A, 'nofro')
+        assert_raises(ValueError, norm, A, -3)
+        assert_raises(ValueError, norm, A, 0)
+
+    def test_matrix_3x3(self):
+        # This test has been added because the 2x2 example
+        # happened to have equal nuclear norm and induced 1-norm.
+        # The 1/10 scaling factor accommodates the absolute tolerance
+        # used in assert_almost_equal.
+        A = (1 / 10) * \
+            self.array([[1, 2, 3], [6, 0, 5], [3, 2, 1]], dtype=self.dt)
+        assert_almost_equal(norm(A), (1 / 10) * 89 ** 0.5)
+        assert_almost_equal(norm(A, 'fro'), (1 / 10) * 89 ** 0.5)
+        assert_almost_equal(norm(A, 'nuc'), 1.3366836911774836)
+        assert_almost_equal(norm(A, inf), 1.1)
+        assert_almost_equal(norm(A, -inf), 0.6)
+        assert_almost_equal(norm(A, 1), 1.0)
+        assert_almost_equal(norm(A, -1), 0.4)
+        assert_almost_equal(norm(A, 2), 0.88722940323461277)
+        assert_almost_equal(norm(A, -2), 0.19456584790481812)
+
+    def test_bad_args(self):
+        # Check that bad arguments raise the appropriate exceptions.
+
+        A = self.array([[1, 2, 3], [4, 5, 6]], dtype=self.dt)
+        B = np.arange(1, 25, dtype=self.dt).reshape(2, 3, 4)
+
+        # Using `axis=` or passing in a 1-D array implies vector
+        # norms are being computed, so also using `ord='fro'`
+        # or `ord='nuc'` or any other string raises a ValueError.
+        assert_raises(ValueError, norm, A, 'fro', 0)
+        assert_raises(ValueError, norm, A, 'nuc', 0)
+        assert_raises(ValueError, norm, [3, 4], 'fro', None)
+        assert_raises(ValueError, norm, [3, 4], 'nuc', None)
+        assert_raises(ValueError, norm, [3, 4], 'test', None)
+
+        # Similarly, norm should raise an exception when ord is any finite
+        # number other than 1, 2, -1 or -2 when computing matrix norms.
+        for order in [0, 3]:
+            assert_raises(ValueError, norm, A, order, None)
+            assert_raises(ValueError, norm, A, order, (0, 1))
+            assert_raises(ValueError, norm, B, order, (1, 2))
+
+        # Invalid axis
+        assert_raises(np.AxisError, norm, B, None, 3)
+        assert_raises(np.AxisError, norm, B, None, (2, 3))
+        assert_raises(ValueError, norm, B, None, (0, 1, 2))
+
+
+class _TestNorm(_TestNorm2D, _TestNormGeneral):
+    pass
+
+
+class TestNorm_NonSystematic:
+
+    def test_longdouble_norm(self):
+        # Non-regression test: p-norm of longdouble would previously raise
+        # UnboundLocalError.
+        x = np.arange(10, dtype=np.longdouble)
+        old_assert_almost_equal(norm(x, ord=3), 12.65, decimal=2)
+
+    def test_intmin(self):
+        # Non-regression test: p-norm of signed integer would previously do
+        # float cast and abs in the wrong order.
+        x = np.array([-2 ** 31], dtype=np.int32)
+        old_assert_almost_equal(norm(x, ord=3), 2 ** 31, decimal=5)
+
+    def test_complex_high_ord(self):
+        # gh-4156
+        d = np.empty((2,), dtype=np.clongdouble)
+        d[0] = 6 + 7j
+        d[1] = -6 + 7j
+        res = 11.615898132184
+        old_assert_almost_equal(np.linalg.norm(d, ord=3), res, decimal=10)
+        d = d.astype(np.complex128)
+        old_assert_almost_equal(np.linalg.norm(d, ord=3), res, decimal=9)
+        d = d.astype(np.complex64)
+        old_assert_almost_equal(np.linalg.norm(d, ord=3), res, decimal=5)
+
+
+# Separate definitions so we can use them for matrix tests.
+class _TestNormDoubleBase(_TestNormBase):
+    dt = np.double
+    dec = 12
+
+
+class _TestNormSingleBase(_TestNormBase):
+    dt = np.float32
+    dec = 6
+
+
+class _TestNormInt64Base(_TestNormBase):
+    dt = np.int64
+    dec = 12
+
+
+class TestNormDouble(_TestNorm, _TestNormDoubleBase):
+    pass
+
+
+class TestNormSingle(_TestNorm, _TestNormSingleBase):
+    pass
+
+
+class TestNormInt64(_TestNorm, _TestNormInt64Base):
+    pass
+
+
+class TestMatrixRank:
+
+    def test_matrix_rank(self):
+        # Full rank matrix
+        assert_equal(4, matrix_rank(np.eye(4)))
+        # rank deficient matrix
+        I = np.eye(4)
+        I[-1, -1] = 0.
+        assert_equal(matrix_rank(I), 3)
+        # All zeros - zero rank
+        assert_equal(matrix_rank(np.zeros((4, 4))), 0)
+        # 1 dimension - rank 1 unless all 0
+        assert_equal(matrix_rank([1, 0, 0, 0]), 1)
+        assert_equal(matrix_rank(np.zeros((4,))), 0)
+        # accepts array-like
+        assert_equal(matrix_rank([1]), 1)
+        # greater than 2 dimensions treated as stacked matrices
+        ms = np.array([I, np.eye(4), np.zeros((4,4))])
+        assert_equal(matrix_rank(ms), np.array([3, 4, 0]))
+        # works on scalar
+        assert_equal(matrix_rank(1), 1)
+
+    def test_symmetric_rank(self):
+        assert_equal(4, matrix_rank(np.eye(4), hermitian=True))
+        assert_equal(1, matrix_rank(np.ones((4, 4)), hermitian=True))
+        assert_equal(0, matrix_rank(np.zeros((4, 4)), hermitian=True))
+        # rank deficient matrix
+        I = np.eye(4)
+        I[-1, -1] = 0.
+        assert_equal(3, matrix_rank(I, hermitian=True))
+        # manually supplied tolerance
+        I[-1, -1] = 1e-8
+        assert_equal(4, matrix_rank(I, hermitian=True, tol=0.99e-8))
+        assert_equal(3, matrix_rank(I, hermitian=True, tol=1.01e-8))
+
+
+def test_reduced_rank():
+    # Test matrices with reduced rank
+    rng = np.random.RandomState(20120714)
+    for i in range(100):
+        # Make a rank deficient matrix
+        X = rng.normal(size=(40, 10))
+        X[:, 0] = X[:, 1] + X[:, 2]
+        # Assert that matrix_rank detected deficiency
+        assert_equal(matrix_rank(X), 9)
+        X[:, 3] = X[:, 4] + X[:, 5]
+        assert_equal(matrix_rank(X), 8)
+
+
+class TestQR:
+    # Define the array class here, so run this on matrices elsewhere.
+    array = np.array
+
+    def check_qr(self, a):
+        # This test expects the argument `a` to be an ndarray or
+        # a subclass of an ndarray of inexact type.
+        a_type = type(a)
+        a_dtype = a.dtype
+        m, n = a.shape
+        k = min(m, n)
+
+        # mode == 'complete'
+        res = linalg.qr(a, mode='complete')
+        Q, R = res.Q, res.R
+        assert_(Q.dtype == a_dtype)
+        assert_(R.dtype == a_dtype)
+        assert_(isinstance(Q, a_type))
+        assert_(isinstance(R, a_type))
+        assert_(Q.shape == (m, m))
+        assert_(R.shape == (m, n))
+        assert_almost_equal(dot(Q, R), a)
+        assert_almost_equal(dot(Q.T.conj(), Q), np.eye(m))
+        assert_almost_equal(np.triu(R), R)
+
+        # mode == 'reduced'
+        q1, r1 = linalg.qr(a, mode='reduced')
+        assert_(q1.dtype == a_dtype)
+        assert_(r1.dtype == a_dtype)
+        assert_(isinstance(q1, a_type))
+        assert_(isinstance(r1, a_type))
+        assert_(q1.shape == (m, k))
+        assert_(r1.shape == (k, n))
+        assert_almost_equal(dot(q1, r1), a)
+        assert_almost_equal(dot(q1.T.conj(), q1), np.eye(k))
+        assert_almost_equal(np.triu(r1), r1)
+
+        # mode == 'r'
+        r2 = linalg.qr(a, mode='r')
+        assert_(r2.dtype == a_dtype)
+        assert_(isinstance(r2, a_type))
+        assert_almost_equal(r2, r1)
+
+
+    @pytest.mark.parametrize(["m", "n"], [
+        (3, 0),
+        (0, 3),
+        (0, 0)
+    ])
+    def test_qr_empty(self, m, n):
+        k = min(m, n)
+        a = np.empty((m, n))
+
+        self.check_qr(a)
+
+        h, tau = np.linalg.qr(a, mode='raw')
+        assert_equal(h.dtype, np.double)
+        assert_equal(tau.dtype, np.double)
+        assert_equal(h.shape, (n, m))
+        assert_equal(tau.shape, (k,))
+
+    def test_mode_raw(self):
+        # The factorization is not unique and varies between libraries,
+        # so it is not possible to check against known values. Functional
+        # testing is a possibility, but awaits the exposure of more
+        # of the functions in lapack_lite. Consequently, this test is
+        # very limited in scope. Note that the results are in FORTRAN
+        # order, hence the h arrays are transposed.
+        a = self.array([[1, 2], [3, 4], [5, 6]], dtype=np.double)
+
+        # Test double
+        h, tau = linalg.qr(a, mode='raw')
+        assert_(h.dtype == np.double)
+        assert_(tau.dtype == np.double)
+        assert_(h.shape == (2, 3))
+        assert_(tau.shape == (2,))
+
+        h, tau = linalg.qr(a.T, mode='raw')
+        assert_(h.dtype == np.double)
+        assert_(tau.dtype == np.double)
+        assert_(h.shape == (3, 2))
+        assert_(tau.shape == (2,))
+
+    def test_mode_all_but_economic(self):
+        a = self.array([[1, 2], [3, 4]])
+        b = self.array([[1, 2], [3, 4], [5, 6]])
+        for dt in "fd":
+            m1 = a.astype(dt)
+            m2 = b.astype(dt)
+            self.check_qr(m1)
+            self.check_qr(m2)
+            self.check_qr(m2.T)
+
+        for dt in "fd":
+            m1 = 1 + 1j * a.astype(dt)
+            m2 = 1 + 1j * b.astype(dt)
+            self.check_qr(m1)
+            self.check_qr(m2)
+            self.check_qr(m2.T)
+
+    def check_qr_stacked(self, a):
+        # This test expects the argument `a` to be an ndarray or
+        # a subclass of an ndarray of inexact type.
+        a_type = type(a)
+        a_dtype = a.dtype
+        m, n = a.shape[-2:]
+        k = min(m, n)
+
+        # mode == 'complete'
+        q, r = linalg.qr(a, mode='complete')
+        assert_(q.dtype == a_dtype)
+        assert_(r.dtype == a_dtype)
+        assert_(isinstance(q, a_type))
+        assert_(isinstance(r, a_type))
+        assert_(q.shape[-2:] == (m, m))
+        assert_(r.shape[-2:] == (m, n))
+        assert_almost_equal(matmul(q, r), a)
+        I_mat = np.identity(q.shape[-1])
+        stack_I_mat = np.broadcast_to(I_mat,
+                        q.shape[:-2] + (q.shape[-1],)*2)
+        assert_almost_equal(matmul(swapaxes(q, -1, -2).conj(), q), stack_I_mat)
+        assert_almost_equal(np.triu(r[..., :, :]), r)
+
+        # mode == 'reduced'
+        q1, r1 = linalg.qr(a, mode='reduced')
+        assert_(q1.dtype == a_dtype)
+        assert_(r1.dtype == a_dtype)
+        assert_(isinstance(q1, a_type))
+        assert_(isinstance(r1, a_type))
+        assert_(q1.shape[-2:] == (m, k))
+        assert_(r1.shape[-2:] == (k, n))
+        assert_almost_equal(matmul(q1, r1), a)
+        I_mat = np.identity(q1.shape[-1])
+        stack_I_mat = np.broadcast_to(I_mat,
+                        q1.shape[:-2] + (q1.shape[-1],)*2)
+        assert_almost_equal(matmul(swapaxes(q1, -1, -2).conj(), q1),
+                            stack_I_mat)
+        assert_almost_equal(np.triu(r1[..., :, :]), r1)
+
+        # mode == 'r'
+        r2 = linalg.qr(a, mode='r')
+        assert_(r2.dtype == a_dtype)
+        assert_(isinstance(r2, a_type))
+        assert_almost_equal(r2, r1)
+
+    @pytest.mark.parametrize("size", [
+        (3, 4), (4, 3), (4, 4),
+        (3, 0), (0, 3)])
+    @pytest.mark.parametrize("outer_size", [
+        (2, 2), (2,), (2, 3, 4)])
+    @pytest.mark.parametrize("dt", [
+        np.single, np.double,
+        np.csingle, np.cdouble])
+    def test_stacked_inputs(self, outer_size, size, dt):
+
+        A = np.random.normal(size=outer_size + size).astype(dt)
+        B = np.random.normal(size=outer_size + size).astype(dt)
+        self.check_qr_stacked(A)
+        self.check_qr_stacked(A + 1.j*B)
+
+
+class TestCholesky:
+    # TODO: are there no other tests for cholesky?
+
+    @pytest.mark.parametrize(
+        'shape', [(1, 1), (2, 2), (3, 3), (50, 50), (3, 10, 10)]
+    )
+    @pytest.mark.parametrize(
+        'dtype', (np.float32, np.float64, np.complex64, np.complex128)
+    )
+    def test_basic_property(self, shape, dtype):
+        # Check A = L L^H
+        np.random.seed(1)
+        a = np.random.randn(*shape)
+        if np.issubdtype(dtype, np.complexfloating):
+            a = a + 1j*np.random.randn(*shape)
+
+        t = list(range(len(shape)))
+        t[-2:] = -1, -2
+
+        a = np.matmul(a.transpose(t).conj(), a)
+        a = np.asarray(a, dtype=dtype)
+
+        c = np.linalg.cholesky(a)
+
+        b = np.matmul(c, c.transpose(t).conj())
+        with np._no_nep50_warning():
+            atol = 500 * a.shape[0] * np.finfo(dtype).eps
+        assert_allclose(b, a, atol=atol, err_msg=f'{shape} {dtype}\n{a}\n{c}')
+
+    def test_0_size(self):
+        class ArraySubclass(np.ndarray):
+            pass
+        a = np.zeros((0, 1, 1), dtype=np.int_).view(ArraySubclass)
+        res = linalg.cholesky(a)
+        assert_equal(a.shape, res.shape)
+        assert_(res.dtype.type is np.float64)
+        # for documentation purpose:
+        assert_(isinstance(res, np.ndarray))
+
+        a = np.zeros((1, 0, 0), dtype=np.complex64).view(ArraySubclass)
+        res = linalg.cholesky(a)
+        assert_equal(a.shape, res.shape)
+        assert_(res.dtype.type is np.complex64)
+        assert_(isinstance(res, np.ndarray))
+
+
+def test_byteorder_check():
+    # Byte order check should pass for native order
+    if sys.byteorder == 'little':
+        native = '<'
+    else:
+        native = '>'
+
+    for dtt in (np.float32, np.float64):
+        arr = np.eye(4, dtype=dtt)
+        n_arr = arr.newbyteorder(native)
+        sw_arr = arr.newbyteorder('S').byteswap()
+        assert_equal(arr.dtype.byteorder, '=')
+        for routine in (linalg.inv, linalg.det, linalg.pinv):
+            # Normal call
+            res = routine(arr)
+            # Native but not '='
+            assert_array_equal(res, routine(n_arr))
+            # Swapped
+            assert_array_equal(res, routine(sw_arr))
+
+
+@pytest.mark.skipif(IS_WASM, reason="fp errors don't work in wasm")
+def test_generalized_raise_multiloop():
+    # It should raise an error even if the error doesn't occur in the
+    # last iteration of the ufunc inner loop
+
+    invertible = np.array([[1, 2], [3, 4]])
+    non_invertible = np.array([[1, 1], [1, 1]])
+
+    x = np.zeros([4, 4, 2, 2])[1::2]
+    x[...] = invertible
+    x[0, 0] = non_invertible
+
+    assert_raises(np.linalg.LinAlgError, np.linalg.inv, x)
+
+
+def test_xerbla_override():
+    # Check that our xerbla has been successfully linked in. If it is not,
+    # the default xerbla routine is called, which prints a message to stdout
+    # and may, or may not, abort the process depending on the LAPACK package.
+
+    XERBLA_OK = 255
+
+    try:
+        pid = os.fork()
+    except (OSError, AttributeError):
+        # fork failed, or not running on POSIX
+        pytest.skip("Not POSIX or fork failed.")
+
+    if pid == 0:
+        # child; close i/o file handles
+        os.close(1)
+        os.close(0)
+        # Avoid producing core files.
+        import resource
+        resource.setrlimit(resource.RLIMIT_CORE, (0, 0))
+        # These calls may abort.
+        try:
+            np.linalg.lapack_lite.xerbla()
+        except ValueError:
+            pass
+        except Exception:
+            os._exit(os.EX_CONFIG)
+
+        try:
+            a = np.array([[1.]])
+            np.linalg.lapack_lite.dorgqr(
+                1, 1, 1, a,
+                0,  # <- invalid value
+                a, a, 0, 0)
+        except ValueError as e:
+            if "DORGQR parameter number 5" in str(e):
+                # success, reuse error code to mark success as
+                # FORTRAN STOP returns as success.
+                os._exit(XERBLA_OK)
+
+        # Did not abort, but our xerbla was not linked in.
+        os._exit(os.EX_CONFIG)
+    else:
+        # parent
+        pid, status = os.wait()
+        if os.WEXITSTATUS(status) != XERBLA_OK:
+            pytest.skip('Numpy xerbla not linked in.')
+
+
+@pytest.mark.skipif(IS_WASM, reason="Cannot start subprocess")
+@pytest.mark.slow
+def test_sdot_bug_8577():
+    # Regression test that loading certain other libraries does not
+    # result to wrong results in float32 linear algebra.
+    #
+    # There's a bug gh-8577 on OSX that can trigger this, and perhaps
+    # there are also other situations in which it occurs.
+    #
+    # Do the check in a separate process.
+
+    bad_libs = ['PyQt5.QtWidgets', 'IPython']
+
+    template = textwrap.dedent("""
+    import sys
+    {before}
+    try:
+        import {bad_lib}
+    except ImportError:
+        sys.exit(0)
+    {after}
+    x = np.ones(2, dtype=np.float32)
+    sys.exit(0 if np.allclose(x.dot(x), 2.0) else 1)
+    """)
+
+    for bad_lib in bad_libs:
+        code = template.format(before="import numpy as np", after="",
+                               bad_lib=bad_lib)
+        subprocess.check_call([sys.executable, "-c", code])
+
+        # Swapped import order
+        code = template.format(after="import numpy as np", before="",
+                               bad_lib=bad_lib)
+        subprocess.check_call([sys.executable, "-c", code])
+
+
+class TestMultiDot:
+
+    def test_basic_function_with_three_arguments(self):
+        # multi_dot with three arguments uses a fast hand coded algorithm to
+        # determine the optimal order. Therefore test it separately.
+        A = np.random.random((6, 2))
+        B = np.random.random((2, 6))
+        C = np.random.random((6, 2))
+
+        assert_almost_equal(multi_dot([A, B, C]), A.dot(B).dot(C))
+        assert_almost_equal(multi_dot([A, B, C]), np.dot(A, np.dot(B, C)))
+
+    def test_basic_function_with_two_arguments(self):
+        # separate code path with two arguments
+        A = np.random.random((6, 2))
+        B = np.random.random((2, 6))
+
+        assert_almost_equal(multi_dot([A, B]), A.dot(B))
+        assert_almost_equal(multi_dot([A, B]), np.dot(A, B))
+
+    def test_basic_function_with_dynamic_programming_optimization(self):
+        # multi_dot with four or more arguments uses the dynamic programming
+        # optimization and therefore deserve a separate
+        A = np.random.random((6, 2))
+        B = np.random.random((2, 6))
+        C = np.random.random((6, 2))
+        D = np.random.random((2, 1))
+        assert_almost_equal(multi_dot([A, B, C, D]), A.dot(B).dot(C).dot(D))
+
+    def test_vector_as_first_argument(self):
+        # The first argument can be 1-D
+        A1d = np.random.random(2)  # 1-D
+        B = np.random.random((2, 6))
+        C = np.random.random((6, 2))
+        D = np.random.random((2, 2))
+
+        # the result should be 1-D
+        assert_equal(multi_dot([A1d, B, C, D]).shape, (2,))
+
+    def test_vector_as_last_argument(self):
+        # The last argument can be 1-D
+        A = np.random.random((6, 2))
+        B = np.random.random((2, 6))
+        C = np.random.random((6, 2))
+        D1d = np.random.random(2)  # 1-D
+
+        # the result should be 1-D
+        assert_equal(multi_dot([A, B, C, D1d]).shape, (6,))
+
+    def test_vector_as_first_and_last_argument(self):
+        # The first and last arguments can be 1-D
+        A1d = np.random.random(2)  # 1-D
+        B = np.random.random((2, 6))
+        C = np.random.random((6, 2))
+        D1d = np.random.random(2)  # 1-D
+
+        # the result should be a scalar
+        assert_equal(multi_dot([A1d, B, C, D1d]).shape, ())
+
+    def test_three_arguments_and_out(self):
+        # multi_dot with three arguments uses a fast hand coded algorithm to
+        # determine the optimal order. Therefore test it separately.
+        A = np.random.random((6, 2))
+        B = np.random.random((2, 6))
+        C = np.random.random((6, 2))
+
+        out = np.zeros((6, 2))
+        ret = multi_dot([A, B, C], out=out)
+        assert out is ret
+        assert_almost_equal(out, A.dot(B).dot(C))
+        assert_almost_equal(out, np.dot(A, np.dot(B, C)))
+
+    def test_two_arguments_and_out(self):
+        # separate code path with two arguments
+        A = np.random.random((6, 2))
+        B = np.random.random((2, 6))
+        out = np.zeros((6, 6))
+        ret = multi_dot([A, B], out=out)
+        assert out is ret
+        assert_almost_equal(out, A.dot(B))
+        assert_almost_equal(out, np.dot(A, B))
+
+    def test_dynamic_programming_optimization_and_out(self):
+        # multi_dot with four or more arguments uses the dynamic programming
+        # optimization and therefore deserve a separate test
+        A = np.random.random((6, 2))
+        B = np.random.random((2, 6))
+        C = np.random.random((6, 2))
+        D = np.random.random((2, 1))
+        out = np.zeros((6, 1))
+        ret = multi_dot([A, B, C, D], out=out)
+        assert out is ret
+        assert_almost_equal(out, A.dot(B).dot(C).dot(D))
+
+    def test_dynamic_programming_logic(self):
+        # Test for the dynamic programming part
+        # This test is directly taken from Cormen page 376.
+        arrays = [np.random.random((30, 35)),
+                  np.random.random((35, 15)),
+                  np.random.random((15, 5)),
+                  np.random.random((5, 10)),
+                  np.random.random((10, 20)),
+                  np.random.random((20, 25))]
+        m_expected = np.array([[0., 15750., 7875., 9375., 11875., 15125.],
+                               [0.,     0., 2625., 4375.,  7125., 10500.],
+                               [0.,     0.,    0.,  750.,  2500.,  5375.],
+                               [0.,     0.,    0.,    0.,  1000.,  3500.],
+                               [0.,     0.,    0.,    0.,     0.,  5000.],
+                               [0.,     0.,    0.,    0.,     0.,     0.]])
+        s_expected = np.array([[0,  1,  1,  3,  3,  3],
+                               [0,  0,  2,  3,  3,  3],
+                               [0,  0,  0,  3,  3,  3],
+                               [0,  0,  0,  0,  4,  5],
+                               [0,  0,  0,  0,  0,  5],
+                               [0,  0,  0,  0,  0,  0]], dtype=int)
+        s_expected -= 1  # Cormen uses 1-based index, python does not.
+
+        s, m = _multi_dot_matrix_chain_order(arrays, return_costs=True)
+
+        # Only the upper triangular part (without the diagonal) is interesting.
+        assert_almost_equal(np.triu(s[:-1, 1:]),
+                            np.triu(s_expected[:-1, 1:]))
+        assert_almost_equal(np.triu(m), np.triu(m_expected))
+
+    def test_too_few_input_arrays(self):
+        assert_raises(ValueError, multi_dot, [])
+        assert_raises(ValueError, multi_dot, [np.random.random((3, 3))])
+
+
+class TestTensorinv:
+
+    @pytest.mark.parametrize("arr, ind", [
+        (np.ones((4, 6, 8, 2)), 2),
+        (np.ones((3, 3, 2)), 1),
+        ])
+    def test_non_square_handling(self, arr, ind):
+        with assert_raises(LinAlgError):
+            linalg.tensorinv(arr, ind=ind)
+
+    @pytest.mark.parametrize("shape, ind", [
+        # examples from docstring
+        ((4, 6, 8, 3), 2),
+        ((24, 8, 3), 1),
+        ])
+    def test_tensorinv_shape(self, shape, ind):
+        a = np.eye(24)
+        a.shape = shape
+        ainv = linalg.tensorinv(a=a, ind=ind)
+        expected = a.shape[ind:] + a.shape[:ind]
+        actual = ainv.shape
+        assert_equal(actual, expected)
+
+    @pytest.mark.parametrize("ind", [
+        0, -2,
+        ])
+    def test_tensorinv_ind_limit(self, ind):
+        a = np.eye(24)
+        a.shape = (4, 6, 8, 3)
+        with assert_raises(ValueError):
+            linalg.tensorinv(a=a, ind=ind)
+
+    def test_tensorinv_result(self):
+        # mimic a docstring example
+        a = np.eye(24)
+        a.shape = (24, 8, 3)
+        ainv = linalg.tensorinv(a, ind=1)
+        b = np.ones(24)
+        assert_allclose(np.tensordot(ainv, b, 1), np.linalg.tensorsolve(a, b))
+
+
+class TestTensorsolve:
+
+    @pytest.mark.parametrize("a, axes", [
+        (np.ones((4, 6, 8, 2)), None),
+        (np.ones((3, 3, 2)), (0, 2)),
+        ])
+    def test_non_square_handling(self, a, axes):
+        with assert_raises(LinAlgError):
+            b = np.ones(a.shape[:2])
+            linalg.tensorsolve(a, b, axes=axes)
+
+    @pytest.mark.parametrize("shape",
+        [(2, 3, 6), (3, 4, 4, 3), (0, 3, 3, 0)],
+    )
+    def test_tensorsolve_result(self, shape):
+        a = np.random.randn(*shape)
+        b = np.ones(a.shape[:2])
+        x = np.linalg.tensorsolve(a, b)
+        assert_allclose(np.tensordot(a, x, axes=len(x.shape)), b)
+
+
+def test_unsupported_commontype():
+    # linalg gracefully handles unsupported type
+    arr = np.array([[1, -2], [2, 5]], dtype='float16')
+    with assert_raises_regex(TypeError, "unsupported in linalg"):
+        linalg.cholesky(arr)
+
+
+#@pytest.mark.slow
+#@pytest.mark.xfail(not HAS_LAPACK64, run=False,
+#                   reason="Numpy not compiled with 64-bit BLAS/LAPACK")
+#@requires_memory(free_bytes=16e9)
+@pytest.mark.skip(reason="Bad memory reports lead to OOM in ci testing")
+def test_blas64_dot():
+    n = 2**32
+    a = np.zeros([1, n], dtype=np.float32)
+    b = np.ones([1, 1], dtype=np.float32)
+    a[0,-1] = 1
+    c = np.dot(b, a)
+    assert_equal(c[0,-1], 1)
+
+
+@pytest.mark.xfail(not HAS_LAPACK64,
+                   reason="Numpy not compiled with 64-bit BLAS/LAPACK")
+def test_blas64_geqrf_lwork_smoketest():
+    # Smoke test LAPACK geqrf lwork call with 64-bit integers
+    dtype = np.float64
+    lapack_routine = np.linalg.lapack_lite.dgeqrf
+
+    m = 2**32 + 1
+    n = 2**32 + 1
+    lda = m
+
+    # Dummy arrays, not referenced by the lapack routine, so don't
+    # need to be of the right size
+    a = np.zeros([1, 1], dtype=dtype)
+    work = np.zeros([1], dtype=dtype)
+    tau = np.zeros([1], dtype=dtype)
+
+    # Size query
+    results = lapack_routine(m, n, a, lda, tau, work, -1, 0)
+    assert_equal(results['info'], 0)
+    assert_equal(results['m'], m)
+    assert_equal(results['n'], m)
+
+    # Should result to an integer of a reasonable size
+    lwork = int(work.item())
+    assert_(2**32 < lwork < 2**42)
diff --git a/lib/python3.12/site-packages/numpy/linalg/tests/test_regression.py b/lib/python3.12/site-packages/numpy/linalg/tests/test_regression.py
new file mode 100644
index 0000000000000000000000000000000000000000..af38443a93c3b74d4344130ab7bbac0206e9f7f7
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/linalg/tests/test_regression.py
@@ -0,0 +1,145 @@
+""" Test functions for linalg module
+"""
+import warnings
+
+import numpy as np
+from numpy import linalg, arange, float64, array, dot, transpose
+from numpy.testing import (
+    assert_, assert_raises, assert_equal, assert_array_equal,
+    assert_array_almost_equal, assert_array_less
+)
+
+
+class TestRegression:
+
+    def test_eig_build(self):
+        # Ticket #652
+        rva = array([1.03221168e+02 + 0.j,
+                     -1.91843603e+01 + 0.j,
+                     -6.04004526e-01 + 15.84422474j,
+                     -6.04004526e-01 - 15.84422474j,
+                     -1.13692929e+01 + 0.j,
+                     -6.57612485e-01 + 10.41755503j,
+                     -6.57612485e-01 - 10.41755503j,
+                     1.82126812e+01 + 0.j,
+                     1.06011014e+01 + 0.j,
+                     7.80732773e+00 + 0.j,
+                     -7.65390898e-01 + 0.j,
+                     1.51971555e-15 + 0.j,
+                     -1.51308713e-15 + 0.j])
+        a = arange(13 * 13, dtype=float64)
+        a.shape = (13, 13)
+        a = a % 17
+        va, ve = linalg.eig(a)
+        va.sort()
+        rva.sort()
+        assert_array_almost_equal(va, rva)
+
+    def test_eigh_build(self):
+        # Ticket 662.
+        rvals = [68.60568999, 89.57756725, 106.67185574]
+
+        cov = array([[77.70273908,   3.51489954,  15.64602427],
+                     [3.51489954,  88.97013878,  -1.07431931],
+                     [15.64602427,  -1.07431931,  98.18223512]])
+
+        vals, vecs = linalg.eigh(cov)
+        assert_array_almost_equal(vals, rvals)
+
+    def test_svd_build(self):
+        # Ticket 627.
+        a = array([[0., 1.], [1., 1.], [2., 1.], [3., 1.]])
+        m, n = a.shape
+        u, s, vh = linalg.svd(a)
+
+        b = dot(transpose(u[:, n:]), a)
+
+        assert_array_almost_equal(b, np.zeros((2, 2)))
+
+    def test_norm_vector_badarg(self):
+        # Regression for #786: Frobenius norm for vectors raises
+        # ValueError.
+        assert_raises(ValueError, linalg.norm, array([1., 2., 3.]), 'fro')
+
+    def test_lapack_endian(self):
+        # For bug #1482
+        a = array([[5.7998084,  -2.1825367],
+                   [-2.1825367,   9.85910595]], dtype='>f8')
+        b = array(a, dtype=' 0.5)
+                assert_equal(c, 1)
+                assert_equal(np.linalg.matrix_rank(a), 1)
+                assert_array_less(1, np.linalg.norm(a, ord=2))
+
+    def test_norm_object_array(self):
+        # gh-7575
+        testvector = np.array([np.array([0, 1]), 0, 0], dtype=object)
+
+        norm = linalg.norm(testvector)
+        assert_array_equal(norm, [0, 1])
+        assert_(norm.dtype == np.dtype('float64'))
+
+        norm = linalg.norm(testvector, ord=1)
+        assert_array_equal(norm, [0, 1])
+        assert_(norm.dtype != np.dtype('float64'))
+
+        norm = linalg.norm(testvector, ord=2)
+        assert_array_equal(norm, [0, 1])
+        assert_(norm.dtype == np.dtype('float64'))
+
+        assert_raises(ValueError, linalg.norm, testvector, ord='fro')
+        assert_raises(ValueError, linalg.norm, testvector, ord='nuc')
+        assert_raises(ValueError, linalg.norm, testvector, ord=np.inf)
+        assert_raises(ValueError, linalg.norm, testvector, ord=-np.inf)
+        assert_raises(ValueError, linalg.norm, testvector, ord=0)
+        assert_raises(ValueError, linalg.norm, testvector, ord=-1)
+        assert_raises(ValueError, linalg.norm, testvector, ord=-2)
+
+        testmatrix = np.array([[np.array([0, 1]), 0, 0],
+                               [0,                0, 0]], dtype=object)
+
+        norm = linalg.norm(testmatrix)
+        assert_array_equal(norm, [0, 1])
+        assert_(norm.dtype == np.dtype('float64'))
+
+        norm = linalg.norm(testmatrix, ord='fro')
+        assert_array_equal(norm, [0, 1])
+        assert_(norm.dtype == np.dtype('float64'))
+
+        assert_raises(TypeError, linalg.norm, testmatrix, ord='nuc')
+        assert_raises(ValueError, linalg.norm, testmatrix, ord=np.inf)
+        assert_raises(ValueError, linalg.norm, testmatrix, ord=-np.inf)
+        assert_raises(ValueError, linalg.norm, testmatrix, ord=0)
+        assert_raises(ValueError, linalg.norm, testmatrix, ord=1)
+        assert_raises(ValueError, linalg.norm, testmatrix, ord=-1)
+        assert_raises(TypeError, linalg.norm, testmatrix, ord=2)
+        assert_raises(TypeError, linalg.norm, testmatrix, ord=-2)
+        assert_raises(ValueError, linalg.norm, testmatrix, ord=3)
+
+    def test_lstsq_complex_larger_rhs(self):
+        # gh-9891
+        size = 20
+        n_rhs = 70
+        G = np.random.randn(size, size) + 1j * np.random.randn(size, size)
+        u = np.random.randn(size, n_rhs) + 1j * np.random.randn(size, n_rhs)
+        b = G.dot(u)
+        # This should work without segmentation fault.
+        u_lstsq, res, rank, sv = linalg.lstsq(G, b, rcond=None)
+        # check results just in case
+        assert_array_almost_equal(u_lstsq, u)
diff --git a/lib/python3.12/site-packages/numpy/random/LICENSE.md b/lib/python3.12/site-packages/numpy/random/LICENSE.md
new file mode 100644
index 0000000000000000000000000000000000000000..a6cf1b17e99725556ac56ce3661498df1ee2276a
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/random/LICENSE.md
@@ -0,0 +1,71 @@
+**This software is dual-licensed under the The University of Illinois/NCSA
+Open Source License (NCSA) and The 3-Clause BSD License**
+
+# NCSA Open Source License
+**Copyright (c) 2019 Kevin Sheppard. All rights reserved.**
+
+Developed by: Kevin Sheppard (,
+)
+[http://www.kevinsheppard.com](http://www.kevinsheppard.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal with
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+of the Software, and to permit persons to whom the Software is furnished to do
+so, subject to the following conditions:
+
+Redistributions of source code must retain the above copyright notice, this
+list of conditions and the following disclaimers.
+
+Redistributions in binary form must reproduce the above copyright notice, this
+list of conditions and the following disclaimers in the documentation and/or
+other materials provided with the distribution.
+
+Neither the names of Kevin Sheppard, nor the names of any contributors may be
+used to endorse or promote products derived from this Software without specific
+prior written permission.
+
+**THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH
+THE SOFTWARE.**
+
+
+# 3-Clause BSD License
+**Copyright (c) 2019 Kevin Sheppard. All rights reserved.**
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice,
+   this list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright notice,
+   this list of conditions and the following disclaimer in the documentation
+   and/or other materials provided with the distribution.
+
+3. Neither the name of the copyright holder nor the names of its contributors
+   may be used to endorse or promote products derived from this software
+   without specific prior written permission.
+
+**THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGE.**
+
+# Components
+
+Many parts of this module have been derived from original sources, 
+often the algorithm's designer. Component licenses are located with 
+the component code.
diff --git a/lib/python3.12/site-packages/numpy/random/__init__.pxd b/lib/python3.12/site-packages/numpy/random/__init__.pxd
new file mode 100644
index 0000000000000000000000000000000000000000..1f9057296ba9475574a191cf231dc04ace3f910c
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/random/__init__.pxd
@@ -0,0 +1,14 @@
+cimport numpy as np
+from libc.stdint cimport uint32_t, uint64_t
+
+cdef extern from "numpy/random/bitgen.h":
+    struct bitgen:
+        void *state
+        uint64_t (*next_uint64)(void *st) nogil
+        uint32_t (*next_uint32)(void *st) nogil
+        double (*next_double)(void *st) nogil
+        uint64_t (*next_raw)(void *st) nogil
+
+    ctypedef bitgen bitgen_t
+
+from numpy.random.bit_generator cimport BitGenerator, SeedSequence
diff --git a/lib/python3.12/site-packages/numpy/random/__init__.py b/lib/python3.12/site-packages/numpy/random/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..2e8f99fe3045b9c2b691a8ece67d0f06d9d73b08
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/random/__init__.py
@@ -0,0 +1,215 @@
+"""
+========================
+Random Number Generation
+========================
+
+Use ``default_rng()`` to create a `Generator` and call its methods.
+
+=============== =========================================================
+Generator
+--------------- ---------------------------------------------------------
+Generator       Class implementing all of the random number distributions
+default_rng     Default constructor for ``Generator``
+=============== =========================================================
+
+============================================= ===
+BitGenerator Streams that work with Generator
+--------------------------------------------- ---
+MT19937
+PCG64
+PCG64DXSM
+Philox
+SFC64
+============================================= ===
+
+============================================= ===
+Getting entropy to initialize a BitGenerator
+--------------------------------------------- ---
+SeedSequence
+============================================= ===
+
+
+Legacy
+------
+
+For backwards compatibility with previous versions of numpy before 1.17, the
+various aliases to the global `RandomState` methods are left alone and do not
+use the new `Generator` API.
+
+==================== =========================================================
+Utility functions
+-------------------- ---------------------------------------------------------
+random               Uniformly distributed floats over ``[0, 1)``
+bytes                Uniformly distributed random bytes.
+permutation          Randomly permute a sequence / generate a random sequence.
+shuffle              Randomly permute a sequence in place.
+choice               Random sample from 1-D array.
+==================== =========================================================
+
+==================== =========================================================
+Compatibility
+functions - removed
+in the new API
+-------------------- ---------------------------------------------------------
+rand                 Uniformly distributed values.
+randn                Normally distributed values.
+ranf                 Uniformly distributed floating point numbers.
+random_integers      Uniformly distributed integers in a given range.
+                     (deprecated, use ``integers(..., closed=True)`` instead)
+random_sample        Alias for `random_sample`
+randint              Uniformly distributed integers in a given range
+seed                 Seed the legacy random number generator.
+==================== =========================================================
+
+==================== =========================================================
+Univariate
+distributions
+-------------------- ---------------------------------------------------------
+beta                 Beta distribution over ``[0, 1]``.
+binomial             Binomial distribution.
+chisquare            :math:`\\chi^2` distribution.
+exponential          Exponential distribution.
+f                    F (Fisher-Snedecor) distribution.
+gamma                Gamma distribution.
+geometric            Geometric distribution.
+gumbel               Gumbel distribution.
+hypergeometric       Hypergeometric distribution.
+laplace              Laplace distribution.
+logistic             Logistic distribution.
+lognormal            Log-normal distribution.
+logseries            Logarithmic series distribution.
+negative_binomial    Negative binomial distribution.
+noncentral_chisquare Non-central chi-square distribution.
+noncentral_f         Non-central F distribution.
+normal               Normal / Gaussian distribution.
+pareto               Pareto distribution.
+poisson              Poisson distribution.
+power                Power distribution.
+rayleigh             Rayleigh distribution.
+triangular           Triangular distribution.
+uniform              Uniform distribution.
+vonmises             Von Mises circular distribution.
+wald                 Wald (inverse Gaussian) distribution.
+weibull              Weibull distribution.
+zipf                 Zipf's distribution over ranked data.
+==================== =========================================================
+
+==================== ==========================================================
+Multivariate
+distributions
+-------------------- ----------------------------------------------------------
+dirichlet            Multivariate generalization of Beta distribution.
+multinomial          Multivariate generalization of the binomial distribution.
+multivariate_normal  Multivariate generalization of the normal distribution.
+==================== ==========================================================
+
+==================== =========================================================
+Standard
+distributions
+-------------------- ---------------------------------------------------------
+standard_cauchy      Standard Cauchy-Lorentz distribution.
+standard_exponential Standard exponential distribution.
+standard_gamma       Standard Gamma distribution.
+standard_normal      Standard normal distribution.
+standard_t           Standard Student's t-distribution.
+==================== =========================================================
+
+==================== =========================================================
+Internal functions
+-------------------- ---------------------------------------------------------
+get_state            Get tuple representing internal state of generator.
+set_state            Set state of generator.
+==================== =========================================================
+
+
+"""
+__all__ = [
+    'beta',
+    'binomial',
+    'bytes',
+    'chisquare',
+    'choice',
+    'dirichlet',
+    'exponential',
+    'f',
+    'gamma',
+    'geometric',
+    'get_state',
+    'gumbel',
+    'hypergeometric',
+    'laplace',
+    'logistic',
+    'lognormal',
+    'logseries',
+    'multinomial',
+    'multivariate_normal',
+    'negative_binomial',
+    'noncentral_chisquare',
+    'noncentral_f',
+    'normal',
+    'pareto',
+    'permutation',
+    'poisson',
+    'power',
+    'rand',
+    'randint',
+    'randn',
+    'random',
+    'random_integers',
+    'random_sample',
+    'ranf',
+    'rayleigh',
+    'sample',
+    'seed',
+    'set_state',
+    'shuffle',
+    'standard_cauchy',
+    'standard_exponential',
+    'standard_gamma',
+    'standard_normal',
+    'standard_t',
+    'triangular',
+    'uniform',
+    'vonmises',
+    'wald',
+    'weibull',
+    'zipf',
+]
+
+# add these for module-freeze analysis (like PyInstaller)
+from . import _pickle
+from . import _common
+from . import _bounded_integers
+
+from ._generator import Generator, default_rng
+from .bit_generator import SeedSequence, BitGenerator
+from ._mt19937 import MT19937
+from ._pcg64 import PCG64, PCG64DXSM
+from ._philox import Philox
+from ._sfc64 import SFC64
+from .mtrand import *
+
+__all__ += ['Generator', 'RandomState', 'SeedSequence', 'MT19937',
+            'Philox', 'PCG64', 'PCG64DXSM', 'SFC64', 'default_rng',
+            'BitGenerator']
+
+
+def __RandomState_ctor():
+    """Return a RandomState instance.
+
+    This function exists solely to assist (un)pickling.
+
+    Note that the state of the RandomState returned here is irrelevant, as this
+    function's entire purpose is to return a newly allocated RandomState whose
+    state pickle can set.  Consequently the RandomState returned by this function
+    is a freshly allocated copy with a seed=0.
+
+    See https://github.com/numpy/numpy/issues/4763 for a detailed discussion
+
+    """
+    return RandomState(seed=0)
+
+
+from numpy._pytesttester import PytestTester
+test = PytestTester(__name__)
+del PytestTester
diff --git a/lib/python3.12/site-packages/numpy/random/__init__.pyi b/lib/python3.12/site-packages/numpy/random/__init__.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..99ef6f3e2f2a0e45db86589e73c3c8bb36b18ea2
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/random/__init__.pyi
@@ -0,0 +1,72 @@
+from numpy._pytesttester import PytestTester
+
+from numpy.random._generator import Generator as Generator
+from numpy.random._generator import default_rng as default_rng
+from numpy.random._mt19937 import MT19937 as MT19937
+from numpy.random._pcg64 import (
+    PCG64 as PCG64,
+    PCG64DXSM as PCG64DXSM,
+)
+from numpy.random._philox import Philox as Philox
+from numpy.random._sfc64 import SFC64 as SFC64
+from numpy.random.bit_generator import BitGenerator as BitGenerator
+from numpy.random.bit_generator import SeedSequence as SeedSequence
+from numpy.random.mtrand import (
+    RandomState as RandomState,
+    beta as beta,
+    binomial as binomial,
+    bytes as bytes,
+    chisquare as chisquare,
+    choice as choice,
+    dirichlet as dirichlet,
+    exponential as exponential,
+    f as f,
+    gamma as gamma,
+    geometric as geometric,
+    get_bit_generator as get_bit_generator,
+    get_state as get_state,
+    gumbel as gumbel,
+    hypergeometric as hypergeometric,
+    laplace as laplace,
+    logistic as logistic,
+    lognormal as lognormal,
+    logseries as logseries,
+    multinomial as multinomial,
+    multivariate_normal as multivariate_normal,
+    negative_binomial as negative_binomial,
+    noncentral_chisquare as noncentral_chisquare,
+    noncentral_f as noncentral_f,
+    normal as normal,
+    pareto as pareto,
+    permutation as permutation,
+    poisson as poisson,
+    power as power,
+    rand as rand,
+    randint as randint,
+    randn as randn,
+    random as random,
+    random_integers as random_integers,
+    random_sample as random_sample,
+    ranf as ranf,
+    rayleigh as rayleigh,
+    sample as sample,
+    seed as seed,
+    set_bit_generator as set_bit_generator,
+    set_state as set_state,
+    shuffle as shuffle,
+    standard_cauchy as standard_cauchy,
+    standard_exponential as standard_exponential,
+    standard_gamma as standard_gamma,
+    standard_normal as standard_normal,
+    standard_t as standard_t,
+    triangular as triangular,
+    uniform as uniform,
+    vonmises as vonmises,
+    wald as wald,
+    weibull as weibull,
+    zipf as zipf,
+)
+
+__all__: list[str]
+__path__: list[str]
+test: PytestTester
diff --git a/lib/python3.12/site-packages/numpy/random/__pycache__/__init__.cpython-312.pyc b/lib/python3.12/site-packages/numpy/random/__pycache__/__init__.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..110c19da4ae126142037a23c5fc7fae9b121f11d
Binary files /dev/null and b/lib/python3.12/site-packages/numpy/random/__pycache__/__init__.cpython-312.pyc differ
diff --git a/lib/python3.12/site-packages/numpy/random/__pycache__/_pickle.cpython-312.pyc b/lib/python3.12/site-packages/numpy/random/__pycache__/_pickle.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..0dc02cd82661f8afc8c847b9e175ea5af902c21a
Binary files /dev/null and b/lib/python3.12/site-packages/numpy/random/__pycache__/_pickle.cpython-312.pyc differ
diff --git a/lib/python3.12/site-packages/numpy/random/_bounded_integers.pxd b/lib/python3.12/site-packages/numpy/random/_bounded_integers.pxd
new file mode 100644
index 0000000000000000000000000000000000000000..7e41463a903e0238d18c553b295c39b6ed8af938
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/random/_bounded_integers.pxd
@@ -0,0 +1,29 @@
+from libc.stdint cimport (uint8_t, uint16_t, uint32_t, uint64_t,
+                          int8_t, int16_t, int32_t, int64_t, intptr_t)
+import numpy as np
+cimport numpy as np
+ctypedef np.npy_bool bool_t
+
+from numpy.random cimport bitgen_t
+
+cdef inline uint64_t _gen_mask(uint64_t max_val) nogil:
+    """Mask generator for use in bounded random numbers"""
+    # Smallest bit mask >= max
+    cdef uint64_t mask = max_val
+    mask |= mask >> 1
+    mask |= mask >> 2
+    mask |= mask >> 4
+    mask |= mask >> 8
+    mask |= mask >> 16
+    mask |= mask >> 32
+    return mask
+
+cdef object _rand_uint64(object low, object high, object size, bint use_masked, bint closed, bitgen_t *state, object lock)
+cdef object _rand_uint32(object low, object high, object size, bint use_masked, bint closed, bitgen_t *state, object lock)
+cdef object _rand_uint16(object low, object high, object size, bint use_masked, bint closed, bitgen_t *state, object lock)
+cdef object _rand_uint8(object low, object high, object size, bint use_masked, bint closed, bitgen_t *state, object lock)
+cdef object _rand_bool(object low, object high, object size, bint use_masked, bint closed, bitgen_t *state, object lock)
+cdef object _rand_int64(object low, object high, object size, bint use_masked, bint closed, bitgen_t *state, object lock)
+cdef object _rand_int32(object low, object high, object size, bint use_masked, bint closed, bitgen_t *state, object lock)
+cdef object _rand_int16(object low, object high, object size, bint use_masked, bint closed, bitgen_t *state, object lock)
+cdef object _rand_int8(object low, object high, object size, bint use_masked, bint closed, bitgen_t *state, object lock)
diff --git a/lib/python3.12/site-packages/numpy/random/_common.pxd b/lib/python3.12/site-packages/numpy/random/_common.pxd
new file mode 100644
index 0000000000000000000000000000000000000000..659da0d2daa789089d4d7987c885161237b85141
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/random/_common.pxd
@@ -0,0 +1,106 @@
+#cython: language_level=3
+
+from libc.stdint cimport uint32_t, uint64_t, int32_t, int64_t
+
+import numpy as np
+cimport numpy as np
+
+from numpy.random cimport bitgen_t
+
+cdef double POISSON_LAM_MAX
+cdef double LEGACY_POISSON_LAM_MAX
+cdef uint64_t MAXSIZE
+
+cdef enum ConstraintType:
+    CONS_NONE
+    CONS_NON_NEGATIVE
+    CONS_POSITIVE
+    CONS_POSITIVE_NOT_NAN
+    CONS_BOUNDED_0_1
+    CONS_BOUNDED_GT_0_1
+    CONS_BOUNDED_LT_0_1
+    CONS_GT_1
+    CONS_GTE_1
+    CONS_POISSON
+    LEGACY_CONS_POISSON
+
+ctypedef ConstraintType constraint_type
+
+cdef object benchmark(bitgen_t *bitgen, object lock, Py_ssize_t cnt, object method)
+cdef object random_raw(bitgen_t *bitgen, object lock, object size, object output)
+cdef object prepare_cffi(bitgen_t *bitgen)
+cdef object prepare_ctypes(bitgen_t *bitgen)
+cdef int check_constraint(double val, object name, constraint_type cons) except -1
+cdef int check_array_constraint(np.ndarray val, object name, constraint_type cons) except -1
+
+cdef extern from "include/aligned_malloc.h":
+    cdef void *PyArray_realloc_aligned(void *p, size_t n)
+    cdef void *PyArray_malloc_aligned(size_t n)
+    cdef void *PyArray_calloc_aligned(size_t n, size_t s)
+    cdef void PyArray_free_aligned(void *p)
+
+ctypedef void (*random_double_fill)(bitgen_t *state, np.npy_intp count, double* out)  noexcept nogil
+ctypedef double (*random_double_0)(void *state)  noexcept nogil
+ctypedef double (*random_double_1)(void *state, double a)  noexcept nogil
+ctypedef double (*random_double_2)(void *state, double a, double b)  noexcept nogil
+ctypedef double (*random_double_3)(void *state, double a, double b, double c)  noexcept nogil
+
+ctypedef void (*random_float_fill)(bitgen_t *state, np.npy_intp count, float* out)  noexcept nogil
+ctypedef float (*random_float_0)(bitgen_t *state)  noexcept nogil
+ctypedef float (*random_float_1)(bitgen_t *state, float a)  noexcept nogil
+
+ctypedef int64_t (*random_uint_0)(void *state)  noexcept nogil
+ctypedef int64_t (*random_uint_d)(void *state, double a)  noexcept nogil
+ctypedef int64_t (*random_uint_dd)(void *state, double a, double b)  noexcept nogil
+ctypedef int64_t (*random_uint_di)(void *state, double a, uint64_t b)  noexcept nogil
+ctypedef int64_t (*random_uint_i)(void *state, int64_t a)  noexcept nogil
+ctypedef int64_t (*random_uint_iii)(void *state, int64_t a, int64_t b, int64_t c)  noexcept nogil
+
+ctypedef uint32_t (*random_uint_0_32)(bitgen_t *state)  noexcept nogil
+ctypedef uint32_t (*random_uint_1_i_32)(bitgen_t *state, uint32_t a)  noexcept nogil
+
+ctypedef int32_t (*random_int_2_i_32)(bitgen_t *state, int32_t a, int32_t b)  noexcept nogil
+ctypedef int64_t (*random_int_2_i)(bitgen_t *state, int64_t a, int64_t b)  noexcept nogil
+
+cdef double kahan_sum(double *darr, np.npy_intp n) noexcept
+
+cdef inline double uint64_to_double(uint64_t rnd) noexcept nogil:
+    return (rnd >> 11) * (1.0 / 9007199254740992.0)
+
+cdef object double_fill(void *func, bitgen_t *state, object size, object lock, object out)
+
+cdef object float_fill(void *func, bitgen_t *state, object size, object lock, object out)
+
+cdef object float_fill_from_double(void *func, bitgen_t *state, object size, object lock, object out)
+
+cdef object wrap_int(object val, object bits)
+
+cdef np.ndarray int_to_array(object value, object name, object bits, object uint_size)
+
+cdef validate_output_shape(iter_shape, np.ndarray output)
+
+cdef object cont(void *func, void *state, object size, object lock, int narg,
+                 object a, object a_name, constraint_type a_constraint,
+                 object b, object b_name, constraint_type b_constraint,
+                 object c, object c_name, constraint_type c_constraint,
+                 object out)
+
+cdef object disc(void *func, void *state, object size, object lock,
+                 int narg_double, int narg_int64,
+                 object a, object a_name, constraint_type a_constraint,
+                 object b, object b_name, constraint_type b_constraint,
+                 object c, object c_name, constraint_type c_constraint)
+
+cdef object cont_f(void *func, bitgen_t *state, object size, object lock,
+                   object a, object a_name, constraint_type a_constraint,
+                   object out)
+
+cdef object cont_broadcast_3(void *func, void *state, object size, object lock,
+                             np.ndarray a_arr, object a_name, constraint_type a_constraint,
+                             np.ndarray b_arr, object b_name, constraint_type b_constraint,
+                             np.ndarray c_arr, object c_name, constraint_type c_constraint)
+
+cdef object discrete_broadcast_iii(void *func, void *state, object size, object lock,
+                                   np.ndarray a_arr, object a_name, constraint_type a_constraint,
+                                   np.ndarray b_arr, object b_name, constraint_type b_constraint,
+                                   np.ndarray c_arr, object c_name, constraint_type c_constraint)
diff --git a/lib/python3.12/site-packages/numpy/random/_examples/cffi/__pycache__/extending.cpython-312.pyc b/lib/python3.12/site-packages/numpy/random/_examples/cffi/__pycache__/extending.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..6663b34342625e4318f523474d3b848056659e21
Binary files /dev/null and b/lib/python3.12/site-packages/numpy/random/_examples/cffi/__pycache__/extending.cpython-312.pyc differ
diff --git a/lib/python3.12/site-packages/numpy/random/_examples/cffi/__pycache__/parse.cpython-312.pyc b/lib/python3.12/site-packages/numpy/random/_examples/cffi/__pycache__/parse.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..bf85de1cd1cf553570f8edf8c88d90fba7f33741
Binary files /dev/null and b/lib/python3.12/site-packages/numpy/random/_examples/cffi/__pycache__/parse.cpython-312.pyc differ
diff --git a/lib/python3.12/site-packages/numpy/random/_examples/cffi/extending.py b/lib/python3.12/site-packages/numpy/random/_examples/cffi/extending.py
new file mode 100644
index 0000000000000000000000000000000000000000..8440d400ea9178bb17efc68fde1f8cca1f66c189
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/random/_examples/cffi/extending.py
@@ -0,0 +1,40 @@
+"""
+Use cffi to access any of the underlying C functions from distributions.h
+"""
+import os
+import numpy as np
+import cffi
+from .parse import parse_distributions_h
+ffi = cffi.FFI()
+
+inc_dir = os.path.join(np.get_include(), 'numpy')
+
+# Basic numpy types
+ffi.cdef('''
+    typedef intptr_t npy_intp;
+    typedef unsigned char npy_bool;
+
+''')
+
+parse_distributions_h(ffi, inc_dir)
+
+lib = ffi.dlopen(np.random._generator.__file__)
+
+# Compare the distributions.h random_standard_normal_fill to
+# Generator.standard_random
+bit_gen = np.random.PCG64()
+rng = np.random.Generator(bit_gen)
+state = bit_gen.state
+
+interface = rng.bit_generator.cffi
+n = 100
+vals_cffi = ffi.new('double[%d]' % n)
+lib.random_standard_normal_fill(interface.bit_generator, n, vals_cffi)
+
+# reset the state
+bit_gen.state = state
+
+vals = rng.standard_normal(n)
+
+for i in range(n):
+    assert vals[i] == vals_cffi[i]
diff --git a/lib/python3.12/site-packages/numpy/random/_examples/cffi/parse.py b/lib/python3.12/site-packages/numpy/random/_examples/cffi/parse.py
new file mode 100644
index 0000000000000000000000000000000000000000..d41c4c2db23df58f2ee8755e2088b1e7b4aba8e1
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/random/_examples/cffi/parse.py
@@ -0,0 +1,54 @@
+import os
+
+
+def parse_distributions_h(ffi, inc_dir):
+    """
+    Parse distributions.h located in inc_dir for CFFI, filling in the ffi.cdef
+
+    Read the function declarations without the "#define ..." macros that will
+    be filled in when loading the library.
+    """
+
+    with open(os.path.join(inc_dir, 'random', 'bitgen.h')) as fid:
+        s = []
+        for line in fid:
+            # massage the include file
+            if line.strip().startswith('#'):
+                continue
+            s.append(line)
+        ffi.cdef('\n'.join(s))
+
+    with open(os.path.join(inc_dir, 'random', 'distributions.h')) as fid:
+        s = []
+        in_skip = 0
+        ignoring = False
+        for line in fid:
+            # check for and remove extern "C" guards
+            if ignoring:
+                if line.strip().startswith('#endif'):
+                    ignoring = False
+                continue
+            if line.strip().startswith('#ifdef __cplusplus'):
+                ignoring = True
+            
+            # massage the include file
+            if line.strip().startswith('#'):
+                continue
+    
+            # skip any inlined function definition
+            # which starts with 'static inline xxx(...) {'
+            # and ends with a closing '}'
+            if line.strip().startswith('static inline'):
+                in_skip += line.count('{')
+                continue
+            elif in_skip > 0:
+                in_skip += line.count('{')
+                in_skip -= line.count('}')
+                continue
+    
+            # replace defines with their value or remove them
+            line = line.replace('DECLDIR', '')
+            line = line.replace('RAND_INT_TYPE', 'int64_t')
+            s.append(line)
+        ffi.cdef('\n'.join(s))
+
diff --git a/lib/python3.12/site-packages/numpy/random/_examples/cython/extending.pyx b/lib/python3.12/site-packages/numpy/random/_examples/cython/extending.pyx
new file mode 100644
index 0000000000000000000000000000000000000000..30efd7447748c1747e11bd4a053d0e01911fa2e7
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/random/_examples/cython/extending.pyx
@@ -0,0 +1,78 @@
+#!/usr/bin/env python3
+#cython: language_level=3
+
+from libc.stdint cimport uint32_t
+from cpython.pycapsule cimport PyCapsule_IsValid, PyCapsule_GetPointer
+
+import numpy as np
+cimport numpy as np
+cimport cython
+
+from numpy.random cimport bitgen_t
+from numpy.random import PCG64
+
+np.import_array()
+
+
+@cython.boundscheck(False)
+@cython.wraparound(False)
+def uniform_mean(Py_ssize_t n):
+    cdef Py_ssize_t i
+    cdef bitgen_t *rng
+    cdef const char *capsule_name = "BitGenerator"
+    cdef double[::1] random_values
+    cdef np.ndarray randoms
+
+    x = PCG64()
+    capsule = x.capsule
+    if not PyCapsule_IsValid(capsule, capsule_name):
+        raise ValueError("Invalid pointer to anon_func_state")
+    rng =  PyCapsule_GetPointer(capsule, capsule_name)
+    random_values = np.empty(n)
+    # Best practice is to acquire the lock whenever generating random values.
+    # This prevents other threads from modifying the state. Acquiring the lock
+    # is only necessary if the GIL is also released, as in this example.
+    with x.lock, nogil:
+        for i in range(n):
+            random_values[i] = rng.next_double(rng.state)
+    randoms = np.asarray(random_values)
+    return randoms.mean()
+
+
+# This function is declared nogil so it can be used without the GIL below
+cdef uint32_t bounded_uint(uint32_t lb, uint32_t ub, bitgen_t *rng) nogil:
+    cdef uint32_t mask, delta, val
+    mask = delta = ub - lb
+    mask |= mask >> 1
+    mask |= mask >> 2
+    mask |= mask >> 4
+    mask |= mask >> 8
+    mask |= mask >> 16
+
+    val = rng.next_uint32(rng.state) & mask
+    while val > delta:
+        val = rng.next_uint32(rng.state) & mask
+
+    return lb + val
+
+
+@cython.boundscheck(False)
+@cython.wraparound(False)
+def bounded_uints(uint32_t lb, uint32_t ub, Py_ssize_t n):
+    cdef Py_ssize_t i
+    cdef bitgen_t *rng
+    cdef uint32_t[::1] out
+    cdef const char *capsule_name = "BitGenerator"
+
+    x = PCG64()
+    out = np.empty(n, dtype=np.uint32)
+    capsule = x.capsule
+
+    if not PyCapsule_IsValid(capsule, capsule_name):
+        raise ValueError("Invalid pointer to anon_func_state")
+    rng = PyCapsule_GetPointer(capsule, capsule_name)
+
+    with x.lock, nogil:
+        for i in range(n):
+            out[i] = bounded_uint(lb, ub, rng)
+    return np.asarray(out)
diff --git a/lib/python3.12/site-packages/numpy/random/_examples/cython/extending_distributions.pyx b/lib/python3.12/site-packages/numpy/random/_examples/cython/extending_distributions.pyx
new file mode 100644
index 0000000000000000000000000000000000000000..d908e92d01b055589284666f5bb64fe4120c083c
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/random/_examples/cython/extending_distributions.pyx
@@ -0,0 +1,117 @@
+#!/usr/bin/env python3
+#cython: language_level=3
+"""
+This file shows how the to use a BitGenerator to create a distribution.
+"""
+import numpy as np
+cimport numpy as np
+cimport cython
+from cpython.pycapsule cimport PyCapsule_IsValid, PyCapsule_GetPointer
+from libc.stdint cimport uint16_t, uint64_t
+from numpy.random cimport bitgen_t
+from numpy.random import PCG64
+from numpy.random.c_distributions cimport (
+      random_standard_uniform_fill, random_standard_uniform_fill_f)
+
+
+@cython.boundscheck(False)
+@cython.wraparound(False)
+def uniforms(Py_ssize_t n):
+    """
+    Create an array of `n` uniformly distributed doubles.
+    A 'real' distribution would want to process the values into
+    some non-uniform distribution
+    """
+    cdef Py_ssize_t i
+    cdef bitgen_t *rng
+    cdef const char *capsule_name = "BitGenerator"
+    cdef double[::1] random_values
+
+    x = PCG64()
+    capsule = x.capsule
+    # Optional check that the capsule if from a BitGenerator
+    if not PyCapsule_IsValid(capsule, capsule_name):
+        raise ValueError("Invalid pointer to anon_func_state")
+    # Cast the pointer
+    rng =  PyCapsule_GetPointer(capsule, capsule_name)
+    random_values = np.empty(n, dtype='float64')
+    with x.lock, nogil:
+        for i in range(n):
+            # Call the function
+            random_values[i] = rng.next_double(rng.state)
+    randoms = np.asarray(random_values)
+
+    return randoms
+
+# cython example 2
+@cython.boundscheck(False)
+@cython.wraparound(False)
+def uint10_uniforms(Py_ssize_t n):
+    """Uniform 10 bit integers stored as 16-bit unsigned integers"""
+    cdef Py_ssize_t i
+    cdef bitgen_t *rng
+    cdef const char *capsule_name = "BitGenerator"
+    cdef uint16_t[::1] random_values
+    cdef int bits_remaining
+    cdef int width = 10
+    cdef uint64_t buff, mask = 0x3FF
+
+    x = PCG64()
+    capsule = x.capsule
+    if not PyCapsule_IsValid(capsule, capsule_name):
+        raise ValueError("Invalid pointer to anon_func_state")
+    rng =  PyCapsule_GetPointer(capsule, capsule_name)
+    random_values = np.empty(n, dtype='uint16')
+    # Best practice is to release GIL and acquire the lock
+    bits_remaining = 0
+    with x.lock, nogil:
+        for i in range(n):
+            if bits_remaining < width:
+                buff = rng.next_uint64(rng.state)
+            random_values[i] = buff & mask
+            buff >>= width
+
+    randoms = np.asarray(random_values)
+    return randoms
+
+# cython example 3
+def uniforms_ex(bit_generator, Py_ssize_t n, dtype=np.float64):
+    """
+    Create an array of `n` uniformly distributed doubles via a "fill" function.
+
+    A 'real' distribution would want to process the values into
+    some non-uniform distribution
+
+    Parameters
+    ----------
+    bit_generator: BitGenerator instance
+    n: int
+        Output vector length
+    dtype: {str, dtype}, optional
+        Desired dtype, either 'd' (or 'float64') or 'f' (or 'float32'). The
+        default dtype value is 'd'
+    """
+    cdef Py_ssize_t i
+    cdef bitgen_t *rng
+    cdef const char *capsule_name = "BitGenerator"
+    cdef np.ndarray randoms
+
+    capsule = bit_generator.capsule
+    # Optional check that the capsule if from a BitGenerator
+    if not PyCapsule_IsValid(capsule, capsule_name):
+        raise ValueError("Invalid pointer to anon_func_state")
+    # Cast the pointer
+    rng =  PyCapsule_GetPointer(capsule, capsule_name)
+
+    _dtype = np.dtype(dtype)
+    randoms = np.empty(n, dtype=_dtype)
+    if _dtype == np.float32:
+        with bit_generator.lock:
+            random_standard_uniform_fill_f(rng, n, np.PyArray_DATA(randoms))
+    elif _dtype == np.float64:
+        with bit_generator.lock:
+            random_standard_uniform_fill(rng, n, np.PyArray_DATA(randoms))
+    else:
+        raise TypeError('Unsupported dtype %r for random' % _dtype)
+    return randoms
+
diff --git a/lib/python3.12/site-packages/numpy/random/_examples/cython/meson.build b/lib/python3.12/site-packages/numpy/random/_examples/cython/meson.build
new file mode 100644
index 0000000000000000000000000000000000000000..c00837d49d97b88cc7a756e056d51b90f0a49c60
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/random/_examples/cython/meson.build
@@ -0,0 +1,45 @@
+project('random-build-examples', 'c', 'cpp', 'cython')
+
+py_mod = import('python')
+py3 = py_mod.find_installation(pure: false)
+
+cc = meson.get_compiler('c')
+cy = meson.get_compiler('cython')
+
+if not cy.version().version_compare('>=0.29.35')
+  error('tests requires Cython >= 0.29.35')
+endif
+
+_numpy_abs = run_command(py3, ['-c',
+               'import os; os.chdir(".."); import numpy; print(os.path.abspath(numpy.get_include() + "../../.."))'],
+                         check: true).stdout().strip()
+
+npymath_path = _numpy_abs / 'core' / 'lib'
+npy_include_path = _numpy_abs / 'core' / 'include'
+npyrandom_path = _numpy_abs / 'random' / 'lib'
+npymath_lib = cc.find_library('npymath', dirs: npymath_path)
+npyrandom_lib = cc.find_library('npyrandom', dirs: npyrandom_path)
+
+py3.extension_module(
+    'extending_distributions',
+    'extending_distributions.pyx',
+    install: false,
+    include_directories: [npy_include_path],
+    dependencies: [npyrandom_lib, npymath_lib],
+)
+py3.extension_module(
+    'extending',
+    'extending.pyx',
+    install: false,
+    include_directories: [npy_include_path],
+    dependencies: [npyrandom_lib, npymath_lib],
+)
+py3.extension_module(
+    'extending_cpp',
+    'extending_distributions.pyx',
+    install: false,
+    override_options : ['cython_language=cpp'],
+    cython_args: ['--module-name', 'extending_cpp'],
+    include_directories: [npy_include_path],
+    dependencies: [npyrandom_lib, npymath_lib],
+)
diff --git a/lib/python3.12/site-packages/numpy/random/_examples/numba/__pycache__/extending.cpython-312.pyc b/lib/python3.12/site-packages/numpy/random/_examples/numba/__pycache__/extending.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..7bcccd6c63570d0b110b34a5b27cf99f29ecf7c6
Binary files /dev/null and b/lib/python3.12/site-packages/numpy/random/_examples/numba/__pycache__/extending.cpython-312.pyc differ
diff --git a/lib/python3.12/site-packages/numpy/random/_examples/numba/__pycache__/extending_distributions.cpython-312.pyc b/lib/python3.12/site-packages/numpy/random/_examples/numba/__pycache__/extending_distributions.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..6fdf79494b91b74bcc369af6b6cb4f8b42f4729b
Binary files /dev/null and b/lib/python3.12/site-packages/numpy/random/_examples/numba/__pycache__/extending_distributions.cpython-312.pyc differ
diff --git a/lib/python3.12/site-packages/numpy/random/_examples/numba/extending.py b/lib/python3.12/site-packages/numpy/random/_examples/numba/extending.py
new file mode 100644
index 0000000000000000000000000000000000000000..f387db69502a4bfe8731d540a7a741b062fea861
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/random/_examples/numba/extending.py
@@ -0,0 +1,84 @@
+import numpy as np
+import numba as nb
+
+from numpy.random import PCG64
+from timeit import timeit
+
+bit_gen = PCG64()
+next_d = bit_gen.cffi.next_double
+state_addr = bit_gen.cffi.state_address
+
+def normals(n, state):
+    out = np.empty(n)
+    for i in range((n + 1) // 2):
+        x1 = 2.0 * next_d(state) - 1.0
+        x2 = 2.0 * next_d(state) - 1.0
+        r2 = x1 * x1 + x2 * x2
+        while r2 >= 1.0 or r2 == 0.0:
+            x1 = 2.0 * next_d(state) - 1.0
+            x2 = 2.0 * next_d(state) - 1.0
+            r2 = x1 * x1 + x2 * x2
+        f = np.sqrt(-2.0 * np.log(r2) / r2)
+        out[2 * i] = f * x1
+        if 2 * i + 1 < n:
+            out[2 * i + 1] = f * x2
+    return out
+
+# Compile using Numba
+normalsj = nb.jit(normals, nopython=True)
+# Must use state address not state with numba
+n = 10000
+
+def numbacall():
+    return normalsj(n, state_addr)
+
+rg = np.random.Generator(PCG64())
+
+def numpycall():
+    return rg.normal(size=n)
+
+# Check that the functions work
+r1 = numbacall()
+r2 = numpycall()
+assert r1.shape == (n,)
+assert r1.shape == r2.shape
+
+t1 = timeit(numbacall, number=1000)
+print(f'{t1:.2f} secs for {n} PCG64 (Numba/PCG64) gaussian randoms')
+t2 = timeit(numpycall, number=1000)
+print(f'{t2:.2f} secs for {n} PCG64 (NumPy/PCG64) gaussian randoms')
+
+# example 2
+
+next_u32 = bit_gen.ctypes.next_uint32
+ctypes_state = bit_gen.ctypes.state
+
+@nb.jit(nopython=True)
+def bounded_uint(lb, ub, state):
+    mask = delta = ub - lb
+    mask |= mask >> 1
+    mask |= mask >> 2
+    mask |= mask >> 4
+    mask |= mask >> 8
+    mask |= mask >> 16
+
+    val = next_u32(state) & mask
+    while val > delta:
+        val = next_u32(state) & mask
+
+    return lb + val
+
+
+print(bounded_uint(323, 2394691, ctypes_state.value))
+
+
+@nb.jit(nopython=True)
+def bounded_uints(lb, ub, n, state):
+    out = np.empty(n, dtype=np.uint32)
+    for i in range(n):
+        out[i] = bounded_uint(lb, ub, state)
+
+
+bounded_uints(323, 2394691, 10000000, ctypes_state.value)
+
+
diff --git a/lib/python3.12/site-packages/numpy/random/_examples/numba/extending_distributions.py b/lib/python3.12/site-packages/numpy/random/_examples/numba/extending_distributions.py
new file mode 100644
index 0000000000000000000000000000000000000000..7cf8bf0b05353449fb82bcca8f0e86f38eea7693
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/random/_examples/numba/extending_distributions.py
@@ -0,0 +1,67 @@
+r"""
+Building the required library in this example requires a source distribution
+of NumPy or clone of the NumPy git repository since distributions.c is not
+included in binary distributions.
+
+On *nix, execute in numpy/random/src/distributions
+
+export ${PYTHON_VERSION}=3.8 # Python version
+export PYTHON_INCLUDE=#path to Python's include folder, usually \
+    ${PYTHON_HOME}/include/python${PYTHON_VERSION}m
+export NUMPY_INCLUDE=#path to numpy's include folder, usually \
+    ${PYTHON_HOME}/lib/python${PYTHON_VERSION}/site-packages/numpy/core/include
+gcc -shared -o libdistributions.so -fPIC distributions.c \
+    -I${NUMPY_INCLUDE} -I${PYTHON_INCLUDE}
+mv libdistributions.so ../../_examples/numba/
+
+On Windows
+
+rem PYTHON_HOME and PYTHON_VERSION are setup dependent, this is an example
+set PYTHON_HOME=c:\Anaconda
+set PYTHON_VERSION=38
+cl.exe /LD .\distributions.c -DDLL_EXPORT \
+    -I%PYTHON_HOME%\lib\site-packages\numpy\core\include \
+    -I%PYTHON_HOME%\include %PYTHON_HOME%\libs\python%PYTHON_VERSION%.lib
+move distributions.dll ../../_examples/numba/
+"""
+import os
+
+import numba as nb
+import numpy as np
+from cffi import FFI
+
+from numpy.random import PCG64
+
+ffi = FFI()
+if os.path.exists('./distributions.dll'):
+    lib = ffi.dlopen('./distributions.dll')
+elif os.path.exists('./libdistributions.so'):
+    lib = ffi.dlopen('./libdistributions.so')
+else:
+    raise RuntimeError('Required DLL/so file was not found.')
+
+ffi.cdef("""
+double random_standard_normal(void *bitgen_state);
+""")
+x = PCG64()
+xffi = x.cffi
+bit_generator = xffi.bit_generator
+
+random_standard_normal = lib.random_standard_normal
+
+
+def normals(n, bit_generator):
+    out = np.empty(n)
+    for i in range(n):
+        out[i] = random_standard_normal(bit_generator)
+    return out
+
+
+normalsj = nb.jit(normals, nopython=True)
+
+# Numba requires a memory address for void *
+# Can also get address from x.ctypes.bit_generator.value
+bit_generator_address = int(ffi.cast('uintptr_t', bit_generator))
+
+norm = normalsj(1000, bit_generator_address)
+print(norm[:12])
diff --git a/lib/python3.12/site-packages/numpy/random/_generator.pyi b/lib/python3.12/site-packages/numpy/random/_generator.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..e1cdefb15b772149ee390bf201893718e2191f17
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/random/_generator.pyi
@@ -0,0 +1,681 @@
+from collections.abc import Callable
+from typing import Any, Union, overload, TypeVar, Literal
+
+from numpy import (
+    bool_,
+    dtype,
+    float32,
+    float64,
+    int8,
+    int16,
+    int32,
+    int64,
+    int_,
+    ndarray,
+    uint,
+    uint8,
+    uint16,
+    uint32,
+    uint64,
+)
+from numpy.random import BitGenerator, SeedSequence
+from numpy._typing import (
+    ArrayLike,
+    _ArrayLikeFloat_co,
+    _ArrayLikeInt_co,
+    _DoubleCodes,
+    _DTypeLikeBool,
+    _DTypeLikeInt,
+    _DTypeLikeUInt,
+    _Float32Codes,
+    _Float64Codes,
+    _FloatLike_co,
+    _Int8Codes,
+    _Int16Codes,
+    _Int32Codes,
+    _Int64Codes,
+    _IntCodes,
+    _ShapeLike,
+    _SingleCodes,
+    _SupportsDType,
+    _UInt8Codes,
+    _UInt16Codes,
+    _UInt32Codes,
+    _UInt64Codes,
+    _UIntCodes,
+)
+
+_ArrayType = TypeVar("_ArrayType", bound=ndarray[Any, Any])
+
+_DTypeLikeFloat32 = Union[
+    dtype[float32],
+    _SupportsDType[dtype[float32]],
+    type[float32],
+    _Float32Codes,
+    _SingleCodes,
+]
+
+_DTypeLikeFloat64 = Union[
+    dtype[float64],
+    _SupportsDType[dtype[float64]],
+    type[float],
+    type[float64],
+    _Float64Codes,
+    _DoubleCodes,
+]
+
+class Generator:
+    def __init__(self, bit_generator: BitGenerator) -> None: ...
+    def __repr__(self) -> str: ...
+    def __str__(self) -> str: ...
+    def __getstate__(self) -> dict[str, Any]: ...
+    def __setstate__(self, state: dict[str, Any]) -> None: ...
+    def __reduce__(self) -> tuple[Callable[[str], Generator], tuple[str], dict[str, Any]]: ...
+    @property
+    def bit_generator(self) -> BitGenerator: ...
+    def spawn(self, n_children: int) -> list[Generator]: ...
+    def bytes(self, length: int) -> bytes: ...
+    @overload
+    def standard_normal(  # type: ignore[misc]
+        self,
+        size: None = ...,
+        dtype: _DTypeLikeFloat32 | _DTypeLikeFloat64 = ...,
+        out: None = ...,
+    ) -> float: ...
+    @overload
+    def standard_normal(  # type: ignore[misc]
+        self,
+        size: _ShapeLike = ...,
+    ) -> ndarray[Any, dtype[float64]]: ...
+    @overload
+    def standard_normal(  # type: ignore[misc]
+        self,
+        *,
+        out: ndarray[Any, dtype[float64]] = ...,
+    ) -> ndarray[Any, dtype[float64]]: ...
+    @overload
+    def standard_normal(  # type: ignore[misc]
+        self,
+        size: _ShapeLike = ...,
+        dtype: _DTypeLikeFloat32 = ...,
+        out: None | ndarray[Any, dtype[float32]] = ...,
+    ) -> ndarray[Any, dtype[float32]]: ...
+    @overload
+    def standard_normal(  # type: ignore[misc]
+        self,
+        size: _ShapeLike = ...,
+        dtype: _DTypeLikeFloat64 = ...,
+        out: None | ndarray[Any, dtype[float64]] = ...,
+    ) -> ndarray[Any, dtype[float64]]: ...
+    @overload
+    def permutation(self, x: int, axis: int = ...) -> ndarray[Any, dtype[int64]]: ...
+    @overload
+    def permutation(self, x: ArrayLike, axis: int = ...) -> ndarray[Any, Any]: ...
+    @overload
+    def standard_exponential(  # type: ignore[misc]
+        self,
+        size: None = ...,
+        dtype: _DTypeLikeFloat32 | _DTypeLikeFloat64 = ...,
+        method: Literal["zig", "inv"] = ...,
+        out: None = ...,
+    ) -> float: ...
+    @overload
+    def standard_exponential(
+        self,
+        size: _ShapeLike = ...,
+    ) -> ndarray[Any, dtype[float64]]: ...
+    @overload
+    def standard_exponential(
+        self,
+        *,
+        out: ndarray[Any, dtype[float64]] = ...,
+    ) -> ndarray[Any, dtype[float64]]: ...
+    @overload
+    def standard_exponential(
+        self,
+        size: _ShapeLike = ...,
+        *,
+        method: Literal["zig", "inv"] = ...,
+        out: None | ndarray[Any, dtype[float64]] = ...,
+    ) -> ndarray[Any, dtype[float64]]: ...
+    @overload
+    def standard_exponential(
+        self,
+        size: _ShapeLike = ...,
+        dtype: _DTypeLikeFloat32 = ...,
+        method: Literal["zig", "inv"] = ...,
+        out: None | ndarray[Any, dtype[float32]] = ...,
+    ) -> ndarray[Any, dtype[float32]]: ...
+    @overload
+    def standard_exponential(
+        self,
+        size: _ShapeLike = ...,
+        dtype: _DTypeLikeFloat64 = ...,
+        method: Literal["zig", "inv"] = ...,
+        out: None | ndarray[Any, dtype[float64]] = ...,
+    ) -> ndarray[Any, dtype[float64]]: ...
+    @overload
+    def random(  # type: ignore[misc]
+        self,
+        size: None = ...,
+        dtype: _DTypeLikeFloat32 | _DTypeLikeFloat64 = ...,
+        out: None = ...,
+    ) -> float: ...
+    @overload
+    def random(
+        self,
+        *,
+        out: ndarray[Any, dtype[float64]] = ...,
+    ) -> ndarray[Any, dtype[float64]]: ...
+    @overload
+    def random(
+        self,
+        size: _ShapeLike = ...,
+        *,
+        out: None | ndarray[Any, dtype[float64]] = ...,
+    ) -> ndarray[Any, dtype[float64]]: ...
+    @overload
+    def random(
+        self,
+        size: _ShapeLike = ...,
+        dtype: _DTypeLikeFloat32 = ...,
+        out: None | ndarray[Any, dtype[float32]] = ...,
+    ) -> ndarray[Any, dtype[float32]]: ...
+    @overload
+    def random(
+        self,
+        size: _ShapeLike = ...,
+        dtype: _DTypeLikeFloat64 = ...,
+        out: None | ndarray[Any, dtype[float64]] = ...,
+    ) -> ndarray[Any, dtype[float64]]: ...
+    @overload
+    def beta(
+        self,
+        a: _FloatLike_co,
+        b: _FloatLike_co,
+        size: None = ...,
+    ) -> float: ...  # type: ignore[misc]
+    @overload
+    def beta(
+        self, a: _ArrayLikeFloat_co, b: _ArrayLikeFloat_co, size: None | _ShapeLike = ...
+    ) -> ndarray[Any, dtype[float64]]: ...
+    @overload
+    def exponential(self, scale: _FloatLike_co = ..., size: None = ...) -> float: ...  # type: ignore[misc]
+    @overload
+    def exponential(
+        self, scale: _ArrayLikeFloat_co = ..., size: None | _ShapeLike = ...
+    ) -> ndarray[Any, dtype[float64]]: ...
+    @overload
+    def integers(  # type: ignore[misc]
+        self,
+        low: int,
+        high: None | int = ...,
+    ) -> int: ...
+    @overload
+    def integers(  # type: ignore[misc]
+        self,
+        low: int,
+        high: None | int = ...,
+        size: None = ...,
+        dtype: _DTypeLikeBool = ...,
+        endpoint: bool = ...,
+    ) -> bool: ...
+    @overload
+    def integers(  # type: ignore[misc]
+        self,
+        low: int,
+        high: None | int = ...,
+        size: None = ...,
+        dtype: _DTypeLikeInt | _DTypeLikeUInt = ...,
+        endpoint: bool = ...,
+    ) -> int: ...
+    @overload
+    def integers(  # type: ignore[misc]
+        self,
+        low: _ArrayLikeInt_co,
+        high: None | _ArrayLikeInt_co = ...,
+        size: None | _ShapeLike = ...,
+    ) -> ndarray[Any, dtype[int64]]: ...
+    @overload
+    def integers(  # type: ignore[misc]
+        self,
+        low: _ArrayLikeInt_co,
+        high: None | _ArrayLikeInt_co = ...,
+        size: None | _ShapeLike = ...,
+        dtype: _DTypeLikeBool = ...,
+        endpoint: bool = ...,
+    ) -> ndarray[Any, dtype[bool_]]: ...
+    @overload
+    def integers(  # type: ignore[misc]
+        self,
+        low: _ArrayLikeInt_co,
+        high: None | _ArrayLikeInt_co = ...,
+        size: None | _ShapeLike = ...,
+        dtype: dtype[int8] | type[int8] | _Int8Codes | _SupportsDType[dtype[int8]] = ...,
+        endpoint: bool = ...,
+    ) -> ndarray[Any, dtype[int8]]: ...
+    @overload
+    def integers(  # type: ignore[misc]
+        self,
+        low: _ArrayLikeInt_co,
+        high: None | _ArrayLikeInt_co = ...,
+        size: None | _ShapeLike = ...,
+        dtype: dtype[int16] | type[int16] | _Int16Codes | _SupportsDType[dtype[int16]] = ...,
+        endpoint: bool = ...,
+    ) -> ndarray[Any, dtype[int16]]: ...
+    @overload
+    def integers(  # type: ignore[misc]
+        self,
+        low: _ArrayLikeInt_co,
+        high: None | _ArrayLikeInt_co = ...,
+        size: None | _ShapeLike = ...,
+        dtype: dtype[int32] | type[int32] | _Int32Codes | _SupportsDType[dtype[int32]] = ...,
+        endpoint: bool = ...,
+    ) -> ndarray[Any, dtype[int32]]: ...
+    @overload
+    def integers(  # type: ignore[misc]
+        self,
+        low: _ArrayLikeInt_co,
+        high: None | _ArrayLikeInt_co = ...,
+        size: None | _ShapeLike = ...,
+        dtype: None | dtype[int64] | type[int64] | _Int64Codes | _SupportsDType[dtype[int64]] = ...,
+        endpoint: bool = ...,
+    ) -> ndarray[Any, dtype[int64]]: ...
+    @overload
+    def integers(  # type: ignore[misc]
+        self,
+        low: _ArrayLikeInt_co,
+        high: None | _ArrayLikeInt_co = ...,
+        size: None | _ShapeLike = ...,
+        dtype: dtype[uint8] | type[uint8] | _UInt8Codes | _SupportsDType[dtype[uint8]] = ...,
+        endpoint: bool = ...,
+    ) -> ndarray[Any, dtype[uint8]]: ...
+    @overload
+    def integers(  # type: ignore[misc]
+        self,
+        low: _ArrayLikeInt_co,
+        high: None | _ArrayLikeInt_co = ...,
+        size: None | _ShapeLike = ...,
+        dtype: dtype[uint16] | type[uint16] | _UInt16Codes | _SupportsDType[dtype[uint16]] = ...,
+        endpoint: bool = ...,
+    ) -> ndarray[Any, dtype[uint16]]: ...
+    @overload
+    def integers(  # type: ignore[misc]
+        self,
+        low: _ArrayLikeInt_co,
+        high: None | _ArrayLikeInt_co = ...,
+        size: None | _ShapeLike = ...,
+        dtype: dtype[uint32] | type[uint32] | _UInt32Codes | _SupportsDType[dtype[uint32]] = ...,
+        endpoint: bool = ...,
+    ) -> ndarray[Any, dtype[uint32]]: ...
+    @overload
+    def integers(  # type: ignore[misc]
+        self,
+        low: _ArrayLikeInt_co,
+        high: None | _ArrayLikeInt_co = ...,
+        size: None | _ShapeLike = ...,
+        dtype: dtype[uint64] | type[uint64] | _UInt64Codes | _SupportsDType[dtype[uint64]] = ...,
+        endpoint: bool = ...,
+    ) -> ndarray[Any, dtype[uint64]]: ...
+    @overload
+    def integers(  # type: ignore[misc]
+        self,
+        low: _ArrayLikeInt_co,
+        high: None | _ArrayLikeInt_co = ...,
+        size: None | _ShapeLike = ...,
+        dtype: dtype[int_] | type[int] | type[int_] | _IntCodes | _SupportsDType[dtype[int_]] = ...,
+        endpoint: bool = ...,
+    ) -> ndarray[Any, dtype[int_]]: ...
+    @overload
+    def integers(  # type: ignore[misc]
+        self,
+        low: _ArrayLikeInt_co,
+        high: None | _ArrayLikeInt_co = ...,
+        size: None | _ShapeLike = ...,
+        dtype: dtype[uint] | type[uint] | _UIntCodes | _SupportsDType[dtype[uint]] = ...,
+        endpoint: bool = ...,
+    ) -> ndarray[Any, dtype[uint]]: ...
+    # TODO: Use a TypeVar _T here to get away from Any output?  Should be int->ndarray[Any,dtype[int64]], ArrayLike[_T] -> _T | ndarray[Any,Any]
+    @overload
+    def choice(
+        self,
+        a: int,
+        size: None = ...,
+        replace: bool = ...,
+        p: None | _ArrayLikeFloat_co = ...,
+        axis: int = ...,
+        shuffle: bool = ...,
+    ) -> int: ...
+    @overload
+    def choice(
+        self,
+        a: int,
+        size: _ShapeLike = ...,
+        replace: bool = ...,
+        p: None | _ArrayLikeFloat_co = ...,
+        axis: int = ...,
+        shuffle: bool = ...,
+    ) -> ndarray[Any, dtype[int64]]: ...
+    @overload
+    def choice(
+        self,
+        a: ArrayLike,
+        size: None = ...,
+        replace: bool = ...,
+        p: None | _ArrayLikeFloat_co = ...,
+        axis: int = ...,
+        shuffle: bool = ...,
+    ) -> Any: ...
+    @overload
+    def choice(
+        self,
+        a: ArrayLike,
+        size: _ShapeLike = ...,
+        replace: bool = ...,
+        p: None | _ArrayLikeFloat_co = ...,
+        axis: int = ...,
+        shuffle: bool = ...,
+    ) -> ndarray[Any, Any]: ...
+    @overload
+    def uniform(
+        self,
+        low: _FloatLike_co = ...,
+        high: _FloatLike_co = ...,
+        size: None = ...,
+    ) -> float: ...  # type: ignore[misc]
+    @overload
+    def uniform(
+        self,
+        low: _ArrayLikeFloat_co = ...,
+        high: _ArrayLikeFloat_co = ...,
+        size: None | _ShapeLike = ...,
+    ) -> ndarray[Any, dtype[float64]]: ...
+    @overload
+    def normal(
+        self,
+        loc: _FloatLike_co = ...,
+        scale: _FloatLike_co = ...,
+        size: None = ...,
+    ) -> float: ...  # type: ignore[misc]
+    @overload
+    def normal(
+        self,
+        loc: _ArrayLikeFloat_co = ...,
+        scale: _ArrayLikeFloat_co = ...,
+        size: None | _ShapeLike = ...,
+    ) -> ndarray[Any, dtype[float64]]: ...
+    @overload
+    def standard_gamma(  # type: ignore[misc]
+        self,
+        shape: _FloatLike_co,
+        size: None = ...,
+        dtype: _DTypeLikeFloat32 | _DTypeLikeFloat64 = ...,
+        out: None = ...,
+    ) -> float: ...
+    @overload
+    def standard_gamma(
+        self,
+        shape: _ArrayLikeFloat_co,
+        size: None | _ShapeLike = ...,
+    ) -> ndarray[Any, dtype[float64]]: ...
+    @overload
+    def standard_gamma(
+        self,
+        shape: _ArrayLikeFloat_co,
+        *,
+        out: ndarray[Any, dtype[float64]] = ...,
+    ) -> ndarray[Any, dtype[float64]]: ...
+    @overload
+    def standard_gamma(
+        self,
+        shape: _ArrayLikeFloat_co,
+        size: None | _ShapeLike = ...,
+        dtype: _DTypeLikeFloat32 = ...,
+        out: None | ndarray[Any, dtype[float32]] = ...,
+    ) -> ndarray[Any, dtype[float32]]: ...
+    @overload
+    def standard_gamma(
+        self,
+        shape: _ArrayLikeFloat_co,
+        size: None | _ShapeLike = ...,
+        dtype: _DTypeLikeFloat64 = ...,
+        out: None | ndarray[Any, dtype[float64]] = ...,
+    ) -> ndarray[Any, dtype[float64]]: ...
+    @overload
+    def gamma(self, shape: _FloatLike_co, scale: _FloatLike_co = ..., size: None = ...) -> float: ...  # type: ignore[misc]
+    @overload
+    def gamma(
+        self,
+        shape: _ArrayLikeFloat_co,
+        scale: _ArrayLikeFloat_co = ...,
+        size: None | _ShapeLike = ...,
+    ) -> ndarray[Any, dtype[float64]]: ...
+    @overload
+    def f(self, dfnum: _FloatLike_co, dfden: _FloatLike_co, size: None = ...) -> float: ...  # type: ignore[misc]
+    @overload
+    def f(
+        self, dfnum: _ArrayLikeFloat_co, dfden: _ArrayLikeFloat_co, size: None | _ShapeLike = ...
+    ) -> ndarray[Any, dtype[float64]]: ...
+    @overload
+    def noncentral_f(self, dfnum: _FloatLike_co, dfden: _FloatLike_co, nonc: _FloatLike_co, size: None = ...) -> float: ...  # type: ignore[misc]
+    @overload
+    def noncentral_f(
+        self,
+        dfnum: _ArrayLikeFloat_co,
+        dfden: _ArrayLikeFloat_co,
+        nonc: _ArrayLikeFloat_co,
+        size: None | _ShapeLike = ...,
+    ) -> ndarray[Any, dtype[float64]]: ...
+    @overload
+    def chisquare(self, df: _FloatLike_co, size: None = ...) -> float: ...  # type: ignore[misc]
+    @overload
+    def chisquare(
+        self, df: _ArrayLikeFloat_co, size: None | _ShapeLike = ...
+    ) -> ndarray[Any, dtype[float64]]: ...
+    @overload
+    def noncentral_chisquare(self, df: _FloatLike_co, nonc: _FloatLike_co, size: None = ...) -> float: ...  # type: ignore[misc]
+    @overload
+    def noncentral_chisquare(
+        self, df: _ArrayLikeFloat_co, nonc: _ArrayLikeFloat_co, size: None | _ShapeLike = ...
+    ) -> ndarray[Any, dtype[float64]]: ...
+    @overload
+    def standard_t(self, df: _FloatLike_co, size: None = ...) -> float: ...  # type: ignore[misc]
+    @overload
+    def standard_t(
+        self, df: _ArrayLikeFloat_co, size: None = ...
+    ) -> ndarray[Any, dtype[float64]]: ...
+    @overload
+    def standard_t(
+        self, df: _ArrayLikeFloat_co, size: _ShapeLike = ...
+    ) -> ndarray[Any, dtype[float64]]: ...
+    @overload
+    def vonmises(self, mu: _FloatLike_co, kappa: _FloatLike_co, size: None = ...) -> float: ...  # type: ignore[misc]
+    @overload
+    def vonmises(
+        self, mu: _ArrayLikeFloat_co, kappa: _ArrayLikeFloat_co, size: None | _ShapeLike = ...
+    ) -> ndarray[Any, dtype[float64]]: ...
+    @overload
+    def pareto(self, a: _FloatLike_co, size: None = ...) -> float: ...  # type: ignore[misc]
+    @overload
+    def pareto(
+        self, a: _ArrayLikeFloat_co, size: None | _ShapeLike = ...
+    ) -> ndarray[Any, dtype[float64]]: ...
+    @overload
+    def weibull(self, a: _FloatLike_co, size: None = ...) -> float: ...  # type: ignore[misc]
+    @overload
+    def weibull(
+        self, a: _ArrayLikeFloat_co, size: None | _ShapeLike = ...
+    ) -> ndarray[Any, dtype[float64]]: ...
+    @overload
+    def power(self, a: _FloatLike_co, size: None = ...) -> float: ...  # type: ignore[misc]
+    @overload
+    def power(
+        self, a: _ArrayLikeFloat_co, size: None | _ShapeLike = ...
+    ) -> ndarray[Any, dtype[float64]]: ...
+    @overload
+    def standard_cauchy(self, size: None = ...) -> float: ...  # type: ignore[misc]
+    @overload
+    def standard_cauchy(self, size: _ShapeLike = ...) -> ndarray[Any, dtype[float64]]: ...
+    @overload
+    def laplace(
+        self,
+        loc: _FloatLike_co = ...,
+        scale: _FloatLike_co = ...,
+        size: None = ...,
+    ) -> float: ...  # type: ignore[misc]
+    @overload
+    def laplace(
+        self,
+        loc: _ArrayLikeFloat_co = ...,
+        scale: _ArrayLikeFloat_co = ...,
+        size: None | _ShapeLike = ...,
+    ) -> ndarray[Any, dtype[float64]]: ...
+    @overload
+    def gumbel(
+        self,
+        loc: _FloatLike_co = ...,
+        scale: _FloatLike_co = ...,
+        size: None = ...,
+    ) -> float: ...  # type: ignore[misc]
+    @overload
+    def gumbel(
+        self,
+        loc: _ArrayLikeFloat_co = ...,
+        scale: _ArrayLikeFloat_co = ...,
+        size: None | _ShapeLike = ...,
+    ) -> ndarray[Any, dtype[float64]]: ...
+    @overload
+    def logistic(
+        self,
+        loc: _FloatLike_co = ...,
+        scale: _FloatLike_co = ...,
+        size: None = ...,
+    ) -> float: ...  # type: ignore[misc]
+    @overload
+    def logistic(
+        self,
+        loc: _ArrayLikeFloat_co = ...,
+        scale: _ArrayLikeFloat_co = ...,
+        size: None | _ShapeLike = ...,
+    ) -> ndarray[Any, dtype[float64]]: ...
+    @overload
+    def lognormal(
+        self,
+        mean: _FloatLike_co = ...,
+        sigma: _FloatLike_co = ...,
+        size: None = ...,
+    ) -> float: ...  # type: ignore[misc]
+    @overload
+    def lognormal(
+        self,
+        mean: _ArrayLikeFloat_co = ...,
+        sigma: _ArrayLikeFloat_co = ...,
+        size: None | _ShapeLike = ...,
+    ) -> ndarray[Any, dtype[float64]]: ...
+    @overload
+    def rayleigh(self, scale: _FloatLike_co = ..., size: None = ...) -> float: ...  # type: ignore[misc]
+    @overload
+    def rayleigh(
+        self, scale: _ArrayLikeFloat_co = ..., size: None | _ShapeLike = ...
+    ) -> ndarray[Any, dtype[float64]]: ...
+    @overload
+    def wald(self, mean: _FloatLike_co, scale: _FloatLike_co, size: None = ...) -> float: ...  # type: ignore[misc]
+    @overload
+    def wald(
+        self, mean: _ArrayLikeFloat_co, scale: _ArrayLikeFloat_co, size: None | _ShapeLike = ...
+    ) -> ndarray[Any, dtype[float64]]: ...
+    @overload
+    def triangular(
+        self,
+        left: _FloatLike_co,
+        mode: _FloatLike_co,
+        right: _FloatLike_co,
+        size: None = ...,
+    ) -> float: ...  # type: ignore[misc]
+    @overload
+    def triangular(
+        self,
+        left: _ArrayLikeFloat_co,
+        mode: _ArrayLikeFloat_co,
+        right: _ArrayLikeFloat_co,
+        size: None | _ShapeLike = ...,
+    ) -> ndarray[Any, dtype[float64]]: ...
+    @overload
+    def binomial(self, n: int, p: _FloatLike_co, size: None = ...) -> int: ...  # type: ignore[misc]
+    @overload
+    def binomial(
+        self, n: _ArrayLikeInt_co, p: _ArrayLikeFloat_co, size: None | _ShapeLike = ...
+    ) -> ndarray[Any, dtype[int64]]: ...
+    @overload
+    def negative_binomial(self, n: _FloatLike_co, p: _FloatLike_co, size: None = ...) -> int: ...  # type: ignore[misc]
+    @overload
+    def negative_binomial(
+        self, n: _ArrayLikeFloat_co, p: _ArrayLikeFloat_co, size: None | _ShapeLike = ...
+    ) -> ndarray[Any, dtype[int64]]: ...
+    @overload
+    def poisson(self, lam: _FloatLike_co = ..., size: None = ...) -> int: ...  # type: ignore[misc]
+    @overload
+    def poisson(
+        self, lam: _ArrayLikeFloat_co = ..., size: None | _ShapeLike = ...
+    ) -> ndarray[Any, dtype[int64]]: ...
+    @overload
+    def zipf(self, a: _FloatLike_co, size: None = ...) -> int: ...  # type: ignore[misc]
+    @overload
+    def zipf(
+        self, a: _ArrayLikeFloat_co, size: None | _ShapeLike = ...
+    ) -> ndarray[Any, dtype[int64]]: ...
+    @overload
+    def geometric(self, p: _FloatLike_co, size: None = ...) -> int: ...  # type: ignore[misc]
+    @overload
+    def geometric(
+        self, p: _ArrayLikeFloat_co, size: None | _ShapeLike = ...
+    ) -> ndarray[Any, dtype[int64]]: ...
+    @overload
+    def hypergeometric(self, ngood: int, nbad: int, nsample: int, size: None = ...) -> int: ...  # type: ignore[misc]
+    @overload
+    def hypergeometric(
+        self,
+        ngood: _ArrayLikeInt_co,
+        nbad: _ArrayLikeInt_co,
+        nsample: _ArrayLikeInt_co,
+        size: None | _ShapeLike = ...,
+    ) -> ndarray[Any, dtype[int64]]: ...
+    @overload
+    def logseries(self, p: _FloatLike_co, size: None = ...) -> int: ...  # type: ignore[misc]
+    @overload
+    def logseries(
+        self, p: _ArrayLikeFloat_co, size: None | _ShapeLike = ...
+    ) -> ndarray[Any, dtype[int64]]: ...
+    def multivariate_normal(
+        self,
+        mean: _ArrayLikeFloat_co,
+        cov: _ArrayLikeFloat_co,
+        size: None | _ShapeLike = ...,
+        check_valid: Literal["warn", "raise", "ignore"] = ...,
+        tol: float = ...,
+        *,
+        method: Literal["svd", "eigh", "cholesky"] = ...,
+    ) -> ndarray[Any, dtype[float64]]: ...
+    def multinomial(
+        self, n: _ArrayLikeInt_co,
+            pvals: _ArrayLikeFloat_co,
+            size: None | _ShapeLike = ...
+    ) -> ndarray[Any, dtype[int64]]: ...
+    def multivariate_hypergeometric(
+        self,
+        colors: _ArrayLikeInt_co,
+        nsample: int,
+        size: None | _ShapeLike = ...,
+        method: Literal["marginals", "count"] = ...,
+    ) -> ndarray[Any, dtype[int64]]: ...
+    def dirichlet(
+        self, alpha: _ArrayLikeFloat_co, size: None | _ShapeLike = ...
+    ) -> ndarray[Any, dtype[float64]]: ...
+    def permuted(
+        self, x: ArrayLike, *, axis: None | int = ..., out: None | ndarray[Any, Any] = ...
+    ) -> ndarray[Any, Any]: ...
+    def shuffle(self, x: ArrayLike, axis: int = ...) -> None: ...
+
+def default_rng(
+    seed: None | _ArrayLikeInt_co | SeedSequence | BitGenerator | Generator = ...
+) -> Generator: ...
diff --git a/lib/python3.12/site-packages/numpy/random/_mt19937.pyi b/lib/python3.12/site-packages/numpy/random/_mt19937.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..55cfb2db42b17a80a1e15b6f8eabee1ccbdee282
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/random/_mt19937.pyi
@@ -0,0 +1,22 @@
+from typing import Any, TypedDict
+
+from numpy import dtype, ndarray, uint32
+from numpy.random.bit_generator import BitGenerator, SeedSequence
+from numpy._typing import _ArrayLikeInt_co
+
+class _MT19937Internal(TypedDict):
+    key: ndarray[Any, dtype[uint32]]
+    pos: int
+
+class _MT19937State(TypedDict):
+    bit_generator: str
+    state: _MT19937Internal
+
+class MT19937(BitGenerator):
+    def __init__(self, seed: None | _ArrayLikeInt_co | SeedSequence = ...) -> None: ...
+    def _legacy_seeding(self, seed: _ArrayLikeInt_co) -> None: ...
+    def jumped(self, jumps: int = ...) -> MT19937: ...
+    @property
+    def state(self) -> _MT19937State: ...
+    @state.setter
+    def state(self, value: _MT19937State) -> None: ...
diff --git a/lib/python3.12/site-packages/numpy/random/_pcg64.pyi b/lib/python3.12/site-packages/numpy/random/_pcg64.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..470aee867493b48817670f7c4ff7b24d8be31f26
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/random/_pcg64.pyi
@@ -0,0 +1,42 @@
+from typing import TypedDict
+
+from numpy.random.bit_generator import BitGenerator, SeedSequence
+from numpy._typing import _ArrayLikeInt_co
+
+class _PCG64Internal(TypedDict):
+    state: int
+    inc: int
+
+class _PCG64State(TypedDict):
+    bit_generator: str
+    state: _PCG64Internal
+    has_uint32: int
+    uinteger: int
+
+class PCG64(BitGenerator):
+    def __init__(self, seed: None | _ArrayLikeInt_co | SeedSequence = ...) -> None: ...
+    def jumped(self, jumps: int = ...) -> PCG64: ...
+    @property
+    def state(
+        self,
+    ) -> _PCG64State: ...
+    @state.setter
+    def state(
+        self,
+        value: _PCG64State,
+    ) -> None: ...
+    def advance(self, delta: int) -> PCG64: ...
+
+class PCG64DXSM(BitGenerator):
+    def __init__(self, seed: None | _ArrayLikeInt_co | SeedSequence = ...) -> None: ...
+    def jumped(self, jumps: int = ...) -> PCG64DXSM: ...
+    @property
+    def state(
+        self,
+    ) -> _PCG64State: ...
+    @state.setter
+    def state(
+        self,
+        value: _PCG64State,
+    ) -> None: ...
+    def advance(self, delta: int) -> PCG64DXSM: ...
diff --git a/lib/python3.12/site-packages/numpy/random/_philox.pyi b/lib/python3.12/site-packages/numpy/random/_philox.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..26ce726ecf4a6f0e9fda4d596368a05da5629124
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/random/_philox.pyi
@@ -0,0 +1,36 @@
+from typing import Any, TypedDict
+
+from numpy import dtype, ndarray, uint64
+from numpy.random.bit_generator import BitGenerator, SeedSequence
+from numpy._typing import _ArrayLikeInt_co
+
+class _PhiloxInternal(TypedDict):
+    counter: ndarray[Any, dtype[uint64]]
+    key: ndarray[Any, dtype[uint64]]
+
+class _PhiloxState(TypedDict):
+    bit_generator: str
+    state: _PhiloxInternal
+    buffer: ndarray[Any, dtype[uint64]]
+    buffer_pos: int
+    has_uint32: int
+    uinteger: int
+
+class Philox(BitGenerator):
+    def __init__(
+        self,
+        seed: None | _ArrayLikeInt_co | SeedSequence = ...,
+        counter: None | _ArrayLikeInt_co = ...,
+        key: None | _ArrayLikeInt_co = ...,
+    ) -> None: ...
+    @property
+    def state(
+        self,
+    ) -> _PhiloxState: ...
+    @state.setter
+    def state(
+        self,
+        value: _PhiloxState,
+    ) -> None: ...
+    def jumped(self, jumps: int = ...) -> Philox: ...
+    def advance(self, delta: int) -> Philox: ...
diff --git a/lib/python3.12/site-packages/numpy/random/_pickle.py b/lib/python3.12/site-packages/numpy/random/_pickle.py
new file mode 100644
index 0000000000000000000000000000000000000000..073993726eb30b48c7e5f9d6eba3299a14829fa3
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/random/_pickle.py
@@ -0,0 +1,80 @@
+from .mtrand import RandomState
+from ._philox import Philox
+from ._pcg64 import PCG64, PCG64DXSM
+from ._sfc64 import SFC64
+
+from ._generator import Generator
+from ._mt19937 import MT19937
+
+BitGenerators = {'MT19937': MT19937,
+                 'PCG64': PCG64,
+                 'PCG64DXSM': PCG64DXSM,
+                 'Philox': Philox,
+                 'SFC64': SFC64,
+                 }
+
+
+def __bit_generator_ctor(bit_generator_name='MT19937'):
+    """
+    Pickling helper function that returns a bit generator object
+
+    Parameters
+    ----------
+    bit_generator_name : str
+        String containing the name of the BitGenerator
+
+    Returns
+    -------
+    bit_generator : BitGenerator
+        BitGenerator instance
+    """
+    if bit_generator_name in BitGenerators:
+        bit_generator = BitGenerators[bit_generator_name]
+    else:
+        raise ValueError(str(bit_generator_name) + ' is not a known '
+                                                   'BitGenerator module.')
+
+    return bit_generator()
+
+
+def __generator_ctor(bit_generator_name="MT19937",
+                     bit_generator_ctor=__bit_generator_ctor):
+    """
+    Pickling helper function that returns a Generator object
+
+    Parameters
+    ----------
+    bit_generator_name : str
+        String containing the core BitGenerator's name
+    bit_generator_ctor : callable, optional
+        Callable function that takes bit_generator_name as its only argument
+        and returns an instantized bit generator.
+
+    Returns
+    -------
+    rg : Generator
+        Generator using the named core BitGenerator
+    """
+    return Generator(bit_generator_ctor(bit_generator_name))
+
+
+def __randomstate_ctor(bit_generator_name="MT19937",
+                       bit_generator_ctor=__bit_generator_ctor):
+    """
+    Pickling helper function that returns a legacy RandomState-like object
+
+    Parameters
+    ----------
+    bit_generator_name : str
+        String containing the core BitGenerator's name
+    bit_generator_ctor : callable, optional
+        Callable function that takes bit_generator_name as its only argument
+        and returns an instantized bit generator.
+
+    Returns
+    -------
+    rs : RandomState
+        Legacy RandomState using the named core BitGenerator
+    """
+
+    return RandomState(bit_generator_ctor(bit_generator_name))
diff --git a/lib/python3.12/site-packages/numpy/random/_sfc64.cpython-312-x86_64-linux-gnu.so b/lib/python3.12/site-packages/numpy/random/_sfc64.cpython-312-x86_64-linux-gnu.so
new file mode 100644
index 0000000000000000000000000000000000000000..8549fb456fc5510544b42fdba26b7213b48074a1
Binary files /dev/null and b/lib/python3.12/site-packages/numpy/random/_sfc64.cpython-312-x86_64-linux-gnu.so differ
diff --git a/lib/python3.12/site-packages/numpy/random/_sfc64.pyi b/lib/python3.12/site-packages/numpy/random/_sfc64.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..e1810e7d5261490d83ba1ec8f4f3df863837a5f0
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/random/_sfc64.pyi
@@ -0,0 +1,28 @@
+from typing import Any, TypedDict
+
+from numpy import dtype as dtype
+from numpy import ndarray as ndarray
+from numpy import uint64
+from numpy.random.bit_generator import BitGenerator, SeedSequence
+from numpy._typing import _ArrayLikeInt_co
+
+class _SFC64Internal(TypedDict):
+    state: ndarray[Any, dtype[uint64]]
+
+class _SFC64State(TypedDict):
+    bit_generator: str
+    state: _SFC64Internal
+    has_uint32: int
+    uinteger: int
+
+class SFC64(BitGenerator):
+    def __init__(self, seed: None | _ArrayLikeInt_co | SeedSequence = ...) -> None: ...
+    @property
+    def state(
+        self,
+    ) -> _SFC64State: ...
+    @state.setter
+    def state(
+        self,
+        value: _SFC64State,
+    ) -> None: ...
diff --git a/lib/python3.12/site-packages/numpy/random/bit_generator.pxd b/lib/python3.12/site-packages/numpy/random/bit_generator.pxd
new file mode 100644
index 0000000000000000000000000000000000000000..dfa7d0a71c085dfa3dfb2819f47493cb8501d198
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/random/bit_generator.pxd
@@ -0,0 +1,35 @@
+cimport numpy as np
+from libc.stdint cimport uint32_t, uint64_t
+
+cdef extern from "numpy/random/bitgen.h":
+    struct bitgen:
+        void *state
+        uint64_t (*next_uint64)(void *st) nogil
+        uint32_t (*next_uint32)(void *st) nogil
+        double (*next_double)(void *st) nogil
+        uint64_t (*next_raw)(void *st) nogil
+
+    ctypedef bitgen bitgen_t
+
+cdef class BitGenerator():
+    cdef readonly object _seed_seq
+    cdef readonly object lock
+    cdef bitgen_t _bitgen
+    cdef readonly object _ctypes
+    cdef readonly object _cffi
+    cdef readonly object capsule
+
+
+cdef class SeedSequence():
+    cdef readonly object entropy
+    cdef readonly tuple spawn_key
+    cdef readonly Py_ssize_t pool_size
+    cdef readonly object pool
+    cdef readonly uint32_t n_children_spawned
+
+    cdef mix_entropy(self, np.ndarray[np.npy_uint32, ndim=1] mixer,
+                     np.ndarray[np.npy_uint32, ndim=1] entropy_array)
+    cdef get_assembled_entropy(self)
+
+cdef class SeedlessSequence():
+    pass
diff --git a/lib/python3.12/site-packages/numpy/random/bit_generator.pyi b/lib/python3.12/site-packages/numpy/random/bit_generator.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..8b9779cade317a2e5d213f8cf499cf86fdb1cfec
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/random/bit_generator.pyi
@@ -0,0 +1,112 @@
+import abc
+from threading import Lock
+from collections.abc import Callable, Mapping, Sequence
+from typing import (
+    Any,
+    NamedTuple,
+    TypedDict,
+    TypeVar,
+    Union,
+    overload,
+    Literal,
+)
+
+from numpy import dtype, ndarray, uint32, uint64
+from numpy._typing import _ArrayLikeInt_co, _ShapeLike, _SupportsDType, _UInt32Codes, _UInt64Codes
+
+_T = TypeVar("_T")
+
+_DTypeLikeUint32 = Union[
+    dtype[uint32],
+    _SupportsDType[dtype[uint32]],
+    type[uint32],
+    _UInt32Codes,
+]
+_DTypeLikeUint64 = Union[
+    dtype[uint64],
+    _SupportsDType[dtype[uint64]],
+    type[uint64],
+    _UInt64Codes,
+]
+
+class _SeedSeqState(TypedDict):
+    entropy: None | int | Sequence[int]
+    spawn_key: tuple[int, ...]
+    pool_size: int
+    n_children_spawned: int
+
+class _Interface(NamedTuple):
+    state_address: Any
+    state: Any
+    next_uint64: Any
+    next_uint32: Any
+    next_double: Any
+    bit_generator: Any
+
+class ISeedSequence(abc.ABC):
+    @abc.abstractmethod
+    def generate_state(
+        self, n_words: int, dtype: _DTypeLikeUint32 | _DTypeLikeUint64 = ...
+    ) -> ndarray[Any, dtype[uint32 | uint64]]: ...
+
+class ISpawnableSeedSequence(ISeedSequence):
+    @abc.abstractmethod
+    def spawn(self: _T, n_children: int) -> list[_T]: ...
+
+class SeedlessSeedSequence(ISpawnableSeedSequence):
+    def generate_state(
+        self, n_words: int, dtype: _DTypeLikeUint32 | _DTypeLikeUint64 = ...
+    ) -> ndarray[Any, dtype[uint32 | uint64]]: ...
+    def spawn(self: _T, n_children: int) -> list[_T]: ...
+
+class SeedSequence(ISpawnableSeedSequence):
+    entropy: None | int | Sequence[int]
+    spawn_key: tuple[int, ...]
+    pool_size: int
+    n_children_spawned: int
+    pool: ndarray[Any, dtype[uint32]]
+    def __init__(
+        self,
+        entropy: None | int | Sequence[int] | _ArrayLikeInt_co = ...,
+        *,
+        spawn_key: Sequence[int] = ...,
+        pool_size: int = ...,
+        n_children_spawned: int = ...,
+    ) -> None: ...
+    def __repr__(self) -> str: ...
+    @property
+    def state(
+        self,
+    ) -> _SeedSeqState: ...
+    def generate_state(
+        self, n_words: int, dtype: _DTypeLikeUint32 | _DTypeLikeUint64 = ...
+    ) -> ndarray[Any, dtype[uint32 | uint64]]: ...
+    def spawn(self, n_children: int) -> list[SeedSequence]: ...
+
+class BitGenerator(abc.ABC):
+    lock: Lock
+    def __init__(self, seed: None | _ArrayLikeInt_co | SeedSequence = ...) -> None: ...
+    def __getstate__(self) -> dict[str, Any]: ...
+    def __setstate__(self, state: dict[str, Any]) -> None: ...
+    def __reduce__(
+        self,
+    ) -> tuple[Callable[[str], BitGenerator], tuple[str], tuple[dict[str, Any]]]: ...
+    @abc.abstractmethod
+    @property
+    def state(self) -> Mapping[str, Any]: ...
+    @state.setter
+    def state(self, value: Mapping[str, Any]) -> None: ...
+    @property
+    def seed_seq(self) -> ISeedSequence: ...
+    def spawn(self, n_children: int) -> list[BitGenerator]: ...
+    @overload
+    def random_raw(self, size: None = ..., output: Literal[True] = ...) -> int: ...  # type: ignore[misc]
+    @overload
+    def random_raw(self, size: _ShapeLike = ..., output: Literal[True] = ...) -> ndarray[Any, dtype[uint64]]: ...  # type: ignore[misc]
+    @overload
+    def random_raw(self, size: None | _ShapeLike = ..., output: Literal[False] = ...) -> None: ...  # type: ignore[misc]
+    def _benchmark(self, cnt: int, method: str = ...) -> None: ...
+    @property
+    def ctypes(self) -> _Interface: ...
+    @property
+    def cffi(self) -> _Interface: ...
diff --git a/lib/python3.12/site-packages/numpy/random/c_distributions.pxd b/lib/python3.12/site-packages/numpy/random/c_distributions.pxd
new file mode 100644
index 0000000000000000000000000000000000000000..b978d13503eaff74ec54a2ad7a9813b24dab68d2
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/random/c_distributions.pxd
@@ -0,0 +1,120 @@
+#!python
+#cython: wraparound=False, nonecheck=False, boundscheck=False, cdivision=True, language_level=3
+from numpy cimport npy_intp
+
+from libc.stdint cimport (uint64_t, int32_t, int64_t)
+from numpy.random cimport bitgen_t
+
+cdef extern from "numpy/random/distributions.h":
+
+    struct s_binomial_t:
+        int has_binomial
+        double psave
+        int64_t nsave
+        double r
+        double q
+        double fm
+        int64_t m
+        double p1
+        double xm
+        double xl
+        double xr
+        double c
+        double laml
+        double lamr
+        double p2
+        double p3
+        double p4
+
+    ctypedef s_binomial_t binomial_t
+
+    float random_standard_uniform_f(bitgen_t *bitgen_state) nogil
+    double random_standard_uniform(bitgen_t *bitgen_state) nogil
+    void random_standard_uniform_fill(bitgen_t* bitgen_state, npy_intp cnt, double *out) nogil
+    void random_standard_uniform_fill_f(bitgen_t *bitgen_state, npy_intp cnt, float *out) nogil
+    
+    double random_standard_exponential(bitgen_t *bitgen_state) nogil
+    float random_standard_exponential_f(bitgen_t *bitgen_state) nogil
+    void random_standard_exponential_fill(bitgen_t *bitgen_state, npy_intp cnt, double *out) nogil
+    void random_standard_exponential_fill_f(bitgen_t *bitgen_state, npy_intp cnt, float *out) nogil
+    void random_standard_exponential_inv_fill(bitgen_t *bitgen_state, npy_intp cnt, double *out) nogil
+    void random_standard_exponential_inv_fill_f(bitgen_t *bitgen_state, npy_intp cnt, float *out) nogil
+    
+    double random_standard_normal(bitgen_t* bitgen_state) nogil
+    float random_standard_normal_f(bitgen_t *bitgen_state) nogil
+    void random_standard_normal_fill(bitgen_t *bitgen_state, npy_intp count, double *out) nogil
+    void random_standard_normal_fill_f(bitgen_t *bitgen_state, npy_intp count, float *out) nogil
+    double random_standard_gamma(bitgen_t *bitgen_state, double shape) nogil
+    float random_standard_gamma_f(bitgen_t *bitgen_state, float shape) nogil
+
+    float random_standard_uniform_f(bitgen_t *bitgen_state) nogil
+    void random_standard_uniform_fill_f(bitgen_t* bitgen_state, npy_intp cnt, float *out) nogil
+    float random_standard_normal_f(bitgen_t* bitgen_state) nogil
+    float random_standard_gamma_f(bitgen_t *bitgen_state, float shape) nogil
+
+    int64_t random_positive_int64(bitgen_t *bitgen_state) nogil
+    int32_t random_positive_int32(bitgen_t *bitgen_state) nogil
+    int64_t random_positive_int(bitgen_t *bitgen_state) nogil
+    uint64_t random_uint(bitgen_t *bitgen_state) nogil
+
+    double random_normal(bitgen_t *bitgen_state, double loc, double scale) nogil
+
+    double random_gamma(bitgen_t *bitgen_state, double shape, double scale) nogil
+    float random_gamma_f(bitgen_t *bitgen_state, float shape, float scale) nogil
+
+    double random_exponential(bitgen_t *bitgen_state, double scale) nogil
+    double random_uniform(bitgen_t *bitgen_state, double lower, double range) nogil
+    double random_beta(bitgen_t *bitgen_state, double a, double b) nogil
+    double random_chisquare(bitgen_t *bitgen_state, double df) nogil
+    double random_f(bitgen_t *bitgen_state, double dfnum, double dfden) nogil
+    double random_standard_cauchy(bitgen_t *bitgen_state) nogil
+    double random_pareto(bitgen_t *bitgen_state, double a) nogil
+    double random_weibull(bitgen_t *bitgen_state, double a) nogil
+    double random_power(bitgen_t *bitgen_state, double a) nogil
+    double random_laplace(bitgen_t *bitgen_state, double loc, double scale) nogil
+    double random_gumbel(bitgen_t *bitgen_state, double loc, double scale) nogil
+    double random_logistic(bitgen_t *bitgen_state, double loc, double scale) nogil
+    double random_lognormal(bitgen_t *bitgen_state, double mean, double sigma) nogil
+    double random_rayleigh(bitgen_t *bitgen_state, double mode) nogil
+    double random_standard_t(bitgen_t *bitgen_state, double df) nogil
+    double random_noncentral_chisquare(bitgen_t *bitgen_state, double df,
+                                       double nonc) nogil
+    double random_noncentral_f(bitgen_t *bitgen_state, double dfnum,
+                               double dfden, double nonc) nogil
+    double random_wald(bitgen_t *bitgen_state, double mean, double scale) nogil
+    double random_vonmises(bitgen_t *bitgen_state, double mu, double kappa) nogil
+    double random_triangular(bitgen_t *bitgen_state, double left, double mode,
+                             double right) nogil
+
+    int64_t random_poisson(bitgen_t *bitgen_state, double lam) nogil
+    int64_t random_negative_binomial(bitgen_t *bitgen_state, double n, double p) nogil
+    int64_t random_binomial(bitgen_t *bitgen_state, double p, int64_t n, binomial_t *binomial) nogil
+    int64_t random_logseries(bitgen_t *bitgen_state, double p) nogil
+    int64_t random_geometric_search(bitgen_t *bitgen_state, double p) nogil
+    int64_t random_geometric_inversion(bitgen_t *bitgen_state, double p) nogil
+    int64_t random_geometric(bitgen_t *bitgen_state, double p) nogil
+    int64_t random_zipf(bitgen_t *bitgen_state, double a) nogil
+    int64_t random_hypergeometric(bitgen_t *bitgen_state, int64_t good, int64_t bad,
+                                    int64_t sample) nogil
+
+    uint64_t random_interval(bitgen_t *bitgen_state, uint64_t max) nogil
+
+    # Generate random uint64 numbers in closed interval [off, off + rng].
+    uint64_t random_bounded_uint64(bitgen_t *bitgen_state,
+                                   uint64_t off, uint64_t rng,
+                                   uint64_t mask, bint use_masked) nogil
+
+    void random_multinomial(bitgen_t *bitgen_state, int64_t n, int64_t *mnix,
+                            double *pix, npy_intp d, binomial_t *binomial) nogil
+
+    int random_multivariate_hypergeometric_count(bitgen_t *bitgen_state,
+                          int64_t total,
+                          size_t num_colors, int64_t *colors,
+                          int64_t nsample,
+                          size_t num_variates, int64_t *variates) nogil
+    void random_multivariate_hypergeometric_marginals(bitgen_t *bitgen_state,
+                               int64_t total,
+                               size_t num_colors, int64_t *colors,
+                               int64_t nsample,
+                               size_t num_variates, int64_t *variates) nogil
+
diff --git a/lib/python3.12/site-packages/numpy/random/lib/libnpyrandom.a b/lib/python3.12/site-packages/numpy/random/lib/libnpyrandom.a
new file mode 100644
index 0000000000000000000000000000000000000000..96bd444f59250fb0219138f3f5729972b78e2220
Binary files /dev/null and b/lib/python3.12/site-packages/numpy/random/lib/libnpyrandom.a differ
diff --git a/lib/python3.12/site-packages/numpy/random/mtrand.pyi b/lib/python3.12/site-packages/numpy/random/mtrand.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..b5f600652b5444ce647108590c89626250f8bae8
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/random/mtrand.pyi
@@ -0,0 +1,571 @@
+import builtins
+from collections.abc import Callable
+from typing import Any, Union, overload, Literal
+
+from numpy import (
+    bool_,
+    dtype,
+    float32,
+    float64,
+    int8,
+    int16,
+    int32,
+    int64,
+    int_,
+    ndarray,
+    uint,
+    uint8,
+    uint16,
+    uint32,
+    uint64,
+)
+from numpy.random.bit_generator import BitGenerator
+from numpy._typing import (
+    ArrayLike,
+    _ArrayLikeFloat_co,
+    _ArrayLikeInt_co,
+    _DoubleCodes,
+    _DTypeLikeBool,
+    _DTypeLikeInt,
+    _DTypeLikeUInt,
+    _Float32Codes,
+    _Float64Codes,
+    _Int8Codes,
+    _Int16Codes,
+    _Int32Codes,
+    _Int64Codes,
+    _IntCodes,
+    _ShapeLike,
+    _SingleCodes,
+    _SupportsDType,
+    _UInt8Codes,
+    _UInt16Codes,
+    _UInt32Codes,
+    _UInt64Codes,
+    _UIntCodes,
+)
+
+_DTypeLikeFloat32 = Union[
+    dtype[float32],
+    _SupportsDType[dtype[float32]],
+    type[float32],
+    _Float32Codes,
+    _SingleCodes,
+]
+
+_DTypeLikeFloat64 = Union[
+    dtype[float64],
+    _SupportsDType[dtype[float64]],
+    type[float],
+    type[float64],
+    _Float64Codes,
+    _DoubleCodes,
+]
+
+class RandomState:
+    _bit_generator: BitGenerator
+    def __init__(self, seed: None | _ArrayLikeInt_co | BitGenerator = ...) -> None: ...
+    def __repr__(self) -> str: ...
+    def __str__(self) -> str: ...
+    def __getstate__(self) -> dict[str, Any]: ...
+    def __setstate__(self, state: dict[str, Any]) -> None: ...
+    def __reduce__(self) -> tuple[Callable[[str], RandomState], tuple[str], dict[str, Any]]: ...
+    def seed(self, seed: None | _ArrayLikeFloat_co = ...) -> None: ...
+    @overload
+    def get_state(self, legacy: Literal[False] = ...) -> dict[str, Any]: ...
+    @overload
+    def get_state(
+        self, legacy: Literal[True] = ...
+    ) -> dict[str, Any] | tuple[str, ndarray[Any, dtype[uint32]], int, int, float]: ...
+    def set_state(
+        self, state: dict[str, Any] | tuple[str, ndarray[Any, dtype[uint32]], int, int, float]
+    ) -> None: ...
+    @overload
+    def random_sample(self, size: None = ...) -> float: ...  # type: ignore[misc]
+    @overload
+    def random_sample(self, size: _ShapeLike = ...) -> ndarray[Any, dtype[float64]]: ...
+    @overload
+    def random(self, size: None = ...) -> float: ...  # type: ignore[misc]
+    @overload
+    def random(self, size: _ShapeLike = ...) -> ndarray[Any, dtype[float64]]: ...
+    @overload
+    def beta(self, a: float, b: float, size: None = ...) -> float: ...  # type: ignore[misc]
+    @overload
+    def beta(
+        self, a: _ArrayLikeFloat_co, b: _ArrayLikeFloat_co, size: None | _ShapeLike = ...
+    ) -> ndarray[Any, dtype[float64]]: ...
+    @overload
+    def exponential(self, scale: float = ..., size: None = ...) -> float: ...  # type: ignore[misc]
+    @overload
+    def exponential(
+        self, scale: _ArrayLikeFloat_co = ..., size: None | _ShapeLike = ...
+    ) -> ndarray[Any, dtype[float64]]: ...
+    @overload
+    def standard_exponential(self, size: None = ...) -> float: ...  # type: ignore[misc]
+    @overload
+    def standard_exponential(self, size: _ShapeLike = ...) -> ndarray[Any, dtype[float64]]: ...
+    @overload
+    def tomaxint(self, size: None = ...) -> int: ...  # type: ignore[misc]
+    @overload
+    def tomaxint(self, size: _ShapeLike = ...) -> ndarray[Any, dtype[int_]]: ...
+    @overload
+    def randint(  # type: ignore[misc]
+        self,
+        low: int,
+        high: None | int = ...,
+    ) -> int: ...
+    @overload
+    def randint(  # type: ignore[misc]
+        self,
+        low: int,
+        high: None | int = ...,
+        size: None = ...,
+        dtype: _DTypeLikeBool = ...,
+    ) -> bool: ...
+    @overload
+    def randint(  # type: ignore[misc]
+        self,
+        low: int,
+        high: None | int = ...,
+        size: None = ...,
+        dtype: _DTypeLikeInt | _DTypeLikeUInt = ...,
+    ) -> int: ...
+    @overload
+    def randint(  # type: ignore[misc]
+        self,
+        low: _ArrayLikeInt_co,
+        high: None | _ArrayLikeInt_co = ...,
+        size: None | _ShapeLike = ...,
+    ) -> ndarray[Any, dtype[int_]]: ...
+    @overload
+    def randint(  # type: ignore[misc]
+        self,
+        low: _ArrayLikeInt_co,
+        high: None | _ArrayLikeInt_co = ...,
+        size: None | _ShapeLike = ...,
+        dtype: _DTypeLikeBool = ...,
+    ) -> ndarray[Any, dtype[bool_]]: ...
+    @overload
+    def randint(  # type: ignore[misc]
+        self,
+        low: _ArrayLikeInt_co,
+        high: None | _ArrayLikeInt_co = ...,
+        size: None | _ShapeLike = ...,
+        dtype: dtype[int8] | type[int8] | _Int8Codes | _SupportsDType[dtype[int8]] = ...,
+    ) -> ndarray[Any, dtype[int8]]: ...
+    @overload
+    def randint(  # type: ignore[misc]
+        self,
+        low: _ArrayLikeInt_co,
+        high: None | _ArrayLikeInt_co = ...,
+        size: None | _ShapeLike = ...,
+        dtype: dtype[int16] | type[int16] | _Int16Codes | _SupportsDType[dtype[int16]] = ...,
+    ) -> ndarray[Any, dtype[int16]]: ...
+    @overload
+    def randint(  # type: ignore[misc]
+        self,
+        low: _ArrayLikeInt_co,
+        high: None | _ArrayLikeInt_co = ...,
+        size: None | _ShapeLike = ...,
+        dtype: dtype[int32] | type[int32] | _Int32Codes | _SupportsDType[dtype[int32]] = ...,
+    ) -> ndarray[Any, dtype[int32]]: ...
+    @overload
+    def randint(  # type: ignore[misc]
+        self,
+        low: _ArrayLikeInt_co,
+        high: None | _ArrayLikeInt_co = ...,
+        size: None | _ShapeLike = ...,
+        dtype: None | dtype[int64] | type[int64] | _Int64Codes | _SupportsDType[dtype[int64]] = ...,
+    ) -> ndarray[Any, dtype[int64]]: ...
+    @overload
+    def randint(  # type: ignore[misc]
+        self,
+        low: _ArrayLikeInt_co,
+        high: None | _ArrayLikeInt_co = ...,
+        size: None | _ShapeLike = ...,
+        dtype: dtype[uint8] | type[uint8] | _UInt8Codes | _SupportsDType[dtype[uint8]] = ...,
+    ) -> ndarray[Any, dtype[uint8]]: ...
+    @overload
+    def randint(  # type: ignore[misc]
+        self,
+        low: _ArrayLikeInt_co,
+        high: None | _ArrayLikeInt_co = ...,
+        size: None | _ShapeLike = ...,
+        dtype: dtype[uint16] | type[uint16] | _UInt16Codes | _SupportsDType[dtype[uint16]] = ...,
+    ) -> ndarray[Any, dtype[uint16]]: ...
+    @overload
+    def randint(  # type: ignore[misc]
+        self,
+        low: _ArrayLikeInt_co,
+        high: None | _ArrayLikeInt_co = ...,
+        size: None | _ShapeLike = ...,
+        dtype: dtype[uint32] | type[uint32] | _UInt32Codes | _SupportsDType[dtype[uint32]] = ...,
+    ) -> ndarray[Any, dtype[uint32]]: ...
+    @overload
+    def randint(  # type: ignore[misc]
+        self,
+        low: _ArrayLikeInt_co,
+        high: None | _ArrayLikeInt_co = ...,
+        size: None | _ShapeLike = ...,
+        dtype: dtype[uint64] | type[uint64] | _UInt64Codes | _SupportsDType[dtype[uint64]] = ...,
+    ) -> ndarray[Any, dtype[uint64]]: ...
+    @overload
+    def randint(  # type: ignore[misc]
+        self,
+        low: _ArrayLikeInt_co,
+        high: None | _ArrayLikeInt_co = ...,
+        size: None | _ShapeLike = ...,
+        dtype: dtype[int_] | type[int] | type[int_] | _IntCodes | _SupportsDType[dtype[int_]] = ...,
+    ) -> ndarray[Any, dtype[int_]]: ...
+    @overload
+    def randint(  # type: ignore[misc]
+        self,
+        low: _ArrayLikeInt_co,
+        high: None | _ArrayLikeInt_co = ...,
+        size: None | _ShapeLike = ...,
+        dtype: dtype[uint] | type[uint] | _UIntCodes | _SupportsDType[dtype[uint]] = ...,
+    ) -> ndarray[Any, dtype[uint]]: ...
+    def bytes(self, length: int) -> builtins.bytes: ...
+    @overload
+    def choice(
+        self,
+        a: int,
+        size: None = ...,
+        replace: bool = ...,
+        p: None | _ArrayLikeFloat_co = ...,
+    ) -> int: ...
+    @overload
+    def choice(
+        self,
+        a: int,
+        size: _ShapeLike = ...,
+        replace: bool = ...,
+        p: None | _ArrayLikeFloat_co = ...,
+    ) -> ndarray[Any, dtype[int_]]: ...
+    @overload
+    def choice(
+        self,
+        a: ArrayLike,
+        size: None = ...,
+        replace: bool = ...,
+        p: None | _ArrayLikeFloat_co = ...,
+    ) -> Any: ...
+    @overload
+    def choice(
+        self,
+        a: ArrayLike,
+        size: _ShapeLike = ...,
+        replace: bool = ...,
+        p: None | _ArrayLikeFloat_co = ...,
+    ) -> ndarray[Any, Any]: ...
+    @overload
+    def uniform(self, low: float = ..., high: float = ..., size: None = ...) -> float: ...  # type: ignore[misc]
+    @overload
+    def uniform(
+        self,
+        low: _ArrayLikeFloat_co = ...,
+        high: _ArrayLikeFloat_co = ...,
+        size: None | _ShapeLike = ...,
+    ) -> ndarray[Any, dtype[float64]]: ...
+    @overload
+    def rand(self) -> float: ...
+    @overload
+    def rand(self, *args: int) -> ndarray[Any, dtype[float64]]: ...
+    @overload
+    def randn(self) -> float: ...
+    @overload
+    def randn(self, *args: int) -> ndarray[Any, dtype[float64]]: ...
+    @overload
+    def random_integers(self, low: int, high: None | int = ..., size: None = ...) -> int: ...  # type: ignore[misc]
+    @overload
+    def random_integers(
+        self,
+        low: _ArrayLikeInt_co,
+        high: None | _ArrayLikeInt_co = ...,
+        size: None | _ShapeLike = ...,
+    ) -> ndarray[Any, dtype[int_]]: ...
+    @overload
+    def standard_normal(self, size: None = ...) -> float: ...  # type: ignore[misc]
+    @overload
+    def standard_normal(  # type: ignore[misc]
+        self, size: _ShapeLike = ...
+    ) -> ndarray[Any, dtype[float64]]: ...
+    @overload
+    def normal(self, loc: float = ..., scale: float = ..., size: None = ...) -> float: ...  # type: ignore[misc]
+    @overload
+    def normal(
+        self,
+        loc: _ArrayLikeFloat_co = ...,
+        scale: _ArrayLikeFloat_co = ...,
+        size: None | _ShapeLike = ...,
+    ) -> ndarray[Any, dtype[float64]]: ...
+    @overload
+    def standard_gamma(  # type: ignore[misc]
+        self,
+        shape: float,
+        size: None = ...,
+    ) -> float: ...
+    @overload
+    def standard_gamma(
+        self,
+        shape: _ArrayLikeFloat_co,
+        size: None | _ShapeLike = ...,
+    ) -> ndarray[Any, dtype[float64]]: ...
+    @overload
+    def gamma(self, shape: float, scale: float = ..., size: None = ...) -> float: ...  # type: ignore[misc]
+    @overload
+    def gamma(
+        self,
+        shape: _ArrayLikeFloat_co,
+        scale: _ArrayLikeFloat_co = ...,
+        size: None | _ShapeLike = ...,
+    ) -> ndarray[Any, dtype[float64]]: ...
+    @overload
+    def f(self, dfnum: float, dfden: float, size: None = ...) -> float: ...  # type: ignore[misc]
+    @overload
+    def f(
+        self, dfnum: _ArrayLikeFloat_co, dfden: _ArrayLikeFloat_co, size: None | _ShapeLike = ...
+    ) -> ndarray[Any, dtype[float64]]: ...
+    @overload
+    def noncentral_f(self, dfnum: float, dfden: float, nonc: float, size: None = ...) -> float: ...  # type: ignore[misc]
+    @overload
+    def noncentral_f(
+        self,
+        dfnum: _ArrayLikeFloat_co,
+        dfden: _ArrayLikeFloat_co,
+        nonc: _ArrayLikeFloat_co,
+        size: None | _ShapeLike = ...,
+    ) -> ndarray[Any, dtype[float64]]: ...
+    @overload
+    def chisquare(self, df: float, size: None = ...) -> float: ...  # type: ignore[misc]
+    @overload
+    def chisquare(
+        self, df: _ArrayLikeFloat_co, size: None | _ShapeLike = ...
+    ) -> ndarray[Any, dtype[float64]]: ...
+    @overload
+    def noncentral_chisquare(self, df: float, nonc: float, size: None = ...) -> float: ...  # type: ignore[misc]
+    @overload
+    def noncentral_chisquare(
+        self, df: _ArrayLikeFloat_co, nonc: _ArrayLikeFloat_co, size: None | _ShapeLike = ...
+    ) -> ndarray[Any, dtype[float64]]: ...
+    @overload
+    def standard_t(self, df: float, size: None = ...) -> float: ...  # type: ignore[misc]
+    @overload
+    def standard_t(
+        self, df: _ArrayLikeFloat_co, size: None = ...
+    ) -> ndarray[Any, dtype[float64]]: ...
+    @overload
+    def standard_t(
+        self, df: _ArrayLikeFloat_co, size: _ShapeLike = ...
+    ) -> ndarray[Any, dtype[float64]]: ...
+    @overload
+    def vonmises(self, mu: float, kappa: float, size: None = ...) -> float: ...  # type: ignore[misc]
+    @overload
+    def vonmises(
+        self, mu: _ArrayLikeFloat_co, kappa: _ArrayLikeFloat_co, size: None | _ShapeLike = ...
+    ) -> ndarray[Any, dtype[float64]]: ...
+    @overload
+    def pareto(self, a: float, size: None = ...) -> float: ...  # type: ignore[misc]
+    @overload
+    def pareto(
+        self, a: _ArrayLikeFloat_co, size: None | _ShapeLike = ...
+    ) -> ndarray[Any, dtype[float64]]: ...
+    @overload
+    def weibull(self, a: float, size: None = ...) -> float: ...  # type: ignore[misc]
+    @overload
+    def weibull(
+        self, a: _ArrayLikeFloat_co, size: None | _ShapeLike = ...
+    ) -> ndarray[Any, dtype[float64]]: ...
+    @overload
+    def power(self, a: float, size: None = ...) -> float: ...  # type: ignore[misc]
+    @overload
+    def power(
+        self, a: _ArrayLikeFloat_co, size: None | _ShapeLike = ...
+    ) -> ndarray[Any, dtype[float64]]: ...
+    @overload
+    def standard_cauchy(self, size: None = ...) -> float: ...  # type: ignore[misc]
+    @overload
+    def standard_cauchy(self, size: _ShapeLike = ...) -> ndarray[Any, dtype[float64]]: ...
+    @overload
+    def laplace(self, loc: float = ..., scale: float = ..., size: None = ...) -> float: ...  # type: ignore[misc]
+    @overload
+    def laplace(
+        self,
+        loc: _ArrayLikeFloat_co = ...,
+        scale: _ArrayLikeFloat_co = ...,
+        size: None | _ShapeLike = ...,
+    ) -> ndarray[Any, dtype[float64]]: ...
+    @overload
+    def gumbel(self, loc: float = ..., scale: float = ..., size: None = ...) -> float: ...  # type: ignore[misc]
+    @overload
+    def gumbel(
+        self,
+        loc: _ArrayLikeFloat_co = ...,
+        scale: _ArrayLikeFloat_co = ...,
+        size: None | _ShapeLike = ...,
+    ) -> ndarray[Any, dtype[float64]]: ...
+    @overload
+    def logistic(self, loc: float = ..., scale: float = ..., size: None = ...) -> float: ...  # type: ignore[misc]
+    @overload
+    def logistic(
+        self,
+        loc: _ArrayLikeFloat_co = ...,
+        scale: _ArrayLikeFloat_co = ...,
+        size: None | _ShapeLike = ...,
+    ) -> ndarray[Any, dtype[float64]]: ...
+    @overload
+    def lognormal(self, mean: float = ..., sigma: float = ..., size: None = ...) -> float: ...  # type: ignore[misc]
+    @overload
+    def lognormal(
+        self,
+        mean: _ArrayLikeFloat_co = ...,
+        sigma: _ArrayLikeFloat_co = ...,
+        size: None | _ShapeLike = ...,
+    ) -> ndarray[Any, dtype[float64]]: ...
+    @overload
+    def rayleigh(self, scale: float = ..., size: None = ...) -> float: ...  # type: ignore[misc]
+    @overload
+    def rayleigh(
+        self, scale: _ArrayLikeFloat_co = ..., size: None | _ShapeLike = ...
+    ) -> ndarray[Any, dtype[float64]]: ...
+    @overload
+    def wald(self, mean: float, scale: float, size: None = ...) -> float: ...  # type: ignore[misc]
+    @overload
+    def wald(
+        self, mean: _ArrayLikeFloat_co, scale: _ArrayLikeFloat_co, size: None | _ShapeLike = ...
+    ) -> ndarray[Any, dtype[float64]]: ...
+    @overload
+    def triangular(self, left: float, mode: float, right: float, size: None = ...) -> float: ...  # type: ignore[misc]
+    @overload
+    def triangular(
+        self,
+        left: _ArrayLikeFloat_co,
+        mode: _ArrayLikeFloat_co,
+        right: _ArrayLikeFloat_co,
+        size: None | _ShapeLike = ...,
+    ) -> ndarray[Any, dtype[float64]]: ...
+    @overload
+    def binomial(self, n: int, p: float, size: None = ...) -> int: ...  # type: ignore[misc]
+    @overload
+    def binomial(
+        self, n: _ArrayLikeInt_co, p: _ArrayLikeFloat_co, size: None | _ShapeLike = ...
+    ) -> ndarray[Any, dtype[int_]]: ...
+    @overload
+    def negative_binomial(self, n: float, p: float, size: None = ...) -> int: ...  # type: ignore[misc]
+    @overload
+    def negative_binomial(
+        self, n: _ArrayLikeFloat_co, p: _ArrayLikeFloat_co, size: None | _ShapeLike = ...
+    ) -> ndarray[Any, dtype[int_]]: ...
+    @overload
+    def poisson(self, lam: float = ..., size: None = ...) -> int: ...  # type: ignore[misc]
+    @overload
+    def poisson(
+        self, lam: _ArrayLikeFloat_co = ..., size: None | _ShapeLike = ...
+    ) -> ndarray[Any, dtype[int_]]: ...
+    @overload
+    def zipf(self, a: float, size: None = ...) -> int: ...  # type: ignore[misc]
+    @overload
+    def zipf(
+        self, a: _ArrayLikeFloat_co, size: None | _ShapeLike = ...
+    ) -> ndarray[Any, dtype[int_]]: ...
+    @overload
+    def geometric(self, p: float, size: None = ...) -> int: ...  # type: ignore[misc]
+    @overload
+    def geometric(
+        self, p: _ArrayLikeFloat_co, size: None | _ShapeLike = ...
+    ) -> ndarray[Any, dtype[int_]]: ...
+    @overload
+    def hypergeometric(self, ngood: int, nbad: int, nsample: int, size: None = ...) -> int: ...  # type: ignore[misc]
+    @overload
+    def hypergeometric(
+        self,
+        ngood: _ArrayLikeInt_co,
+        nbad: _ArrayLikeInt_co,
+        nsample: _ArrayLikeInt_co,
+        size: None | _ShapeLike = ...,
+    ) -> ndarray[Any, dtype[int_]]: ...
+    @overload
+    def logseries(self, p: float, size: None = ...) -> int: ...  # type: ignore[misc]
+    @overload
+    def logseries(
+        self, p: _ArrayLikeFloat_co, size: None | _ShapeLike = ...
+    ) -> ndarray[Any, dtype[int_]]: ...
+    def multivariate_normal(
+        self,
+        mean: _ArrayLikeFloat_co,
+        cov: _ArrayLikeFloat_co,
+        size: None | _ShapeLike = ...,
+        check_valid: Literal["warn", "raise", "ignore"] = ...,
+        tol: float = ...,
+    ) -> ndarray[Any, dtype[float64]]: ...
+    def multinomial(
+        self, n: _ArrayLikeInt_co, pvals: _ArrayLikeFloat_co, size: None | _ShapeLike = ...
+    ) -> ndarray[Any, dtype[int_]]: ...
+    def dirichlet(
+        self, alpha: _ArrayLikeFloat_co, size: None | _ShapeLike = ...
+    ) -> ndarray[Any, dtype[float64]]: ...
+    def shuffle(self, x: ArrayLike) -> None: ...
+    @overload
+    def permutation(self, x: int) -> ndarray[Any, dtype[int_]]: ...
+    @overload
+    def permutation(self, x: ArrayLike) -> ndarray[Any, Any]: ...
+
+_rand: RandomState
+
+beta = _rand.beta
+binomial = _rand.binomial
+bytes = _rand.bytes
+chisquare = _rand.chisquare
+choice = _rand.choice
+dirichlet = _rand.dirichlet
+exponential = _rand.exponential
+f = _rand.f
+gamma = _rand.gamma
+get_state = _rand.get_state
+geometric = _rand.geometric
+gumbel = _rand.gumbel
+hypergeometric = _rand.hypergeometric
+laplace = _rand.laplace
+logistic = _rand.logistic
+lognormal = _rand.lognormal
+logseries = _rand.logseries
+multinomial = _rand.multinomial
+multivariate_normal = _rand.multivariate_normal
+negative_binomial = _rand.negative_binomial
+noncentral_chisquare = _rand.noncentral_chisquare
+noncentral_f = _rand.noncentral_f
+normal = _rand.normal
+pareto = _rand.pareto
+permutation = _rand.permutation
+poisson = _rand.poisson
+power = _rand.power
+rand = _rand.rand
+randint = _rand.randint
+randn = _rand.randn
+random = _rand.random
+random_integers = _rand.random_integers
+random_sample = _rand.random_sample
+rayleigh = _rand.rayleigh
+seed = _rand.seed
+set_state = _rand.set_state
+shuffle = _rand.shuffle
+standard_cauchy = _rand.standard_cauchy
+standard_exponential = _rand.standard_exponential
+standard_gamma = _rand.standard_gamma
+standard_normal = _rand.standard_normal
+standard_t = _rand.standard_t
+triangular = _rand.triangular
+uniform = _rand.uniform
+vonmises = _rand.vonmises
+wald = _rand.wald
+weibull = _rand.weibull
+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/lib/python3.12/site-packages/numpy/random/tests/__init__.py b/lib/python3.12/site-packages/numpy/random/tests/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/lib/python3.12/site-packages/numpy/random/tests/__pycache__/__init__.cpython-312.pyc b/lib/python3.12/site-packages/numpy/random/tests/__pycache__/__init__.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..41fe45f4ce93d506218918f1bda5ed72af58e5eb
Binary files /dev/null and b/lib/python3.12/site-packages/numpy/random/tests/__pycache__/__init__.cpython-312.pyc differ
diff --git a/lib/python3.12/site-packages/numpy/random/tests/__pycache__/test_direct.cpython-312.pyc b/lib/python3.12/site-packages/numpy/random/tests/__pycache__/test_direct.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..1acd227fb979bb3cb364ad836a6b35f789c673f4
Binary files /dev/null and b/lib/python3.12/site-packages/numpy/random/tests/__pycache__/test_direct.cpython-312.pyc differ
diff --git a/lib/python3.12/site-packages/numpy/random/tests/__pycache__/test_extending.cpython-312.pyc b/lib/python3.12/site-packages/numpy/random/tests/__pycache__/test_extending.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..7e313328e66e0d46cf38c721a0aa1e7c0b2f2784
Binary files /dev/null and b/lib/python3.12/site-packages/numpy/random/tests/__pycache__/test_extending.cpython-312.pyc differ
diff --git a/lib/python3.12/site-packages/numpy/random/tests/__pycache__/test_generator_mt19937_regressions.cpython-312.pyc b/lib/python3.12/site-packages/numpy/random/tests/__pycache__/test_generator_mt19937_regressions.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..ac022ea57ea6874eddfb5fdb3e7c5ebfe89f8de8
Binary files /dev/null and b/lib/python3.12/site-packages/numpy/random/tests/__pycache__/test_generator_mt19937_regressions.cpython-312.pyc differ
diff --git a/lib/python3.12/site-packages/numpy/random/tests/__pycache__/test_randomstate_regression.cpython-312.pyc b/lib/python3.12/site-packages/numpy/random/tests/__pycache__/test_randomstate_regression.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..a3b7704e380a92f159e285471aa2528ab95c6879
Binary files /dev/null and b/lib/python3.12/site-packages/numpy/random/tests/__pycache__/test_randomstate_regression.cpython-312.pyc differ
diff --git a/lib/python3.12/site-packages/numpy/random/tests/__pycache__/test_regression.cpython-312.pyc b/lib/python3.12/site-packages/numpy/random/tests/__pycache__/test_regression.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..9fd193b8cf4159a3cba2035636195df14de858d9
Binary files /dev/null and b/lib/python3.12/site-packages/numpy/random/tests/__pycache__/test_regression.cpython-312.pyc differ
diff --git a/lib/python3.12/site-packages/numpy/random/tests/__pycache__/test_seed_sequence.cpython-312.pyc b/lib/python3.12/site-packages/numpy/random/tests/__pycache__/test_seed_sequence.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..5f10b73376897e25df0c571c37a0122334cfb0ec
Binary files /dev/null and b/lib/python3.12/site-packages/numpy/random/tests/__pycache__/test_seed_sequence.cpython-312.pyc differ
diff --git a/lib/python3.12/site-packages/numpy/random/tests/__pycache__/test_smoke.cpython-312.pyc b/lib/python3.12/site-packages/numpy/random/tests/__pycache__/test_smoke.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..d340a4c4873b6513394b544f0e804eb6886b1a02
Binary files /dev/null and b/lib/python3.12/site-packages/numpy/random/tests/__pycache__/test_smoke.cpython-312.pyc differ
diff --git a/lib/python3.12/site-packages/numpy/random/tests/data/__init__.py b/lib/python3.12/site-packages/numpy/random/tests/data/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/lib/python3.12/site-packages/numpy/random/tests/data/__pycache__/__init__.cpython-312.pyc b/lib/python3.12/site-packages/numpy/random/tests/data/__pycache__/__init__.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..df8e6b7fdbc9b8543caf35c7bb1189e43bda19f5
Binary files /dev/null and b/lib/python3.12/site-packages/numpy/random/tests/data/__pycache__/__init__.cpython-312.pyc differ
diff --git a/lib/python3.12/site-packages/numpy/random/tests/data/mt19937-testset-1.csv b/lib/python3.12/site-packages/numpy/random/tests/data/mt19937-testset-1.csv
new file mode 100644
index 0000000000000000000000000000000000000000..b97bfa66f72f1be31cdb32317905d805fe90f4d5
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/random/tests/data/mt19937-testset-1.csv
@@ -0,0 +1,1001 @@
+seed, 0xdeadbeaf
+0, 0xc816921f
+1, 0xb3623c6d
+2, 0x5fa391bb
+3, 0x40178d9
+4, 0x7dcc9811
+5, 0x548eb8e6
+6, 0x92ba3125
+7, 0x65fde68d
+8, 0x2f81ec95
+9, 0xbd94f7a2
+10, 0xdc4d9bcc
+11, 0xa672bf13
+12, 0xb41113e
+13, 0xec7e0066
+14, 0x50239372
+15, 0xd9d66b1d
+16, 0xab72a161
+17, 0xddc2e29f
+18, 0x7ea29ab4
+19, 0x80d141ba
+20, 0xb1c7edf1
+21, 0x44d29203
+22, 0xe224d98
+23, 0x5b3e9d26
+24, 0x14fd567c
+25, 0x27d98c96
+26, 0x838779fc
+27, 0x92a138a
+28, 0x5d08965b
+29, 0x531e0ad6
+30, 0x984ee8f4
+31, 0x1ed78539
+32, 0x32bd6d8d
+33, 0xc37c8516
+34, 0x9aef5c6b
+35, 0x3aacd139
+36, 0xd96ed154
+37, 0x489cd1ed
+38, 0x2cba4b3b
+39, 0x76c6ae72
+40, 0x2dae02b9
+41, 0x52ac5fd6
+42, 0xc2b5e265
+43, 0x630e6a28
+44, 0x3f560d5d
+45, 0x9315bdf3
+46, 0xf1055aba
+47, 0x840e42c6
+48, 0xf2099c6b
+49, 0x15ff7696
+50, 0x7948d146
+51, 0x97342961
+52, 0x7a7a21c
+53, 0xc66f4fb1
+54, 0x23c4103e
+55, 0xd7321f98
+56, 0xeb7efb75
+57, 0xe02490b5
+58, 0x2aa02de
+59, 0x8bee0bf7
+60, 0xfc2da059
+61, 0xae835034
+62, 0x678f2075
+63, 0x6d03094b
+64, 0x56455e05
+65, 0x18b32373
+66, 0x8ff0356b
+67, 0x1fe442fb
+68, 0x3f1ab6c3
+69, 0xb6fd21b
+70, 0xfc310eb2
+71, 0xb19e9a4d
+72, 0x17ddee72
+73, 0xfd534251
+74, 0x9e500564
+75, 0x9013a036
+76, 0xcf08f118
+77, 0x6b6d5969
+78, 0x3ccf1977
+79, 0x7cc11497
+80, 0x651c6ac9
+81, 0x4d6b104b
+82, 0x9a28314e
+83, 0x14c237be
+84, 0x9cfc8d52
+85, 0x2947fad5
+86, 0xd71eff49
+87, 0x5188730e
+88, 0x4b894614
+89, 0xf4fa2a34
+90, 0x42f7cc69
+91, 0x4089c9e8
+92, 0xbf0bbfe4
+93, 0x3cea65c
+94, 0xc6221207
+95, 0x1bb71a8f
+96, 0x54843fe7
+97, 0xbc59de4c
+98, 0x79c6ee64
+99, 0x14e57a26
+100, 0x68d88fe
+101, 0x2b86ef64
+102, 0x8ffff3c1
+103, 0x5bdd573f
+104, 0x85671813
+105, 0xefe32ca2
+106, 0x105ded1e
+107, 0x90ca2769
+108, 0xb33963ac
+109, 0x363fbbc3
+110, 0x3b3763ae
+111, 0x1d50ab88
+112, 0xc9ec01eb
+113, 0xc8bbeada
+114, 0x5d704692
+115, 0x5fd9e40
+116, 0xe61c125
+117, 0x2fe05792
+118, 0xda8afb72
+119, 0x4cbaa653
+120, 0xdd2243df
+121, 0x896fd3f5
+122, 0x5bc23db
+123, 0xa1c4e807
+124, 0x57d1a24d
+125, 0x66503ddc
+126, 0xcf7c0838
+127, 0x19e034fc
+128, 0x66807450
+129, 0xfc219b3b
+130, 0xe8a843e7
+131, 0x9ce61f08
+132, 0x92b950d6
+133, 0xce955ec4
+134, 0xda0d1f0d
+135, 0x960c6250
+136, 0x39552432
+137, 0xde845e84
+138, 0xff3b4b11
+139, 0x5d918e6f
+140, 0xbb930df2
+141, 0x7cfb0993
+142, 0x5400e1e9
+143, 0x3bfa0954
+144, 0x7e2605fb
+145, 0x11941591
+146, 0x887e6994
+147, 0xdc8bed45
+148, 0x45b3fb50
+149, 0xfbdf8358
+150, 0x41507468
+151, 0x34c87166
+152, 0x17f64d77
+153, 0x3bbaf4f8
+154, 0x4f26f37e
+155, 0x4a56ebf2
+156, 0x81100f1
+157, 0x96d94eae
+158, 0xca88fda5
+159, 0x2eef3a60
+160, 0x952afbd3
+161, 0x2bec88c7
+162, 0x52335c4b
+163, 0x8296db8e
+164, 0x4da7d00a
+165, 0xc00ac899
+166, 0xadff8c72
+167, 0xbecf26cf
+168, 0x8835c83c
+169, 0x1d13c804
+170, 0xaa940ddc
+171, 0x68222cfe
+172, 0x4569c0e1
+173, 0x29077976
+174, 0x32d4a5af
+175, 0xd31fcdef
+176, 0xdc60682b
+177, 0x7c95c368
+178, 0x75a70213
+179, 0x43021751
+180, 0x5e52e0a6
+181, 0xf7e190b5
+182, 0xee3e4bb
+183, 0x2fe3b150
+184, 0xcf419c07
+185, 0x478a4570
+186, 0xe5c3ea50
+187, 0x417f30a8
+188, 0xf0cfdaa0
+189, 0xd1f7f738
+190, 0x2c70fc23
+191, 0x54fc89f9
+192, 0x444dcf01
+193, 0xec2a002d
+194, 0xef0c3a88
+195, 0xde21be9
+196, 0x88ab3296
+197, 0x3028897c
+198, 0x264b200b
+199, 0xd8ae0706
+200, 0x9eef901a
+201, 0xbd1b96e0
+202, 0xea71366c
+203, 0x1465b694
+204, 0x5a794650
+205, 0x83df52d4
+206, 0x8262413d
+207, 0x5bc148c0
+208, 0xe0ecd80c
+209, 0x40649571
+210, 0xb4d2ee5f
+211, 0xedfd7d09
+212, 0xa082e25f
+213, 0xc62992d1
+214, 0xbc7e65ee
+215, 0x5499cf8a
+216, 0xac28f775
+217, 0x649840fb
+218, 0xd4c54805
+219, 0x1d166ba6
+220, 0xbeb1171f
+221, 0x45b66703
+222, 0x78c03349
+223, 0x38d2a6ff
+224, 0x935cae8b
+225, 0x1d07dc3f
+226, 0x6c1ed365
+227, 0x579fc585
+228, 0x1320c0ec
+229, 0x632757eb
+230, 0xd265a397
+231, 0x70e9b6c2
+232, 0xc81e322c
+233, 0xa27153cf
+234, 0x2118ba19
+235, 0x514ec400
+236, 0x2bd0ecd6
+237, 0xc3e7dae3
+238, 0xfa39355e
+239, 0x48f23cc1
+240, 0xbcf75948
+241, 0x53ccc70c
+242, 0x75346423
+243, 0x951181e0
+244, 0x348e90df
+245, 0x14365d7f
+246, 0xfbc95d7a
+247, 0xdc98a9e6
+248, 0xed202df7
+249, 0xa59ec913
+250, 0x6b6e9ae2
+251, 0x1697f265
+252, 0x15d322d0
+253, 0xa2e7ee0a
+254, 0x88860b7e
+255, 0x455d8b9d
+256, 0x2f5c59cb
+257, 0xac49c9f1
+258, 0xa6a6a039
+259, 0xc057f56b
+260, 0xf1ff1208
+261, 0x5eb8dc9d
+262, 0xe6702509
+263, 0xe238b0ed
+264, 0x5ae32e3d
+265, 0xa88ebbdf
+266, 0xef885ae7
+267, 0xafa6d49b
+268, 0xc94499e0
+269, 0x1a196325
+270, 0x88938da3
+271, 0x14f4345
+272, 0xd8e33637
+273, 0xa3551bd5
+274, 0x73fe35c7
+275, 0x9561e94b
+276, 0xd673bf68
+277, 0x16134872
+278, 0x68c42f9f
+279, 0xdf7574c8
+280, 0x8809bab9
+281, 0x1432cf69
+282, 0xafb66bf1
+283, 0xc184aa7b
+284, 0xedbf2007
+285, 0xbd420ce1
+286, 0x761033a0
+287, 0xff7e351f
+288, 0xd6c3780e
+289, 0x5844416f
+290, 0xc6c0ee1c
+291, 0xd2e147db
+292, 0x92ac601a
+293, 0x393e846b
+294, 0x18196cca
+295, 0x54a22be
+296, 0x32bab1c4
+297, 0x60365183
+298, 0x64fa342
+299, 0xca24a493
+300, 0xd8cc8b83
+301, 0x3faf102b
+302, 0x6e09bb58
+303, 0x812f0ea
+304, 0x592c95d8
+305, 0xe45ea4c5
+306, 0x23aebf83
+307, 0xbd9691d4
+308, 0xf47b4baa
+309, 0x4ac7b487
+310, 0xcce18803
+311, 0x3377556e
+312, 0x3ff8e6b6
+313, 0x99d22063
+314, 0x23250bec
+315, 0x4e1f9861
+316, 0x8554249b
+317, 0x8635c2fc
+318, 0xe8426e8a
+319, 0x966c29d8
+320, 0x270b6082
+321, 0x3180a8a1
+322, 0xe7e1668b
+323, 0x7f868dc
+324, 0xcf4c17cf
+325, 0xe31de4d1
+326, 0xc8c8aff4
+327, 0xae8db704
+328, 0x3c928cc2
+329, 0xe12cd48
+330, 0xb33ecd04
+331, 0xb93d7cbe
+332, 0x49c69d6a
+333, 0x7d3bce64
+334, 0x86bc219
+335, 0x8408233b
+336, 0x44dc7479
+337, 0xdf80d538
+338, 0xf3db02c3
+339, 0xbbbd31d7
+340, 0x121281f
+341, 0x7521e9a3
+342, 0x8859675a
+343, 0x75aa6502
+344, 0x430ed15b
+345, 0xecf0a28d
+346, 0x659774fd
+347, 0xd58a2311
+348, 0x512389a9
+349, 0xff65e1ff
+350, 0xb6ddf222
+351, 0xe3458895
+352, 0x8b13cd6e
+353, 0xd4a22870
+354, 0xe604c50c
+355, 0x27f54f26
+356, 0x8f7f422f
+357, 0x9735b4cf
+358, 0x414072b0
+359, 0x76a1c6d5
+360, 0xa2208c06
+361, 0x83cd0f61
+362, 0x6c4f7ead
+363, 0x6553cf76
+364, 0xeffcf44
+365, 0x7f434a3f
+366, 0x9dc364bd
+367, 0x3cdf52ed
+368, 0xad597594
+369, 0x9c3e211b
+370, 0x6c04a33f
+371, 0x885dafa6
+372, 0xbbdaca71
+373, 0x7ae5dd5c
+374, 0x37675644
+375, 0x251853c6
+376, 0x130b086b
+377, 0x143fa54b
+378, 0x54cdc282
+379, 0x9faff5b3
+380, 0x502a5c8b
+381, 0xd9524550
+382, 0xae221aa6
+383, 0x55cf759b
+384, 0x24782da4
+385, 0xd715d815
+386, 0x250ea09a
+387, 0x4e0744ac
+388, 0x11e15814
+389, 0xabe5f9df
+390, 0xc8146350
+391, 0xfba67d9b
+392, 0x2b82e42f
+393, 0xd4ea96fc
+394, 0x5ffc179e
+395, 0x1598bafe
+396, 0x7fb6d662
+397, 0x1a12a0db
+398, 0x450cee4a
+399, 0x85f8e12
+400, 0xce71b594
+401, 0xd4bb1d19
+402, 0x968f379d
+403, 0x54cc1d52
+404, 0x467e6066
+405, 0x7da5f9a9
+406, 0x70977034
+407, 0x49e65c4b
+408, 0xd08570d1
+409, 0x7acdf60b
+410, 0xdffa038b
+411, 0x9ce14e4c
+412, 0x107cbbf8
+413, 0xdd746ca0
+414, 0xc6370a46
+415, 0xe7f83312
+416, 0x373fa9ce
+417, 0xd822a2c6
+418, 0x1d4efea6
+419, 0xc53dcadb
+420, 0x9b4e898f
+421, 0x71daa6bf
+422, 0x7a0bc78b
+423, 0xd7b86f50
+424, 0x1b8b3286
+425, 0xcf9425dd
+426, 0xd5263220
+427, 0x4ea0b647
+428, 0xc767fe64
+429, 0xcfc5e67
+430, 0xcc6a2942
+431, 0xa51eff00
+432, 0x76092e1b
+433, 0xf606e80f
+434, 0x824b5e20
+435, 0xebb55e14
+436, 0x783d96a6
+437, 0x10696512
+438, 0x17ee510a
+439, 0x3ab70a1f
+440, 0xcce6b210
+441, 0x8f72f0fb
+442, 0xf0610b41
+443, 0x83d01fb5
+444, 0x6b3de36
+445, 0xe4c2e84f
+446, 0x9c43bb15
+447, 0xddf2905
+448, 0x7dd63556
+449, 0x3662ca09
+450, 0xfb81f35b
+451, 0xc2c8a72a
+452, 0x8e93c37
+453, 0xa93da2d4
+454, 0xa03af8f1
+455, 0x8d75159a
+456, 0x15f010b0
+457, 0xa296ab06
+458, 0xe55962ba
+459, 0xeae700a9
+460, 0xe388964a
+461, 0x917f2bec
+462, 0x1c203fea
+463, 0x792a01ba
+464, 0xa93a80ac
+465, 0x9eb8a197
+466, 0x56c0bc73
+467, 0xb8f05799
+468, 0xf429a8c8
+469, 0xb92cee42
+470, 0xf8864ec
+471, 0x62f2518a
+472, 0x3a7bfa3e
+473, 0x12e56e6d
+474, 0xd7a18313
+475, 0x41fa3899
+476, 0xa09c4956
+477, 0xebcfd94a
+478, 0xc485f90b
+479, 0x4391ce40
+480, 0x742a3333
+481, 0xc932f9e5
+482, 0x75c6c263
+483, 0x80937f0
+484, 0xcf21833c
+485, 0x16027520
+486, 0xd42e669f
+487, 0xb0f01fb7
+488, 0xb35896f1
+489, 0x763737a9
+490, 0x1bb20209
+491, 0x3551f189
+492, 0x56bc2602
+493, 0xb6eacf4
+494, 0x42ec4d11
+495, 0x245cc68
+496, 0xc27ac43b
+497, 0x9d903466
+498, 0xce3f0c05
+499, 0xb708c31c
+500, 0xc0fd37eb
+501, 0x95938b2c
+502, 0xf20175a7
+503, 0x4a86ee9b
+504, 0xbe039a58
+505, 0xd41cabe7
+506, 0x83bc99ba
+507, 0x761d60e1
+508, 0x7737cc2e
+509, 0x2b82fc4b
+510, 0x375aa401
+511, 0xfe9597a0
+512, 0x5543806a
+513, 0x44f31238
+514, 0x7df31538
+515, 0x74cfa770
+516, 0x8755d881
+517, 0x1fde665a
+518, 0xda8bf315
+519, 0x973d8e95
+520, 0x72205228
+521, 0x8fe59717
+522, 0x7bb90b34
+523, 0xef6ed945
+524, 0x16fd4a38
+525, 0x5db44de1
+526, 0xf09f93b3
+527, 0xe84824cc
+528, 0x945bb50e
+529, 0xd0be4aa5
+530, 0x47c277c2
+531, 0xd3800c28
+532, 0xac1c33ec
+533, 0xd3dacce
+534, 0x811c8387
+535, 0x6761b36
+536, 0x70d3882f
+537, 0xd6e62e3a
+538, 0xea25daa2
+539, 0xb07f39d1
+540, 0x391d89d7
+541, 0x84b6fb5e
+542, 0x3dda3fca
+543, 0x229e80a4
+544, 0x3d94a4b7
+545, 0x5d3d576a
+546, 0xad7818a0
+547, 0xce23b03a
+548, 0x7aa2079c
+549, 0x9a6be555
+550, 0x83f3b34a
+551, 0x1848f9d9
+552, 0xd8fefc1c
+553, 0x48e6ce48
+554, 0x52e55750
+555, 0xf41a71cf
+556, 0xba08e259
+557, 0xfaf06a15
+558, 0xeaaac0fb
+559, 0x34f90098
+560, 0xb1dfffbb
+561, 0x718daec2
+562, 0xab4dda21
+563, 0xd27cc1ee
+564, 0x4aafbc4c
+565, 0x356dfb4f
+566, 0x83fcdfd6
+567, 0x8f0bcde0
+568, 0x4363f844
+569, 0xadc0f4d5
+570, 0x3bde994e
+571, 0x3884d452
+572, 0x21876b4a
+573, 0x9c985398
+574, 0xca55a226
+575, 0x3a88c583
+576, 0x916dc33c
+577, 0x8f67d1d7
+578, 0x3b26a667
+579, 0xe4ddeb4b
+580, 0x1a9d8c33
+581, 0x81c9b74f
+582, 0x9ed1e9df
+583, 0x6e61aecf
+584, 0x95e95a5d
+585, 0x68864ff5
+586, 0xb8fa5b9
+587, 0x72b1b3de
+588, 0x5e18a86b
+589, 0xd7f2337d
+590, 0xd70e0925
+591, 0xb573a4c1
+592, 0xc77b3f8a
+593, 0x389b20de
+594, 0x16cf6afb
+595, 0xa39bd275
+596, 0xf491cf01
+597, 0x6f88a802
+598, 0x8510af05
+599, 0xe7cd549a
+600, 0x8603179a
+601, 0xef43f191
+602, 0xf9b64c60
+603, 0xb00254a7
+604, 0xd7c06a2d
+605, 0x17e9380b
+606, 0x529e727b
+607, 0xaaa8fe0a
+608, 0xfb64ff4c
+609, 0xcd75af26
+610, 0xfb717c87
+611, 0xa0789899
+612, 0x10391ec9
+613, 0x7e9b40b3
+614, 0x18536554
+615, 0x728c05f7
+616, 0x787dca98
+617, 0xad948d1
+618, 0x44c18def
+619, 0x3303f2ec
+620, 0xa15acb5
+621, 0xb58d38f4
+622, 0xfe041ef8
+623, 0xd151a956
+624, 0x7b9168e8
+625, 0x5ebeca06
+626, 0x90fe95df
+627, 0xf76875aa
+628, 0xb2e0d664
+629, 0x2e3253b7
+630, 0x68e34469
+631, 0x1f0c2d89
+632, 0x13a34ac2
+633, 0x5ffeb841
+634, 0xe381e91c
+635, 0xb8549a92
+636, 0x3f35cf1
+637, 0xda0f9dcb
+638, 0xdd9828a6
+639, 0xe1428f29
+640, 0xf4db80b5
+641, 0xdac30af5
+642, 0x1af1dd17
+643, 0x9a540254
+644, 0xcab68a38
+645, 0x33560361
+646, 0x2fbf3886
+647, 0xbc785923
+648, 0xe081cd10
+649, 0x8e473356
+650, 0xd102c357
+651, 0xeea4fe48
+652, 0x248d3453
+653, 0x1da79ac
+654, 0x815a65ff
+655, 0x27693e76
+656, 0xb7d5af40
+657, 0x6d245d30
+658, 0x9e06fa8f
+659, 0xb0570dcb
+660, 0x469f0005
+661, 0x3e0ca132
+662, 0xd89bbf3
+663, 0xd61ccd47
+664, 0x6383878
+665, 0x62b5956
+666, 0x4dc83675
+667, 0x93fd8492
+668, 0x5a0091f5
+669, 0xc9f9bc3
+670, 0xa26e7778
+671, 0xeabf2d01
+672, 0xe612dc06
+673, 0x85d89ff9
+674, 0xd1763179
+675, 0xcb88947b
+676, 0x9e8757a5
+677, 0xe100e85c
+678, 0x904166eb
+679, 0x4996243d
+680, 0x4038e1cb
+681, 0x2be2c63d
+682, 0x77017e81
+683, 0x3b1f556b
+684, 0x1c785c77
+685, 0x6869b8bd
+686, 0xe1217ed4
+687, 0x4012ab2f
+688, 0xc06c0d8e
+689, 0x2122eb68
+690, 0xad1783fd
+691, 0x5f0c80e3
+692, 0x828f7efa
+693, 0x29328399
+694, 0xeadf1087
+695, 0x85dc0037
+696, 0x9691ef26
+697, 0xc0947a53
+698, 0x2a178d2a
+699, 0x2a2c7e8f
+700, 0x90378380
+701, 0xaad8d326
+702, 0x9cf1c3c8
+703, 0x84eccd44
+704, 0x79e61808
+705, 0x8b3f454e
+706, 0x209e6e1
+707, 0x51f88378
+708, 0xc210226f
+709, 0xd982adb5
+710, 0x55d44a31
+711, 0x9817d443
+712, 0xa328c626
+713, 0x13455966
+714, 0xb8f681d3
+715, 0x2a3c713b
+716, 0xc186959b
+717, 0x814a74b0
+718, 0xed7bc90
+719, 0xa88d3d6d
+720, 0x88a9f561
+721, 0x73aa1c0a
+722, 0xdfeff404
+723, 0xec037e4b
+724, 0xa5c209f0
+725, 0xb3a223b4
+726, 0x24ce3709
+727, 0x3184c790
+728, 0xa1398c62
+729, 0x2f92034e
+730, 0xbb37a79a
+731, 0x605287b4
+732, 0x8faa772c
+733, 0x6ce56c1d
+734, 0xc035fb4c
+735, 0x7cf5b316
+736, 0x6502645
+737, 0xa283d810
+738, 0x778bc2f1
+739, 0xfdf99313
+740, 0x1f513265
+741, 0xbd3837e2
+742, 0x9b84a9a
+743, 0x2139ce91
+744, 0x61a8e890
+745, 0xf9ff12db
+746, 0xb43d2ea7
+747, 0x88532e61
+748, 0x175a6655
+749, 0x7a6c4f72
+750, 0x6dafc1b7
+751, 0x449b1459
+752, 0x514f654f
+753, 0x9a6731e2
+754, 0x8632da43
+755, 0xc81b0422
+756, 0x81fe9005
+757, 0x15b79618
+758, 0xb5fa629f
+759, 0x987a474f
+760, 0x1c74f54e
+761, 0xf9743232
+762, 0xec4b55f
+763, 0x87d761e5
+764, 0xd1ad78b7
+765, 0x453d9350
+766, 0xc7a7d85
+767, 0xb2576ff5
+768, 0xcdde49b7
+769, 0x8e1f763e
+770, 0x1338583e
+771, 0xfd65b9dc
+772, 0x4f19c4f4
+773, 0x3a52d73d
+774, 0xd3509c4c
+775, 0xda24fe31
+776, 0xe2de56ba
+777, 0x2db5e540
+778, 0x23172734
+779, 0x4db572f
+780, 0xeb941718
+781, 0x84c2649a
+782, 0x3b1e5b6a
+783, 0x4c9c61b9
+784, 0x3bccd11
+785, 0xb4d7b78e
+786, 0x48580ae5
+787, 0xd273ab68
+788, 0x25c11615
+789, 0x470b53f6
+790, 0x329c2068
+791, 0x1693721b
+792, 0xf8c9aacf
+793, 0x4c3d5693
+794, 0xd778284e
+795, 0xae1cb24f
+796, 0x3c11d1b3
+797, 0xddd2b0c0
+798, 0x90269fa7
+799, 0x5666e0a2
+800, 0xf9f195a4
+801, 0x61d78eb2
+802, 0xada5a7c0
+803, 0xaa272fbe
+804, 0xba3bae2f
+805, 0xd0b70fc2
+806, 0x529f32b
+807, 0xda7a3e21
+808, 0x9a776a20
+809, 0xb21f9635
+810, 0xb3acc14e
+811, 0xac55f56
+812, 0x29dccf41
+813, 0x32dabdb3
+814, 0xaa032f58
+815, 0xfa406af4
+816, 0xce3c415d
+817, 0xb44fb4d9
+818, 0x32248d1c
+819, 0x680c6440
+820, 0xae2337b
+821, 0x294cb597
+822, 0x5bca48fe
+823, 0xaef19f40
+824, 0xad60406
+825, 0x4781f090
+826, 0xfd691ffc
+827, 0xb6568268
+828, 0xa56c72cb
+829, 0xf8a9e0fc
+830, 0x9af4fd02
+831, 0x2cd30932
+832, 0x776cefd7
+833, 0xe31f476e
+834, 0x6d94a437
+835, 0xb3cab598
+836, 0xf582d13f
+837, 0x3bf8759d
+838, 0xc3777dc
+839, 0x5e425ea8
+840, 0x1c7ff4ed
+841, 0x1c2e97d1
+842, 0xc062d2b4
+843, 0x46dc80e0
+844, 0xbcdb47e6
+845, 0x32282fe0
+846, 0xaba89063
+847, 0x5e94e9bb
+848, 0x3e667f78
+849, 0xea6eb21a
+850, 0xe56e54e8
+851, 0xa0383510
+852, 0x6768fe2b
+853, 0xb53ac3e0
+854, 0x779569a0
+855, 0xeca83c6a
+856, 0x24db4d2d
+857, 0x4585f696
+858, 0xf84748b2
+859, 0xf6a4dd5b
+860, 0x31fb524d
+861, 0x67ab39fe
+862, 0x5882a899
+863, 0x9a05fcf6
+864, 0x712b5674
+865, 0xe8c6958f
+866, 0x4b448bb3
+867, 0x530b9abf
+868, 0xb491f491
+869, 0x98352c62
+870, 0x2d0a50e3
+871, 0xeb4384da
+872, 0x36246f07
+873, 0xcbc5c1a
+874, 0xae24031d
+875, 0x44d11ed6
+876, 0xf07f1608
+877, 0xf296aadd
+878, 0x3bcfe3be
+879, 0x8fa1e7df
+880, 0xfd317a6e
+881, 0xe4975c44
+882, 0x15205892
+883, 0xa762d4df
+884, 0xf1167365
+885, 0x6811cc00
+886, 0x8315f23
+887, 0xe045b4b1
+888, 0xa8496414
+889, 0xbed313ae
+890, 0xcdae3ddb
+891, 0xa9c22c9
+892, 0x275fab1a
+893, 0xedd65fa
+894, 0x4c188229
+895, 0x63a83e58
+896, 0x18aa9207
+897, 0xa41f2e78
+898, 0xd9f63653
+899, 0xbe2be73b
+900, 0xa3364d39
+901, 0x896d5428
+902, 0xc737539e
+903, 0x745a78c6
+904, 0xf0b2b042
+905, 0x510773b4
+906, 0x92ad8e37
+907, 0x27f2f8c4
+908, 0x23704cc8
+909, 0x3d95a77f
+910, 0xf08587a4
+911, 0xbd696a25
+912, 0x948924f3
+913, 0x8cddb634
+914, 0xcd2a4910
+915, 0x8e0e300e
+916, 0x83815a9b
+917, 0x67383510
+918, 0x3c18f0d0
+919, 0xc7a7bccc
+920, 0x7cc2d3a2
+921, 0x52eb2eeb
+922, 0xe4a257e5
+923, 0xec76160e
+924, 0x63f9ad68
+925, 0x36d0bbbf
+926, 0x957bc4e4
+927, 0xc9ed90ff
+928, 0x4cb6059d
+929, 0x2f86eca1
+930, 0x3e3665a3
+931, 0x9b7eb6f4
+932, 0x492e7e18
+933, 0xa098aa51
+934, 0x7eb568b2
+935, 0x3fd639ba
+936, 0x7bebcf1
+937, 0x99c844ad
+938, 0x43cb5ec7
+939, 0x8dfbbef5
+940, 0x5be413ff
+941, 0xd93b976d
+942, 0xc1c7a86d
+943, 0x1f0e93d0
+944, 0x498204a2
+945, 0xe8fe832a
+946, 0x2236bd7
+947, 0x89953769
+948, 0x2acc3491
+949, 0x2c4f22c6
+950, 0xd7996277
+951, 0x3bcdc349
+952, 0xfc286630
+953, 0x5f8909fd
+954, 0x242677c0
+955, 0x4cb34104
+956, 0xa6ff8100
+957, 0x39ea47ec
+958, 0x9bd54140
+959, 0x7502ffe8
+960, 0x7ebef8ae
+961, 0x1ed8abe4
+962, 0xfaba8450
+963, 0xc197b65f
+964, 0x19431455
+965, 0xe229c176
+966, 0xeb2967da
+967, 0xe0c5dc05
+968, 0xa84e3227
+969, 0x10dd9e0f
+970, 0xbdb70b02
+971, 0xce24808a
+972, 0x423edab8
+973, 0x194caf71
+974, 0x144f150d
+975, 0xf811c2d2
+976, 0xc224ee85
+977, 0x2b217a5b
+978, 0xf78a5a79
+979, 0x6554a4b1
+980, 0x769582df
+981, 0xf4b2cf93
+982, 0x89648483
+983, 0xb3283a3e
+984, 0x82b895db
+985, 0x79388ef0
+986, 0x54bc42a6
+987, 0xc4dd39d9
+988, 0x45b33b7d
+989, 0x8703b2c1
+990, 0x1cc94806
+991, 0xe0f43e49
+992, 0xcaa7b6bc
+993, 0x4f88e9af
+994, 0x1477cce5
+995, 0x347dd115
+996, 0x36e335fa
+997, 0xb93c9a31
+998, 0xaac3a175
+999, 0x68a19647
diff --git a/lib/python3.12/site-packages/numpy/random/tests/data/mt19937-testset-2.csv b/lib/python3.12/site-packages/numpy/random/tests/data/mt19937-testset-2.csv
new file mode 100644
index 0000000000000000000000000000000000000000..cdb8e4794ccdb30fa4fea3045b30a188f6ff5357
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/random/tests/data/mt19937-testset-2.csv
@@ -0,0 +1,1001 @@
+seed, 0x0
+0, 0x7ab4ea94
+1, 0x9b561119
+2, 0x4957d02e
+3, 0x7dd3fdc2
+4, 0x5affe54
+5, 0x5a01741c
+6, 0x8b9e8c1f
+7, 0xda5bf11a
+8, 0x509226
+9, 0x64e2ea17
+10, 0x82c6dab5
+11, 0xe4302515
+12, 0x8198b873
+13, 0xc3ec9a82
+14, 0x829dff28
+15, 0x5278e44f
+16, 0x994a7d2c
+17, 0xf1c89398
+18, 0xaf2fddec
+19, 0x22abc6ee
+20, 0x963dbd43
+21, 0xc29edffb
+22, 0x41c1ce07
+23, 0x9c90034d
+24, 0x1f17a796
+25, 0x3833caa8
+26, 0xb8795528
+27, 0xebc595a2
+28, 0xf8f5b5dd
+29, 0xc2881f72
+30, 0x18e5d3f0
+31, 0x9b19ac7a
+32, 0xb9992436
+33, 0xc00052b3
+34, 0xb63f4475
+35, 0x962642d9
+36, 0x63506c10
+37, 0x2be6b127
+38, 0x569bdbc6
+39, 0x7f185e01
+40, 0xebb55f53
+41, 0x1c30198c
+42, 0x7c8d75c6
+43, 0xd3f2186b
+44, 0xaca5b9b1
+45, 0xbc49ff45
+46, 0xc4a802af
+47, 0x2cecd86f
+48, 0x8e0da529
+49, 0x1f22b00e
+50, 0x4559ea80
+51, 0x60f587d8
+52, 0x7c7460e9
+53, 0x67be0a4a
+54, 0x987a0183
+55, 0x7bd30f1
+56, 0xab18c4ac
+57, 0xffdbfb64
+58, 0x9ea917f9
+59, 0x1239dab7
+60, 0x38efabeb
+61, 0x5da91888
+62, 0x8f49ed62
+63, 0x83f60b1e
+64, 0x5950a3fc
+65, 0xd8911104
+66, 0x19e8859e
+67, 0x1a4d89ec
+68, 0x968ca180
+69, 0x9e1b6da3
+70, 0x3d99c2c
+71, 0x55f76289
+72, 0x8fa28b9e
+73, 0x9fe01d33
+74, 0xdade4e38
+75, 0x1ea04290
+76, 0xa7263313
+77, 0xaafc762e
+78, 0x460476d6
+79, 0x31226e12
+80, 0x451d3f05
+81, 0xd0d2764b
+82, 0xd06e1ab3
+83, 0x1394e3f4
+84, 0x2fc04ea3
+85, 0x5b8401c
+86, 0xebd6c929
+87, 0xe881687c
+88, 0x94bdd66a
+89, 0xabf85983
+90, 0x223ad12d
+91, 0x2aaeeaa3
+92, 0x1f704934
+93, 0x2db2efb6
+94, 0xf49b8dfb
+95, 0x5bdbbb9d
+96, 0xba0cd0db
+97, 0x4ec4674e
+98, 0xad0129e
+99, 0x7a66129b
+100, 0x50d12c5e
+101, 0x85b1d335
+102, 0x3efda58a
+103, 0xecd886fb
+104, 0x8ecadd3d
+105, 0x60ebac0f
+106, 0x5e10fe79
+107, 0xa84f7e5d
+108, 0x43931288
+109, 0xfacf448
+110, 0x4ee01997
+111, 0xcdc0a651
+112, 0x33c87037
+113, 0x8b50fc03
+114, 0xf52aad34
+115, 0xda6cd856
+116, 0x7585bea0
+117, 0xe947c762
+118, 0x4ddff5d8
+119, 0xe0e79b3b
+120, 0xb804cf09
+121, 0x84765c44
+122, 0x3ff666b4
+123, 0xe31621ad
+124, 0x816f2236
+125, 0x228176bc
+126, 0xfdc14904
+127, 0x635f5077
+128, 0x6981a817
+129, 0xfd9a0300
+130, 0xd3fa8a24
+131, 0xd67c1a77
+132, 0x903fe97a
+133, 0xf7c4a4d5
+134, 0x109f2058
+135, 0x48ab87fe
+136, 0xfd6f1928
+137, 0x707e9452
+138, 0xf327db9e
+139, 0x7b80d76d
+140, 0xfb6ba193
+141, 0x454a1ad0
+142, 0xe20b51e
+143, 0xb774d085
+144, 0x6b1ed574
+145, 0xb1e77de4
+146, 0xe2a83b37
+147, 0x33d3176f
+148, 0x2f0ca0fc
+149, 0x17f51e2
+150, 0x7c1fbf55
+151, 0xf09e9cd0
+152, 0xe3d9bacd
+153, 0x4244db0a
+154, 0x876c09fc
+155, 0x9db4fc2f
+156, 0xd3771d60
+157, 0x25fc6a75
+158, 0xb309915c
+159, 0xc50ee027
+160, 0xaa5b7b38
+161, 0x4c650ded
+162, 0x1acb2879
+163, 0x50db5887
+164, 0x90054847
+165, 0xfef23e5b
+166, 0x2dd7b7d5
+167, 0x990b8c2e
+168, 0x6001a601
+169, 0xb5d314c4
+170, 0xfbfb7bf9
+171, 0x1aba997d
+172, 0x814e7304
+173, 0x989d956a
+174, 0x86d5a29c
+175, 0x70a9fa08
+176, 0xc4ccba87
+177, 0x7e9cb366
+178, 0xee18eb0a
+179, 0x44f5be58
+180, 0x91d4af2d
+181, 0x5ab6e593
+182, 0x9fd6bb4d
+183, 0x85894ce
+184, 0x728a2401
+185, 0xf006f6d4
+186, 0xd782741e
+187, 0x842cd5bd
+188, 0xfb5883aa
+189, 0x7e5a471
+190, 0x83ff6965
+191, 0xc9675c6b
+192, 0xb6ced3c7
+193, 0x3de6425b
+194, 0x25e14db4
+195, 0x69ca3dec
+196, 0x81342d13
+197, 0xd7cd8417
+198, 0x88d15e69
+199, 0xefba17c9
+200, 0x43d595e6
+201, 0x89d4cf25
+202, 0x7cae9b9b
+203, 0x2242c621
+204, 0x27fc3598
+205, 0x467b1d84
+206, 0xe84d4622
+207, 0xa26bf980
+208, 0x80411010
+209, 0xe2c2bfea
+210, 0xbc6ca25a
+211, 0x3ddb592a
+212, 0xdd46eb9e
+213, 0xdfe8f657
+214, 0x2cedc974
+215, 0xf0dc546b
+216, 0xd46be68f
+217, 0x26d8a5aa
+218, 0x76e96ba3
+219, 0x7d5b5353
+220, 0xf532237c
+221, 0x6478b79
+222, 0x9b81a5e5
+223, 0x5fc68e5c
+224, 0x68436e70
+225, 0x2a0043f9
+226, 0x108d523c
+227, 0x7a4c32a3
+228, 0x9c84c742
+229, 0x6f813dae
+230, 0xfcc5bbcc
+231, 0x215b6f3a
+232, 0x84cb321d
+233, 0x7913a248
+234, 0xb1e6b585
+235, 0x49376b31
+236, 0x1dc896b0
+237, 0x347051ad
+238, 0x5524c042
+239, 0xda0eef9d
+240, 0xf2e73342
+241, 0xbeee2f9d
+242, 0x7c702874
+243, 0x9eb3bd34
+244, 0x97b09700
+245, 0xcdbab1d4
+246, 0x4a2f6ed1
+247, 0x2047bda5
+248, 0x3ecc7005
+249, 0x8d0d5e67
+250, 0x40876fb5
+251, 0xb5fd2187
+252, 0xe915d8af
+253, 0x9a2351c7
+254, 0xccc658ae
+255, 0xebb1eddc
+256, 0xc4a83671
+257, 0xffb2548f
+258, 0xe4fe387a
+259, 0x477aaab4
+260, 0x8475a4e4
+261, 0xf8823e46
+262, 0xe4130f71
+263, 0xbdb54482
+264, 0x98fe0462
+265, 0xf36b27b8
+266, 0xed7733da
+267, 0x5f428afc
+268, 0x43a3a21a
+269, 0xf8370b55
+270, 0xfade1de1
+271, 0xd9a038ea
+272, 0x3c69af23
+273, 0x24df7dd0
+274, 0xf66d9353
+275, 0x71d811be
+276, 0xcc4d024b
+277, 0xb8c30bf0
+278, 0x4198509d
+279, 0x8b37ba36
+280, 0xa41ae29a
+281, 0x8cf7799e
+282, 0x5cd0136a
+283, 0xa11324ef
+284, 0x2f8b6d4b
+285, 0x3657cf17
+286, 0x35b6873f
+287, 0xee6e5bd7
+288, 0xbeeaa98
+289, 0x9ad3c581
+290, 0xe2376c3f
+291, 0x738027cc
+292, 0x536ac839
+293, 0xf066227
+294, 0x6c9cb0f9
+295, 0x84082ae6
+296, 0xab38ae9d
+297, 0x493eade9
+298, 0xcb630b3a
+299, 0x64d44250
+300, 0xe5efb557
+301, 0xea2424d9
+302, 0x11a690ba
+303, 0x30a48ae4
+304, 0x58987e53
+305, 0x94ec6076
+306, 0x5d3308fa
+307, 0xf1635ebb
+308, 0x56a5ab90
+309, 0x2b2f2ee4
+310, 0x6f9e6483
+311, 0x8b93e327
+312, 0xa7ce140b
+313, 0x4c8aa42
+314, 0x7657bb3f
+315, 0xf250fd75
+316, 0x1edfcb0f
+317, 0xdb42ace3
+318, 0xf8147e16
+319, 0xd1992bd
+320, 0x64bb14d1
+321, 0x423e724d
+322, 0x7b172f7c
+323, 0x17171696
+324, 0x4acaf83b
+325, 0x7a83527e
+326, 0xfc980c60
+327, 0xc8b56bb
+328, 0x2453f77f
+329, 0x85ad1bf9
+330, 0x62a85dfe
+331, 0x48238c4d
+332, 0xbb3ec1eb
+333, 0x4c1c039c
+334, 0x1f37f571
+335, 0x98aecb63
+336, 0xc3b3ddd6
+337, 0xd22dad4
+338, 0xe49671a3
+339, 0xe3baf945
+340, 0xb9e21680
+341, 0xda562856
+342, 0xe8b88ce4
+343, 0x86f88de2
+344, 0x986faf76
+345, 0x6f0025c3
+346, 0x3fe21234
+347, 0xd8d3f729
+348, 0xc2d11c6f
+349, 0xd4f9e8f
+350, 0xf61a0aa
+351, 0xc48bb313
+352, 0xe944e940
+353, 0xf1801b2e
+354, 0x253590be
+355, 0x981f069d
+356, 0x891454d8
+357, 0xa4f824ad
+358, 0x6dd2cc48
+359, 0x3018827e
+360, 0x3fb329e6
+361, 0x65276517
+362, 0x8d2c0dd2
+363, 0xc965b48e
+364, 0x85d14d90
+365, 0x5a51623c
+366, 0xa9573d6a
+367, 0x82d00edf
+368, 0x5ed7ce07
+369, 0x1d946abc
+370, 0x24fa567b
+371, 0x83ef5ecc
+372, 0x9001724a
+373, 0xc4fe48f3
+374, 0x1e07c25c
+375, 0xf4d5e65e
+376, 0xb734f6e9
+377, 0x327a2df8
+378, 0x766d59b7
+379, 0x625e6b61
+380, 0xe82f32d7
+381, 0x1566c638
+382, 0x2e815871
+383, 0x606514aa
+384, 0x36b7386e
+385, 0xcaa8ce08
+386, 0xb453fe9c
+387, 0x48574e23
+388, 0x71f0da06
+389, 0xa8a79463
+390, 0x6b590210
+391, 0x86e989db
+392, 0x42899f4f
+393, 0x7a654ef9
+394, 0x4c4fe932
+395, 0x77b2fd10
+396, 0xb6b4565c
+397, 0xa2e537a3
+398, 0xef5a3dca
+399, 0x41235ea8
+400, 0x95c90541
+401, 0x50ad32c4
+402, 0xc1b8e0a4
+403, 0x498e9aab
+404, 0xffc965f1
+405, 0x72633485
+406, 0x3a731aef
+407, 0x7cfddd0b
+408, 0xb04d4129
+409, 0x184fc28e
+410, 0x424369b0
+411, 0xf9ae13a1
+412, 0xaf357c8d
+413, 0x7a19228e
+414, 0xb46de2a8
+415, 0xeff2ac76
+416, 0xa6c9357b
+417, 0x614f19c1
+418, 0x8ee1a53f
+419, 0xbe1257b1
+420, 0xf72651fe
+421, 0xd347c298
+422, 0x96dd2f23
+423, 0x5bb1d63e
+424, 0x32e10887
+425, 0x36a144da
+426, 0x9d70e791
+427, 0x5e535a25
+428, 0x214253da
+429, 0x2e43dd40
+430, 0xfc0413f4
+431, 0x1f5ea409
+432, 0x1754c126
+433, 0xcdbeebbe
+434, 0x1fb44a14
+435, 0xaec7926
+436, 0xb9d9a1e
+437, 0x9e4a6577
+438, 0x8b1f04c5
+439, 0x19854e8a
+440, 0x531080cd
+441, 0xc0cbd73
+442, 0x20399d77
+443, 0x7d8e9ed5
+444, 0x66177598
+445, 0x4d18a5c2
+446, 0xe08ebf58
+447, 0xb1f9c87b
+448, 0x66bedb10
+449, 0x26670d21
+450, 0x7a7892da
+451, 0x69b69d86
+452, 0xd04f1d1c
+453, 0xaf469625
+454, 0x7946b813
+455, 0x1ee596bd
+456, 0x7f365d85
+457, 0x795b662b
+458, 0x194ad02d
+459, 0x5a9649b5
+460, 0x6085e278
+461, 0x2cf54550
+462, 0x9c77ea0b
+463, 0x3c6ff8b
+464, 0x2141cd34
+465, 0xb90bc671
+466, 0x35037c4b
+467, 0xd04c0d76
+468, 0xc75bff8
+469, 0x8f52003b
+470, 0xfad3d031
+471, 0x667024bc
+472, 0xcb04ea36
+473, 0x3e03d587
+474, 0x2644d3a0
+475, 0xa8fe99ba
+476, 0x2b9a55fc
+477, 0x45c4d44a
+478, 0xd059881
+479, 0xe07fcd20
+480, 0x4e22046c
+481, 0x7c2cbf81
+482, 0xbf7f23de
+483, 0x69d924c3
+484, 0xe53cd01
+485, 0x3879017c
+486, 0xa590e558
+487, 0x263bc076
+488, 0x245465b1
+489, 0x449212c6
+490, 0x249dcb29
+491, 0x703d42d7
+492, 0x140eb9ec
+493, 0xc86c5741
+494, 0x7992aa5b
+495, 0xb8b76a91
+496, 0x771dac3d
+497, 0x4ecd81e3
+498, 0xe5ac30b3
+499, 0xf4d7a5a6
+500, 0xac24b97
+501, 0x63494d78
+502, 0x627ffa89
+503, 0xfa4f330
+504, 0x8098a1aa
+505, 0xcc0c61dc
+506, 0x34749fa0
+507, 0x7f217822
+508, 0x418d6f15
+509, 0xa4b6e51e
+510, 0x1036de68
+511, 0x1436986e
+512, 0x44df961d
+513, 0x368e4651
+514, 0x6a9e5d8c
+515, 0x27d1597e
+516, 0xa1926c62
+517, 0x8d1f2b55
+518, 0x5797eb42
+519, 0xa90f9e81
+520, 0x57547b10
+521, 0xdbbcca8e
+522, 0x9edd2d86
+523, 0xbb0a7527
+524, 0x7662380c
+525, 0xe7c98590
+526, 0x950fbf3f
+527, 0xdc2b76b3
+528, 0x8a945102
+529, 0x3f0a1a85
+530, 0xeb215834
+531, 0xc59f2802
+532, 0xe2a4610
+533, 0x8b5a8665
+534, 0x8b2d9933
+535, 0x40a4f0bc
+536, 0xaab5bc67
+537, 0x1442a69e
+538, 0xdf531193
+539, 0x698d3db4
+540, 0x2d40324e
+541, 0x1a25feb2
+542, 0xe8cc898f
+543, 0xf12e98f5
+544, 0xc03ad34c
+545, 0xf62fceff
+546, 0xdd827e1e
+547, 0x7d8ccb3b
+548, 0xab2d6bc1
+549, 0xc323a124
+550, 0x8184a19a
+551, 0xc3c4e934
+552, 0x5487424d
+553, 0xd6a81a44
+554, 0x90a8689d
+555, 0xe69c4c67
+556, 0xbdae02dd
+557, 0x72a18a79
+558, 0x2a88e907
+559, 0x31cf4b5d
+560, 0xb157772f
+561, 0x206ba601
+562, 0x18529232
+563, 0x7dac90d8
+564, 0x3a5f8a09
+565, 0x9f4b64a3
+566, 0xae373af9
+567, 0x1d79447c
+568, 0x2a23684b
+569, 0x41fb7ba4
+570, 0x55e4bb9e
+571, 0xd7619d3e
+572, 0xc04e4dd8
+573, 0x8418d516
+574, 0x2b2ca585
+575, 0xfa8eedf
+576, 0x5bafd977
+577, 0x31974fb0
+578, 0x9eb6697b
+579, 0xc8be22f5
+580, 0x173b126a
+581, 0x8809becf
+582, 0x3e41efe1
+583, 0x3d6cbbb8
+584, 0x278c81d8
+585, 0xa6f08434
+586, 0xa0e6601d
+587, 0x2fccd88d
+588, 0x3cbc8beb
+589, 0x5f65d864
+590, 0xa1ff8ddf
+591, 0x609dcb7c
+592, 0x4a4e1663
+593, 0xeae5531
+594, 0x962a7c85
+595, 0x1e110607
+596, 0x8c5db5d0
+597, 0xc7f2337e
+598, 0xc94fcc9c
+599, 0xe7f62629
+600, 0x6c9aa9f8
+601, 0x2e27fe0e
+602, 0x4d0dae12
+603, 0x9eecf588
+604, 0x977ba3f2
+605, 0xed0a51af
+606, 0x3f3ec633
+607, 0xc174b2ec
+608, 0x590be8a9
+609, 0x4f630d18
+610, 0xf579e989
+611, 0xe2a55584
+612, 0xee11edcd
+613, 0x150a4833
+614, 0xc0a0535c
+615, 0xb5e00993
+616, 0xb6435700
+617, 0xa98dbff
+618, 0x315716af
+619, 0x94395776
+620, 0x6cbd48d9
+621, 0xab17f8fc
+622, 0xa794ffb7
+623, 0x6b55e231
+624, 0x89ff5783
+625, 0x431dcb26
+626, 0x270f9bf8
+627, 0x2af1b8d0
+628, 0x881745ed
+629, 0x17e1be4e
+630, 0x132a0ec4
+631, 0x5712df17
+632, 0x2dfb3334
+633, 0xf5a35519
+634, 0xcafbdac6
+635, 0x73b6189d
+636, 0x10107cac
+637, 0x18c1045e
+638, 0xbc19bbad
+639, 0x8b4f05ac
+640, 0x5830d038
+641, 0x468cd98a
+642, 0x5b83a201
+643, 0xf0ccdd9c
+644, 0xcb20c4bd
+645, 0x1ff186c9
+646, 0xcdddb47f
+647, 0x5c65ce6
+648, 0xb748c580
+649, 0x23b6f262
+650, 0xe2ba8e5c
+651, 0x9a164a03
+652, 0x62d3322e
+653, 0x918d8b43
+654, 0x45c8b49d
+655, 0xce172c6e
+656, 0x23febc6
+657, 0x84fdc5b7
+658, 0xe7d1fd82
+659, 0xf0ddf3a6
+660, 0x87050436
+661, 0x13d46375
+662, 0x5b191c78
+663, 0x2cbd99c0
+664, 0x7686c7f
+665, 0xcff56c84
+666, 0x7f9b4486
+667, 0xefc997fe
+668, 0x984d4588
+669, 0xfa44f36a
+670, 0x7a5276c1
+671, 0xcfde6176
+672, 0xcacf7b1d
+673, 0xcffae9a7
+674, 0xe98848d5
+675, 0xd4346001
+676, 0xa2196cac
+677, 0x217f07dc
+678, 0x42d5bef
+679, 0x6f2e8838
+680, 0x4677a24
+681, 0x4ad9cd54
+682, 0x43df42af
+683, 0x2dde417
+684, 0xaef5acb1
+685, 0xf377f4b3
+686, 0x7d870d40
+687, 0xe53df1c2
+688, 0xaeb5be50
+689, 0x7c92eac0
+690, 0x4f00838c
+691, 0x91e05e84
+692, 0x23856c80
+693, 0xc4266fa6
+694, 0x912fddb
+695, 0x34d42d22
+696, 0x6c02ffa
+697, 0xe47d093
+698, 0x183c55b3
+699, 0xc161d142
+700, 0x3d43ff5f
+701, 0xc944a36
+702, 0x27bb9fc6
+703, 0x75c91080
+704, 0x2460d0dc
+705, 0xd2174558
+706, 0x68062dbf
+707, 0x778e5c6e
+708, 0xa4dc9a
+709, 0x7a191e69
+710, 0xc084b2ba
+711, 0xbb391d2
+712, 0x88849be
+713, 0x69c02714
+714, 0x69d4a389
+715, 0x8f51854d
+716, 0xaf10bb82
+717, 0x4d5d1c77
+718, 0x53b53109
+719, 0xa0a92aa0
+720, 0x83ecb757
+721, 0x5325752a
+722, 0x114e466e
+723, 0x4b3f2780
+724, 0xa7a6a39c
+725, 0x5e723357
+726, 0xa6b8be9b
+727, 0x157c32ff
+728, 0x8b898012
+729, 0xd7ff2b1e
+730, 0x69cd8444
+731, 0x6ad8030c
+732, 0xa08a49ec
+733, 0xfbc055d3
+734, 0xedf17e46
+735, 0xc9526200
+736, 0x3849b88a
+737, 0x2746860b
+738, 0xae13d0c1
+739, 0x4f15154f
+740, 0xd65c3975
+741, 0x6a377278
+742, 0x54d501f7
+743, 0x81a054ea
+744, 0x143592ba
+745, 0x97714ad6
+746, 0x4f9926d9
+747, 0x4f7ac56d
+748, 0xe87ca939
+749, 0x58b76f6f
+750, 0x60901ad8
+751, 0x3e401bb6
+752, 0xa058468e
+753, 0xc0bb14f6
+754, 0x2cb8f02a
+755, 0x7c2cf756
+756, 0x34c31de5
+757, 0x9b243e83
+758, 0xa5c85ab4
+759, 0x2741e3b3
+760, 0x1249000e
+761, 0x3fc4e72b
+762, 0xa3e038a2
+763, 0x952dd92c
+764, 0x2b821966
+765, 0xfa81b365
+766, 0x530919b9
+767, 0x4486d66f
+768, 0xccf4f3c1
+769, 0xa8bddd1d
+770, 0xcc295eb9
+771, 0xfccbe42f
+772, 0x38bacd8d
+773, 0x2261854f
+774, 0x56068c62
+775, 0x9bdaeb8
+776, 0x555fa5b6
+777, 0x20fe615e
+778, 0x49fb23d3
+779, 0xd093bad6
+780, 0x54919e86
+781, 0x7373eb24
+782, 0xfbaa7a98
+783, 0x5f62fb39
+784, 0xe03bc9ec
+785, 0xa5074d41
+786, 0xa1cefb1
+787, 0x13912d74
+788, 0xf6421b8
+789, 0xfcb48812
+790, 0x8f1db50b
+791, 0xc1654b87
+792, 0x948b43c2
+793, 0xf503ef77
+794, 0x117d891d
+795, 0x5493ffa
+796, 0x171313b1
+797, 0xa4b62e1e
+798, 0x77454ea6
+799, 0xbea0aff0
+800, 0x13c36389
+801, 0xe3b60bac
+802, 0xa176bed3
+803, 0x2863d428
+804, 0xe2314f46
+805, 0xa85cd3d4
+806, 0x7866e57
+807, 0x8f03f5bc
+808, 0x239ae
+809, 0x46f279fb
+810, 0xcca00559
+811, 0xaa07a104
+812, 0x89123d08
+813, 0x2e6856ba
+814, 0x43a9780d
+815, 0x676cff25
+816, 0x6744b87d
+817, 0xee260d4f
+818, 0xb98d8b77
+819, 0x9b0ca455
+820, 0x659f6fe
+821, 0x28d20d1c
+822, 0x601f2657
+823, 0xdec3073e
+824, 0x61263863
+825, 0x1a13435a
+826, 0x27497d1e
+827, 0x17a8458e
+828, 0xdddc407d
+829, 0x4bb2e8ac
+830, 0x16b2aedb
+831, 0x77ccd696
+832, 0x9d108fcd
+833, 0x25ad233e
+834, 0xaa9bc370
+835, 0xa873ab50
+836, 0xaf19c9d9
+837, 0x696e1e6b
+838, 0x1fdc4bf4
+839, 0x4c2ebc81
+840, 0xde4929ed
+841, 0xf4d0c10c
+842, 0xb6595b76
+843, 0x75cbb1b3
+844, 0xbcb6de49
+845, 0xe23157fd
+846, 0x5e596078
+847, 0xa69b0d29
+848, 0x2118a41
+849, 0x7088c16
+850, 0xc75e1e1
+851, 0x6a4af2d6
+852, 0xf19c6521
+853, 0xaff7b3b1
+854, 0x615295c7
+855, 0xbda3a8d7
+856, 0x5b5ca72e
+857, 0xdad9d80f
+858, 0xfa81c084
+859, 0xf4703fa
+860, 0x3ca54540
+861, 0xa8961d51
+862, 0x53d1ecc2
+863, 0x808d83b6
+864, 0x68e8c48e
+865, 0x89be2039
+866, 0x9088ea11
+867, 0xb8665d12
+868, 0x91272f9
+869, 0x53dddff2
+870, 0xb7a54ab
+871, 0xd2b645ca
+872, 0x99fb8590
+873, 0x5315c8e
+874, 0x2a913806
+875, 0x7f15eb2b
+876, 0xa7f1cc5d
+877, 0xbb2ee836
+878, 0xd9fafd60
+879, 0x17448d6f
+880, 0x999ec436
+881, 0x482ec606
+882, 0x9b403c0e
+883, 0x569eb51b
+884, 0xb275d1a6
+885, 0xadd29c31
+886, 0xb7ebdb15
+887, 0xdfef3662
+888, 0x51aba6db
+889, 0x6d41946d
+890, 0x77bf8896
+891, 0xcafa6fab
+892, 0x976ab40f
+893, 0x49a6d86b
+894, 0x56639e55
+895, 0x9945b996
+896, 0x81459b50
+897, 0xbce97542
+898, 0xe397c9c9
+899, 0x247a5955
+900, 0xb72b1573
+901, 0x86306f86
+902, 0x34f65dc5
+903, 0x909360c0
+904, 0xf3f696ef
+905, 0xcb9faae5
+906, 0x93daecd9
+907, 0xde1af7af
+908, 0x43a1f2d
+909, 0x6d75cde5
+910, 0x9e412b6
+911, 0x5673fed
+912, 0x16bb511a
+913, 0x35ef4cca
+914, 0x4e615aca
+915, 0x5cdaf47a
+916, 0x26676047
+917, 0x8c199325
+918, 0x2adf0cb9
+919, 0x84f2e6fd
+920, 0x5e627f64
+921, 0xb7cee354
+922, 0x542ab4a6
+923, 0xe59cd83b
+924, 0x89cc3f10
+925, 0x92b0f5f
+926, 0xc1328370
+927, 0x8208d9f7
+928, 0x68eb00cf
+929, 0xfadd4ac4
+930, 0x2517784f
+931, 0x4042b99
+932, 0x75ce0230
+933, 0x97c5a1b4
+934, 0x1a97f709
+935, 0x4c62781e
+936, 0xf530a83
+937, 0x75776413
+938, 0x321c7240
+939, 0x6afe4e36
+940, 0xad00a2b4
+941, 0xbc05477d
+942, 0xb0911e80
+943, 0x9935b87d
+944, 0xd535eec5
+945, 0x149af45e
+946, 0x786934b0
+947, 0xbc13cdac
+948, 0x208bfa2e
+949, 0xcf4b39cc
+950, 0x6ac6c172
+951, 0xbfa9a37
+952, 0x42d28db6
+953, 0x2bf1ea63
+954, 0xbed6e677
+955, 0x50325d27
+956, 0xa79d3b8b
+957, 0x52448bb1
+958, 0xefaad1bd
+959, 0x833a2e54
+960, 0xd9de549a
+961, 0x9f59672f
+962, 0x9d5f5f16
+963, 0x1c914489
+964, 0xc08fa058
+965, 0xb188698b
+966, 0xdc4672b5
+967, 0x594f720e
+968, 0x56ed428f
+969, 0x9b0898af
+970, 0x8a64d3d5
+971, 0x773308d6
+972, 0x84d62098
+973, 0x46da7cf9
+974, 0x1114eae7
+975, 0xf9f2a092
+976, 0x5363a28
+977, 0xf2db7b3a
+978, 0x102c71a9
+979, 0xe8e76aaf
+980, 0x77a97b3b
+981, 0x77b090d
+982, 0x1099620e
+983, 0xa6daaae6
+984, 0x86ff4713
+985, 0xc0ef85b8
+986, 0xf621d409
+987, 0xfd1561e2
+988, 0x4bcc687d
+989, 0x596f760
+990, 0x7c8819f9
+991, 0x8cb865b8
+992, 0xadea115a
+993, 0x56609348
+994, 0xb321ac14
+995, 0x1bac7db2
+996, 0x5fe6ee2
+997, 0xe9bfe072
+998, 0x15549e74
+999, 0xad8c191b
diff --git a/lib/python3.12/site-packages/numpy/random/tests/data/pcg64-testset-1.csv b/lib/python3.12/site-packages/numpy/random/tests/data/pcg64-testset-1.csv
new file mode 100644
index 0000000000000000000000000000000000000000..0c8271fab6dff757e0b94443be8bc0e8b5f1e047
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/random/tests/data/pcg64-testset-1.csv
@@ -0,0 +1,1001 @@
+seed, 0xdeadbeaf
+0, 0x60d24054e17a0698
+1, 0xd5e79d89856e4f12
+2, 0xd254972fe64bd782
+3, 0xf1e3072a53c72571
+4, 0xd7c1d7393d4115c9
+5, 0x77b75928b763e1e2
+6, 0xee6dee05190f7909
+7, 0x15f7b1c51d7fa319
+8, 0x27e44105f26ac2d7
+9, 0xcc0d88b29e5b415
+10, 0xe07b1a90c685e361
+11, 0xd2e430240de95e38
+12, 0x3260bca9a24ca9da
+13, 0x9b3cf2e92385adb7
+14, 0x30b5514548271976
+15, 0xa3a1fa16c124faf9
+16, 0xf53e17e918e45bb6
+17, 0x26f19faaeb833bfc
+18, 0x95e1d605730cce1b
+19, 0xa7b520c5c093c1aa
+20, 0x4b68c010c9b106a3
+21, 0x25e19fe91df703f0
+22, 0x898364bb0bf593cb
+23, 0x5bd6ab7dbaa125db
+24, 0xd1fe47f25152045c
+25, 0x3bb11919addf2409
+26, 0x26a8cb7b3f54af8
+27, 0xe6a27ee11200aa24
+28, 0x7cb585ab01e22000
+29, 0x78e60028676d2ef3
+30, 0x5c32535e5a899528
+31, 0x83e8b6f8c4a46fb3
+32, 0xe56ef7668a161246
+33, 0x36dcbc15aeb73055
+34, 0x5ea247f0bd188acb
+35, 0x438b547b84601a80
+36, 0x8acda2a1273e9e3d
+37, 0x2b05e30a4b40c24c
+38, 0xfd87236bd13af032
+39, 0x471df211d8d985ef
+40, 0x18e8a5609a793292
+41, 0x46f0951fab6dc4e3
+42, 0x6c199c4e700f6795
+43, 0xf04aa16bfb7d22cb
+44, 0xd763d269fbaffc89
+45, 0x9991930cefbe5c2b
+46, 0xb2a11b953f824c96
+47, 0x63fd9f52172c44b0
+48, 0x183bdad907b1d848
+49, 0xe17953cddb931c52
+50, 0x515cf16726ec205a
+51, 0x88c327605150711a
+52, 0xc7090dd79cbc8dc3
+53, 0xcb487cedeb00a350
+54, 0xc8abf254d87b657
+55, 0xd43cc4cbfb493d1a
+56, 0x8705452e5d9ed1e
+57, 0xcecd11446769cf43
+58, 0xde72156c8d65bc69
+59, 0x796a8f0f47d52ee8
+60, 0xb4c0da443917d6c3
+61, 0xe07ad7568a8e3dc3
+62, 0xc24a8da39ce6dc21
+63, 0x92b21ea80a8556eb
+64, 0x572f21e531edf3af
+65, 0x9b917ed56bbed198
+66, 0xe65fd8ddc5ab3d7d
+67, 0xf55a80a8ec84fa18
+68, 0x18fc22e1a5227b61
+69, 0x72305dc7eeaa79d3
+70, 0x47ce58a36e7592cf
+71, 0x14c6374340c0f7cc
+72, 0x6f98273d4eb5a2c
+73, 0x59a8702c46fe8f8a
+74, 0xb67cbd8113cfe57f
+75, 0xaa03c5db5f5b7690
+76, 0x3fb0f77ea4568013
+77, 0x756530990398b26e
+78, 0x4c1952b2a3a6a343
+79, 0x1da15c5383074582
+80, 0xb405b21c81c274f7
+81, 0xbe664677a16788b
+82, 0x9d2e37550bcee656
+83, 0x8b4589f0d9defe02
+84, 0x2935f018ee06a59
+85, 0x3834bf88be97ed11
+86, 0xa610d049cea79b6d
+87, 0xd49ffc0d09a59ea9
+88, 0x4073365b76567adf
+89, 0x499eefb9bb7513e2
+90, 0x74a743ee6b0138a9
+91, 0x3bf0880f2d947594
+92, 0x555d1c0498600a99
+93, 0x923b32a88ef2ffa4
+94, 0x7325411065fbedea
+95, 0x9f4129ff8b79d300
+96, 0xab2b0a9b8a3785dc
+97, 0x11734bdfba3a1713
+98, 0xc8333398841ba585
+99, 0xee2409cc234e6742
+100, 0xf6638e700872ecd2
+101, 0x10875300c13cd284
+102, 0x27a9bbed7c15b2d3
+103, 0x3c87f8fef31ce9bd
+104, 0x92be263cd0914a95
+105, 0xa7b0f11bc742307e
+106, 0x4a56f788cc1c1a3c
+107, 0x4a130fa32257a48b
+108, 0x5d4d9eda16e90286
+109, 0x7cc2af564844bedc
+110, 0x2532867bfe7cda1a
+111, 0xb1c504676611fd17
+112, 0xce8e86cfb4189aee
+113, 0x99685898980d1970
+114, 0x8c3b67db23bcf1e
+115, 0x73e14c93905b135f
+116, 0xf0271b64ac2bd4d3
+117, 0xf4beba82f3ec1b2d
+118, 0x1cdbf3ee9f210af
+119, 0x2e938557c09c3ea6
+120, 0x2d314ccfa6ffd81d
+121, 0x31ad47079950ade4
+122, 0x342b27547b900872
+123, 0x171b0e20b9ef1a76
+124, 0xdf10ce6318b03654
+125, 0x1d625df4aa718897
+126, 0x8712715a9f6e02ec
+127, 0xb4a072da725bca3b
+128, 0x19d346cb7734bd42
+129, 0xfd4281d311cb2958
+130, 0x58274c9519fc8789
+131, 0x4cacf29d885fd544
+132, 0x784b14d1c2523b80
+133, 0x2d25242131bb2373
+134, 0xcd2a5e43a7d9abf9
+135, 0x15eda3806e650ecb
+136, 0xdaac5e277d764d96
+137, 0xdc5a5dd59aaa94e0
+138, 0x40d00237a46d5999
+139, 0x6205dd35a692743f
+140, 0xbbd8236740361f09
+141, 0x1625c9f4e7288bf9
+142, 0xb74f12df1479e3ce
+143, 0xb2d72a51b43d7131
+144, 0xf006a324b3707c83
+145, 0x28e8ab4abe7655b8
+146, 0xfb480093ad7ab55
+147, 0x3f8abd0d6ff8d272
+148, 0xc81a94177ac26bb7
+149, 0x3cdc178307751b14
+150, 0x9de84cc2b10ba025
+151, 0x3f8ab5aefcd046e2
+152, 0x43bdb894e1ee83b2
+153, 0xe288a40f3f06ac9d
+154, 0xdab62a7d04b4f30f
+155, 0x49f4e20295e1a805
+156, 0x3643764805e0edef
+157, 0x9449954618b6b
+158, 0x6c87e0d4508e0ce0
+159, 0x3a334be688a9dd7b
+160, 0xb35c39228776e499
+161, 0xc4118bfff938490e
+162, 0x88cbde3dcbb034b2
+163, 0xf91b287793c417c3
+164, 0x42b15f731a59f5b3
+165, 0xffa27104bbe4814d
+166, 0x1b6789d138beccde
+167, 0x542c2c1440d0ceb9
+168, 0x367294504d18fa0d
+169, 0xf918b60e804a1b58
+170, 0xd390964e33a9d0e3
+171, 0x23bb1be7c4030fe8
+172, 0x9731054d039a8afb
+173, 0x1a6205026b9d139b
+174, 0x2fa13b318254a07e
+175, 0x69571de7d8520626
+176, 0x641a13d7c03332b7
+177, 0x76a6237818f7a441
+178, 0x4e77860d0c660d81
+179, 0x4441448a1c1cbdb2
+180, 0xccd7783a042046e5
+181, 0xf620d8e0805e3200
+182, 0x7de02971367fdd0c
+183, 0x539c263c5914cab1
+184, 0x9c3b9ba1a87bbf08
+185, 0x6d95baa34cda215f
+186, 0x2db3f83ace0bac5f
+187, 0x7f5af1da2dc670a4
+188, 0xfcc098d16c891bfb
+189, 0x81a33df1d7a5ab12
+190, 0x767b0f863c8e9882
+191, 0x7a92983830de483d
+192, 0xfa7598c37a79ac25
+193, 0xb89b3ca42ce03053
+194, 0x457a542b8efed4f7
+195, 0x571b7737fd0eeda7
+196, 0xa0f59e524485c0a
+197, 0x82dca766b7901efd
+198, 0xa68243caf6a3bd5d
+199, 0x1bac981c6c740e5e
+200, 0xbcd51bedf9103e44
+201, 0x4e197efd3ae5a7bf
+202, 0x523568efd782268b
+203, 0x5ec4ef1191fef09
+204, 0xed751ed5e31c9ab
+205, 0x44eac24de03e1b29
+206, 0x9237d57c011d3fb3
+207, 0xa8c6da0f7692f235
+208, 0x9f9eb6bc15d6cac7
+209, 0x34bb8e0c93427aad
+210, 0x115febd738eaac4a
+211, 0xa439991ed139d27a
+212, 0x45c7c2633d8710a2
+213, 0x48b7475f3405a3ce
+214, 0x80158497c77bd00b
+215, 0x935c316a5b1657cb
+216, 0x59c5d54440e9695e
+217, 0x337c78c5b3d0ede2
+218, 0x8c46bb956b93790d
+219, 0xbf1dd03e471d71c5
+220, 0x2d375e90a4bef583
+221, 0xd0365428331b3790
+222, 0xfcd3969ac827ecd4
+223, 0x392fb6c580498410
+224, 0x6d6db4ceab5ea6c0
+225, 0x9bf84f1972e24786
+226, 0x798dfd820959dcc5
+227, 0x2e425095e65e8bfb
+228, 0x8c1aa11536b1c9c3
+229, 0xd28e2ef9b12f6f74
+230, 0x86583bc98c8f78d2
+231, 0x489877530e3f93e7
+232, 0xb1d9430631104a15
+233, 0x1814f6098e6263bd
+234, 0x8e2658a4e0d4cd53
+235, 0x5afe20e2531cdb2a
+236, 0x30d02f7c4755c9bf
+237, 0xe1e217cda16ed2d2
+238, 0xccb4913a42e3b791
+239, 0xfff21363ac183226
+240, 0xe788690bbda147a7
+241, 0x76905cf5917bfc6a
+242, 0x2a8fa58f7916f52c
+243, 0xf903c0cc0357815a
+244, 0x15d20f243a4998d2
+245, 0x5b7decee5a86ea44
+246, 0x114f7fc421211185
+247, 0x328eb21715764c50
+248, 0xaffaa3f45c0678fd
+249, 0x2579e6ef50378393
+250, 0x7610ab7743c19795
+251, 0xf9923d2bd101b197
+252, 0x57e42e7a62ba7e53
+253, 0x9f1dc217b4f02901
+254, 0x88a9ebd86509b234
+255, 0x867fc926aecc8591
+256, 0xaf22c1bfef04c718
+257, 0x39f701f0313f4288
+258, 0x6171ad397e6faab2
+259, 0x239bb5b9abdec4fc
+260, 0xd9a591e25dd01c6e
+261, 0x826dc4a75b628e49
+262, 0xf112b152c408f47
+263, 0x6843a06110f86c0
+264, 0x965e56a7185c1332
+265, 0x8d84492edbc71710
+266, 0xeee8ec111cfd1319
+267, 0xf2858e94ad98e458
+268, 0xbc9589fdf5f3a97e
+269, 0xaf0ceef3bc375130
+270, 0x48f4aaf13fa75c1e
+271, 0x111e9db47bee758f
+272, 0xea3171df130164ba
+273, 0x2a7bbe30bf827ab6
+274, 0xc516c3fdbf758c35
+275, 0xec55097754b04be5
+276, 0x374a997d52b6d3e6
+277, 0x487df5456085ffbc
+278, 0x528883b84df8eafe
+279, 0x805f77ab5ba26f86
+280, 0x8eb81477dc04f213
+281, 0x471ea08ec6794d72
+282, 0x69d3667ecc4d2176
+283, 0x98b7b6e295548a66
+284, 0x3877713c173f8f2
+285, 0xa00542570d0e8de3
+286, 0xf534b1bfa4033e50
+287, 0x7e1fedeac8bf6b26
+288, 0x8043f37c89628af4
+289, 0x1dd7039ec295e86d
+290, 0xce9c05b763a40cc4
+291, 0x246926481e61028f
+292, 0xb7cb0f1babf5893b
+293, 0xefe6b777f37fc63e
+294, 0xebbcabb4cb35cdcb
+295, 0x39fa63cd711eeea9
+296, 0xad5d3ba7aaf30c8d
+297, 0x8e9e78fe46021990
+298, 0xc7eaef6e7d5a3c62
+299, 0xefccdd5495d3f386
+300, 0x2179557ee8cfc76a
+301, 0x88a77f621f0885ce
+302, 0xafda62674543d90c
+303, 0xb8e6fbe2e13e56c0
+304, 0x8bfbbe26a14f9b1a
+305, 0x1404f59f5851f8c3
+306, 0x1140c53a0489566d
+307, 0x3edf2d138b5c3f1d
+308, 0x75d6bb275d817dc
+309, 0x8e660ae27107664e
+310, 0x7a8021038ee303e1
+311, 0x2042ef5eefa9079f
+312, 0xe3e7b90bbf6d457a
+313, 0xf3f819d2bb9405b
+314, 0x522e42155cae0c10
+315, 0xf5bfbb975b40e233
+316, 0x2cf82b614dd95cfa
+317, 0x183ef4a96bc40e55
+318, 0x9f6e351c5ba4e752
+319, 0x37c1110683c90846
+320, 0x1d89b7a996d8a977
+321, 0x18a444f77c7cb4d9
+322, 0xd0a8a971b78dc893
+323, 0x860232fb9e6543f1
+324, 0x60b6097f51002555
+325, 0xca1e5214123e3894
+326, 0xe03fe695c95f99bb
+327, 0x2c7c6779d5f03622
+328, 0xafeeee42f63055d1
+329, 0x670dde905515936a
+330, 0x9a922f42b59fb094
+331, 0xddb5ff49af5a651a
+332, 0xe61b04c9e58ebbf8
+333, 0x4e459dcf272e7fc4
+334, 0xd549e92c16adceeb
+335, 0x7a17dba1299d4a9c
+336, 0x825d756109f2b585
+337, 0xba142e61a9cb203e
+338, 0xc2a19f00e9c04a30
+339, 0x2d0f8140d23d0652
+340, 0x8b866d4d4d6caaf4
+341, 0x4f11d90dd91f8217
+342, 0xf6efc37373b9e0d
+343, 0x248493d6cd6a4736
+344, 0xd12b6ae74a951a3e
+345, 0x56e34722070b70a7
+346, 0x22d3f201cc9fa0eb
+347, 0xbfdcc320008291b7
+348, 0x1a7a6922e9204fbd
+349, 0x831421e0c4945ae4
+350, 0x66316feddddf0e11
+351, 0xa8c86a1517456554
+352, 0x14a9049ad989e335
+353, 0x837022259f141ecd
+354, 0xcb71793a06c261f7
+355, 0x4aeefc07ebe09a79
+356, 0x8982f15aa3b6594b
+357, 0x67bccfa7ed9b0d5b
+358, 0xb377463b523e9dec
+359, 0x53d3d594870fecb7
+360, 0xa5274b1caec5a60a
+361, 0xd6316d0cb643db39
+362, 0xabc1a9b536de88ce
+363, 0xed2fdb1383d2a077
+364, 0x12319c6feb97221b
+365, 0x7e0f6cd40ef47403
+366, 0x86135c84fe26dbf8
+367, 0xc96622d3fbbee19b
+368, 0xe3989d8d8511573f
+369, 0x42cc365554d1fdc7
+370, 0x4c1a1eb8bbce8b4f
+371, 0xfc4e30e7ef2034c1
+372, 0xc490444317a91e76
+373, 0x7ccdf469ff5dc81c
+374, 0xf5a0da4110cc09d7
+375, 0x505227baf34c0fb5
+376, 0xbe58737e8a35cc88
+377, 0xd449bee91b3e8c41
+378, 0x3e590e23299d0e6
+379, 0x291a7d9e0a64caf7
+380, 0xdc6fafbdfebd2293
+381, 0x8223f1e259fe8a65
+382, 0x6186fbc9efd9e3df
+383, 0xfda39b07e4007ffb
+384, 0xfc19aea98574dc02
+385, 0xd0e10d354fcacd8c
+386, 0xc9619916544a55a5
+387, 0xd454d50a8c8558cd
+388, 0xcd94a246712d91e
+389, 0x76a771f5d1231cce
+390, 0xdd20cb2b7b370ee5
+391, 0xa6f4f50feca57c49
+392, 0x78c8fb431f17ab9c
+393, 0x1b692b79a59b43cc
+394, 0x4c45045d287da7e6
+395, 0x522132e18bf43928
+396, 0x25c458983138b41c
+397, 0x2a1fb426ef229796
+398, 0x74dc324c74e5dd3d
+399, 0x6df75e3eb6eb5374
+400, 0xb63f2f4f9ca25b61
+401, 0xac72286112ee54d6
+402, 0x5a966f3d0a6863c4
+403, 0x8d7046bc64a46fc2
+404, 0xa7b740fd6e3087eb
+405, 0xcdbcbe0340cfcdf5
+406, 0xcb632613bf312b65
+407, 0xa91b3f2c2aac238b
+408, 0xa06deb3f5ae555a3
+409, 0x29d72e1f8db69
+410, 0x2d004bae09728ea6
+411, 0xc6eee5dce0736cc1
+412, 0xa7493145500ff60f
+413, 0xc4d68c4aa18ab93c
+414, 0x8210c29e79d48d7f
+415, 0xd0999d7889ecbef6
+416, 0x6e3bd61e66e93566
+417, 0xe6cc13d47d7d7b1f
+418, 0x3d6f181f42e03979
+419, 0xbed4e14fd867604a
+420, 0xbe511c84067bd86d
+421, 0x49a876d89e697d38
+422, 0xc04c3dde8f889c98
+423, 0xaf293eeab0f53e3f
+424, 0x9f6291dd65732cd6
+425, 0xd7811ac01de78c01
+426, 0xe385cf0261d50ec2
+427, 0x5a64134b3542bbf
+428, 0xf9d1302bc6f13a68
+429, 0x5d2aabbea37d8c31
+430, 0xd9842e99a5192970
+431, 0x713eadc4cd30e837
+432, 0xb7b002fc72abb413
+433, 0x276cfeea526af1cf
+434, 0x8519fe79b633a0ce
+435, 0x2f0e87363705a3e2
+436, 0x9adbac0be3c371e7
+437, 0xf3f44ba899a6173c
+438, 0x782d6c29618fde2b
+439, 0x7f61062acec408f
+440, 0x6e79cd836359258f
+441, 0x5c8e9b138df5785a
+442, 0xa54359c9f39a9a84
+443, 0xeec3f033135084b0
+444, 0x883ee717787a535c
+445, 0x9a2422b513a73b00
+446, 0x2dd4beddcdd64a58
+447, 0x90c8a13202239c7b
+448, 0x85b352ab759646d9
+449, 0x139f5cb2e46c53aa
+450, 0xe1d3ba6c721c66d1
+451, 0xaa66e0edc4b60a98
+452, 0x3521275c75be29b6
+453, 0x490a5190b3edfa5d
+454, 0xd2abcdd2ccb2f14e
+455, 0x9d9be8bef4a5857d
+456, 0xde19676f13ef7755
+457, 0xdac2fee2e42615f3
+458, 0xf4239801cb02f2ab
+459, 0xaa8bf923ed91875c
+460, 0x61d18a1940e4c7c0
+461, 0x1eb6aa3d5f077a6d
+462, 0xee7374c063bf29d8
+463, 0x2f0a59e34d76268d
+464, 0xc92e80e17d1eb3e9
+465, 0xafd05b3ec3d2ca72
+466, 0x28a61ad8d6c497b8
+467, 0xa7094d6834ad7d47
+468, 0x57d80ea9eccbb4f
+469, 0xb047e0fee6cdaf16
+470, 0x44f41b5eb48c00bb
+471, 0xd6dc8e1eb9c8c9ba
+472, 0x47adfd2c638c7849
+473, 0x365d63db7d526c68
+474, 0xc21cda439016135d
+475, 0x14d10c3f0f98863c
+476, 0xa93e56f74e037602
+477, 0x3b4e9c8915bdc9
+478, 0xb46f5ae155e54aa2
+479, 0x8e470d21ce1943e1
+480, 0x60b96301b5ba2e8d
+481, 0x1b473a41d381f9ff
+482, 0xabcf5a8e3269e73f
+483, 0xd410f6e94fb21fa1
+484, 0x65d1a47eebf87e5e
+485, 0x48eaa201c61cb843
+486, 0x212c1abc2499bfc5
+487, 0x4255ad8377d2d8d
+488, 0x44caeef472010612
+489, 0xffae764524f572f2
+490, 0x78d374d20c9ee550
+491, 0x6e003206c0511cee
+492, 0x7998a159145bfb82
+493, 0x921239650bda1d4d
+494, 0xae05025509bcfdc5
+495, 0xc6430c980be407b4
+496, 0x78524f1744b153f1
+497, 0x84089e6f468181fe
+498, 0x8d0d21d7dfb6c254
+499, 0x90bad90502a33603
+500, 0x3072a403cbd16315
+501, 0xdfadddf3f1c040c2
+502, 0x22f0b0639d9ff975
+503, 0xb49e48a4cad0765b
+504, 0x95a0a04f8239709d
+505, 0x56e147a24a4c481f
+506, 0xacf16ef61dea4c7e
+507, 0x424040afd2700de6
+508, 0xc67e8096a3c717a9
+509, 0x39f164181dd0a399
+510, 0x2449cedc1d62198c
+511, 0x7a53df11a1f1a61c
+512, 0x5596f1d4a3badae3
+513, 0x38ed4c822072b3d0
+514, 0xf07ef346b3fd730a
+515, 0xfd349c35c3ed51fd
+516, 0x2f15c9c7890f8f32
+517, 0x3b470df52b173c29
+518, 0xd31bfc8981281af7
+519, 0xbbcc9bdf561215bb
+520, 0x5782fffea326574f
+521, 0xb0ebdcfcc5e03290
+522, 0x7fd89d93d2b3fbef
+523, 0x280ea1865d9ba2
+524, 0xe726959845b2c100
+525, 0xd0361f032cd7dbb1
+526, 0x3c65ec2028b81a22
+527, 0x5221e9b2188920bf
+528, 0xeb5ab27c4125ec20
+529, 0x80a32dd48b54f0a4
+530, 0x369b5ced1012bebb
+531, 0x582d35d76530bc6f
+532, 0x7b50dc9b48e1e37d
+533, 0x37fdfe8bbacf8dad
+534, 0x7a0cb7e6e93840ea
+535, 0xa1132c870be0b2ce
+536, 0x9d8ac2c68267cd1a
+537, 0x470969b647fa7df4
+538, 0xabcb7d8adf7e2d24
+539, 0xacdebec9bdf9eb1c
+540, 0xe30f4cbf7eb6a59
+541, 0x746673836c4df41d
+542, 0x75120a6b647bb326
+543, 0x2f4eab556c3f6878
+544, 0xd84651ab05405b7a
+545, 0x9e695808b9622284
+546, 0xc93b71e56aa6e1a5
+547, 0x2be7f3be4a7b7050
+548, 0x6497e910b6733241
+549, 0xcf7050dfd08076fc
+550, 0x4e3cc156eca183f7
+551, 0xf801a33d9326c265
+552, 0x6aa293c8a47d40e6
+553, 0x28c429755faa6230
+554, 0x82b818651f54e7bb
+555, 0xa84d726d7acdbead
+556, 0x5cfa535d5774965d
+557, 0x4a34b7b1cb48d53
+558, 0x86a7b5bce426de84
+559, 0xfcd2307cecdb7318
+560, 0x16dbaaa71181a038
+561, 0x88e7e8cd261c2547
+562, 0x3c09ba6d1d5ea913
+563, 0x5dd3d643734ee5b6
+564, 0x326d725fe8cbb33
+565, 0x7bcca9ca2da8e784
+566, 0x482dcf6b11d7f9a4
+567, 0x1291b605b4cd3e04
+568, 0x6988181b50e2f4a8
+569, 0x649e3c37131fc292
+570, 0x4eeb67b9e21eba54
+571, 0xc051d39073dec45f
+572, 0xc99c52e110270d67
+573, 0xcb813d5d77868add
+574, 0x423a5f13573e7ac0
+575, 0x231ac4cc4fe73616
+576, 0x4c22b888a6e600ea
+577, 0x8059a6dc7c9e25c6
+578, 0x49f498a5b8ad22de
+579, 0xf1e812cc6d1826c8
+580, 0xbbaf60abe8b11e00
+581, 0x1d31d7f4d8be9a6a
+582, 0xfeadce70a9a10c14
+583, 0xb47c635bc136996a
+584, 0xd88e694c8da030cb
+585, 0xc41bbe132aff1364
+586, 0x34249ab18a4b0800
+587, 0xf14b5c825aa736cc
+588, 0x2710be6b08df78e
+589, 0x2ab56bcc9bf9e740
+590, 0x9b7f6e591b5f648
+591, 0xfb665c3772f34135
+592, 0x628a0a5d2db5d8d5
+593, 0xb3e3f251e61b5259
+594, 0x82310ae33faf1b23
+595, 0x24af8723a65cbd0b
+596, 0x671c93282fc4ad97
+597, 0x6cabeaac77270cad
+598, 0xef4643fe38b02b7f
+599, 0x7b011549d1ac6653
+600, 0xe2af87b9fccfe89
+601, 0x36b71ad67197ac8a
+602, 0xdbba55d06f2fd93b
+603, 0xf571dbd764b7f7e5
+604, 0x38ea402501cdbd45
+605, 0xb8ab5b5b1bab2913
+606, 0xfab973c4d45f32bd
+607, 0x9364f1717c2636b9
+608, 0xfad00f4d983e00fe
+609, 0xc90c532a11aef75a
+610, 0x64a6eda96e44783c
+611, 0x35891f2eb84520be
+612, 0x28d216080caed43
+613, 0x129629cc5bd206f6
+614, 0x22c3d39822cbb4b3
+615, 0xf1efbf4cce1eaa2b
+616, 0x7070cba12524ed08
+617, 0xa7ed0be9deabf20d
+618, 0x8ddb4cd6b454f76b
+619, 0xb82814b1db37b63
+620, 0x418e83b36de01876
+621, 0x9a538c7f39c6413
+622, 0xee0cd7abf8a2ecb9
+623, 0xa9222b07e95590f3
+624, 0x6296a415d68341e6
+625, 0x981e0a5a8f811929
+626, 0x4bb372d3b0de283d
+627, 0xa9805b5971866e16
+628, 0xaf3b5f5183497657
+629, 0x2152b0fd23c3d9f
+630, 0xb730c325b7173180
+631, 0x1e3439d231608c19
+632, 0x1c5ba6031379823c
+633, 0x87f5d12d6d365cbc
+634, 0xd3bc7f29614bc594
+635, 0x63102214bb391268
+636, 0x482bbd5bba648a44
+637, 0x6a23604690759dc4
+638, 0x4091d41408d3a39e
+639, 0x7cd017f922101b15
+640, 0x7ce9004ac5f9231
+641, 0x978bc3d8ec7f7fdf
+642, 0x5bd0c4d780580c11
+643, 0x4313c068bb040153
+644, 0x3ab7dab7bc38bf80
+645, 0x3aaf9c187728deea
+646, 0x6633a4ce8efb88d9
+647, 0x7263b089878f00fc
+648, 0xd0d767e96fe00eb8
+649, 0x184a7c0c01908028
+650, 0x1ebdf41e6f76e186
+651, 0xeb740ee1d0402083
+652, 0xfccf4974edb1c339
+653, 0x16e2707aa28306d
+654, 0x1684f0bdb018c3a5
+655, 0x887b6b67b88aa862
+656, 0x923d7810a2bea33a
+657, 0x56b3560babef5d6b
+658, 0xb39a14614c54b8c6
+659, 0x33e4dc545a509fc8
+660, 0x26e21f84142da9b
+661, 0xdd07598125756855
+662, 0x572d49a071d7ae0a
+663, 0xba3c7e3baea28760
+664, 0x7ecdb2d714db4b61
+665, 0x1c62b4920e1b2fe2
+666, 0x71bfafb70092834a
+667, 0xd710a4228f60d56a
+668, 0xeb16277d4ce4e95b
+669, 0x968168c90b16d3a1
+670, 0xac3439dfe8ad0062
+671, 0x5a8226f9dd5876ad
+672, 0xb843affe917291b0
+673, 0xd76d1e67051f8259
+674, 0xb73a6638cce8ccde
+675, 0xa0e6afd3c7295f9
+676, 0xff8857b4bbb5f4c6
+677, 0x99becf78938f0426
+678, 0xfcd17edc1e70f004
+679, 0x6223b8b23f2f50
+680, 0xca875f3e84587b4c
+681, 0x7d1e81e589f87fb9
+682, 0x9eb621586aa826fc
+683, 0xf46fb9ef5b9c2086
+684, 0x2882c9b7092725f3
+685, 0x5493f099bbedcd02
+686, 0x90c1ec979ffa811d
+687, 0x963f765025bcc53
+688, 0x56194e3ec3d9d4e9
+689, 0x7ec4720954cac1f0
+690, 0xfab3145171af7f90
+691, 0x52a0b4e41a13b593
+692, 0x740e2d4d5909d126
+693, 0x98f5339c09c94a28
+694, 0x1700e462fe8dec76
+695, 0x3dbffc2aa4695ac3
+696, 0x5763edacabdfe2a1
+697, 0x7b5b623ce49ef21d
+698, 0x30addc66f49860df
+699, 0xcc7511a6c31bceda
+700, 0x1b25b61ca75db43b
+701, 0x416bc4c298e59046
+702, 0x4cd11fe2d74e4649
+703, 0xb54458a9229fc978
+704, 0x8c21a27882b6ca35
+705, 0x57887c8b5e01639b
+706, 0xf4e893da996680bb
+707, 0x8d601297702c9c0d
+708, 0x2a27904a30aa53af
+709, 0x497800f6917ea8d0
+710, 0xe96db3340ada9c00
+711, 0xcc23166f14c010ee
+712, 0x782690d78fa65ec9
+713, 0xf3e00d74a0878eda
+714, 0xa7cbb683decca0a3
+715, 0xdd2e038e683a94aa
+716, 0xe2096ff8da896ca5
+717, 0xf7c83400afdabe11
+718, 0x395b8c6f6a4086a4
+719, 0x4a164ec05bee71d4
+720, 0xe87aa5d1ca0462fe
+721, 0x8dbc5aed6dff9ceb
+722, 0x12120d1e9552707b
+723, 0x877dca6889b3e6cd
+724, 0xbd65605c01e900fb
+725, 0xbd6b82c4157c3115
+726, 0x8b60282732caf78a
+727, 0x279fcf5e5de9e57f
+728, 0x34b34ebfb6a37eae
+729, 0xd258cc1a14e03b7b
+730, 0x9a528ba3db4a13fb
+731, 0xffa0aea59d057746
+732, 0x27fa7f456cd37c4e
+733, 0xe1117a57a6fdce63
+734, 0xdc8fc903970a1551
+735, 0x492dd104f30faf29
+736, 0x110def0959e5652b
+737, 0x7f8d1997636fdd15
+738, 0xfb77b05e538a9b59
+739, 0x2e41fa35b4b01fc6
+740, 0xbc35ae69a3374085
+741, 0x192c2a681c2d9b4b
+742, 0x12566b8866c189d6
+743, 0x9d88ea785c5185c8
+744, 0x30a621ad5f983c4
+745, 0x8b875efe1206f587
+746, 0x224d25c3af6e3423
+747, 0x7503e976a1ac7bcc
+748, 0x3c98aa869e823859
+749, 0x3d8835304b646892
+750, 0xf6353330ff970bc2
+751, 0x8a673f5e2edb8acb
+752, 0xf2fdcc53493838b9
+753, 0x85ddcd526236af16
+754, 0x60afb99814c676c5
+755, 0x32a1c2749e281ca8
+756, 0x2367a92ae3bee9ca
+757, 0x219fe082703743cc
+758, 0x34d8b74dc85182a9
+759, 0xdd04164c72db23f
+760, 0xe293ac28fe2671a9
+761, 0x9ca7d169cbda6f45
+762, 0x705c47972b4240ed
+763, 0xc10eda9eeb536209
+764, 0xc36ddacd0c94e85d
+765, 0x8eb592c27e8cd0d2
+766, 0x3e815991c76e7cc4
+767, 0xac9cfce31acf7580
+768, 0xbf7a4cb31c7aee94
+769, 0x663077444aceecf6
+770, 0xe7f614ff386eb568
+771, 0x79d7a229c66912c0
+772, 0x161ed4311f63e1f3
+773, 0x308a5faeb9982ede
+774, 0x7b38ddb9b7efd10
+775, 0x1e103a2589b27ecf
+776, 0x67b02baf4259f27e
+777, 0x868921c115ea2eee
+778, 0x959791912200f71e
+779, 0x4dd55f36dec10557
+780, 0xe3464d90080cb99d
+781, 0xfb2d4f6accce652f
+782, 0x109900a9257d77ba
+783, 0x3c4bda8e2c83684c
+784, 0xc9ae040fb7f868c6
+785, 0x78098ffe994f4905
+786, 0x7a94c33eca77f0b4
+787, 0xbe6a2a95e9b5c0e8
+788, 0x797d39cf963f4837
+789, 0x8d2e249e4425d06d
+790, 0x6ae2c30cd5da06f4
+791, 0x904489de762b179f
+792, 0x84713e2dfb591e3b
+793, 0x6405a40da3f6f51b
+794, 0x976b560d663a2df1
+795, 0xed1c544784ba1e22
+796, 0xca658e995ed9344c
+797, 0x2b1c6b8e4db49025
+798, 0x52b1513da528bad
+799, 0x3c63406d256d9968
+800, 0x63a31ca3d423f85e
+801, 0xb05a81f55789a720
+802, 0xd04412992c476c8e
+803, 0x828ec2f77a150a3d
+804, 0xee50926671bb60c6
+805, 0x5aa70f93e2df61b4
+806, 0x94d60fa2e8655858
+807, 0x3f5e5b770703cc7d
+808, 0xc62dfb2688ca7784
+809, 0xaaf02e1e8ba89fe4
+810, 0x4ab74e0d8c047405
+811, 0x31ee04fbac6fcead
+812, 0x1203b78b8228f5af
+813, 0x412a70836f9aa71a
+814, 0xab51cf98c03f1819
+815, 0x783a3ce9ce137f65
+816, 0x8897085b0a072cf2
+817, 0x685dd9bde8798cb
+818, 0x9a1fac7b1705e2c1
+819, 0xf3e9ff98de48e9cb
+820, 0x5c2d3eb1a1fbe917
+821, 0x3bda718b6b54d82e
+822, 0x29f2dd18f22f0821
+823, 0xb992da1572ac3597
+824, 0xacb69e7aa14b34f7
+825, 0xcd36e3ad14f088d1
+826, 0x6aaacc96a1ec55e8
+827, 0xf8ac593f154fe68f
+828, 0x18fc9cbff012339f
+829, 0x2f3368ccbbb99899
+830, 0x7cec7d17f37031f7
+831, 0x96e86bfaadcb8fc2
+832, 0x74f9e7ee3d42a752
+833, 0xbd52f6c7d9b0733
+834, 0xa48e6d96bb6ce1c9
+835, 0xaefa058254b82133
+836, 0xb7a19edfd0929107
+837, 0x6160ce9125b26e26
+838, 0x6537dbbde1d2aed
+839, 0xc567f9a6bec52dde
+840, 0xca29fd3f22443342
+841, 0x7732aa6db6a1c476
+842, 0x8f5a4d7df6b11b3
+843, 0x76649262aa7e31e1
+844, 0x60a13eb125fbc829
+845, 0xc81e4d123dd21ac1
+846, 0x643cbb09bb72f86b
+847, 0xf971a98fb25555a6
+848, 0xffa2774c66692d56
+849, 0xcb33c16c50b13ea9
+850, 0xfabf388dffda0e9b
+851, 0x55d41ec12ca24b9f
+852, 0x91cf693a3467e807
+853, 0x6be2c00b2c31d6dd
+854, 0xc5cf513b5251ae28
+855, 0xffc4384212403dec
+856, 0x45d4e1865255a69d
+857, 0xfb1dcf956972086a
+858, 0xcae946a55c4c55b8
+859, 0x7351ac7720e385c1
+860, 0x19aa8ffd86240254
+861, 0x8f515ae78f4040da
+862, 0x1e1ed2058de50fce
+863, 0x22d006dcdb374243
+864, 0x6e0f0ede7c95b441
+865, 0x70e8aa81b53b4d25
+866, 0x998f309ea41e3814
+867, 0x89ed6598fb66f390
+868, 0xb5997dc3278060df
+869, 0xb2a021eac4f7e046
+870, 0x3705b60aa2fd0768
+871, 0xfc415079ab9200e
+872, 0xf2871ac4cf45ecc9
+873, 0x24bf758d2246175f
+874, 0xac503dd6f8141b3
+875, 0x4e879d12d9f03b3
+876, 0x82034af8cf93b644
+877, 0x59899dd7e478a6c7
+878, 0xae90addb6eb11507
+879, 0x1524ddf76730cdef
+880, 0x6fd4afd5456b1c9d
+881, 0xcddb9221ea001cbc
+882, 0x64ff400bbf2e8604
+883, 0x6dda10549b06ed9b
+884, 0xed2c85104c261527
+885, 0xc7e09217d29929a8
+886, 0x56284df611a428b1
+887, 0x1a7608289c0a61
+888, 0x7cb63db15166ff66
+889, 0xc6013c76fcdcdc72
+890, 0x8e5dd566c7a5a676
+891, 0x5a8e8565f40d133b
+892, 0xe465973455848c44
+893, 0xf92eecbfe0f3c2c0
+894, 0x7d64155d4dcc5cac
+895, 0xf17595706f988dad
+896, 0xd590a001a6a19c5c
+897, 0x82a164475758db3d
+898, 0x6b144993ea1bbe32
+899, 0x22a81a7a6e453779
+900, 0x8e8c298df1a68a73
+901, 0x78056afd6d936b4c
+902, 0xaaceef0325faaf62
+903, 0xe78bb7699f82266f
+904, 0x523a2d283c5a5166
+905, 0x7076d87088f6c6db
+906, 0x6087dd54cff5aeb2
+907, 0x7ef82e62cb851680
+908, 0x4e8bcc8ed84d03d8
+909, 0xd12fa0361df3cfd3
+910, 0xefb89c79f8127297
+911, 0xa9af4e2fbce0b1f8
+912, 0x462136685b70331e
+913, 0xe9e74c93da699b77
+914, 0x9ec69215fb11d0c3
+915, 0xc10f229939e3e111
+916, 0x3f67fa79e41d2374
+917, 0xd5e7c1a9a7185162
+918, 0xa1dcce9ec91492fe
+919, 0xd4e61f0727b5d21b
+920, 0xdf6cdce46551800a
+921, 0xa3f256ce906982d3
+922, 0x209742a6b9ffc27
+923, 0x4006c96958526a57
+924, 0x9606aebc75a1967e
+925, 0x91b9f42fb64189df
+926, 0xb27119defcb938bc
+927, 0x128cc7a84ba05597
+928, 0x6c3df613c62d0d30
+929, 0x3adf69d48b629ec7
+930, 0xda42ee493837b128
+931, 0xb8e770480e760bb5
+932, 0x9feb55d57c99c626
+933, 0x29812d80afdae3ed
+934, 0xae4222a64276a8c7
+935, 0xe3897212a5b4ed53
+936, 0x98bedfd13886e669
+937, 0xca858675d7fc0d0e
+938, 0x28a359f665354234
+939, 0xfac2ccabe4128b35
+940, 0x61373cc5d11ca180
+941, 0x7007605a4512a87a
+942, 0xe71f8eade7b30b3d
+943, 0x3a9e77f9b99bd04d
+944, 0x70d3e42488098866
+945, 0xd30fc159c7cd4d99
+946, 0xe4d3f6600d2e2d6f
+947, 0x1088324dfa955c25
+948, 0x516437acd4764623
+949, 0x38a31abe50d0aa03
+950, 0x72e1054e9dc02ba
+951, 0xe6971dd664d1a2e2
+952, 0xf6698cb095d3b702
+953, 0xad995a5a8c19bd92
+954, 0x34e53c6936f656e6
+955, 0x10de240bc07c757a
+956, 0x3e3b9a6861c2bd1c
+957, 0x9c0b0b97d3712ec9
+958, 0xabf1505a75043aed
+959, 0xbdf93d3de3274179
+960, 0x28fa5904d3f62c28
+961, 0xc3b97b39ef6c5133
+962, 0xf2b2219225b8679d
+963, 0x8be4ec0f930c0aaa
+964, 0x47de5a56aa590643
+965, 0xb6f871b304129856
+966, 0x80a61c06233ab0f9
+967, 0x3ce6c3af8101b055
+968, 0x85b911708274e7d1
+969, 0x4cab65d093a488b7
+970, 0xaabc4b10661fe28e
+971, 0x35b16dea64474a68
+972, 0x1d6eb5b093361223
+973, 0xc39107b92f0fe1fb
+974, 0x1d09e048073c4841
+975, 0xc6a02f43aca8cb2f
+976, 0xaf6613dbc7da909c
+977, 0x5ac2a40c230aa756
+978, 0x33afb5e7c01c39a5
+979, 0xc7b0b20ea8b7d0ef
+980, 0xdf7306c8ccb1bbea
+981, 0x9710efc0c188b2a0
+982, 0xd6303eadb72c873e
+983, 0xa38ca609b118f35a
+984, 0x8390613065c6e535
+985, 0xdf9a0106757e431f
+986, 0x8bcf77039788e143
+987, 0x6026806a986b378e
+988, 0x482ff3b1394cb1dc
+989, 0x2a27d0ccac9ede9c
+990, 0x53c77f26e271b3ab
+991, 0x1ba004cf276cf3f
+992, 0xc135b0517dc81f7c
+993, 0x5d137838db75e442
+994, 0x3fe505f93d1dbdd7
+995, 0x351654ae7d598294
+996, 0x173f8d182af9d84d
+997, 0xf97dfcd164fe11c5
+998, 0xcda423e5ad43b290
+999, 0xa5cb380b8de10d10
diff --git a/lib/python3.12/site-packages/numpy/random/tests/data/pcg64-testset-2.csv b/lib/python3.12/site-packages/numpy/random/tests/data/pcg64-testset-2.csv
new file mode 100644
index 0000000000000000000000000000000000000000..7c13e3172d0e7798200f58cde9362ad0bd4a22e1
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/random/tests/data/pcg64-testset-2.csv
@@ -0,0 +1,1001 @@
+seed, 0x0
+0, 0xa30febcfd9c2825f
+1, 0x4510bdf882d9d721
+2, 0xa7d3da94ecde8b8
+3, 0x43b27b61342f01d
+4, 0xd0327a782cde513b
+5, 0xe9aa5979a6401c4e
+6, 0x9b4c7b7180edb27f
+7, 0xbac0495ff8829a45
+8, 0x8b2b01e7a1dc7fbf
+9, 0xef60e8078f56bfed
+10, 0xd0dbc74d4700374c
+11, 0xb37868abbe90b0
+12, 0xdb7ed8bf64e6f5f0
+13, 0x89910738de7951f
+14, 0xbacab307c3cfd379
+15, 0x2cf7c449d8b927a6
+16, 0xdcf94b3a16db7f0e
+17, 0x8a9d33d905a8792e
+18, 0x4cb9eb2014951238
+19, 0x6c353acf7b26d6f1
+20, 0x73ff53d673aa30c
+21, 0x1fd10760015eca68
+22, 0xabae0aa9021eeba8
+23, 0xa5ae363a868ee2bb
+24, 0x9d89e0f041de6631
+25, 0x6238b133c3991a65
+26, 0xff49267d75fef51a
+27, 0xfb180656ce13c53f
+28, 0xaf7fadf36128712d
+29, 0xa6847fc6f339c63e
+30, 0xb03e0b80d71ea5bc
+31, 0x63905abcb43969af
+32, 0x2295af3ee00a3bba
+33, 0xb8b375b994330415
+34, 0x867d9ef1d8716a3b
+35, 0x4f6c02f5601b4e18
+36, 0x7c5fb4c16c470d18
+37, 0xe3b57986b804b343
+38, 0xef1d79d212aca692
+39, 0x5b98774c8806209c
+40, 0x924fc76bac38a5d1
+41, 0x5266084c412ddeed
+42, 0x98240bf9b831d6a3
+43, 0x5681599e81219442
+44, 0x6441248fc2ba92bc
+45, 0xe3e9051a540349ea
+46, 0x3a2700034390baa3
+47, 0x9f893155b6d402bc
+48, 0x158207910c6d8aef
+49, 0xd5282ab7608c2cbc
+50, 0xc97f4651669dee4f
+51, 0x3d4750d95103ed60
+52, 0xe0614542caac1f04
+53, 0xefe5092144cfc6c
+54, 0x560bc486abd7e9ae
+55, 0x2678b71392daa4b8
+56, 0x734970d3dc2ba416
+57, 0xcbdbe849e51e4aaf
+58, 0x3b0b5e28b491556c
+59, 0xd51449ac45abd88
+60, 0x6790b59991f1b7ab
+61, 0x32d1c039ff2415bc
+62, 0x173b9772f24f72e0
+63, 0x9490a9ca9f883b1b
+64, 0x4c775989e6214222
+65, 0xac07db37e6ee6114
+66, 0x331371b2e3f10aee
+67, 0xf12e5326c21c28e4
+68, 0x5d77dc280c70d614
+69, 0x1b01bd17a2f281ec
+70, 0xa10d3b5882938487
+71, 0xed5a0033c394ae8f
+72, 0x70bc8ea568ea44b4
+73, 0xf4600ae77965e730
+74, 0x7ff92c0b321ce233
+75, 0x6cdbc87d0cc1d670
+76, 0x9ec64f0cf2000eb1
+77, 0xfebea50259800f68
+78, 0xf2edf9019a8fd343
+79, 0x75c584ac042e5468
+80, 0xc1fa8481d5bf9a1d
+81, 0x7f57180168514ac2
+82, 0x878100716b94f81e
+83, 0xc929406e3af17fd2
+84, 0x6a26e2c013e4bf4d
+85, 0xbc071d8848280955
+86, 0xb60d75abbfd1bdac
+87, 0xee9b76afeca9fa69
+88, 0x1d6c399d2f452810
+89, 0xbaa0bc1621e25c83
+90, 0xed6ba792f8671ba5
+91, 0xf7ca02c2ab11d8d7
+92, 0x3c3cadadf0b21e3
+93, 0xdd1784571e864e9c
+94, 0xfb2f992015157509
+95, 0xf50bb9f0d3ced743
+96, 0x261565f75c3e185f
+97, 0xf8fe33b284513e60
+98, 0xe3d2d10b5e024664
+99, 0xd28717566242cf35
+100, 0x7ae07d133ac5b789
+101, 0x3b7ccaaa53ac338e
+102, 0xcd480bace4871650
+103, 0xec6c78f923c080e9
+104, 0x44211d0ff8919d59
+105, 0x89f79af76d2a45fe
+106, 0x71583fd8a837548b
+107, 0xee57269c261511f5
+108, 0xa5ee8f3b128c5d1
+109, 0xbb64c20ed0765a17
+110, 0x9d4790ab2eeaf7e4
+111, 0x742f3db806d9e98
+112, 0xb81ec97aed6a0d1b
+113, 0x41808b34f6a8a23
+114, 0xc20913af175dfd4d
+115, 0x834427db263b22bb
+116, 0xedd9c632e611828a
+117, 0x10eac8524496f571
+118, 0xd76091b97eb00ab7
+119, 0x111298ae9fe95666
+120, 0x5824b2e2a6719c43
+121, 0x6e280ec539e934ed
+122, 0xf74fd832df90083e
+123, 0x8fee6d0f241c2e97
+124, 0x4244f331c2f19c3c
+125, 0x3dde75a845cce97f
+126, 0xe35bb8e635a9915b
+127, 0x39d2943037f7932e
+128, 0x1fe2d134201d0970
+129, 0x49d00b63c749b804
+130, 0x960c2942cd4e4e04
+131, 0x8dd8e009dbc0435f
+132, 0xcf493495c3a055cd
+133, 0x8f7b5a1c0f9fe9cd
+134, 0x49d5f90374641a25
+135, 0x69b3932073d3524c
+136, 0xd170603e7de84ee2
+137, 0xa062ba3ed3539948
+138, 0xf5861cc5b5d56c82
+139, 0x5e914998a30c7e76
+140, 0x8d77f2ad1503c0f1
+141, 0x980b6a9e3b4181fb
+142, 0xd9299cd50694c084
+143, 0x253dc0f8f1cec4c5
+144, 0x68110fb9d1b3e695
+145, 0xe8f3120d0aabc461
+146, 0xb066e7df0dfb042
+147, 0xd29ce0f797e6b60b
+148, 0x6a569bb7ca33bd42
+149, 0xd46e08b2dc2385f8
+150, 0x28c61d11d055767
+151, 0x5d73aa3d1a2bb725
+152, 0x1421191e1c14829a
+153, 0xa711bfb6423df35e
+154, 0x461af97a86308006
+155, 0xb3e1018ff3519367
+156, 0xf19cf866a268ef2b
+157, 0x207715eac9199d1d
+158, 0xdd621c410975b78c
+159, 0xf390aea68683610
+160, 0x617a2d107a0047d9
+161, 0x6e05ac416e5bebf0
+162, 0x7d253e70506c1bed
+163, 0xf9f96f4a7dd53810
+164, 0xc693b29cb1573f73
+165, 0x4f1146b0020ea544
+166, 0x45140608fbd40579
+167, 0xdcf57219828ce6be
+168, 0xe19d58cca37b5b32
+169, 0x82bda95b2a161235
+170, 0x5823c3d8a2b6c9ba
+171, 0xfeb2e74092fdf89a
+172, 0x50e1ad1abc8f869d
+173, 0x2ec63d0c105eb8da
+174, 0xe14e1c4845a3264a
+175, 0xcff53670455eb6aa
+176, 0xaafaccd24619fa3e
+177, 0xf55a988486e2422a
+178, 0xecfba16a90ff4d04
+179, 0xbf8d36c2f644757a
+180, 0xdc56ed75a0dd6249
+181, 0x3f45023eff17c3bb
+182, 0x2428bbfe90023fab
+183, 0xab892c611adcb70c
+184, 0xb6f13d8c0c2b9d74
+185, 0x2ac3fb11d224f2a8
+186, 0x65433dcfae2d9351
+187, 0xe906859ae4b45f82
+188, 0x8fb7f5f093d76a3b
+189, 0x940dd290b5e88d1a
+190, 0x31b27d21bef116e7
+191, 0x86a964e2c83b5296
+192, 0x85ffd17bc079a9e8
+193, 0x16c47c724e7ab7f1
+194, 0xfb6098a9867e7d7f
+195, 0x9246fb69092c6cb2
+196, 0x1a4033572760f32
+197, 0xc5cc568a8b273b84
+198, 0xfa6f9f2fbdd44abc
+199, 0x9701b8e087718ba3
+200, 0x51d6a7dcf73f8f3a
+201, 0x30008172cc6a972d
+202, 0xac2ab49a5ca6ac81
+203, 0x31f28ef79461e54c
+204, 0x93e35a8da8cc6132
+205, 0x9a2c58beeba3d5b9
+206, 0xf6615c1de266ac39
+207, 0x127ff9f8166b766b
+208, 0x7ffe380e80a69556
+209, 0xbe7d2c228e1542f7
+210, 0x2d5ebb4e50ba1746
+211, 0x63585761ae1bf684
+212, 0x1019eb5cee022fea
+213, 0xb9d3540ab58da30d
+214, 0x1677f4cb45620eb9
+215, 0x6524baee51783822
+216, 0xdf9f2ddcfabb0adc
+217, 0x78e8acc43b287935
+218, 0xe9a1974e999222b5
+219, 0xc41324ec2291e780
+220, 0xea52abc9ecdcbc9f
+221, 0x209d7bcd46ec6b04
+222, 0x12d504c09803db2e
+223, 0x1200e6bf21475d81
+224, 0xde6d3c2b35fd2cfc
+225, 0xa2526900ac33bd3c
+226, 0x7f1f5290fc432bc5
+227, 0x29ddfb380a3d69c8
+228, 0xac79cb6942a2909d
+229, 0x516996685b67a92a
+230, 0xb5fc39041cb828bb
+231, 0x75d9d8ca0644a276
+232, 0x81e98b76be92a3e9
+233, 0xca27888fafe12179
+234, 0x17be2ae039925765
+235, 0x9429846c0e6d0342
+236, 0x327dfd50439815e9
+237, 0xcee20cd7bc254aeb
+238, 0x7d250389f453f29e
+239, 0xfd1b232a85c95569
+240, 0x2ed55fac80f3e9e9
+241, 0xf6886c20417a1be7
+242, 0xcd08e61f0b0fdfde
+243, 0x7b33e34da5c27bff
+244, 0xd043c4b7d5603dd5
+245, 0x9a544e4c70a3b686
+246, 0xa7b60398c381f771
+247, 0xe9e7a3487c4bd4f2
+248, 0x10b58fdfe1ff112c
+249, 0xd5c1c9748c0f4ceb
+250, 0x61be9d09159d54ff
+251, 0x5356f51e8239f510
+252, 0xfe7889d9b202ecef
+253, 0xc7fc19ca5d263d5d
+254, 0x7c4c07e61dfd9f69
+255, 0x6c315fe5015f300a
+256, 0xe0a5bc00039747b4
+257, 0x16397fdcf829ee80
+258, 0xb55aee80d16a5169
+259, 0xca0609944d007eea
+260, 0xcc982249f65a02ce
+261, 0x528161feb149c148
+262, 0xcbf08ba49b41c006
+263, 0x39af1ff0b6f14138
+264, 0x5cc036be69799aec
+265, 0x6adde125b1db21c5
+266, 0x8a99d83d6b613b67
+267, 0x1cd43fca9451f74c
+268, 0x682dbb26ecc96365
+269, 0x13b4be2ceb43e3
+270, 0xbe8fbc3b6f4f581e
+271, 0xda148a2f4bda5719
+272, 0x239106ca3319f393
+273, 0xb42b4dde641f0dd5
+274, 0xd233cfdf4cb0af74
+275, 0xfb5919d905589afc
+276, 0xd802a8860c10b66a
+277, 0x6c923e1d00e7b5bc
+278, 0xfacce1134f383b89
+279, 0xf9570abda7a6d553
+280, 0x80f0f9796a208f18
+281, 0xc0e1df5280951c57
+282, 0xe9f143f08257bbe0
+283, 0x79e4c6463123d588
+284, 0xdd2118583f2b1684
+285, 0xb399ff5f2329fa18
+286, 0x4b3e9ebae96f813c
+287, 0xc484dbf247787384
+288, 0x921865eb97603f2c
+289, 0x18063c68e257d300
+290, 0x643181f345e7fc26
+291, 0x12e0b0e8eadf9fa7
+292, 0x79e613fe73dfa354
+293, 0x6db4c59203b7217a
+294, 0x6c7a0e9ba6139eaf
+295, 0x9617c7ac4e3f6d97
+296, 0x1f68a7b4fb1b4b75
+297, 0xef0b7ab24944f466
+298, 0xaf1dee1f4be1bc89
+299, 0xd2e355c959f5fd8d
+300, 0xe594c3fb95d96efc
+301, 0x9554766ca3342906
+302, 0xa4bbdc77d12842c
+303, 0xb62400211ee489a8
+304, 0x91abadaaa3bbe67c
+305, 0xd371eeb91deb42bb
+306, 0x883bab35cbd2b6e5
+307, 0xd030c3d9411a9041
+308, 0xff3c110a858ff000
+309, 0x59bdf5ca47d0bde7
+310, 0x2bc80fa3cdba1853
+311, 0x6444ccb652662cb8
+312, 0xc0c7e256b9e90339
+313, 0x70714ea9c9d72302
+314, 0x96a0142f9d897d27
+315, 0x209a9097c5a91ef7
+316, 0xb9e33afc5171e009
+317, 0x47b37af433a58d40
+318, 0x30cc4ffbfa831d26
+319, 0xdcea4a85ff815466
+320, 0x907d5bd027f2e5cc
+321, 0x7c081f6852e04a4b
+322, 0xe61950749c1d502b
+323, 0x1604e937ee69834a
+324, 0xb2372d952dd25309
+325, 0x53f6a5b834c72577
+326, 0x2ce7a74395e0b694
+327, 0xacbf9ab4fe91f225
+328, 0x5ce1e63d3a2bb90f
+329, 0x54740da3a5ed139b
+330, 0xf194ddb39f29880b
+331, 0x3305374f5d8ec08b
+332, 0x831dd0164927ff4a
+333, 0x625baa78e4458cf
+334, 0x29d27dc0a4a71152
+335, 0xe227bae9a1401034
+336, 0xca0c209831846b2b
+337, 0x8e8cc54b08b5a411
+338, 0x38f2b4acaac27db6
+339, 0x8ec88baac814e86b
+340, 0x31c08e46b007bde
+341, 0xb686c02722794c09
+342, 0xb77cf8fc682e3907
+343, 0xa56334e7f606f4b2
+344, 0x9c80b127bddd5f4f
+345, 0x12df14834cd858bf
+346, 0x3f14762a9cf5fb9f
+347, 0x930a70941ef5779e
+348, 0x64e96c849c30c080
+349, 0xfdf53bfba1300484
+350, 0xec7a9363c21bc616
+351, 0x26e9fd6a115ecb47
+352, 0x9707a84b5bc77fbb
+353, 0xb23b2737b20d5903
+354, 0x22f4825ae80f6501
+355, 0x500644b12be6a01b
+356, 0xb746645b2af082db
+357, 0xe6af051f697892f8
+358, 0x577c724248a1cfc6
+359, 0x3d2b6a434c84eed3
+360, 0xd260f5efd7328314
+361, 0x95c16cc84bb3f55c
+362, 0x7a01b2e4e0e80ca7
+363, 0x41930c3ce70a0935
+364, 0x1299bccf39d4e110
+365, 0x494883ba1a8a87f
+366, 0x9478ecfe2d918e60
+367, 0x30ec9a5670cda8af
+368, 0xf9bc877e833e2b99
+369, 0x1b83a0acfbb4a8db
+370, 0x73bc1740c0d18880
+371, 0x65086ca9773cb3e1
+372, 0x3b78c3ccd63cff2e
+373, 0xbfae748795acfb31
+374, 0xa4c9d5d56a15ba20
+375, 0xb9cb41721e52b71e
+376, 0x1532f15d4dc47748
+377, 0x5a4d647a4b9ee632
+378, 0x8513c7c5a50898d9
+379, 0x6d3d98ccd5461b2e
+380, 0xa65e99be2fe98d6
+381, 0x31abc8855334a0e5
+382, 0xf1ed22a661dca5b8
+383, 0x299e2b63229e03be
+384, 0xda201a06687bce48
+385, 0xd27794b302142c55
+386, 0x642bd3e1c7898a9d
+387, 0x777f1ff00afa1a87
+388, 0xd2f1c84fb3877baa
+389, 0xae417583289191fd
+390, 0xd641f1d88e0e2d55
+391, 0xc1f1d98fb5d18ebf
+392, 0xb0f72aecdadce97b
+393, 0xe9b8abc764f6018a
+394, 0xd2a37cff8e890594
+395, 0x2dd70d631a528771
+396, 0xbf8ba0478c18e336
+397, 0x1630bf47f372ce0a
+398, 0x6d04ea20dc3f46b8
+399, 0x6591881bf34337f2
+400, 0x33c149c7eb5b4103
+401, 0xf01a8c9857c86748
+402, 0x184348cdfc16d215
+403, 0x141168b253d2ed7
+404, 0x52aaf012ef50a6f1
+405, 0xfda1722387e16f4c
+406, 0x43c30f57d6c038fa
+407, 0xd4a8611f5f96d214
+408, 0x2c512ce17e987f2c
+409, 0x961ce450f0fa2822
+410, 0xf55a506ec6cea9cd
+411, 0xb76d694d9c7f5ef6
+412, 0xfb029216dbd8e988
+413, 0x93162501896a0081
+414, 0xfbbbd2c5ab300f5c
+415, 0xd648b6da7387d491
+416, 0xc73b4697471d9d98
+417, 0xe37412bf1c93ee76
+418, 0xa1a96d96570e6637
+419, 0x5b3ab4f82428f65c
+420, 0x873d849b188aa36f
+421, 0x39fbee0ffc9fa9ff
+422, 0xc70d21b744d677fe
+423, 0x2b8a43c23043d209
+424, 0x93c33eaa37370d16
+425, 0x8930ac1880f2b0ef
+426, 0xac01d27707036af0
+427, 0xc2af3fee504343a0
+428, 0x1c1dae2ad5535d97
+429, 0x9ffc21804b76a480
+430, 0x69f903412cc13563
+431, 0x9d3c4e2759a0c47d
+432, 0xb1a8f894be6302b9
+433, 0x95e1fd7951479506
+434, 0xbb9e6c03cd4ae8e3
+435, 0x85206010c9b737cf
+436, 0x767e813694d6238c
+437, 0x4969af329ccbb30a
+438, 0x3aa9af1075aaea5c
+439, 0xb1ff519e8118a993
+440, 0xb21a23a3c91180fe
+441, 0x320b24582ca3fd88
+442, 0xf8ca56415fb4e453
+443, 0xabd0899c07205e77
+444, 0x87fdc7a44b4ad50f
+445, 0xd75744911641a278
+446, 0x7c8c9a65df6fcb95
+447, 0x79d785e3c7a5b695
+448, 0x421e4565ba1f592f
+449, 0x27f87eb2517835cf
+450, 0xb62cc4297441c83e
+451, 0xd817a80ac815ca6d
+452, 0xad84388130df2aa8
+453, 0x5e6b1640452d6ac8
+454, 0x936285e15edce2a3
+455, 0x903bccc4969768e8
+456, 0xefc2cb7b109d3140
+457, 0x633e9dfdda2d903a
+458, 0x2a2f3225925678a1
+459, 0xe07eac91a27f8547
+460, 0xe50ced40eda78cb3
+461, 0xc5b22500e1c7441
+462, 0x32becf61bca3aa72
+463, 0xa2e37c4b30671344
+464, 0xc9f1c1910f45d544
+465, 0x9b50333b2dcdf730
+466, 0x310bfd53a1684b94
+467, 0x1e1dc21e66ac6455
+468, 0x81876c2bfb1ed5a1
+469, 0xd0c54a3e25eadc7b
+470, 0x3791b6fbbd5c7ba0
+471, 0x133be57356c599fc
+472, 0x8d1148eb8e83fdea
+473, 0x311aedba0d8b42cc
+474, 0x1142ae52745f94bb
+475, 0xc5f4ab2fbde8c4a3
+476, 0xd23be827b5b24f6d
+477, 0x65f95194cd122715
+478, 0x4b48969d73125922
+479, 0x46f165052b8ff988
+480, 0x5c689f94b9275ff4
+481, 0x93b03823ff2d536b
+482, 0x871f3775aa4e3523
+483, 0x5af829f7cc0f66a5
+484, 0xa32e05739cbeac8c
+485, 0xacff1856ddace0fe
+486, 0x8eeb5e7f991a5322
+487, 0x6325c2720e0dbdea
+488, 0x9fb817bc4fdf5200
+489, 0x9786f0d850e43d78
+490, 0x571f76dd7f9fb77a
+491, 0x4d9e94e181cbc63f
+492, 0x8bb632d3376c547a
+493, 0x9cc26d9efd1c88b9
+494, 0x9c5d49579df52b0b
+495, 0x6201abf7e1cda07b
+496, 0x90d68f0c6c884963
+497, 0xfc5b66188ef7f561
+498, 0x6d9303cf2e0e0f95
+499, 0xd7cfcff535f5ed07
+500, 0x14d1a1228daa4ac6
+501, 0xe00ef5762f66ae50
+502, 0xf113a79471582978
+503, 0x430985281785dc7a
+504, 0x31914108c206ed5
+505, 0x7ba6707b6419971c
+506, 0x2ec63b033ce112e5
+507, 0xf8bcd36ced3b41e3
+508, 0xe5cf908c8010414b
+509, 0xf5ee224b7c703e30
+510, 0x9a9733af0b12338b
+511, 0x83e18cc00ace34f8
+512, 0xd52cff39e23008b8
+513, 0xa700578136b9c0c5
+514, 0x3fa179d32ac51f99
+515, 0xef2d5eab6d4ad380
+516, 0x709024a5abd032df
+517, 0xc607c7ee349ede87
+518, 0x803d784e9731eb5f
+519, 0x2ef06f4ba769282d
+520, 0x4bc1dca1e9f07eb9
+521, 0x930c958a7a72f94d
+522, 0x249bc8db2cc7a3bf
+523, 0x3845305798f9a5d
+524, 0x6f137eca9ab6f948
+525, 0xc31f5a963d31bd67
+526, 0x9d39693d5383626f
+527, 0x52fb41c335a8b98e
+528, 0xb79d1a29a06006ec
+529, 0x7c0926a7a3eda2cc
+530, 0xffdf5214406fd53e
+531, 0xc6aa02a7e94282b9
+532, 0xd4a4431b4aa301ee
+533, 0x4271cc0f9420d3ab
+534, 0x26fccd7cc7fc2485
+535, 0x330594bb945b8d5a
+536, 0x6ea8eaad12e5cb8c
+537, 0x831c3467726bede3
+538, 0x31d1eb10017eaa61
+539, 0xc7aa75e41508f5cb
+540, 0xde51810f0cadd0b5
+541, 0x50e5b3e73692f80b
+542, 0x82107ec55636e188
+543, 0x9828ef175d843ab4
+544, 0xb8edc6a860dd421e
+545, 0x25c0c138fd537ac3
+546, 0x47e72a771e8eb563
+547, 0xbb0f8c5333f4a2cc
+548, 0x91750d2fb9b2d479
+549, 0xe662d8f6fe38df36
+550, 0x72a6d879fb5619f0
+551, 0x6817c7878dcbf077
+552, 0x4e7741cb484661e8
+553, 0x3b3b3ba0be5711bf
+554, 0xa6989f5d25868765
+555, 0x43c276398997e4e0
+556, 0xdcbe16a94da28870
+557, 0x454936980a699c99
+558, 0xac614bfa8f0266c6
+559, 0x9174841392e213d5
+560, 0xa0e2acffc5fc9d1f
+561, 0xe53a08a7a0e6521a
+562, 0x2b845cf7c24172e0
+563, 0x265a4fc5f7adec0d
+564, 0x1f34fbe5f1e49420
+565, 0x139181f6fb647f20
+566, 0x88c35d46e2fcd05e
+567, 0x2a6d5b55903c0459
+568, 0xcea28eb621ad7bf1
+569, 0x5c9cdc13e7aaa30
+570, 0x5fe63e14746e7103
+571, 0x7923e53d73835db9
+572, 0x376e661210bf1b06
+573, 0x5b1cab85450efdd5
+574, 0x3908dc096c70b452
+575, 0x4825e303cd1f396f
+576, 0xed476bfd702957c3
+577, 0x6acc013aff5db743
+578, 0x62c80b776343d488
+579, 0x9c75edcd5b012697
+580, 0xaa053362a3b9770a
+581, 0xa907e236c7c07e94
+582, 0x15b2c380451692c0
+583, 0x94f79142697bd61f
+584, 0xbc657d31ea98d44f
+585, 0xcbaa5e52517a1f5e
+586, 0x96aa2e44a7c4a03f
+587, 0x216d3c66db2b515d
+588, 0x157001807e3ca88a
+589, 0x52b3a596bdd3859a
+590, 0xed747e7fc5e3adac
+591, 0x78fd765ddb2c448d
+592, 0xe53dc7299ed8614e
+593, 0x75ad41fb1d7a790a
+594, 0xc14f6b944b0e6cb1
+595, 0x7c314b69fce3df1c
+596, 0xb56d82eb740d7abc
+597, 0x5132a93c41251fdb
+598, 0xe3ce35bd2a82f958
+599, 0x440571a981c722f2
+600, 0x194cdfd9f186bc9
+601, 0xb89e522a5db00939
+602, 0xad35f339f68df3c8
+603, 0xa82ab18420322293
+604, 0xaffa6df9b72b27c4
+605, 0x9615694d23beaa2c
+606, 0x1d82ebe563abad91
+607, 0xab50ef65fbd94385
+608, 0x1b070dbd70a9a14
+609, 0x2ececa796abbadf0
+610, 0x6bbeafe9e81ab2a2
+611, 0x60dcd0d2a9b76914
+612, 0x1e748039ef05c33f
+613, 0x6d4d17f2213ccdff
+614, 0x9fa56132957bc987
+615, 0x60a17185de2428eb
+616, 0xb56038ddf306479c
+617, 0x3b1db5df92d06d8b
+618, 0x24d1bba8bdedf580
+619, 0xbfb7e6740ebaa4d9
+620, 0xab31c4473e46f61d
+621, 0x6deb3cdd8fd5869f
+622, 0x23032e47746d72d6
+623, 0xa9e72d734e10f2e8
+624, 0xbffd199b6157bc23
+625, 0x29f8254df273fb62
+626, 0xb076142130ee55ec
+627, 0x5b0b08374126c309
+628, 0xea4536aae979521f
+629, 0xc064e7abec91a174
+630, 0x46133ef80c59d935
+631, 0xf0227e2da1b14160
+632, 0x675a76641e1af5a
+633, 0x2f50a069b33d198c
+634, 0x3ded5a65e1d657eb
+635, 0xbb6999b020694f6b
+636, 0x86b2f2b33487aed7
+637, 0x76e14e85f8bfb4cf
+638, 0x38f7f1e44bd4e0db
+639, 0xc1a7d41b7e80d4ae
+640, 0x1dfaaf80bbceb42e
+641, 0x3f51c11497720c2b
+642, 0xce6da1415ddb8b80
+643, 0x7377d8bcd359b5f3
+644, 0xe077208f3f810aca
+645, 0x9a06a8a2dacbffce
+646, 0xca1f99156b09b735
+647, 0x2ff9a93064d91451
+648, 0x50f3ea93f351a7ef
+649, 0x606fceccb07054de
+650, 0x7e83d6d2f8f6685d
+651, 0x78f3995291c5d407
+652, 0xd28d2460e22d0228
+653, 0x2c5636f68a0054dd
+654, 0xd9fafb1c56c8f6cb
+655, 0xe39889b5f9d74464
+656, 0x1355372bf5db2cc1
+657, 0x26768426b9ac323
+658, 0x4af1dbdc1111fd89
+659, 0x66973587943b927f
+660, 0xf86f5f50684dfb1d
+661, 0x1247d574ff79b534
+662, 0xc8039f3259210fe2
+663, 0x79b573235c92a9f5
+664, 0x213f642d8450e2f0
+665, 0x5db7706973376566
+666, 0x6182c12e69b373d7
+667, 0x3e5ac47300aec07f
+668, 0x4b5b6c57b1574376
+669, 0x6b7fcceefd56b17c
+670, 0xf656c3455cb9d4b8
+671, 0x7577e2e13329721f
+672, 0xf33c0c53ce956e8d
+673, 0x7d0f328ee356174
+674, 0x10ec9a168088686e
+675, 0x71ef1776d062dfa
+676, 0xaa7b590a488a6bc4
+677, 0x38612b6dd8049a1c
+678, 0x939045e36874f731
+679, 0xcb9d1d74c56d5ac9
+680, 0x54f1c1c8fef1d8ff
+681, 0x3ee4b85c8c7e939e
+682, 0xb9b4608e019f352c
+683, 0x79d4701275d12e6a
+684, 0x2632a2d9835c7f19
+685, 0x1662cd9fba293692
+686, 0xbcb70265115ee944
+687, 0xdc43fb9761468604
+688, 0xe3eec4e7d3871352
+689, 0x829531753226989d
+690, 0x2748cc67f540e074
+691, 0x39c4af25d607837d
+692, 0x741a243f4cb5df99
+693, 0xda1353287e18b49a
+694, 0xa6735689d751ea74
+695, 0x46326d587340ce0b
+696, 0xc18531df4550012b
+697, 0x6f7901e05dd4b818
+698, 0xfb966afc4c001d63
+699, 0x6dc10fca67a9cfdb
+700, 0xd6527ffadf0feaae
+701, 0x3b900172045e25d
+702, 0xb7dd594cdded6a46
+703, 0x6602aee7ec1599fc
+704, 0x7fbf12f23747546a
+705, 0x32e63f662bd2de0d
+706, 0xedf47770b67ed641
+707, 0x331bef83481c5c2a
+708, 0x8fc4256fdf05158c
+709, 0x98eba48dabccf5e0
+710, 0xdbc2f2cdb7b1c154
+711, 0x7777755616517ad3
+712, 0xd473c147d2628ac1
+713, 0x861e15d1d760b5a7
+714, 0xf4d25926405ecb07
+715, 0xb7739c69effff86e
+716, 0xe97fbafa6f96830c
+717, 0xf13e8a334e8bede1
+718, 0xcd60010cba4ee4f9
+719, 0x1f537ac2b82e6008
+720, 0x1fda8d781a89140a
+721, 0x9dc204f3f4a463f0
+722, 0x456dcd18eb56a1ab
+723, 0x629957bc87bd16a1
+724, 0x2c8000ddb8c75253
+725, 0xc31dae9ec8449284
+726, 0xdac05c8baa2b691a
+727, 0x21ff7be9ffa3e7ac
+728, 0x844f4b5ed4ee08d0
+729, 0x651f913fd636c994
+730, 0xca3e71a2110b2d49
+731, 0x7709bc42253ed09d
+732, 0xbb164d45b6569d43
+733, 0x90ec2f040c20a112
+734, 0xfa6e77e9166f5be4
+735, 0x6b6d12c1842d587d
+736, 0xfcd7ff8466e25e2a
+737, 0x6a5a2ed8bd971297
+738, 0x2ec35f6bba5adcbc
+739, 0xc83676e16651249a
+740, 0x458f6064cefe10ba
+741, 0x90d54d527e6cd028
+742, 0xa5613e88db27c388
+743, 0x331e0c7d85aa1abc
+744, 0x8cee4977e210358
+745, 0xfcae379aa6cbff8e
+746, 0xd1407afc97a57e86
+747, 0x1fab25c864f094ae
+748, 0xd914864a63004552
+749, 0x4214d226a20f1384
+750, 0x3f4e0d80c488b715
+751, 0xc5ca2f654024b7c8
+752, 0xc1e27a124e7c821c
+753, 0xd890a915ffc7918c
+754, 0x22fba040ce51a9f8
+755, 0xbf61cebd8891617a
+756, 0x7846609ee228e319
+757, 0x536d1854375509b8
+758, 0xbbfb45fc6e666f50
+759, 0xd85b4c0527f9d7d6
+760, 0x528cc9c7fa2a84c8
+761, 0x27a1baece647f2cb
+762, 0xfddf0cb92fe09dc3
+763, 0xeb5008fe965d8d96
+764, 0x4a3307937eb2e5c8
+765, 0xd07d74c240c6c363
+766, 0x16f62290179d1bbf
+767, 0xe99c9bcc9cb1ece7
+768, 0xc64f9be03c8a93be
+769, 0x32659effaf666c1f
+770, 0x4bb228cfb30b6672
+771, 0x98764870842068a5
+772, 0x5b12ef2d2cd8bdcc
+773, 0xbc79d1c1b41f28b8
+774, 0x97a517cf3279fc9a
+775, 0x34ffd46c1d4d6025
+776, 0x9c302307ee25c8f0
+777, 0x399604eed1f18a8
+778, 0x1c9b813c2043142a
+779, 0x2944ea5e55267fe9
+780, 0x5a8a9f5e728ea667
+781, 0x30c8440adb804a0
+782, 0xee0e6b627099a937
+783, 0x3d50757ada3c52da
+784, 0x4548916b32c813ab
+785, 0x602a186fe5bf109b
+786, 0xf0d440a2227ba304
+787, 0x5a10d4e0ca9ea32b
+788, 0x6e5eb90da13ba64c
+789, 0x4c6af8fd04241ab2
+790, 0xf9eb31d26e093006
+791, 0x5d674878839fe3ea
+792, 0x1562b55b2484e47c
+793, 0xa87188c099c1cb61
+794, 0xb7736b8aa02a3392
+795, 0x5f4b301125abb20f
+796, 0x361d566984637f44
+797, 0x68c4b3feac8bd0c3
+798, 0x7066c634dd2503c1
+799, 0xfecbf7c9441eb6ea
+800, 0xdbc26ae0fc81436b
+801, 0x9ef3e2b48252e7a4
+802, 0x31a49b4c339b37c7
+803, 0xb01b2a83cf346cf4
+804, 0xc24dc2347f82fbe3
+805, 0x134cad272dcd410f
+806, 0x61260742823ba59c
+807, 0x53ac4c193a97c730
+808, 0x9207c9833af34b52
+809, 0xa72e7ee77078d1f5
+810, 0x2e6f6e1b05936885
+811, 0x783b99ce5dbf9464
+812, 0xfdfeb6f0d027bb44
+813, 0x40eeb27096f92b0
+814, 0x5ef96ff5d4a4521f
+815, 0x5595806ae873718a
+816, 0x67d449eecf4ca1c3
+817, 0xde837ab611364f3f
+818, 0x7034c24d2b139be9
+819, 0xe21166603e0a9c86
+820, 0x935694435c1f0d51
+821, 0x6cb3bec90c126088
+822, 0x4096ef662b7a9f89
+823, 0xd2d85b8d238d8c15
+824, 0xa4ea533ce3ec59b2
+825, 0x3654729d80a2db29
+826, 0x214c4cc3906d29d4
+827, 0x201c447e7588e373
+828, 0xe8b8f0ae25f683eb
+829, 0x6744aaf5754e38af
+830, 0xd1ffb10d6f27a061
+831, 0xe536733a7b3a6c30
+832, 0x39f0f66e47cbf2c9
+833, 0x856a9593526fde2
+834, 0x2e2a817a0098ea4b
+835, 0xc5e1eeb551a0e3d3
+836, 0x3f21e2f5e2d50b2
+837, 0x906af56c66dd9f8c
+838, 0x30f6dbd70329fac8
+839, 0xc443dfddf3c01a60
+840, 0x7ab85d9aa9675470
+841, 0x8c9080bd39717bfc
+842, 0x4b1ccdb3c3597f6f
+843, 0x74e2542d70ab5d67
+844, 0xbb3d236aad00f74
+845, 0xcf3cadf9a2804774
+846, 0xe851d9750e42bd07
+847, 0xc0ad82029b1c371f
+848, 0x7ee119eb552d6c07
+849, 0xd8024049bd1d784a
+850, 0xfa67a899760363
+851, 0xaa7c2f438b178197
+852, 0xc473674a47ffe064
+853, 0x539fbe3fc674c270
+854, 0xdb48484748a76f3b
+855, 0xc73b2b092060d
+856, 0xa1d2a15345016f5d
+857, 0x4d0fe8599f9bba47
+858, 0xa0edc275e6f8f1d1
+859, 0x40590a8655bc8d72
+860, 0x35b4223161f05f75
+861, 0xa04c0c0f616752dc
+862, 0x7f371ed2ca45432d
+863, 0x2ff1a08f75ac6438
+864, 0xe2dc5c3682282f48
+865, 0xe1e4179fa98d9013
+866, 0x8cb083d6843a73d5
+867, 0xb4c2b5921b706854
+868, 0x738e14c0e7352445
+869, 0xcd2b646f91afd8c7
+870, 0xd5779a5b57a264fd
+871, 0xc39ff855586c7d07
+872, 0x3e3f0098c631a859
+873, 0x644e02fae032110
+874, 0xa8834613c0a45278
+875, 0x69482f2c08e10657
+876, 0xe4ee475bdb87e69a
+877, 0xdc1ef7b25c0d0019
+878, 0x88a3fa2be18d8744
+879, 0x60a02e0b21c5bec7
+880, 0xb6867b88aa19bc1a
+881, 0xb599409affcf10eb
+882, 0xaeaa1778a5e59daa
+883, 0xd7a91a52c16663e3
+884, 0x93cb269affe07b1c
+885, 0x841b6ced3a4ba815
+886, 0x84541768e1540a5c
+887, 0xe3943c84f83b3020
+888, 0x5de366fbd7b45258
+889, 0xd787cc3bde91a661
+890, 0x814071446edecb57
+891, 0x15d8c602a1141514
+892, 0x72f07bc8002d1d0d
+893, 0x4a8bd8dc9a1f0f3e
+894, 0x8723796ae0f20d35
+895, 0xda7283c2051f73b2
+896, 0x2df0cc247f90bd3b
+897, 0x79a8522b968f990a
+898, 0x951ede190c8b9d02
+899, 0xc512f1a5b14b018a
+900, 0xf0e3ddc03b9a4259
+901, 0x8cf4a35ad312e15f
+902, 0xebef28926b11094b
+903, 0x5628ba687325921c
+904, 0xc3aa75e57edc49c3
+905, 0xc38382fa98e762ba
+906, 0x8d209e896285848e
+907, 0x2c7d6adf592b4a3e
+908, 0x62de48e36f8338f3
+909, 0x4a752741e00de30e
+910, 0xf7855b70f1f6ec2b
+911, 0xa505fa4428199e43
+912, 0xe8b6b423b826bbac
+913, 0x4bd1206cf8786d05
+914, 0x6dcf040391fe3bf4
+915, 0x913f500f87e1bba3
+916, 0x5acf775aa180a5d5
+917, 0x74dd28d9432ce739
+918, 0x996c2ff2f0dc2495
+919, 0x73dbfe6c56effe4
+920, 0x56fddd25196f5e40
+921, 0xe87810158f5b7
+922, 0x7b8795e996383f1f
+923, 0x9ba5ee7c777c4c82
+924, 0x17ce3908d270fe1c
+925, 0x3df9e613c1aedfae
+926, 0xcdd26871b32fc8e1
+927, 0xd71cb13afc633979
+928, 0x63427c8ea9b1c79e
+929, 0xd070f7664d3b405d
+930, 0x46f2a9e32d9fb769
+931, 0xb4c3822a45e9fe9b
+932, 0x8ba30b97fe6f5ec7
+933, 0x70aa554ee2fc11f9
+934, 0xa80c99dbe0cfcfaf
+935, 0x36d9250cb2d68ed
+936, 0x2995e4b9e1cd1db4
+937, 0x4b3803ba57fc570f
+938, 0xae3959e7d740eaa5
+939, 0xb4cbd6662adbae08
+940, 0xae46576446e8dbc4
+941, 0xc4828e008a9a8a54
+942, 0x145d7db8e6554b2f
+943, 0x1b1b8916a730c371
+944, 0xdaf84b2bebe31963
+945, 0x5b59b80ef23a2403
+946, 0x9180c7e89cab6fd3
+947, 0x80e58f5411babf34
+948, 0xa06cf55185b9b005
+949, 0x13b2c798424173ad
+950, 0xc510f8e706311d49
+951, 0x1f974b83b6046d3a
+952, 0xae6e8e85e822d1c3
+953, 0x66f2c8dc3274a31a
+954, 0x7e04dbcbf65bd377
+955, 0xabf41ede01ec20a4
+956, 0x5efa0948f6bbb2ea
+957, 0xbc91c99d8592255
+958, 0xf6d6917911d86d75
+959, 0x85ce273d54e9097a
+960, 0xbdfd30f2420fff92
+961, 0x8802f02f610b537c
+962, 0xd1d70037ed543229
+963, 0x908aaf97f9693a46
+964, 0x1f6cfeaa0834d53a
+965, 0xa453fd1648ce04d2
+966, 0x2c38bb85ebc64af9
+967, 0xd2daff551c90c4f8
+968, 0xae5a0d949797d784
+969, 0xf0974c8552ac9593
+970, 0xa10b70499f65c693
+971, 0x39a449ebd594ddff
+972, 0x8ea090f2b17b9b49
+973, 0xc592de318090fd83
+974, 0xb63e4fbc467b6912
+975, 0x57a0c1c5ce0e4dcc
+976, 0xa7c517cf3d436b35
+977, 0xef6dcb0f3fad038b
+978, 0xaf4fb60315b91287
+979, 0x5e0776f67304f331
+980, 0xe927753b8e6f7932
+981, 0xd3df2dd92559e304
+982, 0xdaed52aa6af44413
+983, 0x1b59f4dac1e181f8
+984, 0x4a73c2293877ef39
+985, 0xca45d0d015fe44de
+986, 0x4659c8b7853735a8
+987, 0x12de6466bdf8adeb
+988, 0xaeea857a09bfec15
+989, 0xcc9cf4b3c0b88a23
+990, 0xa44ae52396a5e1bf
+991, 0x5847a724305d137f
+992, 0x8f4d4de223956182
+993, 0x58254dfada867a8
+994, 0x900a98222c2f339e
+995, 0xdb575260935d51d5
+996, 0x13fb4bfbbc0d7b53
+997, 0x62213850186bb92b
+998, 0x2a34823312c00388
+999, 0x6148329042f743b0
diff --git a/lib/python3.12/site-packages/numpy/random/tests/data/pcg64dxsm-testset-1.csv b/lib/python3.12/site-packages/numpy/random/tests/data/pcg64dxsm-testset-1.csv
new file mode 100644
index 0000000000000000000000000000000000000000..39cef057f4490a70d7041bcfde4d3fec844732bb
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/random/tests/data/pcg64dxsm-testset-1.csv
@@ -0,0 +1,1001 @@
+seed, 0xdeadbeaf
+0, 0xdf1ddcf1e22521fe
+1, 0xc71b2f9c706cf151
+2, 0x6922a8cc24ad96b2
+3, 0x82738c549beccc30
+4, 0x5e8415cdb1f17580
+5, 0x64c54ad0c09cb43
+6, 0x361a17a607dce278
+7, 0x4346f6afb7acad68
+8, 0x6e9f14d4f6398d6b
+9, 0xf818d4343f8ed822
+10, 0x6327647daf508ed6
+11, 0xe1d1dbe5496a262a
+12, 0xfc081e619076b2e0
+13, 0x37126563a956ab1
+14, 0x8bb46e155db16b9
+15, 0x56449f006c9f3fb4
+16, 0x34a9273550941803
+17, 0x5b4df62660f99462
+18, 0xb8665cad532e3018
+19, 0x72fc3e5f7f84216a
+20, 0x71d3c47f6fd59939
+21, 0xfd4218afa1de463b
+22, 0xc84054c78e0a9a71
+23, 0xae59034726be61a8
+24, 0xa6a5f21de983654d
+25, 0x3b633acf572009da
+26, 0x6a0884f347ab54c8
+27, 0x7a907ebe9adcab50
+28, 0xbe779be53d7b8d4a
+29, 0xf5976e8c69b9dcd1
+30, 0x1d8302f114699e11
+31, 0x7d37e43042c038a0
+32, 0x2cc1d4edc2a40f35
+33, 0x83e3347bb2d581f1
+34, 0x253f8698651a844d
+35, 0x4312dea0dd4e32f6
+36, 0x10f106439964ea3a
+37, 0x810eb374844868cc
+38, 0x366342a54b1978cc
+39, 0x9fb39b13aaddfb5e
+40, 0xdb91fd0d9482bed7
+41, 0x89f6ea4ca9c68204
+42, 0x146b31ccca461792
+43, 0x203fd9724deb2486
+44, 0x58a84f23748e25cb
+45, 0x2f20eb6aeb94e88
+46, 0x14d3581460e473c
+47, 0xad5bd0d25f37d047
+48, 0x1cf88fa16de258b2
+49, 0x3bcab6485b7a341
+50, 0xb2433b37f227d90c
+51, 0x2cffd7e0a8360cc8
+52, 0x5d2eeff7c9ebc847
+53, 0x6fd7c7ae23f9f64b
+54, 0x381650b2d00f175d
+55, 0x9d93edcedc873cae
+56, 0x56e369a033d4cb49
+57, 0x7547997116a3bac
+58, 0x11debaa897fd4665
+59, 0xdf799d2b73bd6fb8
+60, 0x3747d299c66624d
+61, 0xac9346701afd0cfa
+62, 0xac90e150fa13c7bf
+63, 0x85c56ad2248c2871
+64, 0xdea66bf35c45f195
+65, 0x59cf910ea079fb74
+66, 0x2f841bb782274586
+67, 0x9814df4384d92bd9
+68, 0x15bc70824be09925
+69, 0x16d4d0524c0503a3
+70, 0xf04ea249135c0cc7
+71, 0xa707ab509b7e3032
+72, 0x465459efa869e372
+73, 0x64cbf70a783fab67
+74, 0x36b3541a14ca8ed7
+75, 0x9a4dfae8f4c596bf
+76, 0x11d9a04224281be3
+77, 0xe09bbe6d5e98ec32
+78, 0xa6c60d908973aa0d
+79, 0x7c524c57dd5915c8
+80, 0xa810c170b27f1fdc
+81, 0xce5d409819621583
+82, 0xfe2ee3d5332a3525
+83, 0x162fb7c8b32045eb
+84, 0x4a3327156b0b2d83
+85, 0x808d0282f971064
+86, 0x2e6f04cf5ed27e60
+87, 0xaf6800699cca67a9
+88, 0xc7590aae7244c3bf
+89, 0x7824345f4713f5f9
+90, 0x8f713505f8fd059b
+91, 0x3d5b5b9bb6b1e80e
+92, 0x8674f45e5dc40d79
+93, 0xcb1e36846aa14773
+94, 0xe0ae45b2b9b778c1
+95, 0xd7254ce931eefcfb
+96, 0xef34e15e4f55ac0a
+97, 0xf17cc0ba15a99bc4
+98, 0x77bb0f7ffe7b31f1
+99, 0x6ee86438d2e71d38
+100, 0x584890f86829a455
+101, 0x7baf0d8d30ba70fe
+102, 0xb1ac8f326b8403ae
+103, 0xcc1963435c874ba7
+104, 0x9c483b953d1334ce
+105, 0xc0924bcbf3e10941
+106, 0x21bcc581558717b1
+107, 0x2c5ad1623f8d292b
+108, 0xa8ea110f6124557e
+109, 0x15f24a6c5c4c591
+110, 0x40fe0d9cd7629126
+111, 0xcfe8f2b3b081484d
+112, 0x891383f4b4cac284
+113, 0x76f2fcdef7fa845
+114, 0x4edd12133aed0584
+115, 0xd53c06d12308873d
+116, 0xf7f22882c17f86bf
+117, 0xfbaa4aad72f35e10
+118, 0x627610da2e3c0cc3
+119, 0x582b16a143634d9a
+120, 0x9b4a7f69ed38f4a0
+121, 0x2df694974d1e1cbe
+122, 0xe5be6eaafed5d4b
+123, 0xc48e2a288ad6605e
+124, 0xbcb088149ce27c2b
+125, 0x3cb6a7fb06ceecbe
+126, 0x516735fff3b9e3ac
+127, 0x5cbafc551ee5008d
+128, 0xee27d1ab855c5fd5
+129, 0xc99fb341f6baf846
+130, 0x7ad8891b92058e6d
+131, 0xf50310d03c1ac6c7
+132, 0x947e281d998cbd3e
+133, 0x1d4d94a93824fe80
+134, 0x5568b77289e7ee73
+135, 0x7d82d1b2b41e3c8b
+136, 0x1af462c7abc787b
+137, 0xcfd8dfe80bfae1ef
+138, 0xd314caeb723a63ea
+139, 0x1c63ddcfc1145429
+140, 0x3801b7cc6cbf2437
+141, 0xc327d5b9fdafddd3
+142, 0xe140278430ca3c78
+143, 0x4d0345a685cb6ef8
+144, 0x47640dc86e261ff9
+145, 0xab817f158523ebf4
+146, 0x37c51e35fbe65a6b
+147, 0xab090f475d30a178
+148, 0x4d3ec225bf599fc1
+149, 0xefd517b0041679b1
+150, 0x20ad50bca4da32c5
+151, 0x75e1f7cd07fad86d
+152, 0x348cf781ee655f4b
+153, 0x9375f0e5ffc2d2ec
+154, 0x7689082fd5f7279c
+155, 0x633e56f763561e77
+156, 0x9d1752d70861f9fd
+157, 0xa3c994b4e70b0b0f
+158, 0xabf7276a58701b88
+159, 0xbfa18d1a0540d000
+160, 0xc6a28a2475646d26
+161, 0x7cdf108583f65085
+162, 0x82dcefb9f32104be
+163, 0xc6baadd0adc6b446
+164, 0x7a63cff01075b1b4
+165, 0x67ac62e575c89919
+166, 0x96fa4320a0942035
+167, 0xc4658859385b325f
+168, 0xde22c17ff47808f6
+169, 0xbb952c4d89e2f2ec
+170, 0x638251fbc55bdc37
+171, 0x38918b307a03b3ea
+172, 0xccb60f2cedbb570b
+173, 0x3c06f4086a28f012
+174, 0x4e8d238388986e33
+175, 0x1760b7793514a143
+176, 0xa3f924efe49ee7d6
+177, 0xaf6be2dbaebc0bdf
+178, 0x6782682090dffe09
+179, 0xb63a4d90d848e8ef
+180, 0x5f649c7eaf4c54c5
+181, 0xbe57582426a085ba
+182, 0xb5dd825aa52fb76d
+183, 0x74cb4e6ca4039617
+184, 0x382e578bf0a49588
+185, 0xc043e8ea6e1dcdae
+186, 0xf902addd5c04fa7c
+187, 0xf3337994612528db
+188, 0x4e8fd48d6d15b4e6
+189, 0x7190a509927c07ab
+190, 0x864c2dee5b7108ae
+191, 0xbb9972ddc196f467
+192, 0x1ea02ab3ca10a448
+193, 0xe50a8ffde35ddef9
+194, 0x7bd2f59a67183541
+195, 0x5a940b30d8fcd27a
+196, 0x82b4cea62623d4d3
+197, 0x6fbda76d4afef445
+198, 0x8b1f6880f418328e
+199, 0x8b69a025c72c54b7
+200, 0xb71e0f3986a3835f
+201, 0xa4a7ddb8b9816825
+202, 0x945dcda28228b1d8
+203, 0xb471abf2f8044d72
+204, 0xf07d4af64742b1ba
+205, 0xfca5190bc4dd6a2a
+206, 0xd681497262e11bc5
+207, 0xbe95d5f00c577028
+208, 0x56313439fd8bde19
+209, 0x3f3d9ac9b5ee6522
+210, 0x7b8d457dd2b49bbe
+211, 0xe76b5747885d214b
+212, 0xa8a695b3deb493ea
+213, 0x5292446548c95d71
+214, 0xbf5cdf0d436412df
+215, 0x7936abaed779d28d
+216, 0x659c6e8073b3a06d
+217, 0x86c9ff28f5543b71
+218, 0x6faa748445a99146
+219, 0xdcc1e6ab57904fd7
+220, 0x770bd61233addc5f
+221, 0x16963e041e46d94f
+222, 0x158e6cb2934157ac
+223, 0xb65088a8fd246441
+224, 0x2b12ced6ce8a68c3
+225, 0x59a18d02cd6082b3
+226, 0x4ddbc318cb5488ee
+227, 0x3d4cf520b3ed20a1
+228, 0x7028b3a92e2b292d
+229, 0xf141da264a250e4d
+230, 0x9788d53e86041c37
+231, 0x1bb91238a7c97dbf
+232, 0x81953d0ddb634309
+233, 0xfa39ccfe14d2d46
+234, 0xf7c7861c9b7e8399
+235, 0x18d27ca50d9dc249
+236, 0x258dfdf38510d0d9
+237, 0x9e72d8af910ea76f
+238, 0x4f8ef24b96de50ad
+239, 0xb9d9c12297e03dc9
+240, 0x91994e41b4a1929c
+241, 0x8defa79b2ccc83b9
+242, 0x948566748706dac5
+243, 0x7b0454946e70e4cf
+244, 0x340b7cb298c70ed7
+245, 0x6602005330cebd95
+246, 0xf71cb803aa61f722
+247, 0x4683fb07fc70ae8a
+248, 0xc6db9f0c4de3ed88
+249, 0x3e8dfae2a593cef9
+250, 0x615f7c38e3862b33
+251, 0x676c7996550d857
+252, 0xc6d520d54a5c266a
+253, 0x202b1e8eef14aa2e
+254, 0xa3a84891a27a582
+255, 0x84dbee451658d47f
+256, 0x254c7cd97e777e3a
+257, 0xf50b6e977f0eba50
+258, 0x2898b1d3062a4798
+259, 0x4096f7cbbb019773
+260, 0x9fb8e75548062c50
+261, 0x4647071e5ca318ec
+262, 0x2b4750bdb3b3b01
+263, 0x88ac41cc69a39786
+264, 0x705e25476ef46fa3
+265, 0xc0c1db19884a48a6
+266, 0x1364c0afdbb465e5
+267, 0x58e98534701272a6
+268, 0x746a5ea9701517c0
+269, 0x523a70bc6b300b67
+270, 0x9b1c098eda8564ad
+271, 0xfbaeb28d3637067f
+272, 0xddd9a13551fdba65
+273, 0x56461a670559e832
+274, 0xab4fd79be85570ad
+275, 0xd4b691ecaff8ca55
+276, 0x11a4495939e7f004
+277, 0x40d069d19477eb47
+278, 0xe790783d285cd81e
+279, 0xde8218b16d935bc7
+280, 0x2635e8c65cd4182d
+281, 0xeae402623e3454
+282, 0x9f99c833184e0279
+283, 0x3d0f79a0d52d84e7
+284, 0xc1f8edb10c625b90
+285, 0x9b4546363d1f0489
+286, 0x98d86d0b1212a282
+287, 0x386b53863161200d
+288, 0xbe1165c7fe48a135
+289, 0xb9658b04dbbfdc8c
+290, 0xcea14eddfe84d71a
+291, 0x55d03298be74abe7
+292, 0x5be3b50d961ffd7e
+293, 0xc76b1045dc4b78e1
+294, 0x7830e3ff3f6c3d4c
+295, 0xb617adb36ca3729
+296, 0x4a51bdb194f14aa9
+297, 0x246024e54e6b682a
+298, 0x33d42fc9c6d33083
+299, 0xadccba149f31e1d
+300, 0x5183e66b9002f8b
+301, 0x70eb2416404d51b7
+302, 0x26c25eb225535351
+303, 0xbc2d5b0d23076561
+304, 0x5823019ddead1da
+305, 0x85cfa109fca69f62
+306, 0x26017933e7e1efd9
+307, 0x3ec7be9a32212753
+308, 0x697e8a0697cd6f60
+309, 0x44735f6cca03920f
+310, 0x8cc655eb94ee212e
+311, 0x8b8b74eba84929a0
+312, 0x7708ccedd0c98c80
+313, 0x1b6f21f19777cbe1
+314, 0x363e564bd5fadedb
+315, 0x5921543a641591fe
+316, 0xc390786d68ea8a1b
+317, 0x9b293138dc033fca
+318, 0x45447ca8dc843345
+319, 0xee6ef6755bc49c5e
+320, 0x70a3a1f5163c3be5
+321, 0xf05e25448b6343b0
+322, 0x4739f4f8717b7e69
+323, 0xb006141975bf957
+324, 0x31874a91b707f452
+325, 0x3a07f2c90bae2869
+326, 0xb73dae5499a55c5e
+327, 0x489070893bb51575
+328, 0x7129acf423940575
+329, 0x38c41f4b90130972
+330, 0xc5260ca65f5a84a1
+331, 0x6e76194f39563932
+332, 0x62ca1f9ca3de3ca6
+333, 0xb4a97874e640853f
+334, 0x38ed0f71e311cc02
+335, 0xde183b81099e8f47
+336, 0x9bb8bf8e6694346
+337, 0xd15497b6bf81e0f2
+338, 0xaaae52536c00111
+339, 0x4e4e60d1435aaafd
+340, 0x5a15512e5d6ea721
+341, 0xff0f1ffabfc6664f
+342, 0xba3ffcedc5f97fec
+343, 0xef87f391c0c6bfb6
+344, 0x4a888c5d31eb0f98
+345, 0x559a3fbfd7946e95
+346, 0xe45b44a0db5a9bad
+347, 0x9457898964190af1
+348, 0xd9357dfaab76cd9e
+349, 0xa60e907178d965a1
+350, 0x76b2dc3032dc2f4a
+351, 0x13549b9c2802120
+352, 0x8656b965a66a1800
+353, 0x16802e6e22456a23
+354, 0x23b62edc60efaa9
+355, 0x6832a366e1e4ea3b
+356, 0x46b1b41093ff2b1e
+357, 0x55c857128143f219
+358, 0x7fc35ddf5e138200
+359, 0x790abe78be67467e
+360, 0xa4446fc08babd466
+361, 0xc23d70327999b855
+362, 0x2e019d1597148196
+363, 0xfefd98e560403ab8
+364, 0xbe5f0a33da330d58
+365, 0x3078a4e9d43ca395
+366, 0x511bfedd6f12f2b3
+367, 0x8bc138e335be987c
+368, 0x24640f803465716d
+369, 0xf6530b04d0bd618f
+370, 0x9b7833e5aa782716
+371, 0x778cd35aea5841b1
+372, 0xecea3c458cefbc60
+373, 0x5107ae83fc527f46
+374, 0x278ad83d44bd2d1a
+375, 0x7014a382295aeb16
+376, 0xf326dd762048743f
+377, 0x858633d56279e553
+378, 0x76408154085f01bc
+379, 0x3e77d3364d02e746
+380, 0x2f26cea26cadd50b
+381, 0x6d6846a4ecb84273
+382, 0x4847e96f2df5f76
+383, 0x5a8610f46e13ff61
+384, 0x4e7a7cac403e10dd
+385, 0x754bdf2e20c7bc90
+386, 0x8bdd80e6c51bd0be
+387, 0x61c655fae2b4bc52
+388, 0x60873ef48e3d2f03
+389, 0x9d7d8d3698a0b4a4
+390, 0xdf48e9c355cd5d4b
+391, 0x69ecf03e20be99ac
+392, 0xc1a0c5a339bd1815
+393, 0x2e3263a6a3adccb
+394, 0x23557459719adbdc
+395, 0xd1b709a3b330e5a
+396, 0xade5ab00a5d88b9d
+397, 0x69a6bd644120cfad
+398, 0x40187ecceee92342
+399, 0x1c41964ba1ac78da
+400, 0x9ac5c51cbecabe67
+401, 0xbdc075781cf36d55
+402, 0xeaf5a32246ded56
+403, 0xcda0b67e39c0fb71
+404, 0x4839ee456ef7cc95
+405, 0xf17092fdd41d5658
+406, 0x2b5d422e60ae3253
+407, 0x3effe71102008551
+408, 0x20a47108e83934b7
+409, 0xd02da65fe768a88f
+410, 0xeb046bd56afa4026
+411, 0x70c0509c08e0fbe0
+412, 0x1d35c38d4f8bac6c
+413, 0x9aa8eb6466f392e0
+414, 0x587bd4a430740f30
+415, 0x82978fe4bad4195
+416, 0xdc4ebc4c0feb50ab
+417, 0xd3b7164d0240c06f
+418, 0x6e2ad6e5a5003a63
+419, 0xa24b430e2ee6b59c
+420, 0x2905f49fd5073094
+421, 0x5f209e4de03aa941
+422, 0x57b7da3e0bedb1dc
+423, 0x5e054018875b01f5
+424, 0xb2f2da6145658db3
+425, 0xbd9c94a69a8eb651
+426, 0x9c5f9a07cd6ac749
+427, 0x2296c4af4d529c38
+428, 0x522ed800fafdefab
+429, 0xe2a447ced0c66791
+430, 0x937f10d45e455fef
+431, 0xc882987d9e29a24
+432, 0x4610bfd6a247ee1a
+433, 0x562ba3e50870059
+434, 0x59d8d58793602189
+435, 0xfe9a606e3e34abe
+436, 0x6825f7932a5e9282
+437, 0xe77f7061bab476ad
+438, 0xbf42001da340ace3
+439, 0x9c3e9230f5e47960
+440, 0x2c0f700d96d5ad58
+441, 0x330048b7cd18f1f9
+442, 0xffc08785eca5cca9
+443, 0xb5879046915f07a5
+444, 0xef51fe26f83c988e
+445, 0xfa4c2968e7881a9a
+446, 0xc0a9744455a4aad
+447, 0xbd2ad686d6313928
+448, 0x6b9f0984c127682a
+449, 0xc9aaa00a5da59ed8
+450, 0x762a0c4b98980dbf
+451, 0x52d1a2393d3ca2d1
+452, 0x1e9308f2861db15c
+453, 0xe7b3c74fe4b4a844
+454, 0x485e15704a7fc594
+455, 0x9e7f67ea44c221f6
+456, 0xbab9ad47fde916e0
+457, 0x50e383912b7fc1f4
+458, 0xaad63db8abcef62d
+459, 0xc2f0c5699f47f013
+460, 0xee15b36ada826812
+461, 0x2a1b1cf1e1777142
+462, 0x8adb03ede79e937d
+463, 0xf14105ef65643bf3
+464, 0x752bbaefc374a3c7
+465, 0xa4980a08a5a21d23
+466, 0x418a1c05194b2db7
+467, 0xdd6ff32efe1c3cd6
+468, 0x272473ed1f0d3aa2
+469, 0x1e7fdebadabe6c06
+470, 0xd1baa90c17b3842f
+471, 0xd3d3a778e9c8404a
+472, 0x781ae7fda49fa1a0
+473, 0x61c44fdbdacc672d
+474, 0x6d447d0a1404f257
+475, 0x9303e8bdfbfb894d
+476, 0x3b3482cdec016244
+477, 0xb149bf245d062e7b
+478, 0x96f8d54b14cf992d
+479, 0x4741549a01f8c3d0
+480, 0x48270811b2992af
+481, 0x7b58f175cd25d147
+482, 0x8f19a840b56f4be9
+483, 0x84a77f43c0951a93
+484, 0x34e1a69381f0c374
+485, 0xb158383c9b4040f
+486, 0x372f1abc7cf3a9fa
+487, 0x5439819a84571763
+488, 0xabf8515e9084e2fa
+489, 0xb02312b9387ff99
+490, 0x238a85bb47a68b12
+491, 0x2068cb83857c49bb
+492, 0xc6170e743083664c
+493, 0x745cf8470bcb8467
+494, 0xe3a759a301670300
+495, 0x292c7686ad3e67da
+496, 0x359efedaff192a45
+497, 0x511f2c31a2d8c475
+498, 0x97fd041bf21c20b3
+499, 0x25ef1fe841b7b3f6
+500, 0xbb71739e656f262d
+501, 0x2729b0e989b6b7b8
+502, 0xd2142702ec7dbabf
+503, 0x7008decd2488ee3f
+504, 0x69daa95e303298d7
+505, 0xc35eca4efb8baa5a
+506, 0xf3f16d261cec3b6c
+507, 0x22371c1d75396bd3
+508, 0x7aefa08eccae857e
+509, 0x255b493c5e3c2a2f
+510, 0x779474a077d34241
+511, 0x5199c42686bea241
+512, 0x16c83931e293b8d3
+513, 0xa57fe8db8c0302c7
+514, 0xd7ace619e5312eb1
+515, 0x8740f013306d217c
+516, 0xb6a1ad5e29f4d453
+517, 0x31abf7c964688597
+518, 0xbc3d791daed71e7
+519, 0x31ee4ca67b7056ed
+520, 0x1ab5416bfe290ea3
+521, 0x93db416f6d3b843a
+522, 0xed83bbe5b1dd2fed
+523, 0xece38271470d9b6d
+524, 0x3a620f42663cd8ae
+525, 0x50c87e02acafee5d
+526, 0xcabeb8bedbc6dab5
+527, 0x2880a6d09970c729
+528, 0x4aba5dd3bfc81bc
+529, 0xaba54edf41080cec
+530, 0xb86bb916fc85a169
+531, 0x4c41de87bc79d8ca
+532, 0xcce2a202622945fe
+533, 0x513f086fad94c107
+534, 0x18b3960c11f8cc96
+535, 0x2f0d1cfd1896e236
+536, 0x1702ae3880d79b15
+537, 0x88923749029ae81
+538, 0x84810d4bdec668eb
+539, 0xf85b0a123f4fc68d
+540, 0x93efd68974b6e4d1
+541, 0x5d16d6d993a071c9
+542, 0x94436858f94ca43b
+543, 0xb3dbb9ed0cb180b6
+544, 0x6447030a010b8c99
+545, 0xd7224897c62925d8
+546, 0xb0c13c1d50605d3a
+547, 0xdff02c7cb9d45f30
+548, 0xe8103179f983570d
+549, 0xbc552037d6d0a24e
+550, 0x775e500b01486b0d
+551, 0x2050ac632c694dd6
+552, 0x218910387c4d7ae7
+553, 0xf83e8b68ff885d5d
+554, 0xe3374ec25fca51a3
+555, 0xfa750ffa3a60f3af
+556, 0x29ee40ba6df5592e
+557, 0x70e21a68f48260d2
+558, 0x3805ca72cd40886e
+559, 0x2f23e73f8eabf062
+560, 0x2296f80cdf6531ae
+561, 0x903099ed968db43a
+562, 0xf044445cf9f2929f
+563, 0xcd47fdc2de1b7a1
+564, 0xaab1cbd4f849da99
+565, 0x5fc990688da01acb
+566, 0xa9cee52ea7dab392
+567, 0xecefc3a4349283a8
+568, 0xdd6b572972e3fafc
+569, 0xc1f0b1a2ffb155da
+570, 0xc30d53fc17bd25c8
+571, 0x8afa89c77834db28
+572, 0x5569a596fb32896c
+573, 0x36f207fc8df3e3d4
+574, 0x57c2bd58517d81db
+575, 0xb524693e73d0061c
+576, 0xb69f6eb233f5c48b
+577, 0x4f0fb23cab8dc695
+578, 0x492c1ad0a48df8df
+579, 0xf6dcc348ec8dec1f
+580, 0xa4d8708d6eb2e262
+581, 0x4c2072c2c9766ff1
+582, 0xa9bf27c4304875f0
+583, 0xfc8fb8066d4f9ae2
+584, 0x188095f6235fec3c
+585, 0x1d8227a2938c2864
+586, 0x89ea50c599010378
+587, 0xcac86df0a7c6d56d
+588, 0x47a8c5df84c7d78
+589, 0xe607ae24ea228bfa
+590, 0x36624a7996efe104
+591, 0x5d72881c1227d810
+592, 0x78694a6750374c8
+593, 0x7b9a217d4ab5ff45
+594, 0xd53e5d6f7504becc
+595, 0x197a72d3f4889a0e
+596, 0xfdc70c4755a8df36
+597, 0xd0fda83748c77f74
+598, 0x7ddc919ac9d6dcc9
+599, 0x785c810a6a2dc08b
+600, 0xba4be83e7e36896c
+601, 0x379d6fe80cf2bffe
+602, 0x74cae2dabc429206
+603, 0x1efac32d5d34c917
+604, 0x3cb64e2f98d36e70
+605, 0xc0a7c3cdc3c60aa7
+606, 0x699dfadd38790ebe
+607, 0x4861e61b3ecfbeac
+608, 0x531744826c345baa
+609, 0x5ec26427ad450cba
+610, 0xf2c1741479abdcae
+611, 0xe9328a78b2595458
+612, 0x30cd1bdf087acd7f
+613, 0x7491ced4e009adbe
+614, 0xdcd942df1e2e7023
+615, 0xfe63f01689fee35
+616, 0x80282dfe5eaedc42
+617, 0x6ecdea86495f8427
+618, 0xe0adfdd5e9ed31c3
+619, 0xf32bd2a7418127e
+620, 0x8aabba078db6ee2
+621, 0xa8a8e60499145aca
+622, 0xf76b086ac4e8a0f2
+623, 0x6e55b3c452ff27f8
+624, 0xe18fa7cd025a71bf
+625, 0xeed7b685fde0fa25
+626, 0xba9b6c95867fa721
+627, 0x4c2603bc69de2df2
+628, 0xaac87eee1b58cd66
+629, 0x3c9af6656e01282c
+630, 0x2dfa05ce8ff476b6
+631, 0xeae9143fcf92f23d
+632, 0x3f0699f631be3bc8
+633, 0xa0f5f79f2492bd67
+634, 0x59c47722388131ed
+635, 0x5f6e9d2941cef1de
+636, 0xe9ad915c09788b7b
+637, 0x92c6d37e4f9482f5
+638, 0x57d301b7fdadd911
+639, 0x7e952d23d2a8443
+640, 0xbb2fa5e0704b3871
+641, 0xe5642199be36e2d5
+642, 0x5020b60d54358291
+643, 0xa0b6317ec3f60343
+644, 0xb57b08b99540bc5c
+645, 0x21f1890adc997a88
+646, 0xfcf824200dd9da2d
+647, 0x8146293d83d425d1
+648, 0xdadfbf5fbb99d420
+649, 0x1eb9bbc5e6482b7d
+650, 0xd40ff44f1bbd0f1c
+651, 0xa9f948ba2d08afa5
+652, 0x638cc07c5301e601
+653, 0x1f984baa606e14e8
+654, 0x44e153671081f398
+655, 0xb17882eeb1d77a5d
+656, 0x5fd8dbee995f14c
+657, 0xff3533e87f81b7fe
+658, 0x2f44124293c49795
+659, 0x3bf6b51e9360248
+660, 0x72d615edf1436371
+661, 0x8fc5cf4a38adab9d
+662, 0xfa517e9022078374
+663, 0xf356733f3e26f4d8
+664, 0x20ea099cdc6aad40
+665, 0xe15b977deb37637d
+666, 0xcc85601b89dae88d
+667, 0x5768c62f8dd4905c
+668, 0xa43cc632b4e56ea
+669, 0xc4240cf980e82458
+670, 0xb194e8ffb4b3eeb6
+671, 0xee753cf2219c5fa1
+672, 0xfe2500192181d44d
+673, 0x2d03d7d6493dd821
+674, 0xff0e787bb98e7f9b
+675, 0xa05cf8d3bd810ce7
+676, 0x718d5d6dcbbdcd65
+677, 0x8d0b5343a06931c
+678, 0xae3a00a932e7eaf9
+679, 0x7ed3d8f18f983e18
+680, 0x3bb778ee466dc143
+681, 0x711c685c4e9062c0
+682, 0x104c3af5d7ac9834
+683, 0x17bdbb671fb5d5cf
+684, 0xabf26caead4d2292
+685, 0xa45f02866467c005
+686, 0xf3769a32dc945d2d
+687, 0xe78d0007f6aabb66
+688, 0x34b60be4acbd8d4b
+689, 0x58c0b04b69359084
+690, 0x3a8bb354c212b1
+691, 0x6b82a8f3d70058d5
+692, 0x405bdef80a276a4a
+693, 0xe20ca40ee9195cad
+694, 0xf5dd96ba2446fefd
+695, 0xc1e180c55fe55e3c
+696, 0xa329caf6daa952b3
+697, 0xb4809dd0c84a6b0a
+698, 0xd27f82661070cee7
+699, 0xa7121f15ee2b0d8a
+700, 0x4bdaea70d6b34583
+701, 0xe821dc2f310f7a49
+702, 0x4c00a5a68e76f647
+703, 0x331065b064a2d5ea
+704, 0xac0c2ce3dc04fa37
+705, 0x56b32b37b8229008
+706, 0xe757cdb51534fcfa
+707, 0xd3ff183576b2fad7
+708, 0x179e1f4190f197a7
+709, 0xf874c626a7c9aae5
+710, 0xd58514ffc37c80e4
+711, 0xc65de31d33fa7fd3
+712, 0x6f6637052025769b
+713, 0xca1c6bdadb519cc0
+714, 0xd1f3534cde37828a
+715, 0xc858c339eee4830a
+716, 0x2371eacc215e02f4
+717, 0x84e5022db85bbbe9
+718, 0x5f71c50bba48610e
+719, 0xe420192dad9c323f
+720, 0x2889342721fca003
+721, 0x83e64f63334f501d
+722, 0xac2617172953f2c
+723, 0xfa1f78d8433938ff
+724, 0x5578382760051462
+725, 0x375d7a2e3b90af16
+726, 0xb93ff44e6c07552d
+727, 0xded1d5ad811e818c
+728, 0x7cf256b3b29e3a8c
+729, 0x78d581b8e7bf95e8
+730, 0x5b69192f2caa6ad3
+731, 0xa9e25855a52de3ce
+732, 0x69d8e8fc45cc188d
+733, 0x5dd012c139ad347d
+734, 0xfcb01c07b77db606
+735, 0x56253e36ab3d1cce
+736, 0x1181edbb3ea2192
+737, 0x325bef47ff19a08d
+738, 0xd3e231ceb27e5f7
+739, 0x8e819dd2de7956d2
+740, 0x34a9689fe6f84a51
+741, 0x3e4eeb719a9c2927
+742, 0x5c3b3440581d0aaf
+743, 0x57caf51897d7c920
+744, 0xec6a458130464b40
+745, 0xe98f044e0da40e9b
+746, 0xbe38662020eeb8e7
+747, 0x7b8c407c632724ae
+748, 0x16c7cfa97b33a544
+749, 0xd23359e2e978ae5a
+750, 0x4fdba458250933dd
+751, 0x3c9e0713cfe616ba
+752, 0x6f0df87b13163b42
+753, 0xc460902cb852cc97
+754, 0x289df8fefd6b0bce
+755, 0x4ac2a2a1c3fb8029
+756, 0x2fc3e24d8b68eef7
+757, 0x34564386a59aab9a
+758, 0x31047391ebd67ce4
+759, 0x6c23d070a0564d41
+760, 0xba6387b2b72545f7
+761, 0xcdcf1008058387af
+762, 0xc9308fa98db05192
+763, 0xdbdbb5abd01a9d84
+764, 0x937088275c7804ab
+765, 0x6f6accfefe34ee81
+766, 0x5c33c74c49cfdb2c
+767, 0x5e1a771edfb92bd3
+768, 0x6e89b009069ecae7
+769, 0x34d64e17ec0e8968
+770, 0x841203d0cde0c330
+771, 0x7642cc9d7eb9e9cb
+772, 0xca01d2e8c128b97e
+773, 0x5b8390617b3304ab
+774, 0x52ec4ed10de1eb2d
+775, 0xb90f288b9616f237
+776, 0x5bd43cd49617b2e2
+777, 0x1a53e21d25230596
+778, 0x36ccd15207a21cd6
+779, 0xc8263d780618fd3c
+780, 0x6eb520598c6ce1cb
+781, 0x493c99a3b341564f
+782, 0xab999e9c5aa8764f
+783, 0xab2fa4ceaba84b
+784, 0xbbd2f17e5cb2331b
+785, 0xc8b4d377c0cc4e81
+786, 0x31f71a6e165c4b1e
+787, 0xd1011e55fb3addaa
+788, 0x5f7ec34728dfa59
+789, 0x2aef59e60a84eb0f
+790, 0x5dde6f09aec9ad5f
+791, 0x968c6cdbc0ef0438
+792, 0x1957133afa15b13a
+793, 0xbaf28f27573a64c2
+794, 0xc6f6ddd543ebf862
+795, 0xdd7534315ec9ae1e
+796, 0xd2b80cd2758dd3b
+797, 0xa38c3da00cc81538
+798, 0x15c95b82d3f9b0f9
+799, 0x6704930287ce2571
+800, 0x9c40cc2f6f4ecb0c
+801, 0xc8de91f50b22e94e
+802, 0x39272e8fddbfdf0a
+803, 0x879e0aa810a117d
+804, 0xa312fff4e9e5f3bd
+805, 0x10dd747f2835dfec
+806, 0xeb8466db7171cdae
+807, 0xaa808d87b9ad040a
+808, 0xab4d2229a329243a
+809, 0x7c622f70d46f789c
+810, 0x5d41cef5965b2a8e
+811, 0xce97ec4702410d99
+812, 0x5beba2812c91211b
+813, 0xf134b46c93a3fec7
+814, 0x76401d5630127226
+815, 0xc55fc9d9eacd4ec1
+816, 0xaec8cefaa12f813f
+817, 0x2f845dcfd7b00722
+818, 0x3380ab4c20885921
+819, 0xdb68ad2597691b74
+820, 0x8a7e4951455f563f
+821, 0x2372d007ed761c53
+822, 0xcab691907714c4f1
+823, 0x16bc31d6f3abec1a
+824, 0x7dff639fbcf1824
+825, 0x6666985fbcff543d
+826, 0xb618948e3d8e6d0c
+827, 0x77b87837c794e068
+828, 0xcd48288d54fcb5a8
+829, 0x47a773ed6ae30dc3
+830, 0xba85ae44e203c942
+831, 0xa7a7b21791a25b2d
+832, 0x4029dd92e63f19e0
+833, 0xc2ad66ab85e7d5aa
+834, 0xa0f237c96fdab0db
+835, 0xffefb0ab1ca18ed
+836, 0x90cb4500785fd7d5
+837, 0xa7dd3120f4876435
+838, 0x53f7872624694300
+839, 0xea111326ff0040d9
+840, 0x5f83cb4cce40c83b
+841, 0x918e04936c3b504d
+842, 0x87a8db4c0e15e87c
+843, 0x7cff39da6a0dedd0
+844, 0x36f7de2037f85381
+845, 0xd1d8d94022a1e9a7
+846, 0x2c9930127dc33ec9
+847, 0x6cb4719dcd0101c6
+848, 0xc01868cde76935f7
+849, 0x6b86f2ec1ab50143
+850, 0x68af607d8d94ae61
+851, 0xe216c5b95feedf34
+852, 0x4b866bd91efe2e4b
+853, 0x4bff79df08f92c99
+854, 0x6ff664ea806acfd1
+855, 0x7fce0b3f9ece39bc
+856, 0x29bc90b59cb3db97
+857, 0x833c4b419198607d
+858, 0xf3573e36ca4d4768
+859, 0x50d71c0a3c2a3fa8
+860, 0xd754591aea2017e7
+861, 0x3f9126f1ee1ebf3
+862, 0xe775d7f4b1e43de8
+863, 0xe93d51628c263060
+864, 0x83e77f6fb32d6d82
+865, 0x43dd7eef823408e4
+866, 0x1c843c2c90180662
+867, 0xe924dafb9a16066b
+868, 0x6af3ee96e7b7fbd9
+869, 0x94d5c4f37befcd1f
+870, 0x40ffb04bedef4236
+871, 0x71c17bbc20e553e
+872, 0x101f7a0a6208729f
+873, 0x5ca34570cf923548
+874, 0x8e3139db2e96e814
+875, 0x3ab96d96263d048d
+876, 0x97f3c0bbc6755c3c
+877, 0x31fc72daedaef3dc
+878, 0x71f8d7855d10789b
+879, 0xce6dc97b4662333b
+880, 0xfddc2aabd342bc61
+881, 0xefbd4007ff8c7d2e
+882, 0xf72cd6c689ef8758
+883, 0x932c8b0c0e755137
+884, 0x94cc4dedd58ff69
+885, 0xde4dfd6890535979
+886, 0xdb00dcd2dcb4a50a
+887, 0xb0466240b4548107
+888, 0x9cb9264c7b90d1a3
+889, 0x357e378e9be5766b
+890, 0x6e0316ef03367bbf
+891, 0x201ea18839544ca
+892, 0x803ff3406be5f338
+893, 0xf9d5e82fd4144bb2
+894, 0x1b6b88ca701e9f47
+895, 0xd1fe5ab8e1f89cc0
+896, 0x14171fe176c4bece
+897, 0x887948bdef78beaa
+898, 0x80449ddc3eb9b977
+899, 0x5f4e1f900fb4bcf3
+900, 0xbe30f8701909f8e2
+901, 0xd1f2a2fb5503306d
+902, 0x6b1c77238dc23803
+903, 0x102156a6c9860f66
+904, 0x4cd446e099edf4c1
+905, 0xc79ac6cbc911f33b
+906, 0x3ee096ffe3384f1c
+907, 0xb58f83b18a306dc7
+908, 0x9f76582141de56b2
+909, 0x9ddfa85e02c13866
+910, 0x4d9a19d4ce90a543
+911, 0xbf81ab39fd17d376
+912, 0x5327e5054c6a74f1
+913, 0xd5062dd31db1a9b7
+914, 0x645853735527edc
+915, 0x485393967f91af08
+916, 0xeff9667dcf77ca68
+917, 0xd012313f5fbec464
+918, 0xbeae35bdfae55144
+919, 0x302c41ebac8444a0
+920, 0x9ccdb6c2fe58fba8
+921, 0x567753af68ed23f8
+922, 0xff90f790e43efec3
+923, 0x970cc756fb799696
+924, 0xe59239d1c44915
+925, 0x4d2d189fb3941f05
+926, 0x96f23085db165a9c
+927, 0xa1202dec7a37b1a5
+928, 0xc0c1ee74bcd7dc1a
+929, 0x9edcf2048b30333a
+930, 0xd848588ba7e865fb
+931, 0x8d9f0897317cab40
+932, 0x67b96f15e25924fb
+933, 0xefc8d8536619ee42
+934, 0xf3f621d22bdde0c2
+935, 0x68610a0de862ae32
+936, 0xa22ca5142de24cbd
+937, 0x8815452f4e6b4801
+938, 0x4e9c1b607b2750e5
+939, 0x19b3c09ba6fc9b25
+940, 0x9b2543c8836780ac
+941, 0xe702b8f950e56431
+942, 0xb357cc329cac3917
+943, 0x387bf86a17a31e08
+944, 0x9940b983d331b163
+945, 0xf5d89d7fe9095e18
+946, 0x4362682329e5c4d1
+947, 0xd2132573f6ae7b42
+948, 0xc0a5849e23a61606
+949, 0xdadbddf47265bc02
+950, 0x1b96f00339a705f7
+951, 0x94e6642329288913
+952, 0x825ab3f10e6d330b
+953, 0x1a1c31ac9d883ea0
+954, 0xb49076b7155c6f47
+955, 0x920cf3085dfe3ccb
+956, 0x9743407c9f28e825
+957, 0x6ce8a28622402719
+958, 0xce2fe67e06baf8a6
+959, 0x3a16b34784ecf5e6
+960, 0x140467cc1d162a0c
+961, 0x32d4772692ab625
+962, 0xa4f4b28562f43336
+963, 0x885b4335457bd84a
+964, 0x499d3ed26c87ad8a
+965, 0xc7328bcedb9a545e
+966, 0xc6dd76a6cbf5d2b2
+967, 0xba9c22be404ee1aa
+968, 0x70e6aee45f23521d
+969, 0x61e03a798593c177
+970, 0x171671f809c68213
+971, 0x28d54872fc1d914c
+972, 0x43c2fcd9bd098b53
+973, 0x172ad4c4a98b9d37
+974, 0x330860c9460f2516
+975, 0x49547f472df984f4
+976, 0x873b2436d3f0e114
+977, 0x6f99accf4ea050b6
+978, 0x5968ac874ed51613
+979, 0x4939d70d29a3c611
+980, 0x11f381ed28738d3d
+981, 0xa97430d36ab3a869
+982, 0xe6fa880801129e22
+983, 0xf84decbd8f48c913
+984, 0x4425c0ed1e9a82a5
+985, 0x7a1f9485e9929d5a
+986, 0xc7c51f155dfce1c6
+987, 0x9619a39501d74f2b
+988, 0x7c7035955dbf4c1b
+989, 0xc61ee569cf57c2c9
+990, 0x3eaf7c5b0df734e1
+991, 0xe71cb4064d1ede05
+992, 0x356e3cec80e418b2
+993, 0xca04306243a15be6
+994, 0x941cf3881fa18896
+995, 0x30dbb0e819d644e0
+996, 0xaae22c0bef02859a
+997, 0x7bd30917bbaa8a94
+998, 0x2672547bc8d7d329
+999, 0x4955c92aaa231578
diff --git a/lib/python3.12/site-packages/numpy/random/tests/data/pcg64dxsm-testset-2.csv b/lib/python3.12/site-packages/numpy/random/tests/data/pcg64dxsm-testset-2.csv
new file mode 100644
index 0000000000000000000000000000000000000000..878c5ea7c3a5173467a4f945947174149f3913e6
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/random/tests/data/pcg64dxsm-testset-2.csv
@@ -0,0 +1,1001 @@
+seed, 0x0
+0, 0xd97e4a147f788a70
+1, 0x8dfa7bce56e3a253
+2, 0x13556ed9f53d3c10
+3, 0x55dbf1c241341e98
+4, 0xa2cd98f722eb0e0a
+5, 0x83dfc407203ade8
+6, 0xeaa083df518f030d
+7, 0x44968c87e432852b
+8, 0x573107b9cb8d9ecc
+9, 0x9eedd1da50b9daca
+10, 0xb33a6735ca451e3c
+11, 0x72830d2b39677262
+12, 0x9da8c512fd0207e8
+13, 0x1fc5c91954a2672b
+14, 0xd33479437116e08
+15, 0x9ccdd9390cee46f3
+16, 0x1fd39bb01acd9e76
+17, 0xedc1869a42ff7fe5
+18, 0xbd68ca0b42a6e7e9
+19, 0x620b67df09621b1f
+20, 0xfa11d51bd6950221
+21, 0xc8c45b36e7d28d08
+22, 0xe9c91272fbaad777
+23, 0x2dc87a143f220e90
+24, 0x6376a7c82361f49d
+25, 0x552c5e434232fe75
+26, 0x468f7f872ac195bc
+27, 0x32bed6858125cf89
+28, 0xe4f06111494d09d3
+29, 0xa5c166ffea248b80
+30, 0x4e26605b97064a3f
+31, 0xceafd9f6fc5569d
+32, 0xb772f2f9eed9e106
+33, 0x672c65e6a93534e2
+34, 0xcdc5e1a28d1bd6a0
+35, 0x1ed9c96daeebd3e3
+36, 0x4d189dcfc0c93c3f
+37, 0x50df5a95c62f4b43
+38, 0xcccf4949fa65bbb8
+39, 0x19b8073d53cdc984
+40, 0x6fb40bba35483703
+41, 0xb02de4aef86b515a
+42, 0x4d90c63655350310
+43, 0xea44e4089825b16c
+44, 0x8d676958b1f9da2b
+45, 0x6d313940917ae195
+46, 0x1b1d35a4c1dd19f4
+47, 0x117720f8397337ef
+48, 0xcc073cf3ac11eeaa
+49, 0x8331ec58a9ff8acb
+50, 0xf3dc2a308b6b866f
+51, 0x7eba1202663382b6
+52, 0x8269839debeb4e5a
+53, 0x87fd3dc0f9181a8e
+54, 0xabe62ddd3c925f03
+55, 0x7f56f146944fe8d4
+56, 0xc535972150852068
+57, 0x60b252d453bd3a68
+58, 0x4251f0134634490a
+59, 0x338950da210dfeb2
+60, 0xcadfe932971c9471
+61, 0xfb7049457fab470e
+62, 0x9bfb8145a4459dff
+63, 0x4a89dda3898f9d8a
+64, 0x88cc560151483929
+65, 0x277dc820f4b6796e
+66, 0x3524bd07ea0afb88
+67, 0x92eb6ffb2bf14311
+68, 0xf6559be0783f3fe9
+69, 0xf0844f9af54af00d
+70, 0xdd5e0b59adcef8a
+71, 0x4ff7e4f2ab18554c
+72, 0x3fa22c8a02634587
+73, 0x1db8e1a9442fe300
+74, 0x40cf15953ad3d3e7
+75, 0x92af15fe1a9f6f0a
+76, 0xab4a0e466fb0cfd
+77, 0x944f1555a06cca82
+78, 0x10cf48412f1f6066
+79, 0x7f51f9a455f9e8e1
+80, 0x47ee93530f024c7e
+81, 0x36cf2f0413e0f6f2
+82, 0xa315e23731969407
+83, 0xd8e2796327cf5f87
+84, 0xa86072696a555c34
+85, 0xee3f0b8804feaab7
+86, 0x41e80dc858f8360b
+87, 0x31ec2e9b78f5b29
+88, 0xd397fb9b8561344c
+89, 0x28081e724e649b74
+90, 0x5c135fc3fc672348
+91, 0x9a276ca70ce9caa0
+92, 0x9216da059229050a
+93, 0xcf7d375ed68007b0
+94, 0xa68ad1963724a770
+95, 0xd4350de8d3b6787c
+96, 0xee7d2c2cc275b6d2
+97, 0x71645ec738749735
+98, 0x45abdf8c68d33dbb
+99, 0xe71cadb692c705ea
+100, 0x60af6f061fd90622
+101, 0x1eabe2072632c99d
+102, 0x947dda995a402cb6
+103, 0xbb19f49a3454f3b
+104, 0xe6e43e907407758c
+105, 0xfe2b67016bd6873a
+106, 0x7fdb4dd8ab30a722
+107, 0x39d3265b0ff1a45b
+108, 0xed24c0e4fce8d0c2
+109, 0xf6e074f86faf669d
+110, 0x9142040df8dc2a79
+111, 0x9682ab16bc939a9c
+112, 0x6a4e80c378d971c8
+113, 0x31309c2c7fc2d3d6
+114, 0xb7237ec682993339
+115, 0x6a30c06bb83dccd9
+116, 0x21c8e9b6d8e7c382
+117, 0x258a24ae6f086a19
+118, 0xb76edb5be7df5c35
+119, 0x3c11d7d5c16e7175
+120, 0xbdfc34c31eff66e1
+121, 0x8af66e44be8bf3a2
+122, 0x3053292e193dec28
+123, 0xd0cc44545b454995
+124, 0x408ac01a9289d56
+125, 0x4e02d34318ec2e85
+126, 0x9413ff3777c6eb6b
+127, 0xa3a301f8e37eb3df
+128, 0x14e6306bd8d8f9f9
+129, 0xd3ea06ce16c4a653
+130, 0x170abe5429122982
+131, 0x7f9e6fddc6cacb85
+132, 0xa41b93e10a10a4c8
+133, 0x239216f9d5b6d0b5
+134, 0x985fcb6cb4190d98
+135, 0xb45e3e7c68f480c6
+136, 0xc1b2fc2e0446211c
+137, 0x4596adb28858c498
+138, 0x2dd706f3458ddc75
+139, 0x29c988c86f75464
+140, 0xac33a65aa679a60
+141, 0xa28fef762d39d938
+142, 0x541e6fa48647f53
+143, 0x27838d56b2649735
+144, 0x8e143d318a796212
+145, 0xaea6097745f586b8
+146, 0x636143330f8ee2e6
+147, 0xc2d05fd8b945b172
+148, 0x6e355f9eb4353055
+149, 0xeb64ca42e8bf282e
+150, 0xe8202dfd9da0fe5
+151, 0x7305689c9d790cba
+152, 0xf122f8b1bef32970
+153, 0x9562887e38c32ba5
+154, 0xf9cd9be121b738d
+155, 0x6238e0c398307913
+156, 0x5f2e79bb07c30f47
+157, 0x8ce8e45c465006e
+158, 0x39281fe1e99e2441
+159, 0xafb10c2ca2874fea
+160, 0x6e52f91633f83cf
+161, 0x8ff12c1ac73c4494
+162, 0xe48608a09365af59
+163, 0xefd9bbc7e76e6a33
+164, 0xbe16a39d5c38ec92
+165, 0x6a6ffbcaf5a2330f
+166, 0xdd5d6ac7d998d43d
+167, 0x207bf978226d4f11
+168, 0xf8eec56bd2a0f62e
+169, 0xa5bccf05dce0d975
+170, 0x93cf3ec1afe457a6
+171, 0x38651466d201f736
+172, 0x3ad21473985c9184
+173, 0xc6407a3bd38c92a6
+174, 0xb1ec42c7afa90a25
+175, 0xbdeca984df8b7dd3
+176, 0xb6926b1d00aa6c55
+177, 0x86141d0022352d49
+178, 0x169316256135ee09
+179, 0xffb1c7767af02a5c
+180, 0x502af38ad19f5c91
+181, 0xfbf6cbc080086658
+182, 0x33cf9b219edae501
+183, 0x46e69bebd77b8862
+184, 0xf11e0cc91125d041
+185, 0xb4cd1649f85e078f
+186, 0xb49be408db4e952
+187, 0xb0b8db46140cce3c
+188, 0xba647f2174012be7
+189, 0x4f0a09e406970ac9
+190, 0xf868c7aec9890a5c
+191, 0xde4c8fa7498ea090
+192, 0x872ceb197978c1d4
+193, 0x1eb5cd9c3269b258
+194, 0x3ea189f91724f014
+195, 0x41379656f7746f2c
+196, 0x7bd18493aca60e51
+197, 0x5380c23b0cbbf15e
+198, 0x920b72835f88246b
+199, 0x24d7f734a4548b8e
+200, 0x9944edb57e5aa145
+201, 0x4628e136ebb8afe1
+202, 0xb4ee6a776356e2a7
+203, 0x481cbe9744ccf7d7
+204, 0x7e8d67e8b0b995d9
+205, 0xeeacde100af7b47e
+206, 0x103da08f2487dab7
+207, 0x6b9890a91d831459
+208, 0xd0c5beae37b572c7
+209, 0xfdccc371ee73fcc
+210, 0x65438f0a367a2003
+211, 0x5d23b2c818a7e943
+212, 0x9a8ed45ac04b58b3
+213, 0xdaf3c3f1695dce10
+214, 0x5960eec706fa2bc0
+215, 0x98ca652facb80d40
+216, 0x72970ae5e2194143
+217, 0x18c6374d878c5c94
+218, 0x20fa51f997381900
+219, 0x3af253dba26d6e1d
+220, 0x1b23d65db15c7f78
+221, 0x9f53ae976259b0e3
+222, 0x9a6addb28dc92d49
+223, 0x1e085c4accd0a7d7
+224, 0xe9d3f4cc9bad6ce5
+225, 0xe018fad78b5b1059
+226, 0x5ef7682232b4b95
+227, 0xb2242aa649f5de80
+228, 0x8f3e6d8dd99b9e4e
+229, 0xb9be6cc22949d62a
+230, 0xecbdc7beaa5ff1fe
+231, 0xd388db43a855bdf0
+232, 0xd71ee3238852568d
+233, 0x85ab3056304c04b5
+234, 0x2ed7ae7ad3cfc3cb
+235, 0x781d1b03d40b6c48
+236, 0x7d3c740886657e6d
+237, 0x982cfa6828daa6b0
+238, 0x278579599c529464
+239, 0x773adecfae9f0e08
+240, 0x63a243ea4b85c5d7
+241, 0x59940074fc3709e1
+242, 0xc914a2eed58a6363
+243, 0x2602b04274dd724c
+244, 0xdf636eb7636c2c42
+245, 0x891a334d0d26c547
+246, 0xde8cd586d499e22d
+247, 0x3ea1aa4d9b7035b6
+248, 0xd085cff6f9501523
+249, 0xe82a872f374959e
+250, 0x55cb495bbd42cc53
+251, 0x5f42b3226e56ca97
+252, 0xea463f6f203493a3
+253, 0xeef3718e57731737
+254, 0x1bd4f9d62b7f9f3c
+255, 0x19284f5e74817511
+256, 0xaf6e842c7450ca87
+257, 0x1d27d2b08a6b3600
+258, 0xfb4b912b396a52e3
+259, 0x30804d4c5c710121
+260, 0x4907e82564e36338
+261, 0x6441cf3b2900ddb7
+262, 0xd76de6f51988dc66
+263, 0x4f298ef96fd5e6d2
+264, 0x65432960c009f83d
+265, 0x65ebed07e1d2e3df
+266, 0xf83ee8078febca20
+267, 0x7bb18e9d74fc5b29
+268, 0x597b5fbc2261d91
+269, 0xea4f8ed0732b15b2
+270, 0xba2267f74f458268
+271, 0x3f304acabd746bbb
+272, 0x7bd187af85659a82
+273, 0x88e20dbdb7a08ea3
+274, 0x2a2dc948c772fcb4
+275, 0x87784fec2993c867
+276, 0x89163933cd362d4e
+277, 0xfd7b24f04302f957
+278, 0x9bdd544405dfb153
+279, 0xddee0fac58ffc611
+280, 0xa8e8993417e71ec1
+281, 0x55e0ab46ff7757af
+282, 0x53e7645f08d3d7df
+283, 0xbf78e563bc656ba2
+284, 0x1d162253b45ee2de
+285, 0x15e2bfefedf29eb4
+286, 0x4e2a4584aa394702
+287, 0xa89fb12b01525897
+288, 0x825bd98f0544e4df
+289, 0xfc6c50da6750700
+290, 0xc24aaabde7d28423
+291, 0x79d6f4660fcb19e5
+292, 0xee7d4fb40c8d659f
+293, 0x70bc281b462e811d
+294, 0x23ed4dc9636519a7
+295, 0xcb7c3f5a5711b935
+296, 0xe73090e0508c5d9d
+297, 0xb25a331f375952a6
+298, 0xa64c86e0c04740f6
+299, 0xb8f3ffc8d56ac124
+300, 0x2479266fc5ee6b15
+301, 0x8d5792d27f5ffbcb
+302, 0xb064298be946cd52
+303, 0xf0934a98912ffe26
+304, 0xbe805682c6634d98
+305, 0xe0e6e2c010012b4f
+306, 0x58c47d475f75976
+307, 0x358c9a6e646b2b4a
+308, 0x7e7c4ffca5b17ba7
+309, 0x43585c8c9a24a04c
+310, 0x5154ddbcd68d5c2c
+311, 0x4a2b062d3742a5e
+312, 0xca5691191da2b946
+313, 0x696a542109457466
+314, 0x9eb5d658a5022ba5
+315, 0x8158cf6b599ab8dc
+316, 0x1b95391eaa4af4a6
+317, 0x9953e79bd0fc3107
+318, 0x8639690086748123
+319, 0x2d35781c287c6842
+320, 0x393ef0001cd7bc8f
+321, 0xe3a61be8c5f2c22a
+322, 0x5e4ff21b847cc29b
+323, 0x4c9c9389a370eb84
+324, 0xd43a25a8fc3635fa
+325, 0xf6790e4a85385508
+326, 0x37edf0c81cb95e1d
+327, 0x52db00d6e6e79af8
+328, 0x3b202bceeb7f096
+329, 0x2a164a1c776136bb
+330, 0x73e03ee3fd80fd1b
+331, 0xd2c58c0746b8d858
+332, 0x2ed2cb0038153d22
+333, 0x98996d0fc8ceeacc
+334, 0xa4ed0589936b37f
+335, 0x5f61cf41a6d2c172
+336, 0xa6d4afb538c110d7
+337, 0xe85834541baadf1a
+338, 0x4c8967107fd49212
+339, 0x49bafb762ab1a8c1
+340, 0x45d540e2a834bf17
+341, 0x1c0ec8b4ed671dac
+342, 0x3d503ce2c83fe883
+343, 0x437bfffd95f42022
+344, 0xc82d1e3d5c2bc8d2
+345, 0x7a0a9cbfcb0d3f24
+346, 0xc0a4f00251b7a3be
+347, 0xb5be24e74bb6a1c6
+348, 0xa3104b94b57545b1
+349, 0x86de7d0c4b97b361
+350, 0x879c1483f26538a6
+351, 0xd74c87557f6accfb
+352, 0x2f9be40dbf0fe8a1
+353, 0x445a93398f608d89
+354, 0x7b3cb8a7211d7fdc
+355, 0xe86cc51290d031e7
+356, 0x33ef3594052ad79f
+357, 0xc61911d241dbb590
+358, 0x37cccb0c0e3de461
+359, 0xb75259124080b48b
+360, 0xd81e8961beb4abe5
+361, 0xf4542deb84a754e
+362, 0x6ea036d00385f02e
+363, 0xa7b60b0ac3b88681
+364, 0x108a6c36ca30baf5
+365, 0x4a2adc5bbfe2bf07
+366, 0x4079501f892a5342
+367, 0x55e113963c5448f0
+368, 0x8019ff4903b37242
+369, 0x109c6dcdb7ec6618
+370, 0x1239ac50944da450
+371, 0xe1399c7f94c651c1
+372, 0x5a6bbbae388d365a
+373, 0x4d72be57b8810929
+374, 0x3f067df24384e1fb
+375, 0x4f8b9e0f7f6c7be
+376, 0x202492c342a3b08
+377, 0x250753192af93a3
+378, 0xfba1159d9de2cb8e
+379, 0xba964497ab05505c
+380, 0x1329ec5d8a709dca
+381, 0x32927cacb6cd22bb
+382, 0x6b4d7db904187d56
+383, 0xe76adccf8e841e02
+384, 0x8c4bf4b6a788202
+385, 0x3013a3b409831651
+386, 0x7427d125c475412f
+387, 0x84dcc4bb2bf43202
+388, 0x117526f1101372a5
+389, 0xfe95d64b8984bd72
+390, 0x524e129934cc55c1
+391, 0xc3db4b0418c36d30
+392, 0xe1cb2047e9c19f7a
+393, 0xea43d6c8d8982795
+394, 0xe80ac8a37df89ed
+395, 0xfecc2104329ed306
+396, 0xa5c38aac9c1d51ea
+397, 0x3abe5d1c01e4fe17
+398, 0x717a805d97fcc7ac
+399, 0x94441f8207a1fb78
+400, 0x22d7869c5f002607
+401, 0x349e899f28c3a1b9
+402, 0x5639950cdea92b75
+403, 0x7e08450497c375b
+404, 0x94bf898b475d211d
+405, 0x75c761a402375104
+406, 0x1930920ec9d2a1e7
+407, 0xb774ba1bc6f6e4e2
+408, 0xf715602412e5d900
+409, 0x87bb995f4a13f0ba
+410, 0xa3c787868dfa9c8d
+411, 0xa17fd42a5a4f0987
+412, 0x4a9f7d435242b86
+413, 0x240364aff88f8aef
+414, 0xe7cd4cf4bf39f144
+415, 0xd030f313ca4c2692
+416, 0xc46696f4e03ec1e9
+417, 0x22c60f1ec21060b3
+418, 0x16c88058fd68986f
+419, 0x69ca448e8e6bde3f
+420, 0x3466c2cdec218abd
+421, 0x837ac4d05e6b117d
+422, 0x911210e154690191
+423, 0x9ece851d6fa358b7
+424, 0x42f79cb0c45e7897
+425, 0xbf7583babd7c499b
+426, 0x2059fe8031c6e0b9
+427, 0xabbec8fc00f7e51d
+428, 0x88809d86a3a256e1
+429, 0xd36056df829fdcb5
+430, 0x515632b6cb914c64
+431, 0xba76d06c2558874
+432, 0x632c54ca4214d253
+433, 0xadec487adf2cb215
+434, 0x521e663e1940513d
+435, 0xb1b638b548806694
+436, 0xbe2d5bfbe57d2c72
+437, 0x8b89e7719db02f7
+438, 0x90ba5281c1d56e63
+439, 0x899e1b92fceea102
+440, 0xf90d918e15182fa6
+441, 0x94a489ce96c948c4
+442, 0xad34db453517fcd4
+443, 0xc5264eb2de15930f
+444, 0x101b4e6603a21cee
+445, 0xef9b6258d6e85fff
+446, 0x6075c7d6c048bd7a
+447, 0x6f03232c64e438aa
+448, 0x18c983d7105ee469
+449, 0x3ffc23f5c1375879
+450, 0xbc1b4a00afb1f9f
+451, 0x5afa6b2bb8c6b46e
+452, 0xe7fce4af2f2c152a
+453, 0x5b00ab5c4b3982c7
+454, 0x2d4b0c9c0eb4bd0c
+455, 0x61d926270642f1f2
+456, 0x7219c485c23a2377
+457, 0x7e471c752fecd895
+458, 0x23c4d30a4d17ba1f
+459, 0x65cb277fe565ca22
+460, 0xcbb56ed9c701363b
+461, 0xfd04ab3a6eba8282
+462, 0x19c9e5c8bab38500
+463, 0xea4c15227676b65b
+464, 0x20f3412606c8da6f
+465, 0xb06782d3bf61a239
+466, 0xf96e02d5276a9a31
+467, 0x835d256b42aa52a6
+468, 0x25b09151747f39c1
+469, 0x64507386e1103eda
+470, 0x51cbc05716ef88e4
+471, 0x998cd9b7989e81cc
+472, 0x9d7115416bec28d1
+473, 0xc992ca39de97906b
+474, 0xd571e6f7ca598214
+475, 0xafc7fb6ccd9abbf8
+476, 0x88ef456febff7bf4
+477, 0xdbe87ccc55b157d2
+478, 0xaab95e405f8a4f6d
+479, 0xad586a385e74af4f
+480, 0x23cd15225c8485aa
+481, 0x370940bf47900ac7
+482, 0xefd6afda1a4b0ead
+483, 0x9cb1a4c90993dd7a
+484, 0xff7893e8b2f70b11
+485, 0xb09e1807c0638e8e
+486, 0xb10915dcb4978f74
+487, 0x88212ab0051a85eb
+488, 0x7af41b76e1ec793f
+489, 0x2e5c486406d3fefd
+490, 0xebe54eff67f513cc
+491, 0xab6c90d0876a79b8
+492, 0x224df82f93fe9089
+493, 0xc51c1ce053dc9cd2
+494, 0x5ef35a4d8a633ee7
+495, 0x4aca033459c2585f
+496, 0xd066932c6eefb23d
+497, 0x5309768aab9a7591
+498, 0xa2a3e33823df37f9
+499, 0xcec77ff6a359ee9
+500, 0x784dc62d999d3483
+501, 0x84e789fb8acc985d
+502, 0xd590237e86aa60f
+503, 0x737e2ffe1c8ad600
+504, 0xc019c3a39a99eab8
+505, 0x6a39e9836964c516
+506, 0xe0fe43129535d9da
+507, 0xdfc5f603d639d4de
+508, 0x7b9a7d048a9c03b6
+509, 0xbb5aa520faa27fdd
+510, 0x2a09b4200f398fa2
+511, 0x38cc88107904064e
+512, 0xa9a90d0b2d92bb25
+513, 0x9419762f87e987e3
+514, 0x1a52c525153dedcd
+515, 0xc26d9973dd65ae99
+516, 0x8e89bd9d0dc6e6a1
+517, 0x2f30868dc01bfb53
+518, 0x20f09d99b46501c4
+519, 0x78b468a563b8f1e9
+520, 0xcccf34b0b6c380c7
+521, 0xf554e7dc815297e6
+522, 0x332a585cfb4a50ef
+523, 0xa9fb64a2b6da41d7
+524, 0xdcd2a5a337391ce0
+525, 0x8a9bd3e324c6463d
+526, 0x9f4487d725503bdd
+527, 0xf72282d82f1d0ff
+528, 0x308f4160abb72d42
+529, 0x648de1db3a601b08
+530, 0x36cab5192e7ebd39
+531, 0x7975fbe4ab6a1c66
+532, 0xd515b4d72243864e
+533, 0x43a568f8b915e895
+534, 0x15fa9f2057bdb91d
+535, 0x7a43858ef7a222dc
+536, 0x17b4a9175ac074fe
+537, 0xa932c833b8d0f8f8
+538, 0x1d2db93a9a587678
+539, 0x98abd1d146124d27
+540, 0xf0ab0431671740aa
+541, 0xa9d182467540ad33
+542, 0x41c8a6cfc331b7fc
+543, 0xa52c6bd0fcd1d228
+544, 0x2773c29a34dc6fa3
+545, 0x3098230746fc1f37
+546, 0xd63311bb4f23fabe
+547, 0x6712bf530cd2faec
+548, 0x342e8f342e42c4dd
+549, 0xfbd83331851cdcad
+550, 0xe903be1361bbc34d
+551, 0xd94372e5077e3ef9
+552, 0x95aaa234f194bd8
+553, 0x20c0c8fb11e27538
+554, 0xfaf47dc90462b30b
+555, 0x8ddc6d144147682a
+556, 0xf626833fd926af55
+557, 0x5df93c34290d1793
+558, 0xb06a903e6e9fca5e
+559, 0x10c792dc851d77ca
+560, 0xd9b1b817b18e56cb
+561, 0x3a81730c408eb408
+562, 0x65052c04a8d4b63c
+563, 0x3328546598e33742
+564, 0xeca44a13f62d156d
+565, 0x69f83d1d86b20170
+566, 0x937764200412027d
+567, 0xc57eb1b58df0f191
+568, 0xa1c7d67dce81bc41
+569, 0x8e709c59a6a579ce
+570, 0x776a2f5155d46c70
+571, 0xd92906fbbc373aa5
+572, 0xe97ad478a2a98bf6
+573, 0xc296c8819ac815f
+574, 0x613ede67ba70e93e
+575, 0xe145222498f99cde
+576, 0xafcdfa7a3c1cf9bf
+577, 0x1c89252176db670d
+578, 0xad245eda5c0865ff
+579, 0x249463d3053eb917
+580, 0xc9be16d337517c0b
+581, 0xefcc82bf67b8f731
+582, 0x1e01577d029e0d00
+583, 0xad9c24b2a4f3d418
+584, 0xed2cceb510db4d0f
+585, 0xbddadcdb92400c70
+586, 0x67d6b0476ef82186
+587, 0xbc7662ff7bf19f73
+588, 0x9d94452a729e6e92
+589, 0x6b278d8594f55428
+590, 0x6c4b31cceb1b2109
+591, 0xccc6c3a726701e9
+592, 0x6bc28ece07df8925
+593, 0xc0422b7bf150ccc4
+594, 0xab7158f044e73479
+595, 0xdf3347546d9ed83f
+596, 0x3b3235a02c70dff4
+597, 0x2551c49c14ea8d77
+598, 0xee2f7f5bb3cc228e
+599, 0x39b87bfe8c882d39
+600, 0x7dd420fad380b51c
+601, 0xffe64976af093f96
+602, 0x4a4f48dc6e7eaa5f
+603, 0x85f2514d32fdc8cc
+604, 0x1ab1215fd7f94801
+605, 0x4cd1200fc795b774
+606, 0xcf8af463a38942ee
+607, 0x319caa7ce3022721
+608, 0x8cd9798a76d1aea4
+609, 0x2bd3933ac7afd34e
+610, 0x85d4c323403cf811
+611, 0xd7b956d3064efa30
+612, 0x67a078dbf1f13068
+613, 0x665fa6c83e87c290
+614, 0x9333ac2416d2469b
+615, 0xdfb1fd21a0094977
+616, 0xa1962a6e2c25f8ff
+617, 0x1f3b10a7ed5287cf
+618, 0x70641efb3d362713
+619, 0xe527a2cf85d00918
+620, 0x9741e45d3f9890a3
+621, 0x6cb74b5d4d36db4b
+622, 0xf24734d622bd2209
+623, 0xadd6d94f78e9d378
+624, 0xc3bbdb59225cca7f
+625, 0x5ad36614275b30cd
+626, 0x495568dd74eea434
+627, 0xf35de47e0ffe1f2d
+628, 0xefa209dca719ab18
+629, 0x844ddcaeb5b99ae8
+630, 0x37449670a1dc7b19
+631, 0x5a4612c166f845c1
+632, 0xe70f7782f2087947
+633, 0x98d484deac365721
+634, 0x705302198cf52457
+635, 0x7135ae0f5b77df41
+636, 0x342ac6e44a9b6fc3
+637, 0x2713fd2a59af5826
+638, 0x6e1a3f90f84efa75
+639, 0x9fb3b4dd446ca040
+640, 0x530044ae91e6bd49
+641, 0xe984c4183974dc3e
+642, 0x40c1fa961997d066
+643, 0xb7868250d8c21559
+644, 0x8bc929fa085fd1de
+645, 0x7bdb63288dc8733e
+646, 0xac4faad24326a468
+647, 0x1c6e799833aea0b1
+648, 0xcc8a749e94f20f36
+649, 0x4e7abfd0443547c5
+650, 0xb661c73bb8caa358
+651, 0x4a800f5728ff2351
+652, 0x8c15e15189b9f7ed
+653, 0xab367846b811362c
+654, 0x4ba7508f0851ca2a
+655, 0xe9af891acbafc356
+656, 0xbdebe183989601f8
+657, 0x4c665ea496afc061
+658, 0x3ca1d14a5f2ed7c
+659, 0xfbdff10a1027dd21
+660, 0xdfd28f77c8cff968
+661, 0xc4fbaadf8a3e9c77
+662, 0xdac7e448b218c589
+663, 0xb26390b5befd19e2
+664, 0xd2ef14916c66dba9
+665, 0xfab600284b0ff86b
+666, 0xf04a1c229b58dabb
+667, 0xc21c45637e452476
+668, 0xd1435966f75e0791
+669, 0xc1f28522eda4a2d0
+670, 0x52332ae8f1222185
+671, 0x81c6c0790c0bf47e
+672, 0xfebd215e7d8ffb86
+673, 0x68c5dce55dbe962b
+674, 0x231d09cb0d2531d1
+675, 0x3218fba199dbbc6b
+676, 0x8f23c535f8ea0bf6
+677, 0x6c228963e1df8bd9
+678, 0x9843c7722ed153e3
+679, 0xd032d99e419bddec
+680, 0xe2dca88aa7814cab
+681, 0x4d53fb8c6a59cdc2
+682, 0x8fb3abc46157b68b
+683, 0xa3e733087e09b8e
+684, 0x6bdc1aee029d6b96
+685, 0x4089667a8906d65b
+686, 0x8f3026a52d39dd03
+687, 0x6d2e0ccb567bae84
+688, 0x74bad450199e464
+689, 0xf114fb68a8f300d5
+690, 0xc7a5cc7b374c7d10
+691, 0xf0e93da639b279d1
+692, 0xb9943841ad493166
+693, 0x77a69290455a3664
+694, 0x41530da2ebea054b
+695, 0xe8f9fab03ea24abf
+696, 0xaa931f0c9f55a57a
+697, 0xb4d68a75d56f97ae
+698, 0x3d58ff898b6ba297
+699, 0x49d81e08faf5a3f5
+700, 0xfc5207b9f3697f3b
+701, 0xa25911abb3cf19b7
+702, 0x6b8908eb67c3a41
+703, 0xd63ef402e2e3fa33
+704, 0x728e75d3f33b14c5
+705, 0x248cb1b8bc6f379a
+706, 0x3aa3d6d2b8c72996
+707, 0x49cc50bd2d3d2860
+708, 0xb4e1387647c72075
+709, 0x435a1630a4a81ed3
+710, 0xa5ea13005d2460cf
+711, 0xc7a613df37d159ec
+712, 0x95721ccc218b857e
+713, 0xd4b70d8c86b124d3
+714, 0x2b82bcc4b612d494
+715, 0xaf13062885276050
+716, 0xcbd8fcf571a33d9c
+717, 0x3f7f67ca1125fc15
+718, 0xddf4bb45aac81b4c
+719, 0x23606da62de9c040
+720, 0xa3a172375666b636
+721, 0x292f87387a6c6c3c
+722, 0xd1d10d00c5496fe1
+723, 0x86b0411ce8a25550
+724, 0x38e0487872e33976
+725, 0x363e49f88ddfd42c
+726, 0x45bdf1e9f6b66b0a
+727, 0x8a6fff3de394f9b5
+728, 0x8502158bb03f6209
+729, 0x22e24d16dba42907
+730, 0x3fe3ba427cc2b779
+731, 0x77144793f66b3d7e
+732, 0xcf8912ccb29b8af9
+733, 0xdc856caff2abd670
+734, 0xe6d3ae0b0d9d4c8b
+735, 0xb8f5d40e454c539f
+736, 0x79ca953114fbc6b7
+737, 0x478d6f4bbfa38837
+738, 0x9babae1a3ffdc340
+739, 0x40edd56802bae613
+740, 0x97a56c2dcccf0641
+741, 0xafc250257f027f8e
+742, 0x8da41ef1edf69125
+743, 0x6574b0280ff9d309
+744, 0x197c776151b8f820
+745, 0x6b03e077c9dac3b6
+746, 0x24a40ebbc5c341c5
+747, 0x50e585169a6a1c4b
+748, 0x37783a5a6a3e4e02
+749, 0xb3de81ee6fbad647
+750, 0xf4f292f57ca4591e
+751, 0x6214e9e7d44d30a
+752, 0x5920190c56d21c12
+753, 0x9ac163419b5e0c9b
+754, 0xfc2328761ae8ed93
+755, 0xc68f945b545508c6
+756, 0x687c49a17ce0a5e2
+757, 0x276d8f53d30d4ab4
+758, 0x8201804970343ce1
+759, 0x1b5d323cc2e7fb7e
+760, 0x6f351ef04fd904b
+761, 0x6c793a7d455d5198
+762, 0x46f5d108430ae91f
+763, 0xac16a15b2a0cf77f
+764, 0xa0d479d9e4122b9d
+765, 0x3afd94604307f19
+766, 0x2573ed6d39d38dbf
+767, 0xa58e14ba60b4294b
+768, 0xe69c1aed5840d156
+769, 0x4cf6fda7f04855c2
+770, 0x2fb65a56ef5f22da
+771, 0xf95819434d5dc220
+772, 0x29c65133623dafba
+773, 0x8e997bd018467523
+774, 0xfd08ba9d498461a7
+775, 0xdd52243bc78a5592
+776, 0x39c30108f6db88b3
+777, 0x38af8e1894f259b9
+778, 0x97eedf3b4ae5f6de
+779, 0x757825add80c5ece
+780, 0xf0fdd90ac14edb14
+781, 0xbbb19d4cc8cac6d4
+782, 0x9a82234edfae05e3
+783, 0x704401c61d1edf1c
+784, 0x8b0eb481fb3a1fb2
+785, 0xef6f36e7cc06c002
+786, 0x7a208b17e04b8cd7
+787, 0xf20e33d498838fe9
+788, 0xc2bdb22117058326
+789, 0x6ec31939eb4ca543
+790, 0x6f1654838f507a21
+791, 0xc65ab81a955d2b93
+792, 0x40b1420fdd9531b8
+793, 0xe31f221cab9f4f40
+794, 0x798cdd414c1deb7a
+795, 0x9c84e9c7d41cd983
+796, 0x63d6b1ae3b60b7fa
+797, 0xb42bfdd1a2f78ffa
+798, 0x37e431eaccaaa8e9
+799, 0x7508142a0f73eac9
+800, 0x91662a023df5893a
+801, 0x59782070e2fe3031
+802, 0xb2acd589a8ce7961
+803, 0xa224743fa877b292
+804, 0xaa5362aa27e6ed9e
+805, 0xa394a4e520c0c1c7
+806, 0xe49b16d2018ffb6f
+807, 0xb8074b9f2f1e762b
+808, 0xcf5f86143d5c23a7
+809, 0xfd838785db987087
+810, 0x31b1889df389aff8
+811, 0x30aaca876a4383b
+812, 0x1731bb71c4c38d4f
+813, 0x9a83a65395e05458
+814, 0x99cd0c8d67c8f4fc
+815, 0xfbd9fdc849b761a5
+816, 0x82c04834fc466889
+817, 0xdeef9d6e715e8c97
+818, 0x549c281c16da6078
+819, 0x2d70661254ad599d
+820, 0x57995793a72acac
+821, 0xf1727005116183ba
+822, 0xa22bb38945285de3
+823, 0x4f2d687fe45131ff
+824, 0x5666c87ddbbc981f
+825, 0xbcb4b2d4e7a517d0
+826, 0x5e794dd2e20b785d
+827, 0x449ad020149e093c
+828, 0x7704ee0412d106f5
+829, 0x83cbdf257b072ac1
+830, 0xae5c4fc9f638b0da
+831, 0x7b9e5a64e372ed47
+832, 0x7eddbbb22c2cdf57
+833, 0x3f19ebfa155b08e
+834, 0x91d991154dfd7177
+835, 0x611ae74b952d387f
+836, 0x3fdf7a335bda36ee
+837, 0xdf182433fc7a7c05
+838, 0x62c78598d1f8db0a
+839, 0xc3750c69d2c5c1f0
+840, 0xf1318024709efdee
+841, 0xaa3fd360d224dc29
+842, 0x62af53b2f307c19
+843, 0xdf527683c58120c2
+844, 0x3281deecc496f93d
+845, 0x4f704ad31527ef08
+846, 0x127a14a5e07cfdfc
+847, 0x90d0b1f549255c92
+848, 0xbc3406b212c5e1fc
+849, 0x4e89f39379dba91d
+850, 0x1290ef43c4998e6e
+851, 0xecfeb1a1cb1c6e1b
+852, 0x2067e90403003bf1
+853, 0x38ae04be30bdbeba
+854, 0x8a3537f298baedda
+855, 0xd07f3b825cdb2936
+856, 0xea020b5aebae8b45
+857, 0xfcd614ab031132b0
+858, 0x5fb682a4ff2268f5
+859, 0xd1c4662ce65596f4
+860, 0x7026b8270dd0b8dc
+861, 0x8101ec4b4beae45a
+862, 0xa0e9dc87940610a6
+863, 0x83ec33679d83165b
+864, 0x981847ca82e86d41
+865, 0xda84c188a304a0b7
+866, 0x3c37529c5a5bbbb8
+867, 0x34a8491ce3e19a5a
+868, 0xd36ad716a2fa6cb8
+869, 0xfd1d1d6a5189a15c
+870, 0x9716eb47851e8d8d
+871, 0x7dfb13ea3b15c5aa
+872, 0xbdf6e707f45113a5
+873, 0xb8118261b04bd097
+874, 0x6191f9895881bec6
+875, 0x7aac257ae11acf9b
+876, 0x35a491e1537ff120
+877, 0xe078943432efa71c
+878, 0xb3338485dd3dc2b9
+879, 0x456060975d2bb3b5
+880, 0xaddc4c451bdfc44c
+881, 0x18bfa7beacf96430
+882, 0x8802ebcaf0f67498
+883, 0xad922a5a825bd780
+884, 0x9fb4587d748f4efa
+885, 0xdb2a445136cd5e7
+886, 0xb98b3676ea8e96ac
+887, 0xb02d8d244d784878
+888, 0xa1a8442b18860abb
+889, 0x6a3029ba1361e5d1
+890, 0xf426d5fac161eb1
+891, 0xfa5ac2b87acecb23
+892, 0xaa659896e50535df
+893, 0xf40dd7a3d3c5c8ed
+894, 0x3f8367abecb705bc
+895, 0x2d60e7525873358f
+896, 0xc4a9d3948a0c3937
+897, 0x5ecc04fef6003909
+898, 0x7a865004918cba2
+899, 0x47ae110a678ec10b
+900, 0xa0f02f629d91aa67
+901, 0x4848b99e7fac9347
+902, 0xaa858346d63b80ac
+903, 0xeb5bf42ee161eeef
+904, 0x4d35d723d3c6ba37
+905, 0xdf22ca6ca93b64a7
+906, 0x9d198520f97b25b1
+907, 0x3068415350778efe
+908, 0xf3709f2e8793c2fe
+909, 0xd1517bac8dd9f16f
+910, 0xfb99bccaa15861dc
+911, 0xa9ad607d796a2521
+912, 0x55d3793d36bd22e4
+913, 0xf99270d891ff7401
+914, 0x401750a5c4aa8238
+915, 0xd84b3003e6f28309
+916, 0x8a23798b5fa7c98b
+917, 0xadd58bbc8f43e399
+918, 0xbd8c741ada62c6a8
+919, 0xbdc6937bc55b49fa
+920, 0x4aefa82201b8502
+921, 0x17adf29a717b303
+922, 0xa6ed2197be168f6c
+923, 0x1ba47543f4359a95
+924, 0xe34299949ac01ae9
+925, 0x711c76cffc9b62f3
+926, 0xbac259895508a4b7
+927, 0x3c8b3b3626b0d900
+928, 0x1a8d23fbe2ae71bf
+929, 0xca984fa3b5a5c3a1
+930, 0xb1986ab7521a9c93
+931, 0xd6b5b2c8d47a75b5
+932, 0xc7f1c4a88afb4957
+933, 0xdeb58033a3acd6cc
+934, 0xabe49ddfe1167e67
+935, 0x8d559c10205c06e3
+936, 0xea07a1a7de67a651
+937, 0xcbef60db15b6fef8
+938, 0xbfca142cff280e7
+939, 0x362693eba0732221
+940, 0x7463237e134db103
+941, 0x45574ddb5035e17a
+942, 0xfc65e0cb9b94a1aa
+943, 0x3154c55f1d86b36d
+944, 0x2d93a96dd6ab2d8b
+945, 0xbe3bc1d1f2542a25
+946, 0xdd4b541f7385bdaa
+947, 0x3b56b919d914e3f8
+948, 0x82fd51468a21895f
+949, 0x8988cf120731b916
+950, 0xa06a61db5fb93e32
+951, 0x6ed66c1b36f68623
+952, 0x875ae844d2f01c59
+953, 0x17ccd7ac912e5925
+954, 0x12fe2a66b8e40cb1
+955, 0xf843e5e3923ad791
+956, 0xa17560f2fd4ef48
+957, 0x27a2968191a8ee07
+958, 0xa9aab4d22ff44a3c
+959, 0x63cd0dcc3bb083ae
+960, 0x7a30b48c6160bf85
+961, 0x956160fb572503b3
+962, 0xc47f6b7546640257
+963, 0xaf4b625f7f49153
+964, 0x2f5c86a790e0c7e8
+965, 0xb52e0610ae07f0b8
+966, 0x38a589292c3d849e
+967, 0xc3e9ef655d30b4ef
+968, 0xb5695f765cda998a
+969, 0xde5d5e692a028e91
+970, 0x839476721555f72e
+971, 0x48b20679b17d9ebf
+972, 0xe3d4c6b2c26fb0df
+973, 0xce5a9834f0b4e71f
+974, 0x533abb253d5d420e
+975, 0x9eac5ad9aed34627
+976, 0xc0f2a01ab3c90dbb
+977, 0x6528eda93f6a066c
+978, 0xc16a1b625e467ade
+979, 0x1a4a320fb5e8b098
+980, 0x8819cccd8b4ab32f
+981, 0x42daa88531fd0bfd
+982, 0xcf732226409be17c
+983, 0xfddcdb25ccbf378c
+984, 0x9b15b603bf589fc1
+985, 0x2436066b95d366fe
+986, 0x8d42eff2e9cbda90
+987, 0x694b2fc8a4e8303c
+988, 0x8e207f98aaea3ccd
+989, 0x4730d7a620f822d9
+990, 0x468dc9ca30fe2fd4
+991, 0x74b36d8a1c0f031b
+992, 0x3c1aac1c488c1a94
+993, 0x19d0101042444585
+994, 0x8ec50c56d0c8adf4
+995, 0x721ec629e4d66394
+996, 0x3ca5ad93abeac4a4
+997, 0xaaebc76e71592623
+998, 0x969cc319e3ed6058
+999, 0xc0a277e3b2bfc3de
diff --git a/lib/python3.12/site-packages/numpy/random/tests/data/philox-testset-1.csv b/lib/python3.12/site-packages/numpy/random/tests/data/philox-testset-1.csv
new file mode 100644
index 0000000000000000000000000000000000000000..e448cbf73cc0774eca74df0d3d8866d8bd35bab3
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/random/tests/data/philox-testset-1.csv
@@ -0,0 +1,1001 @@
+seed, 0xdeadbeaf
+0, 0xedc95200e2bd66a5
+1, 0x581d4e43b7682352
+2, 0x4be7278f5e373eab
+3, 0xee47f17991a9e7ea
+4, 0x38a7d2ae422f2e2c
+5, 0xe2a6730a3b4a8a15
+6, 0x1588b7a841486442
+7, 0x13ad777246700504
+8, 0x14d157e0f5e18204
+9, 0xd87c22a7ee8c13f1
+10, 0x30cc389ce3542ba1
+11, 0xb8a53348955bb2e9
+12, 0xc08802e3c454f74f
+13, 0xb444f627671a5780
+14, 0x4b6dd42b29cbf567
+15, 0x6109c7dc0bc5f7d5
+16, 0x85c954715d6b5b1e
+17, 0x646178d3d9a3a5d5
+18, 0xebbde42b1cd83465
+19, 0x3d015102f6bc9c1a
+20, 0x720fe2ec3798d5fd
+21, 0x93120961289ceb2e
+22, 0xc9207e960a56fae2
+23, 0xa7f042f31d991b98
+24, 0x5fac117415fae74b
+25, 0xd0a970ba8dddc287
+26, 0x84b4e7e51b43106
+27, 0x6ad02bf525ea265f
+28, 0xcdc7e5992b36ef8f
+29, 0x44d4985209261d60
+30, 0x628c02d50f4b902e
+31, 0xc7b1914922d1e76d
+32, 0xfde99ff895cba51d
+33, 0x175a0be050fa985f
+34, 0x47297d3699e03228
+35, 0xccf1e9aeaa3339cd
+36, 0x9fdd18ebeeaf15b1
+37, 0x7c94c9ab68747011
+38, 0x612d8ef22c1fa80f
+39, 0x13f52b860de89ab5
+40, 0x81f264b8c139c43b
+41, 0x8d017ba4ef1e85ba
+42, 0x6d0556f46219951e
+43, 0x8ee7b85663cf67b6
+44, 0x2432fc707645fe67
+45, 0xaf814046051e5941
+46, 0x4d432a83739ac76f
+47, 0x59e5060d0983ccdd
+48, 0xdd20e828b83d9b53
+49, 0x1b891800d7385f4c
+50, 0x10e86a026c52ff5e
+51, 0xb932f11723f7b90c
+52, 0xb2413d0a1f3582d0
+53, 0xe7cd4edda65fc6b5
+54, 0x6d3808848d56593b
+55, 0x192a727c3c7f47d9
+56, 0x9659d8aea5db8c16
+57, 0x4242c79fe2c77c16
+58, 0x605f90c913827cea
+59, 0x53e153c8bfc2138a
+60, 0xed2158fbdef5910e
+61, 0xae9e6e29d4cb5060
+62, 0x7dd51afaad3b11ce
+63, 0x2b9ba533d01a5453
+64, 0x7e0e9cf2b6c72c8
+65, 0x1cc8b3c7747ed147
+66, 0x9b102651e2e11b48
+67, 0x30b0b53cbaac33ea
+68, 0x70c28aec39b99b85
+69, 0x5f1417ff536fdb75
+70, 0x3a1d91abd53acf58
+71, 0xba116a1772168259
+72, 0xf5369bc9bd284151
+73, 0x67bf11373bf183ca
+74, 0xef0b2d44dbd33dc7
+75, 0xbfd567ee1a2953ed
+76, 0x7d373f2579b5e5c6
+77, 0x756eeae7bcdd99be
+78, 0x75f16eb9faa56f3b
+79, 0x96d55ded2b54b9a5
+80, 0x94495191db692c24
+81, 0x32358bdd56bab38c
+82, 0x3f6b64078576579
+83, 0x7177e7948bc064c9
+84, 0x2cbf23f09ba9bc91
+85, 0x9b97cc31c26645f5
+86, 0x5af2d239ff9028b1
+87, 0x316fa920e0332abe
+88, 0x46535b7d1cae10a0
+89, 0x21f0a6869298022c
+90, 0xf395c623b12deb14
+91, 0x8573995180675aa7
+92, 0xc3076509f4dc42d5
+93, 0x15e11e49760c6066
+94, 0xe8a6d311e67a021d
+95, 0x7482f389c883339b
+96, 0xda6f881573cba403
+97, 0xb110ffb847e42f07
+98, 0x2c3393140605ccf9
+99, 0xba1c8ba37d8bdc33
+100, 0x59adf43db7a86fe0
+101, 0xb4fcbf6aa585ca85
+102, 0xd794a93c18033fa6
+103, 0x6e839c01985f9d4
+104, 0x64065bf28222b2c7
+105, 0x6a6359b293fa0640
+106, 0x5ff610969e383e44
+107, 0xa8172c263f05c7f7
+108, 0x62a0172e8bd75d07
+109, 0x7be66e3c453b65ac
+110, 0x6a3b8d5a14014292
+111, 0xa2583e6087450020
+112, 0xd5d3ecc480c627d2
+113, 0xa24e83f1eec8a27c
+114, 0xa23febd2a99ee75a
+115, 0x9a5fbf91c7310366
+116, 0x5b63156932e039b
+117, 0x942af3c569908505
+118, 0x89a850f71ab6a912
+119, 0xfeadc803ac132fe9
+120, 0x67bf60e758250f3
+121, 0x533c25103466a697
+122, 0xb7deede3482f9769
+123, 0x325e043b53bba915
+124, 0x9e8d9e7fde132006
+125, 0x6bacc6860bbc436e
+126, 0xb3ea0534c42b1c53
+127, 0xb2389334db583172
+128, 0xa74b1bfbf5242ee4
+129, 0x53a487e2dc51d15c
+130, 0xe5a3b538d2c7a82e
+131, 0x7b6c70bb0c4cadaf
+132, 0xae20791b2081df1
+133, 0xc685c12e3c61d32c
+134, 0x60110e6b0286e882
+135, 0x49682119c774045c
+136, 0x53dc11a3bbd072e
+137, 0xbdc87c6e732d9c2d
+138, 0xcc4620861ebac8fd
+139, 0x7e9c3558759350cc
+140, 0x157408dee34891ba
+141, 0x9bcad1855b80651b
+142, 0xd81b29141d636908
+143, 0x1ed041a9f319c69d
+144, 0x805b2f541208b490
+145, 0x484ef3bba2eb7c66
+146, 0xb6b5e37d50a99691
+147, 0xabc26a7d9e97e85f
+148, 0xcba2a3cce0417c2f
+149, 0xa030dfffd701993c
+150, 0x2bf2dc50582ebf33
+151, 0xd9df13dd3eb9993e
+152, 0x31ca28b757232ae5
+153, 0x614562a0ccf37263
+154, 0x44d635b01725afbb
+155, 0x5ae230bc9ca9cd
+156, 0xb23a124eb98705c6
+157, 0x6395675444981b11
+158, 0xd97314c34119f9ca
+159, 0x9de61048327dd980
+160, 0x16bac6bded819707
+161, 0xcea3700e3e84b8c7
+162, 0xaa96955e2ee9c408
+163, 0x95361dcc93b5bc99
+164, 0x306921aed3713287
+165, 0x4df87f3130cd302a
+166, 0x37c451daeb6a4af5
+167, 0x8dbbe35f911d5cc1
+168, 0x518157ce61cb10f9
+169, 0x669f577aebc7b35b
+170, 0x4b0a5824a8786040
+171, 0x519bc3528de379f5
+172, 0x6128012516b54e02
+173, 0x98e4f165e5e6a6dd
+174, 0x6404d03618a9b882
+175, 0x15b6aeb3d9cd8dc5
+176, 0x87ed2c1bae83c35b
+177, 0x8377fc0252d41278
+178, 0x843f89d257a9ba02
+179, 0xcdda696ea95d0180
+180, 0xcfc4b23a50a89def
+181, 0xf37fd270d5e29902
+182, 0xafe14418f76b7efa
+183, 0xf984b81577076842
+184, 0xe8c60649ccb5458d
+185, 0x3b7be8e50f8ff27b
+186, 0xaa7506f25cef1464
+187, 0x5e513da59f106688
+188, 0x3c585e1f21a90d91
+189, 0x1df0e2075af292a
+190, 0x29fdd36d4f72795f
+191, 0xb162fe6c24cb4741
+192, 0x45073a8c02bd12c4
+193, 0xcbaaa395c2106f34
+194, 0x5db3c4c6011bc21c
+195, 0x1b02aac4f752e377
+196, 0xa2dfb583eb7bec5
+197, 0xfe1d728805d34bb1
+198, 0xf647fb78bb4601ec
+199, 0xd17be06f0d1f51ef
+200, 0x39ec97c26e3d18a0
+201, 0xb7117c6037e142c8
+202, 0xe3a6ce6e6c71a028
+203, 0xe70a265e5db90bb2
+204, 0x24da4480530def1e
+205, 0xfd82b28ce11d9a90
+206, 0x5bf61ead55074a1d
+207, 0xbe9899c61dec480d
+208, 0xae7d66d21e51ec9e
+209, 0x384ee62c26a08419
+210, 0x6648dccb7c2f4abf
+211, 0xc72aa0c2c708bdc9
+212, 0x205c5946b2b5ba71
+213, 0xd4d8d0b01890a812
+214, 0x56f185493625378d
+215, 0x92f8072c81d39bd0
+216, 0xa60b3ceecb3e4979
+217, 0xfcf41d88b63b5896
+218, 0xf5a49aa845c14003
+219, 0xffcc7e99eee1e705
+220, 0xdd98312a7a43b32d
+221, 0xa6339bd7730b004
+222, 0xdac7874ba7e30386
+223, 0xadf6f0b0d321c8
+224, 0x126a173ae4ffa39f
+225, 0x5c854b137385c1e7
+226, 0x8173d471b1e69c00
+227, 0x23fa34de43581e27
+228, 0x343b373aef4507b1
+229, 0xa482d262b4ea919c
+230, 0xf7fbef1b6f7fbba
+231, 0xd8ce559487976613
+232, 0xbf3c8dd1e6ebc654
+233, 0xda41ed375451e988
+234, 0xf54906371fd4b9b3
+235, 0x5b6bb41231a04230
+236, 0x866d816482b29c17
+237, 0x11315b96941f27dc
+238, 0xff95c79205c47d50
+239, 0x19c4fff96fbdac98
+240, 0xbfb1ae6e4131d0f4
+241, 0x9d20923f3cdb82c9
+242, 0x282175507c865dff
+243, 0xdfd5e58a40fe29be
+244, 0xedbd906ff40c8e4f
+245, 0x11b04fc82614ccb3
+246, 0xeceb8afda76ae49f
+247, 0xa4856913847c2cdf
+248, 0x6f1425f15a627f2a
+249, 0xdf144ffedf60349e
+250, 0x392d7ecfd77cc65f
+251, 0x72b8e2531049b2c6
+252, 0x5a7eb2bdb0ec9529
+253, 0xdcfd4306443e78c1
+254, 0x89ad67ed86cd7583
+255, 0x276b06c0779a6c8f
+256, 0xb2dbb723196a0ac3
+257, 0x66c86a3b65906016
+258, 0x938348768a730b47
+259, 0x5f5282de938d1a96
+260, 0xa4d4588c4b473b1f
+261, 0x8daed5962be4796f
+262, 0x9dde8d796985a56e
+263, 0x46be06dbd9ed9543
+264, 0xdf98286ceb9c5955
+265, 0xa1da1f52d7a7ca2b
+266, 0x5a7f1449f24bbd62
+267, 0x3aedc4e324e525fd
+268, 0xced62464cd0154e1
+269, 0x148fc035e7d88ce3
+270, 0x82f8878948f40d4c
+271, 0x4c04d9cdd6135c17
+272, 0xdf046948d86b3b93
+273, 0x2f0dec84f403fe40
+274, 0xa61954fb71e63c0d
+275, 0x616d8496f00382e8
+276, 0x162c622472746e27
+277, 0x43bcfe48731d2ceb
+278, 0xff22432f9ff16d85
+279, 0xc033ed32bb0ad5a4
+280, 0x5d3717cc91c0ce09
+281, 0x7a39a4852d251075
+282, 0x61cd73d71d6e6a6
+283, 0xe37e2ea4783ab1a5
+284, 0x60e1882162579ea8
+285, 0x9258ec33f1a88e00
+286, 0x24b32acf029f0407
+287, 0x1410fc9aea6d3fac
+288, 0x6054cf2a3c71d8f7
+289, 0x82f7605157a66183
+290, 0x3b34c1c0dff9eac5
+291, 0xfebe01b6d5c61819
+292, 0x7372187c68b777f2
+293, 0xc6923812cda479f0
+294, 0x386613be41b45156
+295, 0x92cfebe8cc4014b
+296, 0x8e13c4595849828b
+297, 0x90e47390d412291f
+298, 0x6b21a1d93d285138
+299, 0xbf5b1f5922f04b12
+300, 0x21e65d1643b3cb69
+301, 0xf7683b131948ac3c
+302, 0xe5d99fc926196ed2
+303, 0x7b138debbec90116
+304, 0x8a2650a75c2c2a5c
+305, 0x20689a768f9b347b
+306, 0xdfa2900cfb72dc6e
+307, 0x98959c3855611cc2
+308, 0x5fdb71b89596cc7c
+309, 0x1c14ac5c49568c7b
+310, 0x958c4293016091fe
+311, 0x7484522eb0087243
+312, 0xc4018dfb34fc190f
+313, 0xca638567e9888860
+314, 0x102cd4805f0c0e89
+315, 0xcc3bc438e04548f8
+316, 0xb808944bb56ea5be
+317, 0xffd4778dbf945c57
+318, 0xfe42617784c0233b
+319, 0x3eccbfeae9b42d3c
+320, 0xd9f1b585fd0bfa60
+321, 0x5c063d1b2705d5dd
+322, 0x8e8bec3519941b64
+323, 0x9e94c36cbec2a42
+324, 0x1cd19f5b64ffd3ad
+325, 0x9632e3aebfc68e66
+326, 0x98960c2d9da4ae45
+327, 0xb76994b1f2bbfc1f
+328, 0xca184a737d3971cc
+329, 0x964d31b07183adfb
+330, 0xe9e0ff351cd276d4
+331, 0xb5747c860b05bbe4
+332, 0x5549ddc3bd3862e2
+333, 0x495496677b27873b
+334, 0x53910baa26e3ea18
+335, 0xaa07a07ad0a688d3
+336, 0xbb43bd1f09ecdb1e
+337, 0xe2ebc105699dd84
+338, 0x6e815a2729584035
+339, 0x2caab1713b17948a
+340, 0x43d39d209fa41c90
+341, 0xfe3e71089d5d1c3a
+342, 0xa778646c32f81177
+343, 0x8d42bfb86e6e92d5
+344, 0x175571f70b4fcfbe
+345, 0x2a66a6fe10dc3b5b
+346, 0xd9545e85235ca709
+347, 0x5642781c77ced48a
+348, 0x24facc40b72ccd09
+349, 0xa800fbacce33f6f8
+350, 0x675f58a0ff19fba
+351, 0x35aedf57bb5cde1b
+352, 0xe5535a6b63f6d068
+353, 0x84dffd0102aaa85d
+354, 0x621faad65467aaa7
+355, 0x596ad85b556b112f
+356, 0x837545fff8894c7a
+357, 0x3d9a4ae1356bc6a6
+358, 0xcd8b7153205d4ad0
+359, 0x98afdd40f1ed09a6
+360, 0xa38b2dc55a5cf87f
+361, 0x484aecce2b6838bc
+362, 0x6af05c26bdab18d9
+363, 0xf418b7399dcf2e4b
+364, 0x1cfa38789b0d2445
+365, 0xfbed23c34166ee67
+366, 0x38e6820039e4912a
+367, 0x1fe94911e963591e
+368, 0x1291c79aee29ad70
+369, 0x65eccfc89506f963
+370, 0x7d14de3b2f55b1f6
+371, 0x82eb79c36cd2a739
+372, 0x41ffe3b75ea0def5
+373, 0x9eba9156470a51d9
+374, 0xd17c00b981db37d1
+375, 0xf688769a75601aa7
+376, 0xbcf738e9e03d571e
+377, 0x14712e56df8f919b
+378, 0xab14e227d156e310
+379, 0xf53d193e993e351e
+380, 0x857fae46bd312141
+381, 0xc2dd71e41b639966
+382, 0x74f8b987a3d00ad1
+383, 0x5bce8526dc527981
+384, 0x94910926c172a379
+385, 0x503c45557688a9d5
+386, 0x244d03834e05807f
+387, 0x6e014cbab9c7a31f
+388, 0xae544c638530facf
+389, 0x9b853aaaf9cbc22d
+390, 0xfb42ab7024d060ed
+391, 0x74cc3fba0dfd7ff2
+392, 0x24ec9e8f62144ad5
+393, 0x72f082954307bbe7
+394, 0x36feda21bbf67577
+395, 0x3222191611b832f1
+396, 0xd0584e81bcac8b0b
+397, 0xdce8d793ef75e771
+398, 0x978824c6c2578fc
+399, 0x6e8f77503b3c2ee4
+400, 0xc85d2d86fecf5d03
+401, 0x3d35b4a5d4d723c4
+402, 0xd3987dfd4727fff3
+403, 0xd3cde63fb6a31add
+404, 0xf6699e86165bdaeb
+405, 0x9d60ba158ec364c4
+406, 0x920c3c18b346bfc9
+407, 0x770fd1fdfbc236ca
+408, 0x45998cfc5fc12ddd
+409, 0xd74a3454e888834b
+410, 0xbf2aa68081a4a28f
+411, 0xea41b26a6f1da1b3
+412, 0x5560a2d24b9d5903
+413, 0xe3791f652a228d8b
+414, 0x365116d3b5a8520c
+415, 0xb1b2bd46528f8969
+416, 0xfcfe14943ef16ae7
+417, 0xf4d43425e8a535dc
+418, 0xe6cf10a78782a7e0
+419, 0x9c7ac0de46556e3e
+420, 0xc667ae0856eed9ef
+421, 0x47dbb532e16f9c7e
+422, 0xdf4785a5d89ee82e
+423, 0xbd014925ce79dbcf
+424, 0xea0d663fb58fa5be
+425, 0x51af07d5cc3821fb
+426, 0x27a1bdcdc4159a9d
+427, 0x520c986c59b1e140
+428, 0x50b73fd9bacd5b39
+429, 0xae5240641f51e4f3
+430, 0x71faecc164ed9681
+431, 0xda95aa35529a7ee
+432, 0xe25ba29b853c1c6d
+433, 0x9871a925cda53735
+434, 0xde481ad8540e114d
+435, 0xa2997f540e8abca0
+436, 0xc9683c5035e28185
+437, 0x1082471b57182bac
+438, 0xbd3ecf0f0b788988
+439, 0xf479760776fbb342
+440, 0x3730929200d91f44
+441, 0xc1762d79ae72809c
+442, 0xfaa0a4c7b1686cb3
+443, 0xd581e6d55afdafcd
+444, 0x6cf57bdfba2dcf6d
+445, 0xdef79d9fe6a5bcef
+446, 0x13ed376e18132bd3
+447, 0xbe67efd72defa2a
+448, 0x5acc176c468966ea
+449, 0x8b35b626af139187
+450, 0x446de3fac0d973ac
+451, 0xe1d49e06dc890317
+452, 0x817bc3fd21fc09b7
+453, 0xb71c3958a13d5579
+454, 0x8746e010f73d7148
+455, 0x1b61c06009922e83
+456, 0xba17e62e6b092316
+457, 0x1375fa23c4db8290
+458, 0x3f071230f51245a6
+459, 0x51c99a086a61cd13
+460, 0x5f0f2ae78589e1fd
+461, 0x604834e114bbbc27
+462, 0x5eb2a7a34814e9a9
+463, 0x77a6907f386bf11e
+464, 0x99525de2bd407eeb
+465, 0xb818348c57b3b98f
+466, 0x25f5f9e702fbe78d
+467, 0x8f66669e6f884473
+468, 0x1e47d46e2af4f919
+469, 0xf6a19df846476833
+470, 0xff00c67bcd06621f
+471, 0xe3dfe069795d72d8
+472, 0x8affc88b2fea4d73
+473, 0x66df747e5f827168
+474, 0xf368ec338d898a0e
+475, 0x9e1f1a739c5984a2
+476, 0x46a1c90e1ca32cbc
+477, 0xc261bc305ed8d762
+478, 0x754d7949f7da9e72
+479, 0x4c8fbbb14ef47b17
+480, 0xccbdc67a3848d80d
+481, 0x3c25e6f58bae751d
+482, 0x7078b163b936d9b6
+483, 0x440e27463c134ecf
+484, 0x6c83ee39f324db0f
+485, 0x27cf901b22aea535
+486, 0x57262dec79a3f366
+487, 0x91db09f1dbb524fb
+488, 0xd7436eefba865df2
+489, 0x16c86b0a275a3f43
+490, 0x689493e6681deaa9
+491, 0x7e1dc536c1a9ac42
+492, 0x1145beac3ac7f5cc
+493, 0x3d05e211a104b2b0
+494, 0x4f9e77ced3c52f44
+495, 0x53de1369354add72
+496, 0x1fb60f835f47cdeb
+497, 0x6ab36f089e40c106
+498, 0xaabffcb0d3d04c7
+499, 0xaa399686d921bd25
+500, 0x2bf8dd8b6d6fa7f0
+501, 0x1ddbf4e124329613
+502, 0x466a740241466a72
+503, 0x98d7381eb68a761
+504, 0x817691510bc4857a
+505, 0x8837622c0171fe33
+506, 0xcba078873179ee16
+507, 0x13adad1ab7b75af4
+508, 0x3bac3f502428840c
+509, 0xbeb3cce138de9a91
+510, 0x30ef556e40b5f0b4
+511, 0x19c22abdf3bbb108
+512, 0x977e66ea4ddc7cf
+513, 0x9f4a505f223d3bf3
+514, 0x6bc3f42ac79ec87b
+515, 0x31e77712158d6c23
+516, 0x6d8de4295a28af0d
+517, 0xee1807dbda72adb7
+518, 0xda54140179cd038f
+519, 0x715aa5cdac38e062
+520, 0x5a7e55e99a22fa16
+521, 0xf190c36aa8edbe4f
+522, 0xccadd93a82c1d044
+523, 0x7070e6d5012c3f15
+524, 0x50a83341a26c1ba5
+525, 0x11bca7cc634142e5
+526, 0x623a0d27867d8b04
+527, 0x75c18acff54fbf6e
+528, 0x455ae7d933497a6f
+529, 0xf624cf27d030c3d3
+530, 0x7a852716f8758bac
+531, 0xe7a497ac1fa2b5b4
+532, 0xf84f097498f57562
+533, 0xc4bb392f87f65943
+534, 0x618e79a5d499fbfb
+535, 0xb3c0b61d82b48b8
+536, 0x4750a10815c78ea7
+537, 0x9cf09cca3ddece69
+538, 0x2a69f1c94cc901a2
+539, 0x347a0e446e1ce86d
+540, 0xb06f3a5a5ab37bb1
+541, 0x8035bd0713d591db
+542, 0x539c9637042c3a1f
+543, 0xd7ba4dc6b273cbd7
+544, 0x12f3f99933444f85
+545, 0x4a9517b9783fb9a4
+546, 0x6422b2ea95093bc5
+547, 0x3a5ecff0f996c2a6
+548, 0x31de504efc76a723
+549, 0x7ccb7c5233c21a9f
+550, 0xc687d9e6ce4186e8
+551, 0x6e40769d6940376a
+552, 0xf51207314f1f7528
+553, 0x67ee3acb190865e3
+554, 0xe08d586270588761
+555, 0xe387fa489af1a75c
+556, 0x73414a52d29d8375
+557, 0x671a38191cf2a357
+558, 0xe00fb25b1aa54008
+559, 0x11a0610e22cf549b
+560, 0xc90cc865d57c75be
+561, 0x90d0863cc15f2b79
+562, 0x8b3e60d32ebcb856
+563, 0xb28cc55af621e04a
+564, 0xcf60bd3cb2a5ab1d
+565, 0x212cb5d421948f86
+566, 0xee297b96e0a3363f
+567, 0x4e9392ff998760d1
+568, 0x61940c8d0105ba3e
+569, 0x14ebcbae72a59a16
+570, 0xdf0f39a3d10c02af
+571, 0xfc047b2b3c1c549d
+572, 0x91718b5b98e3b286
+573, 0x9ea9539b1547d326
+574, 0x7a5a624a89a165e6
+575, 0x145b37dcaa8c4166
+576, 0x63814bbb90e5616c
+577, 0xc4bc3ca6c38bb739
+578, 0x853c3a61ddc6626c
+579, 0xa7ce8481c433829a
+580, 0x8aff426941cc07b
+581, 0x2dc3347ca68d8b95
+582, 0xce69f44f349e9917
+583, 0x2fa5cb8aca009b11
+584, 0xf26bb012115d9aca
+585, 0xafa01c2f2d27235a
+586, 0xabcba21f1b40305e
+587, 0xfec20c896c0c1128
+588, 0xc5f7a71ebacadfa0
+589, 0xc8479ad14bab4eef
+590, 0xad86ec9a3e7d3dc
+591, 0xbbecd65292b915c5
+592, 0xb1f9e28149e67446
+593, 0x708d081c03dad352
+594, 0xaa8a84dbd1de916c
+595, 0x9aa3efb29ba9480b
+596, 0xd3c63969ff11443e
+597, 0x1e9e9ac861315919
+598, 0x4fe227f91e66b41d
+599, 0xefc0212d43d253ab
+600, 0x98341437727c42d1
+601, 0x5ea85c0fe9008adc
+602, 0x7891b15faa808613
+603, 0x32db2d63989aacfd
+604, 0xc92f7f28e88fd7bc
+605, 0x3513545eb6549475
+606, 0x49abe0082906fbf8
+607, 0xcee1e1a6551e729c
+608, 0x38556672b592a28e
+609, 0xc3e61409c4ec2d45
+610, 0x96c67ce2995a0fd4
+611, 0x9b9b0cada870293
+612, 0x82d6dd5dada48037
+613, 0xeea4f415299f1706
+614, 0x371107895f152ab3
+615, 0x2f6686159f4396bb
+616, 0x61005a2ff3680089
+617, 0x9d2f2cafb595e6b6
+618, 0x4a812a920f011672
+619, 0x317554d3a77385d7
+620, 0x24c01086727eb74b
+621, 0xa15ff76d618a3a9e
+622, 0x2121bfd983859940
+623, 0x384d11577eea8114
+624, 0xab0f4299f3c44d88
+625, 0x136fd4b07cfa14d9
+626, 0x665fe45cbfaa972a
+627, 0x76c5a23398a314e9
+628, 0x5507036357ccda98
+629, 0xd9b8c5ac9dce632b
+630, 0x366bc71781da6e27
+631, 0xdd2b2ba1d6be6d15
+632, 0xf33ed0d50ea6f1a6
+633, 0xf05a9b1900174c18
+634, 0x3947e1419e2787cf
+635, 0x6c742b1e029637d0
+636, 0x32aba12196a0d2e8
+637, 0x1b94aab2e82e7df
+638, 0x68b617db19229d6
+639, 0x6c88a95ac0a33f98
+640, 0xdc9b95fd60c2d23e
+641, 0x999e6971d3afc8b3
+642, 0x7071fc6ad8b60129
+643, 0x41a8184ef62485f6
+644, 0xb68e0605c7d5e713
+645, 0x272b961a1d1bbee
+646, 0x23f04e76446187b0
+647, 0x999a7a8f6d33f260
+648, 0xdbd6318df4f168d
+649, 0x8f5e74c84c40711e
+650, 0x8ccc6b04393a19d6
+651, 0xadcd24b782dd8d3d
+652, 0x1a966b4f80ef9499
+653, 0xcb6d4f9ff5a280f0
+654, 0x8095ff2b8484018a
+655, 0xbfd3389611b8e771
+656, 0x278eb670b7d12d51
+657, 0x31df54ca8d65c20f
+658, 0x121c7fb38af6985e
+659, 0x84fb94f38fe1d0a
+660, 0x15ae8af1a6d48f02
+661, 0x8d51e4a62cba1a28
+662, 0x58e6b6b3ae0f9e42
+663, 0x9365a0a85669cc99
+664, 0xe56e92f65a2106df
+665, 0x68fa299c66b428fc
+666, 0x55e51bb0b0a832c6
+667, 0x48b565293f9bc494
+668, 0x73d8132b1cbabb57
+669, 0x9178ac3926c36cbc
+670, 0xe2f22c7b28ea5e0f
+671, 0x6af45322a99afb12
+672, 0x59072fcb486a46f4
+673, 0x166b717b08d3d8e
+674, 0xd4e627a2dfacc4ab
+675, 0x33dad6f2921dedaa
+676, 0x4b13b806834a6704
+677, 0xe5f7971b398ed54d
+678, 0x20bfae65e3e6899b
+679, 0x881dab45d2b4fc98
+680, 0x6f248126b5b885be
+681, 0x7aeb39e986f9deee
+682, 0xf819f9574b8c3a03
+683, 0xff3d93ed6bd9781a
+684, 0x3a31e2e24a2f6385
+685, 0x7888a88f8944a5e
+686, 0x4faee12f5de95537
+687, 0x7f3e4efccdb2ed67
+688, 0x91e0f2fc12593af5
+689, 0xb5be8a4b886a40d3
+690, 0x998e8288ac3a9b1b
+691, 0x85c48fc8b1349e7b
+692, 0xf03af25222d8fae5
+693, 0x45467e805b242c2e
+694, 0xa2350db793dbebdc
+695, 0xfebe5b61d2174553
+696, 0xa9a331f02c54ad0b
+697, 0xe94e49a0f905aef3
+698, 0xe54b4c812b55e3da
+699, 0xdc454114c6bc0278
+700, 0x99c7765ab476baa2
+701, 0xccd9590e47fdff7c
+702, 0xfa2bcae7afd6cb71
+703, 0x2c1bf1a433a6f0f7
+704, 0x53882c62ff0aab28
+705, 0x80ac900f844dacc
+706, 0x27ba8eb5c4a44d54
+707, 0x78f3dfb072a46004
+708, 0x34e00e6ec629edce
+709, 0x5b88d19b552d1fbd
+710, 0xe4df375dc79df432
+711, 0x37446312ff79c3b4
+712, 0xb72256900a95fa6d
+713, 0x89f3171fbdff0bfc
+714, 0xd37885b048687eba
+715, 0xbb033213b283b60e
+716, 0xcf10b523ee769030
+717, 0xbf8070b6cfd7bafb
+718, 0xb7194da81fd1763b
+719, 0xbfc303de88e68d24
+720, 0xb949c7a5aea8a072
+721, 0x844216e7bae90455
+722, 0xf1e7f20840049a33
+723, 0x96e3263ad0cae794
+724, 0x10772d51f6e9ba49
+725, 0xcea24fccae9d23b3
+726, 0xefd378add9dde040
+727, 0xba0c7c5275805976
+728, 0x2e2a04608f64fa8c
+729, 0xafb42ec43aa0fa7
+730, 0x30444b84241ac465
+731, 0x19ef384bac4493ab
+732, 0xfd1ac615d3ba5ab9
+733, 0x6cc781ba38643aff
+734, 0x30ff27ebed875cfd
+735, 0xee1a261aca97ae62
+736, 0xc5a92715202bc940
+737, 0x9e6ec76f93c657ff
+738, 0x9b9fd55f55191ca5
+739, 0x654b13af008d8f03
+740, 0x1b7f030d9bd0719f
+741, 0x6d622e277550cb7f
+742, 0x3f8ee6b8830d0538
+743, 0x475462bcd0de190f
+744, 0x21380e8a513bdbcd
+745, 0x629bf3771b1bd7a4
+746, 0x3b5fd0b62c353709
+747, 0xf95634006ec3867e
+748, 0x1be8bb584a6653c2
+749, 0x2e2d3cfa85320ce8
+750, 0x5b904b692252d11d
+751, 0x4bfd76631d527990
+752, 0xc019571ca2bec4a0
+753, 0xf2eb730cea4cd751
+754, 0xd4571d709530191a
+755, 0x3b5bd947061f5a7d
+756, 0x56e2322cd2d1d1c0
+757, 0xa8830a5f62019f83
+758, 0x901d130c1b873cf3
+759, 0xb5dd29b363c61299
+760, 0xbb710bec3a17b26d
+761, 0xc0c464daca0f2328
+762, 0x4dc8055df02650f5
+763, 0x3d3cd9bbe8b957af
+764, 0xdb79612c2635b828
+765, 0xe25b3a8ad8fa3040
+766, 0xd5875c563cbf236b
+767, 0x46861c1c3849c9bc
+768, 0xf84bf1a2814dff43
+769, 0x6d8103902e0ad5e6
+770, 0x99f51c9be8af79e5
+771, 0xb0bfa8540ff94a96
+772, 0xaf45109a4e06f7d0
+773, 0x281df3e55aea9bfc
+774, 0x6a1155ca8aa40e60
+775, 0x754d32c5de1f5da
+776, 0xce1eafb1c6ca916f
+777, 0xc4f2185fa8577bd1
+778, 0x4a188e9bdb5501d9
+779, 0xbb14107e99bd5550
+780, 0xf0381d8425ec2962
+781, 0x213dbfffc16ec4f6
+782, 0x7a999c5a28ea65bc
+783, 0x23758c2aba7709ff
+784, 0xea7e4bb205e93b44
+785, 0x9c5a31e53911c658
+786, 0x7f04d0bbdc689ddc
+787, 0xe3ed89ab8d78dcb3
+788, 0x73c38bfb43986210
+789, 0x740c7d787eb8e158
+790, 0x5284fafdfb3fb9ec
+791, 0x2e91a58ac1fb1409
+792, 0xb94a600bf0a09af3
+793, 0x533ea4dbe07d81dd
+794, 0x48c3f1a736b3c5fd
+795, 0x56ae3499fa8720ce
+796, 0x526f2def663ca818
+797, 0x2f085759c65665c4
+798, 0xf715f042c69e0db4
+799, 0x110889c399231e60
+800, 0x64584a244866f3a0
+801, 0xf02ec101a39405d3
+802, 0xe73cd5e9a7f17283
+803, 0xfea64869e7028234
+804, 0x97559974ad877891
+805, 0xc8695aba1dc9f2e5
+806, 0x7b62b76ffc2264ec
+807, 0xf5e1df172ec5ccd
+808, 0xafaeb68765e443bd
+809, 0xd3870eb2e8337623
+810, 0x4f944d684138fb39
+811, 0x6977c575038916ad
+812, 0x8ada1a225df95a56
+813, 0xe4044c6c58d15e54
+814, 0x4e5121366681cf2
+815, 0xcf8640b079357b0d
+816, 0xcd5b157d44106fa3
+817, 0x9d7a5481279e25a1
+818, 0xe10e9db41fb4b34f
+819, 0x1052607be1eadff9
+820, 0x3403d67232fe2265
+821, 0xac9358f498c34afc
+822, 0x820172da0dc39c9
+823, 0xe186e91a3b826b6a
+824, 0x1a838e2a40284445
+825, 0x1870b617ebd7bce6
+826, 0xcb7cba4424be1ed7
+827, 0x6a2e56e40fdf9041
+828, 0xace93bbe108f97ee
+829, 0xfeb9bc74ac41ca08
+830, 0x8cb2d05b0f6a1f51
+831, 0x73792309f3fac0a9
+832, 0x2507343d431308ca
+833, 0xd0ea1197be615412
+834, 0xb1870812f1d2fa94
+835, 0x6d067b6935dcd23e
+836, 0xaf161014e5492c31
+837, 0xd4be0dce97064be4
+838, 0xf8edfe3fc75c20f1
+839, 0x894751dc442d2d9c
+840, 0xb4a95f6a6663456c
+841, 0x74e93162e2d805db
+842, 0x784bc5f3a7a2f645
+843, 0xd234d7c5b0582ea9
+844, 0x491f28d0ab6cb97c
+845, 0xa79419e5cf4336c3
+846, 0x66b00141978c849
+847, 0xa7ddbd64698d563f
+848, 0xefc33a4a5d97d4b2
+849, 0x95075514a65aebdc
+850, 0x40eca5b3e28cd25e
+851, 0x90ec7d00e9c9e35d
+852, 0x63e84104d5af417a
+853, 0xdaca0ea32df5744
+854, 0x7ed54f2587795881
+855, 0x5a73931760af4ee0
+856, 0x857d1a185a3081ec
+857, 0x6eac2aabe67fb463
+858, 0xd1f86155d8bfc55f
+859, 0x6d56398f3e7877ef
+860, 0x7642f61dfc62bc17
+861, 0x1d76b12843246ffa
+862, 0xde7817809b8a31d0
+863, 0xbcca9cd091198f9d
+864, 0xf71ca566dddcdfd4
+865, 0xea4386ee8b61d082
+866, 0xe351729d6010bac4
+867, 0xfd685d8a49910dd6
+868, 0xa7a20ea6c686bd3
+869, 0x1cdaf82f4dbd5536
+870, 0xa3da1d1e77dda3e0
+871, 0x4f723b3818ff8b2a
+872, 0x1290669eca152469
+873, 0xb54158b52d30651b
+874, 0xc06b74f2c7f0fee
+875, 0x7d5840bcbf702379
+876, 0x19fa4c1254a82ed
+877, 0xcf5ce090ad0b38ea
+878, 0xd4edd6ac9437e16d
+879, 0xc6ebf25eb623b426
+880, 0xd2b6dbdf00d8fea2
+881, 0x949cf98391cc59e1
+882, 0x380a0c7d0356f7b3
+883, 0x8ffefe32465473bf
+884, 0x637b6542d27c861e
+885, 0x347d12ffc664ecd9
+886, 0xea66e3a0c75a6b37
+887, 0xc3aff6f34fb537a1
+888, 0x67bdf3579959bf49
+889, 0xa17a348e3a74b723
+890, 0x93c9ef26ddadd569
+891, 0x483909059a5ac0b2
+892, 0x26ec9074b56d5a0d
+893, 0x6216000d9a48403a
+894, 0x79b43909eab1ec05
+895, 0xe4a8e8d03649e0de
+896, 0x1435d666f3ccdc08
+897, 0xb9e22ba902650a0e
+898, 0x44dffcccc68b41f8
+899, 0x23e60dcc7a559a17
+900, 0x6fd1735eacd81266
+901, 0xf6bda0745ea20c8e
+902, 0x85efcaefe271e07c
+903, 0x9be996ee931cef42
+904, 0xe78b41c158611d64
+905, 0xd6201df605839830
+906, 0x702e8e47d2769fd3
+907, 0xb8dcf70e18cf14c
+908, 0xac2690bab1bf5c17
+909, 0x92b166b71205d696
+910, 0xb0e73c795fc6df28
+911, 0x4bf2322c8b6b6f0d
+912, 0xa842fbe67918cea0
+913, 0xb01a8675d9294e54
+914, 0xfbe3c94f03ca5af2
+915, 0x51a5c089600c441f
+916, 0x60f0fd7512d85ded
+917, 0xef3113d3bc2cadb0
+918, 0xe1ea128ade300d60
+919, 0xde413b7f8d92d746
+920, 0xfc32c6d43f47c5d8
+921, 0x69d551d8c2b54c68
+922, 0xb9bc68c175777943
+923, 0xb9c79c687f0dae90
+924, 0xd799421ef883c06e
+925, 0xbff553ca95a29a3e
+926, 0xfc9ffac46bd0aca1
+927, 0x4f6c3a30c80c3e5a
+928, 0x8b7245bc6dc4a0a
+929, 0xaf4e191a4575ff60
+930, 0x41218c4a76b90f0b
+931, 0x986052aa51b8e89b
+932, 0x284b464ed5622f9
+933, 0xba6bded912626b40
+934, 0x43cad3ed7443cb5c
+935, 0x21641fa95725f328
+936, 0x6d99d6d09d755822
+937, 0x8246dfa2d4838492
+938, 0xd2ee70b9056f4726
+939, 0x87db515a786fbb8b
+940, 0x7c63e4c1d7786e7d
+941, 0xd1a9d548f10b3e88
+942, 0xa00856475f3b74c9
+943, 0x7f1964ce67148bf4
+944, 0x446650ec71e6018c
+945, 0xb1805ca07d1b6345
+946, 0x869c0a1625b7271b
+947, 0x79d6da06ce2ecfe2
+948, 0xec7b3cafc5e3c85f
+949, 0x1745ce21e39f2c3d
+950, 0xd9a0a7af6ee97825
+951, 0x680e0e52a6e11d5c
+952, 0xd86b3f344ff7f4cd
+953, 0xab56af117c840b9c
+954, 0x5c5404c7e333a10e
+955, 0x4f1eb462f35d990d
+956, 0xf857605a5644458e
+957, 0x3bb87cdf09262f86
+958, 0xd57295baf6da64b
+959, 0xb5993f48472f2894
+960, 0x7d1a501608c060b2
+961, 0x45fabe2d0e54adf0
+962, 0xbb41c3806afb4efe
+963, 0xbfbc506049424c8
+964, 0xb7dd6b67f2203344
+965, 0x389ce52eff883b81
+966, 0xe259c55c0cf6d000
+967, 0x70fb3e3824f7d213
+968, 0x9f36d5599ed55f4b
+969, 0xd14cf6f12f83c4f7
+970, 0x570a09d56aaa0b66
+971, 0x8accafd527f4598
+972, 0xa42d64c62175adfd
+973, 0xddb9c6a87b6e1558
+974, 0xd80b6c69fa1cde2a
+975, 0x44ebaac10082207b
+976, 0xf99be8889552fa1a
+977, 0x38253cd4b38b5dc5
+978, 0x85356c8b02675791
+979, 0xbf91677b2ecdcf55
+980, 0x2316cb85e93f366e
+981, 0x9abf35954db6b053
+982, 0xf49f7425e086b45a
+983, 0x8f5b625e074afde2
+984, 0xe0d614559791b080
+985, 0xbf7b866afab2a525
+986, 0xde89d7e1641a6412
+987, 0x1d10687d8ae5b86f
+988, 0x1f034caa0e904cbd
+989, 0x2086357aec8a7a2c
+990, 0x22dc476b80c56e1e
+991, 0xbef5a73cc0e3a493
+992, 0xddfa3829b26ed797
+993, 0x8917a87ec3d4dc78
+994, 0xfeabe390628c365e
+995, 0x581b0c4f6fb2d642
+996, 0x1ef8c590adbf5b9a
+997, 0x4d8e13aac0cce879
+998, 0xfe38f71e5977fad0
+999, 0x1f83a32d4adfd2ed
diff --git a/lib/python3.12/site-packages/numpy/random/tests/data/philox-testset-2.csv b/lib/python3.12/site-packages/numpy/random/tests/data/philox-testset-2.csv
new file mode 100644
index 0000000000000000000000000000000000000000..69d24c38c28959361283624e02f8891fa69b6c5f
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/random/tests/data/philox-testset-2.csv
@@ -0,0 +1,1001 @@
+seed, 0x0
+0, 0x399e5b222b82fa9
+1, 0x41fd08c1f00f3bc5
+2, 0x78b8824162ee4d04
+3, 0x176747919e02739d
+4, 0xfaa88f002a8d3596
+5, 0x418eb6f592e6c227
+6, 0xef83020b8344dd45
+7, 0x30a74a1a6eaa064b
+8, 0x93d43bf97a490c3
+9, 0xe4ba28b442194cc
+10, 0xc829083a168a8656
+11, 0x73f45d50f8e22849
+12, 0xf912db57352824cc
+13, 0xf524216927b12ada
+14, 0x22b7697473b1dfda
+15, 0x311e2a936414b39f
+16, 0xb905abfdcc425be6
+17, 0x4b14630d031eac9c
+18, 0x1cf0c4ae01222bc8
+19, 0xa6c33efc6e82ef3
+20, 0x43b3576937ba0948
+21, 0x1e483d17cdde108a
+22, 0x6722784cac11ac88
+23, 0xee87569a48fc45d7
+24, 0xb821dcbe74d18661
+25, 0xa5d1876ef3da1a81
+26, 0xe4121c2af72a483
+27, 0x2d747e355a52cf43
+28, 0x609059957bd03725
+29, 0xc3327244b49e16c5
+30, 0xb5ae6cb000dde769
+31, 0x774315003209017
+32, 0xa2013397ba8db605
+33, 0x73b228945dbcd957
+34, 0x801af7190375d3c0
+35, 0xae6dca29f24c9c67
+36, 0xd1cc0bcb1ca26249
+37, 0x1defa62a5bd853be
+38, 0x67c2f5557fa89462
+39, 0xf1729b58122fab02
+40, 0xb67eb71949ec6c42
+41, 0x5456366ec1f8f7d7
+42, 0x44492b32eb7966f5
+43, 0xa801804159f175f1
+44, 0x5a416f23cac70d84
+45, 0x186f55293302303d
+46, 0x7339d5d7b6a43639
+47, 0xfc6df38d6a566121
+48, 0xed2fe018f150b39e
+49, 0x508e0b04a781fa1b
+50, 0x8bee9d50f32eaf50
+51, 0x9870015d37e63cc
+52, 0x93c6b12309c14f2d
+53, 0xb571cf798abe93ff
+54, 0x85c35a297a88ae6e
+55, 0x9b1b79afe497a2ae
+56, 0x1ca02e5b95d96b8d
+57, 0x5bb695a666c0a94a
+58, 0x4e3caf9bbab0b208
+59, 0x44a44be1a89f2dc1
+60, 0x4ff37c33445758d1
+61, 0xd0e02875322f35da
+62, 0xfd449a91fb92646b
+63, 0xbe0b49096b95db4d
+64, 0xffa3647cad13ef5d
+65, 0x75c127a61acd10c8
+66, 0xd65f697756f5f98e
+67, 0x3ced84be93d94434
+68, 0x4da3095c2fc46d68
+69, 0x67564e2a771ee9ac
+70, 0x36944775180644a9
+71, 0xf458db1c177cdb60
+72, 0x5b58406dcd034c8
+73, 0x793301a3fdab2a73
+74, 0x1c2a1a16d6db6128
+75, 0xc2dacd4ddddbe56c
+76, 0x2e7d15be2301a111
+77, 0xd4f4a6341b3bcd18
+78, 0x3622996bbe6a9e3b
+79, 0xaf29aa9a7d6d47da
+80, 0x6d7dbb74a4cd68ae
+81, 0xc260a17e0f39f841
+82, 0xdee0170f2af66f0d
+83, 0xf84ae780d7b5a06e
+84, 0x8326247b73f43c3a
+85, 0xd44eef44b4f98b84
+86, 0x3d10aee62ec895e3
+87, 0x4f23fef01bf703b3
+88, 0xf8e50aa57d888df6
+89, 0x7da67411e3bef261
+90, 0x1d00f2769b2f96d7
+91, 0x7ef9a15b7444b84e
+92, 0xcfa16436cc2b7e21
+93, 0x29ab8cfac00460ff
+94, 0x23613de8608b0e70
+95, 0xb1aa0980625798a8
+96, 0xb9256fd29db7df99
+97, 0xdacf311bf3e7fa18
+98, 0xa013c8f9fada20d8
+99, 0xaf5fd4fe8230fe3e
+100, 0xd3d59ca55102bc5c
+101, 0x9d08e2aa5242767f
+102, 0x40278fe131e83b53
+103, 0x56397d03c7c14c98
+104, 0xe874b77b119359b3
+105, 0x926a1ba4304ab19f
+106, 0x1e115d5aa695a91d
+107, 0xc6a459df441f2fe3
+108, 0x2ca842bc1b0b3c6a
+109, 0x24c804cf8e5eed16
+110, 0x7ca00fc4a4c3ebd3
+111, 0x546af7cecc4a4ba6
+112, 0x8faae1fa18fd6e3
+113, 0x40420b0089641a6a
+114, 0x88175a35d9abcb83
+115, 0xf7d746d1b8b1357c
+116, 0x7dae771a651be970
+117, 0x2f6485247ee4df84
+118, 0x6883702fab2d8ec5
+119, 0xeb7eea829a67f9a6
+120, 0x60d5880b485562ed
+121, 0x7d4ca3d7e41a4e7e
+122, 0xbb7fef961ab8de18
+123, 0x3b92452fb810c164
+124, 0x5f4b4755348b338
+125, 0xca45a715a7539806
+126, 0xc33efd9da5399dd
+127, 0x593d665a51d4aedd
+128, 0x75d6b8636563036b
+129, 0x7b57caa55e262082
+130, 0x4ede7427969e0dd5
+131, 0xc3f19b6f78ea00b
+132, 0xeea7bab9be2181ea
+133, 0x652c45fe9c420c04
+134, 0x14ba9e3d175670ee
+135, 0xd2ad156ba6490474
+136, 0x4d65ae41065f614
+137, 0x6ff911c8afa28eb1
+138, 0xedc2b33588f3cb68
+139, 0x437c8bc324666a2f
+140, 0x828cee25457a3f0
+141, 0x530c986091f31b9b
+142, 0x2f34671e8326ade7
+143, 0x4f686a8f4d77f6da
+144, 0xa4c1987083498895
+145, 0xbce5a88b672b0fb1
+146, 0x8476115a9e6a00cc
+147, 0x16de18a55dd2c238
+148, 0xdf38cf4c416232bc
+149, 0x2cb837924e7559f3
+150, 0xfad4727484e982ed
+151, 0x32a55d4b7801e4f
+152, 0x8b9ef96804bd10a5
+153, 0xa1fd422c9b5cf2a9
+154, 0xf46ddb122eb7e442
+155, 0x6e3842547afa3b33
+156, 0x863dee1c34afe5c4
+157, 0x6a43a1935b6db171
+158, 0x1060a5c2f8145821
+159, 0xf783ec9ed34c4607
+160, 0x1da4a86bf5f8c0b0
+161, 0x4c7714041ba12af8
+162, 0x580da7010be2f192
+163, 0xad682fe795a7ea7a
+164, 0x6687b6cb88a9ed2c
+165, 0x3c8d4b175517cd18
+166, 0xe9247c3a524a6b6b
+167, 0x337ca9cfaa02658
+168, 0xed95399481c6feec
+169, 0x58726a088e606062
+170, 0xfe7588a5b4ee342a
+171, 0xee434c7ed146fdee
+172, 0xe2ade8b60fdc4ba5
+173, 0xd57e4c155de4eaab
+174, 0xdefeae12de1137cb
+175, 0xb7a276a241316ac1
+176, 0xeb838b1b1df4ca15
+177, 0x6f78965edea32f6f
+178, 0x18bebd264d7a5d53
+179, 0x3641c691d77005ec
+180, 0xbe70ed7efea8c24c
+181, 0x33047fa8d03ca560
+182, 0x3bed0d2221ff0f87
+183, 0x23083a6ffbcf38a2
+184, 0xc23eb827073d3fa5
+185, 0xc873bb3415e9fb9b
+186, 0xa4645179e54147fe
+187, 0x2c72fb443f66e207
+188, 0x98084915dd89d8f4
+189, 0x88baa2de12c99037
+190, 0x85c74ab238cb795f
+191, 0xe122186469ea3a26
+192, 0x4c3bba99b3249292
+193, 0x85d6845d9a015234
+194, 0x147ddd69c13e6a31
+195, 0x255f4d678c9a570b
+196, 0x2d7c0c410bf962b4
+197, 0x58eb7649e0aa16ca
+198, 0x9d240bf662fe0783
+199, 0x5f74f6fa32d293cc
+200, 0x4928e52f0f79d9b9
+201, 0xe61c2b87146b706d
+202, 0xcfcd90d100cf5431
+203, 0xf15ea8138e6aa178
+204, 0x6ab8287024f9a819
+205, 0xed8942593db74e01
+206, 0xefc00e4ec2ae36dd
+207, 0xc21429fb9387f334
+208, 0xf9a3389e285a9bce
+209, 0xacdee8c43aae49b3
+210, 0xefc382f02ad55c25
+211, 0x1153b50e8d406b72
+212, 0xb00d39ebcc2f89d8
+213, 0xde62f0b9831c8850
+214, 0xc076994662eef6c7
+215, 0x66f08f4752f1e3ef
+216, 0x283b90619796249a
+217, 0x4e4869bc4227499e
+218, 0xb45ad78a49efd7ed
+219, 0xffe19aa77abf5f4b
+220, 0xfce11a0daf913aef
+221, 0x7e4e64450d5cdceb
+222, 0xe9621997cfd62762
+223, 0x4d2c9e156868081
+224, 0x4e2d96eb7cc9a08
+225, 0xda74849bba6e3bd3
+226, 0x6f4621da935e7fde
+227, 0xb94b914aa0497259
+228, 0xd50d03e8b8db1563
+229, 0x1a45c1ce5dca422e
+230, 0xc8d30d33276f843f
+231, 0xb57245774e4176b4
+232, 0x8d36342c05abbbb1
+233, 0x3591ad893ecf9e78
+234, 0x62f4717239ee0ac8
+235, 0x9b71148a1a1d4200
+236, 0x65f8e0f56dd94463
+237, 0x453b1fcfd4fac8c2
+238, 0x4c25e48e54a55865
+239, 0xa866baa05112ace2
+240, 0x7741d3c69c6e79c5
+241, 0x7deb375e8f4f7a8a
+242, 0xc242087ede42abd8
+243, 0x2fa9d1d488750c4b
+244, 0xe8940137a935d3d3
+245, 0x1dab4918ca24b2f2
+246, 0xe2368c782168fe3e
+247, 0x6e8b2d1d73695909
+248, 0x70455ebea268b33e
+249, 0x656a919202e28da1
+250, 0x5a5a8935647da999
+251, 0x428c6f77e118c13c
+252, 0xa87aee2b675bb083
+253, 0x3873a6412b239969
+254, 0x5f72c1e91cb8a2ee
+255, 0xa25af80a1beb5679
+256, 0x1af65d27c7b4abc3
+257, 0x133437060670e067
+258, 0xb1990fa39a97d32e
+259, 0x724adc89ae10ed17
+260, 0x3f682a3f2363a240
+261, 0x29198f8dbd343499
+262, 0xdfaeeaa42bc51105
+263, 0x5baff3901b9480c2
+264, 0x3f760a67043e77f5
+265, 0x610fa7aa355a43ba
+266, 0x394856ac09c4f7a7
+267, 0x1d9229d058aee82e
+268, 0x19c674804c41aeec
+269, 0x74cf12372012f4aa
+270, 0xa5d89b353fa2f6ca
+271, 0x697e4f672ac363dd
+272, 0xde6f55ba73df5af9
+273, 0x679cf537510bd68f
+274, 0x3dc916114ae9ef7e
+275, 0xd7e31a66ec2ee7ba
+276, 0xc21bebb968728495
+277, 0xc5e0781414e2adfd
+278, 0x71147b5412ddd4bd
+279, 0x3b864b410625cca9
+280, 0x433d67c0036cdc6
+281, 0x48083afa0ae20b1b
+282, 0x2d80beecd64ac4e8
+283, 0x2a753c27c3a3ee3e
+284, 0xb2c5e6afd1fe051a
+285, 0xea677930cd66c46b
+286, 0x4c3960932f92810a
+287, 0xf1b367a9e527eaba
+288, 0xb7d92a8a9a69a98e
+289, 0x9f9ad3210bd6b453
+290, 0x817f2889db2dcbd8
+291, 0x4270a665ac15813c
+292, 0x90b85353bd2be4dd
+293, 0x10c0460f7b2d68d
+294, 0x11cef32b94f947f5
+295, 0x3cf29ed8e7d477e8
+296, 0x793aaa9bd50599ef
+297, 0xbac15d1190014aad
+298, 0x987944ae80b5cb13
+299, 0x460aa51f8d57c484
+300, 0xc77df0385f97c2d3
+301, 0x92e743b7293a3822
+302, 0xbc3458bcfbcbb8c0
+303, 0xe277bcf3d04b4ed7
+304, 0xa537ae5cf1c9a31c
+305, 0x95eb00d30bd8cfb2
+306, 0x6376361c24e4f2dd
+307, 0x374477fe87b9ea8e
+308, 0x8210f1a9a039902e
+309, 0xe7628f7031321f68
+310, 0x8b8e9c0888fc1d3d
+311, 0x306be461fdc9e0ed
+312, 0x510009372f9b56f5
+313, 0xa6e6fa486b7a027a
+314, 0x9d3f002025203b5a
+315, 0x7a46e0e81ecbef86
+316, 0x41e280c611d04df0
+317, 0xedcec10418a99e8a
+318, 0x5c27b6327e0b9dbd
+319, 0xa81ed2035b509f07
+320, 0x3581e855983a4cc4
+321, 0x4744594b25e9809d
+322, 0xc737ac7c27fbd0ed
+323, 0x1b523a307045433a
+324, 0x8b4ce9171076f1d9
+325, 0x2db02d817cd5eec0
+326, 0x24a1f1229af50288
+327, 0x5550c0dcf583ff16
+328, 0x3587baaa122ec422
+329, 0xf9d3dc894229e510
+330, 0xf3100430d5cf8e87
+331, 0xc31af79862f8e2fb
+332, 0xd20582063b9f3537
+333, 0xac5e90ac95fcc7ad
+334, 0x107c4c704d5109d4
+335, 0xebc8628906dbfd70
+336, 0x215242776da8c531
+337, 0xa98002f1dcf08b51
+338, 0xbc3bdc07f3b09718
+339, 0x238677062495b512
+340, 0x53b4796f2a3c49e8
+341, 0x6424286467e22f0e
+342, 0x14d0952a11a71bac
+343, 0x2f97098149b82514
+344, 0x3777f2fdc425ad2
+345, 0xa32f2382938876d4
+346, 0xda8a39a021f20ae3
+347, 0x364361ef0a6ac32c
+348, 0x4413eede008ff05a
+349, 0x8dda8ace851aa327
+350, 0x4303cabbdcecd1ee
+351, 0x2e69f06d74aa549f
+352, 0x4797079cd4d9275c
+353, 0xc7b1890917e98307
+354, 0x34031b0e822a4b4c
+355, 0xfc79f76b566303ea
+356, 0x77014adbe255a930
+357, 0xab6c43dd162f3be5
+358, 0xa430041f3463f6b9
+359, 0x5c191a32ada3f84a
+360, 0xe8674a0781645a31
+361, 0x3a11cb667b8d0916
+362, 0xaedc73e80c39fd8a
+363, 0xfde12c1b42328765
+364, 0x97abb7dcccdc1a0b
+365, 0x52475c14d2167bc8
+366, 0x540e8811196d5aff
+367, 0xa867e4ccdb2b4b77
+368, 0x2be04af61e5bcfb9
+369, 0x81b645102bfc5dfd
+370, 0x96a52c9a66c6450f
+371, 0x632ec2d136889234
+372, 0x4ed530c0b36a6c25
+373, 0x6f4851225546b75
+374, 0x2c065d6ba46a1144
+375, 0xf8a3613ff416551d
+376, 0xb5f0fd60e9c971a9
+377, 0x339011a03bb4be65
+378, 0x9439f72b6995ded6
+379, 0xc1b03f3ef3b2292d
+380, 0xad12fd221daab3ae
+381, 0xf615b770f2cf996f
+382, 0x269d0fdcb764172
+383, 0x67837025e8039256
+384, 0x6402831fc823fafa
+385, 0x22854146a4abb964
+386, 0x7b5ad9b5a1bad7a8
+387, 0x67170e7beb6ac935
+388, 0xfc2d1e8e24adfaaa
+389, 0x7ded4395345ff40d
+390, 0x418981760a80dd07
+391, 0xc03bef38022c1d2
+392, 0x3a11850b26eade29
+393, 0xaa56d02c7175c5f4
+394, 0xd83b7917b9bfbff5
+395, 0x3c1df2f8fa6fced3
+396, 0xf3d6e2999c0bb760
+397, 0xc66d683a59a950e3
+398, 0x8e3972a9d73ffabf
+399, 0x97720a0443edffd9
+400, 0xa85f5d2fe198444a
+401, 0xfc5f0458e1b0de5e
+402, 0xe3973f03df632b87
+403, 0xe151073c84c594b3
+404, 0x68eb4e22e7ff8ecf
+405, 0x274f36eaed7cae27
+406, 0x3b87b1eb60896b13
+407, 0xbe0b2f831442d70a
+408, 0x2782ed7a48a1b328
+409, 0xb3619d890310f704
+410, 0xb03926b11b55921a
+411, 0xdb46fc44aa6a0ce4
+412, 0x4b063e2ef2e9453a
+413, 0xe1584f1aeec60fb5
+414, 0x7092bd6a879c5a49
+415, 0xb84e1e7c7d52b0e6
+416, 0x29d09ca48db64dfb
+417, 0x8f6c4a402066e905
+418, 0x77390795eabc36b
+419, 0xcc2dc2e4141cc69f
+420, 0x2727f83beb9e3c7c
+421, 0x1b29868619331de0
+422, 0xd38c571e192c246f
+423, 0x535327479fe37b6f
+424, 0xaff9ce5758617eb3
+425, 0x5658539e9288a4e4
+426, 0x8df91d87126c4c6d
+427, 0xe931cf8fdba6e255
+428, 0x815dfdf25fbee9e8
+429, 0x5c61f4c7cba91697
+430, 0xdd5f5512fe2313a1
+431, 0x499dd918a92a53cd
+432, 0xa7e969d007c97dfd
+433, 0xb8d39c6fc81ac0bb
+434, 0x1d646983def5746c
+435, 0x44d4b3b17432a60c
+436, 0x65664232a14db1e3
+437, 0xda8fae6433e7500b
+438, 0xbe51b94ff2a3fe94
+439, 0xe9b1bd9a9098ef9f
+440, 0xfe47d54176297ef5
+441, 0xb8ab99bc03bb7135
+442, 0xcfad97f608565b38
+443, 0xf05da71f6760d9c1
+444, 0xef8da40a7c70e7b
+445, 0xe0465d58dbd5d138
+446, 0xb54a2d70eb1a938
+447, 0xfdd50c905958f2d8
+448, 0x3c41933c90a57d43
+449, 0x678f6d894c6ad0bb
+450, 0x403e8f4582274e8
+451, 0x5cbbe975668df6b0
+452, 0x297e6520a7902f03
+453, 0x8f6dded33cd1efd7
+454, 0x8e903c97be8d783b
+455, 0x10bd015577e30f77
+456, 0x3fcd69d1c36eab0c
+457, 0xb45989f3ca198d3
+458, 0x507655ce02b491a9
+459, 0xa92cf99bb78602ce
+460, 0xebfb82055fbc2f0f
+461, 0x3334256279289b7a
+462, 0xc19d2a0f740ee0ac
+463, 0x8bb070dea3934905
+464, 0xa4ab57d3a8d1b3eb
+465, 0xfee1b09bcacf7ff4
+466, 0xccc7fb41ceec41fa
+467, 0xd4da49094eb5a74d
+468, 0xed5c693770af02ed
+469, 0x369dabc9bbfaa8e4
+470, 0x7eab9f360d054199
+471, 0xe36dbebf5ee94076
+472, 0xd30840e499b23d7
+473, 0x8678e6cb545015ff
+474, 0x3a47932ca0b336e
+475, 0xeb7c742b6e93d6fe
+476, 0x1404ea51fe5a62a9
+477, 0xa72cd49db978e288
+478, 0xfd7bada020173dcf
+479, 0xc9e74fc7abe50054
+480, 0x93197847bb66808d
+481, 0x25fd5f053dce5698
+482, 0xe198a9b18cc21f4
+483, 0x5cc27b1689452d5d
+484, 0x8b3657af955a98dc
+485, 0xc17f7584f54aa1c0
+486, 0xe821b088246b1427
+487, 0x32b5a9f6b45b6fa0
+488, 0x2aef7c315c2bae0c
+489, 0xe1af8129846b705a
+490, 0x4123b4c091b34614
+491, 0x6999d61ec341c073
+492, 0x14b9a8fcf86831ea
+493, 0xfd4cff6548f46c9f
+494, 0x350c3b7e6cc8d7d6
+495, 0x202a5047fecafcd5
+496, 0xa82509fe496bb57d
+497, 0x835e4b2608b575fe
+498, 0xf3abe3da919f54ec
+499, 0x8705a21e2c9b8796
+500, 0xfd02d1427005c314
+501, 0xa38458faa637f49b
+502, 0x61622f2360e7622a
+503, 0xe89335a773c2963b
+504, 0x481264b659b0e0d0
+505, 0x1e82ae94ebf62f15
+506, 0x8ea7812de49209d4
+507, 0xff963d764680584
+508, 0x418a68bef717f4af
+509, 0x581f0e7621a8ab91
+510, 0x840337e9a0ec4150
+511, 0x951ef61b344be505
+512, 0xc8b1b899feb61ec2
+513, 0x8b78ca13c56f6ed9
+514, 0x3d2fd793715a946f
+515, 0xf1c04fabcd0f4084
+516, 0x92b602614a9a9fcc
+517, 0x7991bd7a94a65be7
+518, 0x5dead10b06cad2d7
+519, 0xda7719b33f722f06
+520, 0x9d87a722b7bff71e
+521, 0xb038e479071409e9
+522, 0xf4e8bbec48054775
+523, 0x4fec2cd7a28a88ea
+524, 0x839e28526aad3e56
+525, 0xd37ec57852a98bf0
+526, 0xdef2cbbe00f3a02d
+527, 0x1aecfe01a9e4d801
+528, 0x59018d3c8beaf067
+529, 0x892753e6ac8bf3cd
+530, 0xefdd3437023d2d1c
+531, 0x447bfbd148c8cb88
+532, 0x282380221bd442b8
+533, 0xfce8658d1347384a
+534, 0x60b211a7ec6bfa8
+535, 0xd21729cfcc692974
+536, 0x162087ecd5038a47
+537, 0x2b17000c4bce39d2
+538, 0x3a1f75ff6adcdce0
+539, 0x721a411d312f1a2c
+540, 0x9c13b6133f66934d
+541, 0xaa975d14978980e5
+542, 0x9403dbd4754203fa
+543, 0x588c15762fdd643
+544, 0xdd1290f8d0ada73a
+545, 0xd9b77380936103f4
+546, 0xb2e2047a356eb829
+547, 0x7019e5e7f76f7a47
+548, 0x3c29a461f62b001d
+549, 0xa07dc6cfab59c116
+550, 0x9b97e278433f8eb
+551, 0x6affc714e7236588
+552, 0x36170aeb32911a73
+553, 0x4a665104d364a789
+554, 0x4be01464ec276c9c
+555, 0x71bb10271a8b4ecf
+556, 0xbf62e1d068bc018
+557, 0xc9ada5db2cbbb413
+558, 0x2bded75e726650e5
+559, 0x33d5a7af2f34385d
+560, 0x8179c46661d85657
+561, 0x324ebcfd29267359
+562, 0xac4c9311dc9f9110
+563, 0xc14bb6a52f9f9c0
+564, 0xc430abe15e7fb9db
+565, 0xf1cce5c14df91c38
+566, 0x651e3efa2c0750d3
+567, 0x38a33604a8be5c75
+568, 0x7aaf77fe7ff56a49
+569, 0xc0d1cc56bbf27706
+570, 0x887aa47324e156c6
+571, 0x12547c004b085e8d
+572, 0xd86a8d6fbbbfd011
+573, 0x57c860188c92d7b4
+574, 0xcd5d3843d361b8ca
+575, 0x8f586ef05a9cb3ef
+576, 0x174456e1ba6267d5
+577, 0xf5dc302c62fe583c
+578, 0xa349442fabcdb71
+579, 0xe5123c1a8b6fd08e
+580, 0x80681552aa318593
+581, 0xb295396deaef1e31
+582, 0xabb626e0b900e32b
+583, 0xf024db8d3f19c15e
+584, 0x1d04bb9548e2fb6c
+585, 0xd8ed2b2214936c2b
+586, 0x618ca1e430a52bc9
+587, 0xccbca44a6088136b
+588, 0xd0481855c8b9ccbe
+589, 0x3c92a2fade28bdf7
+590, 0x855e9fefc38c0816
+591, 0x1269bbfe55a7b27c
+592, 0x1d6c853d83726d43
+593, 0xc8655511cc7fcafc
+594, 0x301503eb125a9b0e
+595, 0xb3108e4532016b11
+596, 0xbb7ab6245da9cb3d
+597, 0x18004c49116d85eb
+598, 0x3480849c20f61129
+599, 0xe28f45157463937b
+600, 0x8e85e61060f2ce1
+601, 0x1673da4ec589ba5e
+602, 0x74b9a6bd1b194712
+603, 0xed39e147fa8b7601
+604, 0x28ce54019102ca77
+605, 0x42e0347f6d7a2f30
+606, 0xb6a908d1c4814731
+607, 0x16c3435e4e9a126d
+608, 0x8880190514c1ad54
+609, 0xfffd86229a6f773c
+610, 0x4f2420cdb0aa1a93
+611, 0xf8e1acb4120fc1fa
+612, 0x63a8c553ab36a2f2
+613, 0x86b88cf3c0a6a190
+614, 0x44d8b2801622c792
+615, 0xf6eae14e93082ff1
+616, 0xd9ed4f5d1b8fac61
+617, 0x1808ce17f4e1f70
+618, 0x446e83ea336f262f
+619, 0xc7c802b04c0917b7
+620, 0x626f45fd64968b73
+621, 0x9ffa540edc9b2c5c
+622, 0xa96a1e219e486af8
+623, 0x2bb8963884e887a1
+624, 0xba7f68a5d029e3c4
+625, 0xefc45f44392d9ca0
+626, 0x98d77762503c5eab
+627, 0xd89bcf62f2da627c
+628, 0xa3cab8347f833151
+629, 0xa095b7595907d5c7
+630, 0x3b3041274286181
+631, 0xb518db8919eb71fa
+632, 0x187036c14fdc9a36
+633, 0xd06e28301e696f5d
+634, 0xdbc71184e0c56492
+635, 0xfe51e9cae6125bfd
+636, 0x3b12d17cd014df24
+637, 0x3b95e4e2c986ac1a
+638, 0x29c1cce59fb2dea2
+639, 0x58c05793182a49d6
+640, 0xc016477e330d8c00
+641, 0x79ef335133ada5d
+642, 0x168e2cad941203f3
+643, 0xf99d0f219d702ef0
+644, 0x655628068f8f135b
+645, 0xdcdea51910ae3f92
+646, 0x8e4505039c567892
+647, 0x91a9ec7e947c89ae
+648, 0x8717172530f93949
+649, 0x1c80aba9a440171a
+650, 0x9c8f83f6ebe7441e
+651, 0x6c05e1efea4aa7f9
+652, 0x10af696b777c01b
+653, 0x5892e9d9a92fc309
+654, 0xd2ba7da71e709432
+655, 0x46378c7c3269a466
+656, 0x942c63dfe18e772c
+657, 0x6245cf02ef2476f
+658, 0x6f265b2759ea2aea
+659, 0x5aa757f17d17f4a6
+660, 0x1ad6a3c44fa09be6
+661, 0xe861af14e7015fb8
+662, 0x86be2e7db388c77
+663, 0x5c7bba32b519e9a0
+664, 0x3feb314850c4437b
+665, 0x97955add60cfb45b
+666, 0xfdb536230a540bdc
+667, 0xdac9d7bf6e58512e
+668, 0x4894c00e474e8120
+669, 0xa1918a37739da366
+670, 0xa8097f2096532807
+671, 0x592afe50e6c5e643
+672, 0xd69050ee6dcb33dc
+673, 0xa6956b262dd3c561
+674, 0x1a55c815555e63f7
+675, 0x2ec7fd37516de2bb
+676, 0x8ec251d9c70e76ba
+677, 0x9b76e4abafd2689
+678, 0x9ce3f5c751a57df1
+679, 0x915c4818bf287bc7
+680, 0x2293a0d1fe07c735
+681, 0x7627dcd5d5a66d3d
+682, 0xb5e4f92cc49c7138
+683, 0x6fc51298731d268c
+684, 0xd19800aa95441f87
+685, 0x14f70f31162fa115
+686, 0x41a3da3752936f59
+687, 0xbec0652be95652ee
+688, 0x7aa4bdb1020a290f
+689, 0x4382d0d9bee899ef
+690, 0xe6d988ae4277d6ff
+691, 0xe618088ccb2a32d1
+692, 0x411669dfaa899e90
+693, 0x234e2bf4ba76d9f
+694, 0xe109fe4cb7828687
+695, 0x1fb96b5022b0b360
+696, 0x6b24ad76c061a716
+697, 0x7e1781d4d7ecee15
+698, 0xf20c2dbe82ba38ba
+699, 0xeda8e8ae1d943655
+700, 0xa58d196e2a77eaec
+701, 0x44564765a5995a0b
+702, 0x11902fe871ecae21
+703, 0x2ea60279900e675d
+704, 0x38427227c18a9a96
+705, 0xe0af01490a1b1b48
+706, 0x826f91997e057824
+707, 0x1e57308e6e50451
+708, 0xb42d469bbbfdc350
+709, 0xb9734cff1109c49b
+710, 0x98967559bb9d364f
+711, 0xd6be360041907c12
+712, 0xa86a1279122a1e21
+713, 0x26f99a8527bfc698
+714, 0xfa8b85758f28f5d6
+715, 0xe3057429940806ae
+716, 0x4bee2d7e84f93b2b
+717, 0x948350a76ea506f4
+718, 0xa139154488045e74
+719, 0x8893579ba5e78085
+720, 0x5f21c215c6a9e397
+721, 0x456134f3a59641dc
+722, 0x92c0273f8e97a9c6
+723, 0xd2936c9c3f0c6936
+724, 0xcfa4221e752c4735
+725, 0x28cd5a7457355dca
+726, 0xecdfdde23d90999f
+727, 0x60631b2d494d032b
+728, 0xf67289df269a827f
+729, 0xcbe8011ef0f5b7ef
+730, 0x20eea973c70a84f5
+731, 0xbe1fd200398557ce
+732, 0xd2279ee030191bba
+733, 0xf2bd4291dedaf819
+734, 0xfc6d167dbe8c402
+735, 0x39ac298da5d0044b
+736, 0xceac026f5f561ce
+737, 0x10a5b0bdd8ad60e6
+738, 0xdeb3c626df6d4bcb
+739, 0x3c128962e77ff6ca
+740, 0xc786262e9c67a0e5
+741, 0x4332855b3febcdc0
+742, 0x7bda9724d1c0e020
+743, 0x6a8c93399bc4df22
+744, 0xa9b20100ac707396
+745, 0xa11a3458502c4eb5
+746, 0xb185461c60478941
+747, 0x13131d56195b7ff6
+748, 0x8d55875ddbd4aa1c
+749, 0xc09b67425f469aa5
+750, 0x39e33786cc7594c4
+751, 0x75e96db8e4b08b93
+752, 0xda01cd12a3275d1e
+753, 0x2c49e7822344fab5
+754, 0x9bd5f10612514ca7
+755, 0x1c801a5c828e7332
+756, 0x29797d3f4f6c7b4c
+757, 0xac992715e21e4e53
+758, 0xe40e89ee887ddb37
+759, 0x15189a2b265a783b
+760, 0xa854159a52af5c5
+761, 0xb9d8a5a81c12bead
+762, 0x3240cdc9d59e2a58
+763, 0x1d0b872234cf8e23
+764, 0xc01224cf6ce12cff
+765, 0x2601e9f3905c8663
+766, 0xd4ecf9890168d6b4
+767, 0xa45db796d89bfdd5
+768, 0x9f389406dad64ab4
+769, 0xa5a851adce43ffe3
+770, 0xd0962c41c26e5aa9
+771, 0x8a671679e48510a4
+772, 0xc196dc0924a6bfeb
+773, 0x3ead661043b549cb
+774, 0x51af4ca737d405ac
+775, 0xf4425b5c62275fb6
+776, 0x71e69d1f818c10f5
+777, 0xacaf4af2d3c70162
+778, 0x2e1f1d4fd7524244
+779, 0xe54fdd8f388890e8
+780, 0xfda0d33e84eb2b83
+781, 0x53965c5e392b81da
+782, 0x5c92288267263097
+783, 0xcac1b431c878c66c
+784, 0x36c0e1cf417241c6
+785, 0x5cc4d9cd1a36bf2c
+786, 0x32e4257bb5d3e470
+787, 0x4aecff904adb44fb
+788, 0x4d91a8e0d1d60cac
+789, 0xa3b478388385b038
+790, 0x48d955f24eba70be
+791, 0x310e4deb07f24f68
+792, 0x8853e73b1f30a5a
+793, 0x278aee45c2a65c5
+794, 0xf6932eedbd62fb0b
+795, 0xafb95958c82fafad
+796, 0x78e807c18616c16c
+797, 0xd7abadda7488ed9f
+798, 0x2dd72e2572aa2ae6
+799, 0x6ec3791982c2be09
+800, 0x6865bb314fac478f
+801, 0xa14dc0ce09000d1a
+802, 0xb8081ad134da10f2
+803, 0xc4ac1534aa825ef5
+804, 0xd83aeb48ae2d538f
+805, 0x38052027e3074be4
+806, 0xa9833e06ef136582
+807, 0x4f02d790ec9fd78
+808, 0xec2f60bc711c5bdc
+809, 0x9253b0d12268e561
+810, 0xa8ac607fdd62c206
+811, 0x895e28ebc920289f
+812, 0xe2fd42b154243ac7
+813, 0xc69cac2f776eee19
+814, 0xf4d4ac11db56d0dc
+815, 0xa8d37049b9f39833
+816, 0x75abbf8a196c337c
+817, 0xb115bb76750d27b8
+818, 0x39426d187839154
+819, 0xd488423e7f38bf83
+820, 0xbb92e0c76ecb6a62
+821, 0x3055a018ce39f4e3
+822, 0xc93fe0e907729bfb
+823, 0x65985d17c5863340
+824, 0x2088ae081b2028e1
+825, 0x6e628de873314057
+826, 0x864377cccf573f0e
+827, 0xae03f4c9aa63d132
+828, 0xb1db766d6404c66d
+829, 0xdce5a22414a374b
+830, 0x622155b777819997
+831, 0x69fe96e620371f3c
+832, 0xa9c67dbc326d94fc
+833, 0x932a84ae5dd43bab
+834, 0xe2301a20f6c48c3f
+835, 0x795d2e79c6477300
+836, 0xd8e3e631289521e7
+837, 0xae2684979002dfd6
+838, 0xc9c2392377550f89
+839, 0xa1b0c99d508ef7ec
+840, 0x593aef3c5a5272ec
+841, 0xe32e511a4b7162cd
+842, 0xab3b81655f5a2857
+843, 0x1b535e1a0aaf053e
+844, 0x5b33f56c1b6a07e2
+845, 0x782dc8cfcac4ef36
+846, 0xb3d4f256eecfd202
+847, 0xf73a6598f58c4f7e
+848, 0xd5722189524870ae
+849, 0x707878de6b995fc0
+850, 0xc3eb6ba73e3d7e8a
+851, 0xca75c017655b75a7
+852, 0x1b29369ea3541e5f
+853, 0x352e98858bdb58a3
+854, 0x1e4412d184b6b27d
+855, 0x2d375ba0304b2d17
+856, 0x56c30fce69a5d08e
+857, 0x6b8c2b0c06584bda
+858, 0xde4dfff228c8c91f
+859, 0xb7c9edd574e6287f
+860, 0xf6078281c9fca2b2
+861, 0xb9b9a51de02a2f1e
+862, 0xa411bef31c0103b0
+863, 0xc5facd8fc5e1d7a3
+864, 0x54e631c05ddf7359
+865, 0x815b42b3fd06c474
+866, 0xc9ac07566fda18ec
+867, 0xd84ea62957bd8e15
+868, 0x5575f74b5cfd8803
+869, 0x5779a8d460c2e304
+870, 0xfd6e87e264a85587
+871, 0xa1d674daa320b26d
+872, 0x2c3c3ec64b35afc4
+873, 0x393a274ff03e6935
+874, 0x1f40ecbac52c50ea
+875, 0xc3de64fa324ffc0c
+876, 0x56ae828b7f9deb04
+877, 0xe7c1a77b5c1f2cb3
+878, 0xa4c4aab19ea921cc
+879, 0xec164c238825822c
+880, 0xa6a3304770c03b03
+881, 0x3a63641d5b1e8123
+882, 0x42677be3a54617ef
+883, 0xa2680423e3a200c0
+884, 0x8b17cf75f3f37277
+885, 0xe7ce65a49242be3d
+886, 0x7f85934271323e4b
+887, 0xcfb0f431f79a4fab
+888, 0x392e4041a8505b65
+889, 0xd3e5daf0d8b25ea6
+890, 0x9447eff675d80f53
+891, 0xea27a9d53cfaeea8
+892, 0xe3f2335945a83ba
+893, 0x8875a43ce216413b
+894, 0xe49941f9eabce33e
+895, 0x9357c1296683a5b1
+896, 0xf0f16439e81ee701
+897, 0x3181515295ffd79a
+898, 0x9d7150fffd169ed8
+899, 0x2d6a1d281e255a72
+900, 0x81bf1286fb3a92b6
+901, 0x566d3079b499e279
+902, 0xc7939ca8f047341
+903, 0xb1f8050e7c2d59f6
+904, 0x605701045e7be192
+905, 0x51b73360e8e31a1c
+906, 0x9f4ad54483ba9fe0
+907, 0xd3085b8fcf69d1c8
+908, 0xc3e7475026dc5f0b
+909, 0x5800f8554b157354
+910, 0x37dfdf858cfcd963
+911, 0x3a1fce05ce385072
+912, 0xf495c062645c20c3
+913, 0xdcbeec2c3492c773
+914, 0xc38f427589d1d0b4
+915, 0x681ead60216a8184
+916, 0x4bd569c40cc88c41
+917, 0x49b0d442e130b7a2
+918, 0xee349156b7d1fa3f
+919, 0x2bde2d2db055135b
+920, 0xc6a460d2fbcb2378
+921, 0xd0f170494ff3dbb
+922, 0xb294422492528a23
+923, 0xfc95873c854e7b86
+924, 0x6c9c3ad1797bb19c
+925, 0xe0c06f2aab65062d
+926, 0x58e32ce0f11e3a81
+927, 0xa745fcd729ff5036
+928, 0x599b249b2fc2cdb2
+929, 0x78f23b5b0dd5b082
+930, 0x6de3e957f549ecfc
+931, 0x9d0712fa6d878756
+932, 0x9076e8554e4a413a
+933, 0xf3185818c0294de8
+934, 0x5de7cdf4b455b9b6
+935, 0xb15f6908ed703f7d
+936, 0x98c654dfedc6818
+937, 0x120502ab0e93ae42
+938, 0x67966a98a58dc120
+939, 0x1caa0fc628989482
+940, 0xd8b2c3cd480a8625
+941, 0x85c70071b3aed671
+942, 0xff385f8473714662
+943, 0xe2868e4bf3773b63
+944, 0x96cf8019b279298e
+945, 0x8511cc930bd74800
+946, 0x5312e48fdd55f5ab
+947, 0xfcdae564b52df78d
+948, 0x9eee48373e652176
+949, 0x953788f6bcbc56b0
+950, 0xd1a3855dbd2f6b37
+951, 0x3ad32acf77f4d1e9
+952, 0x917c7be81b003e30
+953, 0x9ce817da1e2e9dfb
+954, 0x2968983db162d44d
+955, 0x1e005decef5828ad
+956, 0xc38fe59d1aa4f3d5
+957, 0xf357f1710dc02f1d
+958, 0x2613912a4c83ec67
+959, 0x832a11470b9a17cb
+960, 0x5e85508a611f0dad
+961, 0x2781131677f59d56
+962, 0xa82358d7d4b0237f
+963, 0xfbf8b3cc030c3af6
+964, 0x68b2f68ac8a55adb
+965, 0x3b6fcf353add0ada
+966, 0xd1956049bcd15bd5
+967, 0x95b76f31c7f98b6d
+968, 0x814b6690df971a84
+969, 0xdcf7959cddd819e4
+970, 0xcf8c72c5d804fc88
+971, 0x56883769c8945a22
+972, 0x1f034652f658cf46
+973, 0x41df1324cda235a1
+974, 0xeccd32524504a054
+975, 0x974e0910a04ec02c
+976, 0x72104507b821f6db
+977, 0x791f8d089f273044
+978, 0xe0f79a4f567f73c3
+979, 0x52fe5bea3997f024
+980, 0x5f8b9b446494f78
+981, 0xfd9f511947059190
+982, 0x3aea9dac6063bce3
+983, 0xbfdae4dfc24aee60
+984, 0xa82cdbbf0a280318
+985, 0xf460aae18d70aa9d
+986, 0x997367cb204a57c4
+987, 0x616e21ab95ba05ef
+988, 0x9bfc93bec116769f
+989, 0x2b2ee27c37a3fa5b
+990, 0xb25c6ed54006ee38
+991, 0xab04d4a5c69e69a5
+992, 0x6d2f6b45f2d8438f
+993, 0x4ad2f32afc82f092
+994, 0x513d718908f709c0
+995, 0x5272aadc4fffca51
+996, 0xeb3f87e66156ef5d
+997, 0xf8a3d5a46a86ba85
+998, 0xdb4548a86f27abfd
+999, 0x57c05f47ff62380d
diff --git a/lib/python3.12/site-packages/numpy/random/tests/data/sfc64-testset-1.csv b/lib/python3.12/site-packages/numpy/random/tests/data/sfc64-testset-1.csv
new file mode 100644
index 0000000000000000000000000000000000000000..4fffe69591fea3f399f35034057096089d4017fb
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/random/tests/data/sfc64-testset-1.csv
@@ -0,0 +1,1001 @@
+seed, 0xdeadbeaf
+0, 0xa475f55fbb6bc638
+1, 0xb2d594b6c29d971c
+2, 0x275bc4ece4484fb1
+3, 0x569be72d9b3492fb
+4, 0x89a5bb9b206a670c
+5, 0xd951bfa06afdc3f9
+6, 0x7ee2e1029d52a265
+7, 0x12ef1d4de0cb4d4c
+8, 0x41658ba8f0ef0280
+9, 0x5b650c82e4fe09c5
+10, 0x638a9f3e30ec4e94
+11, 0x147487fb2ba9233e
+12, 0x89ef035603d2d1fb
+13, 0xe66ca57a190e6cbe
+14, 0x330f673740dd61fc
+15, 0xc71d3dce2f8bb34e
+16, 0x3c07c39ff150b185
+17, 0x5df952b6cae8f099
+18, 0x9f09f2b1f0ceac80
+19, 0x19598eee2d0c4c67
+20, 0x64e06483702e0ebd
+21, 0xda04d1fdb545f7fa
+22, 0xf2cf53b61a0c4f9b
+23, 0xf0bb724ce196f66e
+24, 0x71cefde55d9cf0f
+25, 0x6323f62824a20048
+26, 0x1e93604680f14b4e
+27, 0xd9d8fad1d4654025
+28, 0xf4ee25af2e76ca08
+29, 0x6af3325896befa98
+30, 0xad9e43abf5e04053
+31, 0xbf930e318ce09de3
+32, 0x61f9583b4f9ffe76
+33, 0x9b69d0b3d5ec8958
+34, 0xa608f250f9b2ca41
+35, 0x6fdba7073dc2bb5d
+36, 0xa9d57601efea6d26
+37, 0xc24a88a994954105
+38, 0xc728b1f78d88fe5b
+39, 0x88da88c2b083b3b2
+40, 0xa9e27f7303c76cfd
+41, 0xc4c24608c29176eb
+42, 0x5420b58466b972fd
+43, 0xd2018a661b6756c8
+44, 0x7caed83d9573fc7
+45, 0x562a3d81b849a06a
+46, 0x16588af120c21f2c
+47, 0x658109a7e0eb4837
+48, 0x877aabb14d3822e1
+49, 0x95704c342c3745fe
+50, 0xeeb8a0dc81603616
+51, 0x431bf94889290419
+52, 0xe4a9410ab92a5863
+53, 0xbc6be64ea60f12ba
+54, 0x328a2da920015063
+55, 0x40f6b3bf8271ae07
+56, 0x4068ff00a0e854f8
+57, 0x1b287572ca13fa78
+58, 0xa11624a600490b99
+59, 0x4a04ef29eb7150fa
+60, 0xcc9469ab5ffb739
+61, 0x99a6a9f8d95e782
+62, 0x8e90356573e7a070
+63, 0xa740b8fb415c81c4
+64, 0x47eccef67447f3da
+65, 0x2c720afe3a62a49b
+66, 0xe2a747f0a43eacf4
+67, 0xba063a87ab165576
+68, 0xbc1c78ed27feb5a3
+69, 0x285a19fa3974f9d
+70, 0x489c61e704f5f0e3
+71, 0xf5ab04f6b03f238b
+72, 0x7e25f88138a110dd
+73, 0xc3d1cef3d7c1f1d1
+74, 0xc3de6ec64d0d8e00
+75, 0x73682a15b6cc5088
+76, 0x6fecbeb319163dc5
+77, 0x7e100d5defe570a1
+78, 0xad2af9af076dce57
+79, 0x3c65100e23cd3a9a
+80, 0x4b442cc6cfe521bb
+81, 0xe89dc50f8ab1ef75
+82, 0x8b3c6fdc2496566
+83, 0xdfc50042bc2c308c
+84, 0xe39c5f158b33d2b2
+85, 0x92f6adefdfeb0ac
+86, 0xdf5808a949c85b3e
+87, 0x437384021c9dace9
+88, 0xa7b5ed0d3d67d8f
+89, 0xe1408f8b21da3c34
+90, 0xa1bba125c1e80522
+91, 0x7611dc4710385264
+92, 0xb00a46ea84082917
+93, 0x51bf8002ffa87cef
+94, 0x9bb81013e9810adc
+95, 0xd28f6600013541cd
+96, 0xc2ca3b1fa7791c1f
+97, 0x47f9ad58f099c82c
+98, 0x4d1bb9458469caf9
+99, 0xca0b165b2844257
+100, 0xc3b2e667d075dc66
+101, 0xde22f71136a3dbb1
+102, 0x23b4e3b6f219e4c3
+103, 0x327e0db4c9782f66
+104, 0x9365506a6c7a1807
+105, 0x3e868382dedd3be7
+106, 0xff04fa6534bcaa99
+107, 0x96621a8862995305
+108, 0x81bf39cb5f8e1df7
+109, 0x79b684bb8c37af7a
+110, 0xae3bc073c3cde33c
+111, 0x7805674112c899ac
+112, 0xd95a27995abb20f2
+113, 0x71a503c57b105c40
+114, 0x5ff00d6a73ec8acc
+115, 0x12f96391d91e47c2
+116, 0xd55ca097b3bd4947
+117, 0x794d79d20468b04
+118, 0x35d814efb0d7a07d
+119, 0xfa9ac9bd0aae76d3
+120, 0xa77b8a3711e175cd
+121, 0xe6694fbf421f9489
+122, 0xd8f1756525a1a0aa
+123, 0xe38dfa8426277433
+124, 0x16b640c269bbcd44
+125, 0x2a7a5a67ca24cfeb
+126, 0x669039c28d5344b4
+127, 0x2a445ee81fd596bb
+128, 0x600df94cf25607e0
+129, 0x9358561a7579abff
+130, 0xee1d52ea179fc274
+131, 0x21a8b325e89d31be
+132, 0x36fc0917486eec0a
+133, 0x3d99f40717a6be9f
+134, 0x39ac140051ca55ff
+135, 0xcef7447c26711575
+136, 0xf22666870eff441d
+137, 0x4a53c6134e1c7268
+138, 0xd26de518ad6bdb1b
+139, 0x1a736bf75b8b0e55
+140, 0xef1523f4e6bd0219
+141, 0xb287b32fd615ad92
+142, 0x2583d6af5e841dd5
+143, 0x4b9294aae7ca670c
+144, 0xf5aa4a84174f3ca9
+145, 0x886300f9e0dc6376
+146, 0x3611401e475ef130
+147, 0x69b56432b367e1ac
+148, 0x30c330e9ab36b7c4
+149, 0x1e0e73079a85b8d5
+150, 0x40fdfc7a5bfaecf
+151, 0xd7760f3e8e75a085
+152, 0x1cc1891f7f625313
+153, 0xeece1fe6165b4272
+154, 0xe61111b0c166a3c1
+155, 0x2f1201563312f185
+156, 0xfd10e8ecdd2a57cb
+157, 0x51cdc8c9dd3a89bf
+158, 0xed13cc93938b5496
+159, 0x843816129750526b
+160, 0xd09995cd6819ada
+161, 0x4601e778d40607df
+162, 0xef9df06bd66c2ea0
+163, 0xae0bdecd3db65d69
+164, 0xbb921a3c65a4ae9a
+165, 0xd66698ce8e9361be
+166, 0xacdc91647b6068f4
+167, 0xe505ef68f2a5c1c0
+168, 0xd6e62fd27c6ab137
+169, 0x6a2ba2c6a4641d86
+170, 0x9c89143715c3b81
+171, 0xe408c4e00362601a
+172, 0x986155cbf5d4bd9d
+173, 0xb9e6831728c893a7
+174, 0xb985497c3bf88d8c
+175, 0xd0d729214b727bec
+176, 0x4e557f75fece38a
+177, 0x6572067fdfd623ca
+178, 0x178d49bb4d5cd794
+179, 0xe6baf59f60445d82
+180, 0x5607d53518e3a8d2
+181, 0xba7931adb6ebbd61
+182, 0xe853576172611329
+183, 0xe945daff96000c44
+184, 0x565b9ba3d952a176
+185, 0xcdb54d4f88c584c8
+186, 0x482a7499bee9b5e5
+187, 0x76560dd0affe825b
+188, 0x2a56221faa5ca22c
+189, 0x7729be5b361f5a25
+190, 0xd6f2195795764876
+191, 0x59ef7f8f423f18c5
+192, 0x7ebefed6d02adde1
+193, 0xcfec7265329c73e5
+194, 0x4fd8606a5e59881c
+195, 0x95860982ae370b73
+196, 0xdecfa33b1f902acc
+197, 0xf9b8a57400b7c0a6
+198, 0xd20b822672ec857b
+199, 0x4eb81084096c7364
+200, 0xe535c29a44d9b6ad
+201, 0xdef8b48ebacb2e29
+202, 0x1063bc2b8ba0e915
+203, 0xe4e837fb53d76d02
+204, 0x4df935db53579fb8
+205, 0xa30a0c8053869a89
+206, 0xe891ee58a388a7b5
+207, 0x17931a0c64b8a985
+208, 0xaf2d350b494ce1b3
+209, 0x2ab9345ffbcfed82
+210, 0x7de3fe628a2592f0
+211, 0x85cf54fab8b7e79d
+212, 0x42d221520edab71b
+213, 0x17b695b3af36c233
+214, 0xa4ffe50fe53eb485
+215, 0x1102d242db800e4d
+216, 0xc8dc01f0233b3b6
+217, 0x984a030321053d36
+218, 0x27fa8dc7b7112c0e
+219, 0xba634dd8294e177f
+220, 0xe67ce34b36332eb
+221, 0x8f1351e1894fb41a
+222, 0xb522a3048761fd30
+223, 0xc350ad9bc6729edc
+224, 0xe0ed105bd3c805e1
+225, 0xa14043d2b0825aa7
+226, 0xee7779ce7fc11fdf
+227, 0xc0fa8ba23a60ab25
+228, 0xb596d1ce259afbad
+229, 0xaa9b8445537fdf62
+230, 0x770ab2c700762e13
+231, 0xe812f1183e40cc1
+232, 0x44bc898e57aefbbd
+233, 0xdd8a871df785c996
+234, 0x88836a5e371eb36b
+235, 0xb6081c9152623f27
+236, 0x895acbcd6528ca96
+237, 0xfb67e33ddfbed435
+238, 0xaf7af47d323ce26
+239, 0xe354a510c3c39b2d
+240, 0x5cacdedda0672ba3
+241, 0xa440d9a2c6c22b09
+242, 0x6395099f48d64304
+243, 0xc11cf04c75f655b5
+244, 0x1c4e054d144ddb30
+245, 0x3e0c2db89d336636
+246, 0x127ecf18a5b0b9a7
+247, 0x3b50551a88ea7a73
+248, 0xbd27003e47f1f684
+249, 0xf32d657782baac9b
+250, 0x727f5cabf020bc9
+251, 0x39c1c1c226197dc7
+252, 0x5552c87b35deeb69
+253, 0x64d54067b5ce493f
+254, 0x3494b091fe28dda0
+255, 0xdf0278bc85ee2965
+256, 0xdef16fec25efbd66
+257, 0xe2be09f578c4ce28
+258, 0xd27a9271979d3019
+259, 0x427f6fcd71845e3
+260, 0x26b52c5f81ec142b
+261, 0x98267efc3986ad46
+262, 0x7bf4165ddb7e4374
+263, 0xd05f7996d7941010
+264, 0x3b3991de97b45f14
+265, 0x9068217fb4f27a30
+266, 0xd8fe295160afc7f3
+267, 0x8a159fab4c3bc06f
+268, 0x57855506d19080b6
+269, 0x7636df6b3f2367a4
+270, 0x2844ee3abd1d5ec9
+271, 0xe5788de061f51c16
+272, 0x69e78cc9132a164
+273, 0xacd53cde6d8cd421
+274, 0xb23f3100068e91da
+275, 0x4140070a47f53891
+276, 0xe4a422225a96e53a
+277, 0xb82a8925a272a2ac
+278, 0x7c2f9573590fe3b7
+279, 0xbaf80764db170575
+280, 0x955abffa54358368
+281, 0x355ce7460614a869
+282, 0x3700ede779a4afbf
+283, 0x10a6ec01d92d68cd
+284, 0x3308f5a0a4c0afef
+285, 0x97b892d7601136c9
+286, 0x4955c3b941b8552e
+287, 0xca85aa67e941961d
+288, 0xb1859ae5db28e9d2
+289, 0x305d072ac1521fbd
+290, 0xed52a868996085bb
+291, 0x723bfa6a76358852
+292, 0x78d946ecd97c5fb3
+293, 0x39205b30a8e23e79
+294, 0xb927e3d086baadbe
+295, 0xa18d6946136e1ff5
+296, 0xdab6f0b51c1eb5ff
+297, 0xf0a640bf7a1af60c
+298, 0xf0e81db09004d0d4
+299, 0xfe76cebdbe5a4dde
+300, 0x2dafe9cc3decc376
+301, 0x4c871fdf1af34205
+302, 0xe79617d0c8fa893b
+303, 0xee658aaad3a141f7
+304, 0xfd91aa74863e19f1
+305, 0x841b8f55c103cc22
+306, 0x22766ed65444ad5d
+307, 0x56d03d1beca6c17a
+308, 0x5fd4c112c92036ae
+309, 0x75466ae58a5616dc
+310, 0xfbf98b1081e802a9
+311, 0xdc325e957bf6d8f5
+312, 0xb08da7015ebd19b7
+313, 0xf25a9c0944f0c073
+314, 0xf4625bafa0ced718
+315, 0x4349c9e093a9e692
+316, 0x75a9ccd4dd8935cb
+317, 0x7e6cf9e539361e91
+318, 0x20fdd22fb6edd475
+319, 0x5973021b57c2311f
+320, 0x75392403667edc15
+321, 0xed9b2156ea70d9f1
+322, 0xf40c114db50b64a0
+323, 0xe26bb2c9eef20c62
+324, 0x409c1e3037869f03
+325, 0xcdfd71fdda3b7f91
+326, 0xa0dfae46816777d6
+327, 0xde060a8f61a8deb8
+328, 0x890e082a8b0ca4fc
+329, 0xb9f2958eddf2d0db
+330, 0xd17c148020d20e30
+331, 0xffdc9cc176fe7201
+332, 0xffb83d925b764c1
+333, 0x817ea639e313da8d
+334, 0xa4dd335dd891ca91
+335, 0x1342d25a5e81f488
+336, 0xfa7eb9c3cf466b03
+337, 0xfe0a423d44b185d0
+338, 0x101cfd430ab96049
+339, 0x7b5d3eda9c4504b
+340, 0xe20ccc006e0193f1
+341, 0xf54ccddedebc5df0
+342, 0xc0edd142bd58f1db
+343, 0x3831f40d378d2430
+344, 0x80132353f0a88289
+345, 0x688f23c419d03ef8
+346, 0x4c6837e697884066
+347, 0x699387bb2e9a3a8f
+348, 0x8996f860342448d8
+349, 0xb0f80dff99bfa5cc
+350, 0x3e927a7f9ea12c8e
+351, 0xd7e498d1e5f9dff3
+352, 0x78ecb97bb3f864cc
+353, 0x3c4ffd069a014d38
+354, 0xf8d5073a1e09b4d4
+355, 0x8717e854f9faef23
+356, 0xfbcc5478d8d0ad7
+357, 0xd3cd8b233ca274ff
+358, 0x8bd8f11f79beb265
+359, 0xf64498a832d8fd0e
+360, 0xb01bba75112131ec
+361, 0x55572445a7869781
+362, 0x7b56622f18cb3d7a
+363, 0x7f192c9e075bdb83
+364, 0xd9a112f836b83ff3
+365, 0x68673b37269653dc
+366, 0xe46a9433fb6a0879
+367, 0x127d756ca4779001
+368, 0xc1378e8b1e8eab94
+369, 0x1006edb0f51d078c
+370, 0xc6dd53961232d926
+371, 0x9a4aeef44038256d
+372, 0xd357f4fa652d4f5f
+373, 0x59f3d2cc3378598
+374, 0xe76e6207a824a7fc
+375, 0x5fc5e33712ceffef
+376, 0x77d24aeb0ccb1adc
+377, 0x5be4b2826805659e
+378, 0x257c69d787e64634
+379, 0x58dd52ca6bc727b1
+380, 0x3ab997767235ea33
+381, 0x986a2a7a966fad14
+382, 0xc900f8b27761dcc4
+383, 0x44991bdb13795700
+384, 0xe5c145a4fe733b2
+385, 0x56f041b56bffe0d3
+386, 0x5779c4fef8067996
+387, 0xa0fe8748e829532d
+388, 0x840c1277d78d9dd4
+389, 0x37ebcb315432acbc
+390, 0xf4bc8738433ba3be
+391, 0x8b122993f2e10062
+392, 0xe1fe8481f2681ed5
+393, 0x8e23f1630d9f494a
+394, 0xda24661a01b7d0b3
+395, 0x7a02942a179cee36
+396, 0xf1e08a3c09b71ac
+397, 0x3dec2cc7ee0bd8fd
+398, 0x1f3e480113d805d4
+399, 0xc061b973ad4e3f2c
+400, 0x6bea750f17a66836
+401, 0xbc2add72eac84c25
+402, 0xcff058d3f97934ca
+403, 0x54ccc30987778ec2
+404, 0x93449ec1e1469558
+405, 0xe2ff369eb0c6836
+406, 0x41c2df2d63bf8e55
+407, 0xf9302629b6c71be2
+408, 0xdd30376b8e5ab29a
+409, 0x12db9e04f911d754
+410, 0x8d03d6cd359f1b97
+411, 0xe15956511abf1cee
+412, 0x9b68e10e2c2fd940
+413, 0x2e28de6491c1ce53
+414, 0x52b329b72d0c109d
+415, 0xc2c0b115f9da2a60
+416, 0x6ca084105271bbff
+417, 0x49b92b8676058c1e
+418, 0x767fc92a70f7e5a3
+419, 0x87ba4ed4b65a6aa0
+420, 0xf70b052e0a3975e9
+421, 0x3e925c3306db9eec
+422, 0x43253f1d96ac9513
+423, 0xe3e04f1a1ea454c4
+424, 0x763e3f4cc81ba0c8
+425, 0x2a2721ac69265705
+426, 0xdf3b0ac6416ea214
+427, 0xa6a6b57450f3e000
+428, 0xc3d3b1ac7dbfe6ac
+429, 0xb66e5e6f7d2e4ec0
+430, 0x43c65296f98f0f04
+431, 0xdb0f6e3ff974d842
+432, 0x3d6b48e02ebb203b
+433, 0xd74674ebf09d8f27
+434, 0xbe65243c58fc1200
+435, 0x55eb210a68d42625
+436, 0x87badab097dbe883
+437, 0xada3fda85a53824f
+438, 0xef2791e8f48cd37a
+439, 0x3fe7fceb927a641a
+440, 0xd3bffd3ff031ac78
+441, 0xb94efe03da4d18fb
+442, 0x162a0ad8da65ea68
+443, 0x300f234ef5b7e4a6
+444, 0xa2a8b4c77024e4fb
+445, 0x5950f095ddd7b109
+446, 0xded66dd2b1bb02ba
+447, 0x8ec24b7fa509bcb6
+448, 0x9bede53d924bdad6
+449, 0xa9c3f46423be1930
+450, 0x6dfc90597f8de8b4
+451, 0xb7419ebc65b434f0
+452, 0xa6596949238f58b9
+453, 0x966cbade640829b8
+454, 0x58c74877bdcbf65e
+455, 0xaa103b8f89b0c453
+456, 0x219f0a86e41179a4
+457, 0x90f534fc06ddc57f
+458, 0x8db7cdd644f1affa
+459, 0x38f91de0167127ac
+460, 0xdcd2a65e4df43daa
+461, 0x3e04f34a7e01f834
+462, 0x5b237eea68007768
+463, 0x7ff4d2b015921768
+464, 0xf786b286549d3d51
+465, 0xaefa053fc2c3884c
+466, 0x8e6a8ff381515d36
+467, 0x35b94f3d0a1fce3c
+468, 0x165266d19e9abb64
+469, 0x1deb5caa5f9d8076
+470, 0x13ab91290c7cfe9d
+471, 0x3651ca9856be3e05
+472, 0xe7b705f6e9cccc19
+473, 0xd6e7f79668c127ed
+474, 0xa9faf37154896f92
+475, 0x89fbf190603e0ab1
+476, 0xb34d155a86f942d0
+477, 0xb2d4400a78bfdd76
+478, 0x7c0946aca8cfb3f0
+479, 0x7492771591c9d0e8
+480, 0xd084d95c5ca2eb28
+481, 0xb18d12bd3a6023e
+482, 0xea217ed7b864d80b
+483, 0xe52f69a755dd5c6f
+484, 0x127133993d81c4aa
+485, 0xe07188fcf1670bfb
+486, 0x178fbfe668e4661d
+487, 0x1c9ee14bb0cda154
+488, 0x8d043b96b6668f98
+489, 0xbc858986ec96ca2b
+490, 0x7660f779d528b6b7
+491, 0xd448c6a1f74ae1d3
+492, 0x178e122cfc2a6862
+493, 0x236f000abaf2d23b
+494, 0x171b27f3f0921915
+495, 0x4c3ff07652f50a70
+496, 0x18663e5e7d3a66ca
+497, 0xb38c97946c750cc9
+498, 0xc5031aae6f78f909
+499, 0x4d1514e2925e95c1
+500, 0x4c2184a741dabfbb
+501, 0xfd410364edf77182
+502, 0xc228157f863ee873
+503, 0x9856fdc735cc09fc
+504, 0x660496cd1e41d60e
+505, 0x2edf1d7e01954c32
+506, 0xd32e94639bdd98cf
+507, 0x8e153f48709a77d
+508, 0x89357f332d2d6561
+509, 0x1840d512c97085e6
+510, 0x2f18d035c9e26a85
+511, 0x77b88b1448b26d5b
+512, 0xc1ca6ef4cdae0799
+513, 0xcc203f9e4508165f
+514, 0xeaf762fbc9e0cbbe
+515, 0xc070c687f3c4a290
+516, 0xd49ed321068d5c15
+517, 0x84a55eec17ee64ee
+518, 0x4d8ee685298a8871
+519, 0x9ff5f17d7e029793
+520, 0x791d7d0d62e46302
+521, 0xab218b9114e22bc6
+522, 0x4902b7ab3f7119a7
+523, 0x694930f2e29b049e
+524, 0x1a3c90650848999f
+525, 0x79f1b9d8499c932b
+526, 0xfacb6d3d55e3c92f
+527, 0x8fd8b4f25a5da9f5
+528, 0xd037dcc3a7e62ae7
+529, 0xfecf57300d8f84f4
+530, 0x32079b1e1dc12d48
+531, 0xe5f8f1e62b288f54
+532, 0x97feba3a9c108894
+533, 0xd279a51e1899a9a0
+534, 0xd68eea8e8e363fa8
+535, 0x7394cf2deeca9386
+536, 0x5f70b0c80f1dbf10
+537, 0x8d646916ed40462
+538, 0xd253bb1c8a12bbb6
+539, 0x38f399a821fbd73e
+540, 0x947523a26333ac90
+541, 0xb52e90affbc52a37
+542, 0xcf899cd964654da4
+543, 0xdf66ae9cca8d99e7
+544, 0x6051478e57c21b6a
+545, 0xffa7dc975af3c1da
+546, 0x195c7bff2d1a8f5
+547, 0x64f12b6575cf984d
+548, 0x536034cb842cf9e1
+549, 0x180f247ce5bbfad
+550, 0x8ced45081b134867
+551, 0x532bbfdf426710f3
+552, 0x4747933e74c4f54d
+553, 0x197a890dc4793401
+554, 0x76c7cc2bd42fae2
+555, 0xdabfd67f69675dd0
+556, 0x85c690a68cdb3197
+557, 0xe482cec89ce8f92
+558, 0x20bc9fb7797011b1
+559, 0x76dc85a2185782ad
+560, 0x3df37c164422117a
+561, 0x99211f5d231e0ab0
+562, 0xef7fd794a0a91f4
+563, 0x419577151915f5fe
+564, 0x3ce14a0a7135dae3
+565, 0x389b57598a075d6a
+566, 0x8cc2a9d51b5af9aa
+567, 0xe80a9beffbd13f13
+568, 0x65e96b22ea8a54d8
+569, 0x79f38c4164138ede
+570, 0xd1955846cba03d81
+571, 0x60359fe58e4f26d6
+572, 0x4ea724f585f8d13e
+573, 0x316dfdbadc801a3c
+574, 0x20aa29b7c6dd66fe
+575, 0x65eaf83a6a008caa
+576, 0x407000aff1b9e8cb
+577, 0xb4d49bfb2b268c40
+578, 0xd4e6fe8a7a0f14a9
+579, 0xe34afef924e8f58e
+580, 0xe377b0c891844824
+581, 0x29c2e20c112d30c8
+582, 0x906aad1fe0c18a95
+583, 0x308385f0efbb6474
+584, 0xf23900481bf70445
+585, 0xfdfe3ade7f937a55
+586, 0xf37aae71c33c4f97
+587, 0x1c81e3775a8bed85
+588, 0x7eb5013882ce35ea
+589, 0x37a1c1692495818d
+590, 0x3f90ae118622a0ba
+591, 0x58e4fe6fea29b037
+592, 0xd10ff1d269808825
+593, 0xbce30edb60c21bba
+594, 0x123732329afd6fee
+595, 0x429b4059f797d840
+596, 0x421166568a8c4be1
+597, 0x88f895c424c1bd7f
+598, 0x2adaf7a7b9f781cb
+599, 0xa425644b26cb698
+600, 0x8cc44d2486cc5743
+601, 0xdb9f357a33abf6ba
+602, 0x1a57c4ea77a4d70c
+603, 0x1dea29be75239e44
+604, 0x463141a137121a06
+605, 0x8fecfbbe0b8a9517
+606, 0x92c83984b3566123
+607, 0x3b1c69180ed28665
+608, 0x14a6073425ea8717
+609, 0x71f4c2b3283238d7
+610, 0xb3d491e3152f19f
+611, 0x3a0ba3a11ebac5d2
+612, 0xddb4d1dd4c0f54ac
+613, 0xdb8f36fe02414035
+614, 0x1cf5df5031b1902c
+615, 0x23a20ed12ef95870
+616, 0xf113e573b2dedcbb
+617, 0x308e2395cde0a9fa
+618, 0xd377a22581c3a7da
+619, 0xe0ced97a947a66fb
+620, 0xe44f4de9cd754b00
+621, 0x2344943337d9d1bf
+622, 0x4b5ae5e2ea6e749c
+623, 0x9b8d2e3ef41d1c01
+624, 0x59a5a53ebbd24c6b
+625, 0x4f7611bf9e8a06fb
+626, 0xea38c7b61361cd06
+627, 0xf125a2bfdd2c0c7
+628, 0x2df8dcb5926b9ebb
+629, 0x233e18720cc56988
+630, 0x974c61379b4aa95e
+631, 0xc7fe24c1c868910b
+632, 0x818fd1affc82a842
+633, 0xcee92a952a26d38e
+634, 0x8962f575ebcbf43
+635, 0x7770687e3678c460
+636, 0xdfb1db4ed1298117
+637, 0xb9db54cb03d434d3
+638, 0x34aebbf2244257ad
+639, 0xd836db0cb210c490
+640, 0x935daed7138957cd
+641, 0x3cd914b14e7948fd
+642, 0xd0472e9ed0a0f7f0
+643, 0xa9df33dca697f75e
+644, 0x15e9ea259398721a
+645, 0x23eeba0f970abd60
+646, 0x2217fdf8bbe99a12
+647, 0x5ea490a95717b198
+648, 0xf4e2bfc28280b639
+649, 0x9d19916072d6f05c
+650, 0x5e0387cab1734c6a
+651, 0x93c2c8ac26e5f01e
+652, 0xb0d934354d957eb1
+653, 0xee5099a1eef3188c
+654, 0x8be0abca8edc1115
+655, 0x989a60845dbf5aa3
+656, 0x181c7ed964eee892
+657, 0x49838ea07481288d
+658, 0x17dbc75d66116b2e
+659, 0xa4cafb7a87c0117e
+660, 0xab2d0ae44cdc2e6e
+661, 0xdf802f2457e7da6
+662, 0x4b966c4b9187e124
+663, 0x62de9db6f4811e1a
+664, 0x1e20485968bc62
+665, 0xe9ac288265caca94
+666, 0xc5c694d349aa8c1a
+667, 0x3d67f2083d9bdf10
+668, 0x9a2468e503085486
+669, 0x9d6acd3dc152d1a3
+670, 0xca951e2aeee8df77
+671, 0x2707371af9cdd7b0
+672, 0x2347ae6a4eb5ecbd
+673, 0x16abe5582cb426f
+674, 0x523af4ff980bbccb
+675, 0xb07a0f043e3694aa
+676, 0x14d7c3da81b2de7
+677, 0xf471f1b8ac22305b
+678, 0xdb087ffff9e18520
+679, 0x1a352db3574359e8
+680, 0x48d5431502cc7476
+681, 0x7c9b7e7003dfd1bf
+682, 0x4f43a48aae987169
+683, 0x9a5d3eb66dedb3e9
+684, 0xa7b331af76a9f817
+685, 0xba440154b118ab2d
+686, 0x64d22344ce24c9c6
+687, 0xa22377bd52bd043
+688, 0x9dfa1bb18ca6c5f7
+689, 0xdccf44a92f644c8b
+690, 0xf623d0a49fd18145
+691, 0x556d5c37978e28b3
+692, 0xad96e32ce9d2bb8b
+693, 0x2e479c120be52798
+694, 0x7501cf871af7b2f7
+695, 0xd02536a5d026a5b8
+696, 0x4b37ff53e76ab5a4
+697, 0xdb3a4039caaeab13
+698, 0x6cbd65e3b700c7be
+699, 0x7367abd98761a147
+700, 0xf4f9ba216a35aa77
+701, 0xf88ca25ce921eb86
+702, 0xb211de082ec2cbf2
+703, 0xdd94aa46ec57e12e
+704, 0xa967d74ad8210240
+705, 0xdaa1fada8cfa887
+706, 0x85901d081c4488ee
+707, 0xcf67f79a699ef06
+708, 0x7f2f1f0de921ee14
+709, 0x28bc61e9d3f2328b
+710, 0x3332f2963faf18e5
+711, 0x4167ac71fcf43a6
+712, 0x843c1746b0160b74
+713, 0xd9be80070c578a5e
+714, 0xbd7250c9af1473e7
+715, 0x43f78afaa3647899
+716, 0x91c6b5dd715a75a5
+717, 0x29cc66c8a07bfef3
+718, 0x3f5c667311dc22be
+719, 0x4f49cd47958260cd
+720, 0xbef8be43d920b64e
+721, 0x7a892a5f13061d8b
+722, 0x9532f40125c819b1
+723, 0x924fca3045f8a564
+724, 0x9b2c6442453b0c20
+725, 0x7e21009085b8e793
+726, 0x9b98c17e17af59d2
+727, 0xba61acb73e3ae89a
+728, 0xb9d61a710555c138
+729, 0xc2a425d80978974b
+730, 0xa275e13592da7d67
+731, 0xe962103202d9ad0f
+732, 0xbdf8367a4d6f33fd
+733, 0xe59beb2f8648bdc8
+734, 0xb4c387d8fbc4ac1c
+735, 0x5e3f276b63054b75
+736, 0xf27e616aa54d8464
+737, 0x3f271661d1cd7426
+738, 0x43a69dbee7502c78
+739, 0x8066fcea6df059a1
+740, 0x3c10f19409bdc993
+741, 0x6ba6f43fb21f23e0
+742, 0x9e182d70a5bccf09
+743, 0x1520783d2a63a199
+744, 0xba1dcc0c70b9cace
+745, 0x1009e1e9b1032d8
+746, 0xf632f6a95fb0315
+747, 0x48e711c7114cbfff
+748, 0xef281dcec67debf7
+749, 0x33789894d6abf59b
+750, 0x6c8e541fffbe7f9c
+751, 0x85417f13b08e0a88
+752, 0x9a581e36d589608f
+753, 0x461dca50b1befd35
+754, 0x5a3231680dde6462
+755, 0xcc57acf729780b97
+756, 0x50301efef62e1054
+757, 0x675d042cd4f6bbc9
+758, 0x1652fdd3794384c9
+759, 0x1c93bbeeb763cd4d
+760, 0x44b7240c4b105242
+761, 0x4c6af2a1b606ccfb
+762, 0x18fc43ece2ec1a40
+763, 0x859a5511aeae8acb
+764, 0x2f56826f1996ad2f
+765, 0xa8e95ce8bb363bdf
+766, 0xf4da396054e50e4b
+767, 0x5493865e9895883c
+768, 0x768e4c8b332ac0e3
+769, 0x32195d2aa583fca5
+770, 0xf2f353f21266bc15
+771, 0x43cddf1d021307d
+772, 0x6031e3aa30300e4a
+773, 0x4f1298469ac6088f
+774, 0x4b4d450bafac574e
+775, 0x23e1cf9c0582a22b
+776, 0x2e9036980db49cd0
+777, 0xe4e228b113c411b2
+778, 0x8bddcdb82b51706
+779, 0xd2a7ea8288593629
+780, 0x67fe90e98fdda61
+781, 0x7b63494dba95717b
+782, 0x105625904510d782
+783, 0xdf4aa2242454e50a
+784, 0x32541d6cd7d6c7e3
+785, 0x5661fb432591cf3b
+786, 0xce920a5ed047bce7
+787, 0xed4178a3c96eea8f
+788, 0xe378cd996e39863b
+789, 0x169e1fdc8e2b05e1
+790, 0xaee1812ef7149a96
+791, 0x648571c7453d12c5
+792, 0xb7b6bc9328573c43
+793, 0xe7fb969078e270d7
+794, 0xdfc2b1b8985f6e6f
+795, 0x862b6527ee39a1aa
+796, 0x1ee329aea91d7882
+797, 0x20d25324f2fe704
+798, 0xbfcc47401fc3bbfd
+799, 0x1515cdc8d48b2904
+800, 0xbd6eefe86284261c
+801, 0x9b1f28e3b35f22ee
+802, 0x842a29d35e5aecda
+803, 0xf2346109ad370765
+804, 0x24d68add5a71afd9
+805, 0x4a691421613d91e2
+806, 0x60e3058b3c244051
+807, 0x79194905cdaa5de8
+808, 0xe0e2df35c01e8987
+809, 0xe29b78beffbb5e4a
+810, 0xcdcdbc020218c19e
+811, 0x5ae0af8c16feae43
+812, 0x8109292feeaf14fa
+813, 0x34113f7508dfa521
+814, 0xc062ac163f56730a
+815, 0xf1660e66ec6d4c4c
+816, 0x5966c55f60151c80
+817, 0x3865ae8ec934b17
+818, 0x472a7314afb055ec
+819, 0x7a24277309a44a44
+820, 0x556e02dd35d38baa
+821, 0x9849611a1bc96ec1
+822, 0xd176f5d5a8eb0843
+823, 0x44db12ec60510030
+824, 0x272e3a06a0030078
+825, 0x7c4764dbefc075ea
+826, 0x910712f3735c1183
+827, 0xd49a2da74ae7aff6
+828, 0xcf9b3e6e8f776d71
+829, 0x27789fe3ec481a02
+830, 0x86659f82c6b5912b
+831, 0xe044b3dbf339158c
+832, 0x99d81f6bb62a37b0
+833, 0x5f5830c246fada9a
+834, 0xe68abab1eeb432cb
+835, 0x49c5c5ace04e104
+836, 0x1ac3871b3fc6771b
+837, 0x773b39f32d070652
+838, 0x9c4138c2ae58b1f3
+839, 0xac41c63d7452ac60
+840, 0x9248826b245359e1
+841, 0x99bba1c7a64f1670
+842, 0xe0dc99ff4ebb92f2
+843, 0x113638652740f87c
+844, 0xebf51e94da88cfc
+845, 0x5441c344b81b2585
+846, 0xe1e69e0bc2de652a
+847, 0xe9ab6d64ae42ed1e
+848, 0x879af8730e305f31
+849, 0x36b9ad912c7e00d6
+850, 0x83ef5e9fca853886
+851, 0xda54d48bb20ea974
+852, 0x32c6d93aefa92aa2
+853, 0x4e887b2c3391847d
+854, 0x50966e815f42b1b8
+855, 0x53411ac087832837
+856, 0x46f64fef79df4f29
+857, 0xb34aae3924cd272c
+858, 0xf5ad455869a0adbe
+859, 0x8351ded7144edac8
+860, 0xeb558af089677494
+861, 0x36ed71d69293a8d6
+862, 0x659f90bf5431b254
+863, 0x53349102b7519949
+864, 0x3db83e20b1713610
+865, 0x6d63f96090556254
+866, 0x4cc0467e8f45c645
+867, 0xb8840c4bd5cd4091
+868, 0xbd381463cc93d584
+869, 0x203410d878c2066d
+870, 0x2ebea06213cf71c8
+871, 0x598e8fb75e3fceb4
+872, 0xdcca41ceba0fce02
+873, 0x61bf69212b56aae5
+874, 0x97eed7f70c9114fa
+875, 0xf46f37a8b7a063f9
+876, 0x66c8f4ffe5bd6efa
+877, 0xe43fd6efda2d4e32
+878, 0x12d6c799e5ad01de
+879, 0x9ac83e7f8b709360
+880, 0xbbb7bb3c1957513d
+881, 0x7f87c08d4b3796b0
+882, 0x9a7d1d74b6aa4a5c
+883, 0xa4314530ff741b6f
+884, 0x99a80c6b6f15fca8
+885, 0xd2fec81d6d5fc3ce
+886, 0x15a98be1cc40cea
+887, 0x98693eb7719366f3
+888, 0x36ccdc2a9e9d4de8
+889, 0x3c8208f63d77df25
+890, 0xca2e376e2343df6
+891, 0xcc9b17cbb54420c6
+892, 0x8724c44a64d7dcb8
+893, 0x9d00c6949ff33869
+894, 0xf4f8e584d2699372
+895, 0x88f4748cdd5a2d53
+896, 0xe215072a1205bc6d
+897, 0x190934fe6d740442
+898, 0x7fac5c0ab2af106d
+899, 0x1b86633a0bd84fa1
+900, 0x1293e54318492dfb
+901, 0x433324fd390f34b9
+902, 0x4c5eb2c67a44643b
+903, 0x59a6e281c388b0dd
+904, 0xe78e03f9c44623b7
+905, 0x91307a93c768fc3d
+906, 0xde8867b004d8e3ff
+907, 0xdf52c3f57b7c5862
+908, 0x993f3e1d10358a92
+909, 0x9ccb10bc3e18662d
+910, 0x45093ce48a114c73
+911, 0xd59d05979d26330a
+912, 0x417c0e03300119a9
+913, 0x1c336500f90cde81
+914, 0x1c8ccd29ead9b85b
+915, 0xb76baf3e55d4d950
+916, 0x133ad6196c75fd7e
+917, 0x34200b0cde7ed560
+918, 0x9c7c3dacb213c8d9
+919, 0xd97563c4fd9bf1b6
+920, 0x5d910e871835b6cb
+921, 0x7d46c4733a16bdf9
+922, 0xe41d73194ddc87b2
+923, 0x7d3d8a0855a465a9
+924, 0x70c2a8b5d3f90c0f
+925, 0x9e7565ca5dccfe12
+926, 0x2c0acb4577aa51b1
+927, 0x3d2cd211145b79c7
+928, 0x15a7b17aa6da7732
+929, 0xab44a3730c27d780
+930, 0xf008bd6c802bde3a
+931, 0x82ed86ddf3619f77
+932, 0xaabe982ab15c49f9
+933, 0x9bcad8fa6d8e58a4
+934, 0x8f39ed8243718aa1
+935, 0xe9489340e03e3cb6
+936, 0xc722314f5eefb8d0
+937, 0x870e8869a436df59
+938, 0x4dae75b8087a8204
+939, 0xe1d790f6ec6e425b
+940, 0xafd39ea1b1d0ed09
+941, 0xdf2c99e464ddf08f
+942, 0x74936d859ab9644d
+943, 0x3871302164250e73
+944, 0x764b68921e911886
+945, 0x2a1d024b26bb9d66
+946, 0x797fba43918e75b4
+947, 0x62ec6d24ccca335b
+948, 0xf4bd8b951762b520
+949, 0x9d450dede9119397
+950, 0x5393a26d10f8c124
+951, 0x6b74769392896b57
+952, 0x7f61dbcc0e328581
+953, 0x64e1df3884d0d94
+954, 0xba77dcdf23738c37
+955, 0xf8e288bc0a177475
+956, 0x4a8abfd1702ecb7d
+957, 0x53f22886694736a7
+958, 0x8fc982597ced3e3
+959, 0x1bc46090f820fff7
+960, 0x8bd31f965d02229f
+961, 0x65cd0cb29996ee53
+962, 0x702e0f4fcf8c2e9f
+963, 0x293b77bff307a9a0
+964, 0x125a986b8b305788
+965, 0x416b0eea428ebf3c
+966, 0xeac85421ab0e8469
+967, 0x7f5496095019aa68
+968, 0x1a96d7afbc708e0
+969, 0xb91262e6766e01e1
+970, 0xd0a549cc4ccc6954
+971, 0x75a9a073f50c8a0d
+972, 0xae275d2c1c6cd23c
+973, 0xcf159b5ec5d28fd4
+974, 0x75d0838ce9b92b
+975, 0xd4eddcee6dc4677f
+976, 0x6a0a8ad5df6b75b8
+977, 0x6f3fd0ef0f13ecc4
+978, 0xb75a5826c1a8f8a8
+979, 0xd47098bbc7943766
+980, 0x3d4ddd62d5f23dd1
+981, 0x760a904e4583841c
+982, 0x2afeb5022b4cf1f
+983, 0x66d5f653729f0a13
+984, 0x9a6a5ab62980d30f
+985, 0xc332f5643bbf8d5b
+986, 0x848fb702e4056a90
+987, 0xa057beaf3f9e8c5f
+988, 0x6cc603e4560a6c6a
+989, 0xec761811a7b23211
+990, 0xb14aa4090a82aaa5
+991, 0xe29d9d028a5b2dbb
+992, 0x5564e53738d68f97
+993, 0xfabca36542eaaf3b
+994, 0xb9912fcb782020a2
+995, 0xe865e01b349284fd
+996, 0x540b5ff11c5f9274
+997, 0x3463f64e1e7451dc
+998, 0xe15d3e2f33b735f8
+999, 0xf5433336eadef6e
diff --git a/lib/python3.12/site-packages/numpy/random/tests/data/sfc64-testset-2.csv b/lib/python3.12/site-packages/numpy/random/tests/data/sfc64-testset-2.csv
new file mode 100644
index 0000000000000000000000000000000000000000..70aebd5d539256e0abd453bb45828b691c6abdf0
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/random/tests/data/sfc64-testset-2.csv
@@ -0,0 +1,1001 @@
+seed, 0x0
+0, 0x91959e5fb96a6332
+1, 0x3c1dd8a25a7e9f21
+2, 0x657bdffc99798d9e
+3, 0x1a04de320b19e022
+4, 0x65b92af0e5f3c61c
+5, 0x9c84070ce8f743c0
+6, 0xbb10e573693cdb25
+7, 0xd65ea9e76b37fb6b
+8, 0x503efd0e76c8ae66
+9, 0xd711dcd04c26d0f
+10, 0x12f53f435814ac8c
+11, 0xb392cd402cfc82bd
+12, 0x461764550e06c889
+13, 0x716a48b3514e6979
+14, 0xdd0a322213c18ad7
+15, 0x6673a8ca0a05c4d7
+16, 0x2992ef333437f844
+17, 0xc4aaf7e8240b2aad
+18, 0x6ab0a1af1f41474f
+19, 0xb0bae400c226941d
+20, 0xe5f80c2eeeab48c6
+21, 0x3832c6a93a4024bf
+22, 0x280bd824fabe8368
+23, 0x66b626228321e5ff
+24, 0xe0bdfba5325a307e
+25, 0x3a5f65c6ef254e05
+26, 0x99ea12503cb02f94
+27, 0x5d01fd2db77d420b
+28, 0x6959bf5f36b2368d
+29, 0xd856e30c62b5f5be
+30, 0xe33233e1d8140e66
+31, 0xb78be619d415fa8d
+32, 0x4f943bb2cc63d3b
+33, 0x9b1460b290952d81
+34, 0x19205d794826740e
+35, 0x64617bd9d7a6a1ff
+36, 0x30442124b55ea76a
+37, 0xebbbc3b29d0333fc
+38, 0x39235a0fe359751c
+39, 0xf9629768891121aa
+40, 0x32052f53f366e05a
+41, 0x60cc5b412c925bc8
+42, 0xf8b7ecda1c0e5a9
+43, 0x195f036e170a2568
+44, 0xfe06d0381a9ca782
+45, 0x919d89e8b88eebbf
+46, 0xa47fb30148cf0d43
+47, 0x5c983e99d5f9fd56
+48, 0xe7492cdb6a1d42cd
+49, 0xf9cfe5c865b0cfd8
+50, 0x35b653367bbc3b99
+51, 0xb1d92f6f4d4e440b
+52, 0x737e1d5bd87ed9c0
+53, 0x7a880ca1498f8e17
+54, 0x687dae8494f9a3f7
+55, 0x6bae1989f441d5d7
+56, 0x71ad3fa5a9195c2e
+57, 0x16b3969779f5d03
+58, 0xd1bce2ac973f15b3
+59, 0xa114b1ee2ce0dcdd
+60, 0x270d75c11eb1b8d5
+61, 0xc48ffa087c0a7bc
+62, 0xaaf9dc48cda9848d
+63, 0x8111cf10ef6e584d
+64, 0x6736df6af40ee6f4
+65, 0x1a1a111682fbf98d
+66, 0xeb217658e1cb3b5d
+67, 0xcaf58a8b79de9dec
+68, 0x25d0ffd63c88d7a1
+69, 0x4c498cd871b7f176
+70, 0x4069a6156eb0cf3c
+71, 0xdf012f12edcdd867
+72, 0x7734c0ac8edb1689
+73, 0xed6960ac53dbc245
+74, 0x305e20da8868c661
+75, 0x5f0c7a3719956f95
+76, 0x66842bbe3b28895
+77, 0xb608bc9a31eac410
+78, 0xfcb17d5529503abd
+79, 0x829ae5cbc29b92ee
+80, 0x17f2f0027bc24f3a
+81, 0x435926c33d8f44cc
+82, 0x3ab899327098dbec
+83, 0xaf78573b27f8ead8
+84, 0xa8b334fabcf8dc60
+85, 0xcdf3b366a6a303db
+86, 0x8da9379dd62b34c8
+87, 0xb0ba511955f264a7
+88, 0x9d72e21a644f961d
+89, 0xfac28382e2e7e710
+90, 0xd457065f048410aa
+91, 0x1cae57d952563969
+92, 0x5a160a6223253e03
+93, 0x2c45df736d73c8bd
+94, 0x7f651ebc6ad9cec5
+95, 0x77a6be96c7d2e7e7
+96, 0x1721fb1dbfd6546a
+97, 0xf73f433ecff3c997
+98, 0xed1e80f680965bfe
+99, 0x6705ad67a3003b30
+100, 0xac21134efcadb9f7
+101, 0x4d2ba0a91d456ac
+102, 0x59da7b59434eb52b
+103, 0x26c1d070fd414b5f
+104, 0xed7079ddfce83d9a
+105, 0x9277d21f88e0fb7a
+106, 0xfae16b9a8d53d282
+107, 0xb08a0e2e405fdf7d
+108, 0x2ea20df44229d6ec
+109, 0x80e4634cd3612825
+110, 0xbe62e8aeba8f8a1a
+111, 0x4981209769c190fb
+112, 0xcec96ef14c7e1f65
+113, 0x73fe4457b47e7b53
+114, 0x1d66300677315c31
+115, 0xe26821290498c4cc
+116, 0xf6110248fd8fb1c5
+117, 0x30fd7fe32dbd8be3
+118, 0x534ec9b910a2bd72
+119, 0x8f9bfe878bbf7382
+120, 0x4f4eb5295c0c2193
+121, 0xdeb22f03a913be9e
+122, 0x40f716f8e2a8886c
+123, 0xc65007d0e386cdb1
+124, 0x9bdd26d92b143a14
+125, 0xf644b0b77ea44625
+126, 0x75f5a53f6b01993a
+127, 0xfe803e347bf41010
+128, 0x594bff5fa17bc360
+129, 0x3551edfb450373c7
+130, 0x898f9dad433615db
+131, 0x923d2406daa26d49
+132, 0x99e07faccbc33426
+133, 0x7389f9ff4470f807
+134, 0xdc2a25957c6df90b
+135, 0x33c6d8965ef3053f
+136, 0x51a8f07e838f1ab
+137, 0x91c5db369380274f
+138, 0xc37de65ac56b207e
+139, 0xfcc6d2375dde7f14
+140, 0xa4e6418bff505958
+141, 0x4b8b9f78e46953c4
+142, 0x255ab2e0f93cf278
+143, 0xdf650717af3d96ef
+144, 0x2caa21cba3aae2b2
+145, 0xce7e46c6f393daa4
+146, 0x1d5b3573f9997ac7
+147, 0x5280c556e850847d
+148, 0x32edc31bef920ad7
+149, 0xefaa6b0b08cf2c6
+150, 0x5151c99d97b111c5
+151, 0x35ccf4bf53d17590
+152, 0xa210d7bd8697b385
+153, 0xa9419f95738fbe61
+154, 0xdeccf93a1a4fdc90
+155, 0xd0ea3365b18e7a05
+156, 0x84122df6dcd31b9a
+157, 0x33040a2125cea5f5
+158, 0xfe18306a862f6d86
+159, 0xdb97c8392e5c4457
+160, 0xc3e0fa735e80e422
+161, 0x7d106ff36467a0c1
+162, 0xb9825eecc720a76d
+163, 0x7fefc6f771647081
+164, 0xf5df3f5b3977bf13
+165, 0x18fb22736d36f1e0
+166, 0xadc4637b4953abfc
+167, 0x174e66d3e17974bd
+168, 0xf1614c51df4db5db
+169, 0x6664ecde5717b293
+170, 0xd5bc5b6839265c26
+171, 0xf6ca9ce1af3f1832
+172, 0xca696789a9d506ea
+173, 0x7399c246c8f9d53
+174, 0xadf49049626417e2
+175, 0xbcd84af37d09ab91
+176, 0xbb41c177f3a3fa45
+177, 0x592becc814d55302
+178, 0xa88b4e65f6cfe5f7
+179, 0xa0a55e34ff879426
+180, 0x3c2ea6aa725b42b7
+181, 0x65ac4a407b1f9521
+182, 0xde63d53f7e88b556
+183, 0x18bc76696d015f40
+184, 0xd1363f2cd4c116a8
+185, 0x2fe859be19a48e4a
+186, 0x83d6099b1415e656
+187, 0x43f2cbc1a4ee6410
+188, 0xb2eca3d3421c533d
+189, 0xc52b98ea3f031f5d
+190, 0xfe57eb01da07e9d1
+191, 0xf9377883537a6031
+192, 0x364030c05dac7add
+193, 0x6815cb06b35d4404
+194, 0xceae2d4ce31894be
+195, 0xc602bcdf6062bf6a
+196, 0xc8e4bd8dcc6062e3
+197, 0x9c29e87b92a1a791
+198, 0x41e626b871ca9651
+199, 0x325c3d1fb8efbcd8
+200, 0x7dbbacf8e3419fb3
+201, 0x3602e72516bb7319
+202, 0x537a008ebd94d24b
+203, 0xda7714fc9d4d161d
+204, 0x1c8c73700e1b621b
+205, 0x2749b80937d6c939
+206, 0x76ee6abac5b14d33
+207, 0xf18d1e92cb6a8b5c
+208, 0x6ce9579d9291c721
+209, 0x60523c745a40e58
+210, 0x637f837fcc901757
+211, 0x2ff71b19661dc5b3
+212, 0x393ab586326ad16f
+213, 0xa0970ea30fe742b7
+214, 0x570222d7f27fe5ae
+215, 0x3b5806d43fd38629
+216, 0x129a0ad7420180c5
+217, 0x1c4726355778d52c
+218, 0x7c1459cf77656499
+219, 0xfe038a0932132069
+220, 0x4c4cc317a937483a
+221, 0xa333d24067e926ba
+222, 0x401d9b6ab37f6ef2
+223, 0x87ad0e491ebe4a2a
+224, 0xfc02f312e72d121d
+225, 0xfde715b3b99767b2
+226, 0xd111c342ba521c92
+227, 0x83b221b10879c617
+228, 0x6a1bf5c01fdf4277
+229, 0x166bfc0c3f5892ee
+230, 0x4608d556d7c57856
+231, 0x8d786857c95ece49
+232, 0x2d357445a1aca4ac
+233, 0x79620dae28ecd796
+234, 0x90e715dc0f2201c4
+235, 0x173b68b4c9f4b665
+236, 0x4e14d040ebac4eef
+237, 0xbd25960b4b892e
+238, 0x911a199db6f1989d
+239, 0xfe822d7c601fd2e0
+240, 0x9b4c1d58d8223a69
+241, 0x907c1891283843b0
+242, 0xf4868bf54061c4b2
+243, 0x17f8cd1fc24efd85
+244, 0xd44253f9af14c3aa
+245, 0x16d0da0cb911d43c
+246, 0x3c6a46615828e79a
+247, 0x498591c1138e11a5
+248, 0xcc0f26336d0d6141
+249, 0x4d3ebc873212309a
+250, 0x16bad7792d5c2c6a
+251, 0x474215a80b2bbd11
+252, 0x7159848abd8492fc
+253, 0x359341c50973685f
+254, 0x27512ee7bf784a4a
+255, 0x45228ea080f70447
+256, 0x880cab616500d50e
+257, 0x12fae93f9830d56e
+258, 0x6744ee64348d9acd
+259, 0x484dada28cd2a828
+260, 0x98491d0729e41863
+261, 0x2f15aac43c2863b0
+262, 0x5727a34d77a1da0f
+263, 0xa435cebef6a62eed
+264, 0xd211697d57b053b0
+265, 0x65aa757b68bd557
+266, 0xe3a1b7a2d8a3e06a
+267, 0x2adf64e67252a7a9
+268, 0xadadcb75cadee276
+269, 0x7934bc57ac8d97bf
+270, 0xccff0d0f412e0606
+271, 0x101a82aa3e8f3db9
+272, 0xb0f2498094b4575c
+273, 0xba2561d9ef26ed8a
+274, 0xfbcd1268fc3febe1
+275, 0x9aa10bb19eb152e0
+276, 0xf496217a601a6d72
+277, 0xe4be1e4f2fa91363
+278, 0x473a602bf3dd68eb
+279, 0xfe8ed2a48c26f4b5
+280, 0x20e94b1a00159476
+281, 0x93e1cb1c6af86ec7
+282, 0x4fcba3898f7442ba
+283, 0x5150c3a3d94891df
+284, 0x91cfce6c85b033ea
+285, 0x625e8a832a806491
+286, 0x28c97ba72e3ec0b2
+287, 0x8e172de217c71ea1
+288, 0x926b80216c732639
+289, 0x28b19431a649ae3d
+290, 0x57c039a6e95a3795
+291, 0xfbc354182fe52718
+292, 0x819dfd7c7d534cef
+293, 0xabb4093a619ed44f
+294, 0xe785b7ac6f656745
+295, 0xb647b4588b2f942f
+296, 0x64cf870a14c72d27
+297, 0x6d4a4a2a0ba9b37e
+298, 0x78bfb0427d7ce6b0
+299, 0x8dcc72b8bfc79ac6
+300, 0x1c14d915d5e76c99
+301, 0xaf48ddea6f096d79
+302, 0x51b39b67aa130d8
+303, 0x1aeeb39d4def06de
+304, 0xd678092ffedfdd27
+305, 0x8f54787f325111d3
+306, 0xf2ca2e827beaa6bc
+307, 0x339d134099e98545
+308, 0x1f6a8a7b33942e43
+309, 0x952c8065dbef669a
+310, 0xe066aeb6690147f7
+311, 0xed25aa92cf58ebb6
+312, 0x7601edce215ef521
+313, 0xed1c5b396abd9434
+314, 0x4fd1e407535de9d5
+315, 0xccc8315a0d4d1441
+316, 0x85753e250bb86976
+317, 0xf232e469378761c3
+318, 0x81d691b8e9aef3c6
+319, 0x224a2f9cab0ad0e
+320, 0x978f3d3e50007f4e
+321, 0xd3713e6a6c0cbe60
+322, 0xcce8f1eadd41f80d
+323, 0x34bda028a97d469
+324, 0x90e242fdf0f59183
+325, 0x4d749754fbc5f092
+326, 0x4399f5b7851cc87b
+327, 0xcb921a5f25f6c5d7
+328, 0x120bf5d0162101
+329, 0x1304cc2aa352735a
+330, 0xf7236c5d0d5d417b
+331, 0xc31b320fc1654306
+332, 0xb468c6b23f3fb4e7
+333, 0xb5985b5bfaca4166
+334, 0x898285a1cd2f8375
+335, 0xa13493da372aa7c9
+336, 0x15c80c09c12634e7
+337, 0x9b765c5cc9d438bd
+338, 0xee7da816a9201dcb
+339, 0x92e269f73b5a248e
+340, 0xa8086c5de81400ce
+341, 0xe0053901853d42be
+342, 0x821df32c012f433e
+343, 0x17a6d69ca37387c7
+344, 0x2b10044bfba3501f
+345, 0x8dfd262afc2e8515
+346, 0xd68c2c7b60226371
+347, 0xe81ac114e4416774
+348, 0x5896d60061ebc471
+349, 0xa996e3147811dbd1
+350, 0xa819c7b80ecb3661
+351, 0x982ad71b38afbc01
+352, 0xab152b65aa17b7fe
+353, 0x4582bc282ef187ef
+354, 0xab5a17fe8d9bc669
+355, 0x83664fa9cb0284b7
+356, 0x234c4b0091968f52
+357, 0x8ab5f51805688d37
+358, 0xe9e11186e0c53eda
+359, 0x10df37ef1de2eccf
+360, 0x780f1b0d52db968f
+361, 0x50bd4ff292872cd5
+362, 0x51e681c265f5ad0
+363, 0x842c49660a527566
+364, 0x6e56ee026e9eda87
+365, 0x4cf39e40d8c80393
+366, 0x13e466df371f7e1f
+367, 0xf2ce1799f38e028e
+368, 0x833c8db7adc6ff0e
+369, 0xc6e189abc2ec98f
+370, 0xafebb3721283fec5
+371, 0xb49bc1eb5cc17bdc
+372, 0xf1d02e818f5e4488
+373, 0xe5e9d5b41a1dd815
+374, 0xce8aca6573b1bfe5
+375, 0x9b0a5d70e268b1d5
+376, 0xf3c0503a8358f4de
+377, 0x2681605dd755669d
+378, 0xea265ca7601efc70
+379, 0xa93747f0a159439f
+380, 0x62a86ede78a23e50
+381, 0xac8a18935c3d063c
+382, 0x729c0a298f5059f5
+383, 0xbbf195e5b54399f4
+384, 0x38aa9d551f968900
+385, 0x3b3e700c58778caa
+386, 0x68e6e33c4443957a
+387, 0x7c56fc13eb269815
+388, 0xaf7daca39711804a
+389, 0x50fde6d10f9544b3
+390, 0xf3d37159f6f6c03d
+391, 0x82d298f5c1a71685
+392, 0x478661ac54c5002c
+393, 0x6053768e1a324ae0
+394, 0xde8fb4a7e56707ea
+395, 0xaa2809301faa8cf4
+396, 0x690a8d49fedd0722
+397, 0xe17c481b9c217de9
+398, 0x60d1d8a2b57288e3
+399, 0x149adfaadc6b0886
+400, 0xa3c18b6eb79cd5fa
+401, 0x5774e3a091af5f58
+402, 0x2acca57ff30e5712
+403, 0x94454d67367c4b0c
+404, 0x581b2985ac2df5ca
+405, 0x71618e50744f3e70
+406, 0x270a7f3bd9a94ae6
+407, 0x3ef81af9bb36cd7b
+408, 0x8a4a2592875254aa
+409, 0x704ac6086fbb414a
+410, 0xda774d5d3f57414d
+411, 0xe20d3358b918ae9e
+412, 0x934a6b9f7b91e247
+413, 0xf91649cde87ec42c
+414, 0x248cec5f9b6ced30
+415, 0x56791809fd8d64ba
+416, 0xf502b2765c1395f
+417, 0x6b04ec973d75aa7f
+418, 0xb0339f2794bb26f
+419, 0x4c524636efbaea49
+420, 0x6bbf3876e9738748
+421, 0xf686524e754e9e24
+422, 0x8dafa05a42d19cd3
+423, 0xc5f069ab2434008e
+424, 0x4fd64cc713cba76
+425, 0xdbf93450c881ed5f
+426, 0x492e278ebabb59a2
+427, 0x993fddfde4542642
+428, 0xecde68a72c8d4e52
+429, 0xe0760b3074c311fd
+430, 0x68dc0e7e06528707
+431, 0x52b50edf49c0fdc7
+432, 0xb2bd4185c138f412
+433, 0x431496d7e1d86f3
+434, 0xa4e605b037e26c44
+435, 0x58236ae1f0aca2b5
+436, 0x26c72c420fc314d8
+437, 0x20134e982ab99a2b
+438, 0x544b59b8b211374b
+439, 0x1301c42f3a14d993
+440, 0x52a6ea740f763b0f
+441, 0xf209d70c2bebf119
+442, 0xac66a4ebc2aa1be
+443, 0x683713ed35878788
+444, 0x2b5578acec06b80c
+445, 0x86428efa11c45b36
+446, 0xb49010adb17d291e
+447, 0x73b686bd8664b6be
+448, 0x6d28ebf57b6884cc
+449, 0x9712091230ff58d9
+450, 0xc9c91f74c38b286
+451, 0x776310ac41dc008e
+452, 0x2f3739df0bf6a88e
+453, 0x5792dc62b94db675
+454, 0x5715910d024b06af
+455, 0xeb1dd745458da08
+456, 0xfce7b07ccfa851a7
+457, 0xc305f1e983ac368
+458, 0x485aa9519ac00bb0
+459, 0xa5354f6589fb0ea0
+460, 0x32fee02dfdbf4454
+461, 0x4d1ddc304bbefaaa
+462, 0x789a270a1737e57e
+463, 0x9f3072f4b1ed8156
+464, 0x4de3c00e89058120
+465, 0xb00a02529e0a86fa
+466, 0x539f6f0edd845d9a
+467, 0x85e578fe15a8c001
+468, 0xa12c8e1a72cce7d8
+469, 0xc6908abbc2b1828
+470, 0xcf70090774cbb38c
+471, 0x3b636a6977b45d4a
+472, 0xf0a731b220680b57
+473, 0x18973929f51443a8
+474, 0xe93e1fbe7eadabe
+475, 0x8233730f0a6dfa02
+476, 0x66e50b6919b0ab74
+477, 0xb1aba87c97fd08a2
+478, 0xd4dffc1fbc117ad6
+479, 0x6f7fa65724b96e6a
+480, 0x4bd5800dee92e0fa
+481, 0xe18a959db6256da
+482, 0xe53a291bc66df487
+483, 0xb7ec306a08651806
+484, 0x1847a6b80d2821e1
+485, 0xda50391283b14d39
+486, 0xacc4d3cd7cceb97a
+487, 0x57f70185165b7bc6
+488, 0x302b6d597c3aaba7
+489, 0xa47f32d037eab51e
+490, 0xe1509b4408abc559
+491, 0x4f30a1d7c2934157
+492, 0x2ad03e6c60b650b2
+493, 0x334d9c337b0a9064
+494, 0xc7f442821e7aac12
+495, 0xbcdeb09298694cdd
+496, 0xe42402389f8f0fb4
+497, 0xe5de56af539df727
+498, 0x7017f9b2101ee240
+499, 0x1ee5e68d5b10001d
+500, 0x436229051836387a
+501, 0xcd532d6d6ec38fb7
+502, 0x30a66606fdf38272
+503, 0xfdaa2ab9cf798496
+504, 0x4277b4adec70e7df
+505, 0x72cfc30256e0eaef
+506, 0x3c3359fd9bd34917
+507, 0xb7aa89598856efb0
+508, 0xf72226f8bf299ef5
+509, 0x258c499275a4356f
+510, 0x999a56bfc7f20d76
+511, 0x2b3e7432e20c18b
+512, 0x2d1251332f760cb5
+513, 0x7420e0eea62157c5
+514, 0xe85c895aa27cec3d
+515, 0x27a0545c7020d57c
+516, 0xc68638a65b4fff0d
+517, 0xfda473983a4ea747
+518, 0xd19fe65fb4c06062
+519, 0x6b1374e050ee15e4
+520, 0x80065ecd49bc4bef
+521, 0x4ee655954bc838de
+522, 0xe8fb777504a72299
+523, 0x86b652ea70f4bdde
+524, 0xcdc9e0fbde7e4f33
+525, 0x352c0a50cd3ac56
+526, 0x4b8605d368be75dc
+527, 0x1ac9ea8129efbc37
+528, 0x470325faa99f39c5
+529, 0x25dd7ef9adccf7a1
+530, 0x5ae2c7a03e965816
+531, 0xf733d2df59dacc7d
+532, 0xa05bbf0a8a1a7a70
+533, 0xe8aa3f102846ef5f
+534, 0xc9b85ec49ae71789
+535, 0xb904c14ed1cb1936
+536, 0x5ae618230b5f0444
+537, 0x97987fe47b5d7467
+538, 0xabb3aca8865ca761
+539, 0x38bfdf29d4508228
+540, 0x353654f408353330
+541, 0xeb7e92930ae4ef0d
+542, 0xec50f1a7ca526b96
+543, 0xd5e2dc08b5697544
+544, 0x24c7fd69d5ec32df
+545, 0x6f7e1095568b8620
+546, 0x6ed9c16ca13b3c8
+547, 0xe676ef460002130f
+548, 0xa3a01a3992c4b430
+549, 0xe2130406c3b1f202
+550, 0xa8f7263e2aedcd20
+551, 0xc45d71ef2e35f507
+552, 0x37155594021da7ba
+553, 0x22dc94f19de73159
+554, 0x7969fc6bffc5443f
+555, 0x97def7e44faa6bfe
+556, 0x8b940f5e8931d71f
+557, 0xd95b1dd3f1a3fdd5
+558, 0x1c83bfdca615701a
+559, 0xb7fcb56279ceca6b
+560, 0xd84f8950f20dcd0
+561, 0xb03343698de3cbe0
+562, 0xf64565d448d71f71
+563, 0xda52b4676e0ae662
+564, 0xda39c2c05b4ffb91
+565, 0xb35e2560421f6a85
+566, 0x1a7b108d48ac3646
+567, 0xc4e264dc390d79ed
+568, 0xa10727dfd9813256
+569, 0x40d23154e720e4f7
+570, 0xd9fa7cd7e313e119
+571, 0xcbf29107859e6013
+572, 0xc357338553d940b7
+573, 0x2641b7ab0bdfcbaa
+574, 0xd12f2b6060533ae7
+575, 0xd0435aa626411c56
+576, 0x44af4a488a9cec72
+577, 0xb934232ea8fa5696
+578, 0x760a8b12072b572d
+579, 0xfab18f9942cfa9b3
+580, 0x5676834c1fe84d16
+581, 0x9c54e4fddb353236
+582, 0xab49edfc9551f293
+583, 0x567f1fb45a871d
+584, 0x32a967c873998834
+585, 0x99240aad380ef8d1
+586, 0x7f66cbd432859a64
+587, 0x4cdc8a4658166822
+588, 0x984e3984a5766492
+589, 0xa3b2d0a3d64d3d94
+590, 0x177f667172f2affc
+591, 0xb1a90607a73a303f
+592, 0xe600b6c36427f878
+593, 0xf758f9834cb7f466
+594, 0x8ee9fce4a3f36449
+595, 0xcb8f11533e7da347
+596, 0xe7cf647794dabd7c
+597, 0xc9d92cfe6110806
+598, 0xea1335fa9145a1ec
+599, 0xbc6c29821d094552
+600, 0x37b9d6a858cc8bc3
+601, 0xf24e4c694929893e
+602, 0x55d025ce2d7d0004
+603, 0xccdc69acccf4267b
+604, 0xc491c04340c222eb
+605, 0xba50f75ecec9befb
+606, 0x1ec7bd85b8fe3bb9
+607, 0xe4de66498c59ae8a
+608, 0x38aa9e912712c889
+609, 0xcee0e43c5cc31566
+610, 0x72b69aa708fc7ed
+611, 0xdff70b7f6fa96679
+612, 0xd6d71d82112aadc3
+613, 0x365177892cb78531
+614, 0xa54852b39de4f72c
+615, 0x11dd5832bf16dd59
+616, 0x248a0f3369c97097
+617, 0xa14cec0260e26792
+618, 0x3517616ff142bed1
+619, 0x9b693ad39dab7636
+620, 0x739dff825e994434
+621, 0x67711e7356098c9
+622, 0xa81f8515d2fdf458
+623, 0xdac2908113fe568e
+624, 0xe99944ebc6e2806a
+625, 0x671728ca5b030975
+626, 0xfdad20edb2b4a789
+627, 0xedc6e466bd0369d2
+628, 0x88b5d469821f7e1b
+629, 0x2eabf94049a522a5
+630, 0x247794b7a2f5a8e3
+631, 0x278942bdbe02c649
+632, 0xbe5a9a9196ab99c1
+633, 0x75955060866da1b5
+634, 0xdedcfa149273c0b5
+635, 0xdbeb7a57758f3867
+636, 0x7b9053347a2c8d5a
+637, 0xa059b3f2eed338a5
+638, 0x59401a46ded3b79f
+639, 0x38044ba56a6d19fb
+640, 0x72c7221b4e77e779
+641, 0x526df3491a3a34da
+642, 0xc3b31184ba16c0c2
+643, 0xd94c7144488624af
+644, 0xcf966ee4dc373f91
+645, 0x62049e65dd416266
+646, 0x7c2adccb925bf8f
+647, 0xd5fa5c22ed4ef8e1
+648, 0xd00134ebd11f2cd1
+649, 0xfbdf81767bed3634
+650, 0x62e8cc8ff66b6e26
+651, 0x3a72d6bcd4f2dcf7
+652, 0xf1cd45b1b46a86ed
+653, 0x1271f98e0938bb9a
+654, 0x82e6927e83dc31fa
+655, 0x7b9b0e0acb67b92d
+656, 0x6df503e397b2e701
+657, 0x93888f6fb561e0c3
+658, 0x393fb6069a40291
+659, 0x967a7d894cc0754d
+660, 0x6e298996ad866333
+661, 0x5ff3cf5559d6ab46
+662, 0xd0d70508c40349f5
+663, 0xc64c66c0dd426b33
+664, 0x8fea340ee35c64dd
+665, 0xf9cd381eb3060005
+666, 0xfcc37c2799fc0b11
+667, 0x6a37c91d65b489fa
+668, 0x57231000fa0a0c9d
+669, 0x55f6e292c6703f9a
+670, 0xd0508ffbfa55a7a6
+671, 0x885db543276bdac8
+672, 0xc26dbe6a26b0e704
+673, 0x21f884874ebd709e
+674, 0x711f0b6c8f732220
+675, 0x354d0a361eaee195
+676, 0x721344d8d30b006a
+677, 0xa0e090a0d3a56f07
+678, 0x16b3d5d823a4952b
+679, 0x59d7874bc9eae7b6
+680, 0x9bbb32710076455f
+681, 0xd4fb22242ffabafd
+682, 0xe1d4ac6770be1d89
+683, 0xb259cedebc73dc8a
+684, 0x35faaa3b4246ab69
+685, 0x5d26addefdaee89
+686, 0x8e7ec350da0f3545
+687, 0xd0f316eed9f8fc79
+688, 0x98b2a52c9bf291b2
+689, 0xe4d294a8aca6a314
+690, 0x25bd554e6aa7673c
+691, 0xcfde5dcba5be2a6c
+692, 0xb5e01fb48d2d2107
+693, 0xe1caf28948028536
+694, 0xd434aa0a26f3ee9b
+695, 0xd17723381641b8f6
+696, 0xfe73bd1f3f3768a2
+697, 0x1cc6b1abd08d67e9
+698, 0x247e328371a28de0
+699, 0x502e7942e5a9104a
+700, 0x6a030fd242eb4502
+701, 0xa2ffe02744014ce8
+702, 0x59290763b18fe04e
+703, 0xcf14241564271436
+704, 0xb0fb73c3c1503aff
+705, 0x94e27c622f82137a
+706, 0x747a5b406ac3e1f0
+707, 0x9a914e96a732031d
+708, 0x59f68c6c8f078835
+709, 0x809d012c73eb4724
+710, 0x5b3c3b73e1b37d74
+711, 0xdde60ef3ba49cdf7
+712, 0x87a14e1f9c761986
+713, 0x4109b960604522af
+714, 0x122d0e1ed0eb6bb9
+715, 0xadc0d29e80bfe33
+716, 0xa25b1b44f5fc8e4e
+717, 0xbab85d8a9b793f20
+718, 0x825f4cbced0e7d1e
+719, 0x2d6ae8807acb37ea
+720, 0x8234420adce2e39
+721, 0x4a8ad4da6b804807
+722, 0x1e19f9bc215e5245
+723, 0x1d6f4848a916dd5e
+724, 0x9ac40dfcdc2d39cc
+725, 0x9f3524e3086155ec
+726, 0x861fffc43124b2ef
+727, 0xe640e3b756396372
+728, 0x41cb0f0c5e149669
+729, 0xe0bd37e1192e4205
+730, 0x62917d3858f4ce47
+731, 0xa36e7eb4d855820a
+732, 0x204b90255a3bf724
+733, 0x66ee83a0175535bc
+734, 0x2c14ce7c6b0c1423
+735, 0x85d9495fa514f70d
+736, 0x5a4fe45ead874dbc
+737, 0xe72248dcb8cfc863
+738, 0xfc21ff2932ed98cd
+739, 0xcbba1edd735b5cad
+740, 0x91ddc32809679bf5
+741, 0x192cdf2c7631ea1f
+742, 0xbbc451ddf2ea286f
+743, 0xad9e80cae2397a64
+744, 0x6918f0119b95d0e5
+745, 0xa40379017a27d70a
+746, 0x1aaeddb600e61e1
+747, 0x15afd93cbd7adda9
+748, 0x156719bc2b757ff4
+749, 0x13d9a59e2b2df49d
+750, 0x9a490986eaddf0a
+751, 0xef9a350f0b3eb6b4
+752, 0x5de7f6295ba4fa4d
+753, 0x7f37fd087c3fdb49
+754, 0xa9fe3749d6f3f209
+755, 0x50912ac036d9bfb
+756, 0x982cb4d726a441f8
+757, 0x8ca8d8af59b872d0
+758, 0x7f8adfb0ceeade8a
+759, 0xdad390ec742be44
+760, 0xa637944d0045be5b
+761, 0x3569a3b3af807061
+762, 0x9599da8eae14511d
+763, 0xc333e8d19589b01a
+764, 0xfb9b524a20b571e1
+765, 0xbd9dc8b37ce5c3e1
+766, 0x142333005fa389ac
+767, 0x1368bc37cd5bcce1
+768, 0x16094907ad6ecf73
+769, 0xb32c90dbba4c1130
+770, 0x82761d97c1747dd0
+771, 0x599f9f267ae3444d
+772, 0x79ad3382994852e1
+773, 0x2511f06d9ef06e54
+774, 0xb35e6ab7d5bbddae
+775, 0xfca9fa83a2988732
+776, 0x7d4350f0394ac3ba
+777, 0xa52a9527bb176ea3
+778, 0xb49fa0ceb2aa8353
+779, 0x1f62e504d1468cc0
+780, 0xe1a77bfccce6efc3
+781, 0x776cdff4dc0d6797
+782, 0x56612e39b652c1f2
+783, 0x5f096a29294eda04
+784, 0x7978abc3aabd8b23
+785, 0x79dd875e0485b979
+786, 0x8a98aa4d5735d778
+787, 0xcca43940f69d2388
+788, 0xb2d4b156f144f93a
+789, 0xbd528a676e9a862
+790, 0x2a394939c8e7ec5e
+791, 0xb1da900c6efe4abc
+792, 0x9869af479de4c034
+793, 0x78dbdfb88ac7c1db
+794, 0x18cb169143088041
+795, 0xe69e5461c51a3e13
+796, 0x5389fa16ea98183c
+797, 0xed7c80d1be1ea520
+798, 0x87246fc359758ced
+799, 0xab323eba95fae4ed
+800, 0xbc4c0dde7f8a1828
+801, 0xdb739f7955610b1a
+802, 0xecd8c68c3434cc
+803, 0x138c2eb88c477f44
+804, 0x28a65f96727aae41
+805, 0xdee879f2cf5629d
+806, 0x684f0c90ef20070f
+807, 0xa24a819ef5621800
+808, 0x8d0054f870e4fdcb
+809, 0x99e8c6e695b600b
+810, 0x50b705245891f7c3
+811, 0xc02eed3a6e58e51a
+812, 0x443d64e95443606c
+813, 0xca24959cfbd2d120
+814, 0xe072609ea48815bc
+815, 0xbcc715026590315b
+816, 0x3e76df24d7aa5938
+817, 0xd8ff04940d9b79ae
+818, 0x54474ce790059bcd
+819, 0x278390dd6aa70e81
+820, 0xf4df619fe35414e4
+821, 0x757d71270264e615
+822, 0x1e8a373699c11b23
+823, 0xef68c82046e67dd6
+824, 0xe280006599972620
+825, 0x234e095183b0f4d6
+826, 0xe3b7560ed9839749
+827, 0xcd5ec4086572332e
+828, 0xc41c0d4aaa279108
+829, 0x4b9cd6126bc16a6d
+830, 0x4a7252734f3e3dd0
+831, 0xb3132df156cc103a
+832, 0xf9e4abbf7b64464a
+833, 0xf936df27fb3c47b7
+834, 0x9142960873f6d71a
+835, 0x4ba6aa3235cdb10d
+836, 0x3237a2e765ba7766
+837, 0xd62f0b94c8e99e54
+838, 0x26b682f90a3ae41b
+839, 0x40ad5e82072b6f81
+840, 0xd0198101f5484000
+841, 0xe4fac60ba11c332
+842, 0x472d0b0a95ef9d38
+843, 0x8512557aec5a3d8f
+844, 0xef83169d3efd4de9
+845, 0x53fe89283e7a7676
+846, 0x2f50933053d69fc4
+847, 0x76f5e4362e2e53a2
+848, 0x8676fdccce28874a
+849, 0x2737764c1fb1f821
+850, 0x4a6f70afc066ab55
+851, 0x27f8e151e310fca4
+852, 0xd606960ccbe85161
+853, 0xcce51d7ddd270a32
+854, 0xb4235999794875c2
+855, 0x580084e358e884
+856, 0x2159d5e6dc8586d7
+857, 0x87bd54d8599b3ba4
+858, 0x3e9ade6a2181664
+859, 0x5e6e140406d97623
+860, 0x511545d5aa0080a2
+861, 0xf49d78ed219aac57
+862, 0xbece1f9c90b8ea87
+863, 0x1c741cac36a2c514
+864, 0x7453c141047db967
+865, 0xd751832a5037eba2
+866, 0x71370a3f30ada1f7
+867, 0x7c01cf2dcb408631
+868, 0x1052a4fbdccc0fa1
+869, 0x13d525c9df3fb6c
+870, 0xa3aa8dbfee760c55
+871, 0xc0288d200f5155cf
+872, 0x79f4bcd12af567c3
+873, 0x8160d163bb548755
+874, 0x5cf2995fb69fd2df
+875, 0xcc98ed01396639df
+876, 0xad95f1d9cfc8256e
+877, 0xa3df27d9fbdbfb9d
+878, 0x83e5f5dda4d52929
+879, 0x9adc05043009f55b
+880, 0xdfe8329dfde1c001
+881, 0x9980ccdd5298e6a2
+882, 0x636a7bd134f6ef56
+883, 0xef5ff780c4be6ba4
+884, 0x290d71dc77a56d16
+885, 0x6d65db9ff58de1e6
+886, 0x944b063b3805a696
+887, 0xce468ca2cce33008
+888, 0x5ba1ccb840f80f48
+889, 0x28ddce36fc9ad268
+890, 0x4f77ef254d507a21
+891, 0xce9b4057fadf3ab
+892, 0xb518bc68298730e6
+893, 0xd2eb5b8e2ec665b0
+894, 0xe1583303a4f87344
+895, 0x9d5a0df4fbe1bed5
+896, 0x2ba9bc03ec8cfd07
+897, 0x479ed880a96ca669
+898, 0xcedf96338324771a
+899, 0x312f4fc2da41ffaa
+900, 0xa0eb9cf23b5e1ed8
+901, 0xf8f88f975dc3f539
+902, 0x4a37e185d0e96e0f
+903, 0xf829654a5c0b46f9
+904, 0x3909cca7a7f8c7fb
+905, 0x4c2e1d66ceb45105
+906, 0xaffaa19e1db8af87
+907, 0x9ec498246bd18c76
+908, 0x21d51558edc089da
+909, 0xe8984112cd1b1561
+910, 0x7de1d2cf54b0c0e1
+911, 0xa06729aed50bfb9d
+912, 0xcf19f733e5db19e1
+913, 0x70edf2624ab777cd
+914, 0x46685becad10e078
+915, 0x825e0f6add46785
+916, 0x66d4af3b15f70de4
+917, 0xc676614b0666b21
+918, 0x282a916c864f5cb7
+919, 0x2707283a3f512167
+920, 0x37ff3afda7461623
+921, 0xc767eb1205e4ca86
+922, 0x46b359aecc4ea25b
+923, 0x67fbbb797a16dbb1
+924, 0x64fd4ba57122290e
+925, 0x8acc2a8ae59d8fac
+926, 0x64a49298599acc67
+927, 0xedf00de67177ce30
+928, 0x1ea9d8d7e76d2d2c
+929, 0x363fcac323f70eb2
+930, 0x19e6e3ec8a9712eb
+931, 0xca541e96b0961f09
+932, 0x4d8fd34c2822ec46
+933, 0x2fdd56a50b32f705
+934, 0xaac2fcf251e3fd3
+935, 0xb0c600299e57045c
+936, 0xd951ec589e909e38
+937, 0x4dc8414390cae508
+938, 0x537ef9d5e2321344
+939, 0xa57bc21fd31aa2dc
+940, 0xa3a60df564183750
+941, 0xbe69a5ce2e369fb6
+942, 0x7744601f4c053ec8
+943, 0x3838452af42f2612
+944, 0xd4f0dad7115a54e9
+945, 0x629cf68d8009a624
+946, 0x2211c8fa34cb98cb
+947, 0x8040b19e2213db83
+948, 0xb2a86d3ba2384fd
+949, 0x4b85cec4f93f0dab
+950, 0xc8d212d21ea6845d
+951, 0x5b271a03a4fe2be0
+952, 0xff4f671319ad8434
+953, 0x8e615a919d5afa96
+954, 0xea7f47c53161160a
+955, 0x33273930b13c6efc
+956, 0x98eedda27fb59c3c
+957, 0x188dc5e92e939677
+958, 0x9dbd0fa0911430f1
+959, 0x5b3dcf3fa75dfd2b
+960, 0x3f03846febdb275d
+961, 0x20cc24faea9e9cf6
+962, 0x854f3ac66199ff5d
+963, 0x31169ac99d341e6f
+964, 0xa85daed3c0bc1bbe
+965, 0x64633711e71ba5dd
+966, 0x530e79978dc73334
+967, 0x636f2ee6e20aef13
+968, 0xf6220f8b6d9a58fb
+969, 0x425db8fa32141a7b
+970, 0xac7c210f4b02be95
+971, 0x5fe8cfbe197a7754
+972, 0xfff7d40c79420ea
+973, 0x5f8bab9ef4697b77
+974, 0xaf6fe54e45b23fe8
+975, 0xce79456ccc70bbce
+976, 0x645ef680f48f1c00
+977, 0xa4dfac46e2028595
+978, 0x6bece4c41effc5df
+979, 0xd316df886442641f
+980, 0xa4f6ff994edd2a6
+981, 0x30281ae3cc49abe4
+982, 0x39acb7b663dea974
+983, 0x5e8829b01a7c06fb
+984, 0x87bdb08cf027f13e
+985, 0xdfa5ede784e802f6
+986, 0x46d03d55711c38cc
+987, 0xa55a961fc9788306
+988, 0xbf09ded495a2e57a
+989, 0xcd601b29a639cc16
+990, 0x2193ce026bfd1085
+991, 0x25ba27f3f225be13
+992, 0x6f685be82f64f2fe
+993, 0xec8454108229c450
+994, 0x6e79d8d205447a44
+995, 0x9ed7b6a96b9ccd68
+996, 0xae7134b3b7f8ee37
+997, 0x66963de0e5ebcc02
+998, 0x29c8dcd0d17c423f
+999, 0xfb8482c827eb90bc
diff --git a/lib/python3.12/site-packages/numpy/random/tests/test_direct.py b/lib/python3.12/site-packages/numpy/random/tests/test_direct.py
new file mode 100644
index 0000000000000000000000000000000000000000..fa2ae866beeb7c36a585eaf9eb04df31a2f2a6c3
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/random/tests/test_direct.py
@@ -0,0 +1,518 @@
+import os
+from os.path import join
+import sys
+
+import numpy as np
+from numpy.testing import (assert_equal, assert_allclose, assert_array_equal,
+                           assert_raises)
+import pytest
+
+from numpy.random import (
+    Generator, MT19937, PCG64, PCG64DXSM, Philox, RandomState, SeedSequence,
+    SFC64, default_rng
+)
+from numpy.random._common import interface
+
+try:
+    import cffi  # noqa: F401
+
+    MISSING_CFFI = False
+except ImportError:
+    MISSING_CFFI = True
+
+try:
+    import ctypes  # noqa: F401
+
+    MISSING_CTYPES = False
+except ImportError:
+    MISSING_CTYPES = False
+
+if sys.flags.optimize > 1:
+    # no docstrings present to inspect when PYTHONOPTIMIZE/Py_OptimizeFlag > 1
+    # cffi cannot succeed
+    MISSING_CFFI = True
+
+
+pwd = os.path.dirname(os.path.abspath(__file__))
+
+
+def assert_state_equal(actual, target):
+    for key in actual:
+        if isinstance(actual[key], dict):
+            assert_state_equal(actual[key], target[key])
+        elif isinstance(actual[key], np.ndarray):
+            assert_array_equal(actual[key], target[key])
+        else:
+            assert actual[key] == target[key]
+
+
+def uint32_to_float32(u):
+    return ((u >> np.uint32(8)) * (1.0 / 2**24)).astype(np.float32)
+
+
+def uniform32_from_uint64(x):
+    x = np.uint64(x)
+    upper = np.array(x >> np.uint64(32), dtype=np.uint32)
+    lower = np.uint64(0xffffffff)
+    lower = np.array(x & lower, dtype=np.uint32)
+    joined = np.column_stack([lower, upper]).ravel()
+    return uint32_to_float32(joined)
+
+
+def uniform32_from_uint53(x):
+    x = np.uint64(x) >> np.uint64(16)
+    x = np.uint32(x & np.uint64(0xffffffff))
+    return uint32_to_float32(x)
+
+
+def uniform32_from_uint32(x):
+    return uint32_to_float32(x)
+
+
+def uniform32_from_uint(x, bits):
+    if bits == 64:
+        return uniform32_from_uint64(x)
+    elif bits == 53:
+        return uniform32_from_uint53(x)
+    elif bits == 32:
+        return uniform32_from_uint32(x)
+    else:
+        raise NotImplementedError
+
+
+def uniform_from_uint(x, bits):
+    if bits in (64, 63, 53):
+        return uniform_from_uint64(x)
+    elif bits == 32:
+        return uniform_from_uint32(x)
+
+
+def uniform_from_uint64(x):
+    return (x >> np.uint64(11)) * (1.0 / 9007199254740992.0)
+
+
+def uniform_from_uint32(x):
+    out = np.empty(len(x) // 2)
+    for i in range(0, len(x), 2):
+        a = x[i] >> 5
+        b = x[i + 1] >> 6
+        out[i // 2] = (a * 67108864.0 + b) / 9007199254740992.0
+    return out
+
+
+def uniform_from_dsfmt(x):
+    return x.view(np.double) - 1.0
+
+
+def gauss_from_uint(x, n, bits):
+    if bits in (64, 63):
+        doubles = uniform_from_uint64(x)
+    elif bits == 32:
+        doubles = uniform_from_uint32(x)
+    else:  # bits == 'dsfmt'
+        doubles = uniform_from_dsfmt(x)
+    gauss = []
+    loc = 0
+    x1 = x2 = 0.0
+    while len(gauss) < n:
+        r2 = 2
+        while r2 >= 1.0 or r2 == 0.0:
+            x1 = 2.0 * doubles[loc] - 1.0
+            x2 = 2.0 * doubles[loc + 1] - 1.0
+            r2 = x1 * x1 + x2 * x2
+            loc += 2
+
+        f = np.sqrt(-2.0 * np.log(r2) / r2)
+        gauss.append(f * x2)
+        gauss.append(f * x1)
+
+    return gauss[:n]
+
+
+def test_seedsequence():
+    from numpy.random.bit_generator import (ISeedSequence,
+                                            ISpawnableSeedSequence,
+                                            SeedlessSeedSequence)
+
+    s1 = SeedSequence(range(10), spawn_key=(1, 2), pool_size=6)
+    s1.spawn(10)
+    s2 = SeedSequence(**s1.state)
+    assert_equal(s1.state, s2.state)
+    assert_equal(s1.n_children_spawned, s2.n_children_spawned)
+
+    # The interfaces cannot be instantiated themselves.
+    assert_raises(TypeError, ISeedSequence)
+    assert_raises(TypeError, ISpawnableSeedSequence)
+    dummy = SeedlessSeedSequence()
+    assert_raises(NotImplementedError, dummy.generate_state, 10)
+    assert len(dummy.spawn(10)) == 10
+
+
+def test_generator_spawning():
+    """ Test spawning new generators and bit_generators directly.
+    """
+    rng = np.random.default_rng()
+    seq = rng.bit_generator.seed_seq
+    new_ss = seq.spawn(5)
+    expected_keys = [seq.spawn_key + (i,) for i in range(5)]
+    assert [c.spawn_key for c in new_ss] == expected_keys
+
+    new_bgs = rng.bit_generator.spawn(5)
+    expected_keys = [seq.spawn_key + (i,) for i in range(5, 10)]
+    assert [bg.seed_seq.spawn_key for bg in new_bgs] == expected_keys
+
+    new_rngs = rng.spawn(5)
+    expected_keys = [seq.spawn_key + (i,) for i in range(10, 15)]
+    found_keys = [rng.bit_generator.seed_seq.spawn_key for rng in new_rngs]
+    assert found_keys == expected_keys
+
+    # Sanity check that streams are actually different:
+    assert new_rngs[0].uniform() != new_rngs[1].uniform()
+
+
+def test_non_spawnable():
+    from numpy.random.bit_generator import ISeedSequence
+
+    class FakeSeedSequence:
+        def generate_state(self, n_words, dtype=np.uint32):
+            return np.zeros(n_words, dtype=dtype)
+
+    ISeedSequence.register(FakeSeedSequence)
+
+    rng = np.random.default_rng(FakeSeedSequence())
+
+    with pytest.raises(TypeError, match="The underlying SeedSequence"):
+        rng.spawn(5)
+
+    with pytest.raises(TypeError, match="The underlying SeedSequence"):
+        rng.bit_generator.spawn(5)
+
+
+class Base:
+    dtype = np.uint64
+    data2 = data1 = {}
+
+    @classmethod
+    def setup_class(cls):
+        cls.bit_generator = PCG64
+        cls.bits = 64
+        cls.dtype = np.uint64
+        cls.seed_error_type = TypeError
+        cls.invalid_init_types = []
+        cls.invalid_init_values = []
+
+    @classmethod
+    def _read_csv(cls, filename):
+        with open(filename) as csv:
+            seed = csv.readline()
+            seed = seed.split(',')
+            seed = [int(s.strip(), 0) for s in seed[1:]]
+            data = []
+            for line in csv:
+                data.append(int(line.split(',')[-1].strip(), 0))
+            return {'seed': seed, 'data': np.array(data, dtype=cls.dtype)}
+
+    def test_raw(self):
+        bit_generator = self.bit_generator(*self.data1['seed'])
+        uints = bit_generator.random_raw(1000)
+        assert_equal(uints, self.data1['data'])
+
+        bit_generator = self.bit_generator(*self.data1['seed'])
+        uints = bit_generator.random_raw()
+        assert_equal(uints, self.data1['data'][0])
+
+        bit_generator = self.bit_generator(*self.data2['seed'])
+        uints = bit_generator.random_raw(1000)
+        assert_equal(uints, self.data2['data'])
+
+    def test_random_raw(self):
+        bit_generator = self.bit_generator(*self.data1['seed'])
+        uints = bit_generator.random_raw(output=False)
+        assert uints is None
+        uints = bit_generator.random_raw(1000, output=False)
+        assert uints is None
+
+    def test_gauss_inv(self):
+        n = 25
+        rs = RandomState(self.bit_generator(*self.data1['seed']))
+        gauss = rs.standard_normal(n)
+        assert_allclose(gauss,
+                        gauss_from_uint(self.data1['data'], n, self.bits))
+
+        rs = RandomState(self.bit_generator(*self.data2['seed']))
+        gauss = rs.standard_normal(25)
+        assert_allclose(gauss,
+                        gauss_from_uint(self.data2['data'], n, self.bits))
+
+    def test_uniform_double(self):
+        rs = Generator(self.bit_generator(*self.data1['seed']))
+        vals = uniform_from_uint(self.data1['data'], self.bits)
+        uniforms = rs.random(len(vals))
+        assert_allclose(uniforms, vals)
+        assert_equal(uniforms.dtype, np.float64)
+
+        rs = Generator(self.bit_generator(*self.data2['seed']))
+        vals = uniform_from_uint(self.data2['data'], self.bits)
+        uniforms = rs.random(len(vals))
+        assert_allclose(uniforms, vals)
+        assert_equal(uniforms.dtype, np.float64)
+
+    def test_uniform_float(self):
+        rs = Generator(self.bit_generator(*self.data1['seed']))
+        vals = uniform32_from_uint(self.data1['data'], self.bits)
+        uniforms = rs.random(len(vals), dtype=np.float32)
+        assert_allclose(uniforms, vals)
+        assert_equal(uniforms.dtype, np.float32)
+
+        rs = Generator(self.bit_generator(*self.data2['seed']))
+        vals = uniform32_from_uint(self.data2['data'], self.bits)
+        uniforms = rs.random(len(vals), dtype=np.float32)
+        assert_allclose(uniforms, vals)
+        assert_equal(uniforms.dtype, np.float32)
+
+    def test_repr(self):
+        rs = Generator(self.bit_generator(*self.data1['seed']))
+        assert 'Generator' in repr(rs)
+        assert f'{id(rs):#x}'.upper().replace('X', 'x') in repr(rs)
+
+    def test_str(self):
+        rs = Generator(self.bit_generator(*self.data1['seed']))
+        assert 'Generator' in str(rs)
+        assert str(self.bit_generator.__name__) in str(rs)
+        assert f'{id(rs):#x}'.upper().replace('X', 'x') not in str(rs)
+
+    def test_pickle(self):
+        import pickle
+
+        bit_generator = self.bit_generator(*self.data1['seed'])
+        state = bit_generator.state
+        bitgen_pkl = pickle.dumps(bit_generator)
+        reloaded = pickle.loads(bitgen_pkl)
+        reloaded_state = reloaded.state
+        assert_array_equal(Generator(bit_generator).standard_normal(1000),
+                           Generator(reloaded).standard_normal(1000))
+        assert bit_generator is not reloaded
+        assert_state_equal(reloaded_state, state)
+
+        ss = SeedSequence(100)
+        aa = pickle.loads(pickle.dumps(ss))
+        assert_equal(ss.state, aa.state)
+
+    def test_invalid_state_type(self):
+        bit_generator = self.bit_generator(*self.data1['seed'])
+        with pytest.raises(TypeError):
+            bit_generator.state = {'1'}
+
+    def test_invalid_state_value(self):
+        bit_generator = self.bit_generator(*self.data1['seed'])
+        state = bit_generator.state
+        state['bit_generator'] = 'otherBitGenerator'
+        with pytest.raises(ValueError):
+            bit_generator.state = state
+
+    def test_invalid_init_type(self):
+        bit_generator = self.bit_generator
+        for st in self.invalid_init_types:
+            with pytest.raises(TypeError):
+                bit_generator(*st)
+
+    def test_invalid_init_values(self):
+        bit_generator = self.bit_generator
+        for st in self.invalid_init_values:
+            with pytest.raises((ValueError, OverflowError)):
+                bit_generator(*st)
+
+    def test_benchmark(self):
+        bit_generator = self.bit_generator(*self.data1['seed'])
+        bit_generator._benchmark(1)
+        bit_generator._benchmark(1, 'double')
+        with pytest.raises(ValueError):
+            bit_generator._benchmark(1, 'int32')
+
+    @pytest.mark.skipif(MISSING_CFFI, reason='cffi not available')
+    def test_cffi(self):
+        bit_generator = self.bit_generator(*self.data1['seed'])
+        cffi_interface = bit_generator.cffi
+        assert isinstance(cffi_interface, interface)
+        other_cffi_interface = bit_generator.cffi
+        assert other_cffi_interface is cffi_interface
+
+    @pytest.mark.skipif(MISSING_CTYPES, reason='ctypes not available')
+    def test_ctypes(self):
+        bit_generator = self.bit_generator(*self.data1['seed'])
+        ctypes_interface = bit_generator.ctypes
+        assert isinstance(ctypes_interface, interface)
+        other_ctypes_interface = bit_generator.ctypes
+        assert other_ctypes_interface is ctypes_interface
+
+    def test_getstate(self):
+        bit_generator = self.bit_generator(*self.data1['seed'])
+        state = bit_generator.state
+        alt_state = bit_generator.__getstate__()
+        assert_state_equal(state, alt_state)
+
+
+class TestPhilox(Base):
+    @classmethod
+    def setup_class(cls):
+        cls.bit_generator = Philox
+        cls.bits = 64
+        cls.dtype = np.uint64
+        cls.data1 = cls._read_csv(
+            join(pwd, './data/philox-testset-1.csv'))
+        cls.data2 = cls._read_csv(
+            join(pwd, './data/philox-testset-2.csv'))
+        cls.seed_error_type = TypeError
+        cls.invalid_init_types = []
+        cls.invalid_init_values = [(1, None, 1), (-1,), (None, None, 2 ** 257 + 1)]
+
+    def test_set_key(self):
+        bit_generator = self.bit_generator(*self.data1['seed'])
+        state = bit_generator.state
+        keyed = self.bit_generator(counter=state['state']['counter'],
+                                   key=state['state']['key'])
+        assert_state_equal(bit_generator.state, keyed.state)
+
+
+class TestPCG64(Base):
+    @classmethod
+    def setup_class(cls):
+        cls.bit_generator = PCG64
+        cls.bits = 64
+        cls.dtype = np.uint64
+        cls.data1 = cls._read_csv(join(pwd, './data/pcg64-testset-1.csv'))
+        cls.data2 = cls._read_csv(join(pwd, './data/pcg64-testset-2.csv'))
+        cls.seed_error_type = (ValueError, TypeError)
+        cls.invalid_init_types = [(3.2,), ([None],), (1, None)]
+        cls.invalid_init_values = [(-1,)]
+
+    def test_advance_symmetry(self):
+        rs = Generator(self.bit_generator(*self.data1['seed']))
+        state = rs.bit_generator.state
+        step = -0x9e3779b97f4a7c150000000000000000
+        rs.bit_generator.advance(step)
+        val_neg = rs.integers(10)
+        rs.bit_generator.state = state
+        rs.bit_generator.advance(2**128 + step)
+        val_pos = rs.integers(10)
+        rs.bit_generator.state = state
+        rs.bit_generator.advance(10 * 2**128 + step)
+        val_big = rs.integers(10)
+        assert val_neg == val_pos
+        assert val_big == val_pos
+
+    def test_advange_large(self):
+        rs = Generator(self.bit_generator(38219308213743))
+        pcg = rs.bit_generator
+        state = pcg.state["state"]
+        initial_state = 287608843259529770491897792873167516365
+        assert state["state"] == initial_state
+        pcg.advance(sum(2**i for i in (96, 64, 32, 16, 8, 4, 2, 1)))
+        state = pcg.state["state"]
+        advanced_state = 135275564607035429730177404003164635391
+        assert state["state"] == advanced_state
+
+
+class TestPCG64DXSM(Base):
+    @classmethod
+    def setup_class(cls):
+        cls.bit_generator = PCG64DXSM
+        cls.bits = 64
+        cls.dtype = np.uint64
+        cls.data1 = cls._read_csv(join(pwd, './data/pcg64dxsm-testset-1.csv'))
+        cls.data2 = cls._read_csv(join(pwd, './data/pcg64dxsm-testset-2.csv'))
+        cls.seed_error_type = (ValueError, TypeError)
+        cls.invalid_init_types = [(3.2,), ([None],), (1, None)]
+        cls.invalid_init_values = [(-1,)]
+
+    def test_advance_symmetry(self):
+        rs = Generator(self.bit_generator(*self.data1['seed']))
+        state = rs.bit_generator.state
+        step = -0x9e3779b97f4a7c150000000000000000
+        rs.bit_generator.advance(step)
+        val_neg = rs.integers(10)
+        rs.bit_generator.state = state
+        rs.bit_generator.advance(2**128 + step)
+        val_pos = rs.integers(10)
+        rs.bit_generator.state = state
+        rs.bit_generator.advance(10 * 2**128 + step)
+        val_big = rs.integers(10)
+        assert val_neg == val_pos
+        assert val_big == val_pos
+
+    def test_advange_large(self):
+        rs = Generator(self.bit_generator(38219308213743))
+        pcg = rs.bit_generator
+        state = pcg.state
+        initial_state = 287608843259529770491897792873167516365
+        assert state["state"]["state"] == initial_state
+        pcg.advance(sum(2**i for i in (96, 64, 32, 16, 8, 4, 2, 1)))
+        state = pcg.state["state"]
+        advanced_state = 277778083536782149546677086420637664879
+        assert state["state"] == advanced_state
+
+
+class TestMT19937(Base):
+    @classmethod
+    def setup_class(cls):
+        cls.bit_generator = MT19937
+        cls.bits = 32
+        cls.dtype = np.uint32
+        cls.data1 = cls._read_csv(join(pwd, './data/mt19937-testset-1.csv'))
+        cls.data2 = cls._read_csv(join(pwd, './data/mt19937-testset-2.csv'))
+        cls.seed_error_type = ValueError
+        cls.invalid_init_types = []
+        cls.invalid_init_values = [(-1,)]
+
+    def test_seed_float_array(self):
+        assert_raises(TypeError, self.bit_generator, np.array([np.pi]))
+        assert_raises(TypeError, self.bit_generator, np.array([-np.pi]))
+        assert_raises(TypeError, self.bit_generator, np.array([np.pi, -np.pi]))
+        assert_raises(TypeError, self.bit_generator, np.array([0, np.pi]))
+        assert_raises(TypeError, self.bit_generator, [np.pi])
+        assert_raises(TypeError, self.bit_generator, [0, np.pi])
+
+    def test_state_tuple(self):
+        rs = Generator(self.bit_generator(*self.data1['seed']))
+        bit_generator = rs.bit_generator
+        state = bit_generator.state
+        desired = rs.integers(2 ** 16)
+        tup = (state['bit_generator'], state['state']['key'],
+               state['state']['pos'])
+        bit_generator.state = tup
+        actual = rs.integers(2 ** 16)
+        assert_equal(actual, desired)
+        tup = tup + (0, 0.0)
+        bit_generator.state = tup
+        actual = rs.integers(2 ** 16)
+        assert_equal(actual, desired)
+
+
+class TestSFC64(Base):
+    @classmethod
+    def setup_class(cls):
+        cls.bit_generator = SFC64
+        cls.bits = 64
+        cls.dtype = np.uint64
+        cls.data1 = cls._read_csv(
+            join(pwd, './data/sfc64-testset-1.csv'))
+        cls.data2 = cls._read_csv(
+            join(pwd, './data/sfc64-testset-2.csv'))
+        cls.seed_error_type = (ValueError, TypeError)
+        cls.invalid_init_types = [(3.2,), ([None],), (1, None)]
+        cls.invalid_init_values = [(-1,)]
+
+
+class TestDefaultRNG:
+    def test_seed(self):
+        for args in [(), (None,), (1234,), ([1234, 5678],)]:
+            rg = default_rng(*args)
+            assert isinstance(rg.bit_generator, PCG64)
+
+    def test_passthrough(self):
+        bg = Philox()
+        rg = default_rng(bg)
+        assert rg.bit_generator is bg
+        rg2 = default_rng(rg)
+        assert rg2 is rg
+        assert rg2.bit_generator is bg
diff --git a/lib/python3.12/site-packages/numpy/random/tests/test_extending.py b/lib/python3.12/site-packages/numpy/random/tests/test_extending.py
new file mode 100644
index 0000000000000000000000000000000000000000..2783d1cdd9acd183261c30e50d7031f4561fd7bd
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/random/tests/test_extending.py
@@ -0,0 +1,118 @@
+from importlib.util import spec_from_file_location, module_from_spec
+import os
+import pathlib
+import pytest
+import shutil
+import subprocess
+import sys
+import sysconfig
+import textwrap
+import warnings
+
+import numpy as np
+from numpy.testing import IS_WASM
+
+
+try:
+    import cffi
+except ImportError:
+    cffi = None
+
+if sys.flags.optimize > 1:
+    # no docstrings present to inspect when PYTHONOPTIMIZE/Py_OptimizeFlag > 1
+    # cffi cannot succeed
+    cffi = None
+
+try:
+    with warnings.catch_warnings(record=True) as w:
+        # numba issue gh-4733
+        warnings.filterwarnings('always', '', DeprecationWarning)
+        import numba
+except (ImportError, SystemError):
+    # Certain numpy/numba versions trigger a SystemError due to a numba bug
+    numba = None
+
+try:
+    import cython
+    from Cython.Compiler.Version import version as cython_version
+except ImportError:
+    cython = None
+else:
+    from numpy._utils import _pep440
+    # Cython 0.29.30 is required for Python 3.11 and there are
+    # other fixes in the 0.29 series that are needed even for earlier
+    # Python versions.
+    # Note: keep in sync with the one in pyproject.toml
+    required_version = '0.29.35'
+    if _pep440.parse(cython_version) < _pep440.Version(required_version):
+        # too old or wrong cython, skip the test
+        cython = None
+
+
+@pytest.mark.skipif(
+        sys.platform == "win32" and sys.maxsize < 2**32,
+        reason="Failing in 32-bit Windows wheel build job, skip for now"
+)
+@pytest.mark.skipif(IS_WASM, reason="Can't start subprocess")
+@pytest.mark.skipif(cython is None, reason="requires cython")
+@pytest.mark.slow
+def test_cython(tmp_path):
+    import glob
+    # build the examples in a temporary directory
+    srcdir = os.path.join(os.path.dirname(__file__), '..')
+    shutil.copytree(srcdir, tmp_path / 'random')
+    build_dir = tmp_path / 'random' / '_examples' / 'cython'
+    target_dir = build_dir / "build"
+    os.makedirs(target_dir, exist_ok=True)
+    if sys.platform == "win32":
+        subprocess.check_call(["meson", "setup",
+                               "--buildtype=release", 
+                               "--vsenv", str(build_dir)],
+                              cwd=target_dir,
+                              )
+    else:
+        subprocess.check_call(["meson", "setup", str(build_dir)],
+                              cwd=target_dir
+                              )
+    subprocess.check_call(["meson", "compile", "-vv"], cwd=target_dir)
+
+    # gh-16162: make sure numpy's __init__.pxd was used for cython
+    # not really part of this test, but it is a convenient place to check
+
+    g = glob.glob(str(target_dir / "*" / "extending.pyx.c"))
+    with open(g[0]) as fid:
+        txt_to_find = 'NumPy API declarations from "numpy/__init__'
+        for i, line in enumerate(fid):
+            if txt_to_find in line:
+                break
+        else:
+            assert False, ("Could not find '{}' in C file, "
+                           "wrong pxd used".format(txt_to_find))
+    # import without adding the directory to sys.path
+    suffix = sysconfig.get_config_var('EXT_SUFFIX')
+
+    def load(modname):
+        so = (target_dir / modname).with_suffix(suffix)
+        spec = spec_from_file_location(modname, so)
+        mod = module_from_spec(spec)
+        spec.loader.exec_module(mod)
+        return mod
+
+    # test that the module can be imported
+    load("extending")
+    load("extending_cpp")
+    # actually test the cython c-extension
+    extending_distributions = load("extending_distributions")
+    from numpy.random import PCG64
+    values = extending_distributions.uniforms_ex(PCG64(0), 10, 'd')
+    assert values.shape == (10,)
+    assert values.dtype == np.float64
+
+@pytest.mark.skipif(numba is None or cffi is None,
+                    reason="requires numba and cffi")
+def test_numba():
+    from numpy.random._examples.numba import extending  # noqa: F401
+
+@pytest.mark.skipif(cffi is None, reason="requires cffi")
+def test_cffi():
+    from numpy.random._examples.cffi import extending  # noqa: F401
diff --git a/lib/python3.12/site-packages/numpy/random/tests/test_generator_mt19937.py b/lib/python3.12/site-packages/numpy/random/tests/test_generator_mt19937.py
new file mode 100644
index 0000000000000000000000000000000000000000..e744f5ba611b177b10034cada76f0dd28f63cf16
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/random/tests/test_generator_mt19937.py
@@ -0,0 +1,2746 @@
+import sys
+import hashlib
+
+import pytest
+
+import numpy as np
+from numpy.linalg import LinAlgError
+from numpy.testing import (
+    assert_, assert_raises, assert_equal, assert_allclose,
+    assert_warns, assert_no_warnings, assert_array_equal,
+    assert_array_almost_equal, suppress_warnings, IS_WASM)
+
+from numpy.random import Generator, MT19937, SeedSequence, RandomState
+
+random = Generator(MT19937())
+
+JUMP_TEST_DATA = [
+    {
+        "seed": 0,
+        "steps": 10,
+        "initial": {"key_sha256": "bb1636883c2707b51c5b7fc26c6927af4430f2e0785a8c7bc886337f919f9edf", "pos": 9},
+        "jumped": {"key_sha256": "ff682ac12bb140f2d72fba8d3506cf4e46817a0db27aae1683867629031d8d55", "pos": 598},
+    },
+    {
+        "seed":384908324,
+        "steps":312,
+        "initial": {"key_sha256": "16b791a1e04886ccbbb4d448d6ff791267dc458ae599475d08d5cced29d11614", "pos": 311},
+        "jumped": {"key_sha256": "a0110a2cf23b56be0feaed8f787a7fc84bef0cb5623003d75b26bdfa1c18002c", "pos": 276},
+    },
+    {
+        "seed": [839438204, 980239840, 859048019, 821],
+        "steps": 511,
+        "initial": {"key_sha256": "d306cf01314d51bd37892d874308200951a35265ede54d200f1e065004c3e9ea", "pos": 510},
+        "jumped": {"key_sha256": "0e00ab449f01a5195a83b4aee0dfbc2ce8d46466a640b92e33977d2e42f777f8", "pos": 475},
+    },
+]
+
+
+@pytest.fixture(scope='module', params=[True, False])
+def endpoint(request):
+    return request.param
+
+
+class TestSeed:
+    def test_scalar(self):
+        s = Generator(MT19937(0))
+        assert_equal(s.integers(1000), 479)
+        s = Generator(MT19937(4294967295))
+        assert_equal(s.integers(1000), 324)
+
+    def test_array(self):
+        s = Generator(MT19937(range(10)))
+        assert_equal(s.integers(1000), 465)
+        s = Generator(MT19937(np.arange(10)))
+        assert_equal(s.integers(1000), 465)
+        s = Generator(MT19937([0]))
+        assert_equal(s.integers(1000), 479)
+        s = Generator(MT19937([4294967295]))
+        assert_equal(s.integers(1000), 324)
+
+    def test_seedsequence(self):
+        s = MT19937(SeedSequence(0))
+        assert_equal(s.random_raw(1), 2058676884)
+
+    def test_invalid_scalar(self):
+        # seed must be an unsigned 32 bit integer
+        assert_raises(TypeError, MT19937, -0.5)
+        assert_raises(ValueError, MT19937, -1)
+
+    def test_invalid_array(self):
+        # seed must be an unsigned integer
+        assert_raises(TypeError, MT19937, [-0.5])
+        assert_raises(ValueError, MT19937, [-1])
+        assert_raises(ValueError, MT19937, [1, -2, 4294967296])
+
+    def test_noninstantized_bitgen(self):
+        assert_raises(ValueError, Generator, MT19937)
+
+
+class TestBinomial:
+    def test_n_zero(self):
+        # Tests the corner case of n == 0 for the binomial distribution.
+        # binomial(0, p) should be zero for any p in [0, 1].
+        # This test addresses issue #3480.
+        zeros = np.zeros(2, dtype='int')
+        for p in [0, .5, 1]:
+            assert_(random.binomial(0, p) == 0)
+            assert_array_equal(random.binomial(zeros, p), zeros)
+
+    def test_p_is_nan(self):
+        # Issue #4571.
+        assert_raises(ValueError, random.binomial, 1, np.nan)
+
+
+class TestMultinomial:
+    def test_basic(self):
+        random.multinomial(100, [0.2, 0.8])
+
+    def test_zero_probability(self):
+        random.multinomial(100, [0.2, 0.8, 0.0, 0.0, 0.0])
+
+    def test_int_negative_interval(self):
+        assert_(-5 <= random.integers(-5, -1) < -1)
+        x = random.integers(-5, -1, 5)
+        assert_(np.all(-5 <= x))
+        assert_(np.all(x < -1))
+
+    def test_size(self):
+        # gh-3173
+        p = [0.5, 0.5]
+        assert_equal(random.multinomial(1, p, np.uint32(1)).shape, (1, 2))
+        assert_equal(random.multinomial(1, p, np.uint32(1)).shape, (1, 2))
+        assert_equal(random.multinomial(1, p, np.uint32(1)).shape, (1, 2))
+        assert_equal(random.multinomial(1, p, [2, 2]).shape, (2, 2, 2))
+        assert_equal(random.multinomial(1, p, (2, 2)).shape, (2, 2, 2))
+        assert_equal(random.multinomial(1, p, np.array((2, 2))).shape,
+                     (2, 2, 2))
+
+        assert_raises(TypeError, random.multinomial, 1, p,
+                      float(1))
+
+    def test_invalid_prob(self):
+        assert_raises(ValueError, random.multinomial, 100, [1.1, 0.2])
+        assert_raises(ValueError, random.multinomial, 100, [-.1, 0.9])
+
+    def test_invalid_n(self):
+        assert_raises(ValueError, random.multinomial, -1, [0.8, 0.2])
+        assert_raises(ValueError, random.multinomial, [-1] * 10, [0.8, 0.2])
+
+    def test_p_non_contiguous(self):
+        p = np.arange(15.)
+        p /= np.sum(p[1::3])
+        pvals = p[1::3]
+        random = Generator(MT19937(1432985819))
+        non_contig = random.multinomial(100, pvals=pvals)
+        random = Generator(MT19937(1432985819))
+        contig = random.multinomial(100, pvals=np.ascontiguousarray(pvals))
+        assert_array_equal(non_contig, contig)
+
+    def test_multinomial_pvals_float32(self):
+        x = np.array([9.9e-01, 9.9e-01, 1.0e-09, 1.0e-09, 1.0e-09, 1.0e-09,
+                      1.0e-09, 1.0e-09, 1.0e-09, 1.0e-09], dtype=np.float32)
+        pvals = x / x.sum()
+        random = Generator(MT19937(1432985819))
+        match = r"[\w\s]*pvals array is cast to 64-bit floating"
+        with pytest.raises(ValueError, match=match):
+            random.multinomial(1, pvals)
+
+
+class TestMultivariateHypergeometric:
+
+    def setup_method(self):
+        self.seed = 8675309
+
+    def test_argument_validation(self):
+        # Error cases...
+
+        # `colors` must be a 1-d sequence
+        assert_raises(ValueError, random.multivariate_hypergeometric,
+                      10, 4)
+
+        # Negative nsample
+        assert_raises(ValueError, random.multivariate_hypergeometric,
+                      [2, 3, 4], -1)
+
+        # Negative color
+        assert_raises(ValueError, random.multivariate_hypergeometric,
+                      [-1, 2, 3], 2)
+
+        # nsample exceeds sum(colors)
+        assert_raises(ValueError, random.multivariate_hypergeometric,
+                      [2, 3, 4], 10)
+
+        # nsample exceeds sum(colors) (edge case of empty colors)
+        assert_raises(ValueError, random.multivariate_hypergeometric,
+                      [], 1)
+
+        # Validation errors associated with very large values in colors.
+        assert_raises(ValueError, random.multivariate_hypergeometric,
+                      [999999999, 101], 5, 1, 'marginals')
+
+        int64_info = np.iinfo(np.int64)
+        max_int64 = int64_info.max
+        max_int64_index = max_int64 // int64_info.dtype.itemsize
+        assert_raises(ValueError, random.multivariate_hypergeometric,
+                      [max_int64_index - 100, 101], 5, 1, 'count')
+
+    @pytest.mark.parametrize('method', ['count', 'marginals'])
+    def test_edge_cases(self, method):
+        # Set the seed, but in fact, all the results in this test are
+        # deterministic, so we don't really need this.
+        random = Generator(MT19937(self.seed))
+
+        x = random.multivariate_hypergeometric([0, 0, 0], 0, method=method)
+        assert_array_equal(x, [0, 0, 0])
+
+        x = random.multivariate_hypergeometric([], 0, method=method)
+        assert_array_equal(x, [])
+
+        x = random.multivariate_hypergeometric([], 0, size=1, method=method)
+        assert_array_equal(x, np.empty((1, 0), dtype=np.int64))
+
+        x = random.multivariate_hypergeometric([1, 2, 3], 0, method=method)
+        assert_array_equal(x, [0, 0, 0])
+
+        x = random.multivariate_hypergeometric([9, 0, 0], 3, method=method)
+        assert_array_equal(x, [3, 0, 0])
+
+        colors = [1, 1, 0, 1, 1]
+        x = random.multivariate_hypergeometric(colors, sum(colors),
+                                               method=method)
+        assert_array_equal(x, colors)
+
+        x = random.multivariate_hypergeometric([3, 4, 5], 12, size=3,
+                                               method=method)
+        assert_array_equal(x, [[3, 4, 5]]*3)
+
+    # Cases for nsample:
+    #     nsample < 10
+    #     10 <= nsample < colors.sum()/2
+    #     colors.sum()/2 < nsample < colors.sum() - 10
+    #     colors.sum() - 10 < nsample < colors.sum()
+    @pytest.mark.parametrize('nsample', [8, 25, 45, 55])
+    @pytest.mark.parametrize('method', ['count', 'marginals'])
+    @pytest.mark.parametrize('size', [5, (2, 3), 150000])
+    def test_typical_cases(self, nsample, method, size):
+        random = Generator(MT19937(self.seed))
+
+        colors = np.array([10, 5, 20, 25])
+        sample = random.multivariate_hypergeometric(colors, nsample, size,
+                                                    method=method)
+        if isinstance(size, int):
+            expected_shape = (size,) + colors.shape
+        else:
+            expected_shape = size + colors.shape
+        assert_equal(sample.shape, expected_shape)
+        assert_((sample >= 0).all())
+        assert_((sample <= colors).all())
+        assert_array_equal(sample.sum(axis=-1),
+                           np.full(size, fill_value=nsample, dtype=int))
+        if isinstance(size, int) and size >= 100000:
+            # This sample is large enough to compare its mean to
+            # the expected values.
+            assert_allclose(sample.mean(axis=0),
+                            nsample * colors / colors.sum(),
+                            rtol=1e-3, atol=0.005)
+
+    def test_repeatability1(self):
+        random = Generator(MT19937(self.seed))
+        sample = random.multivariate_hypergeometric([3, 4, 5], 5, size=5,
+                                                    method='count')
+        expected = np.array([[2, 1, 2],
+                             [2, 1, 2],
+                             [1, 1, 3],
+                             [2, 0, 3],
+                             [2, 1, 2]])
+        assert_array_equal(sample, expected)
+
+    def test_repeatability2(self):
+        random = Generator(MT19937(self.seed))
+        sample = random.multivariate_hypergeometric([20, 30, 50], 50,
+                                                    size=5,
+                                                    method='marginals')
+        expected = np.array([[ 9, 17, 24],
+                             [ 7, 13, 30],
+                             [ 9, 15, 26],
+                             [ 9, 17, 24],
+                             [12, 14, 24]])
+        assert_array_equal(sample, expected)
+
+    def test_repeatability3(self):
+        random = Generator(MT19937(self.seed))
+        sample = random.multivariate_hypergeometric([20, 30, 50], 12,
+                                                    size=5,
+                                                    method='marginals')
+        expected = np.array([[2, 3, 7],
+                             [5, 3, 4],
+                             [2, 5, 5],
+                             [5, 3, 4],
+                             [1, 5, 6]])
+        assert_array_equal(sample, expected)
+
+
+class TestSetState:
+    def setup_method(self):
+        self.seed = 1234567890
+        self.rg = Generator(MT19937(self.seed))
+        self.bit_generator = self.rg.bit_generator
+        self.state = self.bit_generator.state
+        self.legacy_state = (self.state['bit_generator'],
+                             self.state['state']['key'],
+                             self.state['state']['pos'])
+
+    def test_gaussian_reset(self):
+        # Make sure the cached every-other-Gaussian is reset.
+        old = self.rg.standard_normal(size=3)
+        self.bit_generator.state = self.state
+        new = self.rg.standard_normal(size=3)
+        assert_(np.all(old == new))
+
+    def test_gaussian_reset_in_media_res(self):
+        # When the state is saved with a cached Gaussian, make sure the
+        # cached Gaussian is restored.
+
+        self.rg.standard_normal()
+        state = self.bit_generator.state
+        old = self.rg.standard_normal(size=3)
+        self.bit_generator.state = state
+        new = self.rg.standard_normal(size=3)
+        assert_(np.all(old == new))
+
+    def test_negative_binomial(self):
+        # Ensure that the negative binomial results take floating point
+        # arguments without truncation.
+        self.rg.negative_binomial(0.5, 0.5)
+
+
+class TestIntegers:
+    rfunc = random.integers
+
+    # valid integer/boolean types
+    itype = [bool, np.int8, np.uint8, np.int16, np.uint16,
+             np.int32, np.uint32, np.int64, np.uint64]
+
+    def test_unsupported_type(self, endpoint):
+        assert_raises(TypeError, self.rfunc, 1, endpoint=endpoint, dtype=float)
+
+    def test_bounds_checking(self, endpoint):
+        for dt in self.itype:
+            lbnd = 0 if dt is bool else np.iinfo(dt).min
+            ubnd = 2 if dt is bool else np.iinfo(dt).max + 1
+            ubnd = ubnd - 1 if endpoint else ubnd
+            assert_raises(ValueError, self.rfunc, lbnd - 1, ubnd,
+                          endpoint=endpoint, dtype=dt)
+            assert_raises(ValueError, self.rfunc, lbnd, ubnd + 1,
+                          endpoint=endpoint, dtype=dt)
+            assert_raises(ValueError, self.rfunc, ubnd, lbnd,
+                          endpoint=endpoint, dtype=dt)
+            assert_raises(ValueError, self.rfunc, 1, 0, endpoint=endpoint,
+                          dtype=dt)
+
+            assert_raises(ValueError, self.rfunc, [lbnd - 1], ubnd,
+                          endpoint=endpoint, dtype=dt)
+            assert_raises(ValueError, self.rfunc, [lbnd], [ubnd + 1],
+                          endpoint=endpoint, dtype=dt)
+            assert_raises(ValueError, self.rfunc, [ubnd], [lbnd],
+                          endpoint=endpoint, dtype=dt)
+            assert_raises(ValueError, self.rfunc, 1, [0],
+                          endpoint=endpoint, dtype=dt)
+            assert_raises(ValueError, self.rfunc, [ubnd+1], [ubnd],
+                          endpoint=endpoint, dtype=dt)
+
+    def test_bounds_checking_array(self, endpoint):
+        for dt in self.itype:
+            lbnd = 0 if dt is bool else np.iinfo(dt).min
+            ubnd = 2 if dt is bool else np.iinfo(dt).max + (not endpoint)
+
+            assert_raises(ValueError, self.rfunc, [lbnd - 1] * 2, [ubnd] * 2,
+                          endpoint=endpoint, dtype=dt)
+            assert_raises(ValueError, self.rfunc, [lbnd] * 2,
+                          [ubnd + 1] * 2, endpoint=endpoint, dtype=dt)
+            assert_raises(ValueError, self.rfunc, ubnd, [lbnd] * 2,
+                          endpoint=endpoint, dtype=dt)
+            assert_raises(ValueError, self.rfunc, [1] * 2, 0,
+                          endpoint=endpoint, dtype=dt)
+
+    def test_rng_zero_and_extremes(self, endpoint):
+        for dt in self.itype:
+            lbnd = 0 if dt is bool else np.iinfo(dt).min
+            ubnd = 2 if dt is bool else np.iinfo(dt).max + 1
+            ubnd = ubnd - 1 if endpoint else ubnd
+            is_open = not endpoint
+
+            tgt = ubnd - 1
+            assert_equal(self.rfunc(tgt, tgt + is_open, size=1000,
+                                    endpoint=endpoint, dtype=dt), tgt)
+            assert_equal(self.rfunc([tgt], tgt + is_open, size=1000,
+                                    endpoint=endpoint, dtype=dt), tgt)
+
+            tgt = lbnd
+            assert_equal(self.rfunc(tgt, tgt + is_open, size=1000,
+                                    endpoint=endpoint, dtype=dt), tgt)
+            assert_equal(self.rfunc(tgt, [tgt + is_open], size=1000,
+                                    endpoint=endpoint, dtype=dt), tgt)
+
+            tgt = (lbnd + ubnd) // 2
+            assert_equal(self.rfunc(tgt, tgt + is_open, size=1000,
+                                    endpoint=endpoint, dtype=dt), tgt)
+            assert_equal(self.rfunc([tgt], [tgt + is_open],
+                                    size=1000, endpoint=endpoint, dtype=dt),
+                         tgt)
+
+    def test_rng_zero_and_extremes_array(self, endpoint):
+        size = 1000
+        for dt in self.itype:
+            lbnd = 0 if dt is bool else np.iinfo(dt).min
+            ubnd = 2 if dt is bool else np.iinfo(dt).max + 1
+            ubnd = ubnd - 1 if endpoint else ubnd
+
+            tgt = ubnd - 1
+            assert_equal(self.rfunc([tgt], [tgt + 1],
+                                    size=size, dtype=dt), tgt)
+            assert_equal(self.rfunc(
+                [tgt] * size, [tgt + 1] * size, dtype=dt), tgt)
+            assert_equal(self.rfunc(
+                [tgt] * size, [tgt + 1] * size, size=size, dtype=dt), tgt)
+
+            tgt = lbnd
+            assert_equal(self.rfunc([tgt], [tgt + 1],
+                                    size=size, dtype=dt), tgt)
+            assert_equal(self.rfunc(
+                [tgt] * size, [tgt + 1] * size, dtype=dt), tgt)
+            assert_equal(self.rfunc(
+                [tgt] * size, [tgt + 1] * size, size=size, dtype=dt), tgt)
+
+            tgt = (lbnd + ubnd) // 2
+            assert_equal(self.rfunc([tgt], [tgt + 1],
+                                    size=size, dtype=dt), tgt)
+            assert_equal(self.rfunc(
+                [tgt] * size, [tgt + 1] * size, dtype=dt), tgt)
+            assert_equal(self.rfunc(
+                [tgt] * size, [tgt + 1] * size, size=size, dtype=dt), tgt)
+
+    def test_full_range(self, endpoint):
+        # Test for ticket #1690
+
+        for dt in self.itype:
+            lbnd = 0 if dt is bool else np.iinfo(dt).min
+            ubnd = 2 if dt is bool else np.iinfo(dt).max + 1
+            ubnd = ubnd - 1 if endpoint else ubnd
+
+            try:
+                self.rfunc(lbnd, ubnd, endpoint=endpoint, dtype=dt)
+            except Exception as e:
+                raise AssertionError("No error should have been raised, "
+                                     "but one was with the following "
+                                     "message:\n\n%s" % str(e))
+
+    def test_full_range_array(self, endpoint):
+        # Test for ticket #1690
+
+        for dt in self.itype:
+            lbnd = 0 if dt is bool else np.iinfo(dt).min
+            ubnd = 2 if dt is bool else np.iinfo(dt).max + 1
+            ubnd = ubnd - 1 if endpoint else ubnd
+
+            try:
+                self.rfunc([lbnd] * 2, [ubnd], endpoint=endpoint, dtype=dt)
+            except Exception as e:
+                raise AssertionError("No error should have been raised, "
+                                     "but one was with the following "
+                                     "message:\n\n%s" % str(e))
+
+    def test_in_bounds_fuzz(self, endpoint):
+        # Don't use fixed seed
+        random = Generator(MT19937())
+
+        for dt in self.itype[1:]:
+            for ubnd in [4, 8, 16]:
+                vals = self.rfunc(2, ubnd - endpoint, size=2 ** 16,
+                                  endpoint=endpoint, dtype=dt)
+                assert_(vals.max() < ubnd)
+                assert_(vals.min() >= 2)
+
+        vals = self.rfunc(0, 2 - endpoint, size=2 ** 16, endpoint=endpoint,
+                          dtype=bool)
+        assert_(vals.max() < 2)
+        assert_(vals.min() >= 0)
+
+    def test_scalar_array_equiv(self, endpoint):
+        for dt in self.itype:
+            lbnd = 0 if dt is bool else np.iinfo(dt).min
+            ubnd = 2 if dt is bool else np.iinfo(dt).max + 1
+            ubnd = ubnd - 1 if endpoint else ubnd
+
+            size = 1000
+            random = Generator(MT19937(1234))
+            scalar = random.integers(lbnd, ubnd, size=size, endpoint=endpoint,
+                                dtype=dt)
+
+            random = Generator(MT19937(1234))
+            scalar_array = random.integers([lbnd], [ubnd], size=size,
+                                      endpoint=endpoint, dtype=dt)
+
+            random = Generator(MT19937(1234))
+            array = random.integers([lbnd] * size, [ubnd] *
+                               size, size=size, endpoint=endpoint, dtype=dt)
+            assert_array_equal(scalar, scalar_array)
+            assert_array_equal(scalar, array)
+
+    def test_repeatability(self, endpoint):
+        # We use a sha256 hash of generated sequences of 1000 samples
+        # in the range [0, 6) for all but bool, where the range
+        # is [0, 2). Hashes are for little endian numbers.
+        tgt = {'bool':   '053594a9b82d656f967c54869bc6970aa0358cf94ad469c81478459c6a90eee3',
+               'int16':  '54de9072b6ee9ff7f20b58329556a46a447a8a29d67db51201bf88baa6e4e5d4',
+               'int32':  'd3a0d5efb04542b25ac712e50d21f39ac30f312a5052e9bbb1ad3baa791ac84b',
+               'int64':  '14e224389ac4580bfbdccb5697d6190b496f91227cf67df60989de3d546389b1',
+               'int8':   '0e203226ff3fbbd1580f15da4621e5f7164d0d8d6b51696dd42d004ece2cbec1',
+               'uint16': '54de9072b6ee9ff7f20b58329556a46a447a8a29d67db51201bf88baa6e4e5d4',
+               'uint32': 'd3a0d5efb04542b25ac712e50d21f39ac30f312a5052e9bbb1ad3baa791ac84b',
+               'uint64': '14e224389ac4580bfbdccb5697d6190b496f91227cf67df60989de3d546389b1',
+               'uint8':  '0e203226ff3fbbd1580f15da4621e5f7164d0d8d6b51696dd42d004ece2cbec1'}
+
+        for dt in self.itype[1:]:
+            random = Generator(MT19937(1234))
+
+            # view as little endian for hash
+            if sys.byteorder == 'little':
+                val = random.integers(0, 6 - endpoint, size=1000, endpoint=endpoint,
+                                 dtype=dt)
+            else:
+                val = random.integers(0, 6 - endpoint, size=1000, endpoint=endpoint,
+                                 dtype=dt).byteswap()
+
+            res = hashlib.sha256(val).hexdigest()
+            assert_(tgt[np.dtype(dt).name] == res)
+
+        # bools do not depend on endianness
+        random = Generator(MT19937(1234))
+        val = random.integers(0, 2 - endpoint, size=1000, endpoint=endpoint,
+                         dtype=bool).view(np.int8)
+        res = hashlib.sha256(val).hexdigest()
+        assert_(tgt[np.dtype(bool).name] == res)
+
+    def test_repeatability_broadcasting(self, endpoint):
+        for dt in self.itype:
+            lbnd = 0 if dt in (bool, np.bool_) else np.iinfo(dt).min
+            ubnd = 2 if dt in (bool, np.bool_) else np.iinfo(dt).max + 1
+            ubnd = ubnd - 1 if endpoint else ubnd
+
+            # view as little endian for hash
+            random = Generator(MT19937(1234))
+            val = random.integers(lbnd, ubnd, size=1000, endpoint=endpoint,
+                             dtype=dt)
+
+            random = Generator(MT19937(1234))
+            val_bc = random.integers([lbnd] * 1000, ubnd, endpoint=endpoint,
+                                dtype=dt)
+
+            assert_array_equal(val, val_bc)
+
+            random = Generator(MT19937(1234))
+            val_bc = random.integers([lbnd] * 1000, [ubnd] * 1000,
+                                endpoint=endpoint, dtype=dt)
+
+            assert_array_equal(val, val_bc)
+
+    @pytest.mark.parametrize(
+        'bound, expected',
+        [(2**32 - 1, np.array([517043486, 1364798665, 1733884389, 1353720612,
+                               3769704066, 1170797179, 4108474671])),
+         (2**32, np.array([517043487, 1364798666, 1733884390, 1353720613,
+                           3769704067, 1170797180, 4108474672])),
+         (2**32 + 1, np.array([517043487, 1733884390, 3769704068, 4108474673,
+                               1831631863, 1215661561, 3869512430]))]
+    )
+    def test_repeatability_32bit_boundary(self, bound, expected):
+        for size in [None, len(expected)]:
+            random = Generator(MT19937(1234))
+            x = random.integers(bound, size=size)
+            assert_equal(x, expected if size is not None else expected[0])
+
+    def test_repeatability_32bit_boundary_broadcasting(self):
+        desired = np.array([[[1622936284, 3620788691, 1659384060],
+                             [1417365545,  760222891, 1909653332],
+                             [3788118662,  660249498, 4092002593]],
+                            [[3625610153, 2979601262, 3844162757],
+                             [ 685800658,  120261497, 2694012896],
+                             [1207779440, 1586594375, 3854335050]],
+                            [[3004074748, 2310761796, 3012642217],
+                             [2067714190, 2786677879, 1363865881],
+                             [ 791663441, 1867303284, 2169727960]],
+                            [[1939603804, 1250951100,  298950036],
+                             [1040128489, 3791912209, 3317053765],
+                             [3155528714,   61360675, 2305155588]],
+                            [[ 817688762, 1335621943, 3288952434],
+                             [1770890872, 1102951817, 1957607470],
+                             [3099996017,  798043451,   48334215]]])
+        for size in [None, (5, 3, 3)]:
+            random = Generator(MT19937(12345))
+            x = random.integers([[-1], [0], [1]],
+                                [2**32 - 1, 2**32, 2**32 + 1],
+                                size=size)
+            assert_array_equal(x, desired if size is not None else desired[0])
+
+    def test_int64_uint64_broadcast_exceptions(self, endpoint):
+        configs = {np.uint64: ((0, 2**65), (-1, 2**62), (10, 9), (0, 0)),
+                   np.int64: ((0, 2**64), (-(2**64), 2**62), (10, 9), (0, 0),
+                              (-2**63-1, -2**63-1))}
+        for dtype in configs:
+            for config in configs[dtype]:
+                low, high = config
+                high = high - endpoint
+                low_a = np.array([[low]*10])
+                high_a = np.array([high] * 10)
+                assert_raises(ValueError, random.integers, low, high,
+                              endpoint=endpoint, dtype=dtype)
+                assert_raises(ValueError, random.integers, low_a, high,
+                              endpoint=endpoint, dtype=dtype)
+                assert_raises(ValueError, random.integers, low, high_a,
+                              endpoint=endpoint, dtype=dtype)
+                assert_raises(ValueError, random.integers, low_a, high_a,
+                              endpoint=endpoint, dtype=dtype)
+
+                low_o = np.array([[low]*10], dtype=object)
+                high_o = np.array([high] * 10, dtype=object)
+                assert_raises(ValueError, random.integers, low_o, high,
+                              endpoint=endpoint, dtype=dtype)
+                assert_raises(ValueError, random.integers, low, high_o,
+                              endpoint=endpoint, dtype=dtype)
+                assert_raises(ValueError, random.integers, low_o, high_o,
+                              endpoint=endpoint, dtype=dtype)
+
+    def test_int64_uint64_corner_case(self, endpoint):
+        # When stored in Numpy arrays, `lbnd` is casted
+        # as np.int64, and `ubnd` is casted as np.uint64.
+        # Checking whether `lbnd` >= `ubnd` used to be
+        # done solely via direct comparison, which is incorrect
+        # because when Numpy tries to compare both numbers,
+        # it casts both to np.float64 because there is
+        # no integer superset of np.int64 and np.uint64. However,
+        # `ubnd` is too large to be represented in np.float64,
+        # causing it be round down to np.iinfo(np.int64).max,
+        # leading to a ValueError because `lbnd` now equals
+        # the new `ubnd`.
+
+        dt = np.int64
+        tgt = np.iinfo(np.int64).max
+        lbnd = np.int64(np.iinfo(np.int64).max)
+        ubnd = np.uint64(np.iinfo(np.int64).max + 1 - endpoint)
+
+        # None of these function calls should
+        # generate a ValueError now.
+        actual = random.integers(lbnd, ubnd, endpoint=endpoint, dtype=dt)
+        assert_equal(actual, tgt)
+
+    def test_respect_dtype_singleton(self, endpoint):
+        # See gh-7203
+        for dt in self.itype:
+            lbnd = 0 if dt is bool else np.iinfo(dt).min
+            ubnd = 2 if dt is bool else np.iinfo(dt).max + 1
+            ubnd = ubnd - 1 if endpoint else ubnd
+            dt = np.bool_ if dt is bool else dt
+
+            sample = self.rfunc(lbnd, ubnd, endpoint=endpoint, dtype=dt)
+            assert_equal(sample.dtype, dt)
+
+        for dt in (bool, int):
+            lbnd = 0 if dt is bool else np.iinfo(dt).min
+            ubnd = 2 if dt is bool else np.iinfo(dt).max + 1
+            ubnd = ubnd - 1 if endpoint else ubnd
+
+            # gh-7284: Ensure that we get Python data types
+            sample = self.rfunc(lbnd, ubnd, endpoint=endpoint, dtype=dt)
+            assert not hasattr(sample, 'dtype')
+            assert_equal(type(sample), dt)
+
+    def test_respect_dtype_array(self, endpoint):
+        # See gh-7203
+        for dt in self.itype:
+            lbnd = 0 if dt is bool else np.iinfo(dt).min
+            ubnd = 2 if dt is bool else np.iinfo(dt).max + 1
+            ubnd = ubnd - 1 if endpoint else ubnd
+            dt = np.bool_ if dt is bool else dt
+
+            sample = self.rfunc([lbnd], [ubnd], endpoint=endpoint, dtype=dt)
+            assert_equal(sample.dtype, dt)
+            sample = self.rfunc([lbnd] * 2, [ubnd] * 2, endpoint=endpoint,
+                                dtype=dt)
+            assert_equal(sample.dtype, dt)
+
+    def test_zero_size(self, endpoint):
+        # See gh-7203
+        for dt in self.itype:
+            sample = self.rfunc(0, 0, (3, 0, 4), endpoint=endpoint, dtype=dt)
+            assert sample.shape == (3, 0, 4)
+            assert sample.dtype == dt
+            assert self.rfunc(0, -10, 0, endpoint=endpoint,
+                              dtype=dt).shape == (0,)
+            assert_equal(random.integers(0, 0, size=(3, 0, 4)).shape,
+                         (3, 0, 4))
+            assert_equal(random.integers(0, -10, size=0).shape, (0,))
+            assert_equal(random.integers(10, 10, size=0).shape, (0,))
+
+    def test_error_byteorder(self):
+        other_byteord_dt = 'i4'
+        with pytest.raises(ValueError):
+            random.integers(0, 200, size=10, dtype=other_byteord_dt)
+
+    # chi2max is the maximum acceptable chi-squared value.
+    @pytest.mark.slow
+    @pytest.mark.parametrize('sample_size,high,dtype,chi2max',
+        [(5000000, 5, np.int8, 125.0),          # p-value ~4.6e-25
+         (5000000, 7, np.uint8, 150.0),         # p-value ~7.7e-30
+         (10000000, 2500, np.int16, 3300.0),    # p-value ~3.0e-25
+         (50000000, 5000, np.uint16, 6500.0),   # p-value ~3.5e-25
+        ])
+    def test_integers_small_dtype_chisquared(self, sample_size, high,
+                                             dtype, chi2max):
+        # Regression test for gh-14774.
+        samples = random.integers(high, size=sample_size, dtype=dtype)
+
+        values, counts = np.unique(samples, return_counts=True)
+        expected = sample_size / high
+        chi2 = ((counts - expected)**2 / expected).sum()
+        assert chi2 < chi2max
+
+
+class TestRandomDist:
+    # Make sure the random distribution returns the correct value for a
+    # given seed
+
+    def setup_method(self):
+        self.seed = 1234567890
+
+    def test_integers(self):
+        random = Generator(MT19937(self.seed))
+        actual = random.integers(-99, 99, size=(3, 2))
+        desired = np.array([[-80, -56], [41, 37], [-83, -16]])
+        assert_array_equal(actual, desired)
+
+    def test_integers_masked(self):
+        # Test masked rejection sampling algorithm to generate array of
+        # uint32 in an interval.
+        random = Generator(MT19937(self.seed))
+        actual = random.integers(0, 99, size=(3, 2), dtype=np.uint32)
+        desired = np.array([[9, 21], [70, 68], [8, 41]], dtype=np.uint32)
+        assert_array_equal(actual, desired)
+
+    def test_integers_closed(self):
+        random = Generator(MT19937(self.seed))
+        actual = random.integers(-99, 99, size=(3, 2), endpoint=True)
+        desired = np.array([[-80, -56], [ 41, 38], [-83, -15]])
+        assert_array_equal(actual, desired)
+
+    def test_integers_max_int(self):
+        # Tests whether integers with closed=True can generate the
+        # maximum allowed Python int that can be converted
+        # into a C long. Previous implementations of this
+        # method have thrown an OverflowError when attempting
+        # to generate this integer.
+        actual = random.integers(np.iinfo('l').max, np.iinfo('l').max,
+                                 endpoint=True)
+
+        desired = np.iinfo('l').max
+        assert_equal(actual, desired)
+
+    def test_random(self):
+        random = Generator(MT19937(self.seed))
+        actual = random.random((3, 2))
+        desired = np.array([[0.096999199829214, 0.707517457682192],
+                            [0.084364834598269, 0.767731206553125],
+                            [0.665069021359413, 0.715487190596693]])
+        assert_array_almost_equal(actual, desired, decimal=15)
+
+        random = Generator(MT19937(self.seed))
+        actual = random.random()
+        assert_array_almost_equal(actual, desired[0, 0], decimal=15)
+
+    def test_random_float(self):
+        random = Generator(MT19937(self.seed))
+        actual = random.random((3, 2))
+        desired = np.array([[0.0969992 , 0.70751746],
+                            [0.08436483, 0.76773121],
+                            [0.66506902, 0.71548719]])
+        assert_array_almost_equal(actual, desired, decimal=7)
+
+    def test_random_float_scalar(self):
+        random = Generator(MT19937(self.seed))
+        actual = random.random(dtype=np.float32)
+        desired = 0.0969992
+        assert_array_almost_equal(actual, desired, decimal=7)
+
+    @pytest.mark.parametrize('dtype, uint_view_type',
+                             [(np.float32, np.uint32),
+                              (np.float64, np.uint64)])
+    def test_random_distribution_of_lsb(self, dtype, uint_view_type):
+        random = Generator(MT19937(self.seed))
+        sample = random.random(100000, dtype=dtype)
+        num_ones_in_lsb = np.count_nonzero(sample.view(uint_view_type) & 1)
+        # The probability of a 1 in the least significant bit is 0.25.
+        # With a sample size of 100000, the probability that num_ones_in_lsb
+        # is outside the following range is less than 5e-11.
+        assert 24100 < num_ones_in_lsb < 25900
+
+    def test_random_unsupported_type(self):
+        assert_raises(TypeError, random.random, dtype='int32')
+
+    def test_choice_uniform_replace(self):
+        random = Generator(MT19937(self.seed))
+        actual = random.choice(4, 4)
+        desired = np.array([0, 0, 2, 2], dtype=np.int64)
+        assert_array_equal(actual, desired)
+
+    def test_choice_nonuniform_replace(self):
+        random = Generator(MT19937(self.seed))
+        actual = random.choice(4, 4, p=[0.4, 0.4, 0.1, 0.1])
+        desired = np.array([0, 1, 0, 1], dtype=np.int64)
+        assert_array_equal(actual, desired)
+
+    def test_choice_uniform_noreplace(self):
+        random = Generator(MT19937(self.seed))
+        actual = random.choice(4, 3, replace=False)
+        desired = np.array([2, 0, 3], dtype=np.int64)
+        assert_array_equal(actual, desired)
+        actual = random.choice(4, 4, replace=False, shuffle=False)
+        desired = np.arange(4, dtype=np.int64)
+        assert_array_equal(actual, desired)
+
+    def test_choice_nonuniform_noreplace(self):
+        random = Generator(MT19937(self.seed))
+        actual = random.choice(4, 3, replace=False, p=[0.1, 0.3, 0.5, 0.1])
+        desired = np.array([0, 2, 3], dtype=np.int64)
+        assert_array_equal(actual, desired)
+
+    def test_choice_noninteger(self):
+        random = Generator(MT19937(self.seed))
+        actual = random.choice(['a', 'b', 'c', 'd'], 4)
+        desired = np.array(['a', 'a', 'c', 'c'])
+        assert_array_equal(actual, desired)
+
+    def test_choice_multidimensional_default_axis(self):
+        random = Generator(MT19937(self.seed))
+        actual = random.choice([[0, 1], [2, 3], [4, 5], [6, 7]], 3)
+        desired = np.array([[0, 1], [0, 1], [4, 5]])
+        assert_array_equal(actual, desired)
+
+    def test_choice_multidimensional_custom_axis(self):
+        random = Generator(MT19937(self.seed))
+        actual = random.choice([[0, 1], [2, 3], [4, 5], [6, 7]], 1, axis=1)
+        desired = np.array([[0], [2], [4], [6]])
+        assert_array_equal(actual, desired)
+
+    def test_choice_exceptions(self):
+        sample = random.choice
+        assert_raises(ValueError, sample, -1, 3)
+        assert_raises(ValueError, sample, 3., 3)
+        assert_raises(ValueError, sample, [], 3)
+        assert_raises(ValueError, sample, [1, 2, 3, 4], 3,
+                      p=[[0.25, 0.25], [0.25, 0.25]])
+        assert_raises(ValueError, sample, [1, 2], 3, p=[0.4, 0.4, 0.2])
+        assert_raises(ValueError, sample, [1, 2], 3, p=[1.1, -0.1])
+        assert_raises(ValueError, sample, [1, 2], 3, p=[0.4, 0.4])
+        assert_raises(ValueError, sample, [1, 2, 3], 4, replace=False)
+        # gh-13087
+        assert_raises(ValueError, sample, [1, 2, 3], -2, replace=False)
+        assert_raises(ValueError, sample, [1, 2, 3], (-1,), replace=False)
+        assert_raises(ValueError, sample, [1, 2, 3], (-1, 1), replace=False)
+        assert_raises(ValueError, sample, [1, 2, 3], 2,
+                      replace=False, p=[1, 0, 0])
+
+    def test_choice_return_shape(self):
+        p = [0.1, 0.9]
+        # Check scalar
+        assert_(np.isscalar(random.choice(2, replace=True)))
+        assert_(np.isscalar(random.choice(2, replace=False)))
+        assert_(np.isscalar(random.choice(2, replace=True, p=p)))
+        assert_(np.isscalar(random.choice(2, replace=False, p=p)))
+        assert_(np.isscalar(random.choice([1, 2], replace=True)))
+        assert_(random.choice([None], replace=True) is None)
+        a = np.array([1, 2])
+        arr = np.empty(1, dtype=object)
+        arr[0] = a
+        assert_(random.choice(arr, replace=True) is a)
+
+        # Check 0-d array
+        s = tuple()
+        assert_(not np.isscalar(random.choice(2, s, replace=True)))
+        assert_(not np.isscalar(random.choice(2, s, replace=False)))
+        assert_(not np.isscalar(random.choice(2, s, replace=True, p=p)))
+        assert_(not np.isscalar(random.choice(2, s, replace=False, p=p)))
+        assert_(not np.isscalar(random.choice([1, 2], s, replace=True)))
+        assert_(random.choice([None], s, replace=True).ndim == 0)
+        a = np.array([1, 2])
+        arr = np.empty(1, dtype=object)
+        arr[0] = a
+        assert_(random.choice(arr, s, replace=True).item() is a)
+
+        # Check multi dimensional array
+        s = (2, 3)
+        p = [0.1, 0.1, 0.1, 0.1, 0.4, 0.2]
+        assert_equal(random.choice(6, s, replace=True).shape, s)
+        assert_equal(random.choice(6, s, replace=False).shape, s)
+        assert_equal(random.choice(6, s, replace=True, p=p).shape, s)
+        assert_equal(random.choice(6, s, replace=False, p=p).shape, s)
+        assert_equal(random.choice(np.arange(6), s, replace=True).shape, s)
+
+        # Check zero-size
+        assert_equal(random.integers(0, 0, size=(3, 0, 4)).shape, (3, 0, 4))
+        assert_equal(random.integers(0, -10, size=0).shape, (0,))
+        assert_equal(random.integers(10, 10, size=0).shape, (0,))
+        assert_equal(random.choice(0, size=0).shape, (0,))
+        assert_equal(random.choice([], size=(0,)).shape, (0,))
+        assert_equal(random.choice(['a', 'b'], size=(3, 0, 4)).shape,
+                     (3, 0, 4))
+        assert_raises(ValueError, random.choice, [], 10)
+
+    def test_choice_nan_probabilities(self):
+        a = np.array([42, 1, 2])
+        p = [None, None, None]
+        assert_raises(ValueError, random.choice, a, p=p)
+
+    def test_choice_p_non_contiguous(self):
+        p = np.ones(10) / 5
+        p[1::2] = 3.0
+        random = Generator(MT19937(self.seed))
+        non_contig = random.choice(5, 3, p=p[::2])
+        random = Generator(MT19937(self.seed))
+        contig = random.choice(5, 3, p=np.ascontiguousarray(p[::2]))
+        assert_array_equal(non_contig, contig)
+
+    def test_choice_return_type(self):
+        # gh 9867
+        p = np.ones(4) / 4.
+        actual = random.choice(4, 2)
+        assert actual.dtype == np.int64
+        actual = random.choice(4, 2, replace=False)
+        assert actual.dtype == np.int64
+        actual = random.choice(4, 2, p=p)
+        assert actual.dtype == np.int64
+        actual = random.choice(4, 2, p=p, replace=False)
+        assert actual.dtype == np.int64
+
+    def test_choice_large_sample(self):
+        choice_hash = '4266599d12bfcfb815213303432341c06b4349f5455890446578877bb322e222'
+        random = Generator(MT19937(self.seed))
+        actual = random.choice(10000, 5000, replace=False)
+        if sys.byteorder != 'little':
+            actual = actual.byteswap()
+        res = hashlib.sha256(actual.view(np.int8)).hexdigest()
+        assert_(choice_hash == res)
+
+    def test_bytes(self):
+        random = Generator(MT19937(self.seed))
+        actual = random.bytes(10)
+        desired = b'\x86\xf0\xd4\x18\xe1\x81\t8%\xdd'
+        assert_equal(actual, desired)
+
+    def test_shuffle(self):
+        # Test lists, arrays (of various dtypes), and multidimensional versions
+        # of both, c-contiguous or not:
+        for conv in [lambda x: np.array([]),
+                     lambda x: x,
+                     lambda x: np.asarray(x).astype(np.int8),
+                     lambda x: np.asarray(x).astype(np.float32),
+                     lambda x: np.asarray(x).astype(np.complex64),
+                     lambda x: np.asarray(x).astype(object),
+                     lambda x: [(i, i) for i in x],
+                     lambda x: np.asarray([[i, i] for i in x]),
+                     lambda x: np.vstack([x, x]).T,
+                     # gh-11442
+                     lambda x: (np.asarray([(i, i) for i in x],
+                                           [("a", int), ("b", int)])
+                                .view(np.recarray)),
+                     # gh-4270
+                     lambda x: np.asarray([(i, i) for i in x],
+                                          [("a", object, (1,)),
+                                           ("b", np.int32, (1,))])]:
+            random = Generator(MT19937(self.seed))
+            alist = conv([1, 2, 3, 4, 5, 6, 7, 8, 9, 0])
+            random.shuffle(alist)
+            actual = alist
+            desired = conv([4, 1, 9, 8, 0, 5, 3, 6, 2, 7])
+            assert_array_equal(actual, desired)
+
+    def test_shuffle_custom_axis(self):
+        random = Generator(MT19937(self.seed))
+        actual = np.arange(16).reshape((4, 4))
+        random.shuffle(actual, axis=1)
+        desired = np.array([[ 0,  3,  1,  2],
+                            [ 4,  7,  5,  6],
+                            [ 8, 11,  9, 10],
+                            [12, 15, 13, 14]])
+        assert_array_equal(actual, desired)
+        random = Generator(MT19937(self.seed))
+        actual = np.arange(16).reshape((4, 4))
+        random.shuffle(actual, axis=-1)
+        assert_array_equal(actual, desired)
+
+    def test_shuffle_custom_axis_empty(self):
+        random = Generator(MT19937(self.seed))
+        desired = np.array([]).reshape((0, 6))
+        for axis in (0, 1):
+            actual = np.array([]).reshape((0, 6))
+            random.shuffle(actual, axis=axis)
+            assert_array_equal(actual, desired)
+
+    def test_shuffle_axis_nonsquare(self):
+        y1 = np.arange(20).reshape(2, 10)
+        y2 = y1.copy()
+        random = Generator(MT19937(self.seed))
+        random.shuffle(y1, axis=1)
+        random = Generator(MT19937(self.seed))
+        random.shuffle(y2.T)
+        assert_array_equal(y1, y2)
+
+    def test_shuffle_masked(self):
+        # gh-3263
+        a = np.ma.masked_values(np.reshape(range(20), (5, 4)) % 3 - 1, -1)
+        b = np.ma.masked_values(np.arange(20) % 3 - 1, -1)
+        a_orig = a.copy()
+        b_orig = b.copy()
+        for i in range(50):
+            random.shuffle(a)
+            assert_equal(
+                sorted(a.data[~a.mask]), sorted(a_orig.data[~a_orig.mask]))
+            random.shuffle(b)
+            assert_equal(
+                sorted(b.data[~b.mask]), sorted(b_orig.data[~b_orig.mask]))
+
+    def test_shuffle_exceptions(self):
+        random = Generator(MT19937(self.seed))
+        arr = np.arange(10)
+        assert_raises(np.AxisError, random.shuffle, arr, 1)
+        arr = np.arange(9).reshape((3, 3))
+        assert_raises(np.AxisError, random.shuffle, arr, 3)
+        assert_raises(TypeError, random.shuffle, arr, slice(1, 2, None))
+        arr = [[1, 2, 3], [4, 5, 6]]
+        assert_raises(NotImplementedError, random.shuffle, arr, 1)
+
+        arr = np.array(3)
+        assert_raises(TypeError, random.shuffle, arr)
+        arr = np.ones((3, 2))
+        assert_raises(np.AxisError, random.shuffle, arr, 2)
+
+    def test_shuffle_not_writeable(self):
+        random = Generator(MT19937(self.seed))
+        a = np.zeros(5)
+        a.flags.writeable = False
+        with pytest.raises(ValueError, match='read-only'):
+            random.shuffle(a)
+
+    def test_permutation(self):
+        random = Generator(MT19937(self.seed))
+        alist = [1, 2, 3, 4, 5, 6, 7, 8, 9, 0]
+        actual = random.permutation(alist)
+        desired = [4, 1, 9, 8, 0, 5, 3, 6, 2, 7]
+        assert_array_equal(actual, desired)
+
+        random = Generator(MT19937(self.seed))
+        arr_2d = np.atleast_2d([1, 2, 3, 4, 5, 6, 7, 8, 9, 0]).T
+        actual = random.permutation(arr_2d)
+        assert_array_equal(actual, np.atleast_2d(desired).T)
+
+        bad_x_str = "abcd"
+        assert_raises(np.AxisError, random.permutation, bad_x_str)
+
+        bad_x_float = 1.2
+        assert_raises(np.AxisError, random.permutation, bad_x_float)
+
+        random = Generator(MT19937(self.seed))
+        integer_val = 10
+        desired = [3, 0, 8, 7, 9, 4, 2, 5, 1, 6]
+
+        actual = random.permutation(integer_val)
+        assert_array_equal(actual, desired)
+
+    def test_permutation_custom_axis(self):
+        a = np.arange(16).reshape((4, 4))
+        desired = np.array([[ 0,  3,  1,  2],
+                            [ 4,  7,  5,  6],
+                            [ 8, 11,  9, 10],
+                            [12, 15, 13, 14]])
+        random = Generator(MT19937(self.seed))
+        actual = random.permutation(a, axis=1)
+        assert_array_equal(actual, desired)
+        random = Generator(MT19937(self.seed))
+        actual = random.permutation(a, axis=-1)
+        assert_array_equal(actual, desired)
+
+    def test_permutation_exceptions(self):
+        random = Generator(MT19937(self.seed))
+        arr = np.arange(10)
+        assert_raises(np.AxisError, random.permutation, arr, 1)
+        arr = np.arange(9).reshape((3, 3))
+        assert_raises(np.AxisError, random.permutation, arr, 3)
+        assert_raises(TypeError, random.permutation, arr, slice(1, 2, None))
+
+    @pytest.mark.parametrize("dtype", [int, object])
+    @pytest.mark.parametrize("axis, expected",
+                             [(None, np.array([[3, 7, 0, 9, 10, 11],
+                                               [8, 4, 2, 5,  1,  6]])),
+                              (0, np.array([[6, 1, 2, 9, 10, 11],
+                                            [0, 7, 8, 3,  4,  5]])),
+                              (1, np.array([[ 5, 3,  4, 0, 2, 1],
+                                            [11, 9, 10, 6, 8, 7]]))])
+    def test_permuted(self, dtype, axis, expected):
+        random = Generator(MT19937(self.seed))
+        x = np.arange(12).reshape(2, 6).astype(dtype)
+        random.permuted(x, axis=axis, out=x)
+        assert_array_equal(x, expected)
+
+        random = Generator(MT19937(self.seed))
+        x = np.arange(12).reshape(2, 6).astype(dtype)
+        y = random.permuted(x, axis=axis)
+        assert y.dtype == dtype
+        assert_array_equal(y, expected)
+
+    def test_permuted_with_strides(self):
+        random = Generator(MT19937(self.seed))
+        x0 = np.arange(22).reshape(2, 11)
+        x1 = x0.copy()
+        x = x0[:, ::3]
+        y = random.permuted(x, axis=1, out=x)
+        expected = np.array([[0, 9, 3, 6],
+                             [14, 20, 11, 17]])
+        assert_array_equal(y, expected)
+        x1[:, ::3] = expected
+        # Verify that the original x0 was modified in-place as expected.
+        assert_array_equal(x1, x0)
+
+    def test_permuted_empty(self):
+        y = random.permuted([])
+        assert_array_equal(y, [])
+
+    @pytest.mark.parametrize('outshape', [(2, 3), 5])
+    def test_permuted_out_with_wrong_shape(self, outshape):
+        a = np.array([1, 2, 3])
+        out = np.zeros(outshape, dtype=a.dtype)
+        with pytest.raises(ValueError, match='same shape'):
+            random.permuted(a, out=out)
+
+    def test_permuted_out_with_wrong_type(self):
+        out = np.zeros((3, 5), dtype=np.int32)
+        x = np.ones((3, 5))
+        with pytest.raises(TypeError, match='Cannot cast'):
+            random.permuted(x, axis=1, out=out)
+
+    def test_permuted_not_writeable(self):
+        x = np.zeros((2, 5))
+        x.flags.writeable = False
+        with pytest.raises(ValueError, match='read-only'):
+            random.permuted(x, axis=1, out=x)
+
+    def test_beta(self):
+        random = Generator(MT19937(self.seed))
+        actual = random.beta(.1, .9, size=(3, 2))
+        desired = np.array(
+            [[1.083029353267698e-10, 2.449965303168024e-11],
+             [2.397085162969853e-02, 3.590779671820755e-08],
+             [2.830254190078299e-04, 1.744709918330393e-01]])
+        assert_array_almost_equal(actual, desired, decimal=15)
+
+    def test_binomial(self):
+        random = Generator(MT19937(self.seed))
+        actual = random.binomial(100.123, .456, size=(3, 2))
+        desired = np.array([[42, 41],
+                            [42, 48],
+                            [44, 50]])
+        assert_array_equal(actual, desired)
+
+        random = Generator(MT19937(self.seed))
+        actual = random.binomial(100.123, .456)
+        desired = 42
+        assert_array_equal(actual, desired)
+
+    def test_chisquare(self):
+        random = Generator(MT19937(self.seed))
+        actual = random.chisquare(50, size=(3, 2))
+        desired = np.array([[32.9850547060149, 39.0219480493301],
+                            [56.2006134779419, 57.3474165711485],
+                            [55.4243733880198, 55.4209797925213]])
+        assert_array_almost_equal(actual, desired, decimal=13)
+
+    def test_dirichlet(self):
+        random = Generator(MT19937(self.seed))
+        alpha = np.array([51.72840233779265162, 39.74494232180943953])
+        actual = random.dirichlet(alpha, size=(3, 2))
+        desired = np.array([[[0.5439892869558927,  0.45601071304410745],
+                             [0.5588917345860708,  0.4411082654139292 ]],
+                            [[0.5632074165063435,  0.43679258349365657],
+                             [0.54862581112627,    0.45137418887373015]],
+                            [[0.49961831357047226, 0.5003816864295278 ],
+                             [0.52374806183482,    0.47625193816517997]]])
+        assert_array_almost_equal(actual, desired, decimal=15)
+        bad_alpha = np.array([5.4e-01, -1.0e-16])
+        assert_raises(ValueError, random.dirichlet, bad_alpha)
+
+        random = Generator(MT19937(self.seed))
+        alpha = np.array([51.72840233779265162, 39.74494232180943953])
+        actual = random.dirichlet(alpha)
+        assert_array_almost_equal(actual, desired[0, 0], decimal=15)
+
+    def test_dirichlet_size(self):
+        # gh-3173
+        p = np.array([51.72840233779265162, 39.74494232180943953])
+        assert_equal(random.dirichlet(p, np.uint32(1)).shape, (1, 2))
+        assert_equal(random.dirichlet(p, np.uint32(1)).shape, (1, 2))
+        assert_equal(random.dirichlet(p, np.uint32(1)).shape, (1, 2))
+        assert_equal(random.dirichlet(p, [2, 2]).shape, (2, 2, 2))
+        assert_equal(random.dirichlet(p, (2, 2)).shape, (2, 2, 2))
+        assert_equal(random.dirichlet(p, np.array((2, 2))).shape, (2, 2, 2))
+
+        assert_raises(TypeError, random.dirichlet, p, float(1))
+
+    def test_dirichlet_bad_alpha(self):
+        # gh-2089
+        alpha = np.array([5.4e-01, -1.0e-16])
+        assert_raises(ValueError, random.dirichlet, alpha)
+
+        # gh-15876
+        assert_raises(ValueError, random.dirichlet, [[5, 1]])
+        assert_raises(ValueError, random.dirichlet, [[5], [1]])
+        assert_raises(ValueError, random.dirichlet, [[[5], [1]], [[1], [5]]])
+        assert_raises(ValueError, random.dirichlet, np.array([[5, 1], [1, 5]]))
+
+    def test_dirichlet_alpha_non_contiguous(self):
+        a = np.array([51.72840233779265162, -1.0, 39.74494232180943953])
+        alpha = a[::2]
+        random = Generator(MT19937(self.seed))
+        non_contig = random.dirichlet(alpha, size=(3, 2))
+        random = Generator(MT19937(self.seed))
+        contig = random.dirichlet(np.ascontiguousarray(alpha),
+                                  size=(3, 2))
+        assert_array_almost_equal(non_contig, contig)
+
+    def test_dirichlet_small_alpha(self):
+        eps = 1.0e-9  # 1.0e-10 -> runtime x 10; 1e-11 -> runtime x 200, etc.
+        alpha = eps * np.array([1., 1.0e-3])
+        random = Generator(MT19937(self.seed))
+        actual = random.dirichlet(alpha, size=(3, 2))
+        expected = np.array([
+            [[1., 0.],
+             [1., 0.]],
+            [[1., 0.],
+             [1., 0.]],
+            [[1., 0.],
+             [1., 0.]]
+        ])
+        assert_array_almost_equal(actual, expected, decimal=15)
+
+    @pytest.mark.slow
+    def test_dirichlet_moderately_small_alpha(self):
+        # Use alpha.max() < 0.1 to trigger stick breaking code path
+        alpha = np.array([0.02, 0.04, 0.03])
+        exact_mean = alpha / alpha.sum()
+        random = Generator(MT19937(self.seed))
+        sample = random.dirichlet(alpha, size=20000000)
+        sample_mean = sample.mean(axis=0)
+        assert_allclose(sample_mean, exact_mean, rtol=1e-3)
+
+    # This set of parameters includes inputs with alpha.max() >= 0.1 and
+    # alpha.max() < 0.1 to exercise both generation methods within the
+    # dirichlet code.
+    @pytest.mark.parametrize(
+        'alpha',
+        [[5, 9, 0, 8],
+         [0.5, 0, 0, 0],
+         [1, 5, 0, 0, 1.5, 0, 0, 0],
+         [0.01, 0.03, 0, 0.005],
+         [1e-5, 0, 0, 0],
+         [0.002, 0.015, 0, 0, 0.04, 0, 0, 0],
+         [0.0],
+         [0, 0, 0]],
+    )
+    def test_dirichlet_multiple_zeros_in_alpha(self, alpha):
+        alpha = np.array(alpha)
+        y = random.dirichlet(alpha)
+        assert_equal(y[alpha == 0], 0.0)
+
+    def test_exponential(self):
+        random = Generator(MT19937(self.seed))
+        actual = random.exponential(1.1234, size=(3, 2))
+        desired = np.array([[0.098845481066258, 1.560752510746964],
+                            [0.075730916041636, 1.769098974710777],
+                            [1.488602544592235, 2.49684815275751 ]])
+        assert_array_almost_equal(actual, desired, decimal=15)
+
+    def test_exponential_0(self):
+        assert_equal(random.exponential(scale=0), 0)
+        assert_raises(ValueError, random.exponential, scale=-0.)
+
+    def test_f(self):
+        random = Generator(MT19937(self.seed))
+        actual = random.f(12, 77, size=(3, 2))
+        desired = np.array([[0.461720027077085, 1.100441958872451],
+                            [1.100337455217484, 0.91421736740018 ],
+                            [0.500811891303113, 0.826802454552058]])
+        assert_array_almost_equal(actual, desired, decimal=15)
+
+    def test_gamma(self):
+        random = Generator(MT19937(self.seed))
+        actual = random.gamma(5, 3, size=(3, 2))
+        desired = np.array([[ 5.03850858902096,  7.9228656732049 ],
+                            [18.73983605132985, 19.57961681699238],
+                            [18.17897755150825, 18.17653912505234]])
+        assert_array_almost_equal(actual, desired, decimal=14)
+
+    def test_gamma_0(self):
+        assert_equal(random.gamma(shape=0, scale=0), 0)
+        assert_raises(ValueError, random.gamma, shape=-0., scale=-0.)
+
+    def test_geometric(self):
+        random = Generator(MT19937(self.seed))
+        actual = random.geometric(.123456789, size=(3, 2))
+        desired = np.array([[1, 11],
+                            [1, 12],
+                            [11, 17]])
+        assert_array_equal(actual, desired)
+
+    def test_geometric_exceptions(self):
+        assert_raises(ValueError, random.geometric, 1.1)
+        assert_raises(ValueError, random.geometric, [1.1] * 10)
+        assert_raises(ValueError, random.geometric, -0.1)
+        assert_raises(ValueError, random.geometric, [-0.1] * 10)
+        with np.errstate(invalid='ignore'):
+            assert_raises(ValueError, random.geometric, np.nan)
+            assert_raises(ValueError, random.geometric, [np.nan] * 10)
+
+    def test_gumbel(self):
+        random = Generator(MT19937(self.seed))
+        actual = random.gumbel(loc=.123456789, scale=2.0, size=(3, 2))
+        desired = np.array([[ 4.688397515056245, -0.289514845417841],
+                            [ 4.981176042584683, -0.633224272589149],
+                            [-0.055915275687488, -0.333962478257953]])
+        assert_array_almost_equal(actual, desired, decimal=15)
+
+    def test_gumbel_0(self):
+        assert_equal(random.gumbel(scale=0), 0)
+        assert_raises(ValueError, random.gumbel, scale=-0.)
+
+    def test_hypergeometric(self):
+        random = Generator(MT19937(self.seed))
+        actual = random.hypergeometric(10.1, 5.5, 14, size=(3, 2))
+        desired = np.array([[ 9, 9],
+                            [ 9, 9],
+                            [10, 9]])
+        assert_array_equal(actual, desired)
+
+        # Test nbad = 0
+        actual = random.hypergeometric(5, 0, 3, size=4)
+        desired = np.array([3, 3, 3, 3])
+        assert_array_equal(actual, desired)
+
+        actual = random.hypergeometric(15, 0, 12, size=4)
+        desired = np.array([12, 12, 12, 12])
+        assert_array_equal(actual, desired)
+
+        # Test ngood = 0
+        actual = random.hypergeometric(0, 5, 3, size=4)
+        desired = np.array([0, 0, 0, 0])
+        assert_array_equal(actual, desired)
+
+        actual = random.hypergeometric(0, 15, 12, size=4)
+        desired = np.array([0, 0, 0, 0])
+        assert_array_equal(actual, desired)
+
+    def test_laplace(self):
+        random = Generator(MT19937(self.seed))
+        actual = random.laplace(loc=.123456789, scale=2.0, size=(3, 2))
+        desired = np.array([[-3.156353949272393,  1.195863024830054],
+                            [-3.435458081645966,  1.656882398925444],
+                            [ 0.924824032467446,  1.251116432209336]])
+        assert_array_almost_equal(actual, desired, decimal=15)
+
+    def test_laplace_0(self):
+        assert_equal(random.laplace(scale=0), 0)
+        assert_raises(ValueError, random.laplace, scale=-0.)
+
+    def test_logistic(self):
+        random = Generator(MT19937(self.seed))
+        actual = random.logistic(loc=.123456789, scale=2.0, size=(3, 2))
+        desired = np.array([[-4.338584631510999,  1.890171436749954],
+                            [-4.64547787337966 ,  2.514545562919217],
+                            [ 1.495389489198666,  1.967827627577474]])
+        assert_array_almost_equal(actual, desired, decimal=15)
+
+    def test_lognormal(self):
+        random = Generator(MT19937(self.seed))
+        actual = random.lognormal(mean=.123456789, sigma=2.0, size=(3, 2))
+        desired = np.array([[ 0.0268252166335, 13.9534486483053],
+                            [ 0.1204014788936,  2.2422077497792],
+                            [ 4.2484199496128, 12.0093343977523]])
+        assert_array_almost_equal(actual, desired, decimal=13)
+
+    def test_lognormal_0(self):
+        assert_equal(random.lognormal(sigma=0), 1)
+        assert_raises(ValueError, random.lognormal, sigma=-0.)
+
+    def test_logseries(self):
+        random = Generator(MT19937(self.seed))
+        actual = random.logseries(p=.923456789, size=(3, 2))
+        desired = np.array([[14, 17],
+                            [3, 18],
+                            [5, 1]])
+        assert_array_equal(actual, desired)
+
+    def test_logseries_zero(self):
+        random = Generator(MT19937(self.seed))
+        assert random.logseries(0) == 1
+
+    @pytest.mark.parametrize("value", [np.nextafter(0., -1), 1., np.nan, 5.])
+    def test_logseries_exceptions(self, value):
+        random = Generator(MT19937(self.seed))
+        with np.errstate(invalid="ignore"):
+            with pytest.raises(ValueError):
+                random.logseries(value)
+            with pytest.raises(ValueError):
+                # contiguous path:
+                random.logseries(np.array([value] * 10))
+            with pytest.raises(ValueError):
+                # non-contiguous path:
+                random.logseries(np.array([value] * 10)[::2])
+
+    def test_multinomial(self):
+        random = Generator(MT19937(self.seed))
+        actual = random.multinomial(20, [1 / 6.] * 6, size=(3, 2))
+        desired = np.array([[[1, 5, 1, 6, 4, 3],
+                             [4, 2, 6, 2, 4, 2]],
+                            [[5, 3, 2, 6, 3, 1],
+                             [4, 4, 0, 2, 3, 7]],
+                            [[6, 3, 1, 5, 3, 2],
+                             [5, 5, 3, 1, 2, 4]]])
+        assert_array_equal(actual, desired)
+
+    @pytest.mark.skipif(IS_WASM, reason="fp errors don't work in wasm")
+    @pytest.mark.parametrize("method", ["svd", "eigh", "cholesky"])
+    def test_multivariate_normal(self, method):
+        random = Generator(MT19937(self.seed))
+        mean = (.123456789, 10)
+        cov = [[1, 0], [0, 1]]
+        size = (3, 2)
+        actual = random.multivariate_normal(mean, cov, size, method=method)
+        desired = np.array([[[-1.747478062846581,  11.25613495182354  ],
+                             [-0.9967333370066214, 10.342002097029821 ]],
+                            [[ 0.7850019631242964, 11.181113712443013 ],
+                             [ 0.8901349653255224,  8.873825399642492 ]],
+                            [[ 0.7130260107430003,  9.551628690083056 ],
+                             [ 0.7127098726541128, 11.991709234143173 ]]])
+
+        assert_array_almost_equal(actual, desired, decimal=15)
+
+        # Check for default size, was raising deprecation warning
+        actual = random.multivariate_normal(mean, cov, method=method)
+        desired = np.array([0.233278563284287, 9.424140804347195])
+        assert_array_almost_equal(actual, desired, decimal=15)
+        # Check that non symmetric covariance input raises exception when
+        # check_valid='raises' if using default svd method.
+        mean = [0, 0]
+        cov = [[1, 2], [1, 2]]
+        assert_raises(ValueError, random.multivariate_normal, mean, cov,
+                      check_valid='raise')
+
+        # Check that non positive-semidefinite covariance warns with
+        # RuntimeWarning
+        cov = [[1, 2], [2, 1]]
+        assert_warns(RuntimeWarning, random.multivariate_normal, mean, cov)
+        assert_warns(RuntimeWarning, random.multivariate_normal, mean, cov,
+                     method='eigh')
+        assert_raises(LinAlgError, random.multivariate_normal, mean, cov,
+                      method='cholesky')
+
+        # and that it doesn't warn with RuntimeWarning check_valid='ignore'
+        assert_no_warnings(random.multivariate_normal, mean, cov,
+                           check_valid='ignore')
+
+        # and that it raises with RuntimeWarning check_valid='raises'
+        assert_raises(ValueError, random.multivariate_normal, mean, cov,
+                      check_valid='raise')
+        assert_raises(ValueError, random.multivariate_normal, mean, cov,
+                      check_valid='raise', method='eigh')
+
+        # check degenerate samples from singular covariance matrix
+        cov = [[1, 1], [1, 1]]
+        if method in ('svd', 'eigh'):
+            samples = random.multivariate_normal(mean, cov, size=(3, 2),
+                                                 method=method)
+            assert_array_almost_equal(samples[..., 0], samples[..., 1],
+                                      decimal=6)
+        else:
+            assert_raises(LinAlgError, random.multivariate_normal, mean, cov,
+                          method='cholesky')
+
+        cov = np.array([[1, 0.1], [0.1, 1]], dtype=np.float32)
+        with suppress_warnings() as sup:
+            random.multivariate_normal(mean, cov, method=method)
+            w = sup.record(RuntimeWarning)
+            assert len(w) == 0
+
+        mu = np.zeros(2)
+        cov = np.eye(2)
+        assert_raises(ValueError, random.multivariate_normal, mean, cov,
+                      check_valid='other')
+        assert_raises(ValueError, random.multivariate_normal,
+                      np.zeros((2, 1, 1)), cov)
+        assert_raises(ValueError, random.multivariate_normal,
+                      mu, np.empty((3, 2)))
+        assert_raises(ValueError, random.multivariate_normal,
+                      mu, np.eye(3))
+
+    @pytest.mark.parametrize('mean, cov', [([0], [[1+1j]]), ([0j], [[1]])])
+    def test_multivariate_normal_disallow_complex(self, mean, cov):
+        random = Generator(MT19937(self.seed))
+        with pytest.raises(TypeError, match="must not be complex"):
+            random.multivariate_normal(mean, cov)
+
+    @pytest.mark.parametrize("method", ["svd", "eigh", "cholesky"])
+    def test_multivariate_normal_basic_stats(self, method):
+        random = Generator(MT19937(self.seed))
+        n_s = 1000
+        mean = np.array([1, 2])
+        cov = np.array([[2, 1], [1, 2]])
+        s = random.multivariate_normal(mean, cov, size=(n_s,), method=method)
+        s_center = s - mean
+        cov_emp = (s_center.T @ s_center) / (n_s - 1)
+        # these are pretty loose and are only designed to detect major errors
+        assert np.all(np.abs(s_center.mean(-2)) < 0.1)
+        assert np.all(np.abs(cov_emp - cov) < 0.2)
+
+    def test_negative_binomial(self):
+        random = Generator(MT19937(self.seed))
+        actual = random.negative_binomial(n=100, p=.12345, size=(3, 2))
+        desired = np.array([[543, 727],
+                            [775, 760],
+                            [600, 674]])
+        assert_array_equal(actual, desired)
+
+    def test_negative_binomial_exceptions(self):
+        with np.errstate(invalid='ignore'):
+            assert_raises(ValueError, random.negative_binomial, 100, np.nan)
+            assert_raises(ValueError, random.negative_binomial, 100,
+                          [np.nan] * 10)
+
+    def test_negative_binomial_p0_exception(self):
+        # Verify that p=0 raises an exception.
+        with assert_raises(ValueError):
+            x = random.negative_binomial(1, 0)
+
+    def test_negative_binomial_invalid_p_n_combination(self):
+        # Verify that values of p and n that would result in an overflow
+        # or infinite loop raise an exception.
+        with np.errstate(invalid='ignore'):
+            assert_raises(ValueError, random.negative_binomial, 2**62, 0.1)
+            assert_raises(ValueError, random.negative_binomial, [2**62], [0.1])
+
+    def test_noncentral_chisquare(self):
+        random = Generator(MT19937(self.seed))
+        actual = random.noncentral_chisquare(df=5, nonc=5, size=(3, 2))
+        desired = np.array([[ 1.70561552362133, 15.97378184942111],
+                            [13.71483425173724, 20.17859633310629],
+                            [11.3615477156643 ,  3.67891108738029]])
+        assert_array_almost_equal(actual, desired, decimal=14)
+
+        actual = random.noncentral_chisquare(df=.5, nonc=.2, size=(3, 2))
+        desired = np.array([[9.41427665607629e-04, 1.70473157518850e-04],
+                            [1.14554372041263e+00, 1.38187755933435e-03],
+                            [1.90659181905387e+00, 1.21772577941822e+00]])
+        assert_array_almost_equal(actual, desired, decimal=14)
+
+        random = Generator(MT19937(self.seed))
+        actual = random.noncentral_chisquare(df=5, nonc=0, size=(3, 2))
+        desired = np.array([[0.82947954590419, 1.80139670767078],
+                            [6.58720057417794, 7.00491463609814],
+                            [6.31101879073157, 6.30982307753005]])
+        assert_array_almost_equal(actual, desired, decimal=14)
+
+    def test_noncentral_f(self):
+        random = Generator(MT19937(self.seed))
+        actual = random.noncentral_f(dfnum=5, dfden=2, nonc=1,
+                                     size=(3, 2))
+        desired = np.array([[0.060310671139  , 0.23866058175939],
+                            [0.86860246709073, 0.2668510459738 ],
+                            [0.23375780078364, 1.88922102885943]])
+        assert_array_almost_equal(actual, desired, decimal=14)
+
+    def test_noncentral_f_nan(self):
+        random = Generator(MT19937(self.seed))
+        actual = random.noncentral_f(dfnum=5, dfden=2, nonc=np.nan)
+        assert np.isnan(actual)
+
+    def test_normal(self):
+        random = Generator(MT19937(self.seed))
+        actual = random.normal(loc=.123456789, scale=2.0, size=(3, 2))
+        desired = np.array([[-3.618412914693162,  2.635726692647081],
+                            [-2.116923463013243,  0.807460983059643],
+                            [ 1.446547137248593,  2.485684213886024]])
+        assert_array_almost_equal(actual, desired, decimal=15)
+
+    def test_normal_0(self):
+        assert_equal(random.normal(scale=0), 0)
+        assert_raises(ValueError, random.normal, scale=-0.)
+
+    def test_pareto(self):
+        random = Generator(MT19937(self.seed))
+        actual = random.pareto(a=.123456789, size=(3, 2))
+        desired = np.array([[1.0394926776069018e+00, 7.7142534343505773e+04],
+                            [7.2640150889064703e-01, 3.4650454783825594e+05],
+                            [4.5852344481994740e+04, 6.5851383009539105e+07]])
+        # For some reason on 32-bit x86 Ubuntu 12.10 the [1, 0] entry in this
+        # matrix differs by 24 nulps. Discussion:
+        #   https://mail.python.org/pipermail/numpy-discussion/2012-September/063801.html
+        # Consensus is that this is probably some gcc quirk that affects
+        # rounding but not in any important way, so we just use a looser
+        # tolerance on this test:
+        np.testing.assert_array_almost_equal_nulp(actual, desired, nulp=30)
+
+    def test_poisson(self):
+        random = Generator(MT19937(self.seed))
+        actual = random.poisson(lam=.123456789, size=(3, 2))
+        desired = np.array([[0, 0],
+                            [0, 0],
+                            [0, 0]])
+        assert_array_equal(actual, desired)
+
+    def test_poisson_exceptions(self):
+        lambig = np.iinfo('int64').max
+        lamneg = -1
+        assert_raises(ValueError, random.poisson, lamneg)
+        assert_raises(ValueError, random.poisson, [lamneg] * 10)
+        assert_raises(ValueError, random.poisson, lambig)
+        assert_raises(ValueError, random.poisson, [lambig] * 10)
+        with np.errstate(invalid='ignore'):
+            assert_raises(ValueError, random.poisson, np.nan)
+            assert_raises(ValueError, random.poisson, [np.nan] * 10)
+
+    def test_power(self):
+        random = Generator(MT19937(self.seed))
+        actual = random.power(a=.123456789, size=(3, 2))
+        desired = np.array([[1.977857368842754e-09, 9.806792196620341e-02],
+                            [2.482442984543471e-10, 1.527108843266079e-01],
+                            [8.188283434244285e-02, 3.950547209346948e-01]])
+        assert_array_almost_equal(actual, desired, decimal=15)
+
+    def test_rayleigh(self):
+        random = Generator(MT19937(self.seed))
+        actual = random.rayleigh(scale=10, size=(3, 2))
+        desired = np.array([[4.19494429102666, 16.66920198906598],
+                            [3.67184544902662, 17.74695521962917],
+                            [16.27935397855501, 21.08355560691792]])
+        assert_array_almost_equal(actual, desired, decimal=14)
+
+    def test_rayleigh_0(self):
+        assert_equal(random.rayleigh(scale=0), 0)
+        assert_raises(ValueError, random.rayleigh, scale=-0.)
+
+    def test_standard_cauchy(self):
+        random = Generator(MT19937(self.seed))
+        actual = random.standard_cauchy(size=(3, 2))
+        desired = np.array([[-1.489437778266206, -3.275389641569784],
+                            [ 0.560102864910406, -0.680780916282552],
+                            [-1.314912905226277,  0.295852965660225]])
+        assert_array_almost_equal(actual, desired, decimal=15)
+
+    def test_standard_exponential(self):
+        random = Generator(MT19937(self.seed))
+        actual = random.standard_exponential(size=(3, 2), method='inv')
+        desired = np.array([[0.102031839440643, 1.229350298474972],
+                            [0.088137284693098, 1.459859985522667],
+                            [1.093830802293668, 1.256977002164613]])
+        assert_array_almost_equal(actual, desired, decimal=15)
+
+    def test_standard_expoential_type_error(self):
+        assert_raises(TypeError, random.standard_exponential, dtype=np.int32)
+
+    def test_standard_gamma(self):
+        random = Generator(MT19937(self.seed))
+        actual = random.standard_gamma(shape=3, size=(3, 2))
+        desired = np.array([[0.62970724056362, 1.22379851271008],
+                            [3.899412530884  , 4.12479964250139],
+                            [3.74994102464584, 3.74929307690815]])
+        assert_array_almost_equal(actual, desired, decimal=14)
+
+    def test_standard_gammma_scalar_float(self):
+        random = Generator(MT19937(self.seed))
+        actual = random.standard_gamma(3, dtype=np.float32)
+        desired = 2.9242148399353027
+        assert_array_almost_equal(actual, desired, decimal=6)
+
+    def test_standard_gamma_float(self):
+        random = Generator(MT19937(self.seed))
+        actual = random.standard_gamma(shape=3, size=(3, 2))
+        desired = np.array([[0.62971, 1.2238 ],
+                            [3.89941, 4.1248 ],
+                            [3.74994, 3.74929]])
+        assert_array_almost_equal(actual, desired, decimal=5)
+
+    def test_standard_gammma_float_out(self):
+        actual = np.zeros((3, 2), dtype=np.float32)
+        random = Generator(MT19937(self.seed))
+        random.standard_gamma(10.0, out=actual, dtype=np.float32)
+        desired = np.array([[10.14987,  7.87012],
+                             [ 9.46284, 12.56832],
+                             [13.82495,  7.81533]], dtype=np.float32)
+        assert_array_almost_equal(actual, desired, decimal=5)
+
+        random = Generator(MT19937(self.seed))
+        random.standard_gamma(10.0, out=actual, size=(3, 2), dtype=np.float32)
+        assert_array_almost_equal(actual, desired, decimal=5)
+
+    def test_standard_gamma_unknown_type(self):
+        assert_raises(TypeError, random.standard_gamma, 1.,
+                      dtype='int32')
+
+    def test_out_size_mismatch(self):
+        out = np.zeros(10)
+        assert_raises(ValueError, random.standard_gamma, 10.0, size=20,
+                      out=out)
+        assert_raises(ValueError, random.standard_gamma, 10.0, size=(10, 1),
+                      out=out)
+
+    def test_standard_gamma_0(self):
+        assert_equal(random.standard_gamma(shape=0), 0)
+        assert_raises(ValueError, random.standard_gamma, shape=-0.)
+
+    def test_standard_normal(self):
+        random = Generator(MT19937(self.seed))
+        actual = random.standard_normal(size=(3, 2))
+        desired = np.array([[-1.870934851846581,  1.25613495182354 ],
+                            [-1.120190126006621,  0.342002097029821],
+                            [ 0.661545174124296,  1.181113712443012]])
+        assert_array_almost_equal(actual, desired, decimal=15)
+
+    def test_standard_normal_unsupported_type(self):
+        assert_raises(TypeError, random.standard_normal, dtype=np.int32)
+
+    def test_standard_t(self):
+        random = Generator(MT19937(self.seed))
+        actual = random.standard_t(df=10, size=(3, 2))
+        desired = np.array([[-1.484666193042647,  0.30597891831161 ],
+                            [ 1.056684299648085, -0.407312602088507],
+                            [ 0.130704414281157, -2.038053410490321]])
+        assert_array_almost_equal(actual, desired, decimal=15)
+
+    def test_triangular(self):
+        random = Generator(MT19937(self.seed))
+        actual = random.triangular(left=5.12, mode=10.23, right=20.34,
+                                   size=(3, 2))
+        desired = np.array([[ 7.86664070590917, 13.6313848513185 ],
+                            [ 7.68152445215983, 14.36169131136546],
+                            [13.16105603911429, 13.72341621856971]])
+        assert_array_almost_equal(actual, desired, decimal=14)
+
+    def test_uniform(self):
+        random = Generator(MT19937(self.seed))
+        actual = random.uniform(low=1.23, high=10.54, size=(3, 2))
+        desired = np.array([[2.13306255040998 , 7.816987531021207],
+                            [2.015436610109887, 8.377577533009589],
+                            [7.421792588856135, 7.891185744455209]])
+        assert_array_almost_equal(actual, desired, decimal=15)
+
+    def test_uniform_range_bounds(self):
+        fmin = np.finfo('float').min
+        fmax = np.finfo('float').max
+
+        func = random.uniform
+        assert_raises(OverflowError, func, -np.inf, 0)
+        assert_raises(OverflowError, func, 0, np.inf)
+        assert_raises(OverflowError, func, fmin, fmax)
+        assert_raises(OverflowError, func, [-np.inf], [0])
+        assert_raises(OverflowError, func, [0], [np.inf])
+
+        # (fmax / 1e17) - fmin is within range, so this should not throw
+        # account for i386 extended precision DBL_MAX / 1e17 + DBL_MAX >
+        # DBL_MAX by increasing fmin a bit
+        random.uniform(low=np.nextafter(fmin, 1), high=fmax / 1e17)
+
+    def test_uniform_zero_range(self):
+        func = random.uniform
+        result = func(1.5, 1.5)
+        assert_allclose(result, 1.5)
+        result = func([0.0, np.pi], [0.0, np.pi])
+        assert_allclose(result, [0.0, np.pi])
+        result = func([[2145.12], [2145.12]], [2145.12, 2145.12])
+        assert_allclose(result, 2145.12 + np.zeros((2, 2)))
+
+    def test_uniform_neg_range(self):
+        func = random.uniform
+        assert_raises(ValueError, func, 2, 1)
+        assert_raises(ValueError, func,  [1, 2], [1, 1])
+        assert_raises(ValueError, func,  [[0, 1],[2, 3]], 2)
+
+    def test_scalar_exception_propagation(self):
+        # Tests that exceptions are correctly propagated in distributions
+        # when called with objects that throw exceptions when converted to
+        # scalars.
+        #
+        # Regression test for gh: 8865
+
+        class ThrowingFloat(np.ndarray):
+            def __float__(self):
+                raise TypeError
+
+        throwing_float = np.array(1.0).view(ThrowingFloat)
+        assert_raises(TypeError, random.uniform, throwing_float,
+                      throwing_float)
+
+        class ThrowingInteger(np.ndarray):
+            def __int__(self):
+                raise TypeError
+
+        throwing_int = np.array(1).view(ThrowingInteger)
+        assert_raises(TypeError, random.hypergeometric, throwing_int, 1, 1)
+
+    def test_vonmises(self):
+        random = Generator(MT19937(self.seed))
+        actual = random.vonmises(mu=1.23, kappa=1.54, size=(3, 2))
+        desired = np.array([[ 1.107972248690106,  2.841536476232361],
+                            [ 1.832602376042457,  1.945511926976032],
+                            [-0.260147475776542,  2.058047492231698]])
+        assert_array_almost_equal(actual, desired, decimal=15)
+
+    def test_vonmises_small(self):
+        # check infinite loop, gh-4720
+        random = Generator(MT19937(self.seed))
+        r = random.vonmises(mu=0., kappa=1.1e-8, size=10**6)
+        assert_(np.isfinite(r).all())
+
+    def test_vonmises_nan(self):
+        random = Generator(MT19937(self.seed))
+        r = random.vonmises(mu=0., kappa=np.nan)
+        assert_(np.isnan(r))
+
+    @pytest.mark.parametrize("kappa", [1e4, 1e15])
+    def test_vonmises_large_kappa(self, kappa):
+        random = Generator(MT19937(self.seed))
+        rs = RandomState(random.bit_generator)
+        state = random.bit_generator.state
+
+        random_state_vals = rs.vonmises(0, kappa, size=10)
+        random.bit_generator.state = state
+        gen_vals = random.vonmises(0, kappa, size=10)
+        if kappa < 1e6:
+            assert_allclose(random_state_vals, gen_vals)
+        else:
+            assert np.all(random_state_vals != gen_vals)
+
+    @pytest.mark.parametrize("mu", [-7., -np.pi, -3.1, np.pi, 3.2])
+    @pytest.mark.parametrize("kappa", [1e-9, 1e-6, 1, 1e3, 1e15])
+    def test_vonmises_large_kappa_range(self, mu, kappa):
+        random = Generator(MT19937(self.seed))
+        r = random.vonmises(mu, kappa, 50)
+        assert_(np.all(r > -np.pi) and np.all(r <= np.pi))
+
+    def test_wald(self):
+        random = Generator(MT19937(self.seed))
+        actual = random.wald(mean=1.23, scale=1.54, size=(3, 2))
+        desired = np.array([[0.26871721804551, 3.2233942732115 ],
+                            [2.20328374987066, 2.40958405189353],
+                            [2.07093587449261, 0.73073890064369]])
+        assert_array_almost_equal(actual, desired, decimal=14)
+
+    def test_weibull(self):
+        random = Generator(MT19937(self.seed))
+        actual = random.weibull(a=1.23, size=(3, 2))
+        desired = np.array([[0.138613914769468, 1.306463419753191],
+                            [0.111623365934763, 1.446570494646721],
+                            [1.257145775276011, 1.914247725027957]])
+        assert_array_almost_equal(actual, desired, decimal=15)
+
+    def test_weibull_0(self):
+        random = Generator(MT19937(self.seed))
+        assert_equal(random.weibull(a=0, size=12), np.zeros(12))
+        assert_raises(ValueError, random.weibull, a=-0.)
+
+    def test_zipf(self):
+        random = Generator(MT19937(self.seed))
+        actual = random.zipf(a=1.23, size=(3, 2))
+        desired = np.array([[  1,   1],
+                            [ 10, 867],
+                            [354,   2]])
+        assert_array_equal(actual, desired)
+
+
+class TestBroadcast:
+    # tests that functions that broadcast behave
+    # correctly when presented with non-scalar arguments
+    def setup_method(self):
+        self.seed = 123456789
+
+    def test_uniform(self):
+        random = Generator(MT19937(self.seed))
+        low = [0]
+        high = [1]
+        uniform = random.uniform
+        desired = np.array([0.16693771389729, 0.19635129550675, 0.75563050964095])
+
+        random = Generator(MT19937(self.seed))
+        actual = random.uniform(low * 3, high)
+        assert_array_almost_equal(actual, desired, decimal=14)
+
+        random = Generator(MT19937(self.seed))
+        actual = random.uniform(low, high * 3)
+        assert_array_almost_equal(actual, desired, decimal=14)
+
+    def test_normal(self):
+        loc = [0]
+        scale = [1]
+        bad_scale = [-1]
+        random = Generator(MT19937(self.seed))
+        desired = np.array([-0.38736406738527,  0.79594375042255,  0.0197076236097])
+
+        random = Generator(MT19937(self.seed))
+        actual = random.normal(loc * 3, scale)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, random.normal, loc * 3, bad_scale)
+
+        random = Generator(MT19937(self.seed))
+        normal = random.normal
+        actual = normal(loc, scale * 3)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, normal, loc, bad_scale * 3)
+
+    def test_beta(self):
+        a = [1]
+        b = [2]
+        bad_a = [-1]
+        bad_b = [-2]
+        desired = np.array([0.18719338682602, 0.73234824491364, 0.17928615186455])
+
+        random = Generator(MT19937(self.seed))
+        beta = random.beta
+        actual = beta(a * 3, b)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, beta, bad_a * 3, b)
+        assert_raises(ValueError, beta, a * 3, bad_b)
+
+        random = Generator(MT19937(self.seed))
+        actual = random.beta(a, b * 3)
+        assert_array_almost_equal(actual, desired, decimal=14)
+
+    def test_exponential(self):
+        scale = [1]
+        bad_scale = [-1]
+        desired = np.array([0.67245993212806, 0.21380495318094, 0.7177848928629])
+
+        random = Generator(MT19937(self.seed))
+        actual = random.exponential(scale * 3)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, random.exponential, bad_scale * 3)
+
+    def test_standard_gamma(self):
+        shape = [1]
+        bad_shape = [-1]
+        desired = np.array([0.67245993212806, 0.21380495318094, 0.7177848928629])
+
+        random = Generator(MT19937(self.seed))
+        std_gamma = random.standard_gamma
+        actual = std_gamma(shape * 3)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, std_gamma, bad_shape * 3)
+
+    def test_gamma(self):
+        shape = [1]
+        scale = [2]
+        bad_shape = [-1]
+        bad_scale = [-2]
+        desired = np.array([1.34491986425611, 0.42760990636187, 1.4355697857258])
+
+        random = Generator(MT19937(self.seed))
+        gamma = random.gamma
+        actual = gamma(shape * 3, scale)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, gamma, bad_shape * 3, scale)
+        assert_raises(ValueError, gamma, shape * 3, bad_scale)
+
+        random = Generator(MT19937(self.seed))
+        gamma = random.gamma
+        actual = gamma(shape, scale * 3)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, gamma, bad_shape, scale * 3)
+        assert_raises(ValueError, gamma, shape, bad_scale * 3)
+
+    def test_f(self):
+        dfnum = [1]
+        dfden = [2]
+        bad_dfnum = [-1]
+        bad_dfden = [-2]
+        desired = np.array([0.07765056244107, 7.72951397913186, 0.05786093891763])
+
+        random = Generator(MT19937(self.seed))
+        f = random.f
+        actual = f(dfnum * 3, dfden)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, f, bad_dfnum * 3, dfden)
+        assert_raises(ValueError, f, dfnum * 3, bad_dfden)
+
+        random = Generator(MT19937(self.seed))
+        f = random.f
+        actual = f(dfnum, dfden * 3)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, f, bad_dfnum, dfden * 3)
+        assert_raises(ValueError, f, dfnum, bad_dfden * 3)
+
+    def test_noncentral_f(self):
+        dfnum = [2]
+        dfden = [3]
+        nonc = [4]
+        bad_dfnum = [0]
+        bad_dfden = [-1]
+        bad_nonc = [-2]
+        desired = np.array([2.02434240411421, 12.91838601070124, 1.24395160354629])
+
+        random = Generator(MT19937(self.seed))
+        nonc_f = random.noncentral_f
+        actual = nonc_f(dfnum * 3, dfden, nonc)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert np.all(np.isnan(nonc_f(dfnum, dfden, [np.nan] * 3)))
+
+        assert_raises(ValueError, nonc_f, bad_dfnum * 3, dfden, nonc)
+        assert_raises(ValueError, nonc_f, dfnum * 3, bad_dfden, nonc)
+        assert_raises(ValueError, nonc_f, dfnum * 3, dfden, bad_nonc)
+
+        random = Generator(MT19937(self.seed))
+        nonc_f = random.noncentral_f
+        actual = nonc_f(dfnum, dfden * 3, nonc)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, nonc_f, bad_dfnum, dfden * 3, nonc)
+        assert_raises(ValueError, nonc_f, dfnum, bad_dfden * 3, nonc)
+        assert_raises(ValueError, nonc_f, dfnum, dfden * 3, bad_nonc)
+
+        random = Generator(MT19937(self.seed))
+        nonc_f = random.noncentral_f
+        actual = nonc_f(dfnum, dfden, nonc * 3)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, nonc_f, bad_dfnum, dfden, nonc * 3)
+        assert_raises(ValueError, nonc_f, dfnum, bad_dfden, nonc * 3)
+        assert_raises(ValueError, nonc_f, dfnum, dfden, bad_nonc * 3)
+
+    def test_noncentral_f_small_df(self):
+        random = Generator(MT19937(self.seed))
+        desired = np.array([0.04714867120827, 0.1239390327694])
+        actual = random.noncentral_f(0.9, 0.9, 2, size=2)
+        assert_array_almost_equal(actual, desired, decimal=14)
+
+    def test_chisquare(self):
+        df = [1]
+        bad_df = [-1]
+        desired = np.array([0.05573640064251, 1.47220224353539, 2.9469379318589])
+
+        random = Generator(MT19937(self.seed))
+        actual = random.chisquare(df * 3)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, random.chisquare, bad_df * 3)
+
+    def test_noncentral_chisquare(self):
+        df = [1]
+        nonc = [2]
+        bad_df = [-1]
+        bad_nonc = [-2]
+        desired = np.array([0.07710766249436, 5.27829115110304, 0.630732147399])
+
+        random = Generator(MT19937(self.seed))
+        nonc_chi = random.noncentral_chisquare
+        actual = nonc_chi(df * 3, nonc)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, nonc_chi, bad_df * 3, nonc)
+        assert_raises(ValueError, nonc_chi, df * 3, bad_nonc)
+
+        random = Generator(MT19937(self.seed))
+        nonc_chi = random.noncentral_chisquare
+        actual = nonc_chi(df, nonc * 3)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, nonc_chi, bad_df, nonc * 3)
+        assert_raises(ValueError, nonc_chi, df, bad_nonc * 3)
+
+    def test_standard_t(self):
+        df = [1]
+        bad_df = [-1]
+        desired = np.array([-1.39498829447098, -1.23058658835223, 0.17207021065983])
+
+        random = Generator(MT19937(self.seed))
+        actual = random.standard_t(df * 3)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, random.standard_t, bad_df * 3)
+
+    def test_vonmises(self):
+        mu = [2]
+        kappa = [1]
+        bad_kappa = [-1]
+        desired = np.array([2.25935584988528, 2.23326261461399, -2.84152146503326])
+
+        random = Generator(MT19937(self.seed))
+        actual = random.vonmises(mu * 3, kappa)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, random.vonmises, mu * 3, bad_kappa)
+
+        random = Generator(MT19937(self.seed))
+        actual = random.vonmises(mu, kappa * 3)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, random.vonmises, mu, bad_kappa * 3)
+
+    def test_pareto(self):
+        a = [1]
+        bad_a = [-1]
+        desired = np.array([0.95905052946317, 0.2383810889437 , 1.04988745750013])
+
+        random = Generator(MT19937(self.seed))
+        actual = random.pareto(a * 3)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, random.pareto, bad_a * 3)
+
+    def test_weibull(self):
+        a = [1]
+        bad_a = [-1]
+        desired = np.array([0.67245993212806, 0.21380495318094, 0.7177848928629])
+
+        random = Generator(MT19937(self.seed))
+        actual = random.weibull(a * 3)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, random.weibull, bad_a * 3)
+
+    def test_power(self):
+        a = [1]
+        bad_a = [-1]
+        desired = np.array([0.48954864361052, 0.19249412888486, 0.51216834058807])
+
+        random = Generator(MT19937(self.seed))
+        actual = random.power(a * 3)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, random.power, bad_a * 3)
+
+    def test_laplace(self):
+        loc = [0]
+        scale = [1]
+        bad_scale = [-1]
+        desired = np.array([-1.09698732625119, -0.93470271947368, 0.71592671378202])
+
+        random = Generator(MT19937(self.seed))
+        laplace = random.laplace
+        actual = laplace(loc * 3, scale)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, laplace, loc * 3, bad_scale)
+
+        random = Generator(MT19937(self.seed))
+        laplace = random.laplace
+        actual = laplace(loc, scale * 3)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, laplace, loc, bad_scale * 3)
+
+    def test_gumbel(self):
+        loc = [0]
+        scale = [1]
+        bad_scale = [-1]
+        desired = np.array([1.70020068231762, 1.52054354273631, -0.34293267607081])
+
+        random = Generator(MT19937(self.seed))
+        gumbel = random.gumbel
+        actual = gumbel(loc * 3, scale)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, gumbel, loc * 3, bad_scale)
+
+        random = Generator(MT19937(self.seed))
+        gumbel = random.gumbel
+        actual = gumbel(loc, scale * 3)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, gumbel, loc, bad_scale * 3)
+
+    def test_logistic(self):
+        loc = [0]
+        scale = [1]
+        bad_scale = [-1]
+        desired = np.array([-1.607487640433, -1.40925686003678, 1.12887112820397])
+
+        random = Generator(MT19937(self.seed))
+        actual = random.logistic(loc * 3, scale)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, random.logistic, loc * 3, bad_scale)
+
+        random = Generator(MT19937(self.seed))
+        actual = random.logistic(loc, scale * 3)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, random.logistic, loc, bad_scale * 3)
+        assert_equal(random.logistic(1.0, 0.0), 1.0)
+
+    def test_lognormal(self):
+        mean = [0]
+        sigma = [1]
+        bad_sigma = [-1]
+        desired = np.array([0.67884390500697, 2.21653186290321, 1.01990310084276])
+
+        random = Generator(MT19937(self.seed))
+        lognormal = random.lognormal
+        actual = lognormal(mean * 3, sigma)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, lognormal, mean * 3, bad_sigma)
+
+        random = Generator(MT19937(self.seed))
+        actual = random.lognormal(mean, sigma * 3)
+        assert_raises(ValueError, random.lognormal, mean, bad_sigma * 3)
+
+    def test_rayleigh(self):
+        scale = [1]
+        bad_scale = [-1]
+        desired = np.array(
+            [1.1597068009872629,
+             0.6539188836253857,
+             1.1981526554349398]
+        )
+
+        random = Generator(MT19937(self.seed))
+        actual = random.rayleigh(scale * 3)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, random.rayleigh, bad_scale * 3)
+
+    def test_wald(self):
+        mean = [0.5]
+        scale = [1]
+        bad_mean = [0]
+        bad_scale = [-2]
+        desired = np.array([0.38052407392905, 0.50701641508592, 0.484935249864])
+
+        random = Generator(MT19937(self.seed))
+        actual = random.wald(mean * 3, scale)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, random.wald, bad_mean * 3, scale)
+        assert_raises(ValueError, random.wald, mean * 3, bad_scale)
+
+        random = Generator(MT19937(self.seed))
+        actual = random.wald(mean, scale * 3)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, random.wald, bad_mean, scale * 3)
+        assert_raises(ValueError, random.wald, mean, bad_scale * 3)
+
+    def test_triangular(self):
+        left = [1]
+        right = [3]
+        mode = [2]
+        bad_left_one = [3]
+        bad_mode_one = [4]
+        bad_left_two, bad_mode_two = right * 2
+        desired = np.array([1.57781954604754, 1.62665986867957, 2.30090130831326])
+
+        random = Generator(MT19937(self.seed))
+        triangular = random.triangular
+        actual = triangular(left * 3, mode, right)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, triangular, bad_left_one * 3, mode, right)
+        assert_raises(ValueError, triangular, left * 3, bad_mode_one, right)
+        assert_raises(ValueError, triangular, bad_left_two * 3, bad_mode_two,
+                      right)
+
+        random = Generator(MT19937(self.seed))
+        triangular = random.triangular
+        actual = triangular(left, mode * 3, right)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, triangular, bad_left_one, mode * 3, right)
+        assert_raises(ValueError, triangular, left, bad_mode_one * 3, right)
+        assert_raises(ValueError, triangular, bad_left_two, bad_mode_two * 3,
+                      right)
+
+        random = Generator(MT19937(self.seed))
+        triangular = random.triangular
+        actual = triangular(left, mode, right * 3)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, triangular, bad_left_one, mode, right * 3)
+        assert_raises(ValueError, triangular, left, bad_mode_one, right * 3)
+        assert_raises(ValueError, triangular, bad_left_two, bad_mode_two,
+                      right * 3)
+
+        assert_raises(ValueError, triangular, 10., 0., 20.)
+        assert_raises(ValueError, triangular, 10., 25., 20.)
+        assert_raises(ValueError, triangular, 10., 10., 10.)
+
+    def test_binomial(self):
+        n = [1]
+        p = [0.5]
+        bad_n = [-1]
+        bad_p_one = [-1]
+        bad_p_two = [1.5]
+        desired = np.array([0, 0, 1])
+
+        random = Generator(MT19937(self.seed))
+        binom = random.binomial
+        actual = binom(n * 3, p)
+        assert_array_equal(actual, desired)
+        assert_raises(ValueError, binom, bad_n * 3, p)
+        assert_raises(ValueError, binom, n * 3, bad_p_one)
+        assert_raises(ValueError, binom, n * 3, bad_p_two)
+
+        random = Generator(MT19937(self.seed))
+        actual = random.binomial(n, p * 3)
+        assert_array_equal(actual, desired)
+        assert_raises(ValueError, binom, bad_n, p * 3)
+        assert_raises(ValueError, binom, n, bad_p_one * 3)
+        assert_raises(ValueError, binom, n, bad_p_two * 3)
+
+    def test_negative_binomial(self):
+        n = [1]
+        p = [0.5]
+        bad_n = [-1]
+        bad_p_one = [-1]
+        bad_p_two = [1.5]
+        desired = np.array([0, 2, 1], dtype=np.int64)
+
+        random = Generator(MT19937(self.seed))
+        neg_binom = random.negative_binomial
+        actual = neg_binom(n * 3, p)
+        assert_array_equal(actual, desired)
+        assert_raises(ValueError, neg_binom, bad_n * 3, p)
+        assert_raises(ValueError, neg_binom, n * 3, bad_p_one)
+        assert_raises(ValueError, neg_binom, n * 3, bad_p_two)
+
+        random = Generator(MT19937(self.seed))
+        neg_binom = random.negative_binomial
+        actual = neg_binom(n, p * 3)
+        assert_array_equal(actual, desired)
+        assert_raises(ValueError, neg_binom, bad_n, p * 3)
+        assert_raises(ValueError, neg_binom, n, bad_p_one * 3)
+        assert_raises(ValueError, neg_binom, n, bad_p_two * 3)
+
+    def test_poisson(self):
+
+        lam = [1]
+        bad_lam_one = [-1]
+        desired = np.array([0, 0, 3])
+
+        random = Generator(MT19937(self.seed))
+        max_lam = random._poisson_lam_max
+        bad_lam_two = [max_lam * 2]
+        poisson = random.poisson
+        actual = poisson(lam * 3)
+        assert_array_equal(actual, desired)
+        assert_raises(ValueError, poisson, bad_lam_one * 3)
+        assert_raises(ValueError, poisson, bad_lam_two * 3)
+
+    def test_zipf(self):
+        a = [2]
+        bad_a = [0]
+        desired = np.array([1, 8, 1])
+
+        random = Generator(MT19937(self.seed))
+        zipf = random.zipf
+        actual = zipf(a * 3)
+        assert_array_equal(actual, desired)
+        assert_raises(ValueError, zipf, bad_a * 3)
+        with np.errstate(invalid='ignore'):
+            assert_raises(ValueError, zipf, np.nan)
+            assert_raises(ValueError, zipf, [0, 0, np.nan])
+
+    def test_geometric(self):
+        p = [0.5]
+        bad_p_one = [-1]
+        bad_p_two = [1.5]
+        desired = np.array([1, 1, 3])
+
+        random = Generator(MT19937(self.seed))
+        geometric = random.geometric
+        actual = geometric(p * 3)
+        assert_array_equal(actual, desired)
+        assert_raises(ValueError, geometric, bad_p_one * 3)
+        assert_raises(ValueError, geometric, bad_p_two * 3)
+
+    def test_hypergeometric(self):
+        ngood = [1]
+        nbad = [2]
+        nsample = [2]
+        bad_ngood = [-1]
+        bad_nbad = [-2]
+        bad_nsample_one = [-1]
+        bad_nsample_two = [4]
+        desired = np.array([0, 0, 1])
+
+        random = Generator(MT19937(self.seed))
+        actual = random.hypergeometric(ngood * 3, nbad, nsample)
+        assert_array_equal(actual, desired)
+        assert_raises(ValueError, random.hypergeometric, bad_ngood * 3, nbad, nsample)
+        assert_raises(ValueError, random.hypergeometric, ngood * 3, bad_nbad, nsample)
+        assert_raises(ValueError, random.hypergeometric, ngood * 3, nbad, bad_nsample_one)
+        assert_raises(ValueError, random.hypergeometric, ngood * 3, nbad, bad_nsample_two)
+
+        random = Generator(MT19937(self.seed))
+        actual = random.hypergeometric(ngood, nbad * 3, nsample)
+        assert_array_equal(actual, desired)
+        assert_raises(ValueError, random.hypergeometric, bad_ngood, nbad * 3, nsample)
+        assert_raises(ValueError, random.hypergeometric, ngood, bad_nbad * 3, nsample)
+        assert_raises(ValueError, random.hypergeometric, ngood, nbad * 3, bad_nsample_one)
+        assert_raises(ValueError, random.hypergeometric, ngood, nbad * 3, bad_nsample_two)
+
+        random = Generator(MT19937(self.seed))
+        hypergeom = random.hypergeometric
+        actual = hypergeom(ngood, nbad, nsample * 3)
+        assert_array_equal(actual, desired)
+        assert_raises(ValueError, hypergeom, bad_ngood, nbad, nsample * 3)
+        assert_raises(ValueError, hypergeom, ngood, bad_nbad, nsample * 3)
+        assert_raises(ValueError, hypergeom, ngood, nbad, bad_nsample_one * 3)
+        assert_raises(ValueError, hypergeom, ngood, nbad, bad_nsample_two * 3)
+
+        assert_raises(ValueError, hypergeom, -1, 10, 20)
+        assert_raises(ValueError, hypergeom, 10, -1, 20)
+        assert_raises(ValueError, hypergeom, 10, 10, -1)
+        assert_raises(ValueError, hypergeom, 10, 10, 25)
+
+        # ValueError for arguments that are too big.
+        assert_raises(ValueError, hypergeom, 2**30, 10, 20)
+        assert_raises(ValueError, hypergeom, 999, 2**31, 50)
+        assert_raises(ValueError, hypergeom, 999, [2**29, 2**30], 1000)
+
+    def test_logseries(self):
+        p = [0.5]
+        bad_p_one = [2]
+        bad_p_two = [-1]
+        desired = np.array([1, 1, 1])
+
+        random = Generator(MT19937(self.seed))
+        logseries = random.logseries
+        actual = logseries(p * 3)
+        assert_array_equal(actual, desired)
+        assert_raises(ValueError, logseries, bad_p_one * 3)
+        assert_raises(ValueError, logseries, bad_p_two * 3)
+
+    def test_multinomial(self):
+        random = Generator(MT19937(self.seed))
+        actual = random.multinomial([5, 20], [1 / 6.] * 6, size=(3, 2))
+        desired = np.array([[[0, 0, 2, 1, 2, 0],
+                             [2, 3, 6, 4, 2, 3]],
+                            [[1, 0, 1, 0, 2, 1],
+                             [7, 2, 2, 1, 4, 4]],
+                            [[0, 2, 0, 1, 2, 0],
+                             [3, 2, 3, 3, 4, 5]]], dtype=np.int64)
+        assert_array_equal(actual, desired)
+
+        random = Generator(MT19937(self.seed))
+        actual = random.multinomial([5, 20], [1 / 6.] * 6)
+        desired = np.array([[0, 0, 2, 1, 2, 0],
+                            [2, 3, 6, 4, 2, 3]], dtype=np.int64)
+        assert_array_equal(actual, desired)
+
+        random = Generator(MT19937(self.seed))
+        actual = random.multinomial([5, 20], [[1 / 6.] * 6] * 2)
+        desired = np.array([[0, 0, 2, 1, 2, 0],
+                            [2, 3, 6, 4, 2, 3]], dtype=np.int64)
+        assert_array_equal(actual, desired)
+
+        random = Generator(MT19937(self.seed))
+        actual = random.multinomial([[5], [20]], [[1 / 6.] * 6] * 2)
+        desired = np.array([[[0, 0, 2, 1, 2, 0],
+                             [0, 0, 2, 1, 1, 1]],
+                            [[4, 2, 3, 3, 5, 3],
+                             [7, 2, 2, 1, 4, 4]]], dtype=np.int64)
+        assert_array_equal(actual, desired)
+
+    @pytest.mark.parametrize("n", [10,
+                                   np.array([10, 10]),
+                                   np.array([[[10]], [[10]]])
+                                   ]
+                             )
+    def test_multinomial_pval_broadcast(self, n):
+        random = Generator(MT19937(self.seed))
+        pvals = np.array([1 / 4] * 4)
+        actual = random.multinomial(n, pvals)
+        n_shape = tuple() if isinstance(n, int) else n.shape
+        expected_shape = n_shape + (4,)
+        assert actual.shape == expected_shape
+        pvals = np.vstack([pvals, pvals])
+        actual = random.multinomial(n, pvals)
+        expected_shape = np.broadcast_shapes(n_shape, pvals.shape[:-1]) + (4,)
+        assert actual.shape == expected_shape
+
+        pvals = np.vstack([[pvals], [pvals]])
+        actual = random.multinomial(n, pvals)
+        expected_shape = np.broadcast_shapes(n_shape, pvals.shape[:-1])
+        assert actual.shape == expected_shape + (4,)
+        actual = random.multinomial(n, pvals, size=(3, 2) + expected_shape)
+        assert actual.shape == (3, 2) + expected_shape + (4,)
+
+        with pytest.raises(ValueError):
+            # Ensure that size is not broadcast
+            actual = random.multinomial(n, pvals, size=(1,) * 6)
+
+    def test_invalid_pvals_broadcast(self):
+        random = Generator(MT19937(self.seed))
+        pvals = [[1 / 6] * 6, [1 / 4] * 6]
+        assert_raises(ValueError, random.multinomial, 1, pvals)
+        assert_raises(ValueError, random.multinomial, 6, 0.5)
+
+    def test_empty_outputs(self):
+        random = Generator(MT19937(self.seed))
+        actual = random.multinomial(np.empty((10, 0, 6), "i8"), [1 / 6] * 6)
+        assert actual.shape == (10, 0, 6, 6)
+        actual = random.multinomial(12, np.empty((10, 0, 10)))
+        assert actual.shape == (10, 0, 10)
+        actual = random.multinomial(np.empty((3, 0, 7), "i8"),
+                                    np.empty((3, 0, 7, 4)))
+        assert actual.shape == (3, 0, 7, 4)
+
+
+@pytest.mark.skipif(IS_WASM, reason="can't start thread")
+class TestThread:
+    # make sure each state produces the same sequence even in threads
+    def setup_method(self):
+        self.seeds = range(4)
+
+    def check_function(self, function, sz):
+        from threading import Thread
+
+        out1 = np.empty((len(self.seeds),) + sz)
+        out2 = np.empty((len(self.seeds),) + sz)
+
+        # threaded generation
+        t = [Thread(target=function, args=(Generator(MT19937(s)), o))
+             for s, o in zip(self.seeds, out1)]
+        [x.start() for x in t]
+        [x.join() for x in t]
+
+        # the same serial
+        for s, o in zip(self.seeds, out2):
+            function(Generator(MT19937(s)), o)
+
+        # these platforms change x87 fpu precision mode in threads
+        if np.intp().dtype.itemsize == 4 and sys.platform == "win32":
+            assert_array_almost_equal(out1, out2)
+        else:
+            assert_array_equal(out1, out2)
+
+    def test_normal(self):
+        def gen_random(state, out):
+            out[...] = state.normal(size=10000)
+
+        self.check_function(gen_random, sz=(10000,))
+
+    def test_exp(self):
+        def gen_random(state, out):
+            out[...] = state.exponential(scale=np.ones((100, 1000)))
+
+        self.check_function(gen_random, sz=(100, 1000))
+
+    def test_multinomial(self):
+        def gen_random(state, out):
+            out[...] = state.multinomial(10, [1 / 6.] * 6, size=10000)
+
+        self.check_function(gen_random, sz=(10000, 6))
+
+
+# See Issue #4263
+class TestSingleEltArrayInput:
+    def setup_method(self):
+        self.argOne = np.array([2])
+        self.argTwo = np.array([3])
+        self.argThree = np.array([4])
+        self.tgtShape = (1,)
+
+    def test_one_arg_funcs(self):
+        funcs = (random.exponential, random.standard_gamma,
+                 random.chisquare, random.standard_t,
+                 random.pareto, random.weibull,
+                 random.power, random.rayleigh,
+                 random.poisson, random.zipf,
+                 random.geometric, random.logseries)
+
+        probfuncs = (random.geometric, random.logseries)
+
+        for func in funcs:
+            if func in probfuncs:  # p < 1.0
+                out = func(np.array([0.5]))
+
+            else:
+                out = func(self.argOne)
+
+            assert_equal(out.shape, self.tgtShape)
+
+    def test_two_arg_funcs(self):
+        funcs = (random.uniform, random.normal,
+                 random.beta, random.gamma,
+                 random.f, random.noncentral_chisquare,
+                 random.vonmises, random.laplace,
+                 random.gumbel, random.logistic,
+                 random.lognormal, random.wald,
+                 random.binomial, random.negative_binomial)
+
+        probfuncs = (random.binomial, random.negative_binomial)
+
+        for func in funcs:
+            if func in probfuncs:  # p <= 1
+                argTwo = np.array([0.5])
+
+            else:
+                argTwo = self.argTwo
+
+            out = func(self.argOne, argTwo)
+            assert_equal(out.shape, self.tgtShape)
+
+            out = func(self.argOne[0], argTwo)
+            assert_equal(out.shape, self.tgtShape)
+
+            out = func(self.argOne, argTwo[0])
+            assert_equal(out.shape, self.tgtShape)
+
+    def test_integers(self, endpoint):
+        itype = [np.bool_, np.int8, np.uint8, np.int16, np.uint16,
+                 np.int32, np.uint32, np.int64, np.uint64]
+        func = random.integers
+        high = np.array([1])
+        low = np.array([0])
+
+        for dt in itype:
+            out = func(low, high, endpoint=endpoint, dtype=dt)
+            assert_equal(out.shape, self.tgtShape)
+
+            out = func(low[0], high, endpoint=endpoint, dtype=dt)
+            assert_equal(out.shape, self.tgtShape)
+
+            out = func(low, high[0], endpoint=endpoint, dtype=dt)
+            assert_equal(out.shape, self.tgtShape)
+
+    def test_three_arg_funcs(self):
+        funcs = [random.noncentral_f, random.triangular,
+                 random.hypergeometric]
+
+        for func in funcs:
+            out = func(self.argOne, self.argTwo, self.argThree)
+            assert_equal(out.shape, self.tgtShape)
+
+            out = func(self.argOne[0], self.argTwo, self.argThree)
+            assert_equal(out.shape, self.tgtShape)
+
+            out = func(self.argOne, self.argTwo[0], self.argThree)
+            assert_equal(out.shape, self.tgtShape)
+
+
+@pytest.mark.parametrize("config", JUMP_TEST_DATA)
+def test_jumped(config):
+    # Each config contains the initial seed, a number of raw steps
+    # the sha256 hashes of the initial and the final states' keys and
+    # the position of the initial and the final state.
+    # These were produced using the original C implementation.
+    seed = config["seed"]
+    steps = config["steps"]
+
+    mt19937 = MT19937(seed)
+    # Burn step
+    mt19937.random_raw(steps)
+    key = mt19937.state["state"]["key"]
+    if sys.byteorder == 'big':
+        key = key.byteswap()
+    sha256 = hashlib.sha256(key)
+    assert mt19937.state["state"]["pos"] == config["initial"]["pos"]
+    assert sha256.hexdigest() == config["initial"]["key_sha256"]
+
+    jumped = mt19937.jumped()
+    key = jumped.state["state"]["key"]
+    if sys.byteorder == 'big':
+        key = key.byteswap()
+    sha256 = hashlib.sha256(key)
+    assert jumped.state["state"]["pos"] == config["jumped"]["pos"]
+    assert sha256.hexdigest() == config["jumped"]["key_sha256"]
+
+
+def test_broadcast_size_error():
+    mu = np.ones(3)
+    sigma = np.ones((4, 3))
+    size = (10, 4, 2)
+    assert random.normal(mu, sigma, size=(5, 4, 3)).shape == (5, 4, 3)
+    with pytest.raises(ValueError):
+        random.normal(mu, sigma, size=size)
+    with pytest.raises(ValueError):
+        random.normal(mu, sigma, size=(1, 3))
+    with pytest.raises(ValueError):
+        random.normal(mu, sigma, size=(4, 1, 1))
+    # 1 arg
+    shape = np.ones((4, 3))
+    with pytest.raises(ValueError):
+        random.standard_gamma(shape, size=size)
+    with pytest.raises(ValueError):
+        random.standard_gamma(shape, size=(3,))
+    with pytest.raises(ValueError):
+        random.standard_gamma(shape, size=3)
+    # Check out
+    out = np.empty(size)
+    with pytest.raises(ValueError):
+        random.standard_gamma(shape, out=out)
+
+    # 2 arg
+    with pytest.raises(ValueError):
+        random.binomial(1, [0.3, 0.7], size=(2, 1))
+    with pytest.raises(ValueError):
+        random.binomial([1, 2], 0.3, size=(2, 1))
+    with pytest.raises(ValueError):
+        random.binomial([1, 2], [0.3, 0.7], size=(2, 1))
+    with pytest.raises(ValueError):
+        random.multinomial([2, 2], [.3, .7], size=(2, 1))
+
+    # 3 arg
+    a = random.chisquare(5, size=3)
+    b = random.chisquare(5, size=(4, 3))
+    c = random.chisquare(5, size=(5, 4, 3))
+    assert random.noncentral_f(a, b, c).shape == (5, 4, 3)
+    with pytest.raises(ValueError, match=r"Output size \(6, 5, 1, 1\) is"):
+        random.noncentral_f(a, b, c, size=(6, 5, 1, 1))
+
+
+def test_broadcast_size_scalar():
+    mu = np.ones(3)
+    sigma = np.ones(3)
+    random.normal(mu, sigma, size=3)
+    with pytest.raises(ValueError):
+        random.normal(mu, sigma, size=2)
+
+
+def test_ragged_shuffle():
+    # GH 18142
+    seq = [[], [], 1]
+    gen = Generator(MT19937(0))
+    assert_no_warnings(gen.shuffle, seq)
+    assert seq == [1, [], []]
+
+
+@pytest.mark.parametrize("high", [-2, [-2]])
+@pytest.mark.parametrize("endpoint", [True, False])
+def test_single_arg_integer_exception(high, endpoint):
+    # GH 14333
+    gen = Generator(MT19937(0))
+    msg = 'high < 0' if endpoint else 'high <= 0'
+    with pytest.raises(ValueError, match=msg):
+        gen.integers(high, endpoint=endpoint)
+    msg = 'low > high' if endpoint else 'low >= high'
+    with pytest.raises(ValueError, match=msg):
+        gen.integers(-1, high, endpoint=endpoint)
+    with pytest.raises(ValueError, match=msg):
+        gen.integers([-1], high, endpoint=endpoint)
+
+
+@pytest.mark.parametrize("dtype", ["f4", "f8"])
+def test_c_contig_req_out(dtype):
+    # GH 18704
+    out = np.empty((2, 3), order="F", dtype=dtype)
+    shape = [1, 2, 3]
+    with pytest.raises(ValueError, match="Supplied output array"):
+        random.standard_gamma(shape, out=out, dtype=dtype)
+    with pytest.raises(ValueError, match="Supplied output array"):
+        random.standard_gamma(shape, out=out, size=out.shape, dtype=dtype)
+
+
+@pytest.mark.parametrize("dtype", ["f4", "f8"])
+@pytest.mark.parametrize("order", ["F", "C"])
+@pytest.mark.parametrize("dist", [random.standard_normal, random.random])
+def test_contig_req_out(dist, order, dtype):
+    # GH 18704
+    out = np.empty((2, 3), dtype=dtype, order=order)
+    variates = dist(out=out, dtype=dtype)
+    assert variates is out
+    variates = dist(out=out, dtype=dtype, size=out.shape)
+    assert variates is out
+
+
+def test_generator_ctor_old_style_pickle():
+    rg = np.random.Generator(np.random.PCG64DXSM(0))
+    rg.standard_normal(1)
+    # Directly call reduce which is used in pickling
+    ctor, args, state_a = rg.__reduce__()
+    # Simulate unpickling an old pickle that only has the name
+    assert args[:1] == ("PCG64DXSM",)
+    b = ctor(*args[:1])
+    b.bit_generator.state = state_a
+    state_b = b.bit_generator.state
+    assert state_a == state_b
diff --git a/lib/python3.12/site-packages/numpy/random/tests/test_generator_mt19937_regressions.py b/lib/python3.12/site-packages/numpy/random/tests/test_generator_mt19937_regressions.py
new file mode 100644
index 0000000000000000000000000000000000000000..f16af2b293ce21642c32e90af6f3ed22476158e6
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/random/tests/test_generator_mt19937_regressions.py
@@ -0,0 +1,165 @@
+from numpy.testing import (assert_, assert_array_equal)
+import numpy as np
+import pytest
+from numpy.random import Generator, MT19937
+
+
+class TestRegression:
+
+    def setup_method(self):
+        self.mt19937 = Generator(MT19937(121263137472525314065))
+
+    def test_vonmises_range(self):
+        # Make sure generated random variables are in [-pi, pi].
+        # Regression test for ticket #986.
+        for mu in np.linspace(-7., 7., 5):
+            r = self.mt19937.vonmises(mu, 1, 50)
+            assert_(np.all(r > -np.pi) and np.all(r <= np.pi))
+
+    def test_hypergeometric_range(self):
+        # Test for ticket #921
+        assert_(np.all(self.mt19937.hypergeometric(3, 18, 11, size=10) < 4))
+        assert_(np.all(self.mt19937.hypergeometric(18, 3, 11, size=10) > 0))
+
+        # Test for ticket #5623
+        args = (2**20 - 2, 2**20 - 2, 2**20 - 2)  # Check for 32-bit systems
+        assert_(self.mt19937.hypergeometric(*args) > 0)
+
+    def test_logseries_convergence(self):
+        # Test for ticket #923
+        N = 1000
+        rvsn = self.mt19937.logseries(0.8, size=N)
+        # these two frequency counts should be close to theoretical
+        # numbers with this large sample
+        # theoretical large N result is 0.49706795
+        freq = np.sum(rvsn == 1) / N
+        msg = f'Frequency was {freq:f}, should be > 0.45'
+        assert_(freq > 0.45, msg)
+        # theoretical large N result is 0.19882718
+        freq = np.sum(rvsn == 2) / N
+        msg = f'Frequency was {freq:f}, should be < 0.23'
+        assert_(freq < 0.23, msg)
+
+    def test_shuffle_mixed_dimension(self):
+        # Test for trac ticket #2074
+        for t in [[1, 2, 3, None],
+                  [(1, 1), (2, 2), (3, 3), None],
+                  [1, (2, 2), (3, 3), None],
+                  [(1, 1), 2, 3, None]]:
+            mt19937 = Generator(MT19937(12345))
+            shuffled = np.array(t, dtype=object)
+            mt19937.shuffle(shuffled)
+            expected = np.array([t[2], t[0], t[3], t[1]], dtype=object)
+            assert_array_equal(np.array(shuffled, dtype=object), expected)
+
+    def test_call_within_randomstate(self):
+        # Check that custom BitGenerator does not call into global state
+        res = np.array([1, 8, 0, 1, 5, 3, 3, 8, 1, 4])
+        for i in range(3):
+            mt19937 = Generator(MT19937(i))
+            m = Generator(MT19937(4321))
+            # If m.state is not honored, the result will change
+            assert_array_equal(m.choice(10, size=10, p=np.ones(10)/10.), res)
+
+    def test_multivariate_normal_size_types(self):
+        # Test for multivariate_normal issue with 'size' argument.
+        # Check that the multivariate_normal size argument can be a
+        # numpy integer.
+        self.mt19937.multivariate_normal([0], [[0]], size=1)
+        self.mt19937.multivariate_normal([0], [[0]], size=np.int_(1))
+        self.mt19937.multivariate_normal([0], [[0]], size=np.int64(1))
+
+    def test_beta_small_parameters(self):
+        # Test that beta with small a and b parameters does not produce
+        # NaNs due to roundoff errors causing 0 / 0, gh-5851
+        x = self.mt19937.beta(0.0001, 0.0001, size=100)
+        assert_(not np.any(np.isnan(x)), 'Nans in mt19937.beta')
+
+    def test_beta_very_small_parameters(self):
+        # gh-24203: beta would hang with very small parameters.
+        self.mt19937.beta(1e-49, 1e-40)
+
+    def test_beta_ridiculously_small_parameters(self):
+        # gh-24266: beta would generate nan when the parameters
+        # were subnormal or a small multiple of the smallest normal.
+        tiny = np.finfo(1.0).tiny
+        x = self.mt19937.beta(tiny/32, tiny/40, size=50)
+        assert not np.any(np.isnan(x))
+
+    def test_choice_sum_of_probs_tolerance(self):
+        # The sum of probs should be 1.0 with some tolerance.
+        # For low precision dtypes the tolerance was too tight.
+        # See numpy github issue 6123.
+        a = [1, 2, 3]
+        counts = [4, 4, 2]
+        for dt in np.float16, np.float32, np.float64:
+            probs = np.array(counts, dtype=dt) / sum(counts)
+            c = self.mt19937.choice(a, p=probs)
+            assert_(c in a)
+            with pytest.raises(ValueError):
+                self.mt19937.choice(a, p=probs*0.9)
+
+    def test_shuffle_of_array_of_different_length_strings(self):
+        # Test that permuting an array of different length strings
+        # will not cause a segfault on garbage collection
+        # Tests gh-7710
+
+        a = np.array(['a', 'a' * 1000])
+
+        for _ in range(100):
+            self.mt19937.shuffle(a)
+
+        # Force Garbage Collection - should not segfault.
+        import gc
+        gc.collect()
+
+    def test_shuffle_of_array_of_objects(self):
+        # Test that permuting an array of objects will not cause
+        # a segfault on garbage collection.
+        # See gh-7719
+        a = np.array([np.arange(1), np.arange(4)], dtype=object)
+
+        for _ in range(1000):
+            self.mt19937.shuffle(a)
+
+        # Force Garbage Collection - should not segfault.
+        import gc
+        gc.collect()
+
+    def test_permutation_subclass(self):
+
+        class N(np.ndarray):
+            pass
+
+        mt19937 = Generator(MT19937(1))
+        orig = np.arange(3).view(N)
+        perm = mt19937.permutation(orig)
+        assert_array_equal(perm, np.array([2, 0, 1]))
+        assert_array_equal(orig, np.arange(3).view(N))
+
+        class M:
+            a = np.arange(5)
+
+            def __array__(self):
+                return self.a
+
+        mt19937 = Generator(MT19937(1))
+        m = M()
+        perm = mt19937.permutation(m)
+        assert_array_equal(perm, np.array([4, 1, 3, 0, 2]))
+        assert_array_equal(m.__array__(), np.arange(5))
+
+    def test_gamma_0(self):
+        assert self.mt19937.standard_gamma(0.0) == 0.0
+        assert_array_equal(self.mt19937.standard_gamma([0.0]), 0.0)
+
+        actual = self.mt19937.standard_gamma([0.0], dtype='float')
+        expected = np.array([0.], dtype=np.float32)
+        assert_array_equal(actual, expected)
+
+    def test_geometric_tiny_prob(self):
+        # Regression test for gh-17007.
+        # When p = 1e-30, the probability that a sample will exceed 2**63-1
+        # is 0.9999999999907766, so we expect the result to be all 2**63-1.
+        assert_array_equal(self.mt19937.geometric(p=1e-30, size=3),
+                           np.iinfo(np.int64).max)
diff --git a/lib/python3.12/site-packages/numpy/random/tests/test_random.py b/lib/python3.12/site-packages/numpy/random/tests/test_random.py
new file mode 100644
index 0000000000000000000000000000000000000000..3d081fe1dbd1c868fe022480330711024804ca20
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/random/tests/test_random.py
@@ -0,0 +1,1750 @@
+import warnings
+
+import pytest
+
+import numpy as np
+from numpy.testing import (
+        assert_, assert_raises, assert_equal, assert_warns,
+        assert_no_warnings, assert_array_equal, assert_array_almost_equal,
+        suppress_warnings, IS_WASM
+        )
+from numpy import random
+import sys
+
+
+class TestSeed:
+    def test_scalar(self):
+        s = np.random.RandomState(0)
+        assert_equal(s.randint(1000), 684)
+        s = np.random.RandomState(4294967295)
+        assert_equal(s.randint(1000), 419)
+
+    def test_array(self):
+        s = np.random.RandomState(range(10))
+        assert_equal(s.randint(1000), 468)
+        s = np.random.RandomState(np.arange(10))
+        assert_equal(s.randint(1000), 468)
+        s = np.random.RandomState([0])
+        assert_equal(s.randint(1000), 973)
+        s = np.random.RandomState([4294967295])
+        assert_equal(s.randint(1000), 265)
+
+    def test_invalid_scalar(self):
+        # seed must be an unsigned 32 bit integer
+        assert_raises(TypeError, np.random.RandomState, -0.5)
+        assert_raises(ValueError, np.random.RandomState, -1)
+
+    def test_invalid_array(self):
+        # seed must be an unsigned 32 bit integer
+        assert_raises(TypeError, np.random.RandomState, [-0.5])
+        assert_raises(ValueError, np.random.RandomState, [-1])
+        assert_raises(ValueError, np.random.RandomState, [4294967296])
+        assert_raises(ValueError, np.random.RandomState, [1, 2, 4294967296])
+        assert_raises(ValueError, np.random.RandomState, [1, -2, 4294967296])
+
+    def test_invalid_array_shape(self):
+        # gh-9832
+        assert_raises(ValueError, np.random.RandomState,
+                      np.array([], dtype=np.int64))
+        assert_raises(ValueError, np.random.RandomState, [[1, 2, 3]])
+        assert_raises(ValueError, np.random.RandomState, [[1, 2, 3],
+                                                          [4, 5, 6]])
+
+
+class TestBinomial:
+    def test_n_zero(self):
+        # Tests the corner case of n == 0 for the binomial distribution.
+        # binomial(0, p) should be zero for any p in [0, 1].
+        # This test addresses issue #3480.
+        zeros = np.zeros(2, dtype='int')
+        for p in [0, .5, 1]:
+            assert_(random.binomial(0, p) == 0)
+            assert_array_equal(random.binomial(zeros, p), zeros)
+
+    def test_p_is_nan(self):
+        # Issue #4571.
+        assert_raises(ValueError, random.binomial, 1, np.nan)
+
+
+class TestMultinomial:
+    def test_basic(self):
+        random.multinomial(100, [0.2, 0.8])
+
+    def test_zero_probability(self):
+        random.multinomial(100, [0.2, 0.8, 0.0, 0.0, 0.0])
+
+    def test_int_negative_interval(self):
+        assert_(-5 <= random.randint(-5, -1) < -1)
+        x = random.randint(-5, -1, 5)
+        assert_(np.all(-5 <= x))
+        assert_(np.all(x < -1))
+
+    def test_size(self):
+        # gh-3173
+        p = [0.5, 0.5]
+        assert_equal(np.random.multinomial(1, p, np.uint32(1)).shape, (1, 2))
+        assert_equal(np.random.multinomial(1, p, np.uint32(1)).shape, (1, 2))
+        assert_equal(np.random.multinomial(1, p, np.uint32(1)).shape, (1, 2))
+        assert_equal(np.random.multinomial(1, p, [2, 2]).shape, (2, 2, 2))
+        assert_equal(np.random.multinomial(1, p, (2, 2)).shape, (2, 2, 2))
+        assert_equal(np.random.multinomial(1, p, np.array((2, 2))).shape,
+                     (2, 2, 2))
+
+        assert_raises(TypeError, np.random.multinomial, 1, p,
+                      float(1))
+
+    def test_multidimensional_pvals(self):
+        assert_raises(ValueError, np.random.multinomial, 10, [[0, 1]])
+        assert_raises(ValueError, np.random.multinomial, 10, [[0], [1]])
+        assert_raises(ValueError, np.random.multinomial, 10, [[[0], [1]], [[1], [0]]])
+        assert_raises(ValueError, np.random.multinomial, 10, np.array([[0, 1], [1, 0]]))
+
+
+class TestSetState:
+    def setup_method(self):
+        self.seed = 1234567890
+        self.prng = random.RandomState(self.seed)
+        self.state = self.prng.get_state()
+
+    def test_basic(self):
+        old = self.prng.tomaxint(16)
+        self.prng.set_state(self.state)
+        new = self.prng.tomaxint(16)
+        assert_(np.all(old == new))
+
+    def test_gaussian_reset(self):
+        # Make sure the cached every-other-Gaussian is reset.
+        old = self.prng.standard_normal(size=3)
+        self.prng.set_state(self.state)
+        new = self.prng.standard_normal(size=3)
+        assert_(np.all(old == new))
+
+    def test_gaussian_reset_in_media_res(self):
+        # When the state is saved with a cached Gaussian, make sure the
+        # cached Gaussian is restored.
+
+        self.prng.standard_normal()
+        state = self.prng.get_state()
+        old = self.prng.standard_normal(size=3)
+        self.prng.set_state(state)
+        new = self.prng.standard_normal(size=3)
+        assert_(np.all(old == new))
+
+    def test_backwards_compatibility(self):
+        # Make sure we can accept old state tuples that do not have the
+        # cached Gaussian value.
+        old_state = self.state[:-2]
+        x1 = self.prng.standard_normal(size=16)
+        self.prng.set_state(old_state)
+        x2 = self.prng.standard_normal(size=16)
+        self.prng.set_state(self.state)
+        x3 = self.prng.standard_normal(size=16)
+        assert_(np.all(x1 == x2))
+        assert_(np.all(x1 == x3))
+
+    def test_negative_binomial(self):
+        # Ensure that the negative binomial results take floating point
+        # arguments without truncation.
+        self.prng.negative_binomial(0.5, 0.5)
+
+    def test_set_invalid_state(self):
+        # gh-25402
+        with pytest.raises(IndexError):
+            self.prng.set_state(())
+
+
+class TestRandint:
+
+    rfunc = np.random.randint
+
+    # valid integer/boolean types
+    itype = [np.bool_, np.int8, np.uint8, np.int16, np.uint16,
+             np.int32, np.uint32, np.int64, np.uint64]
+
+    def test_unsupported_type(self):
+        assert_raises(TypeError, self.rfunc, 1, dtype=float)
+
+    def test_bounds_checking(self):
+        for dt in self.itype:
+            lbnd = 0 if dt is np.bool_ else np.iinfo(dt).min
+            ubnd = 2 if dt is np.bool_ else np.iinfo(dt).max + 1
+            assert_raises(ValueError, self.rfunc, lbnd - 1, ubnd, dtype=dt)
+            assert_raises(ValueError, self.rfunc, lbnd, ubnd + 1, dtype=dt)
+            assert_raises(ValueError, self.rfunc, ubnd, lbnd, dtype=dt)
+            assert_raises(ValueError, self.rfunc, 1, 0, dtype=dt)
+
+    def test_rng_zero_and_extremes(self):
+        for dt in self.itype:
+            lbnd = 0 if dt is np.bool_ else np.iinfo(dt).min
+            ubnd = 2 if dt is np.bool_ else np.iinfo(dt).max + 1
+
+            tgt = ubnd - 1
+            assert_equal(self.rfunc(tgt, tgt + 1, size=1000, dtype=dt), tgt)
+
+            tgt = lbnd
+            assert_equal(self.rfunc(tgt, tgt + 1, size=1000, dtype=dt), tgt)
+
+            tgt = (lbnd + ubnd)//2
+            assert_equal(self.rfunc(tgt, tgt + 1, size=1000, dtype=dt), tgt)
+
+    def test_full_range(self):
+        # Test for ticket #1690
+
+        for dt in self.itype:
+            lbnd = 0 if dt is np.bool_ else np.iinfo(dt).min
+            ubnd = 2 if dt is np.bool_ else np.iinfo(dt).max + 1
+
+            try:
+                self.rfunc(lbnd, ubnd, dtype=dt)
+            except Exception as e:
+                raise AssertionError("No error should have been raised, "
+                                     "but one was with the following "
+                                     "message:\n\n%s" % str(e))
+
+    def test_in_bounds_fuzz(self):
+        # Don't use fixed seed
+        np.random.seed()
+
+        for dt in self.itype[1:]:
+            for ubnd in [4, 8, 16]:
+                vals = self.rfunc(2, ubnd, size=2**16, dtype=dt)
+                assert_(vals.max() < ubnd)
+                assert_(vals.min() >= 2)
+
+        vals = self.rfunc(0, 2, size=2**16, dtype=np.bool_)
+
+        assert_(vals.max() < 2)
+        assert_(vals.min() >= 0)
+
+    def test_repeatability(self):
+        import hashlib
+        # We use a sha256 hash of generated sequences of 1000 samples
+        # in the range [0, 6) for all but bool, where the range
+        # is [0, 2). Hashes are for little endian numbers.
+        tgt = {'bool': '509aea74d792fb931784c4b0135392c65aec64beee12b0cc167548a2c3d31e71',
+               'int16': '7b07f1a920e46f6d0fe02314155a2330bcfd7635e708da50e536c5ebb631a7d4',
+               'int32': 'e577bfed6c935de944424667e3da285012e741892dcb7051a8f1ce68ab05c92f',
+               'int64': '0fbead0b06759df2cfb55e43148822d4a1ff953c7eb19a5b08445a63bb64fa9e',
+               'int8': '001aac3a5acb935a9b186cbe14a1ca064b8bb2dd0b045d48abeacf74d0203404',
+               'uint16': '7b07f1a920e46f6d0fe02314155a2330bcfd7635e708da50e536c5ebb631a7d4',
+               'uint32': 'e577bfed6c935de944424667e3da285012e741892dcb7051a8f1ce68ab05c92f',
+               'uint64': '0fbead0b06759df2cfb55e43148822d4a1ff953c7eb19a5b08445a63bb64fa9e',
+               'uint8': '001aac3a5acb935a9b186cbe14a1ca064b8bb2dd0b045d48abeacf74d0203404'}
+
+        for dt in self.itype[1:]:
+            np.random.seed(1234)
+
+            # view as little endian for hash
+            if sys.byteorder == 'little':
+                val = self.rfunc(0, 6, size=1000, dtype=dt)
+            else:
+                val = self.rfunc(0, 6, size=1000, dtype=dt).byteswap()
+
+            res = hashlib.sha256(val.view(np.int8)).hexdigest()
+            assert_(tgt[np.dtype(dt).name] == res)
+
+        # bools do not depend on endianness
+        np.random.seed(1234)
+        val = self.rfunc(0, 2, size=1000, dtype=bool).view(np.int8)
+        res = hashlib.sha256(val).hexdigest()
+        assert_(tgt[np.dtype(bool).name] == res)
+
+    def test_int64_uint64_corner_case(self):
+        # When stored in Numpy arrays, `lbnd` is casted
+        # as np.int64, and `ubnd` is casted as np.uint64.
+        # Checking whether `lbnd` >= `ubnd` used to be
+        # done solely via direct comparison, which is incorrect
+        # because when Numpy tries to compare both numbers,
+        # it casts both to np.float64 because there is
+        # no integer superset of np.int64 and np.uint64. However,
+        # `ubnd` is too large to be represented in np.float64,
+        # causing it be round down to np.iinfo(np.int64).max,
+        # leading to a ValueError because `lbnd` now equals
+        # the new `ubnd`.
+
+        dt = np.int64
+        tgt = np.iinfo(np.int64).max
+        lbnd = np.int64(np.iinfo(np.int64).max)
+        ubnd = np.uint64(np.iinfo(np.int64).max + 1)
+
+        # None of these function calls should
+        # generate a ValueError now.
+        actual = np.random.randint(lbnd, ubnd, dtype=dt)
+        assert_equal(actual, tgt)
+
+    def test_respect_dtype_singleton(self):
+        # See gh-7203
+        for dt in self.itype:
+            lbnd = 0 if dt is np.bool_ else np.iinfo(dt).min
+            ubnd = 2 if dt is np.bool_ else np.iinfo(dt).max + 1
+
+            sample = self.rfunc(lbnd, ubnd, dtype=dt)
+            assert_equal(sample.dtype, np.dtype(dt))
+
+        for dt in (bool, int):
+            lbnd = 0 if dt is bool else np.iinfo(dt).min
+            ubnd = 2 if dt is bool else np.iinfo(dt).max + 1
+
+            # gh-7284: Ensure that we get Python data types
+            sample = self.rfunc(lbnd, ubnd, dtype=dt)
+            assert_(not hasattr(sample, 'dtype'))
+            assert_equal(type(sample), dt)
+
+
+class TestRandomDist:
+    # Make sure the random distribution returns the correct value for a
+    # given seed
+
+    def setup_method(self):
+        self.seed = 1234567890
+
+    def test_rand(self):
+        np.random.seed(self.seed)
+        actual = np.random.rand(3, 2)
+        desired = np.array([[0.61879477158567997, 0.59162362775974664],
+                            [0.88868358904449662, 0.89165480011560816],
+                            [0.4575674820298663, 0.7781880808593471]])
+        assert_array_almost_equal(actual, desired, decimal=15)
+
+    def test_randn(self):
+        np.random.seed(self.seed)
+        actual = np.random.randn(3, 2)
+        desired = np.array([[1.34016345771863121, 1.73759122771936081],
+                           [1.498988344300628, -0.2286433324536169],
+                           [2.031033998682787, 2.17032494605655257]])
+        assert_array_almost_equal(actual, desired, decimal=15)
+
+    def test_randint(self):
+        np.random.seed(self.seed)
+        actual = np.random.randint(-99, 99, size=(3, 2))
+        desired = np.array([[31, 3],
+                            [-52, 41],
+                            [-48, -66]])
+        assert_array_equal(actual, desired)
+
+    def test_random_integers(self):
+        np.random.seed(self.seed)
+        with suppress_warnings() as sup:
+            w = sup.record(DeprecationWarning)
+            actual = np.random.random_integers(-99, 99, size=(3, 2))
+            assert_(len(w) == 1)
+        desired = np.array([[31, 3],
+                            [-52, 41],
+                            [-48, -66]])
+        assert_array_equal(actual, desired)
+
+    def test_random_integers_max_int(self):
+        # Tests whether random_integers can generate the
+        # maximum allowed Python int that can be converted
+        # into a C long. Previous implementations of this
+        # method have thrown an OverflowError when attempting
+        # to generate this integer.
+        with suppress_warnings() as sup:
+            w = sup.record(DeprecationWarning)
+            actual = np.random.random_integers(np.iinfo('l').max,
+                                               np.iinfo('l').max)
+            assert_(len(w) == 1)
+
+        desired = np.iinfo('l').max
+        assert_equal(actual, desired)
+
+    def test_random_integers_deprecated(self):
+        with warnings.catch_warnings():
+            warnings.simplefilter("error", DeprecationWarning)
+
+            # DeprecationWarning raised with high == None
+            assert_raises(DeprecationWarning,
+                          np.random.random_integers,
+                          np.iinfo('l').max)
+
+            # DeprecationWarning raised with high != None
+            assert_raises(DeprecationWarning,
+                          np.random.random_integers,
+                          np.iinfo('l').max, np.iinfo('l').max)
+
+    def test_random(self):
+        np.random.seed(self.seed)
+        actual = np.random.random((3, 2))
+        desired = np.array([[0.61879477158567997, 0.59162362775974664],
+                            [0.88868358904449662, 0.89165480011560816],
+                            [0.4575674820298663, 0.7781880808593471]])
+        assert_array_almost_equal(actual, desired, decimal=15)
+
+    def test_choice_uniform_replace(self):
+        np.random.seed(self.seed)
+        actual = np.random.choice(4, 4)
+        desired = np.array([2, 3, 2, 3])
+        assert_array_equal(actual, desired)
+
+    def test_choice_nonuniform_replace(self):
+        np.random.seed(self.seed)
+        actual = np.random.choice(4, 4, p=[0.4, 0.4, 0.1, 0.1])
+        desired = np.array([1, 1, 2, 2])
+        assert_array_equal(actual, desired)
+
+    def test_choice_uniform_noreplace(self):
+        np.random.seed(self.seed)
+        actual = np.random.choice(4, 3, replace=False)
+        desired = np.array([0, 1, 3])
+        assert_array_equal(actual, desired)
+
+    def test_choice_nonuniform_noreplace(self):
+        np.random.seed(self.seed)
+        actual = np.random.choice(4, 3, replace=False,
+                                  p=[0.1, 0.3, 0.5, 0.1])
+        desired = np.array([2, 3, 1])
+        assert_array_equal(actual, desired)
+
+    def test_choice_noninteger(self):
+        np.random.seed(self.seed)
+        actual = np.random.choice(['a', 'b', 'c', 'd'], 4)
+        desired = np.array(['c', 'd', 'c', 'd'])
+        assert_array_equal(actual, desired)
+
+    def test_choice_exceptions(self):
+        sample = np.random.choice
+        assert_raises(ValueError, sample, -1, 3)
+        assert_raises(ValueError, sample, 3., 3)
+        assert_raises(ValueError, sample, [[1, 2], [3, 4]], 3)
+        assert_raises(ValueError, sample, [], 3)
+        assert_raises(ValueError, sample, [1, 2, 3, 4], 3,
+                      p=[[0.25, 0.25], [0.25, 0.25]])
+        assert_raises(ValueError, sample, [1, 2], 3, p=[0.4, 0.4, 0.2])
+        assert_raises(ValueError, sample, [1, 2], 3, p=[1.1, -0.1])
+        assert_raises(ValueError, sample, [1, 2], 3, p=[0.4, 0.4])
+        assert_raises(ValueError, sample, [1, 2, 3], 4, replace=False)
+        # gh-13087
+        assert_raises(ValueError, sample, [1, 2, 3], -2, replace=False)
+        assert_raises(ValueError, sample, [1, 2, 3], (-1,), replace=False)
+        assert_raises(ValueError, sample, [1, 2, 3], (-1, 1), replace=False)
+        assert_raises(ValueError, sample, [1, 2, 3], 2,
+                      replace=False, p=[1, 0, 0])
+
+    def test_choice_return_shape(self):
+        p = [0.1, 0.9]
+        # Check scalar
+        assert_(np.isscalar(np.random.choice(2, replace=True)))
+        assert_(np.isscalar(np.random.choice(2, replace=False)))
+        assert_(np.isscalar(np.random.choice(2, replace=True, p=p)))
+        assert_(np.isscalar(np.random.choice(2, replace=False, p=p)))
+        assert_(np.isscalar(np.random.choice([1, 2], replace=True)))
+        assert_(np.random.choice([None], replace=True) is None)
+        a = np.array([1, 2])
+        arr = np.empty(1, dtype=object)
+        arr[0] = a
+        assert_(np.random.choice(arr, replace=True) is a)
+
+        # Check 0-d array
+        s = tuple()
+        assert_(not np.isscalar(np.random.choice(2, s, replace=True)))
+        assert_(not np.isscalar(np.random.choice(2, s, replace=False)))
+        assert_(not np.isscalar(np.random.choice(2, s, replace=True, p=p)))
+        assert_(not np.isscalar(np.random.choice(2, s, replace=False, p=p)))
+        assert_(not np.isscalar(np.random.choice([1, 2], s, replace=True)))
+        assert_(np.random.choice([None], s, replace=True).ndim == 0)
+        a = np.array([1, 2])
+        arr = np.empty(1, dtype=object)
+        arr[0] = a
+        assert_(np.random.choice(arr, s, replace=True).item() is a)
+
+        # Check multi dimensional array
+        s = (2, 3)
+        p = [0.1, 0.1, 0.1, 0.1, 0.4, 0.2]
+        assert_equal(np.random.choice(6, s, replace=True).shape, s)
+        assert_equal(np.random.choice(6, s, replace=False).shape, s)
+        assert_equal(np.random.choice(6, s, replace=True, p=p).shape, s)
+        assert_equal(np.random.choice(6, s, replace=False, p=p).shape, s)
+        assert_equal(np.random.choice(np.arange(6), s, replace=True).shape, s)
+
+        # Check zero-size
+        assert_equal(np.random.randint(0, 0, size=(3, 0, 4)).shape, (3, 0, 4))
+        assert_equal(np.random.randint(0, -10, size=0).shape, (0,))
+        assert_equal(np.random.randint(10, 10, size=0).shape, (0,))
+        assert_equal(np.random.choice(0, size=0).shape, (0,))
+        assert_equal(np.random.choice([], size=(0,)).shape, (0,))
+        assert_equal(np.random.choice(['a', 'b'], size=(3, 0, 4)).shape,
+                     (3, 0, 4))
+        assert_raises(ValueError, np.random.choice, [], 10)
+
+    def test_choice_nan_probabilities(self):
+        a = np.array([42, 1, 2])
+        p = [None, None, None]
+        assert_raises(ValueError, np.random.choice, a, p=p)
+
+    def test_bytes(self):
+        np.random.seed(self.seed)
+        actual = np.random.bytes(10)
+        desired = b'\x82Ui\x9e\xff\x97+Wf\xa5'
+        assert_equal(actual, desired)
+
+    def test_shuffle(self):
+        # Test lists, arrays (of various dtypes), and multidimensional versions
+        # of both, c-contiguous or not:
+        for conv in [lambda x: np.array([]),
+                     lambda x: x,
+                     lambda x: np.asarray(x).astype(np.int8),
+                     lambda x: np.asarray(x).astype(np.float32),
+                     lambda x: np.asarray(x).astype(np.complex64),
+                     lambda x: np.asarray(x).astype(object),
+                     lambda x: [(i, i) for i in x],
+                     lambda x: np.asarray([[i, i] for i in x]),
+                     lambda x: np.vstack([x, x]).T,
+                     # gh-11442
+                     lambda x: (np.asarray([(i, i) for i in x],
+                                           [("a", int), ("b", int)])
+                                .view(np.recarray)),
+                     # gh-4270
+                     lambda x: np.asarray([(i, i) for i in x],
+                                          [("a", object), ("b", np.int32)])]:
+            np.random.seed(self.seed)
+            alist = conv([1, 2, 3, 4, 5, 6, 7, 8, 9, 0])
+            np.random.shuffle(alist)
+            actual = alist
+            desired = conv([0, 1, 9, 6, 2, 4, 5, 8, 7, 3])
+            assert_array_equal(actual, desired)
+
+    def test_shuffle_masked(self):
+        # gh-3263
+        a = np.ma.masked_values(np.reshape(range(20), (5, 4)) % 3 - 1, -1)
+        b = np.ma.masked_values(np.arange(20) % 3 - 1, -1)
+        a_orig = a.copy()
+        b_orig = b.copy()
+        for i in range(50):
+            np.random.shuffle(a)
+            assert_equal(
+                sorted(a.data[~a.mask]), sorted(a_orig.data[~a_orig.mask]))
+            np.random.shuffle(b)
+            assert_equal(
+                sorted(b.data[~b.mask]), sorted(b_orig.data[~b_orig.mask]))
+
+    @pytest.mark.parametrize("random",
+            [np.random, np.random.RandomState(), np.random.default_rng()])
+    def test_shuffle_untyped_warning(self, random):
+        # Create a dict works like a sequence but isn't one
+        values = {0: 0, 1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6}
+        with pytest.warns(UserWarning,
+                match="you are shuffling a 'dict' object") as rec:
+            random.shuffle(values)
+        assert "test_random" in rec[0].filename
+
+    @pytest.mark.parametrize("random",
+        [np.random, np.random.RandomState(), np.random.default_rng()])
+    @pytest.mark.parametrize("use_array_like", [True, False])
+    def test_shuffle_no_object_unpacking(self, random, use_array_like):
+        class MyArr(np.ndarray):
+            pass
+
+        items = [
+            None, np.array([3]), np.float64(3), np.array(10), np.float64(7)
+        ]
+        arr = np.array(items, dtype=object)
+        item_ids = {id(i) for i in items}
+        if use_array_like:
+            arr = arr.view(MyArr)
+
+        # The array was created fine, and did not modify any objects:
+        assert all(id(i) in item_ids for i in arr)
+
+        if use_array_like and not isinstance(random, np.random.Generator):
+            # The old API gives incorrect results, but warns about it.
+            with pytest.warns(UserWarning,
+                    match="Shuffling a one dimensional array.*"):
+                random.shuffle(arr)
+        else:
+            random.shuffle(arr)
+            assert all(id(i) in item_ids for i in arr)
+
+    def test_shuffle_memoryview(self):
+        # gh-18273
+        # allow graceful handling of memoryviews
+        # (treat the same as arrays)
+        np.random.seed(self.seed)
+        a = np.arange(5).data
+        np.random.shuffle(a)
+        assert_equal(np.asarray(a), [0, 1, 4, 3, 2])
+        rng = np.random.RandomState(self.seed)
+        rng.shuffle(a)
+        assert_equal(np.asarray(a), [0, 1, 2, 3, 4])
+        rng = np.random.default_rng(self.seed)
+        rng.shuffle(a)
+        assert_equal(np.asarray(a), [4, 1, 0, 3, 2])
+
+    def test_shuffle_not_writeable(self):
+        a = np.zeros(3)
+        a.flags.writeable = False
+        with pytest.raises(ValueError, match='read-only'):
+            np.random.shuffle(a)
+
+    def test_beta(self):
+        np.random.seed(self.seed)
+        actual = np.random.beta(.1, .9, size=(3, 2))
+        desired = np.array(
+                [[1.45341850513746058e-02, 5.31297615662868145e-04],
+                 [1.85366619058432324e-06, 4.19214516800110563e-03],
+                 [1.58405155108498093e-04, 1.26252891949397652e-04]])
+        assert_array_almost_equal(actual, desired, decimal=15)
+
+    def test_binomial(self):
+        np.random.seed(self.seed)
+        actual = np.random.binomial(100, .456, size=(3, 2))
+        desired = np.array([[37, 43],
+                            [42, 48],
+                            [46, 45]])
+        assert_array_equal(actual, desired)
+
+    def test_chisquare(self):
+        np.random.seed(self.seed)
+        actual = np.random.chisquare(50, size=(3, 2))
+        desired = np.array([[63.87858175501090585, 68.68407748911370447],
+                            [65.77116116901505904, 47.09686762438974483],
+                            [72.3828403199695174, 74.18408615260374006]])
+        assert_array_almost_equal(actual, desired, decimal=13)
+
+    def test_dirichlet(self):
+        np.random.seed(self.seed)
+        alpha = np.array([51.72840233779265162, 39.74494232180943953])
+        actual = np.random.mtrand.dirichlet(alpha, size=(3, 2))
+        desired = np.array([[[0.54539444573611562, 0.45460555426388438],
+                             [0.62345816822039413, 0.37654183177960598]],
+                            [[0.55206000085785778, 0.44793999914214233],
+                             [0.58964023305154301, 0.41035976694845688]],
+                            [[0.59266909280647828, 0.40733090719352177],
+                             [0.56974431743975207, 0.43025568256024799]]])
+        assert_array_almost_equal(actual, desired, decimal=15)
+
+    def test_dirichlet_size(self):
+        # gh-3173
+        p = np.array([51.72840233779265162, 39.74494232180943953])
+        assert_equal(np.random.dirichlet(p, np.uint32(1)).shape, (1, 2))
+        assert_equal(np.random.dirichlet(p, np.uint32(1)).shape, (1, 2))
+        assert_equal(np.random.dirichlet(p, np.uint32(1)).shape, (1, 2))
+        assert_equal(np.random.dirichlet(p, [2, 2]).shape, (2, 2, 2))
+        assert_equal(np.random.dirichlet(p, (2, 2)).shape, (2, 2, 2))
+        assert_equal(np.random.dirichlet(p, np.array((2, 2))).shape, (2, 2, 2))
+
+        assert_raises(TypeError, np.random.dirichlet, p, float(1))
+
+    def test_dirichlet_bad_alpha(self):
+        # gh-2089
+        alpha = np.array([5.4e-01, -1.0e-16])
+        assert_raises(ValueError, np.random.mtrand.dirichlet, alpha)
+
+        # gh-15876
+        assert_raises(ValueError, random.dirichlet, [[5, 1]])
+        assert_raises(ValueError, random.dirichlet, [[5], [1]])
+        assert_raises(ValueError, random.dirichlet, [[[5], [1]], [[1], [5]]])
+        assert_raises(ValueError, random.dirichlet, np.array([[5, 1], [1, 5]]))
+
+    def test_exponential(self):
+        np.random.seed(self.seed)
+        actual = np.random.exponential(1.1234, size=(3, 2))
+        desired = np.array([[1.08342649775011624, 1.00607889924557314],
+                            [2.46628830085216721, 2.49668106809923884],
+                            [0.68717433461363442, 1.69175666993575979]])
+        assert_array_almost_equal(actual, desired, decimal=15)
+
+    def test_exponential_0(self):
+        assert_equal(np.random.exponential(scale=0), 0)
+        assert_raises(ValueError, np.random.exponential, scale=-0.)
+
+    def test_f(self):
+        np.random.seed(self.seed)
+        actual = np.random.f(12, 77, size=(3, 2))
+        desired = np.array([[1.21975394418575878, 1.75135759791559775],
+                            [1.44803115017146489, 1.22108959480396262],
+                            [1.02176975757740629, 1.34431827623300415]])
+        assert_array_almost_equal(actual, desired, decimal=15)
+
+    def test_gamma(self):
+        np.random.seed(self.seed)
+        actual = np.random.gamma(5, 3, size=(3, 2))
+        desired = np.array([[24.60509188649287182, 28.54993563207210627],
+                            [26.13476110204064184, 12.56988482927716078],
+                            [31.71863275789960568, 33.30143302795922011]])
+        assert_array_almost_equal(actual, desired, decimal=14)
+
+    def test_gamma_0(self):
+        assert_equal(np.random.gamma(shape=0, scale=0), 0)
+        assert_raises(ValueError, np.random.gamma, shape=-0., scale=-0.)
+
+    def test_geometric(self):
+        np.random.seed(self.seed)
+        actual = np.random.geometric(.123456789, size=(3, 2))
+        desired = np.array([[8, 7],
+                            [17, 17],
+                            [5, 12]])
+        assert_array_equal(actual, desired)
+
+    def test_gumbel(self):
+        np.random.seed(self.seed)
+        actual = np.random.gumbel(loc=.123456789, scale=2.0, size=(3, 2))
+        desired = np.array([[0.19591898743416816, 0.34405539668096674],
+                            [-1.4492522252274278, -1.47374816298446865],
+                            [1.10651090478803416, -0.69535848626236174]])
+        assert_array_almost_equal(actual, desired, decimal=15)
+
+    def test_gumbel_0(self):
+        assert_equal(np.random.gumbel(scale=0), 0)
+        assert_raises(ValueError, np.random.gumbel, scale=-0.)
+
+    def test_hypergeometric(self):
+        np.random.seed(self.seed)
+        actual = np.random.hypergeometric(10, 5, 14, size=(3, 2))
+        desired = np.array([[10, 10],
+                            [10, 10],
+                            [9, 9]])
+        assert_array_equal(actual, desired)
+
+        # Test nbad = 0
+        actual = np.random.hypergeometric(5, 0, 3, size=4)
+        desired = np.array([3, 3, 3, 3])
+        assert_array_equal(actual, desired)
+
+        actual = np.random.hypergeometric(15, 0, 12, size=4)
+        desired = np.array([12, 12, 12, 12])
+        assert_array_equal(actual, desired)
+
+        # Test ngood = 0
+        actual = np.random.hypergeometric(0, 5, 3, size=4)
+        desired = np.array([0, 0, 0, 0])
+        assert_array_equal(actual, desired)
+
+        actual = np.random.hypergeometric(0, 15, 12, size=4)
+        desired = np.array([0, 0, 0, 0])
+        assert_array_equal(actual, desired)
+
+    def test_laplace(self):
+        np.random.seed(self.seed)
+        actual = np.random.laplace(loc=.123456789, scale=2.0, size=(3, 2))
+        desired = np.array([[0.66599721112760157, 0.52829452552221945],
+                            [3.12791959514407125, 3.18202813572992005],
+                            [-0.05391065675859356, 1.74901336242837324]])
+        assert_array_almost_equal(actual, desired, decimal=15)
+
+    def test_laplace_0(self):
+        assert_equal(np.random.laplace(scale=0), 0)
+        assert_raises(ValueError, np.random.laplace, scale=-0.)
+
+    def test_logistic(self):
+        np.random.seed(self.seed)
+        actual = np.random.logistic(loc=.123456789, scale=2.0, size=(3, 2))
+        desired = np.array([[1.09232835305011444, 0.8648196662399954],
+                            [4.27818590694950185, 4.33897006346929714],
+                            [-0.21682183359214885, 2.63373365386060332]])
+        assert_array_almost_equal(actual, desired, decimal=15)
+
+    def test_lognormal(self):
+        np.random.seed(self.seed)
+        actual = np.random.lognormal(mean=.123456789, sigma=2.0, size=(3, 2))
+        desired = np.array([[16.50698631688883822, 36.54846706092654784],
+                            [22.67886599981281748, 0.71617561058995771],
+                            [65.72798501792723869, 86.84341601437161273]])
+        assert_array_almost_equal(actual, desired, decimal=13)
+
+    def test_lognormal_0(self):
+        assert_equal(np.random.lognormal(sigma=0), 1)
+        assert_raises(ValueError, np.random.lognormal, sigma=-0.)
+
+    def test_logseries(self):
+        np.random.seed(self.seed)
+        actual = np.random.logseries(p=.923456789, size=(3, 2))
+        desired = np.array([[2, 2],
+                            [6, 17],
+                            [3, 6]])
+        assert_array_equal(actual, desired)
+
+    def test_multinomial(self):
+        np.random.seed(self.seed)
+        actual = np.random.multinomial(20, [1/6.]*6, size=(3, 2))
+        desired = np.array([[[4, 3, 5, 4, 2, 2],
+                             [5, 2, 8, 2, 2, 1]],
+                            [[3, 4, 3, 6, 0, 4],
+                             [2, 1, 4, 3, 6, 4]],
+                            [[4, 4, 2, 5, 2, 3],
+                             [4, 3, 4, 2, 3, 4]]])
+        assert_array_equal(actual, desired)
+
+    def test_multivariate_normal(self):
+        np.random.seed(self.seed)
+        mean = (.123456789, 10)
+        cov = [[1, 0], [0, 1]]
+        size = (3, 2)
+        actual = np.random.multivariate_normal(mean, cov, size)
+        desired = np.array([[[1.463620246718631, 11.73759122771936],
+                             [1.622445133300628, 9.771356667546383]],
+                            [[2.154490787682787, 12.170324946056553],
+                             [1.719909438201865, 9.230548443648306]],
+                            [[0.689515026297799, 9.880729819607714],
+                             [-0.023054015651998, 9.201096623542879]]])
+
+        assert_array_almost_equal(actual, desired, decimal=15)
+
+        # Check for default size, was raising deprecation warning
+        actual = np.random.multivariate_normal(mean, cov)
+        desired = np.array([0.895289569463708, 9.17180864067987])
+        assert_array_almost_equal(actual, desired, decimal=15)
+
+        # Check that non positive-semidefinite covariance warns with
+        # RuntimeWarning
+        mean = [0, 0]
+        cov = [[1, 2], [2, 1]]
+        assert_warns(RuntimeWarning, np.random.multivariate_normal, mean, cov)
+
+        # and that it doesn't warn with RuntimeWarning check_valid='ignore'
+        assert_no_warnings(np.random.multivariate_normal, mean, cov,
+                           check_valid='ignore')
+
+        # and that it raises with RuntimeWarning check_valid='raises'
+        assert_raises(ValueError, np.random.multivariate_normal, mean, cov,
+                      check_valid='raise')
+
+        cov = np.array([[1, 0.1], [0.1, 1]], dtype=np.float32)
+        with suppress_warnings() as sup:
+            np.random.multivariate_normal(mean, cov)
+            w = sup.record(RuntimeWarning)
+            assert len(w) == 0
+
+    def test_negative_binomial(self):
+        np.random.seed(self.seed)
+        actual = np.random.negative_binomial(n=100, p=.12345, size=(3, 2))
+        desired = np.array([[848, 841],
+                            [892, 611],
+                            [779, 647]])
+        assert_array_equal(actual, desired)
+
+    def test_noncentral_chisquare(self):
+        np.random.seed(self.seed)
+        actual = np.random.noncentral_chisquare(df=5, nonc=5, size=(3, 2))
+        desired = np.array([[23.91905354498517511, 13.35324692733826346],
+                            [31.22452661329736401, 16.60047399466177254],
+                            [5.03461598262724586, 17.94973089023519464]])
+        assert_array_almost_equal(actual, desired, decimal=14)
+
+        actual = np.random.noncentral_chisquare(df=.5, nonc=.2, size=(3, 2))
+        desired = np.array([[1.47145377828516666,  0.15052899268012659],
+                            [0.00943803056963588,  1.02647251615666169],
+                            [0.332334982684171,  0.15451287602753125]])
+        assert_array_almost_equal(actual, desired, decimal=14)
+
+        np.random.seed(self.seed)
+        actual = np.random.noncentral_chisquare(df=5, nonc=0, size=(3, 2))
+        desired = np.array([[9.597154162763948, 11.725484450296079],
+                            [10.413711048138335, 3.694475922923986],
+                            [13.484222138963087, 14.377255424602957]])
+        assert_array_almost_equal(actual, desired, decimal=14)
+
+    def test_noncentral_f(self):
+        np.random.seed(self.seed)
+        actual = np.random.noncentral_f(dfnum=5, dfden=2, nonc=1,
+                                        size=(3, 2))
+        desired = np.array([[1.40598099674926669, 0.34207973179285761],
+                            [3.57715069265772545, 7.92632662577829805],
+                            [0.43741599463544162, 1.1774208752428319]])
+        assert_array_almost_equal(actual, desired, decimal=14)
+
+    def test_normal(self):
+        np.random.seed(self.seed)
+        actual = np.random.normal(loc=.123456789, scale=2.0, size=(3, 2))
+        desired = np.array([[2.80378370443726244, 3.59863924443872163],
+                            [3.121433477601256, -0.33382987590723379],
+                            [4.18552478636557357, 4.46410668111310471]])
+        assert_array_almost_equal(actual, desired, decimal=15)
+
+    def test_normal_0(self):
+        assert_equal(np.random.normal(scale=0), 0)
+        assert_raises(ValueError, np.random.normal, scale=-0.)
+
+    def test_pareto(self):
+        np.random.seed(self.seed)
+        actual = np.random.pareto(a=.123456789, size=(3, 2))
+        desired = np.array(
+                [[2.46852460439034849e+03, 1.41286880810518346e+03],
+                 [5.28287797029485181e+07, 6.57720981047328785e+07],
+                 [1.40840323350391515e+02, 1.98390255135251704e+05]])
+        # For some reason on 32-bit x86 Ubuntu 12.10 the [1, 0] entry in this
+        # matrix differs by 24 nulps. Discussion:
+        #   https://mail.python.org/pipermail/numpy-discussion/2012-September/063801.html
+        # Consensus is that this is probably some gcc quirk that affects
+        # rounding but not in any important way, so we just use a looser
+        # tolerance on this test:
+        np.testing.assert_array_almost_equal_nulp(actual, desired, nulp=30)
+
+    def test_poisson(self):
+        np.random.seed(self.seed)
+        actual = np.random.poisson(lam=.123456789, size=(3, 2))
+        desired = np.array([[0, 0],
+                            [1, 0],
+                            [0, 0]])
+        assert_array_equal(actual, desired)
+
+    def test_poisson_exceptions(self):
+        lambig = np.iinfo('l').max
+        lamneg = -1
+        assert_raises(ValueError, np.random.poisson, lamneg)
+        assert_raises(ValueError, np.random.poisson, [lamneg]*10)
+        assert_raises(ValueError, np.random.poisson, lambig)
+        assert_raises(ValueError, np.random.poisson, [lambig]*10)
+
+    def test_power(self):
+        np.random.seed(self.seed)
+        actual = np.random.power(a=.123456789, size=(3, 2))
+        desired = np.array([[0.02048932883240791, 0.01424192241128213],
+                            [0.38446073748535298, 0.39499689943484395],
+                            [0.00177699707563439, 0.13115505880863756]])
+        assert_array_almost_equal(actual, desired, decimal=15)
+
+    def test_rayleigh(self):
+        np.random.seed(self.seed)
+        actual = np.random.rayleigh(scale=10, size=(3, 2))
+        desired = np.array([[13.8882496494248393, 13.383318339044731],
+                            [20.95413364294492098, 21.08285015800712614],
+                            [11.06066537006854311, 17.35468505778271009]])
+        assert_array_almost_equal(actual, desired, decimal=14)
+
+    def test_rayleigh_0(self):
+        assert_equal(np.random.rayleigh(scale=0), 0)
+        assert_raises(ValueError, np.random.rayleigh, scale=-0.)
+
+    def test_standard_cauchy(self):
+        np.random.seed(self.seed)
+        actual = np.random.standard_cauchy(size=(3, 2))
+        desired = np.array([[0.77127660196445336, -6.55601161955910605],
+                            [0.93582023391158309, -2.07479293013759447],
+                            [-4.74601644297011926, 0.18338989290760804]])
+        assert_array_almost_equal(actual, desired, decimal=15)
+
+    def test_standard_exponential(self):
+        np.random.seed(self.seed)
+        actual = np.random.standard_exponential(size=(3, 2))
+        desired = np.array([[0.96441739162374596, 0.89556604882105506],
+                            [2.1953785836319808, 2.22243285392490542],
+                            [0.6116915921431676, 1.50592546727413201]])
+        assert_array_almost_equal(actual, desired, decimal=15)
+
+    def test_standard_gamma(self):
+        np.random.seed(self.seed)
+        actual = np.random.standard_gamma(shape=3, size=(3, 2))
+        desired = np.array([[5.50841531318455058, 6.62953470301903103],
+                            [5.93988484943779227, 2.31044849402133989],
+                            [7.54838614231317084, 8.012756093271868]])
+        assert_array_almost_equal(actual, desired, decimal=14)
+
+    def test_standard_gamma_0(self):
+        assert_equal(np.random.standard_gamma(shape=0), 0)
+        assert_raises(ValueError, np.random.standard_gamma, shape=-0.)
+
+    def test_standard_normal(self):
+        np.random.seed(self.seed)
+        actual = np.random.standard_normal(size=(3, 2))
+        desired = np.array([[1.34016345771863121, 1.73759122771936081],
+                            [1.498988344300628, -0.2286433324536169],
+                            [2.031033998682787, 2.17032494605655257]])
+        assert_array_almost_equal(actual, desired, decimal=15)
+
+    def test_standard_t(self):
+        np.random.seed(self.seed)
+        actual = np.random.standard_t(df=10, size=(3, 2))
+        desired = np.array([[0.97140611862659965, -0.08830486548450577],
+                            [1.36311143689505321, -0.55317463909867071],
+                            [-0.18473749069684214, 0.61181537341755321]])
+        assert_array_almost_equal(actual, desired, decimal=15)
+
+    def test_triangular(self):
+        np.random.seed(self.seed)
+        actual = np.random.triangular(left=5.12, mode=10.23, right=20.34,
+                                      size=(3, 2))
+        desired = np.array([[12.68117178949215784, 12.4129206149193152],
+                            [16.20131377335158263, 16.25692138747600524],
+                            [11.20400690911820263, 14.4978144835829923]])
+        assert_array_almost_equal(actual, desired, decimal=14)
+
+    def test_uniform(self):
+        np.random.seed(self.seed)
+        actual = np.random.uniform(low=1.23, high=10.54, size=(3, 2))
+        desired = np.array([[6.99097932346268003, 6.73801597444323974],
+                            [9.50364421400426274, 9.53130618907631089],
+                            [5.48995325769805476, 8.47493103280052118]])
+        assert_array_almost_equal(actual, desired, decimal=15)
+
+    def test_uniform_range_bounds(self):
+        fmin = np.finfo('float').min
+        fmax = np.finfo('float').max
+
+        func = np.random.uniform
+        assert_raises(OverflowError, func, -np.inf, 0)
+        assert_raises(OverflowError, func,  0,      np.inf)
+        assert_raises(OverflowError, func,  fmin,   fmax)
+        assert_raises(OverflowError, func, [-np.inf], [0])
+        assert_raises(OverflowError, func, [0], [np.inf])
+
+        # (fmax / 1e17) - fmin is within range, so this should not throw
+        # account for i386 extended precision DBL_MAX / 1e17 + DBL_MAX >
+        # DBL_MAX by increasing fmin a bit
+        np.random.uniform(low=np.nextafter(fmin, 1), high=fmax / 1e17)
+
+    def test_scalar_exception_propagation(self):
+        # Tests that exceptions are correctly propagated in distributions
+        # when called with objects that throw exceptions when converted to
+        # scalars.
+        #
+        # Regression test for gh: 8865
+
+        class ThrowingFloat(np.ndarray):
+            def __float__(self):
+                raise TypeError
+
+        throwing_float = np.array(1.0).view(ThrowingFloat)
+        assert_raises(TypeError, np.random.uniform, throwing_float,
+                      throwing_float)
+
+        class ThrowingInteger(np.ndarray):
+            def __int__(self):
+                raise TypeError
+
+            __index__ = __int__
+
+        throwing_int = np.array(1).view(ThrowingInteger)
+        assert_raises(TypeError, np.random.hypergeometric, throwing_int, 1, 1)
+
+    def test_vonmises(self):
+        np.random.seed(self.seed)
+        actual = np.random.vonmises(mu=1.23, kappa=1.54, size=(3, 2))
+        desired = np.array([[2.28567572673902042, 2.89163838442285037],
+                            [0.38198375564286025, 2.57638023113890746],
+                            [1.19153771588353052, 1.83509849681825354]])
+        assert_array_almost_equal(actual, desired, decimal=15)
+
+    def test_vonmises_small(self):
+        # check infinite loop, gh-4720
+        np.random.seed(self.seed)
+        r = np.random.vonmises(mu=0., kappa=1.1e-8, size=10**6)
+        np.testing.assert_(np.isfinite(r).all())
+
+    def test_wald(self):
+        np.random.seed(self.seed)
+        actual = np.random.wald(mean=1.23, scale=1.54, size=(3, 2))
+        desired = np.array([[3.82935265715889983, 5.13125249184285526],
+                            [0.35045403618358717, 1.50832396872003538],
+                            [0.24124319895843183, 0.22031101461955038]])
+        assert_array_almost_equal(actual, desired, decimal=14)
+
+    def test_weibull(self):
+        np.random.seed(self.seed)
+        actual = np.random.weibull(a=1.23, size=(3, 2))
+        desired = np.array([[0.97097342648766727, 0.91422896443565516],
+                            [1.89517770034962929, 1.91414357960479564],
+                            [0.67057783752390987, 1.39494046635066793]])
+        assert_array_almost_equal(actual, desired, decimal=15)
+
+    def test_weibull_0(self):
+        np.random.seed(self.seed)
+        assert_equal(np.random.weibull(a=0, size=12), np.zeros(12))
+        assert_raises(ValueError, np.random.weibull, a=-0.)
+
+    def test_zipf(self):
+        np.random.seed(self.seed)
+        actual = np.random.zipf(a=1.23, size=(3, 2))
+        desired = np.array([[66, 29],
+                            [1, 1],
+                            [3, 13]])
+        assert_array_equal(actual, desired)
+
+
+class TestBroadcast:
+    # tests that functions that broadcast behave
+    # correctly when presented with non-scalar arguments
+    def setup_method(self):
+        self.seed = 123456789
+
+    def setSeed(self):
+        np.random.seed(self.seed)
+
+    # TODO: Include test for randint once it can broadcast
+    # Can steal the test written in PR #6938
+
+    def test_uniform(self):
+        low = [0]
+        high = [1]
+        uniform = np.random.uniform
+        desired = np.array([0.53283302478975902,
+                            0.53413660089041659,
+                            0.50955303552646702])
+
+        self.setSeed()
+        actual = uniform(low * 3, high)
+        assert_array_almost_equal(actual, desired, decimal=14)
+
+        self.setSeed()
+        actual = uniform(low, high * 3)
+        assert_array_almost_equal(actual, desired, decimal=14)
+
+    def test_normal(self):
+        loc = [0]
+        scale = [1]
+        bad_scale = [-1]
+        normal = np.random.normal
+        desired = np.array([2.2129019979039612,
+                            2.1283977976520019,
+                            1.8417114045748335])
+
+        self.setSeed()
+        actual = normal(loc * 3, scale)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, normal, loc * 3, bad_scale)
+
+        self.setSeed()
+        actual = normal(loc, scale * 3)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, normal, loc, bad_scale * 3)
+
+    def test_beta(self):
+        a = [1]
+        b = [2]
+        bad_a = [-1]
+        bad_b = [-2]
+        beta = np.random.beta
+        desired = np.array([0.19843558305989056,
+                            0.075230336409423643,
+                            0.24976865978980844])
+
+        self.setSeed()
+        actual = beta(a * 3, b)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, beta, bad_a * 3, b)
+        assert_raises(ValueError, beta, a * 3, bad_b)
+
+        self.setSeed()
+        actual = beta(a, b * 3)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, beta, bad_a, b * 3)
+        assert_raises(ValueError, beta, a, bad_b * 3)
+
+    def test_exponential(self):
+        scale = [1]
+        bad_scale = [-1]
+        exponential = np.random.exponential
+        desired = np.array([0.76106853658845242,
+                            0.76386282278691653,
+                            0.71243813125891797])
+
+        self.setSeed()
+        actual = exponential(scale * 3)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, exponential, bad_scale * 3)
+
+    def test_standard_gamma(self):
+        shape = [1]
+        bad_shape = [-1]
+        std_gamma = np.random.standard_gamma
+        desired = np.array([0.76106853658845242,
+                            0.76386282278691653,
+                            0.71243813125891797])
+
+        self.setSeed()
+        actual = std_gamma(shape * 3)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, std_gamma, bad_shape * 3)
+
+    def test_gamma(self):
+        shape = [1]
+        scale = [2]
+        bad_shape = [-1]
+        bad_scale = [-2]
+        gamma = np.random.gamma
+        desired = np.array([1.5221370731769048,
+                            1.5277256455738331,
+                            1.4248762625178359])
+
+        self.setSeed()
+        actual = gamma(shape * 3, scale)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, gamma, bad_shape * 3, scale)
+        assert_raises(ValueError, gamma, shape * 3, bad_scale)
+
+        self.setSeed()
+        actual = gamma(shape, scale * 3)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, gamma, bad_shape, scale * 3)
+        assert_raises(ValueError, gamma, shape, bad_scale * 3)
+
+    def test_f(self):
+        dfnum = [1]
+        dfden = [2]
+        bad_dfnum = [-1]
+        bad_dfden = [-2]
+        f = np.random.f
+        desired = np.array([0.80038951638264799,
+                            0.86768719635363512,
+                            2.7251095168386801])
+
+        self.setSeed()
+        actual = f(dfnum * 3, dfden)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, f, bad_dfnum * 3, dfden)
+        assert_raises(ValueError, f, dfnum * 3, bad_dfden)
+
+        self.setSeed()
+        actual = f(dfnum, dfden * 3)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, f, bad_dfnum, dfden * 3)
+        assert_raises(ValueError, f, dfnum, bad_dfden * 3)
+
+    def test_noncentral_f(self):
+        dfnum = [2]
+        dfden = [3]
+        nonc = [4]
+        bad_dfnum = [0]
+        bad_dfden = [-1]
+        bad_nonc = [-2]
+        nonc_f = np.random.noncentral_f
+        desired = np.array([9.1393943263705211,
+                            13.025456344595602,
+                            8.8018098359100545])
+
+        self.setSeed()
+        actual = nonc_f(dfnum * 3, dfden, nonc)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, nonc_f, bad_dfnum * 3, dfden, nonc)
+        assert_raises(ValueError, nonc_f, dfnum * 3, bad_dfden, nonc)
+        assert_raises(ValueError, nonc_f, dfnum * 3, dfden, bad_nonc)
+
+        self.setSeed()
+        actual = nonc_f(dfnum, dfden * 3, nonc)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, nonc_f, bad_dfnum, dfden * 3, nonc)
+        assert_raises(ValueError, nonc_f, dfnum, bad_dfden * 3, nonc)
+        assert_raises(ValueError, nonc_f, dfnum, dfden * 3, bad_nonc)
+
+        self.setSeed()
+        actual = nonc_f(dfnum, dfden, nonc * 3)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, nonc_f, bad_dfnum, dfden, nonc * 3)
+        assert_raises(ValueError, nonc_f, dfnum, bad_dfden, nonc * 3)
+        assert_raises(ValueError, nonc_f, dfnum, dfden, bad_nonc * 3)
+
+    def test_noncentral_f_small_df(self):
+        self.setSeed()
+        desired = np.array([6.869638627492048, 0.785880199263955])
+        actual = np.random.noncentral_f(0.9, 0.9, 2, size=2)
+        assert_array_almost_equal(actual, desired, decimal=14)
+
+    def test_chisquare(self):
+        df = [1]
+        bad_df = [-1]
+        chisquare = np.random.chisquare
+        desired = np.array([0.57022801133088286,
+                            0.51947702108840776,
+                            0.1320969254923558])
+
+        self.setSeed()
+        actual = chisquare(df * 3)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, chisquare, bad_df * 3)
+
+    def test_noncentral_chisquare(self):
+        df = [1]
+        nonc = [2]
+        bad_df = [-1]
+        bad_nonc = [-2]
+        nonc_chi = np.random.noncentral_chisquare
+        desired = np.array([9.0015599467913763,
+                            4.5804135049718742,
+                            6.0872302432834564])
+
+        self.setSeed()
+        actual = nonc_chi(df * 3, nonc)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, nonc_chi, bad_df * 3, nonc)
+        assert_raises(ValueError, nonc_chi, df * 3, bad_nonc)
+
+        self.setSeed()
+        actual = nonc_chi(df, nonc * 3)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, nonc_chi, bad_df, nonc * 3)
+        assert_raises(ValueError, nonc_chi, df, bad_nonc * 3)
+
+    def test_standard_t(self):
+        df = [1]
+        bad_df = [-1]
+        t = np.random.standard_t
+        desired = np.array([3.0702872575217643,
+                            5.8560725167361607,
+                            1.0274791436474273])
+
+        self.setSeed()
+        actual = t(df * 3)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, t, bad_df * 3)
+
+    def test_vonmises(self):
+        mu = [2]
+        kappa = [1]
+        bad_kappa = [-1]
+        vonmises = np.random.vonmises
+        desired = np.array([2.9883443664201312,
+                            -2.7064099483995943,
+                            -1.8672476700665914])
+
+        self.setSeed()
+        actual = vonmises(mu * 3, kappa)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, vonmises, mu * 3, bad_kappa)
+
+        self.setSeed()
+        actual = vonmises(mu, kappa * 3)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, vonmises, mu, bad_kappa * 3)
+
+    def test_pareto(self):
+        a = [1]
+        bad_a = [-1]
+        pareto = np.random.pareto
+        desired = np.array([1.1405622680198362,
+                            1.1465519762044529,
+                            1.0389564467453547])
+
+        self.setSeed()
+        actual = pareto(a * 3)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, pareto, bad_a * 3)
+
+    def test_weibull(self):
+        a = [1]
+        bad_a = [-1]
+        weibull = np.random.weibull
+        desired = np.array([0.76106853658845242,
+                            0.76386282278691653,
+                            0.71243813125891797])
+
+        self.setSeed()
+        actual = weibull(a * 3)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, weibull, bad_a * 3)
+
+    def test_power(self):
+        a = [1]
+        bad_a = [-1]
+        power = np.random.power
+        desired = np.array([0.53283302478975902,
+                            0.53413660089041659,
+                            0.50955303552646702])
+
+        self.setSeed()
+        actual = power(a * 3)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, power, bad_a * 3)
+
+    def test_laplace(self):
+        loc = [0]
+        scale = [1]
+        bad_scale = [-1]
+        laplace = np.random.laplace
+        desired = np.array([0.067921356028507157,
+                            0.070715642226971326,
+                            0.019290950698972624])
+
+        self.setSeed()
+        actual = laplace(loc * 3, scale)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, laplace, loc * 3, bad_scale)
+
+        self.setSeed()
+        actual = laplace(loc, scale * 3)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, laplace, loc, bad_scale * 3)
+
+    def test_gumbel(self):
+        loc = [0]
+        scale = [1]
+        bad_scale = [-1]
+        gumbel = np.random.gumbel
+        desired = np.array([0.2730318639556768,
+                            0.26936705726291116,
+                            0.33906220393037939])
+
+        self.setSeed()
+        actual = gumbel(loc * 3, scale)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, gumbel, loc * 3, bad_scale)
+
+        self.setSeed()
+        actual = gumbel(loc, scale * 3)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, gumbel, loc, bad_scale * 3)
+
+    def test_logistic(self):
+        loc = [0]
+        scale = [1]
+        bad_scale = [-1]
+        logistic = np.random.logistic
+        desired = np.array([0.13152135837586171,
+                            0.13675915696285773,
+                            0.038216792802833396])
+
+        self.setSeed()
+        actual = logistic(loc * 3, scale)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, logistic, loc * 3, bad_scale)
+
+        self.setSeed()
+        actual = logistic(loc, scale * 3)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, logistic, loc, bad_scale * 3)
+
+    def test_lognormal(self):
+        mean = [0]
+        sigma = [1]
+        bad_sigma = [-1]
+        lognormal = np.random.lognormal
+        desired = np.array([9.1422086044848427,
+                            8.4013952870126261,
+                            6.3073234116578671])
+
+        self.setSeed()
+        actual = lognormal(mean * 3, sigma)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, lognormal, mean * 3, bad_sigma)
+
+        self.setSeed()
+        actual = lognormal(mean, sigma * 3)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, lognormal, mean, bad_sigma * 3)
+
+    def test_rayleigh(self):
+        scale = [1]
+        bad_scale = [-1]
+        rayleigh = np.random.rayleigh
+        desired = np.array([1.2337491937897689,
+                            1.2360119924878694,
+                            1.1936818095781789])
+
+        self.setSeed()
+        actual = rayleigh(scale * 3)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, rayleigh, bad_scale * 3)
+
+    def test_wald(self):
+        mean = [0.5]
+        scale = [1]
+        bad_mean = [0]
+        bad_scale = [-2]
+        wald = np.random.wald
+        desired = np.array([0.11873681120271318,
+                            0.12450084820795027,
+                            0.9096122728408238])
+
+        self.setSeed()
+        actual = wald(mean * 3, scale)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, wald, bad_mean * 3, scale)
+        assert_raises(ValueError, wald, mean * 3, bad_scale)
+
+        self.setSeed()
+        actual = wald(mean, scale * 3)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, wald, bad_mean, scale * 3)
+        assert_raises(ValueError, wald, mean, bad_scale * 3)
+        assert_raises(ValueError, wald, 0.0, 1)
+        assert_raises(ValueError, wald, 0.5, 0.0)
+
+    def test_triangular(self):
+        left = [1]
+        right = [3]
+        mode = [2]
+        bad_left_one = [3]
+        bad_mode_one = [4]
+        bad_left_two, bad_mode_two = right * 2
+        triangular = np.random.triangular
+        desired = np.array([2.03339048710429,
+                            2.0347400359389356,
+                            2.0095991069536208])
+
+        self.setSeed()
+        actual = triangular(left * 3, mode, right)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, triangular, bad_left_one * 3, mode, right)
+        assert_raises(ValueError, triangular, left * 3, bad_mode_one, right)
+        assert_raises(ValueError, triangular, bad_left_two * 3, bad_mode_two,
+                      right)
+
+        self.setSeed()
+        actual = triangular(left, mode * 3, right)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, triangular, bad_left_one, mode * 3, right)
+        assert_raises(ValueError, triangular, left, bad_mode_one * 3, right)
+        assert_raises(ValueError, triangular, bad_left_two, bad_mode_two * 3,
+                      right)
+
+        self.setSeed()
+        actual = triangular(left, mode, right * 3)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, triangular, bad_left_one, mode, right * 3)
+        assert_raises(ValueError, triangular, left, bad_mode_one, right * 3)
+        assert_raises(ValueError, triangular, bad_left_two, bad_mode_two,
+                      right * 3)
+
+    def test_binomial(self):
+        n = [1]
+        p = [0.5]
+        bad_n = [-1]
+        bad_p_one = [-1]
+        bad_p_two = [1.5]
+        binom = np.random.binomial
+        desired = np.array([1, 1, 1])
+
+        self.setSeed()
+        actual = binom(n * 3, p)
+        assert_array_equal(actual, desired)
+        assert_raises(ValueError, binom, bad_n * 3, p)
+        assert_raises(ValueError, binom, n * 3, bad_p_one)
+        assert_raises(ValueError, binom, n * 3, bad_p_two)
+
+        self.setSeed()
+        actual = binom(n, p * 3)
+        assert_array_equal(actual, desired)
+        assert_raises(ValueError, binom, bad_n, p * 3)
+        assert_raises(ValueError, binom, n, bad_p_one * 3)
+        assert_raises(ValueError, binom, n, bad_p_two * 3)
+
+    def test_negative_binomial(self):
+        n = [1]
+        p = [0.5]
+        bad_n = [-1]
+        bad_p_one = [-1]
+        bad_p_two = [1.5]
+        neg_binom = np.random.negative_binomial
+        desired = np.array([1, 0, 1])
+
+        self.setSeed()
+        actual = neg_binom(n * 3, p)
+        assert_array_equal(actual, desired)
+        assert_raises(ValueError, neg_binom, bad_n * 3, p)
+        assert_raises(ValueError, neg_binom, n * 3, bad_p_one)
+        assert_raises(ValueError, neg_binom, n * 3, bad_p_two)
+
+        self.setSeed()
+        actual = neg_binom(n, p * 3)
+        assert_array_equal(actual, desired)
+        assert_raises(ValueError, neg_binom, bad_n, p * 3)
+        assert_raises(ValueError, neg_binom, n, bad_p_one * 3)
+        assert_raises(ValueError, neg_binom, n, bad_p_two * 3)
+
+    def test_poisson(self):
+        max_lam = np.random.RandomState()._poisson_lam_max
+
+        lam = [1]
+        bad_lam_one = [-1]
+        bad_lam_two = [max_lam * 2]
+        poisson = np.random.poisson
+        desired = np.array([1, 1, 0])
+
+        self.setSeed()
+        actual = poisson(lam * 3)
+        assert_array_equal(actual, desired)
+        assert_raises(ValueError, poisson, bad_lam_one * 3)
+        assert_raises(ValueError, poisson, bad_lam_two * 3)
+
+    def test_zipf(self):
+        a = [2]
+        bad_a = [0]
+        zipf = np.random.zipf
+        desired = np.array([2, 2, 1])
+
+        self.setSeed()
+        actual = zipf(a * 3)
+        assert_array_equal(actual, desired)
+        assert_raises(ValueError, zipf, bad_a * 3)
+        with np.errstate(invalid='ignore'):
+            assert_raises(ValueError, zipf, np.nan)
+            assert_raises(ValueError, zipf, [0, 0, np.nan])
+
+    def test_geometric(self):
+        p = [0.5]
+        bad_p_one = [-1]
+        bad_p_two = [1.5]
+        geom = np.random.geometric
+        desired = np.array([2, 2, 2])
+
+        self.setSeed()
+        actual = geom(p * 3)
+        assert_array_equal(actual, desired)
+        assert_raises(ValueError, geom, bad_p_one * 3)
+        assert_raises(ValueError, geom, bad_p_two * 3)
+
+    def test_hypergeometric(self):
+        ngood = [1]
+        nbad = [2]
+        nsample = [2]
+        bad_ngood = [-1]
+        bad_nbad = [-2]
+        bad_nsample_one = [0]
+        bad_nsample_two = [4]
+        hypergeom = np.random.hypergeometric
+        desired = np.array([1, 1, 1])
+
+        self.setSeed()
+        actual = hypergeom(ngood * 3, nbad, nsample)
+        assert_array_equal(actual, desired)
+        assert_raises(ValueError, hypergeom, bad_ngood * 3, nbad, nsample)
+        assert_raises(ValueError, hypergeom, ngood * 3, bad_nbad, nsample)
+        assert_raises(ValueError, hypergeom, ngood * 3, nbad, bad_nsample_one)
+        assert_raises(ValueError, hypergeom, ngood * 3, nbad, bad_nsample_two)
+
+        self.setSeed()
+        actual = hypergeom(ngood, nbad * 3, nsample)
+        assert_array_equal(actual, desired)
+        assert_raises(ValueError, hypergeom, bad_ngood, nbad * 3, nsample)
+        assert_raises(ValueError, hypergeom, ngood, bad_nbad * 3, nsample)
+        assert_raises(ValueError, hypergeom, ngood, nbad * 3, bad_nsample_one)
+        assert_raises(ValueError, hypergeom, ngood, nbad * 3, bad_nsample_two)
+
+        self.setSeed()
+        actual = hypergeom(ngood, nbad, nsample * 3)
+        assert_array_equal(actual, desired)
+        assert_raises(ValueError, hypergeom, bad_ngood, nbad, nsample * 3)
+        assert_raises(ValueError, hypergeom, ngood, bad_nbad, nsample * 3)
+        assert_raises(ValueError, hypergeom, ngood, nbad, bad_nsample_one * 3)
+        assert_raises(ValueError, hypergeom, ngood, nbad, bad_nsample_two * 3)
+
+    def test_logseries(self):
+        p = [0.5]
+        bad_p_one = [2]
+        bad_p_two = [-1]
+        logseries = np.random.logseries
+        desired = np.array([1, 1, 1])
+
+        self.setSeed()
+        actual = logseries(p * 3)
+        assert_array_equal(actual, desired)
+        assert_raises(ValueError, logseries, bad_p_one * 3)
+        assert_raises(ValueError, logseries, bad_p_two * 3)
+
+
+@pytest.mark.skipif(IS_WASM, reason="can't start thread")
+class TestThread:
+    # make sure each state produces the same sequence even in threads
+    def setup_method(self):
+        self.seeds = range(4)
+
+    def check_function(self, function, sz):
+        from threading import Thread
+
+        out1 = np.empty((len(self.seeds),) + sz)
+        out2 = np.empty((len(self.seeds),) + sz)
+
+        # threaded generation
+        t = [Thread(target=function, args=(np.random.RandomState(s), o))
+             for s, o in zip(self.seeds, out1)]
+        [x.start() for x in t]
+        [x.join() for x in t]
+
+        # the same serial
+        for s, o in zip(self.seeds, out2):
+            function(np.random.RandomState(s), o)
+
+        # these platforms change x87 fpu precision mode in threads
+        if np.intp().dtype.itemsize == 4 and sys.platform == "win32":
+            assert_array_almost_equal(out1, out2)
+        else:
+            assert_array_equal(out1, out2)
+
+    def test_normal(self):
+        def gen_random(state, out):
+            out[...] = state.normal(size=10000)
+        self.check_function(gen_random, sz=(10000,))
+
+    def test_exp(self):
+        def gen_random(state, out):
+            out[...] = state.exponential(scale=np.ones((100, 1000)))
+        self.check_function(gen_random, sz=(100, 1000))
+
+    def test_multinomial(self):
+        def gen_random(state, out):
+            out[...] = state.multinomial(10, [1/6.]*6, size=10000)
+        self.check_function(gen_random, sz=(10000, 6))
+
+
+# See Issue #4263
+class TestSingleEltArrayInput:
+    def setup_method(self):
+        self.argOne = np.array([2])
+        self.argTwo = np.array([3])
+        self.argThree = np.array([4])
+        self.tgtShape = (1,)
+
+    def test_one_arg_funcs(self):
+        funcs = (np.random.exponential, np.random.standard_gamma,
+                 np.random.chisquare, np.random.standard_t,
+                 np.random.pareto, np.random.weibull,
+                 np.random.power, np.random.rayleigh,
+                 np.random.poisson, np.random.zipf,
+                 np.random.geometric, np.random.logseries)
+
+        probfuncs = (np.random.geometric, np.random.logseries)
+
+        for func in funcs:
+            if func in probfuncs:  # p < 1.0
+                out = func(np.array([0.5]))
+
+            else:
+                out = func(self.argOne)
+
+            assert_equal(out.shape, self.tgtShape)
+
+    def test_two_arg_funcs(self):
+        funcs = (np.random.uniform, np.random.normal,
+                 np.random.beta, np.random.gamma,
+                 np.random.f, np.random.noncentral_chisquare,
+                 np.random.vonmises, np.random.laplace,
+                 np.random.gumbel, np.random.logistic,
+                 np.random.lognormal, np.random.wald,
+                 np.random.binomial, np.random.negative_binomial)
+
+        probfuncs = (np.random.binomial, np.random.negative_binomial)
+
+        for func in funcs:
+            if func in probfuncs:  # p <= 1
+                argTwo = np.array([0.5])
+
+            else:
+                argTwo = self.argTwo
+
+            out = func(self.argOne, argTwo)
+            assert_equal(out.shape, self.tgtShape)
+
+            out = func(self.argOne[0], argTwo)
+            assert_equal(out.shape, self.tgtShape)
+
+            out = func(self.argOne, argTwo[0])
+            assert_equal(out.shape, self.tgtShape)
+
+    def test_randint(self):
+        itype = [bool, np.int8, np.uint8, np.int16, np.uint16,
+                 np.int32, np.uint32, np.int64, np.uint64]
+        func = np.random.randint
+        high = np.array([1])
+        low = np.array([0])
+
+        for dt in itype:
+            out = func(low, high, dtype=dt)
+            assert_equal(out.shape, self.tgtShape)
+
+            out = func(low[0], high, dtype=dt)
+            assert_equal(out.shape, self.tgtShape)
+
+            out = func(low, high[0], dtype=dt)
+            assert_equal(out.shape, self.tgtShape)
+
+    def test_three_arg_funcs(self):
+        funcs = [np.random.noncentral_f, np.random.triangular,
+                 np.random.hypergeometric]
+
+        for func in funcs:
+            out = func(self.argOne, self.argTwo, self.argThree)
+            assert_equal(out.shape, self.tgtShape)
+
+            out = func(self.argOne[0], self.argTwo, self.argThree)
+            assert_equal(out.shape, self.tgtShape)
+
+            out = func(self.argOne, self.argTwo[0], self.argThree)
+            assert_equal(out.shape, self.tgtShape)
diff --git a/lib/python3.12/site-packages/numpy/random/tests/test_randomstate.py b/lib/python3.12/site-packages/numpy/random/tests/test_randomstate.py
new file mode 100644
index 0000000000000000000000000000000000000000..c77bfce883aea276304c817be9ef93584b59cb28
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/random/tests/test_randomstate.py
@@ -0,0 +1,2121 @@
+import hashlib
+import pickle
+import sys
+import warnings
+
+import numpy as np
+import pytest
+from numpy.testing import (
+        assert_, assert_raises, assert_equal, assert_warns,
+        assert_no_warnings, assert_array_equal, assert_array_almost_equal,
+        suppress_warnings, IS_WASM
+        )
+
+from numpy.random import MT19937, PCG64
+from numpy import random
+
+INT_FUNCS = {'binomial': (100.0, 0.6),
+             'geometric': (.5,),
+             'hypergeometric': (20, 20, 10),
+             'logseries': (.5,),
+             'multinomial': (20, np.ones(6) / 6.0),
+             'negative_binomial': (100, .5),
+             'poisson': (10.0,),
+             'zipf': (2,),
+             }
+
+if np.iinfo(int).max < 2**32:
+    # Windows and some 32-bit platforms, e.g., ARM
+    INT_FUNC_HASHES = {'binomial': '2fbead005fc63942decb5326d36a1f32fe2c9d32c904ee61e46866b88447c263',
+                       'logseries': '23ead5dcde35d4cfd4ef2c105e4c3d43304b45dc1b1444b7823b9ee4fa144ebb',
+                       'geometric': '0d764db64f5c3bad48c8c33551c13b4d07a1e7b470f77629bef6c985cac76fcf',
+                       'hypergeometric': '7b59bf2f1691626c5815cdcd9a49e1dd68697251d4521575219e4d2a1b8b2c67',
+                       'multinomial': 'd754fa5b92943a38ec07630de92362dd2e02c43577fc147417dc5b9db94ccdd3',
+                       'negative_binomial': '8eb216f7cb2a63cf55605422845caaff002fddc64a7dc8b2d45acd477a49e824',
+                       'poisson': '70c891d76104013ebd6f6bcf30d403a9074b886ff62e4e6b8eb605bf1a4673b7',
+                       'zipf': '01f074f97517cd5d21747148ac6ca4074dde7fcb7acbaec0a936606fecacd93f',
+                       }
+else:
+    INT_FUNC_HASHES = {'binomial': '8626dd9d052cb608e93d8868de0a7b347258b199493871a1dc56e2a26cacb112',
+                       'geometric': '8edd53d272e49c4fc8fbbe6c7d08d563d62e482921f3131d0a0e068af30f0db9',
+                       'hypergeometric': '83496cc4281c77b786c9b7ad88b74d42e01603a55c60577ebab81c3ba8d45657',
+                       'logseries': '65878a38747c176bc00e930ebafebb69d4e1e16cd3a704e264ea8f5e24f548db',
+                       'multinomial': '7a984ae6dca26fd25374479e118b22f55db0aedccd5a0f2584ceada33db98605',
+                       'negative_binomial': 'd636d968e6a24ae92ab52fe11c46ac45b0897e98714426764e820a7d77602a61',
+                       'poisson': '956552176f77e7c9cb20d0118fc9cf690be488d790ed4b4c4747b965e61b0bb4',
+                       'zipf': 'f84ba7feffda41e606e20b28dfc0f1ea9964a74574513d4a4cbc98433a8bfa45',
+                       }
+
+
+@pytest.fixture(scope='module', params=INT_FUNCS)
+def int_func(request):
+    return (request.param, INT_FUNCS[request.param],
+            INT_FUNC_HASHES[request.param])
+
+
+@pytest.fixture
+def restore_singleton_bitgen():
+    """Ensures that the singleton bitgen is restored after a test"""
+    orig_bitgen = np.random.get_bit_generator()
+    yield
+    np.random.set_bit_generator(orig_bitgen)
+
+
+def assert_mt19937_state_equal(a, b):
+    assert_equal(a['bit_generator'], b['bit_generator'])
+    assert_array_equal(a['state']['key'], b['state']['key'])
+    assert_array_equal(a['state']['pos'], b['state']['pos'])
+    assert_equal(a['has_gauss'], b['has_gauss'])
+    assert_equal(a['gauss'], b['gauss'])
+
+
+class TestSeed:
+    def test_scalar(self):
+        s = random.RandomState(0)
+        assert_equal(s.randint(1000), 684)
+        s = random.RandomState(4294967295)
+        assert_equal(s.randint(1000), 419)
+
+    def test_array(self):
+        s = random.RandomState(range(10))
+        assert_equal(s.randint(1000), 468)
+        s = random.RandomState(np.arange(10))
+        assert_equal(s.randint(1000), 468)
+        s = random.RandomState([0])
+        assert_equal(s.randint(1000), 973)
+        s = random.RandomState([4294967295])
+        assert_equal(s.randint(1000), 265)
+
+    def test_invalid_scalar(self):
+        # seed must be an unsigned 32 bit integer
+        assert_raises(TypeError, random.RandomState, -0.5)
+        assert_raises(ValueError, random.RandomState, -1)
+
+    def test_invalid_array(self):
+        # seed must be an unsigned 32 bit integer
+        assert_raises(TypeError, random.RandomState, [-0.5])
+        assert_raises(ValueError, random.RandomState, [-1])
+        assert_raises(ValueError, random.RandomState, [4294967296])
+        assert_raises(ValueError, random.RandomState, [1, 2, 4294967296])
+        assert_raises(ValueError, random.RandomState, [1, -2, 4294967296])
+
+    def test_invalid_array_shape(self):
+        # gh-9832
+        assert_raises(ValueError, random.RandomState, np.array([],
+                                                               dtype=np.int64))
+        assert_raises(ValueError, random.RandomState, [[1, 2, 3]])
+        assert_raises(ValueError, random.RandomState, [[1, 2, 3],
+                                                       [4, 5, 6]])
+
+    def test_cannot_seed(self):
+        rs = random.RandomState(PCG64(0))
+        with assert_raises(TypeError):
+            rs.seed(1234)
+
+    def test_invalid_initialization(self):
+        assert_raises(ValueError, random.RandomState, MT19937)
+
+
+class TestBinomial:
+    def test_n_zero(self):
+        # Tests the corner case of n == 0 for the binomial distribution.
+        # binomial(0, p) should be zero for any p in [0, 1].
+        # This test addresses issue #3480.
+        zeros = np.zeros(2, dtype='int')
+        for p in [0, .5, 1]:
+            assert_(random.binomial(0, p) == 0)
+            assert_array_equal(random.binomial(zeros, p), zeros)
+
+    def test_p_is_nan(self):
+        # Issue #4571.
+        assert_raises(ValueError, random.binomial, 1, np.nan)
+
+
+class TestMultinomial:
+    def test_basic(self):
+        random.multinomial(100, [0.2, 0.8])
+
+    def test_zero_probability(self):
+        random.multinomial(100, [0.2, 0.8, 0.0, 0.0, 0.0])
+
+    def test_int_negative_interval(self):
+        assert_(-5 <= random.randint(-5, -1) < -1)
+        x = random.randint(-5, -1, 5)
+        assert_(np.all(-5 <= x))
+        assert_(np.all(x < -1))
+
+    def test_size(self):
+        # gh-3173
+        p = [0.5, 0.5]
+        assert_equal(random.multinomial(1, p, np.uint32(1)).shape, (1, 2))
+        assert_equal(random.multinomial(1, p, np.uint32(1)).shape, (1, 2))
+        assert_equal(random.multinomial(1, p, np.uint32(1)).shape, (1, 2))
+        assert_equal(random.multinomial(1, p, [2, 2]).shape, (2, 2, 2))
+        assert_equal(random.multinomial(1, p, (2, 2)).shape, (2, 2, 2))
+        assert_equal(random.multinomial(1, p, np.array((2, 2))).shape,
+                     (2, 2, 2))
+
+        assert_raises(TypeError, random.multinomial, 1, p,
+                      float(1))
+
+    def test_invalid_prob(self):
+        assert_raises(ValueError, random.multinomial, 100, [1.1, 0.2])
+        assert_raises(ValueError, random.multinomial, 100, [-.1, 0.9])
+
+    def test_invalid_n(self):
+        assert_raises(ValueError, random.multinomial, -1, [0.8, 0.2])
+
+    def test_p_non_contiguous(self):
+        p = np.arange(15.)
+        p /= np.sum(p[1::3])
+        pvals = p[1::3]
+        random.seed(1432985819)
+        non_contig = random.multinomial(100, pvals=pvals)
+        random.seed(1432985819)
+        contig = random.multinomial(100, pvals=np.ascontiguousarray(pvals))
+        assert_array_equal(non_contig, contig)
+
+    def test_multinomial_pvals_float32(self):
+        x = np.array([9.9e-01, 9.9e-01, 1.0e-09, 1.0e-09, 1.0e-09, 1.0e-09,
+                      1.0e-09, 1.0e-09, 1.0e-09, 1.0e-09], dtype=np.float32)
+        pvals = x / x.sum()
+        match = r"[\w\s]*pvals array is cast to 64-bit floating"
+        with pytest.raises(ValueError, match=match):
+            random.multinomial(1, pvals)
+
+    def test_multinomial_n_float(self):
+        # Non-index integer types should gracefully truncate floats
+        random.multinomial(100.5, [0.2, 0.8])
+
+class TestSetState:
+    def setup_method(self):
+        self.seed = 1234567890
+        self.random_state = random.RandomState(self.seed)
+        self.state = self.random_state.get_state()
+
+    def test_basic(self):
+        old = self.random_state.tomaxint(16)
+        self.random_state.set_state(self.state)
+        new = self.random_state.tomaxint(16)
+        assert_(np.all(old == new))
+
+    def test_gaussian_reset(self):
+        # Make sure the cached every-other-Gaussian is reset.
+        old = self.random_state.standard_normal(size=3)
+        self.random_state.set_state(self.state)
+        new = self.random_state.standard_normal(size=3)
+        assert_(np.all(old == new))
+
+    def test_gaussian_reset_in_media_res(self):
+        # When the state is saved with a cached Gaussian, make sure the
+        # cached Gaussian is restored.
+
+        self.random_state.standard_normal()
+        state = self.random_state.get_state()
+        old = self.random_state.standard_normal(size=3)
+        self.random_state.set_state(state)
+        new = self.random_state.standard_normal(size=3)
+        assert_(np.all(old == new))
+
+    def test_backwards_compatibility(self):
+        # Make sure we can accept old state tuples that do not have the
+        # cached Gaussian value.
+        old_state = self.state[:-2]
+        x1 = self.random_state.standard_normal(size=16)
+        self.random_state.set_state(old_state)
+        x2 = self.random_state.standard_normal(size=16)
+        self.random_state.set_state(self.state)
+        x3 = self.random_state.standard_normal(size=16)
+        assert_(np.all(x1 == x2))
+        assert_(np.all(x1 == x3))
+
+    def test_negative_binomial(self):
+        # Ensure that the negative binomial results take floating point
+        # arguments without truncation.
+        self.random_state.negative_binomial(0.5, 0.5)
+
+    def test_get_state_warning(self):
+        rs = random.RandomState(PCG64())
+        with suppress_warnings() as sup:
+            w = sup.record(RuntimeWarning)
+            state = rs.get_state()
+            assert_(len(w) == 1)
+            assert isinstance(state, dict)
+            assert state['bit_generator'] == 'PCG64'
+
+    def test_invalid_legacy_state_setting(self):
+        state = self.random_state.get_state()
+        new_state = ('Unknown', ) + state[1:]
+        assert_raises(ValueError, self.random_state.set_state, new_state)
+        assert_raises(TypeError, self.random_state.set_state,
+                      np.array(new_state, dtype=object))
+        state = self.random_state.get_state(legacy=False)
+        del state['bit_generator']
+        assert_raises(ValueError, self.random_state.set_state, state)
+
+    def test_pickle(self):
+        self.random_state.seed(0)
+        self.random_state.random_sample(100)
+        self.random_state.standard_normal()
+        pickled = self.random_state.get_state(legacy=False)
+        assert_equal(pickled['has_gauss'], 1)
+        rs_unpick = pickle.loads(pickle.dumps(self.random_state))
+        unpickled = rs_unpick.get_state(legacy=False)
+        assert_mt19937_state_equal(pickled, unpickled)
+
+    def test_state_setting(self):
+        attr_state = self.random_state.__getstate__()
+        self.random_state.standard_normal()
+        self.random_state.__setstate__(attr_state)
+        state = self.random_state.get_state(legacy=False)
+        assert_mt19937_state_equal(attr_state, state)
+
+    def test_repr(self):
+        assert repr(self.random_state).startswith('RandomState(MT19937)')
+
+
+class TestRandint:
+
+    rfunc = random.randint
+
+    # valid integer/boolean types
+    itype = [np.bool_, np.int8, np.uint8, np.int16, np.uint16,
+             np.int32, np.uint32, np.int64, np.uint64]
+
+    def test_unsupported_type(self):
+        assert_raises(TypeError, self.rfunc, 1, dtype=float)
+
+    def test_bounds_checking(self):
+        for dt in self.itype:
+            lbnd = 0 if dt is np.bool_ else np.iinfo(dt).min
+            ubnd = 2 if dt is np.bool_ else np.iinfo(dt).max + 1
+            assert_raises(ValueError, self.rfunc, lbnd - 1, ubnd, dtype=dt)
+            assert_raises(ValueError, self.rfunc, lbnd, ubnd + 1, dtype=dt)
+            assert_raises(ValueError, self.rfunc, ubnd, lbnd, dtype=dt)
+            assert_raises(ValueError, self.rfunc, 1, 0, dtype=dt)
+
+    def test_rng_zero_and_extremes(self):
+        for dt in self.itype:
+            lbnd = 0 if dt is np.bool_ else np.iinfo(dt).min
+            ubnd = 2 if dt is np.bool_ else np.iinfo(dt).max + 1
+
+            tgt = ubnd - 1
+            assert_equal(self.rfunc(tgt, tgt + 1, size=1000, dtype=dt), tgt)
+
+            tgt = lbnd
+            assert_equal(self.rfunc(tgt, tgt + 1, size=1000, dtype=dt), tgt)
+
+            tgt = (lbnd + ubnd)//2
+            assert_equal(self.rfunc(tgt, tgt + 1, size=1000, dtype=dt), tgt)
+
+    def test_full_range(self):
+        # Test for ticket #1690
+
+        for dt in self.itype:
+            lbnd = 0 if dt is np.bool_ else np.iinfo(dt).min
+            ubnd = 2 if dt is np.bool_ else np.iinfo(dt).max + 1
+
+            try:
+                self.rfunc(lbnd, ubnd, dtype=dt)
+            except Exception as e:
+                raise AssertionError("No error should have been raised, "
+                                     "but one was with the following "
+                                     "message:\n\n%s" % str(e))
+
+    def test_in_bounds_fuzz(self):
+        # Don't use fixed seed
+        random.seed()
+
+        for dt in self.itype[1:]:
+            for ubnd in [4, 8, 16]:
+                vals = self.rfunc(2, ubnd, size=2**16, dtype=dt)
+                assert_(vals.max() < ubnd)
+                assert_(vals.min() >= 2)
+
+        vals = self.rfunc(0, 2, size=2**16, dtype=np.bool_)
+
+        assert_(vals.max() < 2)
+        assert_(vals.min() >= 0)
+
+    def test_repeatability(self):
+        # We use a sha256 hash of generated sequences of 1000 samples
+        # in the range [0, 6) for all but bool, where the range
+        # is [0, 2). Hashes are for little endian numbers.
+        tgt = {'bool': '509aea74d792fb931784c4b0135392c65aec64beee12b0cc167548a2c3d31e71',
+               'int16': '7b07f1a920e46f6d0fe02314155a2330bcfd7635e708da50e536c5ebb631a7d4',
+               'int32': 'e577bfed6c935de944424667e3da285012e741892dcb7051a8f1ce68ab05c92f',
+               'int64': '0fbead0b06759df2cfb55e43148822d4a1ff953c7eb19a5b08445a63bb64fa9e',
+               'int8': '001aac3a5acb935a9b186cbe14a1ca064b8bb2dd0b045d48abeacf74d0203404',
+               'uint16': '7b07f1a920e46f6d0fe02314155a2330bcfd7635e708da50e536c5ebb631a7d4',
+               'uint32': 'e577bfed6c935de944424667e3da285012e741892dcb7051a8f1ce68ab05c92f',
+               'uint64': '0fbead0b06759df2cfb55e43148822d4a1ff953c7eb19a5b08445a63bb64fa9e',
+               'uint8': '001aac3a5acb935a9b186cbe14a1ca064b8bb2dd0b045d48abeacf74d0203404'}
+
+        for dt in self.itype[1:]:
+            random.seed(1234)
+
+            # view as little endian for hash
+            if sys.byteorder == 'little':
+                val = self.rfunc(0, 6, size=1000, dtype=dt)
+            else:
+                val = self.rfunc(0, 6, size=1000, dtype=dt).byteswap()
+
+            res = hashlib.sha256(val.view(np.int8)).hexdigest()
+            assert_(tgt[np.dtype(dt).name] == res)
+
+        # bools do not depend on endianness
+        random.seed(1234)
+        val = self.rfunc(0, 2, size=1000, dtype=bool).view(np.int8)
+        res = hashlib.sha256(val).hexdigest()
+        assert_(tgt[np.dtype(bool).name] == res)
+
+    @pytest.mark.skipif(np.iinfo('l').max < 2**32,
+                        reason='Cannot test with 32-bit C long')
+    def test_repeatability_32bit_boundary_broadcasting(self):
+        desired = np.array([[[3992670689, 2438360420, 2557845020],
+                             [4107320065, 4142558326, 3216529513],
+                             [1605979228, 2807061240,  665605495]],
+                            [[3211410639, 4128781000,  457175120],
+                             [1712592594, 1282922662, 3081439808],
+                             [3997822960, 2008322436, 1563495165]],
+                            [[1398375547, 4269260146,  115316740],
+                             [3414372578, 3437564012, 2112038651],
+                             [3572980305, 2260248732, 3908238631]],
+                            [[2561372503,  223155946, 3127879445],
+                             [ 441282060, 3514786552, 2148440361],
+                             [1629275283, 3479737011, 3003195987]],
+                            [[ 412181688,  940383289, 3047321305],
+                             [2978368172,  764731833, 2282559898],
+                             [ 105711276,  720447391, 3596512484]]])
+        for size in [None, (5, 3, 3)]:
+            random.seed(12345)
+            x = self.rfunc([[-1], [0], [1]], [2**32 - 1, 2**32, 2**32 + 1],
+                           size=size)
+            assert_array_equal(x, desired if size is not None else desired[0])
+
+    def test_int64_uint64_corner_case(self):
+        # When stored in Numpy arrays, `lbnd` is casted
+        # as np.int64, and `ubnd` is casted as np.uint64.
+        # Checking whether `lbnd` >= `ubnd` used to be
+        # done solely via direct comparison, which is incorrect
+        # because when Numpy tries to compare both numbers,
+        # it casts both to np.float64 because there is
+        # no integer superset of np.int64 and np.uint64. However,
+        # `ubnd` is too large to be represented in np.float64,
+        # causing it be round down to np.iinfo(np.int64).max,
+        # leading to a ValueError because `lbnd` now equals
+        # the new `ubnd`.
+
+        dt = np.int64
+        tgt = np.iinfo(np.int64).max
+        lbnd = np.int64(np.iinfo(np.int64).max)
+        ubnd = np.uint64(np.iinfo(np.int64).max + 1)
+
+        # None of these function calls should
+        # generate a ValueError now.
+        actual = random.randint(lbnd, ubnd, dtype=dt)
+        assert_equal(actual, tgt)
+
+    def test_respect_dtype_singleton(self):
+        # See gh-7203
+        for dt in self.itype:
+            lbnd = 0 if dt is np.bool_ else np.iinfo(dt).min
+            ubnd = 2 if dt is np.bool_ else np.iinfo(dt).max + 1
+
+            sample = self.rfunc(lbnd, ubnd, dtype=dt)
+            assert_equal(sample.dtype, np.dtype(dt))
+
+        for dt in (bool, int):
+            lbnd = 0 if dt is bool else np.iinfo(dt).min
+            ubnd = 2 if dt is bool else np.iinfo(dt).max + 1
+
+            # gh-7284: Ensure that we get Python data types
+            sample = self.rfunc(lbnd, ubnd, dtype=dt)
+            assert_(not hasattr(sample, 'dtype'))
+            assert_equal(type(sample), dt)
+
+
+class TestRandomDist:
+    # Make sure the random distribution returns the correct value for a
+    # given seed
+
+    def setup_method(self):
+        self.seed = 1234567890
+
+    def test_rand(self):
+        random.seed(self.seed)
+        actual = random.rand(3, 2)
+        desired = np.array([[0.61879477158567997, 0.59162362775974664],
+                            [0.88868358904449662, 0.89165480011560816],
+                            [0.4575674820298663, 0.7781880808593471]])
+        assert_array_almost_equal(actual, desired, decimal=15)
+
+    def test_rand_singleton(self):
+        random.seed(self.seed)
+        actual = random.rand()
+        desired = 0.61879477158567997
+        assert_array_almost_equal(actual, desired, decimal=15)
+
+    def test_randn(self):
+        random.seed(self.seed)
+        actual = random.randn(3, 2)
+        desired = np.array([[1.34016345771863121, 1.73759122771936081],
+                           [1.498988344300628, -0.2286433324536169],
+                           [2.031033998682787, 2.17032494605655257]])
+        assert_array_almost_equal(actual, desired, decimal=15)
+
+        random.seed(self.seed)
+        actual = random.randn()
+        assert_array_almost_equal(actual, desired[0, 0], decimal=15)
+
+    def test_randint(self):
+        random.seed(self.seed)
+        actual = random.randint(-99, 99, size=(3, 2))
+        desired = np.array([[31, 3],
+                            [-52, 41],
+                            [-48, -66]])
+        assert_array_equal(actual, desired)
+
+    def test_random_integers(self):
+        random.seed(self.seed)
+        with suppress_warnings() as sup:
+            w = sup.record(DeprecationWarning)
+            actual = random.random_integers(-99, 99, size=(3, 2))
+            assert_(len(w) == 1)
+        desired = np.array([[31, 3],
+                            [-52, 41],
+                            [-48, -66]])
+        assert_array_equal(actual, desired)
+
+        random.seed(self.seed)
+        with suppress_warnings() as sup:
+            w = sup.record(DeprecationWarning)
+            actual = random.random_integers(198, size=(3, 2))
+            assert_(len(w) == 1)
+        assert_array_equal(actual, desired + 100)
+
+    def test_tomaxint(self):
+        random.seed(self.seed)
+        rs = random.RandomState(self.seed)
+        actual = rs.tomaxint(size=(3, 2))
+        if np.iinfo(int).max == 2147483647:
+            desired = np.array([[1328851649,  731237375],
+                                [1270502067,  320041495],
+                                [1908433478,  499156889]], dtype=np.int64)
+        else:
+            desired = np.array([[5707374374421908479, 5456764827585442327],
+                                [8196659375100692377, 8224063923314595285],
+                                [4220315081820346526, 7177518203184491332]],
+                               dtype=np.int64)
+
+        assert_equal(actual, desired)
+
+        rs.seed(self.seed)
+        actual = rs.tomaxint()
+        assert_equal(actual, desired[0, 0])
+
+    def test_random_integers_max_int(self):
+        # Tests whether random_integers can generate the
+        # maximum allowed Python int that can be converted
+        # into a C long. Previous implementations of this
+        # method have thrown an OverflowError when attempting
+        # to generate this integer.
+        with suppress_warnings() as sup:
+            w = sup.record(DeprecationWarning)
+            actual = random.random_integers(np.iinfo('l').max,
+                                            np.iinfo('l').max)
+            assert_(len(w) == 1)
+
+        desired = np.iinfo('l').max
+        assert_equal(actual, desired)
+        with suppress_warnings() as sup:
+            w = sup.record(DeprecationWarning)
+            typer = np.dtype('l').type
+            actual = random.random_integers(typer(np.iinfo('l').max),
+                                            typer(np.iinfo('l').max))
+            assert_(len(w) == 1)
+        assert_equal(actual, desired)
+
+    def test_random_integers_deprecated(self):
+        with warnings.catch_warnings():
+            warnings.simplefilter("error", DeprecationWarning)
+
+            # DeprecationWarning raised with high == None
+            assert_raises(DeprecationWarning,
+                          random.random_integers,
+                          np.iinfo('l').max)
+
+            # DeprecationWarning raised with high != None
+            assert_raises(DeprecationWarning,
+                          random.random_integers,
+                          np.iinfo('l').max, np.iinfo('l').max)
+
+    def test_random_sample(self):
+        random.seed(self.seed)
+        actual = random.random_sample((3, 2))
+        desired = np.array([[0.61879477158567997, 0.59162362775974664],
+                            [0.88868358904449662, 0.89165480011560816],
+                            [0.4575674820298663, 0.7781880808593471]])
+        assert_array_almost_equal(actual, desired, decimal=15)
+
+        random.seed(self.seed)
+        actual = random.random_sample()
+        assert_array_almost_equal(actual, desired[0, 0], decimal=15)
+
+    def test_choice_uniform_replace(self):
+        random.seed(self.seed)
+        actual = random.choice(4, 4)
+        desired = np.array([2, 3, 2, 3])
+        assert_array_equal(actual, desired)
+
+    def test_choice_nonuniform_replace(self):
+        random.seed(self.seed)
+        actual = random.choice(4, 4, p=[0.4, 0.4, 0.1, 0.1])
+        desired = np.array([1, 1, 2, 2])
+        assert_array_equal(actual, desired)
+
+    def test_choice_uniform_noreplace(self):
+        random.seed(self.seed)
+        actual = random.choice(4, 3, replace=False)
+        desired = np.array([0, 1, 3])
+        assert_array_equal(actual, desired)
+
+    def test_choice_nonuniform_noreplace(self):
+        random.seed(self.seed)
+        actual = random.choice(4, 3, replace=False, p=[0.1, 0.3, 0.5, 0.1])
+        desired = np.array([2, 3, 1])
+        assert_array_equal(actual, desired)
+
+    def test_choice_noninteger(self):
+        random.seed(self.seed)
+        actual = random.choice(['a', 'b', 'c', 'd'], 4)
+        desired = np.array(['c', 'd', 'c', 'd'])
+        assert_array_equal(actual, desired)
+
+    def test_choice_exceptions(self):
+        sample = random.choice
+        assert_raises(ValueError, sample, -1, 3)
+        assert_raises(ValueError, sample, 3., 3)
+        assert_raises(ValueError, sample, [[1, 2], [3, 4]], 3)
+        assert_raises(ValueError, sample, [], 3)
+        assert_raises(ValueError, sample, [1, 2, 3, 4], 3,
+                      p=[[0.25, 0.25], [0.25, 0.25]])
+        assert_raises(ValueError, sample, [1, 2], 3, p=[0.4, 0.4, 0.2])
+        assert_raises(ValueError, sample, [1, 2], 3, p=[1.1, -0.1])
+        assert_raises(ValueError, sample, [1, 2], 3, p=[0.4, 0.4])
+        assert_raises(ValueError, sample, [1, 2, 3], 4, replace=False)
+        # gh-13087
+        assert_raises(ValueError, sample, [1, 2, 3], -2, replace=False)
+        assert_raises(ValueError, sample, [1, 2, 3], (-1,), replace=False)
+        assert_raises(ValueError, sample, [1, 2, 3], (-1, 1), replace=False)
+        assert_raises(ValueError, sample, [1, 2, 3], 2,
+                      replace=False, p=[1, 0, 0])
+
+    def test_choice_return_shape(self):
+        p = [0.1, 0.9]
+        # Check scalar
+        assert_(np.isscalar(random.choice(2, replace=True)))
+        assert_(np.isscalar(random.choice(2, replace=False)))
+        assert_(np.isscalar(random.choice(2, replace=True, p=p)))
+        assert_(np.isscalar(random.choice(2, replace=False, p=p)))
+        assert_(np.isscalar(random.choice([1, 2], replace=True)))
+        assert_(random.choice([None], replace=True) is None)
+        a = np.array([1, 2])
+        arr = np.empty(1, dtype=object)
+        arr[0] = a
+        assert_(random.choice(arr, replace=True) is a)
+
+        # Check 0-d array
+        s = tuple()
+        assert_(not np.isscalar(random.choice(2, s, replace=True)))
+        assert_(not np.isscalar(random.choice(2, s, replace=False)))
+        assert_(not np.isscalar(random.choice(2, s, replace=True, p=p)))
+        assert_(not np.isscalar(random.choice(2, s, replace=False, p=p)))
+        assert_(not np.isscalar(random.choice([1, 2], s, replace=True)))
+        assert_(random.choice([None], s, replace=True).ndim == 0)
+        a = np.array([1, 2])
+        arr = np.empty(1, dtype=object)
+        arr[0] = a
+        assert_(random.choice(arr, s, replace=True).item() is a)
+
+        # Check multi dimensional array
+        s = (2, 3)
+        p = [0.1, 0.1, 0.1, 0.1, 0.4, 0.2]
+        assert_equal(random.choice(6, s, replace=True).shape, s)
+        assert_equal(random.choice(6, s, replace=False).shape, s)
+        assert_equal(random.choice(6, s, replace=True, p=p).shape, s)
+        assert_equal(random.choice(6, s, replace=False, p=p).shape, s)
+        assert_equal(random.choice(np.arange(6), s, replace=True).shape, s)
+
+        # Check zero-size
+        assert_equal(random.randint(0, 0, size=(3, 0, 4)).shape, (3, 0, 4))
+        assert_equal(random.randint(0, -10, size=0).shape, (0,))
+        assert_equal(random.randint(10, 10, size=0).shape, (0,))
+        assert_equal(random.choice(0, size=0).shape, (0,))
+        assert_equal(random.choice([], size=(0,)).shape, (0,))
+        assert_equal(random.choice(['a', 'b'], size=(3, 0, 4)).shape,
+                     (3, 0, 4))
+        assert_raises(ValueError, random.choice, [], 10)
+
+    def test_choice_nan_probabilities(self):
+        a = np.array([42, 1, 2])
+        p = [None, None, None]
+        assert_raises(ValueError, random.choice, a, p=p)
+
+    def test_choice_p_non_contiguous(self):
+        p = np.ones(10) / 5
+        p[1::2] = 3.0
+        random.seed(self.seed)
+        non_contig = random.choice(5, 3, p=p[::2])
+        random.seed(self.seed)
+        contig = random.choice(5, 3, p=np.ascontiguousarray(p[::2]))
+        assert_array_equal(non_contig, contig)
+
+    def test_bytes(self):
+        random.seed(self.seed)
+        actual = random.bytes(10)
+        desired = b'\x82Ui\x9e\xff\x97+Wf\xa5'
+        assert_equal(actual, desired)
+
+    def test_shuffle(self):
+        # Test lists, arrays (of various dtypes), and multidimensional versions
+        # of both, c-contiguous or not:
+        for conv in [lambda x: np.array([]),
+                     lambda x: x,
+                     lambda x: np.asarray(x).astype(np.int8),
+                     lambda x: np.asarray(x).astype(np.float32),
+                     lambda x: np.asarray(x).astype(np.complex64),
+                     lambda x: np.asarray(x).astype(object),
+                     lambda x: [(i, i) for i in x],
+                     lambda x: np.asarray([[i, i] for i in x]),
+                     lambda x: np.vstack([x, x]).T,
+                     # gh-11442
+                     lambda x: (np.asarray([(i, i) for i in x],
+                                           [("a", int), ("b", int)])
+                                .view(np.recarray)),
+                     # gh-4270
+                     lambda x: np.asarray([(i, i) for i in x],
+                                          [("a", object, (1,)),
+                                           ("b", np.int32, (1,))])]:
+            random.seed(self.seed)
+            alist = conv([1, 2, 3, 4, 5, 6, 7, 8, 9, 0])
+            random.shuffle(alist)
+            actual = alist
+            desired = conv([0, 1, 9, 6, 2, 4, 5, 8, 7, 3])
+            assert_array_equal(actual, desired)
+
+    def test_shuffle_masked(self):
+        # gh-3263
+        a = np.ma.masked_values(np.reshape(range(20), (5, 4)) % 3 - 1, -1)
+        b = np.ma.masked_values(np.arange(20) % 3 - 1, -1)
+        a_orig = a.copy()
+        b_orig = b.copy()
+        for i in range(50):
+            random.shuffle(a)
+            assert_equal(
+                sorted(a.data[~a.mask]), sorted(a_orig.data[~a_orig.mask]))
+            random.shuffle(b)
+            assert_equal(
+                sorted(b.data[~b.mask]), sorted(b_orig.data[~b_orig.mask]))
+
+        def test_shuffle_invalid_objects(self):
+            x = np.array(3)
+            assert_raises(TypeError, random.shuffle, x)
+
+    def test_permutation(self):
+        random.seed(self.seed)
+        alist = [1, 2, 3, 4, 5, 6, 7, 8, 9, 0]
+        actual = random.permutation(alist)
+        desired = [0, 1, 9, 6, 2, 4, 5, 8, 7, 3]
+        assert_array_equal(actual, desired)
+
+        random.seed(self.seed)
+        arr_2d = np.atleast_2d([1, 2, 3, 4, 5, 6, 7, 8, 9, 0]).T
+        actual = random.permutation(arr_2d)
+        assert_array_equal(actual, np.atleast_2d(desired).T)
+
+        random.seed(self.seed)
+        bad_x_str = "abcd"
+        assert_raises(IndexError, random.permutation, bad_x_str)
+
+        random.seed(self.seed)
+        bad_x_float = 1.2
+        assert_raises(IndexError, random.permutation, bad_x_float)
+
+        integer_val = 10
+        desired = [9, 0, 8, 5, 1, 3, 4, 7, 6, 2]
+
+        random.seed(self.seed)
+        actual = random.permutation(integer_val)
+        assert_array_equal(actual, desired)
+
+    def test_beta(self):
+        random.seed(self.seed)
+        actual = random.beta(.1, .9, size=(3, 2))
+        desired = np.array(
+                [[1.45341850513746058e-02, 5.31297615662868145e-04],
+                 [1.85366619058432324e-06, 4.19214516800110563e-03],
+                 [1.58405155108498093e-04, 1.26252891949397652e-04]])
+        assert_array_almost_equal(actual, desired, decimal=15)
+
+    def test_binomial(self):
+        random.seed(self.seed)
+        actual = random.binomial(100.123, .456, size=(3, 2))
+        desired = np.array([[37, 43],
+                            [42, 48],
+                            [46, 45]])
+        assert_array_equal(actual, desired)
+
+        random.seed(self.seed)
+        actual = random.binomial(100.123, .456)
+        desired = 37
+        assert_array_equal(actual, desired)
+
+    def test_chisquare(self):
+        random.seed(self.seed)
+        actual = random.chisquare(50, size=(3, 2))
+        desired = np.array([[63.87858175501090585, 68.68407748911370447],
+                            [65.77116116901505904, 47.09686762438974483],
+                            [72.3828403199695174, 74.18408615260374006]])
+        assert_array_almost_equal(actual, desired, decimal=13)
+
+    def test_dirichlet(self):
+        random.seed(self.seed)
+        alpha = np.array([51.72840233779265162, 39.74494232180943953])
+        actual = random.dirichlet(alpha, size=(3, 2))
+        desired = np.array([[[0.54539444573611562, 0.45460555426388438],
+                             [0.62345816822039413, 0.37654183177960598]],
+                            [[0.55206000085785778, 0.44793999914214233],
+                             [0.58964023305154301, 0.41035976694845688]],
+                            [[0.59266909280647828, 0.40733090719352177],
+                             [0.56974431743975207, 0.43025568256024799]]])
+        assert_array_almost_equal(actual, desired, decimal=15)
+        bad_alpha = np.array([5.4e-01, -1.0e-16])
+        assert_raises(ValueError, random.dirichlet, bad_alpha)
+
+        random.seed(self.seed)
+        alpha = np.array([51.72840233779265162, 39.74494232180943953])
+        actual = random.dirichlet(alpha)
+        assert_array_almost_equal(actual, desired[0, 0], decimal=15)
+
+    def test_dirichlet_size(self):
+        # gh-3173
+        p = np.array([51.72840233779265162, 39.74494232180943953])
+        assert_equal(random.dirichlet(p, np.uint32(1)).shape, (1, 2))
+        assert_equal(random.dirichlet(p, np.uint32(1)).shape, (1, 2))
+        assert_equal(random.dirichlet(p, np.uint32(1)).shape, (1, 2))
+        assert_equal(random.dirichlet(p, [2, 2]).shape, (2, 2, 2))
+        assert_equal(random.dirichlet(p, (2, 2)).shape, (2, 2, 2))
+        assert_equal(random.dirichlet(p, np.array((2, 2))).shape, (2, 2, 2))
+
+        assert_raises(TypeError, random.dirichlet, p, float(1))
+
+    def test_dirichlet_bad_alpha(self):
+        # gh-2089
+        alpha = np.array([5.4e-01, -1.0e-16])
+        assert_raises(ValueError, random.dirichlet, alpha)
+
+    def test_dirichlet_alpha_non_contiguous(self):
+        a = np.array([51.72840233779265162, -1.0, 39.74494232180943953])
+        alpha = a[::2]
+        random.seed(self.seed)
+        non_contig = random.dirichlet(alpha, size=(3, 2))
+        random.seed(self.seed)
+        contig = random.dirichlet(np.ascontiguousarray(alpha),
+                                  size=(3, 2))
+        assert_array_almost_equal(non_contig, contig)
+
+    def test_exponential(self):
+        random.seed(self.seed)
+        actual = random.exponential(1.1234, size=(3, 2))
+        desired = np.array([[1.08342649775011624, 1.00607889924557314],
+                            [2.46628830085216721, 2.49668106809923884],
+                            [0.68717433461363442, 1.69175666993575979]])
+        assert_array_almost_equal(actual, desired, decimal=15)
+
+    def test_exponential_0(self):
+        assert_equal(random.exponential(scale=0), 0)
+        assert_raises(ValueError, random.exponential, scale=-0.)
+
+    def test_f(self):
+        random.seed(self.seed)
+        actual = random.f(12, 77, size=(3, 2))
+        desired = np.array([[1.21975394418575878, 1.75135759791559775],
+                            [1.44803115017146489, 1.22108959480396262],
+                            [1.02176975757740629, 1.34431827623300415]])
+        assert_array_almost_equal(actual, desired, decimal=15)
+
+    def test_gamma(self):
+        random.seed(self.seed)
+        actual = random.gamma(5, 3, size=(3, 2))
+        desired = np.array([[24.60509188649287182, 28.54993563207210627],
+                            [26.13476110204064184, 12.56988482927716078],
+                            [31.71863275789960568, 33.30143302795922011]])
+        assert_array_almost_equal(actual, desired, decimal=14)
+
+    def test_gamma_0(self):
+        assert_equal(random.gamma(shape=0, scale=0), 0)
+        assert_raises(ValueError, random.gamma, shape=-0., scale=-0.)
+
+    def test_geometric(self):
+        random.seed(self.seed)
+        actual = random.geometric(.123456789, size=(3, 2))
+        desired = np.array([[8, 7],
+                            [17, 17],
+                            [5, 12]])
+        assert_array_equal(actual, desired)
+
+    def test_geometric_exceptions(self):
+        assert_raises(ValueError, random.geometric, 1.1)
+        assert_raises(ValueError, random.geometric, [1.1] * 10)
+        assert_raises(ValueError, random.geometric, -0.1)
+        assert_raises(ValueError, random.geometric, [-0.1] * 10)
+        with suppress_warnings() as sup:
+            sup.record(RuntimeWarning)
+            assert_raises(ValueError, random.geometric, np.nan)
+            assert_raises(ValueError, random.geometric, [np.nan] * 10)
+
+    def test_gumbel(self):
+        random.seed(self.seed)
+        actual = random.gumbel(loc=.123456789, scale=2.0, size=(3, 2))
+        desired = np.array([[0.19591898743416816, 0.34405539668096674],
+                            [-1.4492522252274278, -1.47374816298446865],
+                            [1.10651090478803416, -0.69535848626236174]])
+        assert_array_almost_equal(actual, desired, decimal=15)
+
+    def test_gumbel_0(self):
+        assert_equal(random.gumbel(scale=0), 0)
+        assert_raises(ValueError, random.gumbel, scale=-0.)
+
+    def test_hypergeometric(self):
+        random.seed(self.seed)
+        actual = random.hypergeometric(10.1, 5.5, 14, size=(3, 2))
+        desired = np.array([[10, 10],
+                            [10, 10],
+                            [9, 9]])
+        assert_array_equal(actual, desired)
+
+        # Test nbad = 0
+        actual = random.hypergeometric(5, 0, 3, size=4)
+        desired = np.array([3, 3, 3, 3])
+        assert_array_equal(actual, desired)
+
+        actual = random.hypergeometric(15, 0, 12, size=4)
+        desired = np.array([12, 12, 12, 12])
+        assert_array_equal(actual, desired)
+
+        # Test ngood = 0
+        actual = random.hypergeometric(0, 5, 3, size=4)
+        desired = np.array([0, 0, 0, 0])
+        assert_array_equal(actual, desired)
+
+        actual = random.hypergeometric(0, 15, 12, size=4)
+        desired = np.array([0, 0, 0, 0])
+        assert_array_equal(actual, desired)
+
+    def test_laplace(self):
+        random.seed(self.seed)
+        actual = random.laplace(loc=.123456789, scale=2.0, size=(3, 2))
+        desired = np.array([[0.66599721112760157, 0.52829452552221945],
+                            [3.12791959514407125, 3.18202813572992005],
+                            [-0.05391065675859356, 1.74901336242837324]])
+        assert_array_almost_equal(actual, desired, decimal=15)
+
+    def test_laplace_0(self):
+        assert_equal(random.laplace(scale=0), 0)
+        assert_raises(ValueError, random.laplace, scale=-0.)
+
+    def test_logistic(self):
+        random.seed(self.seed)
+        actual = random.logistic(loc=.123456789, scale=2.0, size=(3, 2))
+        desired = np.array([[1.09232835305011444, 0.8648196662399954],
+                            [4.27818590694950185, 4.33897006346929714],
+                            [-0.21682183359214885, 2.63373365386060332]])
+        assert_array_almost_equal(actual, desired, decimal=15)
+
+    def test_lognormal(self):
+        random.seed(self.seed)
+        actual = random.lognormal(mean=.123456789, sigma=2.0, size=(3, 2))
+        desired = np.array([[16.50698631688883822, 36.54846706092654784],
+                            [22.67886599981281748, 0.71617561058995771],
+                            [65.72798501792723869, 86.84341601437161273]])
+        assert_array_almost_equal(actual, desired, decimal=13)
+
+    def test_lognormal_0(self):
+        assert_equal(random.lognormal(sigma=0), 1)
+        assert_raises(ValueError, random.lognormal, sigma=-0.)
+
+    def test_logseries(self):
+        random.seed(self.seed)
+        actual = random.logseries(p=.923456789, size=(3, 2))
+        desired = np.array([[2, 2],
+                            [6, 17],
+                            [3, 6]])
+        assert_array_equal(actual, desired)
+
+    def test_logseries_zero(self):
+        assert random.logseries(0) == 1
+
+    @pytest.mark.parametrize("value", [np.nextafter(0., -1), 1., np.nan, 5.])
+    def test_logseries_exceptions(self, value):
+        with np.errstate(invalid="ignore"):
+            with pytest.raises(ValueError):
+                random.logseries(value)
+            with pytest.raises(ValueError):
+                # contiguous path:
+                random.logseries(np.array([value] * 10))
+            with pytest.raises(ValueError):
+                # non-contiguous path:
+                random.logseries(np.array([value] * 10)[::2])
+
+    def test_multinomial(self):
+        random.seed(self.seed)
+        actual = random.multinomial(20, [1 / 6.] * 6, size=(3, 2))
+        desired = np.array([[[4, 3, 5, 4, 2, 2],
+                             [5, 2, 8, 2, 2, 1]],
+                            [[3, 4, 3, 6, 0, 4],
+                             [2, 1, 4, 3, 6, 4]],
+                            [[4, 4, 2, 5, 2, 3],
+                             [4, 3, 4, 2, 3, 4]]])
+        assert_array_equal(actual, desired)
+
+    def test_multivariate_normal(self):
+        random.seed(self.seed)
+        mean = (.123456789, 10)
+        cov = [[1, 0], [0, 1]]
+        size = (3, 2)
+        actual = random.multivariate_normal(mean, cov, size)
+        desired = np.array([[[1.463620246718631, 11.73759122771936],
+                             [1.622445133300628, 9.771356667546383]],
+                            [[2.154490787682787, 12.170324946056553],
+                             [1.719909438201865, 9.230548443648306]],
+                            [[0.689515026297799, 9.880729819607714],
+                             [-0.023054015651998, 9.201096623542879]]])
+
+        assert_array_almost_equal(actual, desired, decimal=15)
+
+        # Check for default size, was raising deprecation warning
+        actual = random.multivariate_normal(mean, cov)
+        desired = np.array([0.895289569463708, 9.17180864067987])
+        assert_array_almost_equal(actual, desired, decimal=15)
+
+        # Check that non positive-semidefinite covariance warns with
+        # RuntimeWarning
+        mean = [0, 0]
+        cov = [[1, 2], [2, 1]]
+        assert_warns(RuntimeWarning, random.multivariate_normal, mean, cov)
+
+        # and that it doesn't warn with RuntimeWarning check_valid='ignore'
+        assert_no_warnings(random.multivariate_normal, mean, cov,
+                           check_valid='ignore')
+
+        # and that it raises with RuntimeWarning check_valid='raises'
+        assert_raises(ValueError, random.multivariate_normal, mean, cov,
+                      check_valid='raise')
+
+        cov = np.array([[1, 0.1], [0.1, 1]], dtype=np.float32)
+        with suppress_warnings() as sup:
+            random.multivariate_normal(mean, cov)
+            w = sup.record(RuntimeWarning)
+            assert len(w) == 0
+
+        mu = np.zeros(2)
+        cov = np.eye(2)
+        assert_raises(ValueError, random.multivariate_normal, mean, cov,
+                      check_valid='other')
+        assert_raises(ValueError, random.multivariate_normal,
+                      np.zeros((2, 1, 1)), cov)
+        assert_raises(ValueError, random.multivariate_normal,
+                      mu, np.empty((3, 2)))
+        assert_raises(ValueError, random.multivariate_normal,
+                      mu, np.eye(3))
+
+    def test_negative_binomial(self):
+        random.seed(self.seed)
+        actual = random.negative_binomial(n=100, p=.12345, size=(3, 2))
+        desired = np.array([[848, 841],
+                            [892, 611],
+                            [779, 647]])
+        assert_array_equal(actual, desired)
+
+    def test_negative_binomial_exceptions(self):
+        with suppress_warnings() as sup:
+            sup.record(RuntimeWarning)
+            assert_raises(ValueError, random.negative_binomial, 100, np.nan)
+            assert_raises(ValueError, random.negative_binomial, 100,
+                          [np.nan] * 10)
+
+    def test_noncentral_chisquare(self):
+        random.seed(self.seed)
+        actual = random.noncentral_chisquare(df=5, nonc=5, size=(3, 2))
+        desired = np.array([[23.91905354498517511, 13.35324692733826346],
+                            [31.22452661329736401, 16.60047399466177254],
+                            [5.03461598262724586, 17.94973089023519464]])
+        assert_array_almost_equal(actual, desired, decimal=14)
+
+        actual = random.noncentral_chisquare(df=.5, nonc=.2, size=(3, 2))
+        desired = np.array([[1.47145377828516666,  0.15052899268012659],
+                            [0.00943803056963588,  1.02647251615666169],
+                            [0.332334982684171,  0.15451287602753125]])
+        assert_array_almost_equal(actual, desired, decimal=14)
+
+        random.seed(self.seed)
+        actual = random.noncentral_chisquare(df=5, nonc=0, size=(3, 2))
+        desired = np.array([[9.597154162763948, 11.725484450296079],
+                            [10.413711048138335, 3.694475922923986],
+                            [13.484222138963087, 14.377255424602957]])
+        assert_array_almost_equal(actual, desired, decimal=14)
+
+    def test_noncentral_f(self):
+        random.seed(self.seed)
+        actual = random.noncentral_f(dfnum=5, dfden=2, nonc=1,
+                                     size=(3, 2))
+        desired = np.array([[1.40598099674926669, 0.34207973179285761],
+                            [3.57715069265772545, 7.92632662577829805],
+                            [0.43741599463544162, 1.1774208752428319]])
+        assert_array_almost_equal(actual, desired, decimal=14)
+
+    def test_noncentral_f_nan(self):
+        random.seed(self.seed)
+        actual = random.noncentral_f(dfnum=5, dfden=2, nonc=np.nan)
+        assert np.isnan(actual)
+
+    def test_normal(self):
+        random.seed(self.seed)
+        actual = random.normal(loc=.123456789, scale=2.0, size=(3, 2))
+        desired = np.array([[2.80378370443726244, 3.59863924443872163],
+                            [3.121433477601256, -0.33382987590723379],
+                            [4.18552478636557357, 4.46410668111310471]])
+        assert_array_almost_equal(actual, desired, decimal=15)
+
+    def test_normal_0(self):
+        assert_equal(random.normal(scale=0), 0)
+        assert_raises(ValueError, random.normal, scale=-0.)
+
+    def test_pareto(self):
+        random.seed(self.seed)
+        actual = random.pareto(a=.123456789, size=(3, 2))
+        desired = np.array(
+                [[2.46852460439034849e+03, 1.41286880810518346e+03],
+                 [5.28287797029485181e+07, 6.57720981047328785e+07],
+                 [1.40840323350391515e+02, 1.98390255135251704e+05]])
+        # For some reason on 32-bit x86 Ubuntu 12.10 the [1, 0] entry in this
+        # matrix differs by 24 nulps. Discussion:
+        #   https://mail.python.org/pipermail/numpy-discussion/2012-September/063801.html
+        # Consensus is that this is probably some gcc quirk that affects
+        # rounding but not in any important way, so we just use a looser
+        # tolerance on this test:
+        np.testing.assert_array_almost_equal_nulp(actual, desired, nulp=30)
+
+    def test_poisson(self):
+        random.seed(self.seed)
+        actual = random.poisson(lam=.123456789, size=(3, 2))
+        desired = np.array([[0, 0],
+                            [1, 0],
+                            [0, 0]])
+        assert_array_equal(actual, desired)
+
+    def test_poisson_exceptions(self):
+        lambig = np.iinfo('l').max
+        lamneg = -1
+        assert_raises(ValueError, random.poisson, lamneg)
+        assert_raises(ValueError, random.poisson, [lamneg] * 10)
+        assert_raises(ValueError, random.poisson, lambig)
+        assert_raises(ValueError, random.poisson, [lambig] * 10)
+        with suppress_warnings() as sup:
+            sup.record(RuntimeWarning)
+            assert_raises(ValueError, random.poisson, np.nan)
+            assert_raises(ValueError, random.poisson, [np.nan] * 10)
+
+    def test_power(self):
+        random.seed(self.seed)
+        actual = random.power(a=.123456789, size=(3, 2))
+        desired = np.array([[0.02048932883240791, 0.01424192241128213],
+                            [0.38446073748535298, 0.39499689943484395],
+                            [0.00177699707563439, 0.13115505880863756]])
+        assert_array_almost_equal(actual, desired, decimal=15)
+
+    def test_rayleigh(self):
+        random.seed(self.seed)
+        actual = random.rayleigh(scale=10, size=(3, 2))
+        desired = np.array([[13.8882496494248393, 13.383318339044731],
+                            [20.95413364294492098, 21.08285015800712614],
+                            [11.06066537006854311, 17.35468505778271009]])
+        assert_array_almost_equal(actual, desired, decimal=14)
+
+    def test_rayleigh_0(self):
+        assert_equal(random.rayleigh(scale=0), 0)
+        assert_raises(ValueError, random.rayleigh, scale=-0.)
+
+    def test_standard_cauchy(self):
+        random.seed(self.seed)
+        actual = random.standard_cauchy(size=(3, 2))
+        desired = np.array([[0.77127660196445336, -6.55601161955910605],
+                            [0.93582023391158309, -2.07479293013759447],
+                            [-4.74601644297011926, 0.18338989290760804]])
+        assert_array_almost_equal(actual, desired, decimal=15)
+
+    def test_standard_exponential(self):
+        random.seed(self.seed)
+        actual = random.standard_exponential(size=(3, 2))
+        desired = np.array([[0.96441739162374596, 0.89556604882105506],
+                            [2.1953785836319808, 2.22243285392490542],
+                            [0.6116915921431676, 1.50592546727413201]])
+        assert_array_almost_equal(actual, desired, decimal=15)
+
+    def test_standard_gamma(self):
+        random.seed(self.seed)
+        actual = random.standard_gamma(shape=3, size=(3, 2))
+        desired = np.array([[5.50841531318455058, 6.62953470301903103],
+                            [5.93988484943779227, 2.31044849402133989],
+                            [7.54838614231317084, 8.012756093271868]])
+        assert_array_almost_equal(actual, desired, decimal=14)
+
+    def test_standard_gamma_0(self):
+        assert_equal(random.standard_gamma(shape=0), 0)
+        assert_raises(ValueError, random.standard_gamma, shape=-0.)
+
+    def test_standard_normal(self):
+        random.seed(self.seed)
+        actual = random.standard_normal(size=(3, 2))
+        desired = np.array([[1.34016345771863121, 1.73759122771936081],
+                            [1.498988344300628, -0.2286433324536169],
+                            [2.031033998682787, 2.17032494605655257]])
+        assert_array_almost_equal(actual, desired, decimal=15)
+
+    def test_randn_singleton(self):
+        random.seed(self.seed)
+        actual = random.randn()
+        desired = np.array(1.34016345771863121)
+        assert_array_almost_equal(actual, desired, decimal=15)
+
+    def test_standard_t(self):
+        random.seed(self.seed)
+        actual = random.standard_t(df=10, size=(3, 2))
+        desired = np.array([[0.97140611862659965, -0.08830486548450577],
+                            [1.36311143689505321, -0.55317463909867071],
+                            [-0.18473749069684214, 0.61181537341755321]])
+        assert_array_almost_equal(actual, desired, decimal=15)
+
+    def test_triangular(self):
+        random.seed(self.seed)
+        actual = random.triangular(left=5.12, mode=10.23, right=20.34,
+                                   size=(3, 2))
+        desired = np.array([[12.68117178949215784, 12.4129206149193152],
+                            [16.20131377335158263, 16.25692138747600524],
+                            [11.20400690911820263, 14.4978144835829923]])
+        assert_array_almost_equal(actual, desired, decimal=14)
+
+    def test_uniform(self):
+        random.seed(self.seed)
+        actual = random.uniform(low=1.23, high=10.54, size=(3, 2))
+        desired = np.array([[6.99097932346268003, 6.73801597444323974],
+                            [9.50364421400426274, 9.53130618907631089],
+                            [5.48995325769805476, 8.47493103280052118]])
+        assert_array_almost_equal(actual, desired, decimal=15)
+
+    def test_uniform_range_bounds(self):
+        fmin = np.finfo('float').min
+        fmax = np.finfo('float').max
+
+        func = random.uniform
+        assert_raises(OverflowError, func, -np.inf, 0)
+        assert_raises(OverflowError, func, 0, np.inf)
+        assert_raises(OverflowError, func, fmin, fmax)
+        assert_raises(OverflowError, func, [-np.inf], [0])
+        assert_raises(OverflowError, func, [0], [np.inf])
+
+        # (fmax / 1e17) - fmin is within range, so this should not throw
+        # account for i386 extended precision DBL_MAX / 1e17 + DBL_MAX >
+        # DBL_MAX by increasing fmin a bit
+        random.uniform(low=np.nextafter(fmin, 1), high=fmax / 1e17)
+
+    def test_scalar_exception_propagation(self):
+        # Tests that exceptions are correctly propagated in distributions
+        # when called with objects that throw exceptions when converted to
+        # scalars.
+        #
+        # Regression test for gh: 8865
+
+        class ThrowingFloat(np.ndarray):
+            def __float__(self):
+                raise TypeError
+
+        throwing_float = np.array(1.0).view(ThrowingFloat)
+        assert_raises(TypeError, random.uniform, throwing_float,
+                      throwing_float)
+
+        class ThrowingInteger(np.ndarray):
+            def __int__(self):
+                raise TypeError
+
+        throwing_int = np.array(1).view(ThrowingInteger)
+        assert_raises(TypeError, random.hypergeometric, throwing_int, 1, 1)
+
+    def test_vonmises(self):
+        random.seed(self.seed)
+        actual = random.vonmises(mu=1.23, kappa=1.54, size=(3, 2))
+        desired = np.array([[2.28567572673902042, 2.89163838442285037],
+                            [0.38198375564286025, 2.57638023113890746],
+                            [1.19153771588353052, 1.83509849681825354]])
+        assert_array_almost_equal(actual, desired, decimal=15)
+
+    def test_vonmises_small(self):
+        # check infinite loop, gh-4720
+        random.seed(self.seed)
+        r = random.vonmises(mu=0., kappa=1.1e-8, size=10**6)
+        assert_(np.isfinite(r).all())
+
+    def test_vonmises_large(self):
+        # guard against changes in RandomState when Generator is fixed
+        random.seed(self.seed)
+        actual = random.vonmises(mu=0., kappa=1e7, size=3)
+        desired = np.array([4.634253748521111e-04,
+                            3.558873596114509e-04,
+                            -2.337119622577433e-04])
+        assert_array_almost_equal(actual, desired, decimal=8)
+
+    def test_vonmises_nan(self):
+        random.seed(self.seed)
+        r = random.vonmises(mu=0., kappa=np.nan)
+        assert_(np.isnan(r))
+
+    def test_wald(self):
+        random.seed(self.seed)
+        actual = random.wald(mean=1.23, scale=1.54, size=(3, 2))
+        desired = np.array([[3.82935265715889983, 5.13125249184285526],
+                            [0.35045403618358717, 1.50832396872003538],
+                            [0.24124319895843183, 0.22031101461955038]])
+        assert_array_almost_equal(actual, desired, decimal=14)
+
+    def test_weibull(self):
+        random.seed(self.seed)
+        actual = random.weibull(a=1.23, size=(3, 2))
+        desired = np.array([[0.97097342648766727, 0.91422896443565516],
+                            [1.89517770034962929, 1.91414357960479564],
+                            [0.67057783752390987, 1.39494046635066793]])
+        assert_array_almost_equal(actual, desired, decimal=15)
+
+    def test_weibull_0(self):
+        random.seed(self.seed)
+        assert_equal(random.weibull(a=0, size=12), np.zeros(12))
+        assert_raises(ValueError, random.weibull, a=-0.)
+
+    def test_zipf(self):
+        random.seed(self.seed)
+        actual = random.zipf(a=1.23, size=(3, 2))
+        desired = np.array([[66, 29],
+                            [1, 1],
+                            [3, 13]])
+        assert_array_equal(actual, desired)
+
+
+class TestBroadcast:
+    # tests that functions that broadcast behave
+    # correctly when presented with non-scalar arguments
+    def setup_method(self):
+        self.seed = 123456789
+
+    def set_seed(self):
+        random.seed(self.seed)
+
+    def test_uniform(self):
+        low = [0]
+        high = [1]
+        uniform = random.uniform
+        desired = np.array([0.53283302478975902,
+                            0.53413660089041659,
+                            0.50955303552646702])
+
+        self.set_seed()
+        actual = uniform(low * 3, high)
+        assert_array_almost_equal(actual, desired, decimal=14)
+
+        self.set_seed()
+        actual = uniform(low, high * 3)
+        assert_array_almost_equal(actual, desired, decimal=14)
+
+    def test_normal(self):
+        loc = [0]
+        scale = [1]
+        bad_scale = [-1]
+        normal = random.normal
+        desired = np.array([2.2129019979039612,
+                            2.1283977976520019,
+                            1.8417114045748335])
+
+        self.set_seed()
+        actual = normal(loc * 3, scale)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, normal, loc * 3, bad_scale)
+
+        self.set_seed()
+        actual = normal(loc, scale * 3)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, normal, loc, bad_scale * 3)
+
+    def test_beta(self):
+        a = [1]
+        b = [2]
+        bad_a = [-1]
+        bad_b = [-2]
+        beta = random.beta
+        desired = np.array([0.19843558305989056,
+                            0.075230336409423643,
+                            0.24976865978980844])
+
+        self.set_seed()
+        actual = beta(a * 3, b)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, beta, bad_a * 3, b)
+        assert_raises(ValueError, beta, a * 3, bad_b)
+
+        self.set_seed()
+        actual = beta(a, b * 3)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, beta, bad_a, b * 3)
+        assert_raises(ValueError, beta, a, bad_b * 3)
+
+    def test_exponential(self):
+        scale = [1]
+        bad_scale = [-1]
+        exponential = random.exponential
+        desired = np.array([0.76106853658845242,
+                            0.76386282278691653,
+                            0.71243813125891797])
+
+        self.set_seed()
+        actual = exponential(scale * 3)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, exponential, bad_scale * 3)
+
+    def test_standard_gamma(self):
+        shape = [1]
+        bad_shape = [-1]
+        std_gamma = random.standard_gamma
+        desired = np.array([0.76106853658845242,
+                            0.76386282278691653,
+                            0.71243813125891797])
+
+        self.set_seed()
+        actual = std_gamma(shape * 3)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, std_gamma, bad_shape * 3)
+
+    def test_gamma(self):
+        shape = [1]
+        scale = [2]
+        bad_shape = [-1]
+        bad_scale = [-2]
+        gamma = random.gamma
+        desired = np.array([1.5221370731769048,
+                            1.5277256455738331,
+                            1.4248762625178359])
+
+        self.set_seed()
+        actual = gamma(shape * 3, scale)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, gamma, bad_shape * 3, scale)
+        assert_raises(ValueError, gamma, shape * 3, bad_scale)
+
+        self.set_seed()
+        actual = gamma(shape, scale * 3)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, gamma, bad_shape, scale * 3)
+        assert_raises(ValueError, gamma, shape, bad_scale * 3)
+
+    def test_f(self):
+        dfnum = [1]
+        dfden = [2]
+        bad_dfnum = [-1]
+        bad_dfden = [-2]
+        f = random.f
+        desired = np.array([0.80038951638264799,
+                            0.86768719635363512,
+                            2.7251095168386801])
+
+        self.set_seed()
+        actual = f(dfnum * 3, dfden)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, f, bad_dfnum * 3, dfden)
+        assert_raises(ValueError, f, dfnum * 3, bad_dfden)
+
+        self.set_seed()
+        actual = f(dfnum, dfden * 3)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, f, bad_dfnum, dfden * 3)
+        assert_raises(ValueError, f, dfnum, bad_dfden * 3)
+
+    def test_noncentral_f(self):
+        dfnum = [2]
+        dfden = [3]
+        nonc = [4]
+        bad_dfnum = [0]
+        bad_dfden = [-1]
+        bad_nonc = [-2]
+        nonc_f = random.noncentral_f
+        desired = np.array([9.1393943263705211,
+                            13.025456344595602,
+                            8.8018098359100545])
+
+        self.set_seed()
+        actual = nonc_f(dfnum * 3, dfden, nonc)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert np.all(np.isnan(nonc_f(dfnum, dfden, [np.nan] * 3)))
+
+        assert_raises(ValueError, nonc_f, bad_dfnum * 3, dfden, nonc)
+        assert_raises(ValueError, nonc_f, dfnum * 3, bad_dfden, nonc)
+        assert_raises(ValueError, nonc_f, dfnum * 3, dfden, bad_nonc)
+
+        self.set_seed()
+        actual = nonc_f(dfnum, dfden * 3, nonc)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, nonc_f, bad_dfnum, dfden * 3, nonc)
+        assert_raises(ValueError, nonc_f, dfnum, bad_dfden * 3, nonc)
+        assert_raises(ValueError, nonc_f, dfnum, dfden * 3, bad_nonc)
+
+        self.set_seed()
+        actual = nonc_f(dfnum, dfden, nonc * 3)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, nonc_f, bad_dfnum, dfden, nonc * 3)
+        assert_raises(ValueError, nonc_f, dfnum, bad_dfden, nonc * 3)
+        assert_raises(ValueError, nonc_f, dfnum, dfden, bad_nonc * 3)
+
+    def test_noncentral_f_small_df(self):
+        self.set_seed()
+        desired = np.array([6.869638627492048, 0.785880199263955])
+        actual = random.noncentral_f(0.9, 0.9, 2, size=2)
+        assert_array_almost_equal(actual, desired, decimal=14)
+
+    def test_chisquare(self):
+        df = [1]
+        bad_df = [-1]
+        chisquare = random.chisquare
+        desired = np.array([0.57022801133088286,
+                            0.51947702108840776,
+                            0.1320969254923558])
+
+        self.set_seed()
+        actual = chisquare(df * 3)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, chisquare, bad_df * 3)
+
+    def test_noncentral_chisquare(self):
+        df = [1]
+        nonc = [2]
+        bad_df = [-1]
+        bad_nonc = [-2]
+        nonc_chi = random.noncentral_chisquare
+        desired = np.array([9.0015599467913763,
+                            4.5804135049718742,
+                            6.0872302432834564])
+
+        self.set_seed()
+        actual = nonc_chi(df * 3, nonc)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, nonc_chi, bad_df * 3, nonc)
+        assert_raises(ValueError, nonc_chi, df * 3, bad_nonc)
+
+        self.set_seed()
+        actual = nonc_chi(df, nonc * 3)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, nonc_chi, bad_df, nonc * 3)
+        assert_raises(ValueError, nonc_chi, df, bad_nonc * 3)
+
+    def test_standard_t(self):
+        df = [1]
+        bad_df = [-1]
+        t = random.standard_t
+        desired = np.array([3.0702872575217643,
+                            5.8560725167361607,
+                            1.0274791436474273])
+
+        self.set_seed()
+        actual = t(df * 3)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, t, bad_df * 3)
+        assert_raises(ValueError, random.standard_t, bad_df * 3)
+
+    def test_vonmises(self):
+        mu = [2]
+        kappa = [1]
+        bad_kappa = [-1]
+        vonmises = random.vonmises
+        desired = np.array([2.9883443664201312,
+                            -2.7064099483995943,
+                            -1.8672476700665914])
+
+        self.set_seed()
+        actual = vonmises(mu * 3, kappa)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, vonmises, mu * 3, bad_kappa)
+
+        self.set_seed()
+        actual = vonmises(mu, kappa * 3)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, vonmises, mu, bad_kappa * 3)
+
+    def test_pareto(self):
+        a = [1]
+        bad_a = [-1]
+        pareto = random.pareto
+        desired = np.array([1.1405622680198362,
+                            1.1465519762044529,
+                            1.0389564467453547])
+
+        self.set_seed()
+        actual = pareto(a * 3)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, pareto, bad_a * 3)
+        assert_raises(ValueError, random.pareto, bad_a * 3)
+
+    def test_weibull(self):
+        a = [1]
+        bad_a = [-1]
+        weibull = random.weibull
+        desired = np.array([0.76106853658845242,
+                            0.76386282278691653,
+                            0.71243813125891797])
+
+        self.set_seed()
+        actual = weibull(a * 3)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, weibull, bad_a * 3)
+        assert_raises(ValueError, random.weibull, bad_a * 3)
+
+    def test_power(self):
+        a = [1]
+        bad_a = [-1]
+        power = random.power
+        desired = np.array([0.53283302478975902,
+                            0.53413660089041659,
+                            0.50955303552646702])
+
+        self.set_seed()
+        actual = power(a * 3)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, power, bad_a * 3)
+        assert_raises(ValueError, random.power, bad_a * 3)
+
+    def test_laplace(self):
+        loc = [0]
+        scale = [1]
+        bad_scale = [-1]
+        laplace = random.laplace
+        desired = np.array([0.067921356028507157,
+                            0.070715642226971326,
+                            0.019290950698972624])
+
+        self.set_seed()
+        actual = laplace(loc * 3, scale)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, laplace, loc * 3, bad_scale)
+
+        self.set_seed()
+        actual = laplace(loc, scale * 3)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, laplace, loc, bad_scale * 3)
+
+    def test_gumbel(self):
+        loc = [0]
+        scale = [1]
+        bad_scale = [-1]
+        gumbel = random.gumbel
+        desired = np.array([0.2730318639556768,
+                            0.26936705726291116,
+                            0.33906220393037939])
+
+        self.set_seed()
+        actual = gumbel(loc * 3, scale)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, gumbel, loc * 3, bad_scale)
+
+        self.set_seed()
+        actual = gumbel(loc, scale * 3)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, gumbel, loc, bad_scale * 3)
+
+    def test_logistic(self):
+        loc = [0]
+        scale = [1]
+        bad_scale = [-1]
+        logistic = random.logistic
+        desired = np.array([0.13152135837586171,
+                            0.13675915696285773,
+                            0.038216792802833396])
+
+        self.set_seed()
+        actual = logistic(loc * 3, scale)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, logistic, loc * 3, bad_scale)
+
+        self.set_seed()
+        actual = logistic(loc, scale * 3)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, logistic, loc, bad_scale * 3)
+        assert_equal(random.logistic(1.0, 0.0), 1.0)
+
+    def test_lognormal(self):
+        mean = [0]
+        sigma = [1]
+        bad_sigma = [-1]
+        lognormal = random.lognormal
+        desired = np.array([9.1422086044848427,
+                            8.4013952870126261,
+                            6.3073234116578671])
+
+        self.set_seed()
+        actual = lognormal(mean * 3, sigma)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, lognormal, mean * 3, bad_sigma)
+        assert_raises(ValueError, random.lognormal, mean * 3, bad_sigma)
+
+        self.set_seed()
+        actual = lognormal(mean, sigma * 3)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, lognormal, mean, bad_sigma * 3)
+        assert_raises(ValueError, random.lognormal, mean, bad_sigma * 3)
+
+    def test_rayleigh(self):
+        scale = [1]
+        bad_scale = [-1]
+        rayleigh = random.rayleigh
+        desired = np.array([1.2337491937897689,
+                            1.2360119924878694,
+                            1.1936818095781789])
+
+        self.set_seed()
+        actual = rayleigh(scale * 3)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, rayleigh, bad_scale * 3)
+
+    def test_wald(self):
+        mean = [0.5]
+        scale = [1]
+        bad_mean = [0]
+        bad_scale = [-2]
+        wald = random.wald
+        desired = np.array([0.11873681120271318,
+                            0.12450084820795027,
+                            0.9096122728408238])
+
+        self.set_seed()
+        actual = wald(mean * 3, scale)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, wald, bad_mean * 3, scale)
+        assert_raises(ValueError, wald, mean * 3, bad_scale)
+        assert_raises(ValueError, random.wald, bad_mean * 3, scale)
+        assert_raises(ValueError, random.wald, mean * 3, bad_scale)
+
+        self.set_seed()
+        actual = wald(mean, scale * 3)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, wald, bad_mean, scale * 3)
+        assert_raises(ValueError, wald, mean, bad_scale * 3)
+        assert_raises(ValueError, wald, 0.0, 1)
+        assert_raises(ValueError, wald, 0.5, 0.0)
+
+    def test_triangular(self):
+        left = [1]
+        right = [3]
+        mode = [2]
+        bad_left_one = [3]
+        bad_mode_one = [4]
+        bad_left_two, bad_mode_two = right * 2
+        triangular = random.triangular
+        desired = np.array([2.03339048710429,
+                            2.0347400359389356,
+                            2.0095991069536208])
+
+        self.set_seed()
+        actual = triangular(left * 3, mode, right)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, triangular, bad_left_one * 3, mode, right)
+        assert_raises(ValueError, triangular, left * 3, bad_mode_one, right)
+        assert_raises(ValueError, triangular, bad_left_two * 3, bad_mode_two,
+                      right)
+
+        self.set_seed()
+        actual = triangular(left, mode * 3, right)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, triangular, bad_left_one, mode * 3, right)
+        assert_raises(ValueError, triangular, left, bad_mode_one * 3, right)
+        assert_raises(ValueError, triangular, bad_left_two, bad_mode_two * 3,
+                      right)
+
+        self.set_seed()
+        actual = triangular(left, mode, right * 3)
+        assert_array_almost_equal(actual, desired, decimal=14)
+        assert_raises(ValueError, triangular, bad_left_one, mode, right * 3)
+        assert_raises(ValueError, triangular, left, bad_mode_one, right * 3)
+        assert_raises(ValueError, triangular, bad_left_two, bad_mode_two,
+                      right * 3)
+
+        assert_raises(ValueError, triangular, 10., 0., 20.)
+        assert_raises(ValueError, triangular, 10., 25., 20.)
+        assert_raises(ValueError, triangular, 10., 10., 10.)
+
+    def test_binomial(self):
+        n = [1]
+        p = [0.5]
+        bad_n = [-1]
+        bad_p_one = [-1]
+        bad_p_two = [1.5]
+        binom = random.binomial
+        desired = np.array([1, 1, 1])
+
+        self.set_seed()
+        actual = binom(n * 3, p)
+        assert_array_equal(actual, desired)
+        assert_raises(ValueError, binom, bad_n * 3, p)
+        assert_raises(ValueError, binom, n * 3, bad_p_one)
+        assert_raises(ValueError, binom, n * 3, bad_p_two)
+
+        self.set_seed()
+        actual = binom(n, p * 3)
+        assert_array_equal(actual, desired)
+        assert_raises(ValueError, binom, bad_n, p * 3)
+        assert_raises(ValueError, binom, n, bad_p_one * 3)
+        assert_raises(ValueError, binom, n, bad_p_two * 3)
+
+    def test_negative_binomial(self):
+        n = [1]
+        p = [0.5]
+        bad_n = [-1]
+        bad_p_one = [-1]
+        bad_p_two = [1.5]
+        neg_binom = random.negative_binomial
+        desired = np.array([1, 0, 1])
+
+        self.set_seed()
+        actual = neg_binom(n * 3, p)
+        assert_array_equal(actual, desired)
+        assert_raises(ValueError, neg_binom, bad_n * 3, p)
+        assert_raises(ValueError, neg_binom, n * 3, bad_p_one)
+        assert_raises(ValueError, neg_binom, n * 3, bad_p_two)
+
+        self.set_seed()
+        actual = neg_binom(n, p * 3)
+        assert_array_equal(actual, desired)
+        assert_raises(ValueError, neg_binom, bad_n, p * 3)
+        assert_raises(ValueError, neg_binom, n, bad_p_one * 3)
+        assert_raises(ValueError, neg_binom, n, bad_p_two * 3)
+
+    def test_poisson(self):
+        max_lam = random.RandomState()._poisson_lam_max
+
+        lam = [1]
+        bad_lam_one = [-1]
+        bad_lam_two = [max_lam * 2]
+        poisson = random.poisson
+        desired = np.array([1, 1, 0])
+
+        self.set_seed()
+        actual = poisson(lam * 3)
+        assert_array_equal(actual, desired)
+        assert_raises(ValueError, poisson, bad_lam_one * 3)
+        assert_raises(ValueError, poisson, bad_lam_two * 3)
+
+    def test_zipf(self):
+        a = [2]
+        bad_a = [0]
+        zipf = random.zipf
+        desired = np.array([2, 2, 1])
+
+        self.set_seed()
+        actual = zipf(a * 3)
+        assert_array_equal(actual, desired)
+        assert_raises(ValueError, zipf, bad_a * 3)
+        with np.errstate(invalid='ignore'):
+            assert_raises(ValueError, zipf, np.nan)
+            assert_raises(ValueError, zipf, [0, 0, np.nan])
+
+    def test_geometric(self):
+        p = [0.5]
+        bad_p_one = [-1]
+        bad_p_two = [1.5]
+        geom = random.geometric
+        desired = np.array([2, 2, 2])
+
+        self.set_seed()
+        actual = geom(p * 3)
+        assert_array_equal(actual, desired)
+        assert_raises(ValueError, geom, bad_p_one * 3)
+        assert_raises(ValueError, geom, bad_p_two * 3)
+
+    def test_hypergeometric(self):
+        ngood = [1]
+        nbad = [2]
+        nsample = [2]
+        bad_ngood = [-1]
+        bad_nbad = [-2]
+        bad_nsample_one = [0]
+        bad_nsample_two = [4]
+        hypergeom = random.hypergeometric
+        desired = np.array([1, 1, 1])
+
+        self.set_seed()
+        actual = hypergeom(ngood * 3, nbad, nsample)
+        assert_array_equal(actual, desired)
+        assert_raises(ValueError, hypergeom, bad_ngood * 3, nbad, nsample)
+        assert_raises(ValueError, hypergeom, ngood * 3, bad_nbad, nsample)
+        assert_raises(ValueError, hypergeom, ngood * 3, nbad, bad_nsample_one)
+        assert_raises(ValueError, hypergeom, ngood * 3, nbad, bad_nsample_two)
+
+        self.set_seed()
+        actual = hypergeom(ngood, nbad * 3, nsample)
+        assert_array_equal(actual, desired)
+        assert_raises(ValueError, hypergeom, bad_ngood, nbad * 3, nsample)
+        assert_raises(ValueError, hypergeom, ngood, bad_nbad * 3, nsample)
+        assert_raises(ValueError, hypergeom, ngood, nbad * 3, bad_nsample_one)
+        assert_raises(ValueError, hypergeom, ngood, nbad * 3, bad_nsample_two)
+
+        self.set_seed()
+        actual = hypergeom(ngood, nbad, nsample * 3)
+        assert_array_equal(actual, desired)
+        assert_raises(ValueError, hypergeom, bad_ngood, nbad, nsample * 3)
+        assert_raises(ValueError, hypergeom, ngood, bad_nbad, nsample * 3)
+        assert_raises(ValueError, hypergeom, ngood, nbad, bad_nsample_one * 3)
+        assert_raises(ValueError, hypergeom, ngood, nbad, bad_nsample_two * 3)
+
+        assert_raises(ValueError, hypergeom, -1, 10, 20)
+        assert_raises(ValueError, hypergeom, 10, -1, 20)
+        assert_raises(ValueError, hypergeom, 10, 10, 0)
+        assert_raises(ValueError, hypergeom, 10, 10, 25)
+
+    def test_logseries(self):
+        p = [0.5]
+        bad_p_one = [2]
+        bad_p_two = [-1]
+        logseries = random.logseries
+        desired = np.array([1, 1, 1])
+
+        self.set_seed()
+        actual = logseries(p * 3)
+        assert_array_equal(actual, desired)
+        assert_raises(ValueError, logseries, bad_p_one * 3)
+        assert_raises(ValueError, logseries, bad_p_two * 3)
+
+
+@pytest.mark.skipif(IS_WASM, reason="can't start thread")
+class TestThread:
+    # make sure each state produces the same sequence even in threads
+    def setup_method(self):
+        self.seeds = range(4)
+
+    def check_function(self, function, sz):
+        from threading import Thread
+
+        out1 = np.empty((len(self.seeds),) + sz)
+        out2 = np.empty((len(self.seeds),) + sz)
+
+        # threaded generation
+        t = [Thread(target=function, args=(random.RandomState(s), o))
+             for s, o in zip(self.seeds, out1)]
+        [x.start() for x in t]
+        [x.join() for x in t]
+
+        # the same serial
+        for s, o in zip(self.seeds, out2):
+            function(random.RandomState(s), o)
+
+        # these platforms change x87 fpu precision mode in threads
+        if np.intp().dtype.itemsize == 4 and sys.platform == "win32":
+            assert_array_almost_equal(out1, out2)
+        else:
+            assert_array_equal(out1, out2)
+
+    def test_normal(self):
+        def gen_random(state, out):
+            out[...] = state.normal(size=10000)
+
+        self.check_function(gen_random, sz=(10000,))
+
+    def test_exp(self):
+        def gen_random(state, out):
+            out[...] = state.exponential(scale=np.ones((100, 1000)))
+
+        self.check_function(gen_random, sz=(100, 1000))
+
+    def test_multinomial(self):
+        def gen_random(state, out):
+            out[...] = state.multinomial(10, [1 / 6.] * 6, size=10000)
+
+        self.check_function(gen_random, sz=(10000, 6))
+
+
+# See Issue #4263
+class TestSingleEltArrayInput:
+    def setup_method(self):
+        self.argOne = np.array([2])
+        self.argTwo = np.array([3])
+        self.argThree = np.array([4])
+        self.tgtShape = (1,)
+
+    def test_one_arg_funcs(self):
+        funcs = (random.exponential, random.standard_gamma,
+                 random.chisquare, random.standard_t,
+                 random.pareto, random.weibull,
+                 random.power, random.rayleigh,
+                 random.poisson, random.zipf,
+                 random.geometric, random.logseries)
+
+        probfuncs = (random.geometric, random.logseries)
+
+        for func in funcs:
+            if func in probfuncs:  # p < 1.0
+                out = func(np.array([0.5]))
+
+            else:
+                out = func(self.argOne)
+
+            assert_equal(out.shape, self.tgtShape)
+
+    def test_two_arg_funcs(self):
+        funcs = (random.uniform, random.normal,
+                 random.beta, random.gamma,
+                 random.f, random.noncentral_chisquare,
+                 random.vonmises, random.laplace,
+                 random.gumbel, random.logistic,
+                 random.lognormal, random.wald,
+                 random.binomial, random.negative_binomial)
+
+        probfuncs = (random.binomial, random.negative_binomial)
+
+        for func in funcs:
+            if func in probfuncs:  # p <= 1
+                argTwo = np.array([0.5])
+
+            else:
+                argTwo = self.argTwo
+
+            out = func(self.argOne, argTwo)
+            assert_equal(out.shape, self.tgtShape)
+
+            out = func(self.argOne[0], argTwo)
+            assert_equal(out.shape, self.tgtShape)
+
+            out = func(self.argOne, argTwo[0])
+            assert_equal(out.shape, self.tgtShape)
+
+    def test_three_arg_funcs(self):
+        funcs = [random.noncentral_f, random.triangular,
+                 random.hypergeometric]
+
+        for func in funcs:
+            out = func(self.argOne, self.argTwo, self.argThree)
+            assert_equal(out.shape, self.tgtShape)
+
+            out = func(self.argOne[0], self.argTwo, self.argThree)
+            assert_equal(out.shape, self.tgtShape)
+
+            out = func(self.argOne, self.argTwo[0], self.argThree)
+            assert_equal(out.shape, self.tgtShape)
+
+
+# Ensure returned array dtype is correct for platform
+def test_integer_dtype(int_func):
+    random.seed(123456789)
+    fname, args, sha256 = int_func
+    f = getattr(random, fname)
+    actual = f(*args, size=2)
+    assert_(actual.dtype == np.dtype('l'))
+
+
+def test_integer_repeat(int_func):
+    random.seed(123456789)
+    fname, args, sha256 = int_func
+    f = getattr(random, fname)
+    val = f(*args, size=1000000)
+    if sys.byteorder != 'little':
+        val = val.byteswap()
+    res = hashlib.sha256(val.view(np.int8)).hexdigest()
+    assert_(res == sha256)
+
+
+def test_broadcast_size_error():
+    # GH-16833
+    with pytest.raises(ValueError):
+        random.binomial(1, [0.3, 0.7], size=(2, 1))
+    with pytest.raises(ValueError):
+        random.binomial([1, 2], 0.3, size=(2, 1))
+    with pytest.raises(ValueError):
+        random.binomial([1, 2], [0.3, 0.7], size=(2, 1))
+
+
+def test_randomstate_ctor_old_style_pickle():
+    rs = np.random.RandomState(MT19937(0))
+    rs.standard_normal(1)
+    # Directly call reduce which is used in pickling
+    ctor, args, state_a = rs.__reduce__()
+    # Simulate unpickling an old pickle that only has the name
+    assert args[:1] == ("MT19937",)
+    b = ctor(*args[:1])
+    b.set_state(state_a)
+    state_b = b.get_state(legacy=False)
+
+    assert_equal(state_a['bit_generator'], state_b['bit_generator'])
+    assert_array_equal(state_a['state']['key'], state_b['state']['key'])
+    assert_array_equal(state_a['state']['pos'], state_b['state']['pos'])
+    assert_equal(state_a['has_gauss'], state_b['has_gauss'])
+    assert_equal(state_a['gauss'], state_b['gauss'])
+
+
+def test_hot_swap(restore_singleton_bitgen):
+    # GH 21808
+    def_bg = np.random.default_rng(0)
+    bg = def_bg.bit_generator
+    np.random.set_bit_generator(bg)
+    assert isinstance(np.random.mtrand._rand._bit_generator, type(bg))
+
+    second_bg = np.random.get_bit_generator()
+    assert bg is second_bg
+
+
+def test_seed_alt_bit_gen(restore_singleton_bitgen):
+    # GH 21808
+    bg = PCG64(0)
+    np.random.set_bit_generator(bg)
+    state = np.random.get_state(legacy=False)
+    np.random.seed(1)
+    new_state = np.random.get_state(legacy=False)
+    print(state)
+    print(new_state)
+    assert state["bit_generator"] == "PCG64"
+    assert state["state"]["state"] != new_state["state"]["state"]
+    assert state["state"]["inc"] != new_state["state"]["inc"]
+
+
+def test_state_error_alt_bit_gen(restore_singleton_bitgen):
+    # GH 21808
+    state = np.random.get_state()
+    bg = PCG64(0)
+    np.random.set_bit_generator(bg)
+    with pytest.raises(ValueError, match="state must be for a PCG64"):
+        np.random.set_state(state)
+
+
+def test_swap_worked(restore_singleton_bitgen):
+    # GH 21808
+    np.random.seed(98765)
+    vals = np.random.randint(0, 2 ** 30, 10)
+    bg = PCG64(0)
+    state = bg.state
+    np.random.set_bit_generator(bg)
+    state_direct = np.random.get_state(legacy=False)
+    for field in state:
+        assert state[field] == state_direct[field]
+    np.random.seed(98765)
+    pcg_vals = np.random.randint(0, 2 ** 30, 10)
+    assert not np.all(vals == pcg_vals)
+    new_state = bg.state
+    assert new_state["state"]["state"] != state["state"]["state"]
+    assert new_state["state"]["inc"] == new_state["state"]["inc"]
+
+
+def test_swapped_singleton_against_direct(restore_singleton_bitgen):
+    np.random.set_bit_generator(PCG64(98765))
+    singleton_vals = np.random.randint(0, 2 ** 30, 10)
+    rg = np.random.RandomState(PCG64(98765))
+    non_singleton_vals = rg.randint(0, 2 ** 30, 10)
+    assert_equal(non_singleton_vals, singleton_vals)
diff --git a/lib/python3.12/site-packages/numpy/random/tests/test_randomstate_regression.py b/lib/python3.12/site-packages/numpy/random/tests/test_randomstate_regression.py
new file mode 100644
index 0000000000000000000000000000000000000000..7ad19ab5562b87305a0391c80c602259816a984e
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/random/tests/test_randomstate_regression.py
@@ -0,0 +1,216 @@
+import sys
+
+import pytest
+
+from numpy.testing import (
+    assert_, assert_array_equal, assert_raises,
+    )
+import numpy as np
+
+from numpy import random
+
+
+class TestRegression:
+
+    def test_VonMises_range(self):
+        # Make sure generated random variables are in [-pi, pi].
+        # Regression test for ticket #986.
+        for mu in np.linspace(-7., 7., 5):
+            r = random.vonmises(mu, 1, 50)
+            assert_(np.all(r > -np.pi) and np.all(r <= np.pi))
+
+    def test_hypergeometric_range(self):
+        # Test for ticket #921
+        assert_(np.all(random.hypergeometric(3, 18, 11, size=10) < 4))
+        assert_(np.all(random.hypergeometric(18, 3, 11, size=10) > 0))
+
+        # Test for ticket #5623
+        args = [
+            (2**20 - 2, 2**20 - 2, 2**20 - 2),  # Check for 32-bit systems
+        ]
+        is_64bits = sys.maxsize > 2**32
+        if is_64bits and sys.platform != 'win32':
+            # Check for 64-bit systems
+            args.append((2**40 - 2, 2**40 - 2, 2**40 - 2))
+        for arg in args:
+            assert_(random.hypergeometric(*arg) > 0)
+
+    def test_logseries_convergence(self):
+        # Test for ticket #923
+        N = 1000
+        random.seed(0)
+        rvsn = random.logseries(0.8, size=N)
+        # these two frequency counts should be close to theoretical
+        # numbers with this large sample
+        # theoretical large N result is 0.49706795
+        freq = np.sum(rvsn == 1) / N
+        msg = f'Frequency was {freq:f}, should be > 0.45'
+        assert_(freq > 0.45, msg)
+        # theoretical large N result is 0.19882718
+        freq = np.sum(rvsn == 2) / N
+        msg = f'Frequency was {freq:f}, should be < 0.23'
+        assert_(freq < 0.23, msg)
+
+    def test_shuffle_mixed_dimension(self):
+        # Test for trac ticket #2074
+        for t in [[1, 2, 3, None],
+                  [(1, 1), (2, 2), (3, 3), None],
+                  [1, (2, 2), (3, 3), None],
+                  [(1, 1), 2, 3, None]]:
+            random.seed(12345)
+            shuffled = list(t)
+            random.shuffle(shuffled)
+            expected = np.array([t[0], t[3], t[1], t[2]], dtype=object)
+            assert_array_equal(np.array(shuffled, dtype=object), expected)
+
+    def test_call_within_randomstate(self):
+        # Check that custom RandomState does not call into global state
+        m = random.RandomState()
+        res = np.array([0, 8, 7, 2, 1, 9, 4, 7, 0, 3])
+        for i in range(3):
+            random.seed(i)
+            m.seed(4321)
+            # If m.state is not honored, the result will change
+            assert_array_equal(m.choice(10, size=10, p=np.ones(10)/10.), res)
+
+    def test_multivariate_normal_size_types(self):
+        # Test for multivariate_normal issue with 'size' argument.
+        # Check that the multivariate_normal size argument can be a
+        # numpy integer.
+        random.multivariate_normal([0], [[0]], size=1)
+        random.multivariate_normal([0], [[0]], size=np.int_(1))
+        random.multivariate_normal([0], [[0]], size=np.int64(1))
+
+    def test_beta_small_parameters(self):
+        # Test that beta with small a and b parameters does not produce
+        # NaNs due to roundoff errors causing 0 / 0, gh-5851
+        random.seed(1234567890)
+        x = random.beta(0.0001, 0.0001, size=100)
+        assert_(not np.any(np.isnan(x)), 'Nans in random.beta')
+
+    def test_choice_sum_of_probs_tolerance(self):
+        # The sum of probs should be 1.0 with some tolerance.
+        # For low precision dtypes the tolerance was too tight.
+        # See numpy github issue 6123.
+        random.seed(1234)
+        a = [1, 2, 3]
+        counts = [4, 4, 2]
+        for dt in np.float16, np.float32, np.float64:
+            probs = np.array(counts, dtype=dt) / sum(counts)
+            c = random.choice(a, p=probs)
+            assert_(c in a)
+            assert_raises(ValueError, random.choice, a, p=probs*0.9)
+
+    def test_shuffle_of_array_of_different_length_strings(self):
+        # Test that permuting an array of different length strings
+        # will not cause a segfault on garbage collection
+        # Tests gh-7710
+        random.seed(1234)
+
+        a = np.array(['a', 'a' * 1000])
+
+        for _ in range(100):
+            random.shuffle(a)
+
+        # Force Garbage Collection - should not segfault.
+        import gc
+        gc.collect()
+
+    def test_shuffle_of_array_of_objects(self):
+        # Test that permuting an array of objects will not cause
+        # a segfault on garbage collection.
+        # See gh-7719
+        random.seed(1234)
+        a = np.array([np.arange(1), np.arange(4)], dtype=object)
+
+        for _ in range(1000):
+            random.shuffle(a)
+
+        # Force Garbage Collection - should not segfault.
+        import gc
+        gc.collect()
+
+    def test_permutation_subclass(self):
+        class N(np.ndarray):
+            pass
+
+        random.seed(1)
+        orig = np.arange(3).view(N)
+        perm = random.permutation(orig)
+        assert_array_equal(perm, np.array([0, 2, 1]))
+        assert_array_equal(orig, np.arange(3).view(N))
+
+        class M:
+            a = np.arange(5)
+
+            def __array__(self):
+                return self.a
+
+        random.seed(1)
+        m = M()
+        perm = random.permutation(m)
+        assert_array_equal(perm, np.array([2, 1, 4, 0, 3]))
+        assert_array_equal(m.__array__(), np.arange(5))
+
+    def test_warns_byteorder(self):
+        # GH 13159
+        other_byteord_dt = 'i4'
+        with pytest.deprecated_call(match='non-native byteorder is not'):
+            random.randint(0, 200, size=10, dtype=other_byteord_dt)
+
+    def test_named_argument_initialization(self):
+        # GH 13669
+        rs1 = np.random.RandomState(123456789)
+        rs2 = np.random.RandomState(seed=123456789)
+        assert rs1.randint(0, 100) == rs2.randint(0, 100)
+
+    def test_choice_retun_dtype(self):
+        # GH 9867
+        c = np.random.choice(10, p=[.1]*10, size=2)
+        assert c.dtype == np.dtype(int)
+        c = np.random.choice(10, p=[.1]*10, replace=False, size=2)
+        assert c.dtype == np.dtype(int)
+        c = np.random.choice(10, size=2)
+        assert c.dtype == np.dtype(int)
+        c = np.random.choice(10, replace=False, size=2)
+        assert c.dtype == np.dtype(int)
+
+    @pytest.mark.skipif(np.iinfo('l').max < 2**32,
+                        reason='Cannot test with 32-bit C long')
+    def test_randint_117(self):
+        # GH 14189
+        random.seed(0)
+        expected = np.array([2357136044, 2546248239, 3071714933, 3626093760,
+                             2588848963, 3684848379, 2340255427, 3638918503,
+                             1819583497, 2678185683], dtype='int64')
+        actual = random.randint(2**32, size=10)
+        assert_array_equal(actual, expected)
+
+    def test_p_zero_stream(self):
+        # Regression test for gh-14522.  Ensure that future versions
+        # generate the same variates as version 1.16.
+        np.random.seed(12345)
+        assert_array_equal(random.binomial(1, [0, 0.25, 0.5, 0.75, 1]),
+                           [0, 0, 0, 1, 1])
+
+    def test_n_zero_stream(self):
+        # Regression test for gh-14522.  Ensure that future versions
+        # generate the same variates as version 1.16.
+        np.random.seed(8675309)
+        expected = np.array([[0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
+                             [3, 4, 2, 3, 3, 1, 5, 3, 1, 3]])
+        assert_array_equal(random.binomial([[0], [10]], 0.25, size=(2, 10)),
+                           expected)
+
+
+def test_multinomial_empty():
+    # gh-20483
+    # Ensure that empty p-vals are correctly handled
+    assert random.multinomial(10, []).shape == (0,)
+    assert random.multinomial(3, [], size=(7, 5, 3)).shape == (7, 5, 3, 0)
+
+
+def test_multinomial_1d_pval():
+    # gh-20483
+    with pytest.raises(TypeError, match="pvals must be a 1-d"):
+        random.multinomial(10, 0.3)
diff --git a/lib/python3.12/site-packages/numpy/random/tests/test_regression.py b/lib/python3.12/site-packages/numpy/random/tests/test_regression.py
new file mode 100644
index 0000000000000000000000000000000000000000..8bf419875b3f37cd4cc121030d65be9fc77999a3
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/random/tests/test_regression.py
@@ -0,0 +1,149 @@
+import sys
+from numpy.testing import (
+    assert_, assert_array_equal, assert_raises,
+    )
+from numpy import random
+import numpy as np
+
+
+class TestRegression:
+
+    def test_VonMises_range(self):
+        # Make sure generated random variables are in [-pi, pi].
+        # Regression test for ticket #986.
+        for mu in np.linspace(-7., 7., 5):
+            r = random.mtrand.vonmises(mu, 1, 50)
+            assert_(np.all(r > -np.pi) and np.all(r <= np.pi))
+
+    def test_hypergeometric_range(self):
+        # Test for ticket #921
+        assert_(np.all(np.random.hypergeometric(3, 18, 11, size=10) < 4))
+        assert_(np.all(np.random.hypergeometric(18, 3, 11, size=10) > 0))
+
+        # Test for ticket #5623
+        args = [
+            (2**20 - 2, 2**20 - 2, 2**20 - 2),  # Check for 32-bit systems
+        ]
+        is_64bits = sys.maxsize > 2**32
+        if is_64bits and sys.platform != 'win32':
+            # Check for 64-bit systems
+            args.append((2**40 - 2, 2**40 - 2, 2**40 - 2))
+        for arg in args:
+            assert_(np.random.hypergeometric(*arg) > 0)
+
+    def test_logseries_convergence(self):
+        # Test for ticket #923
+        N = 1000
+        np.random.seed(0)
+        rvsn = np.random.logseries(0.8, size=N)
+        # these two frequency counts should be close to theoretical
+        # numbers with this large sample
+        # theoretical large N result is 0.49706795
+        freq = np.sum(rvsn == 1) / N
+        msg = f'Frequency was {freq:f}, should be > 0.45'
+        assert_(freq > 0.45, msg)
+        # theoretical large N result is 0.19882718
+        freq = np.sum(rvsn == 2) / N
+        msg = f'Frequency was {freq:f}, should be < 0.23'
+        assert_(freq < 0.23, msg)
+
+    def test_shuffle_mixed_dimension(self):
+        # Test for trac ticket #2074
+        for t in [[1, 2, 3, None],
+                  [(1, 1), (2, 2), (3, 3), None],
+                  [1, (2, 2), (3, 3), None],
+                  [(1, 1), 2, 3, None]]:
+            np.random.seed(12345)
+            shuffled = list(t)
+            random.shuffle(shuffled)
+            expected = np.array([t[0], t[3], t[1], t[2]], dtype=object)
+            assert_array_equal(np.array(shuffled, dtype=object), expected)
+
+    def test_call_within_randomstate(self):
+        # Check that custom RandomState does not call into global state
+        m = np.random.RandomState()
+        res = np.array([0, 8, 7, 2, 1, 9, 4, 7, 0, 3])
+        for i in range(3):
+            np.random.seed(i)
+            m.seed(4321)
+            # If m.state is not honored, the result will change
+            assert_array_equal(m.choice(10, size=10, p=np.ones(10)/10.), res)
+
+    def test_multivariate_normal_size_types(self):
+        # Test for multivariate_normal issue with 'size' argument.
+        # Check that the multivariate_normal size argument can be a
+        # numpy integer.
+        np.random.multivariate_normal([0], [[0]], size=1)
+        np.random.multivariate_normal([0], [[0]], size=np.int_(1))
+        np.random.multivariate_normal([0], [[0]], size=np.int64(1))
+
+    def test_beta_small_parameters(self):
+        # Test that beta with small a and b parameters does not produce
+        # NaNs due to roundoff errors causing 0 / 0, gh-5851
+        np.random.seed(1234567890)
+        x = np.random.beta(0.0001, 0.0001, size=100)
+        assert_(not np.any(np.isnan(x)), 'Nans in np.random.beta')
+
+    def test_choice_sum_of_probs_tolerance(self):
+        # The sum of probs should be 1.0 with some tolerance.
+        # For low precision dtypes the tolerance was too tight.
+        # See numpy github issue 6123.
+        np.random.seed(1234)
+        a = [1, 2, 3]
+        counts = [4, 4, 2]
+        for dt in np.float16, np.float32, np.float64:
+            probs = np.array(counts, dtype=dt) / sum(counts)
+            c = np.random.choice(a, p=probs)
+            assert_(c in a)
+            assert_raises(ValueError, np.random.choice, a, p=probs*0.9)
+
+    def test_shuffle_of_array_of_different_length_strings(self):
+        # Test that permuting an array of different length strings
+        # will not cause a segfault on garbage collection
+        # Tests gh-7710
+        np.random.seed(1234)
+
+        a = np.array(['a', 'a' * 1000])
+
+        for _ in range(100):
+            np.random.shuffle(a)
+
+        # Force Garbage Collection - should not segfault.
+        import gc
+        gc.collect()
+
+    def test_shuffle_of_array_of_objects(self):
+        # Test that permuting an array of objects will not cause
+        # a segfault on garbage collection.
+        # See gh-7719
+        np.random.seed(1234)
+        a = np.array([np.arange(1), np.arange(4)], dtype=object)
+
+        for _ in range(1000):
+            np.random.shuffle(a)
+
+        # Force Garbage Collection - should not segfault.
+        import gc
+        gc.collect()
+
+    def test_permutation_subclass(self):
+        class N(np.ndarray):
+            pass
+
+        np.random.seed(1)
+        orig = np.arange(3).view(N)
+        perm = np.random.permutation(orig)
+        assert_array_equal(perm, np.array([0, 2, 1]))
+        assert_array_equal(orig, np.arange(3).view(N))
+
+        class M:
+            a = np.arange(5)
+
+            def __array__(self):
+                return self.a
+
+        np.random.seed(1)
+        m = M()
+        perm = np.random.permutation(m)
+        assert_array_equal(perm, np.array([2, 1, 4, 0, 3]))
+        assert_array_equal(m.__array__(), np.arange(5))
diff --git a/lib/python3.12/site-packages/numpy/random/tests/test_seed_sequence.py b/lib/python3.12/site-packages/numpy/random/tests/test_seed_sequence.py
new file mode 100644
index 0000000000000000000000000000000000000000..f08cf80faafa2fc1a369eaf7dd4d6fcccd5e9158
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/random/tests/test_seed_sequence.py
@@ -0,0 +1,80 @@
+import numpy as np
+from numpy.testing import assert_array_equal, assert_array_compare
+
+from numpy.random import SeedSequence
+
+
+def test_reference_data():
+    """ Check that SeedSequence generates data the same as the C++ reference.
+
+    https://gist.github.com/imneme/540829265469e673d045
+    """
+    inputs = [
+        [3735928559, 195939070, 229505742, 305419896],
+        [3668361503, 4165561550, 1661411377, 3634257570],
+        [164546577, 4166754639, 1765190214, 1303880213],
+        [446610472, 3941463886, 522937693, 1882353782],
+        [1864922766, 1719732118, 3882010307, 1776744564],
+        [4141682960, 3310988675, 553637289, 902896340],
+        [1134851934, 2352871630, 3699409824, 2648159817],
+        [1240956131, 3107113773, 1283198141, 1924506131],
+        [2669565031, 579818610, 3042504477, 2774880435],
+        [2766103236, 2883057919, 4029656435, 862374500],
+    ]
+    outputs = [
+        [3914649087, 576849849, 3593928901, 2229911004],
+        [2240804226, 3691353228, 1365957195, 2654016646],
+        [3562296087, 3191708229, 1147942216, 3726991905],
+        [1403443605, 3591372999, 1291086759, 441919183],
+        [1086200464, 2191331643, 560336446, 3658716651],
+        [3249937430, 2346751812, 847844327, 2996632307],
+        [2584285912, 4034195531, 3523502488, 169742686],
+        [959045797, 3875435559, 1886309314, 359682705],
+        [3978441347, 432478529, 3223635119, 138903045],
+        [296367413, 4262059219, 13109864, 3283683422],
+    ]
+    outputs64 = [
+        [2477551240072187391, 9577394838764454085],
+        [15854241394484835714, 11398914698975566411],
+        [13708282465491374871, 16007308345579681096],
+        [15424829579845884309, 1898028439751125927],
+        [9411697742461147792, 15714068361935982142],
+        [10079222287618677782, 12870437757549876199],
+        [17326737873898640088, 729039288628699544],
+        [16644868984619524261, 1544825456798124994],
+        [1857481142255628931, 596584038813451439],
+        [18305404959516669237, 14103312907920476776],
+    ]
+    for seed, expected, expected64 in zip(inputs, outputs, outputs64):
+        expected = np.array(expected, dtype=np.uint32)
+        ss = SeedSequence(seed)
+        state = ss.generate_state(len(expected))
+        assert_array_equal(state, expected)
+        state64 = ss.generate_state(len(expected64), dtype=np.uint64)
+        assert_array_equal(state64, expected64)
+
+
+def test_zero_padding():
+    """ Ensure that the implicit zero-padding does not cause problems.
+    """
+    # Ensure that large integers are inserted in little-endian fashion to avoid
+    # trailing 0s.
+    ss0 = SeedSequence(42)
+    ss1 = SeedSequence(42 << 32)
+    assert_array_compare(
+        np.not_equal,
+        ss0.generate_state(4),
+        ss1.generate_state(4))
+
+    # Ensure backwards compatibility with the original 0.17 release for small
+    # integers and no spawn key.
+    expected42 = np.array([3444837047, 2669555309, 2046530742, 3581440988],
+                          dtype=np.uint32)
+    assert_array_equal(SeedSequence(42).generate_state(4), expected42)
+
+    # Regression test for gh-16539 to ensure that the implicit 0s don't
+    # conflict with spawn keys.
+    assert_array_compare(
+        np.not_equal,
+        SeedSequence(42, spawn_key=(0,)).generate_state(4),
+        expected42)
diff --git a/lib/python3.12/site-packages/numpy/random/tests/test_smoke.py b/lib/python3.12/site-packages/numpy/random/tests/test_smoke.py
new file mode 100644
index 0000000000000000000000000000000000000000..9becc434d0d1a66b7c9987d8c5dffdf221fd45b1
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/random/tests/test_smoke.py
@@ -0,0 +1,818 @@
+import pickle
+from functools import partial
+
+import numpy as np
+import pytest
+from numpy.testing import assert_equal, assert_, assert_array_equal
+from numpy.random import (Generator, MT19937, PCG64, PCG64DXSM, Philox, SFC64)
+
+@pytest.fixture(scope='module',
+                params=(np.bool_, np.int8, np.int16, np.int32, np.int64,
+                        np.uint8, np.uint16, np.uint32, np.uint64))
+def dtype(request):
+    return request.param
+
+
+def params_0(f):
+    val = f()
+    assert_(np.isscalar(val))
+    val = f(10)
+    assert_(val.shape == (10,))
+    val = f((10, 10))
+    assert_(val.shape == (10, 10))
+    val = f((10, 10, 10))
+    assert_(val.shape == (10, 10, 10))
+    val = f(size=(5, 5))
+    assert_(val.shape == (5, 5))
+
+
+def params_1(f, bounded=False):
+    a = 5.0
+    b = np.arange(2.0, 12.0)
+    c = np.arange(2.0, 102.0).reshape((10, 10))
+    d = np.arange(2.0, 1002.0).reshape((10, 10, 10))
+    e = np.array([2.0, 3.0])
+    g = np.arange(2.0, 12.0).reshape((1, 10, 1))
+    if bounded:
+        a = 0.5
+        b = b / (1.5 * b.max())
+        c = c / (1.5 * c.max())
+        d = d / (1.5 * d.max())
+        e = e / (1.5 * e.max())
+        g = g / (1.5 * g.max())
+
+    # Scalar
+    f(a)
+    # Scalar - size
+    f(a, size=(10, 10))
+    # 1d
+    f(b)
+    # 2d
+    f(c)
+    # 3d
+    f(d)
+    # 1d size
+    f(b, size=10)
+    # 2d - size - broadcast
+    f(e, size=(10, 2))
+    # 3d - size
+    f(g, size=(10, 10, 10))
+
+
+def comp_state(state1, state2):
+    identical = True
+    if isinstance(state1, dict):
+        for key in state1:
+            identical &= comp_state(state1[key], state2[key])
+    elif type(state1) != type(state2):
+        identical &= type(state1) == type(state2)
+    else:
+        if (isinstance(state1, (list, tuple, np.ndarray)) and isinstance(
+                state2, (list, tuple, np.ndarray))):
+            for s1, s2 in zip(state1, state2):
+                identical &= comp_state(s1, s2)
+        else:
+            identical &= state1 == state2
+    return identical
+
+
+def warmup(rg, n=None):
+    if n is None:
+        n = 11 + np.random.randint(0, 20)
+    rg.standard_normal(n)
+    rg.standard_normal(n)
+    rg.standard_normal(n, dtype=np.float32)
+    rg.standard_normal(n, dtype=np.float32)
+    rg.integers(0, 2 ** 24, n, dtype=np.uint64)
+    rg.integers(0, 2 ** 48, n, dtype=np.uint64)
+    rg.standard_gamma(11.0, n)
+    rg.standard_gamma(11.0, n, dtype=np.float32)
+    rg.random(n, dtype=np.float64)
+    rg.random(n, dtype=np.float32)
+
+
+class RNG:
+    @classmethod
+    def setup_class(cls):
+        # Overridden in test classes. Place holder to silence IDE noise
+        cls.bit_generator = PCG64
+        cls.advance = None
+        cls.seed = [12345]
+        cls.rg = Generator(cls.bit_generator(*cls.seed))
+        cls.initial_state = cls.rg.bit_generator.state
+        cls.seed_vector_bits = 64
+        cls._extra_setup()
+
+    @classmethod
+    def _extra_setup(cls):
+        cls.vec_1d = np.arange(2.0, 102.0)
+        cls.vec_2d = np.arange(2.0, 102.0)[None, :]
+        cls.mat = np.arange(2.0, 102.0, 0.01).reshape((100, 100))
+        cls.seed_error = TypeError
+
+    def _reset_state(self):
+        self.rg.bit_generator.state = self.initial_state
+
+    def test_init(self):
+        rg = Generator(self.bit_generator())
+        state = rg.bit_generator.state
+        rg.standard_normal(1)
+        rg.standard_normal(1)
+        rg.bit_generator.state = state
+        new_state = rg.bit_generator.state
+        assert_(comp_state(state, new_state))
+
+    def test_advance(self):
+        state = self.rg.bit_generator.state
+        if hasattr(self.rg.bit_generator, 'advance'):
+            self.rg.bit_generator.advance(self.advance)
+            assert_(not comp_state(state, self.rg.bit_generator.state))
+        else:
+            bitgen_name = self.rg.bit_generator.__class__.__name__
+            pytest.skip(f'Advance is not supported by {bitgen_name}')
+
+    def test_jump(self):
+        state = self.rg.bit_generator.state
+        if hasattr(self.rg.bit_generator, 'jumped'):
+            bit_gen2 = self.rg.bit_generator.jumped()
+            jumped_state = bit_gen2.state
+            assert_(not comp_state(state, jumped_state))
+            self.rg.random(2 * 3 * 5 * 7 * 11 * 13 * 17)
+            self.rg.bit_generator.state = state
+            bit_gen3 = self.rg.bit_generator.jumped()
+            rejumped_state = bit_gen3.state
+            assert_(comp_state(jumped_state, rejumped_state))
+        else:
+            bitgen_name = self.rg.bit_generator.__class__.__name__
+            if bitgen_name not in ('SFC64',):
+                raise AttributeError(f'no "jumped" in {bitgen_name}')
+            pytest.skip(f'Jump is not supported by {bitgen_name}')
+
+    def test_uniform(self):
+        r = self.rg.uniform(-1.0, 0.0, size=10)
+        assert_(len(r) == 10)
+        assert_((r > -1).all())
+        assert_((r <= 0).all())
+
+    def test_uniform_array(self):
+        r = self.rg.uniform(np.array([-1.0] * 10), 0.0, size=10)
+        assert_(len(r) == 10)
+        assert_((r > -1).all())
+        assert_((r <= 0).all())
+        r = self.rg.uniform(np.array([-1.0] * 10),
+                            np.array([0.0] * 10), size=10)
+        assert_(len(r) == 10)
+        assert_((r > -1).all())
+        assert_((r <= 0).all())
+        r = self.rg.uniform(-1.0, np.array([0.0] * 10), size=10)
+        assert_(len(r) == 10)
+        assert_((r > -1).all())
+        assert_((r <= 0).all())
+
+    def test_random(self):
+        assert_(len(self.rg.random(10)) == 10)
+        params_0(self.rg.random)
+
+    def test_standard_normal_zig(self):
+        assert_(len(self.rg.standard_normal(10)) == 10)
+
+    def test_standard_normal(self):
+        assert_(len(self.rg.standard_normal(10)) == 10)
+        params_0(self.rg.standard_normal)
+
+    def test_standard_gamma(self):
+        assert_(len(self.rg.standard_gamma(10, 10)) == 10)
+        assert_(len(self.rg.standard_gamma(np.array([10] * 10), 10)) == 10)
+        params_1(self.rg.standard_gamma)
+
+    def test_standard_exponential(self):
+        assert_(len(self.rg.standard_exponential(10)) == 10)
+        params_0(self.rg.standard_exponential)
+
+    def test_standard_exponential_float(self):
+        randoms = self.rg.standard_exponential(10, dtype='float32')
+        assert_(len(randoms) == 10)
+        assert randoms.dtype == np.float32
+        params_0(partial(self.rg.standard_exponential, dtype='float32'))
+
+    def test_standard_exponential_float_log(self):
+        randoms = self.rg.standard_exponential(10, dtype='float32',
+                                               method='inv')
+        assert_(len(randoms) == 10)
+        assert randoms.dtype == np.float32
+        params_0(partial(self.rg.standard_exponential, dtype='float32',
+                         method='inv'))
+
+    def test_standard_cauchy(self):
+        assert_(len(self.rg.standard_cauchy(10)) == 10)
+        params_0(self.rg.standard_cauchy)
+
+    def test_standard_t(self):
+        assert_(len(self.rg.standard_t(10, 10)) == 10)
+        params_1(self.rg.standard_t)
+
+    def test_binomial(self):
+        assert_(self.rg.binomial(10, .5) >= 0)
+        assert_(self.rg.binomial(1000, .5) >= 0)
+
+    def test_reset_state(self):
+        state = self.rg.bit_generator.state
+        int_1 = self.rg.integers(2**31)
+        self.rg.bit_generator.state = state
+        int_2 = self.rg.integers(2**31)
+        assert_(int_1 == int_2)
+
+    def test_entropy_init(self):
+        rg = Generator(self.bit_generator())
+        rg2 = Generator(self.bit_generator())
+        assert_(not comp_state(rg.bit_generator.state,
+                               rg2.bit_generator.state))
+
+    def test_seed(self):
+        rg = Generator(self.bit_generator(*self.seed))
+        rg2 = Generator(self.bit_generator(*self.seed))
+        rg.random()
+        rg2.random()
+        assert_(comp_state(rg.bit_generator.state, rg2.bit_generator.state))
+
+    def test_reset_state_gauss(self):
+        rg = Generator(self.bit_generator(*self.seed))
+        rg.standard_normal()
+        state = rg.bit_generator.state
+        n1 = rg.standard_normal(size=10)
+        rg2 = Generator(self.bit_generator())
+        rg2.bit_generator.state = state
+        n2 = rg2.standard_normal(size=10)
+        assert_array_equal(n1, n2)
+
+    def test_reset_state_uint32(self):
+        rg = Generator(self.bit_generator(*self.seed))
+        rg.integers(0, 2 ** 24, 120, dtype=np.uint32)
+        state = rg.bit_generator.state
+        n1 = rg.integers(0, 2 ** 24, 10, dtype=np.uint32)
+        rg2 = Generator(self.bit_generator())
+        rg2.bit_generator.state = state
+        n2 = rg2.integers(0, 2 ** 24, 10, dtype=np.uint32)
+        assert_array_equal(n1, n2)
+
+    def test_reset_state_float(self):
+        rg = Generator(self.bit_generator(*self.seed))
+        rg.random(dtype='float32')
+        state = rg.bit_generator.state
+        n1 = rg.random(size=10, dtype='float32')
+        rg2 = Generator(self.bit_generator())
+        rg2.bit_generator.state = state
+        n2 = rg2.random(size=10, dtype='float32')
+        assert_((n1 == n2).all())
+
+    def test_shuffle(self):
+        original = np.arange(200, 0, -1)
+        permuted = self.rg.permutation(original)
+        assert_((original != permuted).any())
+
+    def test_permutation(self):
+        original = np.arange(200, 0, -1)
+        permuted = self.rg.permutation(original)
+        assert_((original != permuted).any())
+
+    def test_beta(self):
+        vals = self.rg.beta(2.0, 2.0, 10)
+        assert_(len(vals) == 10)
+        vals = self.rg.beta(np.array([2.0] * 10), 2.0)
+        assert_(len(vals) == 10)
+        vals = self.rg.beta(2.0, np.array([2.0] * 10))
+        assert_(len(vals) == 10)
+        vals = self.rg.beta(np.array([2.0] * 10), np.array([2.0] * 10))
+        assert_(len(vals) == 10)
+        vals = self.rg.beta(np.array([2.0] * 10), np.array([[2.0]] * 10))
+        assert_(vals.shape == (10, 10))
+
+    def test_bytes(self):
+        vals = self.rg.bytes(10)
+        assert_(len(vals) == 10)
+
+    def test_chisquare(self):
+        vals = self.rg.chisquare(2.0, 10)
+        assert_(len(vals) == 10)
+        params_1(self.rg.chisquare)
+
+    def test_exponential(self):
+        vals = self.rg.exponential(2.0, 10)
+        assert_(len(vals) == 10)
+        params_1(self.rg.exponential)
+
+    def test_f(self):
+        vals = self.rg.f(3, 1000, 10)
+        assert_(len(vals) == 10)
+
+    def test_gamma(self):
+        vals = self.rg.gamma(3, 2, 10)
+        assert_(len(vals) == 10)
+
+    def test_geometric(self):
+        vals = self.rg.geometric(0.5, 10)
+        assert_(len(vals) == 10)
+        params_1(self.rg.exponential, bounded=True)
+
+    def test_gumbel(self):
+        vals = self.rg.gumbel(2.0, 2.0, 10)
+        assert_(len(vals) == 10)
+
+    def test_laplace(self):
+        vals = self.rg.laplace(2.0, 2.0, 10)
+        assert_(len(vals) == 10)
+
+    def test_logitic(self):
+        vals = self.rg.logistic(2.0, 2.0, 10)
+        assert_(len(vals) == 10)
+
+    def test_logseries(self):
+        vals = self.rg.logseries(0.5, 10)
+        assert_(len(vals) == 10)
+
+    def test_negative_binomial(self):
+        vals = self.rg.negative_binomial(10, 0.2, 10)
+        assert_(len(vals) == 10)
+
+    def test_noncentral_chisquare(self):
+        vals = self.rg.noncentral_chisquare(10, 2, 10)
+        assert_(len(vals) == 10)
+
+    def test_noncentral_f(self):
+        vals = self.rg.noncentral_f(3, 1000, 2, 10)
+        assert_(len(vals) == 10)
+        vals = self.rg.noncentral_f(np.array([3] * 10), 1000, 2)
+        assert_(len(vals) == 10)
+        vals = self.rg.noncentral_f(3, np.array([1000] * 10), 2)
+        assert_(len(vals) == 10)
+        vals = self.rg.noncentral_f(3, 1000, np.array([2] * 10))
+        assert_(len(vals) == 10)
+
+    def test_normal(self):
+        vals = self.rg.normal(10, 0.2, 10)
+        assert_(len(vals) == 10)
+
+    def test_pareto(self):
+        vals = self.rg.pareto(3.0, 10)
+        assert_(len(vals) == 10)
+
+    def test_poisson(self):
+        vals = self.rg.poisson(10, 10)
+        assert_(len(vals) == 10)
+        vals = self.rg.poisson(np.array([10] * 10))
+        assert_(len(vals) == 10)
+        params_1(self.rg.poisson)
+
+    def test_power(self):
+        vals = self.rg.power(0.2, 10)
+        assert_(len(vals) == 10)
+
+    def test_integers(self):
+        vals = self.rg.integers(10, 20, 10)
+        assert_(len(vals) == 10)
+
+    def test_rayleigh(self):
+        vals = self.rg.rayleigh(0.2, 10)
+        assert_(len(vals) == 10)
+        params_1(self.rg.rayleigh, bounded=True)
+
+    def test_vonmises(self):
+        vals = self.rg.vonmises(10, 0.2, 10)
+        assert_(len(vals) == 10)
+
+    def test_wald(self):
+        vals = self.rg.wald(1.0, 1.0, 10)
+        assert_(len(vals) == 10)
+
+    def test_weibull(self):
+        vals = self.rg.weibull(1.0, 10)
+        assert_(len(vals) == 10)
+
+    def test_zipf(self):
+        vals = self.rg.zipf(10, 10)
+        assert_(len(vals) == 10)
+        vals = self.rg.zipf(self.vec_1d)
+        assert_(len(vals) == 100)
+        vals = self.rg.zipf(self.vec_2d)
+        assert_(vals.shape == (1, 100))
+        vals = self.rg.zipf(self.mat)
+        assert_(vals.shape == (100, 100))
+
+    def test_hypergeometric(self):
+        vals = self.rg.hypergeometric(25, 25, 20)
+        assert_(np.isscalar(vals))
+        vals = self.rg.hypergeometric(np.array([25] * 10), 25, 20)
+        assert_(vals.shape == (10,))
+
+    def test_triangular(self):
+        vals = self.rg.triangular(-5, 0, 5)
+        assert_(np.isscalar(vals))
+        vals = self.rg.triangular(-5, np.array([0] * 10), 5)
+        assert_(vals.shape == (10,))
+
+    def test_multivariate_normal(self):
+        mean = [0, 0]
+        cov = [[1, 0], [0, 100]]  # diagonal covariance
+        x = self.rg.multivariate_normal(mean, cov, 5000)
+        assert_(x.shape == (5000, 2))
+        x_zig = self.rg.multivariate_normal(mean, cov, 5000)
+        assert_(x.shape == (5000, 2))
+        x_inv = self.rg.multivariate_normal(mean, cov, 5000)
+        assert_(x.shape == (5000, 2))
+        assert_((x_zig != x_inv).any())
+
+    def test_multinomial(self):
+        vals = self.rg.multinomial(100, [1.0 / 3, 2.0 / 3])
+        assert_(vals.shape == (2,))
+        vals = self.rg.multinomial(100, [1.0 / 3, 2.0 / 3], size=10)
+        assert_(vals.shape == (10, 2))
+
+    def test_dirichlet(self):
+        s = self.rg.dirichlet((10, 5, 3), 20)
+        assert_(s.shape == (20, 3))
+
+    def test_pickle(self):
+        pick = pickle.dumps(self.rg)
+        unpick = pickle.loads(pick)
+        assert_((type(self.rg) == type(unpick)))
+        assert_(comp_state(self.rg.bit_generator.state,
+                           unpick.bit_generator.state))
+
+        pick = pickle.dumps(self.rg)
+        unpick = pickle.loads(pick)
+        assert_((type(self.rg) == type(unpick)))
+        assert_(comp_state(self.rg.bit_generator.state,
+                           unpick.bit_generator.state))
+
+    def test_seed_array(self):
+        if self.seed_vector_bits is None:
+            bitgen_name = self.bit_generator.__name__
+            pytest.skip(f'Vector seeding is not supported by {bitgen_name}')
+
+        if self.seed_vector_bits == 32:
+            dtype = np.uint32
+        else:
+            dtype = np.uint64
+        seed = np.array([1], dtype=dtype)
+        bg = self.bit_generator(seed)
+        state1 = bg.state
+        bg = self.bit_generator(1)
+        state2 = bg.state
+        assert_(comp_state(state1, state2))
+
+        seed = np.arange(4, dtype=dtype)
+        bg = self.bit_generator(seed)
+        state1 = bg.state
+        bg = self.bit_generator(seed[0])
+        state2 = bg.state
+        assert_(not comp_state(state1, state2))
+
+        seed = np.arange(1500, dtype=dtype)
+        bg = self.bit_generator(seed)
+        state1 = bg.state
+        bg = self.bit_generator(seed[0])
+        state2 = bg.state
+        assert_(not comp_state(state1, state2))
+
+        seed = 2 ** np.mod(np.arange(1500, dtype=dtype),
+                           self.seed_vector_bits - 1) + 1
+        bg = self.bit_generator(seed)
+        state1 = bg.state
+        bg  = self.bit_generator(seed[0])
+        state2 = bg.state
+        assert_(not comp_state(state1, state2))
+
+    def test_uniform_float(self):
+        rg = Generator(self.bit_generator(12345))
+        warmup(rg)
+        state = rg.bit_generator.state
+        r1 = rg.random(11, dtype=np.float32)
+        rg2 = Generator(self.bit_generator())
+        warmup(rg2)
+        rg2.bit_generator.state = state
+        r2 = rg2.random(11, dtype=np.float32)
+        assert_array_equal(r1, r2)
+        assert_equal(r1.dtype, np.float32)
+        assert_(comp_state(rg.bit_generator.state, rg2.bit_generator.state))
+
+    def test_gamma_floats(self):
+        rg = Generator(self.bit_generator())
+        warmup(rg)
+        state = rg.bit_generator.state
+        r1 = rg.standard_gamma(4.0, 11, dtype=np.float32)
+        rg2 = Generator(self.bit_generator())
+        warmup(rg2)
+        rg2.bit_generator.state = state
+        r2 = rg2.standard_gamma(4.0, 11, dtype=np.float32)
+        assert_array_equal(r1, r2)
+        assert_equal(r1.dtype, np.float32)
+        assert_(comp_state(rg.bit_generator.state, rg2.bit_generator.state))
+
+    def test_normal_floats(self):
+        rg = Generator(self.bit_generator())
+        warmup(rg)
+        state = rg.bit_generator.state
+        r1 = rg.standard_normal(11, dtype=np.float32)
+        rg2 = Generator(self.bit_generator())
+        warmup(rg2)
+        rg2.bit_generator.state = state
+        r2 = rg2.standard_normal(11, dtype=np.float32)
+        assert_array_equal(r1, r2)
+        assert_equal(r1.dtype, np.float32)
+        assert_(comp_state(rg.bit_generator.state, rg2.bit_generator.state))
+
+    def test_normal_zig_floats(self):
+        rg = Generator(self.bit_generator())
+        warmup(rg)
+        state = rg.bit_generator.state
+        r1 = rg.standard_normal(11, dtype=np.float32)
+        rg2 = Generator(self.bit_generator())
+        warmup(rg2)
+        rg2.bit_generator.state = state
+        r2 = rg2.standard_normal(11, dtype=np.float32)
+        assert_array_equal(r1, r2)
+        assert_equal(r1.dtype, np.float32)
+        assert_(comp_state(rg.bit_generator.state, rg2.bit_generator.state))
+
+    def test_output_fill(self):
+        rg = self.rg
+        state = rg.bit_generator.state
+        size = (31, 7, 97)
+        existing = np.empty(size)
+        rg.bit_generator.state = state
+        rg.standard_normal(out=existing)
+        rg.bit_generator.state = state
+        direct = rg.standard_normal(size=size)
+        assert_equal(direct, existing)
+
+        sized = np.empty(size)
+        rg.bit_generator.state = state
+        rg.standard_normal(out=sized, size=sized.shape)
+
+        existing = np.empty(size, dtype=np.float32)
+        rg.bit_generator.state = state
+        rg.standard_normal(out=existing, dtype=np.float32)
+        rg.bit_generator.state = state
+        direct = rg.standard_normal(size=size, dtype=np.float32)
+        assert_equal(direct, existing)
+
+    def test_output_filling_uniform(self):
+        rg = self.rg
+        state = rg.bit_generator.state
+        size = (31, 7, 97)
+        existing = np.empty(size)
+        rg.bit_generator.state = state
+        rg.random(out=existing)
+        rg.bit_generator.state = state
+        direct = rg.random(size=size)
+        assert_equal(direct, existing)
+
+        existing = np.empty(size, dtype=np.float32)
+        rg.bit_generator.state = state
+        rg.random(out=existing, dtype=np.float32)
+        rg.bit_generator.state = state
+        direct = rg.random(size=size, dtype=np.float32)
+        assert_equal(direct, existing)
+
+    def test_output_filling_exponential(self):
+        rg = self.rg
+        state = rg.bit_generator.state
+        size = (31, 7, 97)
+        existing = np.empty(size)
+        rg.bit_generator.state = state
+        rg.standard_exponential(out=existing)
+        rg.bit_generator.state = state
+        direct = rg.standard_exponential(size=size)
+        assert_equal(direct, existing)
+
+        existing = np.empty(size, dtype=np.float32)
+        rg.bit_generator.state = state
+        rg.standard_exponential(out=existing, dtype=np.float32)
+        rg.bit_generator.state = state
+        direct = rg.standard_exponential(size=size, dtype=np.float32)
+        assert_equal(direct, existing)
+
+    def test_output_filling_gamma(self):
+        rg = self.rg
+        state = rg.bit_generator.state
+        size = (31, 7, 97)
+        existing = np.zeros(size)
+        rg.bit_generator.state = state
+        rg.standard_gamma(1.0, out=existing)
+        rg.bit_generator.state = state
+        direct = rg.standard_gamma(1.0, size=size)
+        assert_equal(direct, existing)
+
+        existing = np.zeros(size, dtype=np.float32)
+        rg.bit_generator.state = state
+        rg.standard_gamma(1.0, out=existing, dtype=np.float32)
+        rg.bit_generator.state = state
+        direct = rg.standard_gamma(1.0, size=size, dtype=np.float32)
+        assert_equal(direct, existing)
+
+    def test_output_filling_gamma_broadcast(self):
+        rg = self.rg
+        state = rg.bit_generator.state
+        size = (31, 7, 97)
+        mu = np.arange(97.0) + 1.0
+        existing = np.zeros(size)
+        rg.bit_generator.state = state
+        rg.standard_gamma(mu, out=existing)
+        rg.bit_generator.state = state
+        direct = rg.standard_gamma(mu, size=size)
+        assert_equal(direct, existing)
+
+        existing = np.zeros(size, dtype=np.float32)
+        rg.bit_generator.state = state
+        rg.standard_gamma(mu, out=existing, dtype=np.float32)
+        rg.bit_generator.state = state
+        direct = rg.standard_gamma(mu, size=size, dtype=np.float32)
+        assert_equal(direct, existing)
+
+    def test_output_fill_error(self):
+        rg = self.rg
+        size = (31, 7, 97)
+        existing = np.empty(size)
+        with pytest.raises(TypeError):
+            rg.standard_normal(out=existing, dtype=np.float32)
+        with pytest.raises(ValueError):
+            rg.standard_normal(out=existing[::3])
+        existing = np.empty(size, dtype=np.float32)
+        with pytest.raises(TypeError):
+            rg.standard_normal(out=existing, dtype=np.float64)
+
+        existing = np.zeros(size, dtype=np.float32)
+        with pytest.raises(TypeError):
+            rg.standard_gamma(1.0, out=existing, dtype=np.float64)
+        with pytest.raises(ValueError):
+            rg.standard_gamma(1.0, out=existing[::3], dtype=np.float32)
+        existing = np.zeros(size, dtype=np.float64)
+        with pytest.raises(TypeError):
+            rg.standard_gamma(1.0, out=existing, dtype=np.float32)
+        with pytest.raises(ValueError):
+            rg.standard_gamma(1.0, out=existing[::3])
+
+    def test_integers_broadcast(self, dtype):
+        if dtype == np.bool_:
+            upper = 2
+            lower = 0
+        else:
+            info = np.iinfo(dtype)
+            upper = int(info.max) + 1
+            lower = info.min
+        self._reset_state()
+        a = self.rg.integers(lower, [upper] * 10, dtype=dtype)
+        self._reset_state()
+        b = self.rg.integers([lower] * 10, upper, dtype=dtype)
+        assert_equal(a, b)
+        self._reset_state()
+        c = self.rg.integers(lower, upper, size=10, dtype=dtype)
+        assert_equal(a, c)
+        self._reset_state()
+        d = self.rg.integers(np.array(
+            [lower] * 10), np.array([upper], dtype=object), size=10,
+            dtype=dtype)
+        assert_equal(a, d)
+        self._reset_state()
+        e = self.rg.integers(
+            np.array([lower] * 10), np.array([upper] * 10), size=10,
+            dtype=dtype)
+        assert_equal(a, e)
+
+        self._reset_state()
+        a = self.rg.integers(0, upper, size=10, dtype=dtype)
+        self._reset_state()
+        b = self.rg.integers([upper] * 10, dtype=dtype)
+        assert_equal(a, b)
+
+    def test_integers_numpy(self, dtype):
+        high = np.array([1])
+        low = np.array([0])
+
+        out = self.rg.integers(low, high, dtype=dtype)
+        assert out.shape == (1,)
+
+        out = self.rg.integers(low[0], high, dtype=dtype)
+        assert out.shape == (1,)
+
+        out = self.rg.integers(low, high[0], dtype=dtype)
+        assert out.shape == (1,)
+
+    def test_integers_broadcast_errors(self, dtype):
+        if dtype == np.bool_:
+            upper = 2
+            lower = 0
+        else:
+            info = np.iinfo(dtype)
+            upper = int(info.max) + 1
+            lower = info.min
+        with pytest.raises(ValueError):
+            self.rg.integers(lower, [upper + 1] * 10, dtype=dtype)
+        with pytest.raises(ValueError):
+            self.rg.integers(lower - 1, [upper] * 10, dtype=dtype)
+        with pytest.raises(ValueError):
+            self.rg.integers([lower - 1], [upper] * 10, dtype=dtype)
+        with pytest.raises(ValueError):
+            self.rg.integers([0], [0], dtype=dtype)
+
+
+class TestMT19937(RNG):
+    @classmethod
+    def setup_class(cls):
+        cls.bit_generator = MT19937
+        cls.advance = None
+        cls.seed = [2 ** 21 + 2 ** 16 + 2 ** 5 + 1]
+        cls.rg = Generator(cls.bit_generator(*cls.seed))
+        cls.initial_state = cls.rg.bit_generator.state
+        cls.seed_vector_bits = 32
+        cls._extra_setup()
+        cls.seed_error = ValueError
+
+    def test_numpy_state(self):
+        nprg = np.random.RandomState()
+        nprg.standard_normal(99)
+        state = nprg.get_state()
+        self.rg.bit_generator.state = state
+        state2 = self.rg.bit_generator.state
+        assert_((state[1] == state2['state']['key']).all())
+        assert_((state[2] == state2['state']['pos']))
+
+
+class TestPhilox(RNG):
+    @classmethod
+    def setup_class(cls):
+        cls.bit_generator = Philox
+        cls.advance = 2**63 + 2**31 + 2**15 + 1
+        cls.seed = [12345]
+        cls.rg = Generator(cls.bit_generator(*cls.seed))
+        cls.initial_state = cls.rg.bit_generator.state
+        cls.seed_vector_bits = 64
+        cls._extra_setup()
+
+
+class TestSFC64(RNG):
+    @classmethod
+    def setup_class(cls):
+        cls.bit_generator = SFC64
+        cls.advance = None
+        cls.seed = [12345]
+        cls.rg = Generator(cls.bit_generator(*cls.seed))
+        cls.initial_state = cls.rg.bit_generator.state
+        cls.seed_vector_bits = 192
+        cls._extra_setup()
+
+
+class TestPCG64(RNG):
+    @classmethod
+    def setup_class(cls):
+        cls.bit_generator = PCG64
+        cls.advance = 2**63 + 2**31 + 2**15 + 1
+        cls.seed = [12345]
+        cls.rg = Generator(cls.bit_generator(*cls.seed))
+        cls.initial_state = cls.rg.bit_generator.state
+        cls.seed_vector_bits = 64
+        cls._extra_setup()
+
+
+class TestPCG64DXSM(RNG):
+    @classmethod
+    def setup_class(cls):
+        cls.bit_generator = PCG64DXSM
+        cls.advance = 2**63 + 2**31 + 2**15 + 1
+        cls.seed = [12345]
+        cls.rg = Generator(cls.bit_generator(*cls.seed))
+        cls.initial_state = cls.rg.bit_generator.state
+        cls.seed_vector_bits = 64
+        cls._extra_setup()
+
+
+class TestDefaultRNG(RNG):
+    @classmethod
+    def setup_class(cls):
+        # This will duplicate some tests that directly instantiate a fresh
+        # Generator(), but that's okay.
+        cls.bit_generator = PCG64
+        cls.advance = 2**63 + 2**31 + 2**15 + 1
+        cls.seed = [12345]
+        cls.rg = np.random.default_rng(*cls.seed)
+        cls.initial_state = cls.rg.bit_generator.state
+        cls.seed_vector_bits = 64
+        cls._extra_setup()
+
+    def test_default_is_pcg64(self):
+        # In order to change the default BitGenerator, we'll go through
+        # a deprecation cycle to move to a different function.
+        assert_(isinstance(self.rg.bit_generator, PCG64))
+
+    def test_seed(self):
+        np.random.default_rng()
+        np.random.default_rng(None)
+        np.random.default_rng(12345)
+        np.random.default_rng(0)
+        np.random.default_rng(43660444402423911716352051725018508569)
+        np.random.default_rng([43660444402423911716352051725018508569,
+                               279705150948142787361475340226491943209])
+        with pytest.raises(ValueError):
+            np.random.default_rng(-1)
+        with pytest.raises(ValueError):
+            np.random.default_rng([12345, -1])
diff --git a/lib/python3.12/site-packages/numpy/typing/__init__.py b/lib/python3.12/site-packages/numpy/typing/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..5cf02fe868b04d3fd1ff145e57332475d7466b57
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/__init__.py
@@ -0,0 +1,175 @@
+"""
+============================
+Typing (:mod:`numpy.typing`)
+============================
+
+.. versionadded:: 1.20
+
+Large parts of the NumPy API have :pep:`484`-style type annotations. In
+addition a number of type aliases are available to users, most prominently
+the two below:
+
+- `ArrayLike`: objects that can be converted to arrays
+- `DTypeLike`: objects that can be converted to dtypes
+
+.. _typing-extensions: https://pypi.org/project/typing-extensions/
+
+Mypy plugin
+-----------
+
+.. versionadded:: 1.21
+
+.. automodule:: numpy.typing.mypy_plugin
+
+.. currentmodule:: numpy.typing
+
+Differences from the runtime NumPy API
+--------------------------------------
+
+NumPy is very flexible. Trying to describe the full range of
+possibilities statically would result in types that are not very
+helpful. For that reason, the typed NumPy API is often stricter than
+the runtime NumPy API. This section describes some notable
+differences.
+
+ArrayLike
+~~~~~~~~~
+
+The `ArrayLike` type tries to avoid creating object arrays. For
+example,
+
+.. code-block:: python
+
+    >>> np.array(x**2 for x in range(10))
+    array( at ...>, dtype=object)
+
+is valid NumPy code which will create a 0-dimensional object
+array. Type checkers will complain about the above example when using
+the NumPy types however. If you really intended to do the above, then
+you can either use a ``# type: ignore`` comment:
+
+.. code-block:: python
+
+    >>> np.array(x**2 for x in range(10))  # type: ignore
+
+or explicitly type the array like object as `~typing.Any`:
+
+.. code-block:: python
+
+    >>> from typing import Any
+    >>> array_like: Any = (x**2 for x in range(10))
+    >>> np.array(array_like)
+    array( at ...>, dtype=object)
+
+ndarray
+~~~~~~~
+
+It's possible to mutate the dtype of an array at runtime. For example,
+the following code is valid:
+
+.. code-block:: python
+
+    >>> x = np.array([1, 2])
+    >>> x.dtype = np.bool_
+
+This sort of mutation is not allowed by the types. Users who want to
+write statically typed code should instead use the `numpy.ndarray.view`
+method to create a view of the array with a different dtype.
+
+DTypeLike
+~~~~~~~~~
+
+The `DTypeLike` type tries to avoid creation of dtype objects using
+dictionary of fields like below:
+
+.. code-block:: python
+
+    >>> x = np.dtype({"field1": (float, 1), "field2": (int, 3)})
+
+Although this is valid NumPy code, the type checker will complain about it,
+since its usage is discouraged.
+Please see : :ref:`Data type objects `
+
+Number precision
+~~~~~~~~~~~~~~~~
+
+The precision of `numpy.number` subclasses is treated as a covariant generic
+parameter (see :class:`~NBitBase`), simplifying the annotating of processes
+involving precision-based casting.
+
+.. code-block:: python
+
+    >>> from typing import TypeVar
+    >>> import numpy as np
+    >>> import numpy.typing as npt
+
+    >>> T = TypeVar("T", bound=npt.NBitBase)
+    >>> def func(a: "np.floating[T]", b: "np.floating[T]") -> "np.floating[T]":
+    ...     ...
+
+Consequently, the likes of `~numpy.float16`, `~numpy.float32` and
+`~numpy.float64` are still sub-types of `~numpy.floating`, but, contrary to
+runtime, they're not necessarily considered as sub-classes.
+
+Timedelta64
+~~~~~~~~~~~
+
+The `~numpy.timedelta64` class is not considered a subclass of
+`~numpy.signedinteger`, the former only inheriting from `~numpy.generic`
+while static type checking.
+
+0D arrays
+~~~~~~~~~
+
+During runtime numpy aggressively casts any passed 0D arrays into their
+corresponding `~numpy.generic` instance. Until the introduction of shape
+typing (see :pep:`646`) it is unfortunately not possible to make the
+necessary distinction between 0D and >0D arrays. While thus not strictly
+correct, all operations are that can potentially perform a 0D-array -> scalar
+cast are currently annotated as exclusively returning an `ndarray`.
+
+If it is known in advance that an operation _will_ perform a
+0D-array -> scalar cast, then one can consider manually remedying the
+situation with either `typing.cast` or a ``# type: ignore`` comment.
+
+Record array dtypes
+~~~~~~~~~~~~~~~~~~~
+
+The dtype of `numpy.recarray`, and the `numpy.rec` functions in general,
+can be specified in one of two ways:
+
+* Directly via the ``dtype`` argument.
+* With up to five helper arguments that operate via `numpy.format_parser`:
+  ``formats``, ``names``, ``titles``, ``aligned`` and ``byteorder``.
+
+These two approaches are currently typed as being mutually exclusive,
+*i.e.* if ``dtype`` is specified than one may not specify ``formats``.
+While this mutual exclusivity is not (strictly) enforced during runtime,
+combining both dtype specifiers can lead to unexpected or even downright
+buggy behavior.
+
+API
+---
+
+"""
+# NOTE: The API section will be appended with additional entries
+# further down in this file
+
+from numpy._typing import (
+    ArrayLike,
+    DTypeLike,
+    NBitBase,
+    NDArray,
+)
+
+__all__ = ["ArrayLike", "DTypeLike", "NBitBase", "NDArray"]
+
+if __doc__ is not None:
+    from numpy._typing._add_docstring import _docstrings
+    __doc__ += _docstrings
+    __doc__ += '\n.. autoclass:: numpy.typing.NBitBase\n'
+    del _docstrings
+
+from numpy._pytesttester import PytestTester
+test = PytestTester(__name__)
+del PytestTester
diff --git a/lib/python3.12/site-packages/numpy/typing/__pycache__/__init__.cpython-312.pyc b/lib/python3.12/site-packages/numpy/typing/__pycache__/__init__.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..9fb9299bed0a6bf39246c3cd277d77fcd67b0108
Binary files /dev/null and b/lib/python3.12/site-packages/numpy/typing/__pycache__/__init__.cpython-312.pyc differ
diff --git a/lib/python3.12/site-packages/numpy/typing/__pycache__/mypy_plugin.cpython-312.pyc b/lib/python3.12/site-packages/numpy/typing/__pycache__/mypy_plugin.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..90314dc1b714367880a9eb5b655dbff86d4a46f7
Binary files /dev/null and b/lib/python3.12/site-packages/numpy/typing/__pycache__/mypy_plugin.cpython-312.pyc differ
diff --git a/lib/python3.12/site-packages/numpy/typing/__pycache__/setup.cpython-312.pyc b/lib/python3.12/site-packages/numpy/typing/__pycache__/setup.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..70ecf01d8953e9c7cca8279980294aa0aabba2e1
Binary files /dev/null and b/lib/python3.12/site-packages/numpy/typing/__pycache__/setup.cpython-312.pyc differ
diff --git a/lib/python3.12/site-packages/numpy/typing/mypy_plugin.py b/lib/python3.12/site-packages/numpy/typing/mypy_plugin.py
new file mode 100644
index 0000000000000000000000000000000000000000..8ec9637016e324daa88c682a05709fbed850d0c1
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/mypy_plugin.py
@@ -0,0 +1,196 @@
+"""A mypy_ plugin for managing a number of platform-specific annotations.
+Its functionality can be split into three distinct parts:
+
+* Assigning the (platform-dependent) precisions of certain `~numpy.number`
+  subclasses, including the likes of `~numpy.int_`, `~numpy.intp` and
+  `~numpy.longlong`. See the documentation on
+  :ref:`scalar types ` for a comprehensive overview
+  of the affected classes. Without the plugin the precision of all relevant
+  classes will be inferred as `~typing.Any`.
+* Removing all extended-precision `~numpy.number` subclasses that are
+  unavailable for the platform in question. Most notably this includes the
+  likes of `~numpy.float128` and `~numpy.complex256`. Without the plugin *all*
+  extended-precision types will, as far as mypy is concerned, be available
+  to all platforms.
+* Assigning the (platform-dependent) precision of `~numpy.ctypeslib.c_intp`.
+  Without the plugin the type will default to `ctypes.c_int64`.
+
+  .. versionadded:: 1.22
+
+Examples
+--------
+To enable the plugin, one must add it to their mypy `configuration file`_:
+
+.. code-block:: ini
+
+    [mypy]
+    plugins = numpy.typing.mypy_plugin
+
+.. _mypy: http://mypy-lang.org/
+.. _configuration file: https://mypy.readthedocs.io/en/stable/config_file.html
+
+"""
+
+from __future__ import annotations
+
+from collections.abc import Iterable
+from typing import Final, TYPE_CHECKING, Callable
+
+import numpy as np
+
+try:
+    import mypy.types
+    from mypy.types import Type
+    from mypy.plugin import Plugin, AnalyzeTypeContext
+    from mypy.nodes import MypyFile, ImportFrom, Statement
+    from mypy.build import PRI_MED
+
+    _HookFunc = Callable[[AnalyzeTypeContext], Type]
+    MYPY_EX: None | ModuleNotFoundError = None
+except ModuleNotFoundError as ex:
+    MYPY_EX = ex
+
+__all__: list[str] = []
+
+
+def _get_precision_dict() -> dict[str, str]:
+    names = [
+        ("_NBitByte", np.byte),
+        ("_NBitShort", np.short),
+        ("_NBitIntC", np.intc),
+        ("_NBitIntP", np.intp),
+        ("_NBitInt", np.int_),
+        ("_NBitLongLong", np.longlong),
+
+        ("_NBitHalf", np.half),
+        ("_NBitSingle", np.single),
+        ("_NBitDouble", np.double),
+        ("_NBitLongDouble", np.longdouble),
+    ]
+    ret = {}
+    for name, typ in names:
+        n: int = 8 * typ().dtype.itemsize
+        ret[f'numpy._typing._nbit.{name}'] = f"numpy._{n}Bit"
+    return ret
+
+
+def _get_extended_precision_list() -> list[str]:
+    extended_names = [
+        "uint128",
+        "uint256",
+        "int128",
+        "int256",
+        "float80",
+        "float96",
+        "float128",
+        "float256",
+        "complex160",
+        "complex192",
+        "complex256",
+        "complex512",
+    ]
+    return [i for i in extended_names if hasattr(np, i)]
+
+
+def _get_c_intp_name() -> str:
+    # Adapted from `np.core._internal._getintp_ctype`
+    char = np.dtype('p').char
+    if char == 'i':
+        return "c_int"
+    elif char == 'l':
+        return "c_long"
+    elif char == 'q':
+        return "c_longlong"
+    else:
+        return "c_long"
+
+
+#: A dictionary mapping type-aliases in `numpy._typing._nbit` to
+#: concrete `numpy.typing.NBitBase` subclasses.
+_PRECISION_DICT: Final = _get_precision_dict()
+
+#: A list with the names of all extended precision `np.number` subclasses.
+_EXTENDED_PRECISION_LIST: Final = _get_extended_precision_list()
+
+#: The name of the ctypes quivalent of `np.intp`
+_C_INTP: Final = _get_c_intp_name()
+
+
+def _hook(ctx: AnalyzeTypeContext) -> Type:
+    """Replace a type-alias with a concrete ``NBitBase`` subclass."""
+    typ, _, api = ctx
+    name = typ.name.split(".")[-1]
+    name_new = _PRECISION_DICT[f"numpy._typing._nbit.{name}"]
+    return api.named_type(name_new)
+
+
+if TYPE_CHECKING or MYPY_EX is None:
+    def _index(iterable: Iterable[Statement], id: str) -> int:
+        """Identify the first ``ImportFrom`` instance the specified `id`."""
+        for i, value in enumerate(iterable):
+            if getattr(value, "id", None) == id:
+                return i
+        raise ValueError("Failed to identify a `ImportFrom` instance "
+                         f"with the following id: {id!r}")
+
+    def _override_imports(
+        file: MypyFile,
+        module: str,
+        imports: list[tuple[str, None | str]],
+    ) -> None:
+        """Override the first `module`-based import with new `imports`."""
+        # Construct a new `from module import y` statement
+        import_obj = ImportFrom(module, 0, names=imports)
+        import_obj.is_top_level = True
+
+        # Replace the first `module`-based import statement with `import_obj`
+        for lst in [file.defs, file.imports]:  # type: list[Statement]
+            i = _index(lst, module)
+            lst[i] = import_obj
+
+    class _NumpyPlugin(Plugin):
+        """A mypy plugin for handling versus numpy-specific typing tasks."""
+
+        def get_type_analyze_hook(self, fullname: str) -> None | _HookFunc:
+            """Set the precision of platform-specific `numpy.number`
+            subclasses.
+
+            For example: `numpy.int_`, `numpy.longlong` and `numpy.longdouble`.
+            """
+            if fullname in _PRECISION_DICT:
+                return _hook
+            return None
+
+        def get_additional_deps(
+            self, file: MypyFile
+        ) -> list[tuple[int, str, int]]:
+            """Handle all import-based overrides.
+
+            * Import platform-specific extended-precision `numpy.number`
+              subclasses (*e.g.* `numpy.float96`, `numpy.float128` and
+              `numpy.complex256`).
+            * Import the appropriate `ctypes` equivalent to `numpy.intp`.
+
+            """
+            ret = [(PRI_MED, file.fullname, -1)]
+
+            if file.fullname == "numpy":
+                _override_imports(
+                    file, "numpy._typing._extended_precision",
+                    imports=[(v, v) for v in _EXTENDED_PRECISION_LIST],
+                )
+            elif file.fullname == "numpy.ctypeslib":
+                _override_imports(
+                    file, "ctypes",
+                    imports=[(_C_INTP, "_c_intp")],
+                )
+            return ret
+
+    def plugin(version: str) -> type[_NumpyPlugin]:
+        """An entry-point for mypy."""
+        return _NumpyPlugin
+
+else:
+    def plugin(version: str) -> type[_NumpyPlugin]:
+        """An entry-point for mypy."""
+        raise MYPY_EX
diff --git a/lib/python3.12/site-packages/numpy/typing/setup.py b/lib/python3.12/site-packages/numpy/typing/setup.py
new file mode 100644
index 0000000000000000000000000000000000000000..c444e769fb6d94ffc0bff6cec25cd30a86858f2e
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/setup.py
@@ -0,0 +1,11 @@
+def configuration(parent_package='', top_path=None):
+    from numpy.distutils.misc_util import Configuration
+    config = Configuration('typing', parent_package, top_path)
+    config.add_subpackage('tests')
+    config.add_data_dir('tests/data')
+    return config
+
+
+if __name__ == '__main__':
+    from numpy.distutils.core import setup
+    setup(configuration=configuration)
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/__init__.py b/lib/python3.12/site-packages/numpy/typing/tests/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/__pycache__/__init__.cpython-312.pyc b/lib/python3.12/site-packages/numpy/typing/tests/__pycache__/__init__.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..baa9fab043a4bdb7c9f69192d105fa303b5dc6b2
Binary files /dev/null and b/lib/python3.12/site-packages/numpy/typing/tests/__pycache__/__init__.cpython-312.pyc differ
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/__pycache__/test_isfile.cpython-312.pyc b/lib/python3.12/site-packages/numpy/typing/tests/__pycache__/test_isfile.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..8365d60ddee590f188df1f4d2e19f8f9f4b4b329
Binary files /dev/null and b/lib/python3.12/site-packages/numpy/typing/tests/__pycache__/test_isfile.cpython-312.pyc differ
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/__pycache__/test_runtime.cpython-312.pyc b/lib/python3.12/site-packages/numpy/typing/tests/__pycache__/test_runtime.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..6d28f633169f1f86aaecb733d551fc258991e549
Binary files /dev/null and b/lib/python3.12/site-packages/numpy/typing/tests/__pycache__/test_runtime.cpython-312.pyc differ
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/__pycache__/test_typing.cpython-312.pyc b/lib/python3.12/site-packages/numpy/typing/tests/__pycache__/test_typing.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..d5bb498f6933cc607f1ac7bd70d8c069fdc0e667
Binary files /dev/null and b/lib/python3.12/site-packages/numpy/typing/tests/__pycache__/test_typing.cpython-312.pyc differ
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/fail/arithmetic.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/fail/arithmetic.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..3bbc101cfd236c01a8d72e24bcf36cda87da8a10
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/fail/arithmetic.pyi
@@ -0,0 +1,121 @@
+from typing import Any
+import numpy as np
+
+b_ = np.bool_()
+dt = np.datetime64(0, "D")
+td = np.timedelta64(0, "D")
+
+AR_b: np.ndarray[Any, np.dtype[np.bool_]]
+AR_u: np.ndarray[Any, np.dtype[np.uint32]]
+AR_i: np.ndarray[Any, np.dtype[np.int64]]
+AR_f: np.ndarray[Any, np.dtype[np.float64]]
+AR_c: np.ndarray[Any, np.dtype[np.complex128]]
+AR_m: np.ndarray[Any, np.dtype[np.timedelta64]]
+AR_M: np.ndarray[Any, np.dtype[np.datetime64]]
+
+ANY: Any
+
+AR_LIKE_b: list[bool]
+AR_LIKE_u: list[np.uint32]
+AR_LIKE_i: list[int]
+AR_LIKE_f: list[float]
+AR_LIKE_c: list[complex]
+AR_LIKE_m: list[np.timedelta64]
+AR_LIKE_M: list[np.datetime64]
+
+# Array subtraction
+
+# NOTE: mypys `NoReturn` errors are, unfortunately, not that great
+_1 = AR_b - AR_LIKE_b  # E: Need type annotation
+_2 = AR_LIKE_b - AR_b  # E: Need type annotation
+AR_i - bytes()  # E: No overload variant
+
+AR_f - AR_LIKE_m  # E: Unsupported operand types
+AR_f - AR_LIKE_M  # E: Unsupported operand types
+AR_c - AR_LIKE_m  # E: Unsupported operand types
+AR_c - AR_LIKE_M  # E: Unsupported operand types
+
+AR_m - AR_LIKE_f  # E: Unsupported operand types
+AR_M - AR_LIKE_f  # E: Unsupported operand types
+AR_m - AR_LIKE_c  # E: Unsupported operand types
+AR_M - AR_LIKE_c  # E: Unsupported operand types
+
+AR_m - AR_LIKE_M  # E: Unsupported operand types
+AR_LIKE_m - AR_M  # E: Unsupported operand types
+
+# array floor division
+
+AR_M // AR_LIKE_b  # E: Unsupported operand types
+AR_M // AR_LIKE_u  # E: Unsupported operand types
+AR_M // AR_LIKE_i  # E: Unsupported operand types
+AR_M // AR_LIKE_f  # E: Unsupported operand types
+AR_M // AR_LIKE_c  # E: Unsupported operand types
+AR_M // AR_LIKE_m  # E: Unsupported operand types
+AR_M // AR_LIKE_M  # E: Unsupported operand types
+
+AR_b // AR_LIKE_M  # E: Unsupported operand types
+AR_u // AR_LIKE_M  # E: Unsupported operand types
+AR_i // AR_LIKE_M  # E: Unsupported operand types
+AR_f // AR_LIKE_M  # E: Unsupported operand types
+AR_c // AR_LIKE_M  # E: Unsupported operand types
+AR_m // AR_LIKE_M  # E: Unsupported operand types
+AR_M // AR_LIKE_M  # E: Unsupported operand types
+
+_3 = AR_m // AR_LIKE_b  # E: Need type annotation
+AR_m // AR_LIKE_c  # E: Unsupported operand types
+
+AR_b // AR_LIKE_m  # E: Unsupported operand types
+AR_u // AR_LIKE_m  # E: Unsupported operand types
+AR_i // AR_LIKE_m  # E: Unsupported operand types
+AR_f // AR_LIKE_m  # E: Unsupported operand types
+AR_c // AR_LIKE_m  # E: Unsupported operand types
+
+# Array multiplication
+
+AR_b *= AR_LIKE_u  # E: incompatible type
+AR_b *= AR_LIKE_i  # E: incompatible type
+AR_b *= AR_LIKE_f  # E: incompatible type
+AR_b *= AR_LIKE_c  # E: incompatible type
+AR_b *= AR_LIKE_m  # E: incompatible type
+
+AR_u *= AR_LIKE_i  # E: incompatible type
+AR_u *= AR_LIKE_f  # E: incompatible type
+AR_u *= AR_LIKE_c  # E: incompatible type
+AR_u *= AR_LIKE_m  # E: incompatible type
+
+AR_i *= AR_LIKE_f  # E: incompatible type
+AR_i *= AR_LIKE_c  # E: incompatible type
+AR_i *= AR_LIKE_m  # E: incompatible type
+
+AR_f *= AR_LIKE_c  # E: incompatible type
+AR_f *= AR_LIKE_m  # E: incompatible type
+
+# Array power
+
+AR_b **= AR_LIKE_b  # E: Invalid self argument
+AR_b **= AR_LIKE_u  # E: Invalid self argument
+AR_b **= AR_LIKE_i  # E: Invalid self argument
+AR_b **= AR_LIKE_f  # E: Invalid self argument
+AR_b **= AR_LIKE_c  # E: Invalid self argument
+
+AR_u **= AR_LIKE_i  # E: incompatible type
+AR_u **= AR_LIKE_f  # E: incompatible type
+AR_u **= AR_LIKE_c  # E: incompatible type
+
+AR_i **= AR_LIKE_f  # E: incompatible type
+AR_i **= AR_LIKE_c  # E: incompatible type
+
+AR_f **= AR_LIKE_c  # E: incompatible type
+
+# Scalars
+
+b_ - b_  # E: No overload variant
+
+dt + dt  # E: Unsupported operand types
+td - dt  # E: Unsupported operand types
+td % 1  # E: Unsupported operand types
+td / dt  # E: No overload
+td % dt  # E: Unsupported operand types
+
+-b_  # E: Unsupported operand type
++b_  # E: Unsupported operand type
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/fail/array_constructors.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/fail/array_constructors.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..278894631f937151177e9b4e5a4c815772a16676
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/fail/array_constructors.pyi
@@ -0,0 +1,33 @@
+import numpy as np
+
+a: np.ndarray
+generator = (i for i in range(10))
+
+np.require(a, requirements=1)  # E: No overload variant
+np.require(a, requirements="TEST")  # E: incompatible type
+
+np.zeros("test")  # E: incompatible type
+np.zeros()  # E: require at least one argument
+
+np.ones("test")  # E: incompatible type
+np.ones()  # E: require at least one argument
+
+np.array(0, float, True)  # E: No overload variant
+
+np.linspace(None, 'bob')  # E: No overload variant
+np.linspace(0, 2, num=10.0)  # E: No overload variant
+np.linspace(0, 2, endpoint='True')  # E: No overload variant
+np.linspace(0, 2, retstep=b'False')  # E: No overload variant
+np.linspace(0, 2, dtype=0)  # E: No overload variant
+np.linspace(0, 2, axis=None)  # E: No overload variant
+
+np.logspace(None, 'bob')  # E: No overload variant
+np.logspace(0, 2, base=None)  # E: No overload variant
+
+np.geomspace(None, 'bob')  # E: No overload variant
+
+np.stack(generator)  # E: No overload variant
+np.hstack({1, 2})  # E: No overload variant
+np.vstack(1)  # E: No overload variant
+
+np.array([1], like=1)  # E: No overload variant
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/fail/array_like.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/fail/array_like.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..133b5fd497006be2680dd108ed4cb5696442bad5
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/fail/array_like.pyi
@@ -0,0 +1,16 @@
+import numpy as np
+from numpy._typing import ArrayLike
+
+
+class A:
+    pass
+
+
+x1: ArrayLike = (i for i in range(10))  # E: Incompatible types in assignment
+x2: ArrayLike = A()  # E: Incompatible types in assignment
+x3: ArrayLike = {1: "foo", 2: "bar"}  # E: Incompatible types in assignment
+
+scalar = np.int64(1)
+scalar.__array__(dtype=np.float64)  # E: No overload variant
+array = np.array([1])
+array.__array__(dtype=np.float64)  # E: No overload variant
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/fail/array_pad.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/fail/array_pad.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..2be51a87181dcc14068d7036fe44d1d3cc9d9d6f
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/fail/array_pad.pyi
@@ -0,0 +1,6 @@
+import numpy as np
+import numpy.typing as npt
+
+AR_i8: npt.NDArray[np.int64]
+
+np.pad(AR_i8, 2, mode="bob")  # E: No overload variant
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/fail/arrayprint.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/fail/arrayprint.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..71b921e3a5a3774548a9beab955a3b481d360d21
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/fail/arrayprint.pyi
@@ -0,0 +1,14 @@
+from collections.abc import Callable
+from typing import Any
+import numpy as np
+
+AR: np.ndarray
+func1: Callable[[Any], str]
+func2: Callable[[np.integer[Any]], str]
+
+np.array2string(AR, style=None)  # E: Unexpected keyword argument
+np.array2string(AR, legacy="1.14")  # E: incompatible type
+np.array2string(AR, sign="*")  # E: incompatible type
+np.array2string(AR, floatmode="default")  # E: incompatible type
+np.array2string(AR, formatter={"A": func1})  # E: incompatible type
+np.array2string(AR, formatter={"float": func2})  # E: Incompatible types
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/fail/arrayterator.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/fail/arrayterator.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..c50fb2ec4e52f7e09eff0067135168cc98b96389
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/fail/arrayterator.pyi
@@ -0,0 +1,14 @@
+from typing import Any
+import numpy as np
+
+AR_i8: np.ndarray[Any, np.dtype[np.int64]]
+ar_iter = np.lib.Arrayterator(AR_i8)
+
+np.lib.Arrayterator(np.int64())  # E: incompatible type
+ar_iter.shape = (10, 5)  # E: is read-only
+ar_iter[None]  # E: Invalid index type
+ar_iter[None, 1]  # E: Invalid index type
+ar_iter[np.intp()]  # E: Invalid index type
+ar_iter[np.intp(), ...]  # E: Invalid index type
+ar_iter[AR_i8]  # E: Invalid index type
+ar_iter[AR_i8, :]  # E: Invalid index type
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/fail/bitwise_ops.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/fail/bitwise_ops.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..ee9090007924620b987d1f734c0269398671075d
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/fail/bitwise_ops.pyi
@@ -0,0 +1,20 @@
+import numpy as np
+
+i8 = np.int64()
+i4 = np.int32()
+u8 = np.uint64()
+b_ = np.bool_()
+i = int()
+
+f8 = np.float64()
+
+b_ >> f8  # E: No overload variant
+i8 << f8  # E: No overload variant
+i | f8  # E: Unsupported operand types
+i8 ^ f8  # E: No overload variant
+u8 & f8  # E: No overload variant
+~f8  # E: Unsupported operand type
+
+# mypys' error message for `NoReturn` is unfortunately pretty bad
+# TODO: Re-enable this once we add support for numerical precision for `number`s
+# a = u8 | 0  # E: Need type annotation
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/fail/char.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/fail/char.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..320f05df5228a8802dcd117dea9b8c8185a7a943
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/fail/char.pyi
@@ -0,0 +1,66 @@
+import numpy as np
+import numpy.typing as npt
+
+AR_U: npt.NDArray[np.str_]
+AR_S: npt.NDArray[np.bytes_]
+
+np.char.equal(AR_U, AR_S)  # E: incompatible type
+
+np.char.not_equal(AR_U, AR_S)  # E: incompatible type
+
+np.char.greater_equal(AR_U, AR_S)  # E: incompatible type
+
+np.char.less_equal(AR_U, AR_S)  # E: incompatible type
+
+np.char.greater(AR_U, AR_S)  # E: incompatible type
+
+np.char.less(AR_U, AR_S)  # E: incompatible type
+
+np.char.encode(AR_S)  # E: incompatible type
+np.char.decode(AR_U)  # E: incompatible type
+
+np.char.join(AR_U, b"_")  # E: incompatible type
+np.char.join(AR_S, "_")  # E: incompatible type
+
+np.char.ljust(AR_U, 5, fillchar=b"a")  # E: incompatible type
+np.char.ljust(AR_S, 5, fillchar="a")  # E: incompatible type
+np.char.rjust(AR_U, 5, fillchar=b"a")  # E: incompatible type
+np.char.rjust(AR_S, 5, fillchar="a")  # E: incompatible type
+
+np.char.lstrip(AR_U, chars=b"a")  # E: incompatible type
+np.char.lstrip(AR_S, chars="a")  # E: incompatible type
+np.char.strip(AR_U, chars=b"a")  # E: incompatible type
+np.char.strip(AR_S, chars="a")  # E: incompatible type
+np.char.rstrip(AR_U, chars=b"a")  # E: incompatible type
+np.char.rstrip(AR_S, chars="a")  # E: incompatible type
+
+np.char.partition(AR_U, b"a")  # E: incompatible type
+np.char.partition(AR_S, "a")  # E: incompatible type
+np.char.rpartition(AR_U, b"a")  # E: incompatible type
+np.char.rpartition(AR_S, "a")  # E: incompatible type
+
+np.char.replace(AR_U, b"_", b"-")  # E: incompatible type
+np.char.replace(AR_S, "_", "-")  # E: incompatible type
+
+np.char.split(AR_U, b"_")  # E: incompatible type
+np.char.split(AR_S, "_")  # E: incompatible type
+np.char.rsplit(AR_U, b"_")  # E: incompatible type
+np.char.rsplit(AR_S, "_")  # E: incompatible type
+
+np.char.count(AR_U, b"a", start=[1, 2, 3])  # E: incompatible type
+np.char.count(AR_S, "a", end=9)  # E: incompatible type
+
+np.char.endswith(AR_U, b"a", start=[1, 2, 3])  # E: incompatible type
+np.char.endswith(AR_S, "a", end=9)  # E: incompatible type
+np.char.startswith(AR_U, b"a", start=[1, 2, 3])  # E: incompatible type
+np.char.startswith(AR_S, "a", end=9)  # E: incompatible type
+
+np.char.find(AR_U, b"a", start=[1, 2, 3])  # E: incompatible type
+np.char.find(AR_S, "a", end=9)  # E: incompatible type
+np.char.rfind(AR_U, b"a", start=[1, 2, 3])  # E: incompatible type
+np.char.rfind(AR_S, "a", end=9)  # E: incompatible type
+
+np.char.index(AR_U, b"a", start=[1, 2, 3])  # E: incompatible type
+np.char.index(AR_S, "a", end=9)  # E: incompatible type
+np.char.rindex(AR_U, b"a", start=[1, 2, 3])  # E: incompatible type
+np.char.rindex(AR_S, "a", end=9)  # E: incompatible type
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/fail/chararray.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/fail/chararray.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..ebc182ec2f0409ddb6218b55b8d8ada528e1ddb9
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/fail/chararray.pyi
@@ -0,0 +1,62 @@
+import numpy as np
+from typing import Any
+
+AR_U: np.chararray[Any, np.dtype[np.str_]]
+AR_S: np.chararray[Any, np.dtype[np.bytes_]]
+
+AR_S.encode()  # E: Invalid self argument
+AR_U.decode()  # E: Invalid self argument
+
+AR_U.join(b"_")  # E: incompatible type
+AR_S.join("_")  # E: incompatible type
+
+AR_U.ljust(5, fillchar=b"a")  # E: incompatible type
+AR_S.ljust(5, fillchar="a")  # E: incompatible type
+AR_U.rjust(5, fillchar=b"a")  # E: incompatible type
+AR_S.rjust(5, fillchar="a")  # E: incompatible type
+
+AR_U.lstrip(chars=b"a")  # E: incompatible type
+AR_S.lstrip(chars="a")  # E: incompatible type
+AR_U.strip(chars=b"a")  # E: incompatible type
+AR_S.strip(chars="a")  # E: incompatible type
+AR_U.rstrip(chars=b"a")  # E: incompatible type
+AR_S.rstrip(chars="a")  # E: incompatible type
+
+AR_U.partition(b"a")  # E: incompatible type
+AR_S.partition("a")  # E: incompatible type
+AR_U.rpartition(b"a")  # E: incompatible type
+AR_S.rpartition("a")  # E: incompatible type
+
+AR_U.replace(b"_", b"-")  # E: incompatible type
+AR_S.replace("_", "-")  # E: incompatible type
+
+AR_U.split(b"_")  # E: incompatible type
+AR_S.split("_")  # E: incompatible type
+AR_S.split(1)  # E: incompatible type
+AR_U.rsplit(b"_")  # E: incompatible type
+AR_S.rsplit("_")  # E: incompatible type
+
+AR_U.count(b"a", start=[1, 2, 3])  # E: incompatible type
+AR_S.count("a", end=9)  # E: incompatible type
+
+AR_U.endswith(b"a", start=[1, 2, 3])  # E: incompatible type
+AR_S.endswith("a", end=9)  # E: incompatible type
+AR_U.startswith(b"a", start=[1, 2, 3])  # E: incompatible type
+AR_S.startswith("a", end=9)  # E: incompatible type
+
+AR_U.find(b"a", start=[1, 2, 3])  # E: incompatible type
+AR_S.find("a", end=9)  # E: incompatible type
+AR_U.rfind(b"a", start=[1, 2, 3])  # E: incompatible type
+AR_S.rfind("a", end=9)  # E: incompatible type
+
+AR_U.index(b"a", start=[1, 2, 3])  # E: incompatible type
+AR_S.index("a", end=9)  # E: incompatible type
+AR_U.rindex(b"a", start=[1, 2, 3])  # E: incompatible type
+AR_S.rindex("a", end=9)  # E: incompatible type
+
+AR_U == AR_S  # E: Unsupported operand types
+AR_U != AR_S  # E: Unsupported operand types
+AR_U >= AR_S  # E: Unsupported operand types
+AR_U <= AR_S  # E: Unsupported operand types
+AR_U > AR_S  # E: Unsupported operand types
+AR_U < AR_S  # E: Unsupported operand types
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/fail/comparisons.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/fail/comparisons.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..febd0a18c89107fb4d433ac4532657f888ab15ab
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/fail/comparisons.pyi
@@ -0,0 +1,27 @@
+from typing import Any
+import numpy as np
+
+AR_i: np.ndarray[Any, np.dtype[np.int64]]
+AR_f: np.ndarray[Any, np.dtype[np.float64]]
+AR_c: np.ndarray[Any, np.dtype[np.complex128]]
+AR_m: np.ndarray[Any, np.dtype[np.timedelta64]]
+AR_M: np.ndarray[Any, np.dtype[np.datetime64]]
+
+AR_f > AR_m  # E: Unsupported operand types
+AR_c > AR_m  # E: Unsupported operand types
+
+AR_m > AR_f  # E: Unsupported operand types
+AR_m > AR_c  # E: Unsupported operand types
+
+AR_i > AR_M  # E: Unsupported operand types
+AR_f > AR_M  # E: Unsupported operand types
+AR_m > AR_M  # E: Unsupported operand types
+
+AR_M > AR_i  # E: Unsupported operand types
+AR_M > AR_f  # E: Unsupported operand types
+AR_M > AR_m  # E: Unsupported operand types
+
+AR_i > str()  # E: No overload variant
+AR_i > bytes()  # E: No overload variant
+str() > AR_M  # E: Unsupported operand types
+bytes() > AR_M  # E: Unsupported operand types
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/fail/constants.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/fail/constants.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..324cbe9fa735c40fb630cab3380d844392aabf92
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/fail/constants.pyi
@@ -0,0 +1,7 @@
+import numpy as np
+
+np.Inf = np.Inf  # E: Cannot assign to final
+np.ALLOW_THREADS = np.ALLOW_THREADS  # E: Cannot assign to final
+np.little_endian = np.little_endian  # E: Cannot assign to final
+np.UFUNC_PYVALS_NAME = "bob"  # E: Incompatible types
+np.CLIP = 2  # E: Incompatible types
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/fail/datasource.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/fail/datasource.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..345277d45370fe1442f6cf010528a3eefce07f29
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/fail/datasource.pyi
@@ -0,0 +1,15 @@
+from pathlib import Path
+import numpy as np
+
+path: Path
+d1: np.DataSource
+
+d1.abspath(path)  # E: incompatible type
+d1.abspath(b"...")  # E: incompatible type
+
+d1.exists(path)  # E: incompatible type
+d1.exists(b"...")  # E: incompatible type
+
+d1.open(path, "r")  # E: incompatible type
+d1.open(b"...", encoding="utf8")  # E: incompatible type
+d1.open(None, newline="/n")  # E: incompatible type
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/fail/dtype.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/fail/dtype.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..0f3810f3c014aafac0e149cfc6da0ec38c61f165
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/fail/dtype.pyi
@@ -0,0 +1,20 @@
+import numpy as np
+
+
+class Test1:
+    not_dtype = np.dtype(float)
+
+
+class Test2:
+    dtype = float
+
+
+np.dtype(Test1())  # E: No overload variant of "dtype" matches
+np.dtype(Test2())  # E: incompatible type
+
+np.dtype(  # E: No overload variant of "dtype" matches
+    {
+        "field1": (float, 1),
+        "field2": (int, 3),
+    }
+)
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/fail/einsumfunc.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/fail/einsumfunc.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..2d1f3741851ee0533dcc2b1171a6bf7c98f76c93
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/fail/einsumfunc.pyi
@@ -0,0 +1,12 @@
+from typing import Any
+import numpy as np
+
+AR_i: np.ndarray[Any, np.dtype[np.int64]]
+AR_f: np.ndarray[Any, np.dtype[np.float64]]
+AR_m: np.ndarray[Any, np.dtype[np.timedelta64]]
+AR_U: np.ndarray[Any, np.dtype[np.str_]]
+
+np.einsum("i,i->i", AR_i, AR_m)  # E: incompatible type
+np.einsum("i,i->i", AR_f, AR_f, dtype=np.int32)  # E: incompatible type
+np.einsum("i,i->i", AR_i, AR_i, out=AR_U)  # E: Value of type variable "_ArrayType" of "einsum" cannot be
+np.einsum("i,i->i", AR_i, AR_i, out=AR_U, casting="unsafe")  # E: No overload variant
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/fail/false_positives.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/fail/false_positives.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..7e79230663c2956acdc6addeab8efaca5b44d563
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/fail/false_positives.pyi
@@ -0,0 +1,11 @@
+import numpy as np
+import numpy.typing as npt
+
+AR_f8: npt.NDArray[np.float64]
+
+# NOTE: Mypy bug presumably due to the special-casing of heterogeneous tuples;
+# xref numpy/numpy#20901
+#
+# The expected output should be no different than, e.g., when using a
+# list instead of a tuple
+np.concatenate(([1], AR_f8))  # E: Argument 1 to "concatenate" has incompatible type
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/fail/flatiter.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/fail/flatiter.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..b4ce10ba566d7ccfb2c6523c926bf4571c7e4a27
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/fail/flatiter.pyi
@@ -0,0 +1,25 @@
+from typing import Any
+
+import numpy as np
+from numpy._typing import _SupportsArray
+
+
+class Index:
+    def __index__(self) -> int:
+        ...
+
+
+a: "np.flatiter[np.ndarray]"
+supports_array: _SupportsArray
+
+a.base = Any  # E: Property "base" defined in "flatiter" is read-only
+a.coords = Any  # E: Property "coords" defined in "flatiter" is read-only
+a.index = Any  # E: Property "index" defined in "flatiter" is read-only
+a.copy(order='C')  # E: Unexpected keyword argument
+
+# NOTE: Contrary to `ndarray.__getitem__` its counterpart in `flatiter`
+# does not accept objects with the `__array__` or `__index__` protocols;
+# boolean indexing is just plain broken (gh-17175)
+a[np.bool_()]  # E: No overload variant of "__getitem__"
+a[Index()]  # E: No overload variant of "__getitem__"
+a[supports_array]  # E: No overload variant of "__getitem__"
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/fail/fromnumeric.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/fail/fromnumeric.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..b679703c7dd61ccc0fb5b54a0582a1401095e67d
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/fail/fromnumeric.pyi
@@ -0,0 +1,161 @@
+"""Tests for :mod:`numpy.core.fromnumeric`."""
+
+import numpy as np
+import numpy.typing as npt
+
+A = np.array(True, ndmin=2, dtype=bool)
+A.setflags(write=False)
+AR_U: npt.NDArray[np.str_]
+
+a = np.bool_(True)
+
+np.take(a, None)  # E: No overload variant
+np.take(a, axis=1.0)  # E: No overload variant
+np.take(A, out=1)  # E: No overload variant
+np.take(A, mode="bob")  # E: No overload variant
+
+np.reshape(a, None)  # E: No overload variant
+np.reshape(A, 1, order="bob")  # E: No overload variant
+
+np.choose(a, None)  # E: No overload variant
+np.choose(a, out=1.0)  # E: No overload variant
+np.choose(A, mode="bob")  # E: No overload variant
+
+np.repeat(a, None)  # E: No overload variant
+np.repeat(A, 1, axis=1.0)  # E: No overload variant
+
+np.swapaxes(A, None, 1)  # E: No overload variant
+np.swapaxes(A, 1, [0])  # E: No overload variant
+
+np.transpose(A, axes=1.0)  # E: No overload variant
+
+np.partition(a, None)  # E: No overload variant
+np.partition(  # E: No overload variant
+    a, 0, axis="bob"
+)
+np.partition(  # E: No overload variant
+    A, 0, kind="bob"
+)
+np.partition(
+    A, 0, order=range(5)  # E: Argument "order" to "partition" has incompatible type
+)
+
+np.argpartition(
+    a, None  # E: incompatible type
+)
+np.argpartition(
+    a, 0, axis="bob"  # E: incompatible type
+)
+np.argpartition(
+    A, 0, kind="bob"  # E: incompatible type
+)
+np.argpartition(
+    A, 0, order=range(5)  # E: Argument "order" to "argpartition" has incompatible type
+)
+
+np.sort(A, axis="bob")  # E: No overload variant
+np.sort(A, kind="bob")  # E: No overload variant
+np.sort(A, order=range(5))  # E: Argument "order" to "sort" has incompatible type
+
+np.argsort(A, axis="bob")  # E: Argument "axis" to "argsort" has incompatible type
+np.argsort(A, kind="bob")  # E: Argument "kind" to "argsort" has incompatible type
+np.argsort(A, order=range(5))  # E: Argument "order" to "argsort" has incompatible type
+
+np.argmax(A, axis="bob")  # E: No overload variant of "argmax" matches argument type
+np.argmax(A, kind="bob")  # E: No overload variant of "argmax" matches argument type
+
+np.argmin(A, axis="bob")  # E: No overload variant of "argmin" matches argument type
+np.argmin(A, kind="bob")  # E: No overload variant of "argmin" matches argument type
+
+np.searchsorted(  # E: No overload variant of "searchsorted" matches argument type
+    A[0], 0, side="bob"
+)
+np.searchsorted(  # E: No overload variant of "searchsorted" matches argument type
+    A[0], 0, sorter=1.0
+)
+
+np.resize(A, 1.0)  # E: No overload variant
+
+np.squeeze(A, 1.0)  # E: No overload variant of "squeeze" matches argument type
+
+np.diagonal(A, offset=None)  # E: No overload variant
+np.diagonal(A, axis1="bob")  # E: No overload variant
+np.diagonal(A, axis2=[])  # E: No overload variant
+
+np.trace(A, offset=None)  # E: No overload variant
+np.trace(A, axis1="bob")  # E: No overload variant
+np.trace(A, axis2=[])  # E: No overload variant
+
+np.ravel(a, order="bob")  # E: No overload variant
+
+np.compress(  # E: No overload variant
+    [True], A, axis=1.0
+)
+
+np.clip(a, 1, 2, out=1)  # E: No overload variant of "clip" matches argument type
+
+np.sum(a, axis=1.0)  # E: No overload variant
+np.sum(a, keepdims=1.0)  # E: No overload variant
+np.sum(a, initial=[1])  # E: No overload variant
+
+np.all(a, axis=1.0)  # E: No overload variant
+np.all(a, keepdims=1.0)  # E: No overload variant
+np.all(a, out=1.0)  # E: No overload variant
+
+np.any(a, axis=1.0)  # E: No overload variant
+np.any(a, keepdims=1.0)  # E: No overload variant
+np.any(a, out=1.0)  # E: No overload variant
+
+np.cumsum(a, axis=1.0)  # E: No overload variant
+np.cumsum(a, dtype=1.0)  # E: No overload variant
+np.cumsum(a, out=1.0)  # E: No overload variant
+
+np.ptp(a, axis=1.0)  # E: No overload variant
+np.ptp(a, keepdims=1.0)  # E: No overload variant
+np.ptp(a, out=1.0)  # E: No overload variant
+
+np.amax(a, axis=1.0)  # E: No overload variant
+np.amax(a, keepdims=1.0)  # E: No overload variant
+np.amax(a, out=1.0)  # E: No overload variant
+np.amax(a, initial=[1.0])  # E: No overload variant
+np.amax(a, where=[1.0])  # E: incompatible type
+
+np.amin(a, axis=1.0)  # E: No overload variant
+np.amin(a, keepdims=1.0)  # E: No overload variant
+np.amin(a, out=1.0)  # E: No overload variant
+np.amin(a, initial=[1.0])  # E: No overload variant
+np.amin(a, where=[1.0])  # E: incompatible type
+
+np.prod(a, axis=1.0)  # E: No overload variant
+np.prod(a, out=False)  # E: No overload variant
+np.prod(a, keepdims=1.0)  # E: No overload variant
+np.prod(a, initial=int)  # E: No overload variant
+np.prod(a, where=1.0)  # E: No overload variant
+np.prod(AR_U)  # E: incompatible type
+
+np.cumprod(a, axis=1.0)  # E: No overload variant
+np.cumprod(a, out=False)  # E: No overload variant
+np.cumprod(AR_U)  # E: incompatible type
+
+np.size(a, axis=1.0)  # E: Argument "axis" to "size" has incompatible type
+
+np.around(a, decimals=1.0)  # E: No overload variant
+np.around(a, out=type)  # E: No overload variant
+np.around(AR_U)  # E: incompatible type
+
+np.mean(a, axis=1.0)  # E: No overload variant
+np.mean(a, out=False)  # E: No overload variant
+np.mean(a, keepdims=1.0)  # E: No overload variant
+np.mean(AR_U)  # E: incompatible type
+
+np.std(a, axis=1.0)  # E: No overload variant
+np.std(a, out=False)  # E: No overload variant
+np.std(a, ddof='test')  # E: No overload variant
+np.std(a, keepdims=1.0)  # E: No overload variant
+np.std(AR_U)  # E: incompatible type
+
+np.var(a, axis=1.0)  # E: No overload variant
+np.var(a, out=False)  # E: No overload variant
+np.var(a, ddof='test')  # E: No overload variant
+np.var(a, keepdims=1.0)  # E: No overload variant
+np.var(AR_U)  # E: incompatible type
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/fail/histograms.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/fail/histograms.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..22499d39175ac4252d6ebc7a8c9c63421d64faee
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/fail/histograms.pyi
@@ -0,0 +1,12 @@
+import numpy as np
+import numpy.typing as npt
+
+AR_i8: npt.NDArray[np.int64]
+AR_f8: npt.NDArray[np.float64]
+
+np.histogram_bin_edges(AR_i8, range=(0, 1, 2))  # E: incompatible type
+
+np.histogram(AR_i8, range=(0, 1, 2))  # E: incompatible type
+
+np.histogramdd(AR_i8, range=(0, 1))  # E: incompatible type
+np.histogramdd(AR_i8, range=[(0, 1, 2)])  # E: incompatible type
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/fail/index_tricks.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/fail/index_tricks.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..22f6f4a61e8e11079e40d3755b0c01200ffdf762
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/fail/index_tricks.pyi
@@ -0,0 +1,14 @@
+import numpy as np
+
+AR_LIKE_i: list[int]
+AR_LIKE_f: list[float]
+
+np.ndindex([1, 2, 3])  # E: No overload variant
+np.unravel_index(AR_LIKE_f, (1, 2, 3))  # E: incompatible type
+np.ravel_multi_index(AR_LIKE_i, (1, 2, 3), mode="bob")  # E: No overload variant
+np.mgrid[1]  # E: Invalid index type
+np.mgrid[...]  # E: Invalid index type
+np.ogrid[1]  # E: Invalid index type
+np.ogrid[...]  # E: Invalid index type
+np.fill_diagonal(AR_LIKE_f, 2)  # E: incompatible type
+np.diag_indices(1.0)  # E: incompatible type
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/fail/lib_function_base.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/fail/lib_function_base.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..9cad2da03911e848ad5791286a52598c996d3285
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/fail/lib_function_base.pyi
@@ -0,0 +1,53 @@
+from typing import Any
+
+import numpy as np
+import numpy.typing as npt
+
+AR_f8: npt.NDArray[np.float64]
+AR_c16: npt.NDArray[np.complex128]
+AR_m: npt.NDArray[np.timedelta64]
+AR_M: npt.NDArray[np.datetime64]
+AR_O: npt.NDArray[np.object_]
+
+def func(a: int) -> None: ...
+
+np.average(AR_m)  # E: incompatible type
+np.select(1, [AR_f8])  # E: incompatible type
+np.angle(AR_m)  # E: incompatible type
+np.unwrap(AR_m)  # E: incompatible type
+np.unwrap(AR_c16)  # E: incompatible type
+np.trim_zeros(1)  # E: incompatible type
+np.place(1, [True], 1.5)  # E: incompatible type
+np.vectorize(1)  # E: incompatible type
+np.add_newdoc("__main__", 1.5, "docstring")  # E: incompatible type
+np.place(AR_f8, slice(None), 5)  # E: incompatible type
+
+np.interp(AR_f8, AR_c16, AR_f8)  # E: incompatible type
+np.interp(AR_c16, AR_f8, AR_f8)  # E: incompatible type
+np.interp(AR_f8, AR_f8, AR_f8, period=AR_c16)  # E: No overload variant
+np.interp(AR_f8, AR_f8, AR_O)  # E: incompatible type
+
+np.cov(AR_m)  # E: incompatible type
+np.cov(AR_O)  # E: incompatible type
+np.corrcoef(AR_m)  # E: incompatible type
+np.corrcoef(AR_O)  # E: incompatible type
+np.corrcoef(AR_f8, bias=True)  # E: No overload variant
+np.corrcoef(AR_f8, ddof=2)  # E: No overload variant
+np.blackman(1j)  # E: incompatible type
+np.bartlett(1j)  # E: incompatible type
+np.hanning(1j)  # E: incompatible type
+np.hamming(1j)  # E: incompatible type
+np.hamming(AR_c16)  # E: incompatible type
+np.kaiser(1j, 1)  # E: incompatible type
+np.sinc(AR_O)  # E: incompatible type
+np.median(AR_M)  # E: incompatible type
+
+np.add_newdoc_ufunc(func, "docstring")  # E: incompatible type
+np.percentile(AR_f8, 50j)  # E: No overload variant
+np.percentile(AR_f8, 50, interpolation="bob")  # E: No overload variant
+np.quantile(AR_f8, 0.5j)  # E: No overload variant
+np.quantile(AR_f8, 0.5, interpolation="bob")  # E: No overload variant
+np.meshgrid(AR_f8, AR_f8, indexing="bob")  # E: incompatible type
+np.delete(AR_f8, AR_f8)  # E: incompatible type
+np.insert(AR_f8, AR_f8, 1.5)  # E: incompatible type
+np.digitize(AR_f8, 1j)  # E: No overload variant
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/fail/lib_polynomial.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/fail/lib_polynomial.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..e51b6b58e30751bef821a44127e96be71483005b
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/fail/lib_polynomial.pyi
@@ -0,0 +1,29 @@
+import numpy as np
+import numpy.typing as npt
+
+AR_f8: npt.NDArray[np.float64]
+AR_c16: npt.NDArray[np.complex128]
+AR_O: npt.NDArray[np.object_]
+AR_U: npt.NDArray[np.str_]
+
+poly_obj: np.poly1d
+
+np.polymul(AR_f8, AR_U)  # E: incompatible type
+np.polydiv(AR_f8, AR_U)  # E: incompatible type
+
+5**poly_obj  # E: No overload variant
+
+np.polyint(AR_U)  # E: incompatible type
+np.polyint(AR_f8, m=1j)  # E: No overload variant
+
+np.polyder(AR_U)  # E: incompatible type
+np.polyder(AR_f8, m=1j)  # E: No overload variant
+
+np.polyfit(AR_O, AR_f8, 1)  # E: incompatible type
+np.polyfit(AR_f8, AR_f8, 1, rcond=1j)  # E: No overload variant
+np.polyfit(AR_f8, AR_f8, 1, w=AR_c16)  # E: incompatible type
+np.polyfit(AR_f8, AR_f8, 1, cov="bob")  # E: No overload variant
+
+np.polyval(AR_f8, AR_U)  # E: incompatible type
+np.polyadd(AR_f8, AR_U)  # E: incompatible type
+np.polysub(AR_f8, AR_U)  # E: incompatible type
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/fail/lib_utils.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/fail/lib_utils.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..e16c926aa6450fc30f72e50b4463f6a0fcd7d9ad
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/fail/lib_utils.pyi
@@ -0,0 +1,13 @@
+import numpy as np
+
+np.deprecate(1)  # E: No overload variant
+
+np.deprecate_with_doc(1)  # E: incompatible type
+
+np.byte_bounds(1)  # E: incompatible type
+
+np.who(1)  # E: incompatible type
+
+np.lookfor(None)  # E: incompatible type
+
+np.safe_eval(None)  # E: incompatible type
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/fail/lib_version.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/fail/lib_version.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..2758cfe4043883eaaa3651efe726bd31b853e603
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/fail/lib_version.pyi
@@ -0,0 +1,6 @@
+from numpy.lib import NumpyVersion
+
+version: NumpyVersion
+
+NumpyVersion(b"1.8.0")  # E: incompatible type
+version >= b"1.8.0"  # E: Unsupported operand types
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/fail/linalg.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/fail/linalg.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..da9390328bd7ca1ebcab5a1ce0736f7f4df57d96
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/fail/linalg.pyi
@@ -0,0 +1,48 @@
+import numpy as np
+import numpy.typing as npt
+
+AR_f8: npt.NDArray[np.float64]
+AR_O: npt.NDArray[np.object_]
+AR_M: npt.NDArray[np.datetime64]
+
+np.linalg.tensorsolve(AR_O, AR_O)  # E: incompatible type
+
+np.linalg.solve(AR_O, AR_O)  # E: incompatible type
+
+np.linalg.tensorinv(AR_O)  # E: incompatible type
+
+np.linalg.inv(AR_O)  # E: incompatible type
+
+np.linalg.matrix_power(AR_M, 5)  # E: incompatible type
+
+np.linalg.cholesky(AR_O)  # E: incompatible type
+
+np.linalg.qr(AR_O)  # E: incompatible type
+np.linalg.qr(AR_f8, mode="bob")  # E: No overload variant
+
+np.linalg.eigvals(AR_O)  # E: incompatible type
+
+np.linalg.eigvalsh(AR_O)  # E: incompatible type
+np.linalg.eigvalsh(AR_O, UPLO="bob")  # E: No overload variant
+
+np.linalg.eig(AR_O)  # E: incompatible type
+
+np.linalg.eigh(AR_O)  # E: incompatible type
+np.linalg.eigh(AR_O, UPLO="bob")  # E: No overload variant
+
+np.linalg.svd(AR_O)  # E: incompatible type
+
+np.linalg.cond(AR_O)  # E: incompatible type
+np.linalg.cond(AR_f8, p="bob")  # E: incompatible type
+
+np.linalg.matrix_rank(AR_O)  # E: incompatible type
+
+np.linalg.pinv(AR_O)  # E: incompatible type
+
+np.linalg.slogdet(AR_O)  # E: incompatible type
+
+np.linalg.det(AR_O)  # E: incompatible type
+
+np.linalg.norm(AR_f8, ord="bob")  # E: No overload variant
+
+np.linalg.multi_dot([AR_M])  # E: incompatible type
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/fail/memmap.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/fail/memmap.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..434870b60e41948afc6fb3f593742deb2cc11e3e
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/fail/memmap.pyi
@@ -0,0 +1,5 @@
+import numpy as np
+
+with open("file.txt", "r") as f:
+    np.memmap(f)  # E: No overload variant
+np.memmap("test.txt", shape=[10, 5])  # E: No overload variant
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/fail/modules.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/fail/modules.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..c86627e0c8ea6a2ee26919233706dd58544d1624
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/fail/modules.pyi
@@ -0,0 +1,18 @@
+import numpy as np
+
+np.testing.bob  # E: Module has no attribute
+np.bob  # E: Module has no attribute
+
+# Stdlib modules in the namespace by accident
+np.warnings  # E: Module has no attribute
+np.sys  # E: Module has no attribute
+np.os  # E: Module "numpy" does not explicitly export
+np.math  # E: Module has no attribute
+
+# Public sub-modules that are not imported to their parent module by default;
+# e.g. one must first execute `import numpy.lib.recfunctions`
+np.lib.recfunctions  # E: Module has no attribute
+
+np.__NUMPY_SETUP__  # E: Module has no attribute
+np.__deprecated_attrs__  # E: Module has no attribute
+np.__expired_functions__  # E: Module has no attribute
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/fail/multiarray.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/fail/multiarray.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..425ec3d0fb4f2b6120ed497d39bff344c6e097cb
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/fail/multiarray.pyi
@@ -0,0 +1,55 @@
+import numpy as np
+import numpy.typing as npt
+
+i8: np.int64
+
+AR_b: npt.NDArray[np.bool_]
+AR_u1: npt.NDArray[np.uint8]
+AR_i8: npt.NDArray[np.int64]
+AR_f8: npt.NDArray[np.float64]
+AR_M: npt.NDArray[np.datetime64]
+
+M: np.datetime64
+
+AR_LIKE_f: list[float]
+
+def func(a: int) -> None: ...
+
+np.where(AR_b, 1)  # E: No overload variant
+
+np.can_cast(AR_f8, 1)  # E: incompatible type
+
+np.vdot(AR_M, AR_M)  # E: incompatible type
+
+np.copyto(AR_LIKE_f, AR_f8)  # E: incompatible type
+
+np.putmask(AR_LIKE_f, [True, True, False], 1.5)  # E: incompatible type
+
+np.packbits(AR_f8)  # E: incompatible type
+np.packbits(AR_u1, bitorder=">")  # E: incompatible type
+
+np.unpackbits(AR_i8)  # E: incompatible type
+np.unpackbits(AR_u1, bitorder=">")  # E: incompatible type
+
+np.shares_memory(1, 1, max_work=i8)  # E: incompatible type
+np.may_share_memory(1, 1, max_work=i8)  # E: incompatible type
+
+np.arange(M)  # E: No overload variant
+np.arange(stop=10)  # E: No overload variant
+
+np.datetime_data(int)  # E: incompatible type
+
+np.busday_offset("2012", 10)  # E: No overload variant
+
+np.datetime_as_string("2012")  # E: No overload variant
+
+np.compare_chararrays("a", b"a", "==", False)  # E: No overload variant
+
+np.add_docstring(func, None)  # E: incompatible type
+
+np.nested_iters([AR_i8, AR_i8])  # E: Missing positional argument
+np.nested_iters([AR_i8, AR_i8], 0)  # E: incompatible type
+np.nested_iters([AR_i8, AR_i8], [0])  # E: incompatible type
+np.nested_iters([AR_i8, AR_i8], [[0], [1]], flags=["test"])  # E: incompatible type
+np.nested_iters([AR_i8, AR_i8], [[0], [1]], op_flags=[["test"]])  # E: incompatible type
+np.nested_iters([AR_i8, AR_i8], [[0], [1]], buffersize=1.0)  # E: incompatible type
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/fail/ndarray.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/fail/ndarray.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..5a5130d40649087cf8a50e1b9e6cf82837cc349a
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/fail/ndarray.pyi
@@ -0,0 +1,11 @@
+import numpy as np
+
+# Ban setting dtype since mutating the type of the array in place
+# makes having ndarray be generic over dtype impossible. Generally
+# users should use `ndarray.view` in this situation anyway. See
+#
+# https://github.com/numpy/numpy-stubs/issues/7
+#
+# for more context.
+float_array = np.array([1.0])
+float_array.dtype = np.bool_  # E: Property "dtype" defined in "ndarray" is read-only
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/fail/ndarray_misc.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/fail/ndarray_misc.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..77bd9a44e8902ce85ae9b4e6e4d94c64a16f4f6e
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/fail/ndarray_misc.pyi
@@ -0,0 +1,43 @@
+"""
+Tests for miscellaneous (non-magic) ``np.ndarray``/``np.generic`` methods.
+
+More extensive tests are performed for the methods'
+function-based counterpart in `../from_numeric.py`.
+
+"""
+
+from typing import Any
+import numpy as np
+
+f8: np.float64
+AR_f8: np.ndarray[Any, np.dtype[np.float64]]
+AR_M: np.ndarray[Any, np.dtype[np.datetime64]]
+AR_b: np.ndarray[Any, np.dtype[np.bool_]]
+
+ctypes_obj = AR_f8.ctypes
+
+reveal_type(ctypes_obj.get_data())  # E: has no attribute
+reveal_type(ctypes_obj.get_shape())  # E: has no attribute
+reveal_type(ctypes_obj.get_strides())  # E: has no attribute
+reveal_type(ctypes_obj.get_as_parameter())  # E: has no attribute
+
+f8.argpartition(0)  # E: has no attribute
+f8.diagonal()  # E: has no attribute
+f8.dot(1)  # E: has no attribute
+f8.nonzero()  # E: has no attribute
+f8.partition(0)  # E: has no attribute
+f8.put(0, 2)  # E: has no attribute
+f8.setfield(2, np.float64)  # E: has no attribute
+f8.sort()  # E: has no attribute
+f8.trace()  # E: has no attribute
+
+AR_M.__int__()  # E: Invalid self argument
+AR_M.__float__()  # E: Invalid self argument
+AR_M.__complex__()  # E: Invalid self argument
+AR_b.__index__()  # E: Invalid self argument
+
+AR_f8[1.5]  # E: No overload variant
+AR_f8["field_a"]  # E: No overload variant
+AR_f8[["field_a", "field_b"]]  # E: Invalid index type
+
+AR_f8.__array_finalize__(object())  # E: incompatible type
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/fail/nditer.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/fail/nditer.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..1e8e37ee5fe09373a6be5e8a2b2ddb9f84725eb0
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/fail/nditer.pyi
@@ -0,0 +1,8 @@
+import numpy as np
+
+class Test(np.nditer): ...  # E: Cannot inherit from final class
+
+np.nditer([0, 1], flags=["test"])  # E: incompatible type
+np.nditer([0, 1], op_flags=[["test"]])  # E: incompatible type
+np.nditer([0, 1], itershape=(1.0,))  # E: incompatible type
+np.nditer([0, 1], buffersize=1.0)  # E: incompatible type
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/fail/nested_sequence.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/fail/nested_sequence.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..6301e51769fee30db50bfaf1e2777bf894166de8
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/fail/nested_sequence.pyi
@@ -0,0 +1,17 @@
+from collections.abc import Sequence
+from numpy._typing import _NestedSequence
+
+a: Sequence[float]
+b: list[complex]
+c: tuple[str, ...]
+d: int
+e: str
+
+def func(a: _NestedSequence[int]) -> None:
+    ...
+
+reveal_type(func(a))  # E: incompatible type
+reveal_type(func(b))  # E: incompatible type
+reveal_type(func(c))  # E: incompatible type
+reveal_type(func(d))  # E: incompatible type
+reveal_type(func(e))  # E: incompatible type
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/fail/npyio.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/fail/npyio.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..1749a6847e9bd8900acce08635a1df65860c89a3
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/fail/npyio.pyi
@@ -0,0 +1,27 @@
+import pathlib
+from typing import IO
+
+import numpy.typing as npt
+import numpy as np
+
+str_path: str
+bytes_path: bytes
+pathlib_path: pathlib.Path
+str_file: IO[str]
+AR_i8: npt.NDArray[np.int64]
+
+np.load(str_file)  # E: incompatible type
+
+np.save(bytes_path, AR_i8)  # E: incompatible type
+
+np.savez(bytes_path, AR_i8)  # E: incompatible type
+
+np.savez_compressed(bytes_path, AR_i8)  # E: incompatible type
+
+np.loadtxt(bytes_path)  # E: incompatible type
+
+np.fromregex(bytes_path, ".", np.int64)  # E: No overload variant
+
+np.recfromtxt(bytes_path)  # E: incompatible type
+
+np.recfromcsv(bytes_path)  # E: incompatible type
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/fail/numerictypes.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/fail/numerictypes.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..ce5662d5e66a3c62a12231f90eb1275007b546b6
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/fail/numerictypes.pyi
@@ -0,0 +1,11 @@
+import numpy as np
+
+# Technically this works, but probably shouldn't. See
+#
+# https://github.com/numpy/numpy/issues/16366
+#
+np.maximum_sctype(1)  # E: No overload variant
+
+np.issubsctype(1, np.int64)  # E: incompatible type
+
+np.issubdtype(1, np.int64)  # E: incompatible type
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/fail/random.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/fail/random.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..f0e682019281662559b2cf6bcece236a00695351
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/fail/random.pyi
@@ -0,0 +1,61 @@
+import numpy as np
+from typing import Any
+
+SEED_FLOAT: float = 457.3
+SEED_ARR_FLOAT: np.ndarray[Any, np.dtype[np.float64]] = np.array([1.0, 2, 3, 4])
+SEED_ARRLIKE_FLOAT: list[float] = [1.0, 2.0, 3.0, 4.0]
+SEED_SEED_SEQ: np.random.SeedSequence = np.random.SeedSequence(0)
+SEED_STR: str = "String seeding not allowed"
+# default rng
+np.random.default_rng(SEED_FLOAT)  # E: incompatible type
+np.random.default_rng(SEED_ARR_FLOAT)  # E: incompatible type
+np.random.default_rng(SEED_ARRLIKE_FLOAT)  # E: incompatible type
+np.random.default_rng(SEED_STR)  # E: incompatible type
+
+# Seed Sequence
+np.random.SeedSequence(SEED_FLOAT)  # E: incompatible type
+np.random.SeedSequence(SEED_ARR_FLOAT)  # E: incompatible type
+np.random.SeedSequence(SEED_ARRLIKE_FLOAT)  # E: incompatible type
+np.random.SeedSequence(SEED_SEED_SEQ)  # E: incompatible type
+np.random.SeedSequence(SEED_STR)  # E: incompatible type
+
+seed_seq: np.random.bit_generator.SeedSequence = np.random.SeedSequence()
+seed_seq.spawn(11.5)  # E: incompatible type
+seed_seq.generate_state(3.14)  # E: incompatible type
+seed_seq.generate_state(3, np.uint8)  # E: incompatible type
+seed_seq.generate_state(3, "uint8")  # E: incompatible type
+seed_seq.generate_state(3, "u1")  # E: incompatible type
+seed_seq.generate_state(3, np.uint16)  # E: incompatible type
+seed_seq.generate_state(3, "uint16")  # E: incompatible type
+seed_seq.generate_state(3, "u2")  # E: incompatible type
+seed_seq.generate_state(3, np.int32)  # E: incompatible type
+seed_seq.generate_state(3, "int32")  # E: incompatible type
+seed_seq.generate_state(3, "i4")  # E: incompatible type
+
+# Bit Generators
+np.random.MT19937(SEED_FLOAT)  # E: incompatible type
+np.random.MT19937(SEED_ARR_FLOAT)  # E: incompatible type
+np.random.MT19937(SEED_ARRLIKE_FLOAT)  # E: incompatible type
+np.random.MT19937(SEED_STR)  # E: incompatible type
+
+np.random.PCG64(SEED_FLOAT)  # E: incompatible type
+np.random.PCG64(SEED_ARR_FLOAT)  # E: incompatible type
+np.random.PCG64(SEED_ARRLIKE_FLOAT)  # E: incompatible type
+np.random.PCG64(SEED_STR)  # E: incompatible type
+
+np.random.Philox(SEED_FLOAT)  # E: incompatible type
+np.random.Philox(SEED_ARR_FLOAT)  # E: incompatible type
+np.random.Philox(SEED_ARRLIKE_FLOAT)  # E: incompatible type
+np.random.Philox(SEED_STR)  # E: incompatible type
+
+np.random.SFC64(SEED_FLOAT)  # E: incompatible type
+np.random.SFC64(SEED_ARR_FLOAT)  # E: incompatible type
+np.random.SFC64(SEED_ARRLIKE_FLOAT)  # E: incompatible type
+np.random.SFC64(SEED_STR)  # E: incompatible type
+
+# Generator
+np.random.Generator(None)  # E: incompatible type
+np.random.Generator(12333283902830213)  # E: incompatible type
+np.random.Generator("OxFEEDF00D")  # E: incompatible type
+np.random.Generator([123, 234])  # E: incompatible type
+np.random.Generator(np.array([123, 234], dtype="u4"))  # E: incompatible type
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/fail/rec.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/fail/rec.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..a57f1ba27d74504ff59232a4a5929ccaf55dd445
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/fail/rec.pyi
@@ -0,0 +1,17 @@
+import numpy as np
+import numpy.typing as npt
+
+AR_i8: npt.NDArray[np.int64]
+
+np.rec.fromarrays(1)  # E: No overload variant
+np.rec.fromarrays([1, 2, 3], dtype=[("f8", "f8")], formats=["f8", "f8"])  # E: No overload variant
+
+np.rec.fromrecords(AR_i8)  # E: incompatible type
+np.rec.fromrecords([(1.5,)], dtype=[("f8", "f8")], formats=["f8", "f8"])  # E: No overload variant
+
+np.rec.fromstring("string", dtype=[("f8", "f8")])  # E: No overload variant
+np.rec.fromstring(b"bytes")  # E: No overload variant
+np.rec.fromstring(b"(1.5,)", dtype=[("f8", "f8")], formats=["f8", "f8"])  # E: No overload variant
+
+with open("test", "r") as f:
+    np.rec.fromfile(f, dtype=[("f8", "f8")])  # E: No overload variant
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/fail/scalars.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/fail/scalars.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..2a6c2c7addfc89060112ff4e4536e00bebcaa72a
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/fail/scalars.pyi
@@ -0,0 +1,92 @@
+import sys
+import numpy as np
+
+f2: np.float16
+f8: np.float64
+c8: np.complex64
+
+# Construction
+
+np.float32(3j)  # E: incompatible type
+
+# Technically the following examples are valid NumPy code. But they
+# are not considered a best practice, and people who wish to use the
+# stubs should instead do
+#
+# np.array([1.0, 0.0, 0.0], dtype=np.float32)
+# np.array([], dtype=np.complex64)
+#
+# See e.g. the discussion on the mailing list
+#
+# https://mail.python.org/pipermail/numpy-discussion/2020-April/080566.html
+#
+# and the issue
+#
+# https://github.com/numpy/numpy-stubs/issues/41
+#
+# for more context.
+np.float32([1.0, 0.0, 0.0])  # E: incompatible type
+np.complex64([])  # E: incompatible type
+
+np.complex64(1, 2)  # E: Too many arguments
+# TODO: protocols (can't check for non-existent protocols w/ __getattr__)
+
+np.datetime64(0)  # E: No overload variant
+
+class A:
+    def __float__(self):
+        return 1.0
+
+
+np.int8(A())  # E: incompatible type
+np.int16(A())  # E: incompatible type
+np.int32(A())  # E: incompatible type
+np.int64(A())  # E: incompatible type
+np.uint8(A())  # E: incompatible type
+np.uint16(A())  # E: incompatible type
+np.uint32(A())  # E: incompatible type
+np.uint64(A())  # E: incompatible type
+
+np.void("test")  # E: No overload variant
+np.void("test", dtype=None)  # E: No overload variant
+
+np.generic(1)  # E: Cannot instantiate abstract class
+np.number(1)  # E: Cannot instantiate abstract class
+np.integer(1)  # E: Cannot instantiate abstract class
+np.inexact(1)  # E: Cannot instantiate abstract class
+np.character("test")  # E: Cannot instantiate abstract class
+np.flexible(b"test")  # E: Cannot instantiate abstract class
+
+np.float64(value=0.0)  # E: Unexpected keyword argument
+np.int64(value=0)  # E: Unexpected keyword argument
+np.uint64(value=0)  # E: Unexpected keyword argument
+np.complex128(value=0.0j)  # E: Unexpected keyword argument
+np.str_(value='bob')  # E: No overload variant
+np.bytes_(value=b'test')  # E: No overload variant
+np.void(value=b'test')  # E: No overload variant
+np.bool_(value=True)  # E: Unexpected keyword argument
+np.datetime64(value="2019")  # E: No overload variant
+np.timedelta64(value=0)  # E: Unexpected keyword argument
+
+np.bytes_(b"hello", encoding='utf-8')  # E: No overload variant
+np.str_("hello", encoding='utf-8')  # E: No overload variant
+
+f8.item(1)  # E: incompatible type
+f8.item((0, 1))  # E: incompatible type
+f8.squeeze(axis=1)  # E: incompatible type
+f8.squeeze(axis=(0, 1))  # E: incompatible type
+f8.transpose(1)  # E: incompatible type
+
+def func(a: np.float32) -> None: ...
+
+func(f2)  # E: incompatible type
+func(f8)  # E: incompatible type
+
+round(c8)  # E: No overload variant
+
+c8.__getnewargs__()  # E: Invalid self argument
+f2.__getnewargs__()  # E: Invalid self argument
+f2.hex()  # E: Invalid self argument
+np.float16.fromhex("0x0.0p+0")  # E: Invalid self argument
+f2.__trunc__()  # E: Invalid self argument
+f2.__getformat__("float")  # E: Invalid self argument
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/fail/shape_base.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/fail/shape_base.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..e709741b7935ec7269affd836f5256a0842ddd0a
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/fail/shape_base.pyi
@@ -0,0 +1,8 @@
+import numpy as np
+
+class DTypeLike:
+    dtype: np.dtype[np.int_]
+
+dtype_like: DTypeLike
+
+np.expand_dims(dtype_like, (5, 10))  # E: No overload variant
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/fail/stride_tricks.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/fail/stride_tricks.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..f2bfba7432a89b41e095377e1d7e0e5f87d07109
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/fail/stride_tricks.pyi
@@ -0,0 +1,9 @@
+import numpy as np
+import numpy.typing as npt
+
+AR_f8: npt.NDArray[np.float64]
+
+np.lib.stride_tricks.as_strided(AR_f8, shape=8)  # E: No overload variant
+np.lib.stride_tricks.as_strided(AR_f8, strides=8)  # E: No overload variant
+
+np.lib.stride_tricks.sliding_window_view(AR_f8, axis=(1,))  # E: No overload variant
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/fail/testing.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/fail/testing.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..803870e2feadd18815ebc57665aa63d42423c752
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/fail/testing.pyi
@@ -0,0 +1,28 @@
+import numpy as np
+import numpy.typing as npt
+
+AR_U: npt.NDArray[np.str_]
+
+def func() -> bool: ...
+
+np.testing.assert_(True, msg=1)  # E: incompatible type
+np.testing.build_err_msg(1, "test")  # E: incompatible type
+np.testing.assert_almost_equal(AR_U, AR_U)  # E: incompatible type
+np.testing.assert_approx_equal([1, 2, 3], [1, 2, 3])  # E: incompatible type
+np.testing.assert_array_almost_equal(AR_U, AR_U)  # E: incompatible type
+np.testing.assert_array_less(AR_U, AR_U)  # E: incompatible type
+np.testing.assert_string_equal(b"a", b"a")  # E: incompatible type
+
+np.testing.assert_raises(expected_exception=TypeError, callable=func)  # E: No overload variant
+np.testing.assert_raises_regex(expected_exception=TypeError, expected_regex="T", callable=func)  # E: No overload variant
+
+np.testing.assert_allclose(AR_U, AR_U)  # E: incompatible type
+np.testing.assert_array_almost_equal_nulp(AR_U, AR_U)  # E: incompatible type
+np.testing.assert_array_max_ulp(AR_U, AR_U)  # E: incompatible type
+
+np.testing.assert_warns(warning_class=RuntimeWarning, func=func)  # E: No overload variant
+np.testing.assert_no_warnings(func=func)  # E: No overload variant
+np.testing.assert_no_warnings(func, None)  # E: Too many arguments
+np.testing.assert_no_warnings(func, test=None)  # E: Unexpected keyword argument
+
+np.testing.assert_no_gc_cycles(func=func)  # E: No overload variant
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/fail/twodim_base.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/fail/twodim_base.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..faa430095a5fabbf721732ecec867cac434e9259
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/fail/twodim_base.pyi
@@ -0,0 +1,37 @@
+from typing import Any, TypeVar
+
+import numpy as np
+import numpy.typing as npt
+
+
+def func1(ar: npt.NDArray[Any], a: int) -> npt.NDArray[np.str_]:
+    pass
+
+
+def func2(ar: npt.NDArray[Any], a: float) -> float:
+    pass
+
+
+AR_b: npt.NDArray[np.bool_]
+AR_m: npt.NDArray[np.timedelta64]
+
+AR_LIKE_b: list[bool]
+
+np.eye(10, M=20.0)  # E: No overload variant
+np.eye(10, k=2.5, dtype=int)  # E: No overload variant
+
+np.diag(AR_b, k=0.5)  # E: No overload variant
+np.diagflat(AR_b, k=0.5)  # E: No overload variant
+
+np.tri(10, M=20.0)  # E: No overload variant
+np.tri(10, k=2.5, dtype=int)  # E: No overload variant
+
+np.tril(AR_b, k=0.5)  # E: No overload variant
+np.triu(AR_b, k=0.5)  # E: No overload variant
+
+np.vander(AR_m)  # E: incompatible type
+
+np.histogram2d(AR_m)  # E: No overload variant
+
+np.mask_indices(10, func1)  # E: incompatible type
+np.mask_indices(10, func2, 10.5)  # E: incompatible type
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/fail/type_check.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/fail/type_check.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..95f52bfbd260914c429cbf0ca57f1ff4b03cbb1d
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/fail/type_check.pyi
@@ -0,0 +1,13 @@
+import numpy as np
+import numpy.typing as npt
+
+DTYPE_i8: np.dtype[np.int64]
+
+np.mintypecode(DTYPE_i8)  # E: incompatible type
+np.iscomplexobj(DTYPE_i8)  # E: incompatible type
+np.isrealobj(DTYPE_i8)  # E: incompatible type
+
+np.typename(DTYPE_i8)  # E: No overload variant
+np.typename("invalid")  # E: No overload variant
+
+np.common_type(np.timedelta64())  # E: incompatible type
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/fail/ufunc_config.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/fail/ufunc_config.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..f547fbb46b85a92c77d81bf287c13a37d6d9e6ad
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/fail/ufunc_config.pyi
@@ -0,0 +1,21 @@
+"""Typing tests for `numpy.core._ufunc_config`."""
+
+import numpy as np
+
+def func1(a: str, b: int, c: float) -> None: ...
+def func2(a: str, *, b: int) -> None: ...
+
+class Write1:
+    def write1(self, a: str) -> None: ...
+
+class Write2:
+    def write(self, a: str, b: str) -> None: ...
+
+class Write3:
+    def write(self, *, a: str) -> None: ...
+
+np.seterrcall(func1)  # E: Argument 1 to "seterrcall" has incompatible type
+np.seterrcall(func2)  # E: Argument 1 to "seterrcall" has incompatible type
+np.seterrcall(Write1())  # E: Argument 1 to "seterrcall" has incompatible type
+np.seterrcall(Write2())  # E: Argument 1 to "seterrcall" has incompatible type
+np.seterrcall(Write3())  # E: Argument 1 to "seterrcall" has incompatible type
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/fail/ufunclike.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/fail/ufunclike.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..2f9fd14c8cf2082bfaf6b4e6a816cafd5299e47f
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/fail/ufunclike.pyi
@@ -0,0 +1,21 @@
+from typing import Any
+import numpy as np
+
+AR_c: np.ndarray[Any, np.dtype[np.complex128]]
+AR_m: np.ndarray[Any, np.dtype[np.timedelta64]]
+AR_M: np.ndarray[Any, np.dtype[np.datetime64]]
+AR_O: np.ndarray[Any, np.dtype[np.object_]]
+
+np.fix(AR_c)  # E: incompatible type
+np.fix(AR_m)  # E: incompatible type
+np.fix(AR_M)  # E: incompatible type
+
+np.isposinf(AR_c)  # E: incompatible type
+np.isposinf(AR_m)  # E: incompatible type
+np.isposinf(AR_M)  # E: incompatible type
+np.isposinf(AR_O)  # E: incompatible type
+
+np.isneginf(AR_c)  # E: incompatible type
+np.isneginf(AR_m)  # E: incompatible type
+np.isneginf(AR_M)  # E: incompatible type
+np.isneginf(AR_O)  # E: incompatible type
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/fail/ufuncs.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/fail/ufuncs.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..e827267c6072e5ace7862016944e52dfa00ed7a8
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/fail/ufuncs.pyi
@@ -0,0 +1,41 @@
+import numpy as np
+import numpy.typing as npt
+
+AR_f8: npt.NDArray[np.float64]
+
+np.sin.nin + "foo"  # E: Unsupported operand types
+np.sin(1, foo="bar")  # E: No overload variant
+
+np.abs(None)  # E: No overload variant
+
+np.add(1, 1, 1)  # E: No overload variant
+np.add(1, 1, axis=0)  # E: No overload variant
+
+np.matmul(AR_f8, AR_f8, where=True)  # E: No overload variant
+
+np.frexp(AR_f8, out=None)  # E: No overload variant
+np.frexp(AR_f8, out=AR_f8)  # E: No overload variant
+
+np.absolute.outer()  # E: "None" not callable
+np.frexp.outer()  # E: "None" not callable
+np.divmod.outer()  # E: "None" not callable
+np.matmul.outer()  # E: "None" not callable
+
+np.absolute.reduceat()  # E: "None" not callable
+np.frexp.reduceat()  # E: "None" not callable
+np.divmod.reduceat()  # E: "None" not callable
+np.matmul.reduceat()  # E: "None" not callable
+
+np.absolute.reduce()  # E: "None" not callable
+np.frexp.reduce()  # E: "None" not callable
+np.divmod.reduce()  # E: "None" not callable
+np.matmul.reduce()  # E: "None" not callable
+
+np.absolute.accumulate()  # E: "None" not callable
+np.frexp.accumulate()  # E: "None" not callable
+np.divmod.accumulate()  # E: "None" not callable
+np.matmul.accumulate()  # E: "None" not callable
+
+np.frexp.at()  # E: "None" not callable
+np.divmod.at()  # E: "None" not callable
+np.matmul.at()  # E: "None" not callable
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/fail/warnings_and_errors.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/fail/warnings_and_errors.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..f4fa38293738a2d1d61d522927aea367e21cb9c6
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/fail/warnings_and_errors.pyi
@@ -0,0 +1,5 @@
+import numpy as np
+
+np.AxisError(1.0)  # E: No overload variant
+np.AxisError(1, ndim=2.0)  # E: No overload variant
+np.AxisError(2, msg_prefix=404)  # E: No overload variant
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/misc/extended_precision.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/misc/extended_precision.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..78d8d93c6560616c3495dcdf801befce51997c00
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/misc/extended_precision.pyi
@@ -0,0 +1,25 @@
+import sys
+
+import numpy as np
+from numpy._typing import _80Bit, _96Bit, _128Bit, _256Bit
+
+if sys.version_info >= (3, 11):
+    from typing import assert_type
+else:
+    from typing_extensions import assert_type
+
+assert_type(np.uint128(), np.unsignedinteger[_128Bit])
+assert_type(np.uint256(), np.unsignedinteger[_256Bit])
+
+assert_type(np.int128(), np.signedinteger[_128Bit])
+assert_type(np.int256(), np.signedinteger[_256Bit])
+
+assert_type(np.float80(), np.floating[_80Bit])
+assert_type(np.float96(), np.floating[_96Bit])
+assert_type(np.float128(), np.floating[_128Bit])
+assert_type(np.float256(), np.floating[_256Bit])
+
+assert_type(np.complex160(), np.complexfloating[_80Bit, _80Bit])
+assert_type(np.complex192(), np.complexfloating[_96Bit, _96Bit])
+assert_type(np.complex256(), np.complexfloating[_128Bit, _128Bit])
+assert_type(np.complex512(), np.complexfloating[_256Bit, _256Bit])
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/mypy.ini b/lib/python3.12/site-packages/numpy/typing/tests/data/mypy.ini
new file mode 100644
index 0000000000000000000000000000000000000000..1cc16e03965d8c2c3206d6a88d85a95c79b81c8e
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/mypy.ini
@@ -0,0 +1,5 @@
+[mypy]
+plugins = numpy.typing.mypy_plugin
+show_absolute_path = True
+implicit_reexport = False
+pretty = True
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/pass/__pycache__/arithmetic.cpython-312.pyc b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/__pycache__/arithmetic.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..708d83705202633da051b6da274b2aa3c58ac02d
Binary files /dev/null and b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/__pycache__/arithmetic.cpython-312.pyc differ
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/pass/__pycache__/array_constructors.cpython-312.pyc b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/__pycache__/array_constructors.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..662f50ba2e72f16833095b2946337a6967dca2a0
Binary files /dev/null and b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/__pycache__/array_constructors.cpython-312.pyc differ
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/pass/__pycache__/array_like.cpython-312.pyc b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/__pycache__/array_like.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..5a78d7fd794146c6f77683a0bd8d26145cf64099
Binary files /dev/null and b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/__pycache__/array_like.cpython-312.pyc differ
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/pass/__pycache__/arrayprint.cpython-312.pyc b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/__pycache__/arrayprint.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..086db68b7aba311cd38c4d7d2bc3bb8bdee3e03c
Binary files /dev/null and b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/__pycache__/arrayprint.cpython-312.pyc differ
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/pass/__pycache__/arrayterator.cpython-312.pyc b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/__pycache__/arrayterator.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..1988b854f72c3dc4fd4f6cb3a78af4d4dba8cd0c
Binary files /dev/null and b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/__pycache__/arrayterator.cpython-312.pyc differ
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/pass/__pycache__/bitwise_ops.cpython-312.pyc b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/__pycache__/bitwise_ops.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..3c212aead9157180f9f72338c44f9a2a4f783735
Binary files /dev/null and b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/__pycache__/bitwise_ops.cpython-312.pyc differ
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/pass/__pycache__/comparisons.cpython-312.pyc b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/__pycache__/comparisons.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..eb03663388d4344383b5a270a9b616f0bff9882b
Binary files /dev/null and b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/__pycache__/comparisons.cpython-312.pyc differ
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/pass/__pycache__/dtype.cpython-312.pyc b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/__pycache__/dtype.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..fa4574b730c57d53937d99f743892257fd92e496
Binary files /dev/null and b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/__pycache__/dtype.cpython-312.pyc differ
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/pass/__pycache__/einsumfunc.cpython-312.pyc b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/__pycache__/einsumfunc.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..13d801b4af174f0941715ac3c407e7e89c76739e
Binary files /dev/null and b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/__pycache__/einsumfunc.cpython-312.pyc differ
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/pass/__pycache__/flatiter.cpython-312.pyc b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/__pycache__/flatiter.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..5554ec3ce6dc275ce93128d420480fd72bf354fe
Binary files /dev/null and b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/__pycache__/flatiter.cpython-312.pyc differ
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/pass/__pycache__/fromnumeric.cpython-312.pyc b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/__pycache__/fromnumeric.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..e3a80cdfc3a4396fc260697d03688f608310f321
Binary files /dev/null and b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/__pycache__/fromnumeric.cpython-312.pyc differ
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/pass/__pycache__/index_tricks.cpython-312.pyc b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/__pycache__/index_tricks.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..6281616b16b41083a7f658f1e983ce10927647b7
Binary files /dev/null and b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/__pycache__/index_tricks.cpython-312.pyc differ
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/pass/__pycache__/lib_utils.cpython-312.pyc b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/__pycache__/lib_utils.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..fca2e1005179825590ec3b49771fc21e5747fd67
Binary files /dev/null and b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/__pycache__/lib_utils.cpython-312.pyc differ
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/pass/__pycache__/lib_version.cpython-312.pyc b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/__pycache__/lib_version.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..be12298969275212bf68d71f36f35e78d4655010
Binary files /dev/null and b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/__pycache__/lib_version.cpython-312.pyc differ
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/pass/__pycache__/literal.cpython-312.pyc b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/__pycache__/literal.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..88b9e4cf8544cc616f04b19f26f31ae7f109166b
Binary files /dev/null and b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/__pycache__/literal.cpython-312.pyc differ
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/pass/__pycache__/mod.cpython-312.pyc b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/__pycache__/mod.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..b24cd6ca9c2d091a0c675e6dbe1a8095e5134ab6
Binary files /dev/null and b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/__pycache__/mod.cpython-312.pyc differ
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/pass/__pycache__/modules.cpython-312.pyc b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/__pycache__/modules.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..9a4cacf96c37451e29bc7c185005855fe4045bb3
Binary files /dev/null and b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/__pycache__/modules.cpython-312.pyc differ
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/pass/__pycache__/multiarray.cpython-312.pyc b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/__pycache__/multiarray.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..c735e09acd13c5ade8c39ceec4ffd69a75d2862f
Binary files /dev/null and b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/__pycache__/multiarray.cpython-312.pyc differ
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/pass/__pycache__/ndarray_conversion.cpython-312.pyc b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/__pycache__/ndarray_conversion.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..da7ccf1808058869d65dbb0bfdd8aea5fdc84307
Binary files /dev/null and b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/__pycache__/ndarray_conversion.cpython-312.pyc differ
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/pass/__pycache__/ndarray_misc.cpython-312.pyc b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/__pycache__/ndarray_misc.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..943c4e615d091ee4d63cbbac5041e7c853dbd58c
Binary files /dev/null and b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/__pycache__/ndarray_misc.cpython-312.pyc differ
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/pass/__pycache__/ndarray_shape_manipulation.cpython-312.pyc b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/__pycache__/ndarray_shape_manipulation.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..057e5c9a1da223fa41011e30532ee05a81020eb8
Binary files /dev/null and b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/__pycache__/ndarray_shape_manipulation.cpython-312.pyc differ
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/pass/__pycache__/numeric.cpython-312.pyc b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/__pycache__/numeric.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..7a7e54dfb64914ea0618c5a06891c522c12afde6
Binary files /dev/null and b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/__pycache__/numeric.cpython-312.pyc differ
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/pass/__pycache__/numerictypes.cpython-312.pyc b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/__pycache__/numerictypes.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..6288c90f5ebf6e0442ce8cd63ca45bc66057f4dd
Binary files /dev/null and b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/__pycache__/numerictypes.cpython-312.pyc differ
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/pass/__pycache__/random.cpython-312.pyc b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/__pycache__/random.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..2327c254682ee6cd7b2bd7e95b93e8579dda2958
Binary files /dev/null and b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/__pycache__/random.cpython-312.pyc differ
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/pass/__pycache__/scalars.cpython-312.pyc b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/__pycache__/scalars.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..e9f9abca5cb3f3cc2cccc3f05dab255a43adf514
Binary files /dev/null and b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/__pycache__/scalars.cpython-312.pyc differ
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/pass/__pycache__/simple.cpython-312.pyc b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/__pycache__/simple.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..52e697d8e5390e5376c245e942cec13500049505
Binary files /dev/null and b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/__pycache__/simple.cpython-312.pyc differ
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/pass/__pycache__/simple_py3.cpython-312.pyc b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/__pycache__/simple_py3.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..b77507b01361a6f1197599a70d8b24c4b0c2d75a
Binary files /dev/null and b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/__pycache__/simple_py3.cpython-312.pyc differ
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/pass/__pycache__/ufunc_config.cpython-312.pyc b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/__pycache__/ufunc_config.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..5b5346ab9d24898c221ac00992105196e6eb5085
Binary files /dev/null and b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/__pycache__/ufunc_config.cpython-312.pyc differ
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/pass/__pycache__/ufunclike.cpython-312.pyc b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/__pycache__/ufunclike.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..1d1afc9c1244fb8c47f653f88d3b932a973582a0
Binary files /dev/null and b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/__pycache__/ufunclike.cpython-312.pyc differ
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/pass/__pycache__/ufuncs.cpython-312.pyc b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/__pycache__/ufuncs.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..802a3850fd008c9c54d51bf550dcd7392c55fb70
Binary files /dev/null and b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/__pycache__/ufuncs.cpython-312.pyc differ
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/pass/__pycache__/warnings_and_errors.cpython-312.pyc b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/__pycache__/warnings_and_errors.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..6c1e8913b490a92a7aae6750f3ae12ea71c45c93
Binary files /dev/null and b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/__pycache__/warnings_and_errors.cpython-312.pyc differ
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/pass/arithmetic.py b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/arithmetic.py
new file mode 100644
index 0000000000000000000000000000000000000000..07a99012735d4b1161a538c14a6114fccae3a47e
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/arithmetic.py
@@ -0,0 +1,594 @@
+from __future__ import annotations
+
+from typing import Any
+import numpy as np
+import pytest
+
+c16 = np.complex128(1)
+f8 = np.float64(1)
+i8 = np.int64(1)
+u8 = np.uint64(1)
+
+c8 = np.complex64(1)
+f4 = np.float32(1)
+i4 = np.int32(1)
+u4 = np.uint32(1)
+
+dt = np.datetime64(1, "D")
+td = np.timedelta64(1, "D")
+
+b_ = np.bool_(1)
+
+b = bool(1)
+c = complex(1)
+f = float(1)
+i = int(1)
+
+
+class Object:
+    def __array__(self) -> np.ndarray[Any, np.dtype[np.object_]]:
+        ret = np.empty((), dtype=object)
+        ret[()] = self
+        return ret
+
+    def __sub__(self, value: Any) -> Object:
+        return self
+
+    def __rsub__(self, value: Any) -> Object:
+        return self
+
+    def __floordiv__(self, value: Any) -> Object:
+        return self
+
+    def __rfloordiv__(self, value: Any) -> Object:
+        return self
+
+    def __mul__(self, value: Any) -> Object:
+        return self
+
+    def __rmul__(self, value: Any) -> Object:
+        return self
+
+    def __pow__(self, value: Any) -> Object:
+        return self
+
+    def __rpow__(self, value: Any) -> Object:
+        return self
+
+
+AR_b: np.ndarray[Any, np.dtype[np.bool_]] = np.array([True])
+AR_u: np.ndarray[Any, np.dtype[np.uint32]] = np.array([1], dtype=np.uint32)
+AR_i: np.ndarray[Any, np.dtype[np.int64]] = np.array([1])
+AR_f: np.ndarray[Any, np.dtype[np.float64]] = np.array([1.0])
+AR_c: np.ndarray[Any, np.dtype[np.complex128]] = np.array([1j])
+AR_m: np.ndarray[Any, np.dtype[np.timedelta64]] = np.array([np.timedelta64(1, "D")])
+AR_M: np.ndarray[Any, np.dtype[np.datetime64]] = np.array([np.datetime64(1, "D")])
+AR_O: np.ndarray[Any, np.dtype[np.object_]] = np.array([Object()])
+
+AR_LIKE_b = [True]
+AR_LIKE_u = [np.uint32(1)]
+AR_LIKE_i = [1]
+AR_LIKE_f = [1.0]
+AR_LIKE_c = [1j]
+AR_LIKE_m = [np.timedelta64(1, "D")]
+AR_LIKE_M = [np.datetime64(1, "D")]
+AR_LIKE_O = [Object()]
+
+# Array subtractions
+
+AR_b - AR_LIKE_u
+AR_b - AR_LIKE_i
+AR_b - AR_LIKE_f
+AR_b - AR_LIKE_c
+AR_b - AR_LIKE_m
+AR_b - AR_LIKE_O
+
+AR_LIKE_u - AR_b
+AR_LIKE_i - AR_b
+AR_LIKE_f - AR_b
+AR_LIKE_c - AR_b
+AR_LIKE_m - AR_b
+AR_LIKE_M - AR_b
+AR_LIKE_O - AR_b
+
+AR_u - AR_LIKE_b
+AR_u - AR_LIKE_u
+AR_u - AR_LIKE_i
+AR_u - AR_LIKE_f
+AR_u - AR_LIKE_c
+AR_u - AR_LIKE_m
+AR_u - AR_LIKE_O
+
+AR_LIKE_b - AR_u
+AR_LIKE_u - AR_u
+AR_LIKE_i - AR_u
+AR_LIKE_f - AR_u
+AR_LIKE_c - AR_u
+AR_LIKE_m - AR_u
+AR_LIKE_M - AR_u
+AR_LIKE_O - AR_u
+
+AR_i - AR_LIKE_b
+AR_i - AR_LIKE_u
+AR_i - AR_LIKE_i
+AR_i - AR_LIKE_f
+AR_i - AR_LIKE_c
+AR_i - AR_LIKE_m
+AR_i - AR_LIKE_O
+
+AR_LIKE_b - AR_i
+AR_LIKE_u - AR_i
+AR_LIKE_i - AR_i
+AR_LIKE_f - AR_i
+AR_LIKE_c - AR_i
+AR_LIKE_m - AR_i
+AR_LIKE_M - AR_i
+AR_LIKE_O - AR_i
+
+AR_f - AR_LIKE_b
+AR_f - AR_LIKE_u
+AR_f - AR_LIKE_i
+AR_f - AR_LIKE_f
+AR_f - AR_LIKE_c
+AR_f - AR_LIKE_O
+
+AR_LIKE_b - AR_f
+AR_LIKE_u - AR_f
+AR_LIKE_i - AR_f
+AR_LIKE_f - AR_f
+AR_LIKE_c - AR_f
+AR_LIKE_O - AR_f
+
+AR_c - AR_LIKE_b
+AR_c - AR_LIKE_u
+AR_c - AR_LIKE_i
+AR_c - AR_LIKE_f
+AR_c - AR_LIKE_c
+AR_c - AR_LIKE_O
+
+AR_LIKE_b - AR_c
+AR_LIKE_u - AR_c
+AR_LIKE_i - AR_c
+AR_LIKE_f - AR_c
+AR_LIKE_c - AR_c
+AR_LIKE_O - AR_c
+
+AR_m - AR_LIKE_b
+AR_m - AR_LIKE_u
+AR_m - AR_LIKE_i
+AR_m - AR_LIKE_m
+
+AR_LIKE_b - AR_m
+AR_LIKE_u - AR_m
+AR_LIKE_i - AR_m
+AR_LIKE_m - AR_m
+AR_LIKE_M - AR_m
+
+AR_M - AR_LIKE_b
+AR_M - AR_LIKE_u
+AR_M - AR_LIKE_i
+AR_M - AR_LIKE_m
+AR_M - AR_LIKE_M
+
+AR_LIKE_M - AR_M
+
+AR_O - AR_LIKE_b
+AR_O - AR_LIKE_u
+AR_O - AR_LIKE_i
+AR_O - AR_LIKE_f
+AR_O - AR_LIKE_c
+AR_O - AR_LIKE_O
+
+AR_LIKE_b - AR_O
+AR_LIKE_u - AR_O
+AR_LIKE_i - AR_O
+AR_LIKE_f - AR_O
+AR_LIKE_c - AR_O
+AR_LIKE_O - AR_O
+
+AR_u += AR_b
+AR_u += AR_u
+AR_u += 1  # Allowed during runtime as long as the object is 0D and >=0
+
+# Array floor division
+
+AR_b // AR_LIKE_b
+AR_b // AR_LIKE_u
+AR_b // AR_LIKE_i
+AR_b // AR_LIKE_f
+AR_b // AR_LIKE_O
+
+AR_LIKE_b // AR_b
+AR_LIKE_u // AR_b
+AR_LIKE_i // AR_b
+AR_LIKE_f // AR_b
+AR_LIKE_O // AR_b
+
+AR_u // AR_LIKE_b
+AR_u // AR_LIKE_u
+AR_u // AR_LIKE_i
+AR_u // AR_LIKE_f
+AR_u // AR_LIKE_O
+
+AR_LIKE_b // AR_u
+AR_LIKE_u // AR_u
+AR_LIKE_i // AR_u
+AR_LIKE_f // AR_u
+AR_LIKE_m // AR_u
+AR_LIKE_O // AR_u
+
+AR_i // AR_LIKE_b
+AR_i // AR_LIKE_u
+AR_i // AR_LIKE_i
+AR_i // AR_LIKE_f
+AR_i // AR_LIKE_O
+
+AR_LIKE_b // AR_i
+AR_LIKE_u // AR_i
+AR_LIKE_i // AR_i
+AR_LIKE_f // AR_i
+AR_LIKE_m // AR_i
+AR_LIKE_O // AR_i
+
+AR_f // AR_LIKE_b
+AR_f // AR_LIKE_u
+AR_f // AR_LIKE_i
+AR_f // AR_LIKE_f
+AR_f // AR_LIKE_O
+
+AR_LIKE_b // AR_f
+AR_LIKE_u // AR_f
+AR_LIKE_i // AR_f
+AR_LIKE_f // AR_f
+AR_LIKE_m // AR_f
+AR_LIKE_O // AR_f
+
+AR_m // AR_LIKE_u
+AR_m // AR_LIKE_i
+AR_m // AR_LIKE_f
+AR_m // AR_LIKE_m
+
+AR_LIKE_m // AR_m
+
+AR_O // AR_LIKE_b
+AR_O // AR_LIKE_u
+AR_O // AR_LIKE_i
+AR_O // AR_LIKE_f
+AR_O // AR_LIKE_O
+
+AR_LIKE_b // AR_O
+AR_LIKE_u // AR_O
+AR_LIKE_i // AR_O
+AR_LIKE_f // AR_O
+AR_LIKE_O // AR_O
+
+# Inplace multiplication
+
+AR_b *= AR_LIKE_b
+
+AR_u *= AR_LIKE_b
+AR_u *= AR_LIKE_u
+
+AR_i *= AR_LIKE_b
+AR_i *= AR_LIKE_u
+AR_i *= AR_LIKE_i
+
+AR_f *= AR_LIKE_b
+AR_f *= AR_LIKE_u
+AR_f *= AR_LIKE_i
+AR_f *= AR_LIKE_f
+
+AR_c *= AR_LIKE_b
+AR_c *= AR_LIKE_u
+AR_c *= AR_LIKE_i
+AR_c *= AR_LIKE_f
+AR_c *= AR_LIKE_c
+
+AR_m *= AR_LIKE_b
+AR_m *= AR_LIKE_u
+AR_m *= AR_LIKE_i
+AR_m *= AR_LIKE_f
+
+AR_O *= AR_LIKE_b
+AR_O *= AR_LIKE_u
+AR_O *= AR_LIKE_i
+AR_O *= AR_LIKE_f
+AR_O *= AR_LIKE_c
+AR_O *= AR_LIKE_O
+
+# Inplace power
+
+AR_u **= AR_LIKE_b
+AR_u **= AR_LIKE_u
+
+AR_i **= AR_LIKE_b
+AR_i **= AR_LIKE_u
+AR_i **= AR_LIKE_i
+
+AR_f **= AR_LIKE_b
+AR_f **= AR_LIKE_u
+AR_f **= AR_LIKE_i
+AR_f **= AR_LIKE_f
+
+AR_c **= AR_LIKE_b
+AR_c **= AR_LIKE_u
+AR_c **= AR_LIKE_i
+AR_c **= AR_LIKE_f
+AR_c **= AR_LIKE_c
+
+AR_O **= AR_LIKE_b
+AR_O **= AR_LIKE_u
+AR_O **= AR_LIKE_i
+AR_O **= AR_LIKE_f
+AR_O **= AR_LIKE_c
+AR_O **= AR_LIKE_O
+
+# unary ops
+
+-c16
+-c8
+-f8
+-f4
+-i8
+-i4
+with pytest.warns(RuntimeWarning):
+    -u8
+    -u4
+-td
+-AR_f
+
++c16
++c8
++f8
++f4
++i8
++i4
++u8
++u4
++td
++AR_f
+
+abs(c16)
+abs(c8)
+abs(f8)
+abs(f4)
+abs(i8)
+abs(i4)
+abs(u8)
+abs(u4)
+abs(td)
+abs(b_)
+abs(AR_f)
+
+# Time structures
+
+dt + td
+dt + i
+dt + i4
+dt + i8
+dt - dt
+dt - i
+dt - i4
+dt - i8
+
+td + td
+td + i
+td + i4
+td + i8
+td - td
+td - i
+td - i4
+td - i8
+td / f
+td / f4
+td / f8
+td / td
+td // td
+td % td
+
+
+# boolean
+
+b_ / b
+b_ / b_
+b_ / i
+b_ / i8
+b_ / i4
+b_ / u8
+b_ / u4
+b_ / f
+b_ / f8
+b_ / f4
+b_ / c
+b_ / c16
+b_ / c8
+
+b / b_
+b_ / b_
+i / b_
+i8 / b_
+i4 / b_
+u8 / b_
+u4 / b_
+f / b_
+f8 / b_
+f4 / b_
+c / b_
+c16 / b_
+c8 / b_
+
+# Complex
+
+c16 + c16
+c16 + f8
+c16 + i8
+c16 + c8
+c16 + f4
+c16 + i4
+c16 + b_
+c16 + b
+c16 + c
+c16 + f
+c16 + i
+c16 + AR_f
+
+c16 + c16
+f8 + c16
+i8 + c16
+c8 + c16
+f4 + c16
+i4 + c16
+b_ + c16
+b + c16
+c + c16
+f + c16
+i + c16
+AR_f + c16
+
+c8 + c16
+c8 + f8
+c8 + i8
+c8 + c8
+c8 + f4
+c8 + i4
+c8 + b_
+c8 + b
+c8 + c
+c8 + f
+c8 + i
+c8 + AR_f
+
+c16 + c8
+f8 + c8
+i8 + c8
+c8 + c8
+f4 + c8
+i4 + c8
+b_ + c8
+b + c8
+c + c8
+f + c8
+i + c8
+AR_f + c8
+
+# Float
+
+f8 + f8
+f8 + i8
+f8 + f4
+f8 + i4
+f8 + b_
+f8 + b
+f8 + c
+f8 + f
+f8 + i
+f8 + AR_f
+
+f8 + f8
+i8 + f8
+f4 + f8
+i4 + f8
+b_ + f8
+b + f8
+c + f8
+f + f8
+i + f8
+AR_f + f8
+
+f4 + f8
+f4 + i8
+f4 + f4
+f4 + i4
+f4 + b_
+f4 + b
+f4 + c
+f4 + f
+f4 + i
+f4 + AR_f
+
+f8 + f4
+i8 + f4
+f4 + f4
+i4 + f4
+b_ + f4
+b + f4
+c + f4
+f + f4
+i + f4
+AR_f + f4
+
+# Int
+
+i8 + i8
+i8 + u8
+i8 + i4
+i8 + u4
+i8 + b_
+i8 + b
+i8 + c
+i8 + f
+i8 + i
+i8 + AR_f
+
+u8 + u8
+u8 + i4
+u8 + u4
+u8 + b_
+u8 + b
+u8 + c
+u8 + f
+u8 + i
+u8 + AR_f
+
+i8 + i8
+u8 + i8
+i4 + i8
+u4 + i8
+b_ + i8
+b + i8
+c + i8
+f + i8
+i + i8
+AR_f + i8
+
+u8 + u8
+i4 + u8
+u4 + u8
+b_ + u8
+b + u8
+c + u8
+f + u8
+i + u8
+AR_f + u8
+
+i4 + i8
+i4 + i4
+i4 + i
+i4 + b_
+i4 + b
+i4 + AR_f
+
+u4 + i8
+u4 + i4
+u4 + u8
+u4 + u4
+u4 + i
+u4 + b_
+u4 + b
+u4 + AR_f
+
+i8 + i4
+i4 + i4
+i + i4
+b_ + i4
+b + i4
+AR_f + i4
+
+i8 + u4
+i4 + u4
+u8 + u4
+u4 + u4
+b_ + u4
+b + u4
+i + u4
+AR_f + u4
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/pass/array_constructors.py b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/array_constructors.py
new file mode 100644
index 0000000000000000000000000000000000000000..e035a73c6fe914a14f80131184f6c78ccc3d84f1
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/array_constructors.py
@@ -0,0 +1,137 @@
+import sys
+from typing import Any
+import numpy as np
+
+
+class Index:
+    def __index__(self) -> int:
+        return 0
+
+
+class SubClass(np.ndarray):
+    pass
+
+
+def func(i: int, j: int, **kwargs: Any) -> SubClass:
+    return B
+
+
+i8 = np.int64(1)
+
+A = np.array([1])
+B = A.view(SubClass).copy()
+B_stack = np.array([[1], [1]]).view(SubClass)
+C = [1]
+
+np.ndarray(Index())
+np.ndarray([Index()])
+
+np.array(1, dtype=float)
+np.array(1, copy=False)
+np.array(1, order='F')
+np.array(1, order=None)
+np.array(1, subok=True)
+np.array(1, ndmin=3)
+np.array(1, str, copy=True, order='C', subok=False, ndmin=2)
+
+np.asarray(A)
+np.asarray(B)
+np.asarray(C)
+
+np.asanyarray(A)
+np.asanyarray(B)
+np.asanyarray(B, dtype=int)
+np.asanyarray(C)
+
+np.ascontiguousarray(A)
+np.ascontiguousarray(B)
+np.ascontiguousarray(C)
+
+np.asfortranarray(A)
+np.asfortranarray(B)
+np.asfortranarray(C)
+
+np.require(A)
+np.require(B)
+np.require(B, dtype=int)
+np.require(B, requirements=None)
+np.require(B, requirements="E")
+np.require(B, requirements=["ENSUREARRAY"])
+np.require(B, requirements={"F", "E"})
+np.require(B, requirements=["C", "OWNDATA"])
+np.require(B, requirements="W")
+np.require(B, requirements="A")
+np.require(C)
+
+np.linspace(0, 2)
+np.linspace(0.5, [0, 1, 2])
+np.linspace([0, 1, 2], 3)
+np.linspace(0j, 2)
+np.linspace(0, 2, num=10)
+np.linspace(0, 2, endpoint=True)
+np.linspace(0, 2, retstep=True)
+np.linspace(0j, 2j, retstep=True)
+np.linspace(0, 2, dtype=bool)
+np.linspace([0, 1], [2, 3], axis=Index())
+
+np.logspace(0, 2, base=2)
+np.logspace(0, 2, base=2)
+np.logspace(0, 2, base=[1j, 2j], num=2)
+
+np.geomspace(1, 2)
+
+np.zeros_like(A)
+np.zeros_like(C)
+np.zeros_like(B)
+np.zeros_like(B, dtype=np.int64)
+
+np.ones_like(A)
+np.ones_like(C)
+np.ones_like(B)
+np.ones_like(B, dtype=np.int64)
+
+np.empty_like(A)
+np.empty_like(C)
+np.empty_like(B)
+np.empty_like(B, dtype=np.int64)
+
+np.full_like(A, i8)
+np.full_like(C, i8)
+np.full_like(B, i8)
+np.full_like(B, i8, dtype=np.int64)
+
+np.ones(1)
+np.ones([1, 1, 1])
+
+np.full(1, i8)
+np.full([1, 1, 1], i8)
+
+np.indices([1, 2, 3])
+np.indices([1, 2, 3], sparse=True)
+
+np.fromfunction(func, (3, 5))
+
+np.identity(10)
+
+np.atleast_1d(C)
+np.atleast_1d(A)
+np.atleast_1d(C, C)
+np.atleast_1d(C, A)
+np.atleast_1d(A, A)
+
+np.atleast_2d(C)
+
+np.atleast_3d(C)
+
+np.vstack([C, C])
+np.vstack([C, A])
+np.vstack([A, A])
+
+np.hstack([C, C])
+
+np.stack([C, C])
+np.stack([C, C], axis=0)
+np.stack([C, C], out=B_stack)
+
+np.block([[C, C], [C, C]])
+np.block(A)
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/pass/array_like.py b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/array_like.py
new file mode 100644
index 0000000000000000000000000000000000000000..da2520e961e7a3b2d38e0e04183378851c17b479
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/array_like.py
@@ -0,0 +1,41 @@
+from __future__ import annotations
+
+from typing import Any
+
+import numpy as np
+from numpy._typing import ArrayLike, _SupportsArray
+
+x1: ArrayLike = True
+x2: ArrayLike = 5
+x3: ArrayLike = 1.0
+x4: ArrayLike = 1 + 1j
+x5: ArrayLike = np.int8(1)
+x6: ArrayLike = np.float64(1)
+x7: ArrayLike = np.complex128(1)
+x8: ArrayLike = np.array([1, 2, 3])
+x9: ArrayLike = [1, 2, 3]
+x10: ArrayLike = (1, 2, 3)
+x11: ArrayLike = "foo"
+x12: ArrayLike = memoryview(b'foo')
+
+
+class A:
+    def __array__(self, dtype: None | np.dtype[Any] = None) -> np.ndarray:
+        return np.array([1, 2, 3])
+
+
+x13: ArrayLike = A()
+
+scalar: _SupportsArray = np.int64(1)
+scalar.__array__()
+array: _SupportsArray = np.array(1)
+array.__array__()
+
+a: _SupportsArray = A()
+a.__array__()
+a.__array__()
+
+# Escape hatch for when you mean to make something like an object
+# array.
+object_array_scalar: Any = (i for i in range(10))
+np.array(object_array_scalar)
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/pass/arrayprint.py b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/arrayprint.py
new file mode 100644
index 0000000000000000000000000000000000000000..6c704c755570d1508424af92a0eb5aa1353666a0
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/arrayprint.py
@@ -0,0 +1,37 @@
+import numpy as np
+
+AR = np.arange(10)
+AR.setflags(write=False)
+
+with np.printoptions():
+    np.set_printoptions(
+        precision=1,
+        threshold=2,
+        edgeitems=3,
+        linewidth=4,
+        suppress=False,
+        nanstr="Bob",
+        infstr="Bill",
+        formatter={},
+        sign="+",
+        floatmode="unique",
+    )
+    np.get_printoptions()
+    str(AR)
+
+    np.array2string(
+        AR,
+        max_line_width=5,
+        precision=2,
+        suppress_small=True,
+        separator=";",
+        prefix="test",
+        threshold=5,
+        floatmode="fixed",
+        suffix="?",
+        legacy="1.13",
+    )
+    np.format_float_scientific(1, precision=5)
+    np.format_float_positional(1, trim="k")
+    np.array_repr(AR)
+    np.array_str(AR)
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/pass/arrayterator.py b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/arrayterator.py
new file mode 100644
index 0000000000000000000000000000000000000000..572be5e2fe29ba978b78c8b65b116b5b54a4d01a
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/arrayterator.py
@@ -0,0 +1,27 @@
+
+from __future__ import annotations
+
+from typing import Any
+import numpy as np
+
+AR_i8: np.ndarray[Any, np.dtype[np.int_]] = np.arange(10)
+ar_iter = np.lib.Arrayterator(AR_i8)
+
+ar_iter.var
+ar_iter.buf_size
+ar_iter.start
+ar_iter.stop
+ar_iter.step
+ar_iter.shape
+ar_iter.flat
+
+ar_iter.__array__()
+
+for i in ar_iter:
+    pass
+
+ar_iter[0]
+ar_iter[...]
+ar_iter[:]
+ar_iter[0, 0, 0]
+ar_iter[..., 0, :]
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/pass/bitwise_ops.py b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/bitwise_ops.py
new file mode 100644
index 0000000000000000000000000000000000000000..67449e2c21d8cc70f85caab5e0b8197aa74822fa
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/bitwise_ops.py
@@ -0,0 +1,131 @@
+import numpy as np
+
+i8 = np.int64(1)
+u8 = np.uint64(1)
+
+i4 = np.int32(1)
+u4 = np.uint32(1)
+
+b_ = np.bool_(1)
+
+b = bool(1)
+i = int(1)
+
+AR = np.array([0, 1, 2], dtype=np.int32)
+AR.setflags(write=False)
+
+
+i8 << i8
+i8 >> i8
+i8 | i8
+i8 ^ i8
+i8 & i8
+
+i8 << AR
+i8 >> AR
+i8 | AR
+i8 ^ AR
+i8 & AR
+
+i4 << i4
+i4 >> i4
+i4 | i4
+i4 ^ i4
+i4 & i4
+
+i8 << i4
+i8 >> i4
+i8 | i4
+i8 ^ i4
+i8 & i4
+
+i8 << i
+i8 >> i
+i8 | i
+i8 ^ i
+i8 & i
+
+i8 << b_
+i8 >> b_
+i8 | b_
+i8 ^ b_
+i8 & b_
+
+i8 << b
+i8 >> b
+i8 | b
+i8 ^ b
+i8 & b
+
+u8 << u8
+u8 >> u8
+u8 | u8
+u8 ^ u8
+u8 & u8
+
+u8 << AR
+u8 >> AR
+u8 | AR
+u8 ^ AR
+u8 & AR
+
+u4 << u4
+u4 >> u4
+u4 | u4
+u4 ^ u4
+u4 & u4
+
+u4 << i4
+u4 >> i4
+u4 | i4
+u4 ^ i4
+u4 & i4
+
+u4 << i
+u4 >> i
+u4 | i
+u4 ^ i
+u4 & i
+
+u8 << b_
+u8 >> b_
+u8 | b_
+u8 ^ b_
+u8 & b_
+
+u8 << b
+u8 >> b
+u8 | b
+u8 ^ b
+u8 & b
+
+b_ << b_
+b_ >> b_
+b_ | b_
+b_ ^ b_
+b_ & b_
+
+b_ << AR
+b_ >> AR
+b_ | AR
+b_ ^ AR
+b_ & AR
+
+b_ << b
+b_ >> b
+b_ | b
+b_ ^ b
+b_ & b
+
+b_ << i
+b_ >> i
+b_ | i
+b_ ^ i
+b_ & i
+
+~i8
+~i4
+~u8
+~u4
+~b_
+~AR
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/pass/comparisons.py b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/comparisons.py
new file mode 100644
index 0000000000000000000000000000000000000000..ce41de43596e305278acf6a9efb82fa49a43da1a
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/comparisons.py
@@ -0,0 +1,301 @@
+from __future__ import annotations
+
+from typing import Any
+import numpy as np
+
+c16 = np.complex128()
+f8 = np.float64()
+i8 = np.int64()
+u8 = np.uint64()
+
+c8 = np.complex64()
+f4 = np.float32()
+i4 = np.int32()
+u4 = np.uint32()
+
+dt = np.datetime64(0, "D")
+td = np.timedelta64(0, "D")
+
+b_ = np.bool_()
+
+b = bool()
+c = complex()
+f = float()
+i = int()
+
+SEQ = (0, 1, 2, 3, 4)
+
+AR_b: np.ndarray[Any, np.dtype[np.bool_]] = np.array([True])
+AR_u: np.ndarray[Any, np.dtype[np.uint32]] = np.array([1], dtype=np.uint32)
+AR_i: np.ndarray[Any, np.dtype[np.int_]] = np.array([1])
+AR_f: np.ndarray[Any, np.dtype[np.float_]] = np.array([1.0])
+AR_c: np.ndarray[Any, np.dtype[np.complex_]] = np.array([1.0j])
+AR_m: np.ndarray[Any, np.dtype[np.timedelta64]] = np.array([np.timedelta64("1")])
+AR_M: np.ndarray[Any, np.dtype[np.datetime64]] = np.array([np.datetime64("1")])
+AR_O: np.ndarray[Any, np.dtype[np.object_]] = np.array([1], dtype=object)
+
+# Arrays
+
+AR_b > AR_b
+AR_b > AR_u
+AR_b > AR_i
+AR_b > AR_f
+AR_b > AR_c
+
+AR_u > AR_b
+AR_u > AR_u
+AR_u > AR_i
+AR_u > AR_f
+AR_u > AR_c
+
+AR_i > AR_b
+AR_i > AR_u
+AR_i > AR_i
+AR_i > AR_f
+AR_i > AR_c
+
+AR_f > AR_b
+AR_f > AR_u
+AR_f > AR_i
+AR_f > AR_f
+AR_f > AR_c
+
+AR_c > AR_b
+AR_c > AR_u
+AR_c > AR_i
+AR_c > AR_f
+AR_c > AR_c
+
+AR_m > AR_b
+AR_m > AR_u
+AR_m > AR_i
+AR_b > AR_m
+AR_u > AR_m
+AR_i > AR_m
+
+AR_M > AR_M
+
+AR_O > AR_O
+1 > AR_O
+AR_O > 1
+
+# Time structures
+
+dt > dt
+
+td > td
+td > i
+td > i4
+td > i8
+td > AR_i
+td > SEQ
+
+# boolean
+
+b_ > b
+b_ > b_
+b_ > i
+b_ > i8
+b_ > i4
+b_ > u8
+b_ > u4
+b_ > f
+b_ > f8
+b_ > f4
+b_ > c
+b_ > c16
+b_ > c8
+b_ > AR_i
+b_ > SEQ
+
+# Complex
+
+c16 > c16
+c16 > f8
+c16 > i8
+c16 > c8
+c16 > f4
+c16 > i4
+c16 > b_
+c16 > b
+c16 > c
+c16 > f
+c16 > i
+c16 > AR_i
+c16 > SEQ
+
+c16 > c16
+f8 > c16
+i8 > c16
+c8 > c16
+f4 > c16
+i4 > c16
+b_ > c16
+b > c16
+c > c16
+f > c16
+i > c16
+AR_i > c16
+SEQ > c16
+
+c8 > c16
+c8 > f8
+c8 > i8
+c8 > c8
+c8 > f4
+c8 > i4
+c8 > b_
+c8 > b
+c8 > c
+c8 > f
+c8 > i
+c8 > AR_i
+c8 > SEQ
+
+c16 > c8
+f8 > c8
+i8 > c8
+c8 > c8
+f4 > c8
+i4 > c8
+b_ > c8
+b > c8
+c > c8
+f > c8
+i > c8
+AR_i > c8
+SEQ > c8
+
+# Float
+
+f8 > f8
+f8 > i8
+f8 > f4
+f8 > i4
+f8 > b_
+f8 > b
+f8 > c
+f8 > f
+f8 > i
+f8 > AR_i
+f8 > SEQ
+
+f8 > f8
+i8 > f8
+f4 > f8
+i4 > f8
+b_ > f8
+b > f8
+c > f8
+f > f8
+i > f8
+AR_i > f8
+SEQ > f8
+
+f4 > f8
+f4 > i8
+f4 > f4
+f4 > i4
+f4 > b_
+f4 > b
+f4 > c
+f4 > f
+f4 > i
+f4 > AR_i
+f4 > SEQ
+
+f8 > f4
+i8 > f4
+f4 > f4
+i4 > f4
+b_ > f4
+b > f4
+c > f4
+f > f4
+i > f4
+AR_i > f4
+SEQ > f4
+
+# Int
+
+i8 > i8
+i8 > u8
+i8 > i4
+i8 > u4
+i8 > b_
+i8 > b
+i8 > c
+i8 > f
+i8 > i
+i8 > AR_i
+i8 > SEQ
+
+u8 > u8
+u8 > i4
+u8 > u4
+u8 > b_
+u8 > b
+u8 > c
+u8 > f
+u8 > i
+u8 > AR_i
+u8 > SEQ
+
+i8 > i8
+u8 > i8
+i4 > i8
+u4 > i8
+b_ > i8
+b > i8
+c > i8
+f > i8
+i > i8
+AR_i > i8
+SEQ > i8
+
+u8 > u8
+i4 > u8
+u4 > u8
+b_ > u8
+b > u8
+c > u8
+f > u8
+i > u8
+AR_i > u8
+SEQ > u8
+
+i4 > i8
+i4 > i4
+i4 > i
+i4 > b_
+i4 > b
+i4 > AR_i
+i4 > SEQ
+
+u4 > i8
+u4 > i4
+u4 > u8
+u4 > u4
+u4 > i
+u4 > b_
+u4 > b
+u4 > AR_i
+u4 > SEQ
+
+i8 > i4
+i4 > i4
+i > i4
+b_ > i4
+b > i4
+AR_i > i4
+SEQ > i4
+
+i8 > u4
+i4 > u4
+u8 > u4
+u4 > u4
+b_ > u4
+b > u4
+i > u4
+AR_i > u4
+SEQ > u4
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/pass/dtype.py b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/dtype.py
new file mode 100644
index 0000000000000000000000000000000000000000..6ec44e6b06cdc443b1dd930d8f06fe70be577e97
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/dtype.py
@@ -0,0 +1,57 @@
+import numpy as np
+
+dtype_obj = np.dtype(np.str_)
+void_dtype_obj = np.dtype([("f0", np.float64), ("f1", np.float32)])
+
+np.dtype(dtype=np.int64)
+np.dtype(int)
+np.dtype("int")
+np.dtype(None)
+
+np.dtype((int, 2))
+np.dtype((int, (1,)))
+
+np.dtype({"names": ["a", "b"], "formats": [int, float]})
+np.dtype({"names": ["a"], "formats": [int], "titles": [object]})
+np.dtype({"names": ["a"], "formats": [int], "titles": [object()]})
+
+np.dtype([("name", np.str_, 16), ("grades", np.float64, (2,)), ("age", "int32")])
+
+np.dtype(
+    {
+        "names": ["a", "b"],
+        "formats": [int, float],
+        "itemsize": 9,
+        "aligned": False,
+        "titles": ["x", "y"],
+        "offsets": [0, 1],
+    }
+)
+
+np.dtype((np.float_, float))
+
+
+class Test:
+    dtype = np.dtype(float)
+
+
+np.dtype(Test())
+
+# Methods and attributes
+dtype_obj.base
+dtype_obj.subdtype
+dtype_obj.newbyteorder()
+dtype_obj.type
+dtype_obj.name
+dtype_obj.names
+
+dtype_obj * 0
+dtype_obj * 2
+
+0 * dtype_obj
+2 * dtype_obj
+
+void_dtype_obj["f0"]
+void_dtype_obj[0]
+void_dtype_obj[["f0", "f1"]]
+void_dtype_obj[["f0"]]
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/pass/einsumfunc.py b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/einsumfunc.py
new file mode 100644
index 0000000000000000000000000000000000000000..429764e67eccc7855d363da20d432fdb45e66971
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/einsumfunc.py
@@ -0,0 +1,36 @@
+from __future__ import annotations
+
+from typing import Any
+
+import numpy as np
+
+AR_LIKE_b = [True, True, True]
+AR_LIKE_u = [np.uint32(1), np.uint32(2), np.uint32(3)]
+AR_LIKE_i = [1, 2, 3]
+AR_LIKE_f = [1.0, 2.0, 3.0]
+AR_LIKE_c = [1j, 2j, 3j]
+AR_LIKE_U = ["1", "2", "3"]
+
+OUT_f: np.ndarray[Any, np.dtype[np.float64]] = np.empty(3, dtype=np.float64)
+OUT_c: np.ndarray[Any, np.dtype[np.complex128]] = np.empty(3, dtype=np.complex128)
+
+np.einsum("i,i->i", AR_LIKE_b, AR_LIKE_b)
+np.einsum("i,i->i", AR_LIKE_u, AR_LIKE_u)
+np.einsum("i,i->i", AR_LIKE_i, AR_LIKE_i)
+np.einsum("i,i->i", AR_LIKE_f, AR_LIKE_f)
+np.einsum("i,i->i", AR_LIKE_c, AR_LIKE_c)
+np.einsum("i,i->i", AR_LIKE_b, AR_LIKE_i)
+np.einsum("i,i,i,i->i", AR_LIKE_b, AR_LIKE_u, AR_LIKE_i, AR_LIKE_c)
+
+np.einsum("i,i->i", AR_LIKE_f, AR_LIKE_f, dtype="c16")
+np.einsum("i,i->i", AR_LIKE_U, AR_LIKE_U, dtype=bool, casting="unsafe")
+np.einsum("i,i->i", AR_LIKE_f, AR_LIKE_f, out=OUT_c)
+np.einsum("i,i->i", AR_LIKE_U, AR_LIKE_U, dtype=int, casting="unsafe", out=OUT_f)
+
+np.einsum_path("i,i->i", AR_LIKE_b, AR_LIKE_b)
+np.einsum_path("i,i->i", AR_LIKE_u, AR_LIKE_u)
+np.einsum_path("i,i->i", AR_LIKE_i, AR_LIKE_i)
+np.einsum_path("i,i->i", AR_LIKE_f, AR_LIKE_f)
+np.einsum_path("i,i->i", AR_LIKE_c, AR_LIKE_c)
+np.einsum_path("i,i->i", AR_LIKE_b, AR_LIKE_i)
+np.einsum_path("i,i,i,i->i", AR_LIKE_b, AR_LIKE_u, AR_LIKE_i, AR_LIKE_c)
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/pass/flatiter.py b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/flatiter.py
new file mode 100644
index 0000000000000000000000000000000000000000..63c839af4b23f0ba3bea8c56f2bbb7c03e7bc44a
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/flatiter.py
@@ -0,0 +1,16 @@
+import numpy as np
+
+a = np.empty((2, 2)).flat
+
+a.base
+a.copy()
+a.coords
+a.index
+iter(a)
+next(a)
+a[0]
+a[[0, 1, 2]]
+a[...]
+a[:]
+a.__array__()
+a.__array__(np.dtype(np.float64))
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/pass/fromnumeric.py b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/fromnumeric.py
new file mode 100644
index 0000000000000000000000000000000000000000..9e936e68465a735acc1e61eb91da46e6f40d6d37
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/fromnumeric.py
@@ -0,0 +1,260 @@
+"""Tests for :mod:`numpy.core.fromnumeric`."""
+
+import numpy as np
+
+A = np.array(True, ndmin=2, dtype=bool)
+B = np.array(1.0, ndmin=2, dtype=np.float32)
+A.setflags(write=False)
+B.setflags(write=False)
+
+a = np.bool_(True)
+b = np.float32(1.0)
+c = 1.0
+d = np.array(1.0, dtype=np.float32)  # writeable
+
+np.take(a, 0)
+np.take(b, 0)
+np.take(c, 0)
+np.take(A, 0)
+np.take(B, 0)
+np.take(A, [0])
+np.take(B, [0])
+
+np.reshape(a, 1)
+np.reshape(b, 1)
+np.reshape(c, 1)
+np.reshape(A, 1)
+np.reshape(B, 1)
+
+np.choose(a, [True, True])
+np.choose(A, [1.0, 1.0])
+
+np.repeat(a, 1)
+np.repeat(b, 1)
+np.repeat(c, 1)
+np.repeat(A, 1)
+np.repeat(B, 1)
+
+np.swapaxes(A, 0, 0)
+np.swapaxes(B, 0, 0)
+
+np.transpose(a)
+np.transpose(b)
+np.transpose(c)
+np.transpose(A)
+np.transpose(B)
+
+np.partition(a, 0, axis=None)
+np.partition(b, 0, axis=None)
+np.partition(c, 0, axis=None)
+np.partition(A, 0)
+np.partition(B, 0)
+
+np.argpartition(a, 0)
+np.argpartition(b, 0)
+np.argpartition(c, 0)
+np.argpartition(A, 0)
+np.argpartition(B, 0)
+
+np.sort(A, 0)
+np.sort(B, 0)
+
+np.argsort(A, 0)
+np.argsort(B, 0)
+
+np.argmax(A)
+np.argmax(B)
+np.argmax(A, axis=0)
+np.argmax(B, axis=0)
+
+np.argmin(A)
+np.argmin(B)
+np.argmin(A, axis=0)
+np.argmin(B, axis=0)
+
+np.searchsorted(A[0], 0)
+np.searchsorted(B[0], 0)
+np.searchsorted(A[0], [0])
+np.searchsorted(B[0], [0])
+
+np.resize(a, (5, 5))
+np.resize(b, (5, 5))
+np.resize(c, (5, 5))
+np.resize(A, (5, 5))
+np.resize(B, (5, 5))
+
+np.squeeze(a)
+np.squeeze(b)
+np.squeeze(c)
+np.squeeze(A)
+np.squeeze(B)
+
+np.diagonal(A)
+np.diagonal(B)
+
+np.trace(A)
+np.trace(B)
+
+np.ravel(a)
+np.ravel(b)
+np.ravel(c)
+np.ravel(A)
+np.ravel(B)
+
+np.nonzero(A)
+np.nonzero(B)
+
+np.shape(a)
+np.shape(b)
+np.shape(c)
+np.shape(A)
+np.shape(B)
+
+np.compress([True], a)
+np.compress([True], b)
+np.compress([True], c)
+np.compress([True], A)
+np.compress([True], B)
+
+np.clip(a, 0, 1.0)
+np.clip(b, -1, 1)
+np.clip(a, 0, None)
+np.clip(b, None, 1)
+np.clip(c, 0, 1)
+np.clip(A, 0, 1)
+np.clip(B, 0, 1)
+np.clip(B, [0, 1], [1, 2])
+
+np.sum(a)
+np.sum(b)
+np.sum(c)
+np.sum(A)
+np.sum(B)
+np.sum(A, axis=0)
+np.sum(B, axis=0)
+
+np.all(a)
+np.all(b)
+np.all(c)
+np.all(A)
+np.all(B)
+np.all(A, axis=0)
+np.all(B, axis=0)
+np.all(A, keepdims=True)
+np.all(B, keepdims=True)
+
+np.any(a)
+np.any(b)
+np.any(c)
+np.any(A)
+np.any(B)
+np.any(A, axis=0)
+np.any(B, axis=0)
+np.any(A, keepdims=True)
+np.any(B, keepdims=True)
+
+np.cumsum(a)
+np.cumsum(b)
+np.cumsum(c)
+np.cumsum(A)
+np.cumsum(B)
+
+np.ptp(b)
+np.ptp(c)
+np.ptp(B)
+np.ptp(B, axis=0)
+np.ptp(B, keepdims=True)
+
+np.amax(a)
+np.amax(b)
+np.amax(c)
+np.amax(A)
+np.amax(B)
+np.amax(A, axis=0)
+np.amax(B, axis=0)
+np.amax(A, keepdims=True)
+np.amax(B, keepdims=True)
+
+np.amin(a)
+np.amin(b)
+np.amin(c)
+np.amin(A)
+np.amin(B)
+np.amin(A, axis=0)
+np.amin(B, axis=0)
+np.amin(A, keepdims=True)
+np.amin(B, keepdims=True)
+
+np.prod(a)
+np.prod(b)
+np.prod(c)
+np.prod(A)
+np.prod(B)
+np.prod(a, dtype=None)
+np.prod(A, dtype=None)
+np.prod(A, axis=0)
+np.prod(B, axis=0)
+np.prod(A, keepdims=True)
+np.prod(B, keepdims=True)
+np.prod(b, out=d)
+np.prod(B, out=d)
+
+np.cumprod(a)
+np.cumprod(b)
+np.cumprod(c)
+np.cumprod(A)
+np.cumprod(B)
+
+np.ndim(a)
+np.ndim(b)
+np.ndim(c)
+np.ndim(A)
+np.ndim(B)
+
+np.size(a)
+np.size(b)
+np.size(c)
+np.size(A)
+np.size(B)
+
+np.around(a)
+np.around(b)
+np.around(c)
+np.around(A)
+np.around(B)
+
+np.mean(a)
+np.mean(b)
+np.mean(c)
+np.mean(A)
+np.mean(B)
+np.mean(A, axis=0)
+np.mean(B, axis=0)
+np.mean(A, keepdims=True)
+np.mean(B, keepdims=True)
+np.mean(b, out=d)
+np.mean(B, out=d)
+
+np.std(a)
+np.std(b)
+np.std(c)
+np.std(A)
+np.std(B)
+np.std(A, axis=0)
+np.std(B, axis=0)
+np.std(A, keepdims=True)
+np.std(B, keepdims=True)
+np.std(b, out=d)
+np.std(B, out=d)
+
+np.var(a)
+np.var(b)
+np.var(c)
+np.var(A)
+np.var(B)
+np.var(A, axis=0)
+np.var(B, axis=0)
+np.var(A, keepdims=True)
+np.var(B, keepdims=True)
+np.var(b, out=d)
+np.var(B, out=d)
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/pass/index_tricks.py b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/index_tricks.py
new file mode 100644
index 0000000000000000000000000000000000000000..4c4c1195990accd61c3cba9c5684185038dfa17e
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/index_tricks.py
@@ -0,0 +1,64 @@
+from __future__ import annotations
+from typing import Any
+import numpy as np
+
+AR_LIKE_b = [[True, True], [True, True]]
+AR_LIKE_i = [[1, 2], [3, 4]]
+AR_LIKE_f = [[1.0, 2.0], [3.0, 4.0]]
+AR_LIKE_U = [["1", "2"], ["3", "4"]]
+
+AR_i8: np.ndarray[Any, np.dtype[np.int64]] = np.array(AR_LIKE_i, dtype=np.int64)
+
+np.ndenumerate(AR_i8)
+np.ndenumerate(AR_LIKE_f)
+np.ndenumerate(AR_LIKE_U)
+
+np.ndenumerate(AR_i8).iter
+np.ndenumerate(AR_LIKE_f).iter
+np.ndenumerate(AR_LIKE_U).iter
+
+next(np.ndenumerate(AR_i8))
+next(np.ndenumerate(AR_LIKE_f))
+next(np.ndenumerate(AR_LIKE_U))
+
+iter(np.ndenumerate(AR_i8))
+iter(np.ndenumerate(AR_LIKE_f))
+iter(np.ndenumerate(AR_LIKE_U))
+
+iter(np.ndindex(1, 2, 3))
+next(np.ndindex(1, 2, 3))
+
+np.unravel_index([22, 41, 37], (7, 6))
+np.unravel_index([31, 41, 13], (7, 6), order='F')
+np.unravel_index(1621, (6, 7, 8, 9))
+
+np.ravel_multi_index(AR_LIKE_i, (7, 6))
+np.ravel_multi_index(AR_LIKE_i, (7, 6), order='F')
+np.ravel_multi_index(AR_LIKE_i, (4, 6), mode='clip')
+np.ravel_multi_index(AR_LIKE_i, (4, 4), mode=('clip', 'wrap'))
+np.ravel_multi_index((3, 1, 4, 1), (6, 7, 8, 9))
+
+np.mgrid[1:1:2]
+np.mgrid[1:1:2, None:10]
+
+np.ogrid[1:1:2]
+np.ogrid[1:1:2, None:10]
+
+np.index_exp[0:1]
+np.index_exp[0:1, None:3]
+np.index_exp[0, 0:1, ..., [0, 1, 3]]
+
+np.s_[0:1]
+np.s_[0:1, None:3]
+np.s_[0, 0:1, ..., [0, 1, 3]]
+
+np.ix_(AR_LIKE_b[0])
+np.ix_(AR_LIKE_i[0], AR_LIKE_f[0])
+np.ix_(AR_i8[0])
+
+np.fill_diagonal(AR_i8, 5)
+
+np.diag_indices(4)
+np.diag_indices(2, 3)
+
+np.diag_indices_from(AR_i8)
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/pass/lib_utils.py b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/lib_utils.py
new file mode 100644
index 0000000000000000000000000000000000000000..53a3e17432e4cfafa29790bccb4aa3fd698a3ee5
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/lib_utils.py
@@ -0,0 +1,28 @@
+from __future__ import annotations
+
+from io import StringIO
+
+import numpy as np
+
+FILE = StringIO()
+AR = np.arange(10, dtype=np.float64)
+
+
+def func(a: int) -> bool:
+    return True
+
+
+np.deprecate(func)
+np.deprecate()
+
+np.deprecate_with_doc("test")
+np.deprecate_with_doc(None)
+
+np.byte_bounds(AR)
+np.byte_bounds(np.float64())
+
+np.info(1, output=FILE)
+
+np.source(np.interp, output=FILE)
+
+np.lookfor("binary representation", output=FILE)
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/pass/lib_version.py b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/lib_version.py
new file mode 100644
index 0000000000000000000000000000000000000000..f3825eca524795f4d9742873a773cd7749636e2a
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/lib_version.py
@@ -0,0 +1,18 @@
+from numpy.lib import NumpyVersion
+
+version = NumpyVersion("1.8.0")
+
+version.vstring
+version.version
+version.major
+version.minor
+version.bugfix
+version.pre_release
+version.is_devversion
+
+version == version
+version != version
+version < "1.8.0"
+version <= version
+version > version
+version >= "1.8.0"
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/pass/literal.py b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/literal.py
new file mode 100644
index 0000000000000000000000000000000000000000..d06431eed4da31ada71eeb3947f6b238e7b2fb74
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/literal.py
@@ -0,0 +1,47 @@
+from __future__ import annotations
+
+from functools import partial
+from collections.abc import Callable
+
+import pytest  # type: ignore
+import numpy as np
+
+AR = np.array(0)
+AR.setflags(write=False)
+
+KACF = frozenset({None, "K", "A", "C", "F"})
+ACF = frozenset({None, "A", "C", "F"})
+CF = frozenset({None, "C", "F"})
+
+order_list: list[tuple[frozenset, Callable]] = [
+    (KACF, partial(np.ndarray, 1)),
+    (KACF, AR.tobytes),
+    (KACF, partial(AR.astype, int)),
+    (KACF, AR.copy),
+    (ACF, partial(AR.reshape, 1)),
+    (KACF, AR.flatten),
+    (KACF, AR.ravel),
+    (KACF, partial(np.array, 1)),
+    (CF, partial(np.zeros, 1)),
+    (CF, partial(np.ones, 1)),
+    (CF, partial(np.empty, 1)),
+    (CF, partial(np.full, 1, 1)),
+    (KACF, partial(np.zeros_like, AR)),
+    (KACF, partial(np.ones_like, AR)),
+    (KACF, partial(np.empty_like, AR)),
+    (KACF, partial(np.full_like, AR, 1)),
+    (KACF, partial(np.add, 1, 1)),  # i.e. np.ufunc.__call__
+    (ACF, partial(np.reshape, AR, 1)),
+    (KACF, partial(np.ravel, AR)),
+    (KACF, partial(np.asarray, 1)),
+    (KACF, partial(np.asanyarray, 1)),
+]
+
+for order_set, func in order_list:
+    for order in order_set:
+        func(order=order)
+
+    invalid_orders = KACF - order_set
+    for order in invalid_orders:
+        with pytest.raises(ValueError):
+            func(order=order)
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/pass/mod.py b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/mod.py
new file mode 100644
index 0000000000000000000000000000000000000000..b5b9afb2a54406a5ee4282c43e027f117e714cda
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/mod.py
@@ -0,0 +1,149 @@
+import numpy as np
+
+f8 = np.float64(1)
+i8 = np.int64(1)
+u8 = np.uint64(1)
+
+f4 = np.float32(1)
+i4 = np.int32(1)
+u4 = np.uint32(1)
+
+td = np.timedelta64(1, "D")
+b_ = np.bool_(1)
+
+b = bool(1)
+f = float(1)
+i = int(1)
+
+AR = np.array([1], dtype=np.bool_)
+AR.setflags(write=False)
+
+AR2 = np.array([1], dtype=np.timedelta64)
+AR2.setflags(write=False)
+
+# Time structures
+
+td % td
+td % AR2
+AR2 % td
+
+divmod(td, td)
+divmod(td, AR2)
+divmod(AR2, td)
+
+# Bool
+
+b_ % b
+b_ % i
+b_ % f
+b_ % b_
+b_ % i8
+b_ % u8
+b_ % f8
+b_ % AR
+
+divmod(b_, b)
+divmod(b_, i)
+divmod(b_, f)
+divmod(b_, b_)
+divmod(b_, i8)
+divmod(b_, u8)
+divmod(b_, f8)
+divmod(b_, AR)
+
+b % b_
+i % b_
+f % b_
+b_ % b_
+i8 % b_
+u8 % b_
+f8 % b_
+AR % b_
+
+divmod(b, b_)
+divmod(i, b_)
+divmod(f, b_)
+divmod(b_, b_)
+divmod(i8, b_)
+divmod(u8, b_)
+divmod(f8, b_)
+divmod(AR, b_)
+
+# int
+
+i8 % b
+i8 % i
+i8 % f
+i8 % i8
+i8 % f8
+i4 % i8
+i4 % f8
+i4 % i4
+i4 % f4
+i8 % AR
+
+divmod(i8, b)
+divmod(i8, i)
+divmod(i8, f)
+divmod(i8, i8)
+divmod(i8, f8)
+divmod(i8, i4)
+divmod(i8, f4)
+divmod(i4, i4)
+divmod(i4, f4)
+divmod(i8, AR)
+
+b % i8
+i % i8
+f % i8
+i8 % i8
+f8 % i8
+i8 % i4
+f8 % i4
+i4 % i4
+f4 % i4
+AR % i8
+
+divmod(b, i8)
+divmod(i, i8)
+divmod(f, i8)
+divmod(i8, i8)
+divmod(f8, i8)
+divmod(i4, i8)
+divmod(f4, i8)
+divmod(i4, i4)
+divmod(f4, i4)
+divmod(AR, i8)
+
+# float
+
+f8 % b
+f8 % i
+f8 % f
+i8 % f4
+f4 % f4
+f8 % AR
+
+divmod(f8, b)
+divmod(f8, i)
+divmod(f8, f)
+divmod(f8, f8)
+divmod(f8, f4)
+divmod(f4, f4)
+divmod(f8, AR)
+
+b % f8
+i % f8
+f % f8
+f8 % f8
+f8 % f8
+f4 % f4
+AR % f8
+
+divmod(b, f8)
+divmod(i, f8)
+divmod(f, f8)
+divmod(f8, f8)
+divmod(f4, f8)
+divmod(f4, f4)
+divmod(AR, f8)
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/pass/modules.py b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/modules.py
new file mode 100644
index 0000000000000000000000000000000000000000..f2d779e20e63e6d70035348f6412fb8afe4d67ad
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/modules.py
@@ -0,0 +1,42 @@
+import numpy as np
+from numpy import f2py
+
+np.char
+np.ctypeslib
+np.emath
+np.fft
+np.lib
+np.linalg
+np.ma
+np.matrixlib
+np.polynomial
+np.random
+np.rec
+np.testing
+np.version
+
+np.lib.format
+np.lib.mixins
+np.lib.scimath
+np.lib.stride_tricks
+np.ma.extras
+np.polynomial.chebyshev
+np.polynomial.hermite
+np.polynomial.hermite_e
+np.polynomial.laguerre
+np.polynomial.legendre
+np.polynomial.polynomial
+
+np.__path__
+np.__version__
+
+np.__all__
+np.char.__all__
+np.ctypeslib.__all__
+np.emath.__all__
+np.lib.__all__
+np.ma.__all__
+np.random.__all__
+np.rec.__all__
+np.testing.__all__
+f2py.__all__
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/pass/multiarray.py b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/multiarray.py
new file mode 100644
index 0000000000000000000000000000000000000000..26cedfd77566e7b7865345e0775af88153e74ffc
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/multiarray.py
@@ -0,0 +1,76 @@
+import numpy as np
+import numpy.typing as npt
+
+AR_f8: npt.NDArray[np.float64] = np.array([1.0])
+AR_i4 = np.array([1], dtype=np.int32)
+AR_u1 = np.array([1], dtype=np.uint8)
+
+AR_LIKE_f = [1.5]
+AR_LIKE_i = [1]
+
+b_f8 = np.broadcast(AR_f8)
+b_i4_f8_f8 = np.broadcast(AR_i4, AR_f8, AR_f8)
+
+next(b_f8)
+b_f8.reset()
+b_f8.index
+b_f8.iters
+b_f8.nd
+b_f8.ndim
+b_f8.numiter
+b_f8.shape
+b_f8.size
+
+next(b_i4_f8_f8)
+b_i4_f8_f8.reset()
+b_i4_f8_f8.ndim
+b_i4_f8_f8.index
+b_i4_f8_f8.iters
+b_i4_f8_f8.nd
+b_i4_f8_f8.numiter
+b_i4_f8_f8.shape
+b_i4_f8_f8.size
+
+np.inner(AR_f8, AR_i4)
+
+np.where([True, True, False])
+np.where([True, True, False], 1, 0)
+
+np.lexsort([0, 1, 2])
+
+np.can_cast(np.dtype("i8"), int)
+np.can_cast(AR_f8, "f8")
+np.can_cast(AR_f8, np.complex128, casting="unsafe")
+
+np.min_scalar_type([1])
+np.min_scalar_type(AR_f8)
+
+np.result_type(int, AR_i4)
+np.result_type(AR_f8, AR_u1)
+np.result_type(AR_f8, np.complex128)
+
+np.dot(AR_LIKE_f, AR_i4)
+np.dot(AR_u1, 1)
+np.dot(1.5j, 1)
+np.dot(AR_u1, 1, out=AR_f8)
+
+np.vdot(AR_LIKE_f, AR_i4)
+np.vdot(AR_u1, 1)
+np.vdot(1.5j, 1)
+
+np.bincount(AR_i4)
+
+np.copyto(AR_f8, [1.6])
+
+np.putmask(AR_f8, [True], 1.5)
+
+np.packbits(AR_i4)
+np.packbits(AR_u1)
+
+np.unpackbits(AR_u1)
+
+np.shares_memory(1, 2)
+np.shares_memory(AR_f8, AR_f8, max_work=1)
+
+np.may_share_memory(1, 2)
+np.may_share_memory(AR_f8, AR_f8, max_work=1)
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/pass/ndarray_conversion.py b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/ndarray_conversion.py
new file mode 100644
index 0000000000000000000000000000000000000000..303cf53e44537e3e2f755b118b6fec85f634d09f
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/ndarray_conversion.py
@@ -0,0 +1,94 @@
+import os
+import tempfile
+
+import numpy as np
+
+nd = np.array([[1, 2], [3, 4]])
+scalar_array = np.array(1)
+
+# item
+scalar_array.item()
+nd.item(1)
+nd.item(0, 1)
+nd.item((0, 1))
+
+# tolist is pretty simple
+
+# itemset
+scalar_array.itemset(3)
+nd.itemset(3, 0)
+nd.itemset((0, 0), 3)
+
+# tobytes
+nd.tobytes()
+nd.tobytes("C")
+nd.tobytes(None)
+
+# tofile
+if os.name != "nt":
+    with tempfile.NamedTemporaryFile(suffix=".txt") as tmp:
+        nd.tofile(tmp.name)
+        nd.tofile(tmp.name, "")
+        nd.tofile(tmp.name, sep="")
+
+        nd.tofile(tmp.name, "", "%s")
+        nd.tofile(tmp.name, format="%s")
+
+        nd.tofile(tmp)
+
+# dump is pretty simple
+# dumps is pretty simple
+
+# astype
+nd.astype("float")
+nd.astype(float)
+
+nd.astype(float, "K")
+nd.astype(float, order="K")
+
+nd.astype(float, "K", "unsafe")
+nd.astype(float, casting="unsafe")
+
+nd.astype(float, "K", "unsafe", True)
+nd.astype(float, subok=True)
+
+nd.astype(float, "K", "unsafe", True, True)
+nd.astype(float, copy=True)
+
+# byteswap
+nd.byteswap()
+nd.byteswap(True)
+
+# copy
+nd.copy()
+nd.copy("C")
+
+# view
+nd.view()
+nd.view(np.int64)
+nd.view(dtype=np.int64)
+nd.view(np.int64, np.matrix)
+nd.view(type=np.matrix)
+
+# getfield
+complex_array = np.array([[1 + 1j, 0], [0, 1 - 1j]], dtype=np.complex128)
+
+complex_array.getfield("float")
+complex_array.getfield(float)
+
+complex_array.getfield("float", 8)
+complex_array.getfield(float, offset=8)
+
+# setflags
+nd.setflags()
+
+nd.setflags(True)
+nd.setflags(write=True)
+
+nd.setflags(True, True)
+nd.setflags(write=True, align=True)
+
+nd.setflags(True, True, False)
+nd.setflags(write=True, align=True, uic=False)
+
+# fill is pretty simple
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/pass/ndarray_misc.py b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/ndarray_misc.py
new file mode 100644
index 0000000000000000000000000000000000000000..6beacc5d7cc9e586f9d6abe5ac5d3a62381ffc59
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/ndarray_misc.py
@@ -0,0 +1,185 @@
+"""
+Tests for miscellaneous (non-magic) ``np.ndarray``/``np.generic`` methods.
+
+More extensive tests are performed for the methods'
+function-based counterpart in `../from_numeric.py`.
+
+"""
+
+from __future__ import annotations
+
+import operator
+from typing import cast, Any
+
+import numpy as np
+
+class SubClass(np.ndarray): ...
+
+i4 = np.int32(1)
+A: np.ndarray[Any, np.dtype[np.int32]] = np.array([[1]], dtype=np.int32)
+B0 = np.empty((), dtype=np.int32).view(SubClass)
+B1 = np.empty((1,), dtype=np.int32).view(SubClass)
+B2 = np.empty((1, 1), dtype=np.int32).view(SubClass)
+C: np.ndarray[Any, np.dtype[np.int32]] = np.array([0, 1, 2], dtype=np.int32)
+D = np.ones(3).view(SubClass)
+
+i4.all()
+A.all()
+A.all(axis=0)
+A.all(keepdims=True)
+A.all(out=B0)
+
+i4.any()
+A.any()
+A.any(axis=0)
+A.any(keepdims=True)
+A.any(out=B0)
+
+i4.argmax()
+A.argmax()
+A.argmax(axis=0)
+A.argmax(out=B0)
+
+i4.argmin()
+A.argmin()
+A.argmin(axis=0)
+A.argmin(out=B0)
+
+i4.argsort()
+A.argsort()
+
+i4.choose([()])
+_choices = np.array([[0, 1, 2], [3, 4, 5], [6, 7, 8]], dtype=np.int32)
+C.choose(_choices)
+C.choose(_choices, out=D)
+
+i4.clip(1)
+A.clip(1)
+A.clip(None, 1)
+A.clip(1, out=B2)
+A.clip(None, 1, out=B2)
+
+i4.compress([1])
+A.compress([1])
+A.compress([1], out=B1)
+
+i4.conj()
+A.conj()
+B0.conj()
+
+i4.conjugate()
+A.conjugate()
+B0.conjugate()
+
+i4.cumprod()
+A.cumprod()
+A.cumprod(out=B1)
+
+i4.cumsum()
+A.cumsum()
+A.cumsum(out=B1)
+
+i4.max()
+A.max()
+A.max(axis=0)
+A.max(keepdims=True)
+A.max(out=B0)
+
+i4.mean()
+A.mean()
+A.mean(axis=0)
+A.mean(keepdims=True)
+A.mean(out=B0)
+
+i4.min()
+A.min()
+A.min(axis=0)
+A.min(keepdims=True)
+A.min(out=B0)
+
+i4.newbyteorder()
+A.newbyteorder()
+B0.newbyteorder('|')
+
+i4.prod()
+A.prod()
+A.prod(axis=0)
+A.prod(keepdims=True)
+A.prod(out=B0)
+
+i4.ptp()
+A.ptp()
+A.ptp(axis=0)
+A.ptp(keepdims=True)
+A.astype(int).ptp(out=B0)
+
+i4.round()
+A.round()
+A.round(out=B2)
+
+i4.repeat(1)
+A.repeat(1)
+B0.repeat(1)
+
+i4.std()
+A.std()
+A.std(axis=0)
+A.std(keepdims=True)
+A.std(out=B0.astype(np.float64))
+
+i4.sum()
+A.sum()
+A.sum(axis=0)
+A.sum(keepdims=True)
+A.sum(out=B0)
+
+i4.take(0)
+A.take(0)
+A.take([0])
+A.take(0, out=B0)
+A.take([0], out=B1)
+
+i4.var()
+A.var()
+A.var(axis=0)
+A.var(keepdims=True)
+A.var(out=B0)
+
+A.argpartition([0])
+
+A.diagonal()
+
+A.dot(1)
+A.dot(1, out=B2)
+
+A.nonzero()
+
+C.searchsorted(1)
+
+A.trace()
+A.trace(out=B0)
+
+void = cast(np.void, np.array(1, dtype=[("f", np.float64)]).take(0))
+void.setfield(10, np.float64)
+
+A.item(0)
+C.item(0)
+
+A.ravel()
+C.ravel()
+
+A.flatten()
+C.flatten()
+
+A.reshape(1)
+C.reshape(3)
+
+int(np.array(1.0, dtype=np.float64))
+int(np.array("1", dtype=np.str_))
+
+float(np.array(1.0, dtype=np.float64))
+float(np.array("1", dtype=np.str_))
+
+complex(np.array(1.0, dtype=np.float64))
+
+operator.index(np.array(1, dtype=np.int64))
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/pass/ndarray_shape_manipulation.py b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/ndarray_shape_manipulation.py
new file mode 100644
index 0000000000000000000000000000000000000000..0ca3dff392e12a4122740ade2ceb71b3d6e7bb08
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/ndarray_shape_manipulation.py
@@ -0,0 +1,47 @@
+import numpy as np
+
+nd1 = np.array([[1, 2], [3, 4]])
+
+# reshape
+nd1.reshape(4)
+nd1.reshape(2, 2)
+nd1.reshape((2, 2))
+
+nd1.reshape((2, 2), order="C")
+nd1.reshape(4, order="C")
+
+# resize
+nd1.resize()
+nd1.resize(4)
+nd1.resize(2, 2)
+nd1.resize((2, 2))
+
+nd1.resize((2, 2), refcheck=True)
+nd1.resize(4, refcheck=True)
+
+nd2 = np.array([[1, 2], [3, 4]])
+
+# transpose
+nd2.transpose()
+nd2.transpose(1, 0)
+nd2.transpose((1, 0))
+
+# swapaxes
+nd2.swapaxes(0, 1)
+
+# flatten
+nd2.flatten()
+nd2.flatten("C")
+
+# ravel
+nd2.ravel()
+nd2.ravel("C")
+
+# squeeze
+nd2.squeeze()
+
+nd3 = np.array([[1, 2]])
+nd3.squeeze(0)
+
+nd4 = np.array([[[1, 2]]])
+nd4.squeeze((0, 1))
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/pass/numeric.py b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/numeric.py
new file mode 100644
index 0000000000000000000000000000000000000000..c4a73c1e9b7c2792da739047b1d7c88c22c6acfb
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/numeric.py
@@ -0,0 +1,90 @@
+"""
+Tests for :mod:`numpy.core.numeric`.
+
+Does not include tests which fall under ``array_constructors``.
+
+"""
+
+from __future__ import annotations
+
+import numpy as np
+
+class SubClass(np.ndarray):
+    ...
+
+i8 = np.int64(1)
+
+A = np.arange(27).reshape(3, 3, 3)
+B: list[list[list[int]]] = A.tolist()
+C = np.empty((27, 27)).view(SubClass)
+
+np.count_nonzero(i8)
+np.count_nonzero(A)
+np.count_nonzero(B)
+np.count_nonzero(A, keepdims=True)
+np.count_nonzero(A, axis=0)
+
+np.isfortran(i8)
+np.isfortran(A)
+
+np.argwhere(i8)
+np.argwhere(A)
+
+np.flatnonzero(i8)
+np.flatnonzero(A)
+
+np.correlate(B[0][0], A.ravel(), mode="valid")
+np.correlate(A.ravel(), A.ravel(), mode="same")
+
+np.convolve(B[0][0], A.ravel(), mode="valid")
+np.convolve(A.ravel(), A.ravel(), mode="same")
+
+np.outer(i8, A)
+np.outer(B, A)
+np.outer(A, A)
+np.outer(A, A, out=C)
+
+np.tensordot(B, A)
+np.tensordot(A, A)
+np.tensordot(A, A, axes=0)
+np.tensordot(A, A, axes=(0, 1))
+
+np.isscalar(i8)
+np.isscalar(A)
+np.isscalar(B)
+
+np.roll(A, 1)
+np.roll(A, (1, 2))
+np.roll(B, 1)
+
+np.rollaxis(A, 0, 1)
+
+np.moveaxis(A, 0, 1)
+np.moveaxis(A, (0, 1), (1, 2))
+
+np.cross(B, A)
+np.cross(A, A)
+
+np.indices([0, 1, 2])
+np.indices([0, 1, 2], sparse=False)
+np.indices([0, 1, 2], sparse=True)
+
+np.binary_repr(1)
+
+np.base_repr(1)
+
+np.allclose(i8, A)
+np.allclose(B, A)
+np.allclose(A, A)
+
+np.isclose(i8, A)
+np.isclose(B, A)
+np.isclose(A, A)
+
+np.array_equal(i8, A)
+np.array_equal(B, A)
+np.array_equal(A, A)
+
+np.array_equiv(i8, A)
+np.array_equiv(B, A)
+np.array_equiv(A, A)
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/pass/numerictypes.py b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/numerictypes.py
new file mode 100644
index 0000000000000000000000000000000000000000..63b6ad0e22e221e22ad9eba9b48a526a6c741b5d
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/numerictypes.py
@@ -0,0 +1,42 @@
+import numpy as np
+
+np.maximum_sctype("S8")
+np.maximum_sctype(object)
+
+np.issctype(object)
+np.issctype("S8")
+
+np.obj2sctype(list)
+np.obj2sctype(list, default=None)
+np.obj2sctype(list, default=np.bytes_)
+
+np.issubclass_(np.int32, int)
+np.issubclass_(np.float64, float)
+np.issubclass_(np.float64, (int, float))
+
+np.issubsctype("int64", int)
+np.issubsctype(np.array([1]), np.array([1]))
+
+np.issubdtype("S1", np.bytes_)
+np.issubdtype(np.float64, np.float32)
+
+np.sctype2char("S1")
+np.sctype2char(list)
+
+np.cast[int]
+np.cast["i8"]
+np.cast[np.int64]
+
+np.nbytes[int]
+np.nbytes["i8"]
+np.nbytes[np.int64]
+
+np.ScalarType
+np.ScalarType[0]
+np.ScalarType[3]
+np.ScalarType[8]
+np.ScalarType[10]
+
+np.typecodes["Character"]
+np.typecodes["Complex"]
+np.typecodes["All"]
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/pass/random.py b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/random.py
new file mode 100644
index 0000000000000000000000000000000000000000..6a4d99f12b1304773533c1cbdbd45a2d52a44d8b
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/random.py
@@ -0,0 +1,1499 @@
+from __future__ import annotations
+
+from typing import Any
+import numpy as np
+
+SEED_NONE = None
+SEED_INT = 4579435749574957634658964293569
+SEED_ARR: np.ndarray[Any, np.dtype[np.int64]] = np.array([1, 2, 3, 4], dtype=np.int64)
+SEED_ARRLIKE: list[int] = [1, 2, 3, 4]
+SEED_SEED_SEQ: np.random.SeedSequence = np.random.SeedSequence(0)
+SEED_MT19937: np.random.MT19937 = np.random.MT19937(0)
+SEED_PCG64: np.random.PCG64 = np.random.PCG64(0)
+SEED_PHILOX: np.random.Philox = np.random.Philox(0)
+SEED_SFC64: np.random.SFC64 = np.random.SFC64(0)
+
+# default rng
+np.random.default_rng()
+np.random.default_rng(SEED_NONE)
+np.random.default_rng(SEED_INT)
+np.random.default_rng(SEED_ARR)
+np.random.default_rng(SEED_ARRLIKE)
+np.random.default_rng(SEED_SEED_SEQ)
+np.random.default_rng(SEED_MT19937)
+np.random.default_rng(SEED_PCG64)
+np.random.default_rng(SEED_PHILOX)
+np.random.default_rng(SEED_SFC64)
+
+# Seed Sequence
+np.random.SeedSequence(SEED_NONE)
+np.random.SeedSequence(SEED_INT)
+np.random.SeedSequence(SEED_ARR)
+np.random.SeedSequence(SEED_ARRLIKE)
+
+# Bit Generators
+np.random.MT19937(SEED_NONE)
+np.random.MT19937(SEED_INT)
+np.random.MT19937(SEED_ARR)
+np.random.MT19937(SEED_ARRLIKE)
+np.random.MT19937(SEED_SEED_SEQ)
+
+np.random.PCG64(SEED_NONE)
+np.random.PCG64(SEED_INT)
+np.random.PCG64(SEED_ARR)
+np.random.PCG64(SEED_ARRLIKE)
+np.random.PCG64(SEED_SEED_SEQ)
+
+np.random.Philox(SEED_NONE)
+np.random.Philox(SEED_INT)
+np.random.Philox(SEED_ARR)
+np.random.Philox(SEED_ARRLIKE)
+np.random.Philox(SEED_SEED_SEQ)
+
+np.random.SFC64(SEED_NONE)
+np.random.SFC64(SEED_INT)
+np.random.SFC64(SEED_ARR)
+np.random.SFC64(SEED_ARRLIKE)
+np.random.SFC64(SEED_SEED_SEQ)
+
+seed_seq: np.random.bit_generator.SeedSequence = np.random.SeedSequence(SEED_NONE)
+seed_seq.spawn(10)
+seed_seq.generate_state(3)
+seed_seq.generate_state(3, "u4")
+seed_seq.generate_state(3, "uint32")
+seed_seq.generate_state(3, "u8")
+seed_seq.generate_state(3, "uint64")
+seed_seq.generate_state(3, np.uint32)
+seed_seq.generate_state(3, np.uint64)
+
+
+def_gen: np.random.Generator = np.random.default_rng()
+
+D_arr_0p1: np.ndarray[Any, np.dtype[np.float64]] = np.array([0.1])
+D_arr_0p5: np.ndarray[Any, np.dtype[np.float64]] = np.array([0.5])
+D_arr_0p9: np.ndarray[Any, np.dtype[np.float64]] = np.array([0.9])
+D_arr_1p5: np.ndarray[Any, np.dtype[np.float64]] = np.array([1.5])
+I_arr_10: np.ndarray[Any, np.dtype[np.int_]] = np.array([10], dtype=np.int_)
+I_arr_20: np.ndarray[Any, np.dtype[np.int_]] = np.array([20], dtype=np.int_)
+D_arr_like_0p1: list[float] = [0.1]
+D_arr_like_0p5: list[float] = [0.5]
+D_arr_like_0p9: list[float] = [0.9]
+D_arr_like_1p5: list[float] = [1.5]
+I_arr_like_10: list[int] = [10]
+I_arr_like_20: list[int] = [20]
+D_2D_like: list[list[float]] = [[1, 2], [2, 3], [3, 4], [4, 5.1]]
+D_2D: np.ndarray[Any, np.dtype[np.float64]] = np.array(D_2D_like)
+
+S_out: np.ndarray[Any, np.dtype[np.float32]] = np.empty(1, dtype=np.float32)
+D_out: np.ndarray[Any, np.dtype[np.float64]] = np.empty(1)
+
+def_gen.standard_normal()
+def_gen.standard_normal(dtype=np.float32)
+def_gen.standard_normal(dtype="float32")
+def_gen.standard_normal(dtype="double")
+def_gen.standard_normal(dtype=np.float64)
+def_gen.standard_normal(size=None)
+def_gen.standard_normal(size=1)
+def_gen.standard_normal(size=1, dtype=np.float32)
+def_gen.standard_normal(size=1, dtype="f4")
+def_gen.standard_normal(size=1, dtype="float32", out=S_out)
+def_gen.standard_normal(dtype=np.float32, out=S_out)
+def_gen.standard_normal(size=1, dtype=np.float64)
+def_gen.standard_normal(size=1, dtype="float64")
+def_gen.standard_normal(size=1, dtype="f8")
+def_gen.standard_normal(out=D_out)
+def_gen.standard_normal(size=1, dtype="float64")
+def_gen.standard_normal(size=1, dtype="float64", out=D_out)
+
+def_gen.random()
+def_gen.random(dtype=np.float32)
+def_gen.random(dtype="float32")
+def_gen.random(dtype="double")
+def_gen.random(dtype=np.float64)
+def_gen.random(size=None)
+def_gen.random(size=1)
+def_gen.random(size=1, dtype=np.float32)
+def_gen.random(size=1, dtype="f4")
+def_gen.random(size=1, dtype="float32", out=S_out)
+def_gen.random(dtype=np.float32, out=S_out)
+def_gen.random(size=1, dtype=np.float64)
+def_gen.random(size=1, dtype="float64")
+def_gen.random(size=1, dtype="f8")
+def_gen.random(out=D_out)
+def_gen.random(size=1, dtype="float64")
+def_gen.random(size=1, dtype="float64", out=D_out)
+
+def_gen.standard_cauchy()
+def_gen.standard_cauchy(size=None)
+def_gen.standard_cauchy(size=1)
+
+def_gen.standard_exponential()
+def_gen.standard_exponential(method="inv")
+def_gen.standard_exponential(dtype=np.float32)
+def_gen.standard_exponential(dtype="float32")
+def_gen.standard_exponential(dtype="double")
+def_gen.standard_exponential(dtype=np.float64)
+def_gen.standard_exponential(size=None)
+def_gen.standard_exponential(size=None, method="inv")
+def_gen.standard_exponential(size=1, method="inv")
+def_gen.standard_exponential(size=1, dtype=np.float32)
+def_gen.standard_exponential(size=1, dtype="f4", method="inv")
+def_gen.standard_exponential(size=1, dtype="float32", out=S_out)
+def_gen.standard_exponential(dtype=np.float32, out=S_out)
+def_gen.standard_exponential(size=1, dtype=np.float64, method="inv")
+def_gen.standard_exponential(size=1, dtype="float64")
+def_gen.standard_exponential(size=1, dtype="f8")
+def_gen.standard_exponential(out=D_out)
+def_gen.standard_exponential(size=1, dtype="float64")
+def_gen.standard_exponential(size=1, dtype="float64", out=D_out)
+
+def_gen.zipf(1.5)
+def_gen.zipf(1.5, size=None)
+def_gen.zipf(1.5, size=1)
+def_gen.zipf(D_arr_1p5)
+def_gen.zipf(D_arr_1p5, size=1)
+def_gen.zipf(D_arr_like_1p5)
+def_gen.zipf(D_arr_like_1p5, size=1)
+
+def_gen.weibull(0.5)
+def_gen.weibull(0.5, size=None)
+def_gen.weibull(0.5, size=1)
+def_gen.weibull(D_arr_0p5)
+def_gen.weibull(D_arr_0p5, size=1)
+def_gen.weibull(D_arr_like_0p5)
+def_gen.weibull(D_arr_like_0p5, size=1)
+
+def_gen.standard_t(0.5)
+def_gen.standard_t(0.5, size=None)
+def_gen.standard_t(0.5, size=1)
+def_gen.standard_t(D_arr_0p5)
+def_gen.standard_t(D_arr_0p5, size=1)
+def_gen.standard_t(D_arr_like_0p5)
+def_gen.standard_t(D_arr_like_0p5, size=1)
+
+def_gen.poisson(0.5)
+def_gen.poisson(0.5, size=None)
+def_gen.poisson(0.5, size=1)
+def_gen.poisson(D_arr_0p5)
+def_gen.poisson(D_arr_0p5, size=1)
+def_gen.poisson(D_arr_like_0p5)
+def_gen.poisson(D_arr_like_0p5, size=1)
+
+def_gen.power(0.5)
+def_gen.power(0.5, size=None)
+def_gen.power(0.5, size=1)
+def_gen.power(D_arr_0p5)
+def_gen.power(D_arr_0p5, size=1)
+def_gen.power(D_arr_like_0p5)
+def_gen.power(D_arr_like_0p5, size=1)
+
+def_gen.pareto(0.5)
+def_gen.pareto(0.5, size=None)
+def_gen.pareto(0.5, size=1)
+def_gen.pareto(D_arr_0p5)
+def_gen.pareto(D_arr_0p5, size=1)
+def_gen.pareto(D_arr_like_0p5)
+def_gen.pareto(D_arr_like_0p5, size=1)
+
+def_gen.chisquare(0.5)
+def_gen.chisquare(0.5, size=None)
+def_gen.chisquare(0.5, size=1)
+def_gen.chisquare(D_arr_0p5)
+def_gen.chisquare(D_arr_0p5, size=1)
+def_gen.chisquare(D_arr_like_0p5)
+def_gen.chisquare(D_arr_like_0p5, size=1)
+
+def_gen.exponential(0.5)
+def_gen.exponential(0.5, size=None)
+def_gen.exponential(0.5, size=1)
+def_gen.exponential(D_arr_0p5)
+def_gen.exponential(D_arr_0p5, size=1)
+def_gen.exponential(D_arr_like_0p5)
+def_gen.exponential(D_arr_like_0p5, size=1)
+
+def_gen.geometric(0.5)
+def_gen.geometric(0.5, size=None)
+def_gen.geometric(0.5, size=1)
+def_gen.geometric(D_arr_0p5)
+def_gen.geometric(D_arr_0p5, size=1)
+def_gen.geometric(D_arr_like_0p5)
+def_gen.geometric(D_arr_like_0p5, size=1)
+
+def_gen.logseries(0.5)
+def_gen.logseries(0.5, size=None)
+def_gen.logseries(0.5, size=1)
+def_gen.logseries(D_arr_0p5)
+def_gen.logseries(D_arr_0p5, size=1)
+def_gen.logseries(D_arr_like_0p5)
+def_gen.logseries(D_arr_like_0p5, size=1)
+
+def_gen.rayleigh(0.5)
+def_gen.rayleigh(0.5, size=None)
+def_gen.rayleigh(0.5, size=1)
+def_gen.rayleigh(D_arr_0p5)
+def_gen.rayleigh(D_arr_0p5, size=1)
+def_gen.rayleigh(D_arr_like_0p5)
+def_gen.rayleigh(D_arr_like_0p5, size=1)
+
+def_gen.standard_gamma(0.5)
+def_gen.standard_gamma(0.5, size=None)
+def_gen.standard_gamma(0.5, dtype="float32")
+def_gen.standard_gamma(0.5, size=None, dtype="float32")
+def_gen.standard_gamma(0.5, size=1)
+def_gen.standard_gamma(D_arr_0p5)
+def_gen.standard_gamma(D_arr_0p5, dtype="f4")
+def_gen.standard_gamma(0.5, size=1, dtype="float32", out=S_out)
+def_gen.standard_gamma(D_arr_0p5, dtype=np.float32, out=S_out)
+def_gen.standard_gamma(D_arr_0p5, size=1)
+def_gen.standard_gamma(D_arr_like_0p5)
+def_gen.standard_gamma(D_arr_like_0p5, size=1)
+def_gen.standard_gamma(0.5, out=D_out)
+def_gen.standard_gamma(D_arr_like_0p5, out=D_out)
+def_gen.standard_gamma(D_arr_like_0p5, size=1)
+def_gen.standard_gamma(D_arr_like_0p5, size=1, out=D_out, dtype=np.float64)
+
+def_gen.vonmises(0.5, 0.5)
+def_gen.vonmises(0.5, 0.5, size=None)
+def_gen.vonmises(0.5, 0.5, size=1)
+def_gen.vonmises(D_arr_0p5, 0.5)
+def_gen.vonmises(0.5, D_arr_0p5)
+def_gen.vonmises(D_arr_0p5, 0.5, size=1)
+def_gen.vonmises(0.5, D_arr_0p5, size=1)
+def_gen.vonmises(D_arr_like_0p5, 0.5)
+def_gen.vonmises(0.5, D_arr_like_0p5)
+def_gen.vonmises(D_arr_0p5, D_arr_0p5)
+def_gen.vonmises(D_arr_like_0p5, D_arr_like_0p5)
+def_gen.vonmises(D_arr_0p5, D_arr_0p5, size=1)
+def_gen.vonmises(D_arr_like_0p5, D_arr_like_0p5, size=1)
+
+def_gen.wald(0.5, 0.5)
+def_gen.wald(0.5, 0.5, size=None)
+def_gen.wald(0.5, 0.5, size=1)
+def_gen.wald(D_arr_0p5, 0.5)
+def_gen.wald(0.5, D_arr_0p5)
+def_gen.wald(D_arr_0p5, 0.5, size=1)
+def_gen.wald(0.5, D_arr_0p5, size=1)
+def_gen.wald(D_arr_like_0p5, 0.5)
+def_gen.wald(0.5, D_arr_like_0p5)
+def_gen.wald(D_arr_0p5, D_arr_0p5)
+def_gen.wald(D_arr_like_0p5, D_arr_like_0p5)
+def_gen.wald(D_arr_0p5, D_arr_0p5, size=1)
+def_gen.wald(D_arr_like_0p5, D_arr_like_0p5, size=1)
+
+def_gen.uniform(0.5, 0.5)
+def_gen.uniform(0.5, 0.5, size=None)
+def_gen.uniform(0.5, 0.5, size=1)
+def_gen.uniform(D_arr_0p5, 0.5)
+def_gen.uniform(0.5, D_arr_0p5)
+def_gen.uniform(D_arr_0p5, 0.5, size=1)
+def_gen.uniform(0.5, D_arr_0p5, size=1)
+def_gen.uniform(D_arr_like_0p5, 0.5)
+def_gen.uniform(0.5, D_arr_like_0p5)
+def_gen.uniform(D_arr_0p5, D_arr_0p5)
+def_gen.uniform(D_arr_like_0p5, D_arr_like_0p5)
+def_gen.uniform(D_arr_0p5, D_arr_0p5, size=1)
+def_gen.uniform(D_arr_like_0p5, D_arr_like_0p5, size=1)
+
+def_gen.beta(0.5, 0.5)
+def_gen.beta(0.5, 0.5, size=None)
+def_gen.beta(0.5, 0.5, size=1)
+def_gen.beta(D_arr_0p5, 0.5)
+def_gen.beta(0.5, D_arr_0p5)
+def_gen.beta(D_arr_0p5, 0.5, size=1)
+def_gen.beta(0.5, D_arr_0p5, size=1)
+def_gen.beta(D_arr_like_0p5, 0.5)
+def_gen.beta(0.5, D_arr_like_0p5)
+def_gen.beta(D_arr_0p5, D_arr_0p5)
+def_gen.beta(D_arr_like_0p5, D_arr_like_0p5)
+def_gen.beta(D_arr_0p5, D_arr_0p5, size=1)
+def_gen.beta(D_arr_like_0p5, D_arr_like_0p5, size=1)
+
+def_gen.f(0.5, 0.5)
+def_gen.f(0.5, 0.5, size=None)
+def_gen.f(0.5, 0.5, size=1)
+def_gen.f(D_arr_0p5, 0.5)
+def_gen.f(0.5, D_arr_0p5)
+def_gen.f(D_arr_0p5, 0.5, size=1)
+def_gen.f(0.5, D_arr_0p5, size=1)
+def_gen.f(D_arr_like_0p5, 0.5)
+def_gen.f(0.5, D_arr_like_0p5)
+def_gen.f(D_arr_0p5, D_arr_0p5)
+def_gen.f(D_arr_like_0p5, D_arr_like_0p5)
+def_gen.f(D_arr_0p5, D_arr_0p5, size=1)
+def_gen.f(D_arr_like_0p5, D_arr_like_0p5, size=1)
+
+def_gen.gamma(0.5, 0.5)
+def_gen.gamma(0.5, 0.5, size=None)
+def_gen.gamma(0.5, 0.5, size=1)
+def_gen.gamma(D_arr_0p5, 0.5)
+def_gen.gamma(0.5, D_arr_0p5)
+def_gen.gamma(D_arr_0p5, 0.5, size=1)
+def_gen.gamma(0.5, D_arr_0p5, size=1)
+def_gen.gamma(D_arr_like_0p5, 0.5)
+def_gen.gamma(0.5, D_arr_like_0p5)
+def_gen.gamma(D_arr_0p5, D_arr_0p5)
+def_gen.gamma(D_arr_like_0p5, D_arr_like_0p5)
+def_gen.gamma(D_arr_0p5, D_arr_0p5, size=1)
+def_gen.gamma(D_arr_like_0p5, D_arr_like_0p5, size=1)
+
+def_gen.gumbel(0.5, 0.5)
+def_gen.gumbel(0.5, 0.5, size=None)
+def_gen.gumbel(0.5, 0.5, size=1)
+def_gen.gumbel(D_arr_0p5, 0.5)
+def_gen.gumbel(0.5, D_arr_0p5)
+def_gen.gumbel(D_arr_0p5, 0.5, size=1)
+def_gen.gumbel(0.5, D_arr_0p5, size=1)
+def_gen.gumbel(D_arr_like_0p5, 0.5)
+def_gen.gumbel(0.5, D_arr_like_0p5)
+def_gen.gumbel(D_arr_0p5, D_arr_0p5)
+def_gen.gumbel(D_arr_like_0p5, D_arr_like_0p5)
+def_gen.gumbel(D_arr_0p5, D_arr_0p5, size=1)
+def_gen.gumbel(D_arr_like_0p5, D_arr_like_0p5, size=1)
+
+def_gen.laplace(0.5, 0.5)
+def_gen.laplace(0.5, 0.5, size=None)
+def_gen.laplace(0.5, 0.5, size=1)
+def_gen.laplace(D_arr_0p5, 0.5)
+def_gen.laplace(0.5, D_arr_0p5)
+def_gen.laplace(D_arr_0p5, 0.5, size=1)
+def_gen.laplace(0.5, D_arr_0p5, size=1)
+def_gen.laplace(D_arr_like_0p5, 0.5)
+def_gen.laplace(0.5, D_arr_like_0p5)
+def_gen.laplace(D_arr_0p5, D_arr_0p5)
+def_gen.laplace(D_arr_like_0p5, D_arr_like_0p5)
+def_gen.laplace(D_arr_0p5, D_arr_0p5, size=1)
+def_gen.laplace(D_arr_like_0p5, D_arr_like_0p5, size=1)
+
+def_gen.logistic(0.5, 0.5)
+def_gen.logistic(0.5, 0.5, size=None)
+def_gen.logistic(0.5, 0.5, size=1)
+def_gen.logistic(D_arr_0p5, 0.5)
+def_gen.logistic(0.5, D_arr_0p5)
+def_gen.logistic(D_arr_0p5, 0.5, size=1)
+def_gen.logistic(0.5, D_arr_0p5, size=1)
+def_gen.logistic(D_arr_like_0p5, 0.5)
+def_gen.logistic(0.5, D_arr_like_0p5)
+def_gen.logistic(D_arr_0p5, D_arr_0p5)
+def_gen.logistic(D_arr_like_0p5, D_arr_like_0p5)
+def_gen.logistic(D_arr_0p5, D_arr_0p5, size=1)
+def_gen.logistic(D_arr_like_0p5, D_arr_like_0p5, size=1)
+
+def_gen.lognormal(0.5, 0.5)
+def_gen.lognormal(0.5, 0.5, size=None)
+def_gen.lognormal(0.5, 0.5, size=1)
+def_gen.lognormal(D_arr_0p5, 0.5)
+def_gen.lognormal(0.5, D_arr_0p5)
+def_gen.lognormal(D_arr_0p5, 0.5, size=1)
+def_gen.lognormal(0.5, D_arr_0p5, size=1)
+def_gen.lognormal(D_arr_like_0p5, 0.5)
+def_gen.lognormal(0.5, D_arr_like_0p5)
+def_gen.lognormal(D_arr_0p5, D_arr_0p5)
+def_gen.lognormal(D_arr_like_0p5, D_arr_like_0p5)
+def_gen.lognormal(D_arr_0p5, D_arr_0p5, size=1)
+def_gen.lognormal(D_arr_like_0p5, D_arr_like_0p5, size=1)
+
+def_gen.noncentral_chisquare(0.5, 0.5)
+def_gen.noncentral_chisquare(0.5, 0.5, size=None)
+def_gen.noncentral_chisquare(0.5, 0.5, size=1)
+def_gen.noncentral_chisquare(D_arr_0p5, 0.5)
+def_gen.noncentral_chisquare(0.5, D_arr_0p5)
+def_gen.noncentral_chisquare(D_arr_0p5, 0.5, size=1)
+def_gen.noncentral_chisquare(0.5, D_arr_0p5, size=1)
+def_gen.noncentral_chisquare(D_arr_like_0p5, 0.5)
+def_gen.noncentral_chisquare(0.5, D_arr_like_0p5)
+def_gen.noncentral_chisquare(D_arr_0p5, D_arr_0p5)
+def_gen.noncentral_chisquare(D_arr_like_0p5, D_arr_like_0p5)
+def_gen.noncentral_chisquare(D_arr_0p5, D_arr_0p5, size=1)
+def_gen.noncentral_chisquare(D_arr_like_0p5, D_arr_like_0p5, size=1)
+
+def_gen.normal(0.5, 0.5)
+def_gen.normal(0.5, 0.5, size=None)
+def_gen.normal(0.5, 0.5, size=1)
+def_gen.normal(D_arr_0p5, 0.5)
+def_gen.normal(0.5, D_arr_0p5)
+def_gen.normal(D_arr_0p5, 0.5, size=1)
+def_gen.normal(0.5, D_arr_0p5, size=1)
+def_gen.normal(D_arr_like_0p5, 0.5)
+def_gen.normal(0.5, D_arr_like_0p5)
+def_gen.normal(D_arr_0p5, D_arr_0p5)
+def_gen.normal(D_arr_like_0p5, D_arr_like_0p5)
+def_gen.normal(D_arr_0p5, D_arr_0p5, size=1)
+def_gen.normal(D_arr_like_0p5, D_arr_like_0p5, size=1)
+
+def_gen.triangular(0.1, 0.5, 0.9)
+def_gen.triangular(0.1, 0.5, 0.9, size=None)
+def_gen.triangular(0.1, 0.5, 0.9, size=1)
+def_gen.triangular(D_arr_0p1, 0.5, 0.9)
+def_gen.triangular(0.1, D_arr_0p5, 0.9)
+def_gen.triangular(D_arr_0p1, 0.5, D_arr_like_0p9, size=1)
+def_gen.triangular(0.1, D_arr_0p5, 0.9, size=1)
+def_gen.triangular(D_arr_like_0p1, 0.5, D_arr_0p9)
+def_gen.triangular(0.5, D_arr_like_0p5, 0.9)
+def_gen.triangular(D_arr_0p1, D_arr_0p5, 0.9)
+def_gen.triangular(D_arr_like_0p1, D_arr_like_0p5, 0.9)
+def_gen.triangular(D_arr_0p1, D_arr_0p5, D_arr_0p9, size=1)
+def_gen.triangular(D_arr_like_0p1, D_arr_like_0p5, D_arr_like_0p9, size=1)
+
+def_gen.noncentral_f(0.1, 0.5, 0.9)
+def_gen.noncentral_f(0.1, 0.5, 0.9, size=None)
+def_gen.noncentral_f(0.1, 0.5, 0.9, size=1)
+def_gen.noncentral_f(D_arr_0p1, 0.5, 0.9)
+def_gen.noncentral_f(0.1, D_arr_0p5, 0.9)
+def_gen.noncentral_f(D_arr_0p1, 0.5, D_arr_like_0p9, size=1)
+def_gen.noncentral_f(0.1, D_arr_0p5, 0.9, size=1)
+def_gen.noncentral_f(D_arr_like_0p1, 0.5, D_arr_0p9)
+def_gen.noncentral_f(0.5, D_arr_like_0p5, 0.9)
+def_gen.noncentral_f(D_arr_0p1, D_arr_0p5, 0.9)
+def_gen.noncentral_f(D_arr_like_0p1, D_arr_like_0p5, 0.9)
+def_gen.noncentral_f(D_arr_0p1, D_arr_0p5, D_arr_0p9, size=1)
+def_gen.noncentral_f(D_arr_like_0p1, D_arr_like_0p5, D_arr_like_0p9, size=1)
+
+def_gen.binomial(10, 0.5)
+def_gen.binomial(10, 0.5, size=None)
+def_gen.binomial(10, 0.5, size=1)
+def_gen.binomial(I_arr_10, 0.5)
+def_gen.binomial(10, D_arr_0p5)
+def_gen.binomial(I_arr_10, 0.5, size=1)
+def_gen.binomial(10, D_arr_0p5, size=1)
+def_gen.binomial(I_arr_like_10, 0.5)
+def_gen.binomial(10, D_arr_like_0p5)
+def_gen.binomial(I_arr_10, D_arr_0p5)
+def_gen.binomial(I_arr_like_10, D_arr_like_0p5)
+def_gen.binomial(I_arr_10, D_arr_0p5, size=1)
+def_gen.binomial(I_arr_like_10, D_arr_like_0p5, size=1)
+
+def_gen.negative_binomial(10, 0.5)
+def_gen.negative_binomial(10, 0.5, size=None)
+def_gen.negative_binomial(10, 0.5, size=1)
+def_gen.negative_binomial(I_arr_10, 0.5)
+def_gen.negative_binomial(10, D_arr_0p5)
+def_gen.negative_binomial(I_arr_10, 0.5, size=1)
+def_gen.negative_binomial(10, D_arr_0p5, size=1)
+def_gen.negative_binomial(I_arr_like_10, 0.5)
+def_gen.negative_binomial(10, D_arr_like_0p5)
+def_gen.negative_binomial(I_arr_10, D_arr_0p5)
+def_gen.negative_binomial(I_arr_like_10, D_arr_like_0p5)
+def_gen.negative_binomial(I_arr_10, D_arr_0p5, size=1)
+def_gen.negative_binomial(I_arr_like_10, D_arr_like_0p5, size=1)
+
+def_gen.hypergeometric(20, 20, 10)
+def_gen.hypergeometric(20, 20, 10, size=None)
+def_gen.hypergeometric(20, 20, 10, size=1)
+def_gen.hypergeometric(I_arr_20, 20, 10)
+def_gen.hypergeometric(20, I_arr_20, 10)
+def_gen.hypergeometric(I_arr_20, 20, I_arr_like_10, size=1)
+def_gen.hypergeometric(20, I_arr_20, 10, size=1)
+def_gen.hypergeometric(I_arr_like_20, 20, I_arr_10)
+def_gen.hypergeometric(20, I_arr_like_20, 10)
+def_gen.hypergeometric(I_arr_20, I_arr_20, 10)
+def_gen.hypergeometric(I_arr_like_20, I_arr_like_20, 10)
+def_gen.hypergeometric(I_arr_20, I_arr_20, I_arr_10, size=1)
+def_gen.hypergeometric(I_arr_like_20, I_arr_like_20, I_arr_like_10, size=1)
+
+I_int64_100: np.ndarray[Any, np.dtype[np.int64]] = np.array([100], dtype=np.int64)
+
+def_gen.integers(0, 100)
+def_gen.integers(100)
+def_gen.integers([100])
+def_gen.integers(0, [100])
+
+I_bool_low: np.ndarray[Any, np.dtype[np.bool_]] = np.array([0], dtype=np.bool_)
+I_bool_low_like: list[int] = [0]
+I_bool_high_open: np.ndarray[Any, np.dtype[np.bool_]] = np.array([1], dtype=np.bool_)
+I_bool_high_closed: np.ndarray[Any, np.dtype[np.bool_]] = np.array([1], dtype=np.bool_)
+
+def_gen.integers(2, dtype=bool)
+def_gen.integers(0, 2, dtype=bool)
+def_gen.integers(1, dtype=bool, endpoint=True)
+def_gen.integers(0, 1, dtype=bool, endpoint=True)
+def_gen.integers(I_bool_low_like, 1, dtype=bool, endpoint=True)
+def_gen.integers(I_bool_high_open, dtype=bool)
+def_gen.integers(I_bool_low, I_bool_high_open, dtype=bool)
+def_gen.integers(0, I_bool_high_open, dtype=bool)
+def_gen.integers(I_bool_high_closed, dtype=bool, endpoint=True)
+def_gen.integers(I_bool_low, I_bool_high_closed, dtype=bool, endpoint=True)
+def_gen.integers(0, I_bool_high_closed, dtype=bool, endpoint=True)
+
+def_gen.integers(2, dtype=np.bool_)
+def_gen.integers(0, 2, dtype=np.bool_)
+def_gen.integers(1, dtype=np.bool_, endpoint=True)
+def_gen.integers(0, 1, dtype=np.bool_, endpoint=True)
+def_gen.integers(I_bool_low_like, 1, dtype=np.bool_, endpoint=True)
+def_gen.integers(I_bool_high_open, dtype=np.bool_)
+def_gen.integers(I_bool_low, I_bool_high_open, dtype=np.bool_)
+def_gen.integers(0, I_bool_high_open, dtype=np.bool_)
+def_gen.integers(I_bool_high_closed, dtype=np.bool_, endpoint=True)
+def_gen.integers(I_bool_low, I_bool_high_closed, dtype=np.bool_, endpoint=True)
+def_gen.integers(0, I_bool_high_closed, dtype=np.bool_, endpoint=True)
+
+I_u1_low: np.ndarray[Any, np.dtype[np.uint8]] = np.array([0], dtype=np.uint8)
+I_u1_low_like: list[int] = [0]
+I_u1_high_open: np.ndarray[Any, np.dtype[np.uint8]] = np.array([255], dtype=np.uint8)
+I_u1_high_closed: np.ndarray[Any, np.dtype[np.uint8]] = np.array([255], dtype=np.uint8)
+
+def_gen.integers(256, dtype="u1")
+def_gen.integers(0, 256, dtype="u1")
+def_gen.integers(255, dtype="u1", endpoint=True)
+def_gen.integers(0, 255, dtype="u1", endpoint=True)
+def_gen.integers(I_u1_low_like, 255, dtype="u1", endpoint=True)
+def_gen.integers(I_u1_high_open, dtype="u1")
+def_gen.integers(I_u1_low, I_u1_high_open, dtype="u1")
+def_gen.integers(0, I_u1_high_open, dtype="u1")
+def_gen.integers(I_u1_high_closed, dtype="u1", endpoint=True)
+def_gen.integers(I_u1_low, I_u1_high_closed, dtype="u1", endpoint=True)
+def_gen.integers(0, I_u1_high_closed, dtype="u1", endpoint=True)
+
+def_gen.integers(256, dtype="uint8")
+def_gen.integers(0, 256, dtype="uint8")
+def_gen.integers(255, dtype="uint8", endpoint=True)
+def_gen.integers(0, 255, dtype="uint8", endpoint=True)
+def_gen.integers(I_u1_low_like, 255, dtype="uint8", endpoint=True)
+def_gen.integers(I_u1_high_open, dtype="uint8")
+def_gen.integers(I_u1_low, I_u1_high_open, dtype="uint8")
+def_gen.integers(0, I_u1_high_open, dtype="uint8")
+def_gen.integers(I_u1_high_closed, dtype="uint8", endpoint=True)
+def_gen.integers(I_u1_low, I_u1_high_closed, dtype="uint8", endpoint=True)
+def_gen.integers(0, I_u1_high_closed, dtype="uint8", endpoint=True)
+
+def_gen.integers(256, dtype=np.uint8)
+def_gen.integers(0, 256, dtype=np.uint8)
+def_gen.integers(255, dtype=np.uint8, endpoint=True)
+def_gen.integers(0, 255, dtype=np.uint8, endpoint=True)
+def_gen.integers(I_u1_low_like, 255, dtype=np.uint8, endpoint=True)
+def_gen.integers(I_u1_high_open, dtype=np.uint8)
+def_gen.integers(I_u1_low, I_u1_high_open, dtype=np.uint8)
+def_gen.integers(0, I_u1_high_open, dtype=np.uint8)
+def_gen.integers(I_u1_high_closed, dtype=np.uint8, endpoint=True)
+def_gen.integers(I_u1_low, I_u1_high_closed, dtype=np.uint8, endpoint=True)
+def_gen.integers(0, I_u1_high_closed, dtype=np.uint8, endpoint=True)
+
+I_u2_low: np.ndarray[Any, np.dtype[np.uint16]] = np.array([0], dtype=np.uint16)
+I_u2_low_like: list[int] = [0]
+I_u2_high_open: np.ndarray[Any, np.dtype[np.uint16]] = np.array([65535], dtype=np.uint16)
+I_u2_high_closed: np.ndarray[Any, np.dtype[np.uint16]] = np.array([65535], dtype=np.uint16)
+
+def_gen.integers(65536, dtype="u2")
+def_gen.integers(0, 65536, dtype="u2")
+def_gen.integers(65535, dtype="u2", endpoint=True)
+def_gen.integers(0, 65535, dtype="u2", endpoint=True)
+def_gen.integers(I_u2_low_like, 65535, dtype="u2", endpoint=True)
+def_gen.integers(I_u2_high_open, dtype="u2")
+def_gen.integers(I_u2_low, I_u2_high_open, dtype="u2")
+def_gen.integers(0, I_u2_high_open, dtype="u2")
+def_gen.integers(I_u2_high_closed, dtype="u2", endpoint=True)
+def_gen.integers(I_u2_low, I_u2_high_closed, dtype="u2", endpoint=True)
+def_gen.integers(0, I_u2_high_closed, dtype="u2", endpoint=True)
+
+def_gen.integers(65536, dtype="uint16")
+def_gen.integers(0, 65536, dtype="uint16")
+def_gen.integers(65535, dtype="uint16", endpoint=True)
+def_gen.integers(0, 65535, dtype="uint16", endpoint=True)
+def_gen.integers(I_u2_low_like, 65535, dtype="uint16", endpoint=True)
+def_gen.integers(I_u2_high_open, dtype="uint16")
+def_gen.integers(I_u2_low, I_u2_high_open, dtype="uint16")
+def_gen.integers(0, I_u2_high_open, dtype="uint16")
+def_gen.integers(I_u2_high_closed, dtype="uint16", endpoint=True)
+def_gen.integers(I_u2_low, I_u2_high_closed, dtype="uint16", endpoint=True)
+def_gen.integers(0, I_u2_high_closed, dtype="uint16", endpoint=True)
+
+def_gen.integers(65536, dtype=np.uint16)
+def_gen.integers(0, 65536, dtype=np.uint16)
+def_gen.integers(65535, dtype=np.uint16, endpoint=True)
+def_gen.integers(0, 65535, dtype=np.uint16, endpoint=True)
+def_gen.integers(I_u2_low_like, 65535, dtype=np.uint16, endpoint=True)
+def_gen.integers(I_u2_high_open, dtype=np.uint16)
+def_gen.integers(I_u2_low, I_u2_high_open, dtype=np.uint16)
+def_gen.integers(0, I_u2_high_open, dtype=np.uint16)
+def_gen.integers(I_u2_high_closed, dtype=np.uint16, endpoint=True)
+def_gen.integers(I_u2_low, I_u2_high_closed, dtype=np.uint16, endpoint=True)
+def_gen.integers(0, I_u2_high_closed, dtype=np.uint16, endpoint=True)
+
+I_u4_low: np.ndarray[Any, np.dtype[np.uint32]] = np.array([0], dtype=np.uint32)
+I_u4_low_like: list[int] = [0]
+I_u4_high_open: np.ndarray[Any, np.dtype[np.uint32]] = np.array([4294967295], dtype=np.uint32)
+I_u4_high_closed: np.ndarray[Any, np.dtype[np.uint32]] = np.array([4294967295], dtype=np.uint32)
+
+def_gen.integers(4294967296, dtype="u4")
+def_gen.integers(0, 4294967296, dtype="u4")
+def_gen.integers(4294967295, dtype="u4", endpoint=True)
+def_gen.integers(0, 4294967295, dtype="u4", endpoint=True)
+def_gen.integers(I_u4_low_like, 4294967295, dtype="u4", endpoint=True)
+def_gen.integers(I_u4_high_open, dtype="u4")
+def_gen.integers(I_u4_low, I_u4_high_open, dtype="u4")
+def_gen.integers(0, I_u4_high_open, dtype="u4")
+def_gen.integers(I_u4_high_closed, dtype="u4", endpoint=True)
+def_gen.integers(I_u4_low, I_u4_high_closed, dtype="u4", endpoint=True)
+def_gen.integers(0, I_u4_high_closed, dtype="u4", endpoint=True)
+
+def_gen.integers(4294967296, dtype="uint32")
+def_gen.integers(0, 4294967296, dtype="uint32")
+def_gen.integers(4294967295, dtype="uint32", endpoint=True)
+def_gen.integers(0, 4294967295, dtype="uint32", endpoint=True)
+def_gen.integers(I_u4_low_like, 4294967295, dtype="uint32", endpoint=True)
+def_gen.integers(I_u4_high_open, dtype="uint32")
+def_gen.integers(I_u4_low, I_u4_high_open, dtype="uint32")
+def_gen.integers(0, I_u4_high_open, dtype="uint32")
+def_gen.integers(I_u4_high_closed, dtype="uint32", endpoint=True)
+def_gen.integers(I_u4_low, I_u4_high_closed, dtype="uint32", endpoint=True)
+def_gen.integers(0, I_u4_high_closed, dtype="uint32", endpoint=True)
+
+def_gen.integers(4294967296, dtype=np.uint32)
+def_gen.integers(0, 4294967296, dtype=np.uint32)
+def_gen.integers(4294967295, dtype=np.uint32, endpoint=True)
+def_gen.integers(0, 4294967295, dtype=np.uint32, endpoint=True)
+def_gen.integers(I_u4_low_like, 4294967295, dtype=np.uint32, endpoint=True)
+def_gen.integers(I_u4_high_open, dtype=np.uint32)
+def_gen.integers(I_u4_low, I_u4_high_open, dtype=np.uint32)
+def_gen.integers(0, I_u4_high_open, dtype=np.uint32)
+def_gen.integers(I_u4_high_closed, dtype=np.uint32, endpoint=True)
+def_gen.integers(I_u4_low, I_u4_high_closed, dtype=np.uint32, endpoint=True)
+def_gen.integers(0, I_u4_high_closed, dtype=np.uint32, endpoint=True)
+
+I_u8_low: np.ndarray[Any, np.dtype[np.uint64]] = np.array([0], dtype=np.uint64)
+I_u8_low_like: list[int] = [0]
+I_u8_high_open: np.ndarray[Any, np.dtype[np.uint64]] = np.array([18446744073709551615], dtype=np.uint64)
+I_u8_high_closed: np.ndarray[Any, np.dtype[np.uint64]] = np.array([18446744073709551615], dtype=np.uint64)
+
+def_gen.integers(18446744073709551616, dtype="u8")
+def_gen.integers(0, 18446744073709551616, dtype="u8")
+def_gen.integers(18446744073709551615, dtype="u8", endpoint=True)
+def_gen.integers(0, 18446744073709551615, dtype="u8", endpoint=True)
+def_gen.integers(I_u8_low_like, 18446744073709551615, dtype="u8", endpoint=True)
+def_gen.integers(I_u8_high_open, dtype="u8")
+def_gen.integers(I_u8_low, I_u8_high_open, dtype="u8")
+def_gen.integers(0, I_u8_high_open, dtype="u8")
+def_gen.integers(I_u8_high_closed, dtype="u8", endpoint=True)
+def_gen.integers(I_u8_low, I_u8_high_closed, dtype="u8", endpoint=True)
+def_gen.integers(0, I_u8_high_closed, dtype="u8", endpoint=True)
+
+def_gen.integers(18446744073709551616, dtype="uint64")
+def_gen.integers(0, 18446744073709551616, dtype="uint64")
+def_gen.integers(18446744073709551615, dtype="uint64", endpoint=True)
+def_gen.integers(0, 18446744073709551615, dtype="uint64", endpoint=True)
+def_gen.integers(I_u8_low_like, 18446744073709551615, dtype="uint64", endpoint=True)
+def_gen.integers(I_u8_high_open, dtype="uint64")
+def_gen.integers(I_u8_low, I_u8_high_open, dtype="uint64")
+def_gen.integers(0, I_u8_high_open, dtype="uint64")
+def_gen.integers(I_u8_high_closed, dtype="uint64", endpoint=True)
+def_gen.integers(I_u8_low, I_u8_high_closed, dtype="uint64", endpoint=True)
+def_gen.integers(0, I_u8_high_closed, dtype="uint64", endpoint=True)
+
+def_gen.integers(18446744073709551616, dtype=np.uint64)
+def_gen.integers(0, 18446744073709551616, dtype=np.uint64)
+def_gen.integers(18446744073709551615, dtype=np.uint64, endpoint=True)
+def_gen.integers(0, 18446744073709551615, dtype=np.uint64, endpoint=True)
+def_gen.integers(I_u8_low_like, 18446744073709551615, dtype=np.uint64, endpoint=True)
+def_gen.integers(I_u8_high_open, dtype=np.uint64)
+def_gen.integers(I_u8_low, I_u8_high_open, dtype=np.uint64)
+def_gen.integers(0, I_u8_high_open, dtype=np.uint64)
+def_gen.integers(I_u8_high_closed, dtype=np.uint64, endpoint=True)
+def_gen.integers(I_u8_low, I_u8_high_closed, dtype=np.uint64, endpoint=True)
+def_gen.integers(0, I_u8_high_closed, dtype=np.uint64, endpoint=True)
+
+I_i1_low: np.ndarray[Any, np.dtype[np.int8]] = np.array([-128], dtype=np.int8)
+I_i1_low_like: list[int] = [-128]
+I_i1_high_open: np.ndarray[Any, np.dtype[np.int8]] = np.array([127], dtype=np.int8)
+I_i1_high_closed: np.ndarray[Any, np.dtype[np.int8]] = np.array([127], dtype=np.int8)
+
+def_gen.integers(128, dtype="i1")
+def_gen.integers(-128, 128, dtype="i1")
+def_gen.integers(127, dtype="i1", endpoint=True)
+def_gen.integers(-128, 127, dtype="i1", endpoint=True)
+def_gen.integers(I_i1_low_like, 127, dtype="i1", endpoint=True)
+def_gen.integers(I_i1_high_open, dtype="i1")
+def_gen.integers(I_i1_low, I_i1_high_open, dtype="i1")
+def_gen.integers(-128, I_i1_high_open, dtype="i1")
+def_gen.integers(I_i1_high_closed, dtype="i1", endpoint=True)
+def_gen.integers(I_i1_low, I_i1_high_closed, dtype="i1", endpoint=True)
+def_gen.integers(-128, I_i1_high_closed, dtype="i1", endpoint=True)
+
+def_gen.integers(128, dtype="int8")
+def_gen.integers(-128, 128, dtype="int8")
+def_gen.integers(127, dtype="int8", endpoint=True)
+def_gen.integers(-128, 127, dtype="int8", endpoint=True)
+def_gen.integers(I_i1_low_like, 127, dtype="int8", endpoint=True)
+def_gen.integers(I_i1_high_open, dtype="int8")
+def_gen.integers(I_i1_low, I_i1_high_open, dtype="int8")
+def_gen.integers(-128, I_i1_high_open, dtype="int8")
+def_gen.integers(I_i1_high_closed, dtype="int8", endpoint=True)
+def_gen.integers(I_i1_low, I_i1_high_closed, dtype="int8", endpoint=True)
+def_gen.integers(-128, I_i1_high_closed, dtype="int8", endpoint=True)
+
+def_gen.integers(128, dtype=np.int8)
+def_gen.integers(-128, 128, dtype=np.int8)
+def_gen.integers(127, dtype=np.int8, endpoint=True)
+def_gen.integers(-128, 127, dtype=np.int8, endpoint=True)
+def_gen.integers(I_i1_low_like, 127, dtype=np.int8, endpoint=True)
+def_gen.integers(I_i1_high_open, dtype=np.int8)
+def_gen.integers(I_i1_low, I_i1_high_open, dtype=np.int8)
+def_gen.integers(-128, I_i1_high_open, dtype=np.int8)
+def_gen.integers(I_i1_high_closed, dtype=np.int8, endpoint=True)
+def_gen.integers(I_i1_low, I_i1_high_closed, dtype=np.int8, endpoint=True)
+def_gen.integers(-128, I_i1_high_closed, dtype=np.int8, endpoint=True)
+
+I_i2_low: np.ndarray[Any, np.dtype[np.int16]] = np.array([-32768], dtype=np.int16)
+I_i2_low_like: list[int] = [-32768]
+I_i2_high_open: np.ndarray[Any, np.dtype[np.int16]] = np.array([32767], dtype=np.int16)
+I_i2_high_closed: np.ndarray[Any, np.dtype[np.int16]] = np.array([32767], dtype=np.int16)
+
+def_gen.integers(32768, dtype="i2")
+def_gen.integers(-32768, 32768, dtype="i2")
+def_gen.integers(32767, dtype="i2", endpoint=True)
+def_gen.integers(-32768, 32767, dtype="i2", endpoint=True)
+def_gen.integers(I_i2_low_like, 32767, dtype="i2", endpoint=True)
+def_gen.integers(I_i2_high_open, dtype="i2")
+def_gen.integers(I_i2_low, I_i2_high_open, dtype="i2")
+def_gen.integers(-32768, I_i2_high_open, dtype="i2")
+def_gen.integers(I_i2_high_closed, dtype="i2", endpoint=True)
+def_gen.integers(I_i2_low, I_i2_high_closed, dtype="i2", endpoint=True)
+def_gen.integers(-32768, I_i2_high_closed, dtype="i2", endpoint=True)
+
+def_gen.integers(32768, dtype="int16")
+def_gen.integers(-32768, 32768, dtype="int16")
+def_gen.integers(32767, dtype="int16", endpoint=True)
+def_gen.integers(-32768, 32767, dtype="int16", endpoint=True)
+def_gen.integers(I_i2_low_like, 32767, dtype="int16", endpoint=True)
+def_gen.integers(I_i2_high_open, dtype="int16")
+def_gen.integers(I_i2_low, I_i2_high_open, dtype="int16")
+def_gen.integers(-32768, I_i2_high_open, dtype="int16")
+def_gen.integers(I_i2_high_closed, dtype="int16", endpoint=True)
+def_gen.integers(I_i2_low, I_i2_high_closed, dtype="int16", endpoint=True)
+def_gen.integers(-32768, I_i2_high_closed, dtype="int16", endpoint=True)
+
+def_gen.integers(32768, dtype=np.int16)
+def_gen.integers(-32768, 32768, dtype=np.int16)
+def_gen.integers(32767, dtype=np.int16, endpoint=True)
+def_gen.integers(-32768, 32767, dtype=np.int16, endpoint=True)
+def_gen.integers(I_i2_low_like, 32767, dtype=np.int16, endpoint=True)
+def_gen.integers(I_i2_high_open, dtype=np.int16)
+def_gen.integers(I_i2_low, I_i2_high_open, dtype=np.int16)
+def_gen.integers(-32768, I_i2_high_open, dtype=np.int16)
+def_gen.integers(I_i2_high_closed, dtype=np.int16, endpoint=True)
+def_gen.integers(I_i2_low, I_i2_high_closed, dtype=np.int16, endpoint=True)
+def_gen.integers(-32768, I_i2_high_closed, dtype=np.int16, endpoint=True)
+
+I_i4_low: np.ndarray[Any, np.dtype[np.int32]] = np.array([-2147483648], dtype=np.int32)
+I_i4_low_like: list[int] = [-2147483648]
+I_i4_high_open: np.ndarray[Any, np.dtype[np.int32]] = np.array([2147483647], dtype=np.int32)
+I_i4_high_closed: np.ndarray[Any, np.dtype[np.int32]] = np.array([2147483647], dtype=np.int32)
+
+def_gen.integers(2147483648, dtype="i4")
+def_gen.integers(-2147483648, 2147483648, dtype="i4")
+def_gen.integers(2147483647, dtype="i4", endpoint=True)
+def_gen.integers(-2147483648, 2147483647, dtype="i4", endpoint=True)
+def_gen.integers(I_i4_low_like, 2147483647, dtype="i4", endpoint=True)
+def_gen.integers(I_i4_high_open, dtype="i4")
+def_gen.integers(I_i4_low, I_i4_high_open, dtype="i4")
+def_gen.integers(-2147483648, I_i4_high_open, dtype="i4")
+def_gen.integers(I_i4_high_closed, dtype="i4", endpoint=True)
+def_gen.integers(I_i4_low, I_i4_high_closed, dtype="i4", endpoint=True)
+def_gen.integers(-2147483648, I_i4_high_closed, dtype="i4", endpoint=True)
+
+def_gen.integers(2147483648, dtype="int32")
+def_gen.integers(-2147483648, 2147483648, dtype="int32")
+def_gen.integers(2147483647, dtype="int32", endpoint=True)
+def_gen.integers(-2147483648, 2147483647, dtype="int32", endpoint=True)
+def_gen.integers(I_i4_low_like, 2147483647, dtype="int32", endpoint=True)
+def_gen.integers(I_i4_high_open, dtype="int32")
+def_gen.integers(I_i4_low, I_i4_high_open, dtype="int32")
+def_gen.integers(-2147483648, I_i4_high_open, dtype="int32")
+def_gen.integers(I_i4_high_closed, dtype="int32", endpoint=True)
+def_gen.integers(I_i4_low, I_i4_high_closed, dtype="int32", endpoint=True)
+def_gen.integers(-2147483648, I_i4_high_closed, dtype="int32", endpoint=True)
+
+def_gen.integers(2147483648, dtype=np.int32)
+def_gen.integers(-2147483648, 2147483648, dtype=np.int32)
+def_gen.integers(2147483647, dtype=np.int32, endpoint=True)
+def_gen.integers(-2147483648, 2147483647, dtype=np.int32, endpoint=True)
+def_gen.integers(I_i4_low_like, 2147483647, dtype=np.int32, endpoint=True)
+def_gen.integers(I_i4_high_open, dtype=np.int32)
+def_gen.integers(I_i4_low, I_i4_high_open, dtype=np.int32)
+def_gen.integers(-2147483648, I_i4_high_open, dtype=np.int32)
+def_gen.integers(I_i4_high_closed, dtype=np.int32, endpoint=True)
+def_gen.integers(I_i4_low, I_i4_high_closed, dtype=np.int32, endpoint=True)
+def_gen.integers(-2147483648, I_i4_high_closed, dtype=np.int32, endpoint=True)
+
+I_i8_low: np.ndarray[Any, np.dtype[np.int64]] = np.array([-9223372036854775808], dtype=np.int64)
+I_i8_low_like: list[int] = [-9223372036854775808]
+I_i8_high_open: np.ndarray[Any, np.dtype[np.int64]] = np.array([9223372036854775807], dtype=np.int64)
+I_i8_high_closed: np.ndarray[Any, np.dtype[np.int64]] = np.array([9223372036854775807], dtype=np.int64)
+
+def_gen.integers(9223372036854775808, dtype="i8")
+def_gen.integers(-9223372036854775808, 9223372036854775808, dtype="i8")
+def_gen.integers(9223372036854775807, dtype="i8", endpoint=True)
+def_gen.integers(-9223372036854775808, 9223372036854775807, dtype="i8", endpoint=True)
+def_gen.integers(I_i8_low_like, 9223372036854775807, dtype="i8", endpoint=True)
+def_gen.integers(I_i8_high_open, dtype="i8")
+def_gen.integers(I_i8_low, I_i8_high_open, dtype="i8")
+def_gen.integers(-9223372036854775808, I_i8_high_open, dtype="i8")
+def_gen.integers(I_i8_high_closed, dtype="i8", endpoint=True)
+def_gen.integers(I_i8_low, I_i8_high_closed, dtype="i8", endpoint=True)
+def_gen.integers(-9223372036854775808, I_i8_high_closed, dtype="i8", endpoint=True)
+
+def_gen.integers(9223372036854775808, dtype="int64")
+def_gen.integers(-9223372036854775808, 9223372036854775808, dtype="int64")
+def_gen.integers(9223372036854775807, dtype="int64", endpoint=True)
+def_gen.integers(-9223372036854775808, 9223372036854775807, dtype="int64", endpoint=True)
+def_gen.integers(I_i8_low_like, 9223372036854775807, dtype="int64", endpoint=True)
+def_gen.integers(I_i8_high_open, dtype="int64")
+def_gen.integers(I_i8_low, I_i8_high_open, dtype="int64")
+def_gen.integers(-9223372036854775808, I_i8_high_open, dtype="int64")
+def_gen.integers(I_i8_high_closed, dtype="int64", endpoint=True)
+def_gen.integers(I_i8_low, I_i8_high_closed, dtype="int64", endpoint=True)
+def_gen.integers(-9223372036854775808, I_i8_high_closed, dtype="int64", endpoint=True)
+
+def_gen.integers(9223372036854775808, dtype=np.int64)
+def_gen.integers(-9223372036854775808, 9223372036854775808, dtype=np.int64)
+def_gen.integers(9223372036854775807, dtype=np.int64, endpoint=True)
+def_gen.integers(-9223372036854775808, 9223372036854775807, dtype=np.int64, endpoint=True)
+def_gen.integers(I_i8_low_like, 9223372036854775807, dtype=np.int64, endpoint=True)
+def_gen.integers(I_i8_high_open, dtype=np.int64)
+def_gen.integers(I_i8_low, I_i8_high_open, dtype=np.int64)
+def_gen.integers(-9223372036854775808, I_i8_high_open, dtype=np.int64)
+def_gen.integers(I_i8_high_closed, dtype=np.int64, endpoint=True)
+def_gen.integers(I_i8_low, I_i8_high_closed, dtype=np.int64, endpoint=True)
+def_gen.integers(-9223372036854775808, I_i8_high_closed, dtype=np.int64, endpoint=True)
+
+
+def_gen.bit_generator
+
+def_gen.bytes(2)
+
+def_gen.choice(5)
+def_gen.choice(5, 3)
+def_gen.choice(5, 3, replace=True)
+def_gen.choice(5, 3, p=[1 / 5] * 5)
+def_gen.choice(5, 3, p=[1 / 5] * 5, replace=False)
+
+def_gen.choice(["pooh", "rabbit", "piglet", "Christopher"])
+def_gen.choice(["pooh", "rabbit", "piglet", "Christopher"], 3)
+def_gen.choice(["pooh", "rabbit", "piglet", "Christopher"], 3, p=[1 / 4] * 4)
+def_gen.choice(["pooh", "rabbit", "piglet", "Christopher"], 3, replace=True)
+def_gen.choice(["pooh", "rabbit", "piglet", "Christopher"], 3, replace=False, p=np.array([1 / 8, 1 / 8, 1 / 2, 1 / 4]))
+
+def_gen.dirichlet([0.5, 0.5])
+def_gen.dirichlet(np.array([0.5, 0.5]))
+def_gen.dirichlet(np.array([0.5, 0.5]), size=3)
+
+def_gen.multinomial(20, [1 / 6.0] * 6)
+def_gen.multinomial(20, np.array([0.5, 0.5]))
+def_gen.multinomial(20, [1 / 6.0] * 6, size=2)
+def_gen.multinomial([[10], [20]], [1 / 6.0] * 6, size=(2, 2))
+def_gen.multinomial(np.array([[10], [20]]), np.array([0.5, 0.5]), size=(2, 2))
+
+def_gen.multivariate_hypergeometric([3, 5, 7], 2)
+def_gen.multivariate_hypergeometric(np.array([3, 5, 7]), 2)
+def_gen.multivariate_hypergeometric(np.array([3, 5, 7]), 2, size=4)
+def_gen.multivariate_hypergeometric(np.array([3, 5, 7]), 2, size=(4, 7))
+def_gen.multivariate_hypergeometric([3, 5, 7], 2, method="count")
+def_gen.multivariate_hypergeometric(np.array([3, 5, 7]), 2, method="marginals")
+
+def_gen.multivariate_normal([0.0], [[1.0]])
+def_gen.multivariate_normal([0.0], np.array([[1.0]]))
+def_gen.multivariate_normal(np.array([0.0]), [[1.0]])
+def_gen.multivariate_normal([0.0], np.array([[1.0]]))
+
+def_gen.permutation(10)
+def_gen.permutation([1, 2, 3, 4])
+def_gen.permutation(np.array([1, 2, 3, 4]))
+def_gen.permutation(D_2D, axis=1)
+def_gen.permuted(D_2D)
+def_gen.permuted(D_2D_like)
+def_gen.permuted(D_2D, axis=1)
+def_gen.permuted(D_2D, out=D_2D)
+def_gen.permuted(D_2D_like, out=D_2D)
+def_gen.permuted(D_2D_like, out=D_2D)
+def_gen.permuted(D_2D, axis=1, out=D_2D)
+
+def_gen.shuffle(np.arange(10))
+def_gen.shuffle([1, 2, 3, 4, 5])
+def_gen.shuffle(D_2D, axis=1)
+
+def_gen.__str__()
+def_gen.__repr__()
+def_gen_state: dict[str, Any]
+def_gen_state = def_gen.__getstate__()
+def_gen.__setstate__(def_gen_state)
+
+# RandomState
+random_st: np.random.RandomState = np.random.RandomState()
+
+random_st.standard_normal()
+random_st.standard_normal(size=None)
+random_st.standard_normal(size=1)
+
+random_st.random()
+random_st.random(size=None)
+random_st.random(size=1)
+
+random_st.standard_cauchy()
+random_st.standard_cauchy(size=None)
+random_st.standard_cauchy(size=1)
+
+random_st.standard_exponential()
+random_st.standard_exponential(size=None)
+random_st.standard_exponential(size=1)
+
+random_st.zipf(1.5)
+random_st.zipf(1.5, size=None)
+random_st.zipf(1.5, size=1)
+random_st.zipf(D_arr_1p5)
+random_st.zipf(D_arr_1p5, size=1)
+random_st.zipf(D_arr_like_1p5)
+random_st.zipf(D_arr_like_1p5, size=1)
+
+random_st.weibull(0.5)
+random_st.weibull(0.5, size=None)
+random_st.weibull(0.5, size=1)
+random_st.weibull(D_arr_0p5)
+random_st.weibull(D_arr_0p5, size=1)
+random_st.weibull(D_arr_like_0p5)
+random_st.weibull(D_arr_like_0p5, size=1)
+
+random_st.standard_t(0.5)
+random_st.standard_t(0.5, size=None)
+random_st.standard_t(0.5, size=1)
+random_st.standard_t(D_arr_0p5)
+random_st.standard_t(D_arr_0p5, size=1)
+random_st.standard_t(D_arr_like_0p5)
+random_st.standard_t(D_arr_like_0p5, size=1)
+
+random_st.poisson(0.5)
+random_st.poisson(0.5, size=None)
+random_st.poisson(0.5, size=1)
+random_st.poisson(D_arr_0p5)
+random_st.poisson(D_arr_0p5, size=1)
+random_st.poisson(D_arr_like_0p5)
+random_st.poisson(D_arr_like_0p5, size=1)
+
+random_st.power(0.5)
+random_st.power(0.5, size=None)
+random_st.power(0.5, size=1)
+random_st.power(D_arr_0p5)
+random_st.power(D_arr_0p5, size=1)
+random_st.power(D_arr_like_0p5)
+random_st.power(D_arr_like_0p5, size=1)
+
+random_st.pareto(0.5)
+random_st.pareto(0.5, size=None)
+random_st.pareto(0.5, size=1)
+random_st.pareto(D_arr_0p5)
+random_st.pareto(D_arr_0p5, size=1)
+random_st.pareto(D_arr_like_0p5)
+random_st.pareto(D_arr_like_0p5, size=1)
+
+random_st.chisquare(0.5)
+random_st.chisquare(0.5, size=None)
+random_st.chisquare(0.5, size=1)
+random_st.chisquare(D_arr_0p5)
+random_st.chisquare(D_arr_0p5, size=1)
+random_st.chisquare(D_arr_like_0p5)
+random_st.chisquare(D_arr_like_0p5, size=1)
+
+random_st.exponential(0.5)
+random_st.exponential(0.5, size=None)
+random_st.exponential(0.5, size=1)
+random_st.exponential(D_arr_0p5)
+random_st.exponential(D_arr_0p5, size=1)
+random_st.exponential(D_arr_like_0p5)
+random_st.exponential(D_arr_like_0p5, size=1)
+
+random_st.geometric(0.5)
+random_st.geometric(0.5, size=None)
+random_st.geometric(0.5, size=1)
+random_st.geometric(D_arr_0p5)
+random_st.geometric(D_arr_0p5, size=1)
+random_st.geometric(D_arr_like_0p5)
+random_st.geometric(D_arr_like_0p5, size=1)
+
+random_st.logseries(0.5)
+random_st.logseries(0.5, size=None)
+random_st.logseries(0.5, size=1)
+random_st.logseries(D_arr_0p5)
+random_st.logseries(D_arr_0p5, size=1)
+random_st.logseries(D_arr_like_0p5)
+random_st.logseries(D_arr_like_0p5, size=1)
+
+random_st.rayleigh(0.5)
+random_st.rayleigh(0.5, size=None)
+random_st.rayleigh(0.5, size=1)
+random_st.rayleigh(D_arr_0p5)
+random_st.rayleigh(D_arr_0p5, size=1)
+random_st.rayleigh(D_arr_like_0p5)
+random_st.rayleigh(D_arr_like_0p5, size=1)
+
+random_st.standard_gamma(0.5)
+random_st.standard_gamma(0.5, size=None)
+random_st.standard_gamma(0.5, size=1)
+random_st.standard_gamma(D_arr_0p5)
+random_st.standard_gamma(D_arr_0p5, size=1)
+random_st.standard_gamma(D_arr_like_0p5)
+random_st.standard_gamma(D_arr_like_0p5, size=1)
+random_st.standard_gamma(D_arr_like_0p5, size=1)
+
+random_st.vonmises(0.5, 0.5)
+random_st.vonmises(0.5, 0.5, size=None)
+random_st.vonmises(0.5, 0.5, size=1)
+random_st.vonmises(D_arr_0p5, 0.5)
+random_st.vonmises(0.5, D_arr_0p5)
+random_st.vonmises(D_arr_0p5, 0.5, size=1)
+random_st.vonmises(0.5, D_arr_0p5, size=1)
+random_st.vonmises(D_arr_like_0p5, 0.5)
+random_st.vonmises(0.5, D_arr_like_0p5)
+random_st.vonmises(D_arr_0p5, D_arr_0p5)
+random_st.vonmises(D_arr_like_0p5, D_arr_like_0p5)
+random_st.vonmises(D_arr_0p5, D_arr_0p5, size=1)
+random_st.vonmises(D_arr_like_0p5, D_arr_like_0p5, size=1)
+
+random_st.wald(0.5, 0.5)
+random_st.wald(0.5, 0.5, size=None)
+random_st.wald(0.5, 0.5, size=1)
+random_st.wald(D_arr_0p5, 0.5)
+random_st.wald(0.5, D_arr_0p5)
+random_st.wald(D_arr_0p5, 0.5, size=1)
+random_st.wald(0.5, D_arr_0p5, size=1)
+random_st.wald(D_arr_like_0p5, 0.5)
+random_st.wald(0.5, D_arr_like_0p5)
+random_st.wald(D_arr_0p5, D_arr_0p5)
+random_st.wald(D_arr_like_0p5, D_arr_like_0p5)
+random_st.wald(D_arr_0p5, D_arr_0p5, size=1)
+random_st.wald(D_arr_like_0p5, D_arr_like_0p5, size=1)
+
+random_st.uniform(0.5, 0.5)
+random_st.uniform(0.5, 0.5, size=None)
+random_st.uniform(0.5, 0.5, size=1)
+random_st.uniform(D_arr_0p5, 0.5)
+random_st.uniform(0.5, D_arr_0p5)
+random_st.uniform(D_arr_0p5, 0.5, size=1)
+random_st.uniform(0.5, D_arr_0p5, size=1)
+random_st.uniform(D_arr_like_0p5, 0.5)
+random_st.uniform(0.5, D_arr_like_0p5)
+random_st.uniform(D_arr_0p5, D_arr_0p5)
+random_st.uniform(D_arr_like_0p5, D_arr_like_0p5)
+random_st.uniform(D_arr_0p5, D_arr_0p5, size=1)
+random_st.uniform(D_arr_like_0p5, D_arr_like_0p5, size=1)
+
+random_st.beta(0.5, 0.5)
+random_st.beta(0.5, 0.5, size=None)
+random_st.beta(0.5, 0.5, size=1)
+random_st.beta(D_arr_0p5, 0.5)
+random_st.beta(0.5, D_arr_0p5)
+random_st.beta(D_arr_0p5, 0.5, size=1)
+random_st.beta(0.5, D_arr_0p5, size=1)
+random_st.beta(D_arr_like_0p5, 0.5)
+random_st.beta(0.5, D_arr_like_0p5)
+random_st.beta(D_arr_0p5, D_arr_0p5)
+random_st.beta(D_arr_like_0p5, D_arr_like_0p5)
+random_st.beta(D_arr_0p5, D_arr_0p5, size=1)
+random_st.beta(D_arr_like_0p5, D_arr_like_0p5, size=1)
+
+random_st.f(0.5, 0.5)
+random_st.f(0.5, 0.5, size=None)
+random_st.f(0.5, 0.5, size=1)
+random_st.f(D_arr_0p5, 0.5)
+random_st.f(0.5, D_arr_0p5)
+random_st.f(D_arr_0p5, 0.5, size=1)
+random_st.f(0.5, D_arr_0p5, size=1)
+random_st.f(D_arr_like_0p5, 0.5)
+random_st.f(0.5, D_arr_like_0p5)
+random_st.f(D_arr_0p5, D_arr_0p5)
+random_st.f(D_arr_like_0p5, D_arr_like_0p5)
+random_st.f(D_arr_0p5, D_arr_0p5, size=1)
+random_st.f(D_arr_like_0p5, D_arr_like_0p5, size=1)
+
+random_st.gamma(0.5, 0.5)
+random_st.gamma(0.5, 0.5, size=None)
+random_st.gamma(0.5, 0.5, size=1)
+random_st.gamma(D_arr_0p5, 0.5)
+random_st.gamma(0.5, D_arr_0p5)
+random_st.gamma(D_arr_0p5, 0.5, size=1)
+random_st.gamma(0.5, D_arr_0p5, size=1)
+random_st.gamma(D_arr_like_0p5, 0.5)
+random_st.gamma(0.5, D_arr_like_0p5)
+random_st.gamma(D_arr_0p5, D_arr_0p5)
+random_st.gamma(D_arr_like_0p5, D_arr_like_0p5)
+random_st.gamma(D_arr_0p5, D_arr_0p5, size=1)
+random_st.gamma(D_arr_like_0p5, D_arr_like_0p5, size=1)
+
+random_st.gumbel(0.5, 0.5)
+random_st.gumbel(0.5, 0.5, size=None)
+random_st.gumbel(0.5, 0.5, size=1)
+random_st.gumbel(D_arr_0p5, 0.5)
+random_st.gumbel(0.5, D_arr_0p5)
+random_st.gumbel(D_arr_0p5, 0.5, size=1)
+random_st.gumbel(0.5, D_arr_0p5, size=1)
+random_st.gumbel(D_arr_like_0p5, 0.5)
+random_st.gumbel(0.5, D_arr_like_0p5)
+random_st.gumbel(D_arr_0p5, D_arr_0p5)
+random_st.gumbel(D_arr_like_0p5, D_arr_like_0p5)
+random_st.gumbel(D_arr_0p5, D_arr_0p5, size=1)
+random_st.gumbel(D_arr_like_0p5, D_arr_like_0p5, size=1)
+
+random_st.laplace(0.5, 0.5)
+random_st.laplace(0.5, 0.5, size=None)
+random_st.laplace(0.5, 0.5, size=1)
+random_st.laplace(D_arr_0p5, 0.5)
+random_st.laplace(0.5, D_arr_0p5)
+random_st.laplace(D_arr_0p5, 0.5, size=1)
+random_st.laplace(0.5, D_arr_0p5, size=1)
+random_st.laplace(D_arr_like_0p5, 0.5)
+random_st.laplace(0.5, D_arr_like_0p5)
+random_st.laplace(D_arr_0p5, D_arr_0p5)
+random_st.laplace(D_arr_like_0p5, D_arr_like_0p5)
+random_st.laplace(D_arr_0p5, D_arr_0p5, size=1)
+random_st.laplace(D_arr_like_0p5, D_arr_like_0p5, size=1)
+
+random_st.logistic(0.5, 0.5)
+random_st.logistic(0.5, 0.5, size=None)
+random_st.logistic(0.5, 0.5, size=1)
+random_st.logistic(D_arr_0p5, 0.5)
+random_st.logistic(0.5, D_arr_0p5)
+random_st.logistic(D_arr_0p5, 0.5, size=1)
+random_st.logistic(0.5, D_arr_0p5, size=1)
+random_st.logistic(D_arr_like_0p5, 0.5)
+random_st.logistic(0.5, D_arr_like_0p5)
+random_st.logistic(D_arr_0p5, D_arr_0p5)
+random_st.logistic(D_arr_like_0p5, D_arr_like_0p5)
+random_st.logistic(D_arr_0p5, D_arr_0p5, size=1)
+random_st.logistic(D_arr_like_0p5, D_arr_like_0p5, size=1)
+
+random_st.lognormal(0.5, 0.5)
+random_st.lognormal(0.5, 0.5, size=None)
+random_st.lognormal(0.5, 0.5, size=1)
+random_st.lognormal(D_arr_0p5, 0.5)
+random_st.lognormal(0.5, D_arr_0p5)
+random_st.lognormal(D_arr_0p5, 0.5, size=1)
+random_st.lognormal(0.5, D_arr_0p5, size=1)
+random_st.lognormal(D_arr_like_0p5, 0.5)
+random_st.lognormal(0.5, D_arr_like_0p5)
+random_st.lognormal(D_arr_0p5, D_arr_0p5)
+random_st.lognormal(D_arr_like_0p5, D_arr_like_0p5)
+random_st.lognormal(D_arr_0p5, D_arr_0p5, size=1)
+random_st.lognormal(D_arr_like_0p5, D_arr_like_0p5, size=1)
+
+random_st.noncentral_chisquare(0.5, 0.5)
+random_st.noncentral_chisquare(0.5, 0.5, size=None)
+random_st.noncentral_chisquare(0.5, 0.5, size=1)
+random_st.noncentral_chisquare(D_arr_0p5, 0.5)
+random_st.noncentral_chisquare(0.5, D_arr_0p5)
+random_st.noncentral_chisquare(D_arr_0p5, 0.5, size=1)
+random_st.noncentral_chisquare(0.5, D_arr_0p5, size=1)
+random_st.noncentral_chisquare(D_arr_like_0p5, 0.5)
+random_st.noncentral_chisquare(0.5, D_arr_like_0p5)
+random_st.noncentral_chisquare(D_arr_0p5, D_arr_0p5)
+random_st.noncentral_chisquare(D_arr_like_0p5, D_arr_like_0p5)
+random_st.noncentral_chisquare(D_arr_0p5, D_arr_0p5, size=1)
+random_st.noncentral_chisquare(D_arr_like_0p5, D_arr_like_0p5, size=1)
+
+random_st.normal(0.5, 0.5)
+random_st.normal(0.5, 0.5, size=None)
+random_st.normal(0.5, 0.5, size=1)
+random_st.normal(D_arr_0p5, 0.5)
+random_st.normal(0.5, D_arr_0p5)
+random_st.normal(D_arr_0p5, 0.5, size=1)
+random_st.normal(0.5, D_arr_0p5, size=1)
+random_st.normal(D_arr_like_0p5, 0.5)
+random_st.normal(0.5, D_arr_like_0p5)
+random_st.normal(D_arr_0p5, D_arr_0p5)
+random_st.normal(D_arr_like_0p5, D_arr_like_0p5)
+random_st.normal(D_arr_0p5, D_arr_0p5, size=1)
+random_st.normal(D_arr_like_0p5, D_arr_like_0p5, size=1)
+
+random_st.triangular(0.1, 0.5, 0.9)
+random_st.triangular(0.1, 0.5, 0.9, size=None)
+random_st.triangular(0.1, 0.5, 0.9, size=1)
+random_st.triangular(D_arr_0p1, 0.5, 0.9)
+random_st.triangular(0.1, D_arr_0p5, 0.9)
+random_st.triangular(D_arr_0p1, 0.5, D_arr_like_0p9, size=1)
+random_st.triangular(0.1, D_arr_0p5, 0.9, size=1)
+random_st.triangular(D_arr_like_0p1, 0.5, D_arr_0p9)
+random_st.triangular(0.5, D_arr_like_0p5, 0.9)
+random_st.triangular(D_arr_0p1, D_arr_0p5, 0.9)
+random_st.triangular(D_arr_like_0p1, D_arr_like_0p5, 0.9)
+random_st.triangular(D_arr_0p1, D_arr_0p5, D_arr_0p9, size=1)
+random_st.triangular(D_arr_like_0p1, D_arr_like_0p5, D_arr_like_0p9, size=1)
+
+random_st.noncentral_f(0.1, 0.5, 0.9)
+random_st.noncentral_f(0.1, 0.5, 0.9, size=None)
+random_st.noncentral_f(0.1, 0.5, 0.9, size=1)
+random_st.noncentral_f(D_arr_0p1, 0.5, 0.9)
+random_st.noncentral_f(0.1, D_arr_0p5, 0.9)
+random_st.noncentral_f(D_arr_0p1, 0.5, D_arr_like_0p9, size=1)
+random_st.noncentral_f(0.1, D_arr_0p5, 0.9, size=1)
+random_st.noncentral_f(D_arr_like_0p1, 0.5, D_arr_0p9)
+random_st.noncentral_f(0.5, D_arr_like_0p5, 0.9)
+random_st.noncentral_f(D_arr_0p1, D_arr_0p5, 0.9)
+random_st.noncentral_f(D_arr_like_0p1, D_arr_like_0p5, 0.9)
+random_st.noncentral_f(D_arr_0p1, D_arr_0p5, D_arr_0p9, size=1)
+random_st.noncentral_f(D_arr_like_0p1, D_arr_like_0p5, D_arr_like_0p9, size=1)
+
+random_st.binomial(10, 0.5)
+random_st.binomial(10, 0.5, size=None)
+random_st.binomial(10, 0.5, size=1)
+random_st.binomial(I_arr_10, 0.5)
+random_st.binomial(10, D_arr_0p5)
+random_st.binomial(I_arr_10, 0.5, size=1)
+random_st.binomial(10, D_arr_0p5, size=1)
+random_st.binomial(I_arr_like_10, 0.5)
+random_st.binomial(10, D_arr_like_0p5)
+random_st.binomial(I_arr_10, D_arr_0p5)
+random_st.binomial(I_arr_like_10, D_arr_like_0p5)
+random_st.binomial(I_arr_10, D_arr_0p5, size=1)
+random_st.binomial(I_arr_like_10, D_arr_like_0p5, size=1)
+
+random_st.negative_binomial(10, 0.5)
+random_st.negative_binomial(10, 0.5, size=None)
+random_st.negative_binomial(10, 0.5, size=1)
+random_st.negative_binomial(I_arr_10, 0.5)
+random_st.negative_binomial(10, D_arr_0p5)
+random_st.negative_binomial(I_arr_10, 0.5, size=1)
+random_st.negative_binomial(10, D_arr_0p5, size=1)
+random_st.negative_binomial(I_arr_like_10, 0.5)
+random_st.negative_binomial(10, D_arr_like_0p5)
+random_st.negative_binomial(I_arr_10, D_arr_0p5)
+random_st.negative_binomial(I_arr_like_10, D_arr_like_0p5)
+random_st.negative_binomial(I_arr_10, D_arr_0p5, size=1)
+random_st.negative_binomial(I_arr_like_10, D_arr_like_0p5, size=1)
+
+random_st.hypergeometric(20, 20, 10)
+random_st.hypergeometric(20, 20, 10, size=None)
+random_st.hypergeometric(20, 20, 10, size=1)
+random_st.hypergeometric(I_arr_20, 20, 10)
+random_st.hypergeometric(20, I_arr_20, 10)
+random_st.hypergeometric(I_arr_20, 20, I_arr_like_10, size=1)
+random_st.hypergeometric(20, I_arr_20, 10, size=1)
+random_st.hypergeometric(I_arr_like_20, 20, I_arr_10)
+random_st.hypergeometric(20, I_arr_like_20, 10)
+random_st.hypergeometric(I_arr_20, I_arr_20, 10)
+random_st.hypergeometric(I_arr_like_20, I_arr_like_20, 10)
+random_st.hypergeometric(I_arr_20, I_arr_20, I_arr_10, size=1)
+random_st.hypergeometric(I_arr_like_20, I_arr_like_20, I_arr_like_10, size=1)
+
+random_st.randint(0, 100)
+random_st.randint(100)
+random_st.randint([100])
+random_st.randint(0, [100])
+
+random_st.randint(2, dtype=bool)
+random_st.randint(0, 2, dtype=bool)
+random_st.randint(I_bool_high_open, dtype=bool)
+random_st.randint(I_bool_low, I_bool_high_open, dtype=bool)
+random_st.randint(0, I_bool_high_open, dtype=bool)
+
+random_st.randint(2, dtype=np.bool_)
+random_st.randint(0, 2, dtype=np.bool_)
+random_st.randint(I_bool_high_open, dtype=np.bool_)
+random_st.randint(I_bool_low, I_bool_high_open, dtype=np.bool_)
+random_st.randint(0, I_bool_high_open, dtype=np.bool_)
+
+random_st.randint(256, dtype="u1")
+random_st.randint(0, 256, dtype="u1")
+random_st.randint(I_u1_high_open, dtype="u1")
+random_st.randint(I_u1_low, I_u1_high_open, dtype="u1")
+random_st.randint(0, I_u1_high_open, dtype="u1")
+
+random_st.randint(256, dtype="uint8")
+random_st.randint(0, 256, dtype="uint8")
+random_st.randint(I_u1_high_open, dtype="uint8")
+random_st.randint(I_u1_low, I_u1_high_open, dtype="uint8")
+random_st.randint(0, I_u1_high_open, dtype="uint8")
+
+random_st.randint(256, dtype=np.uint8)
+random_st.randint(0, 256, dtype=np.uint8)
+random_st.randint(I_u1_high_open, dtype=np.uint8)
+random_st.randint(I_u1_low, I_u1_high_open, dtype=np.uint8)
+random_st.randint(0, I_u1_high_open, dtype=np.uint8)
+
+random_st.randint(65536, dtype="u2")
+random_st.randint(0, 65536, dtype="u2")
+random_st.randint(I_u2_high_open, dtype="u2")
+random_st.randint(I_u2_low, I_u2_high_open, dtype="u2")
+random_st.randint(0, I_u2_high_open, dtype="u2")
+
+random_st.randint(65536, dtype="uint16")
+random_st.randint(0, 65536, dtype="uint16")
+random_st.randint(I_u2_high_open, dtype="uint16")
+random_st.randint(I_u2_low, I_u2_high_open, dtype="uint16")
+random_st.randint(0, I_u2_high_open, dtype="uint16")
+
+random_st.randint(65536, dtype=np.uint16)
+random_st.randint(0, 65536, dtype=np.uint16)
+random_st.randint(I_u2_high_open, dtype=np.uint16)
+random_st.randint(I_u2_low, I_u2_high_open, dtype=np.uint16)
+random_st.randint(0, I_u2_high_open, dtype=np.uint16)
+
+random_st.randint(4294967296, dtype="u4")
+random_st.randint(0, 4294967296, dtype="u4")
+random_st.randint(I_u4_high_open, dtype="u4")
+random_st.randint(I_u4_low, I_u4_high_open, dtype="u4")
+random_st.randint(0, I_u4_high_open, dtype="u4")
+
+random_st.randint(4294967296, dtype="uint32")
+random_st.randint(0, 4294967296, dtype="uint32")
+random_st.randint(I_u4_high_open, dtype="uint32")
+random_st.randint(I_u4_low, I_u4_high_open, dtype="uint32")
+random_st.randint(0, I_u4_high_open, dtype="uint32")
+
+random_st.randint(4294967296, dtype=np.uint32)
+random_st.randint(0, 4294967296, dtype=np.uint32)
+random_st.randint(I_u4_high_open, dtype=np.uint32)
+random_st.randint(I_u4_low, I_u4_high_open, dtype=np.uint32)
+random_st.randint(0, I_u4_high_open, dtype=np.uint32)
+
+
+random_st.randint(18446744073709551616, dtype="u8")
+random_st.randint(0, 18446744073709551616, dtype="u8")
+random_st.randint(I_u8_high_open, dtype="u8")
+random_st.randint(I_u8_low, I_u8_high_open, dtype="u8")
+random_st.randint(0, I_u8_high_open, dtype="u8")
+
+random_st.randint(18446744073709551616, dtype="uint64")
+random_st.randint(0, 18446744073709551616, dtype="uint64")
+random_st.randint(I_u8_high_open, dtype="uint64")
+random_st.randint(I_u8_low, I_u8_high_open, dtype="uint64")
+random_st.randint(0, I_u8_high_open, dtype="uint64")
+
+random_st.randint(18446744073709551616, dtype=np.uint64)
+random_st.randint(0, 18446744073709551616, dtype=np.uint64)
+random_st.randint(I_u8_high_open, dtype=np.uint64)
+random_st.randint(I_u8_low, I_u8_high_open, dtype=np.uint64)
+random_st.randint(0, I_u8_high_open, dtype=np.uint64)
+
+random_st.randint(128, dtype="i1")
+random_st.randint(-128, 128, dtype="i1")
+random_st.randint(I_i1_high_open, dtype="i1")
+random_st.randint(I_i1_low, I_i1_high_open, dtype="i1")
+random_st.randint(-128, I_i1_high_open, dtype="i1")
+
+random_st.randint(128, dtype="int8")
+random_st.randint(-128, 128, dtype="int8")
+random_st.randint(I_i1_high_open, dtype="int8")
+random_st.randint(I_i1_low, I_i1_high_open, dtype="int8")
+random_st.randint(-128, I_i1_high_open, dtype="int8")
+
+random_st.randint(128, dtype=np.int8)
+random_st.randint(-128, 128, dtype=np.int8)
+random_st.randint(I_i1_high_open, dtype=np.int8)
+random_st.randint(I_i1_low, I_i1_high_open, dtype=np.int8)
+random_st.randint(-128, I_i1_high_open, dtype=np.int8)
+
+random_st.randint(32768, dtype="i2")
+random_st.randint(-32768, 32768, dtype="i2")
+random_st.randint(I_i2_high_open, dtype="i2")
+random_st.randint(I_i2_low, I_i2_high_open, dtype="i2")
+random_st.randint(-32768, I_i2_high_open, dtype="i2")
+random_st.randint(32768, dtype="int16")
+random_st.randint(-32768, 32768, dtype="int16")
+random_st.randint(I_i2_high_open, dtype="int16")
+random_st.randint(I_i2_low, I_i2_high_open, dtype="int16")
+random_st.randint(-32768, I_i2_high_open, dtype="int16")
+random_st.randint(32768, dtype=np.int16)
+random_st.randint(-32768, 32768, dtype=np.int16)
+random_st.randint(I_i2_high_open, dtype=np.int16)
+random_st.randint(I_i2_low, I_i2_high_open, dtype=np.int16)
+random_st.randint(-32768, I_i2_high_open, dtype=np.int16)
+
+random_st.randint(2147483648, dtype="i4")
+random_st.randint(-2147483648, 2147483648, dtype="i4")
+random_st.randint(I_i4_high_open, dtype="i4")
+random_st.randint(I_i4_low, I_i4_high_open, dtype="i4")
+random_st.randint(-2147483648, I_i4_high_open, dtype="i4")
+
+random_st.randint(2147483648, dtype="int32")
+random_st.randint(-2147483648, 2147483648, dtype="int32")
+random_st.randint(I_i4_high_open, dtype="int32")
+random_st.randint(I_i4_low, I_i4_high_open, dtype="int32")
+random_st.randint(-2147483648, I_i4_high_open, dtype="int32")
+
+random_st.randint(2147483648, dtype=np.int32)
+random_st.randint(-2147483648, 2147483648, dtype=np.int32)
+random_st.randint(I_i4_high_open, dtype=np.int32)
+random_st.randint(I_i4_low, I_i4_high_open, dtype=np.int32)
+random_st.randint(-2147483648, I_i4_high_open, dtype=np.int32)
+
+random_st.randint(9223372036854775808, dtype="i8")
+random_st.randint(-9223372036854775808, 9223372036854775808, dtype="i8")
+random_st.randint(I_i8_high_open, dtype="i8")
+random_st.randint(I_i8_low, I_i8_high_open, dtype="i8")
+random_st.randint(-9223372036854775808, I_i8_high_open, dtype="i8")
+
+random_st.randint(9223372036854775808, dtype="int64")
+random_st.randint(-9223372036854775808, 9223372036854775808, dtype="int64")
+random_st.randint(I_i8_high_open, dtype="int64")
+random_st.randint(I_i8_low, I_i8_high_open, dtype="int64")
+random_st.randint(-9223372036854775808, I_i8_high_open, dtype="int64")
+
+random_st.randint(9223372036854775808, dtype=np.int64)
+random_st.randint(-9223372036854775808, 9223372036854775808, dtype=np.int64)
+random_st.randint(I_i8_high_open, dtype=np.int64)
+random_st.randint(I_i8_low, I_i8_high_open, dtype=np.int64)
+random_st.randint(-9223372036854775808, I_i8_high_open, dtype=np.int64)
+
+bg: np.random.BitGenerator = random_st._bit_generator
+
+random_st.bytes(2)
+
+random_st.choice(5)
+random_st.choice(5, 3)
+random_st.choice(5, 3, replace=True)
+random_st.choice(5, 3, p=[1 / 5] * 5)
+random_st.choice(5, 3, p=[1 / 5] * 5, replace=False)
+
+random_st.choice(["pooh", "rabbit", "piglet", "Christopher"])
+random_st.choice(["pooh", "rabbit", "piglet", "Christopher"], 3)
+random_st.choice(["pooh", "rabbit", "piglet", "Christopher"], 3, p=[1 / 4] * 4)
+random_st.choice(["pooh", "rabbit", "piglet", "Christopher"], 3, replace=True)
+random_st.choice(["pooh", "rabbit", "piglet", "Christopher"], 3, replace=False, p=np.array([1 / 8, 1 / 8, 1 / 2, 1 / 4]))
+
+random_st.dirichlet([0.5, 0.5])
+random_st.dirichlet(np.array([0.5, 0.5]))
+random_st.dirichlet(np.array([0.5, 0.5]), size=3)
+
+random_st.multinomial(20, [1 / 6.0] * 6)
+random_st.multinomial(20, np.array([0.5, 0.5]))
+random_st.multinomial(20, [1 / 6.0] * 6, size=2)
+
+random_st.multivariate_normal([0.0], [[1.0]])
+random_st.multivariate_normal([0.0], np.array([[1.0]]))
+random_st.multivariate_normal(np.array([0.0]), [[1.0]])
+random_st.multivariate_normal([0.0], np.array([[1.0]]))
+
+random_st.permutation(10)
+random_st.permutation([1, 2, 3, 4])
+random_st.permutation(np.array([1, 2, 3, 4]))
+random_st.permutation(D_2D)
+
+random_st.shuffle(np.arange(10))
+random_st.shuffle([1, 2, 3, 4, 5])
+random_st.shuffle(D_2D)
+
+np.random.RandomState(SEED_PCG64)
+np.random.RandomState(0)
+np.random.RandomState([0, 1, 2])
+random_st.__str__()
+random_st.__repr__()
+random_st_state = random_st.__getstate__()
+random_st.__setstate__(random_st_state)
+random_st.seed()
+random_st.seed(1)
+random_st.seed([0, 1])
+random_st_get_state = random_st.get_state()
+random_st_get_state_legacy = random_st.get_state(legacy=True)
+random_st.set_state(random_st_get_state)
+
+random_st.rand()
+random_st.rand(1)
+random_st.rand(1, 2)
+random_st.randn()
+random_st.randn(1)
+random_st.randn(1, 2)
+random_st.random_sample()
+random_st.random_sample(1)
+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/lib/python3.12/site-packages/numpy/typing/tests/data/pass/scalars.py b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/scalars.py
new file mode 100644
index 0000000000000000000000000000000000000000..a5c6f96e9fa2a8c966bcdd7c7164c6611bfcfe4d
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/scalars.py
@@ -0,0 +1,248 @@
+import sys
+import datetime as dt
+
+import pytest
+import numpy as np
+
+b =  np.bool_()
+u8 = np.uint64()
+i8 = np.int64()
+f8 = np.float64()
+c16 = np.complex128()
+U = np.str_()
+S = np.bytes_()
+
+
+# Construction
+class D:
+    def __index__(self) -> int:
+        return 0
+
+
+class C:
+    def __complex__(self) -> complex:
+        return 3j
+
+
+class B:
+    def __int__(self) -> int:
+        return 4
+
+
+class A:
+    def __float__(self) -> float:
+        return 4.0
+
+
+np.complex64(3j)
+np.complex64(A())
+np.complex64(C())
+np.complex128(3j)
+np.complex128(C())
+np.complex128(None)
+np.complex64("1.2")
+np.complex128(b"2j")
+
+np.int8(4)
+np.int16(3.4)
+np.int32(4)
+np.int64(-1)
+np.uint8(B())
+np.uint32()
+np.int32("1")
+np.int64(b"2")
+
+np.float16(A())
+np.float32(16)
+np.float64(3.0)
+np.float64(None)
+np.float32("1")
+np.float16(b"2.5")
+
+np.uint64(D())
+np.float32(D())
+np.complex64(D())
+
+np.bytes_(b"hello")
+np.bytes_("hello", 'utf-8')
+np.bytes_("hello", encoding='utf-8')
+np.str_("hello")
+np.str_(b"hello", 'utf-8')
+np.str_(b"hello", encoding='utf-8')
+
+# Array-ish semantics
+np.int8().real
+np.int16().imag
+np.int32().data
+np.int64().flags
+
+np.uint8().itemsize * 2
+np.uint16().ndim + 1
+np.uint32().strides
+np.uint64().shape
+
+# Time structures
+np.datetime64()
+np.datetime64(0, "D")
+np.datetime64(0, b"D")
+np.datetime64(0, ('ms', 3))
+np.datetime64("2019")
+np.datetime64(b"2019")
+np.datetime64("2019", "D")
+np.datetime64(np.datetime64())
+np.datetime64(dt.datetime(2000, 5, 3))
+np.datetime64(dt.date(2000, 5, 3))
+np.datetime64(None)
+np.datetime64(None, "D")
+
+np.timedelta64()
+np.timedelta64(0)
+np.timedelta64(0, "D")
+np.timedelta64(0, ('ms', 3))
+np.timedelta64(0, b"D")
+np.timedelta64("3")
+np.timedelta64(b"5")
+np.timedelta64(np.timedelta64(2))
+np.timedelta64(dt.timedelta(2))
+np.timedelta64(None)
+np.timedelta64(None, "D")
+
+np.void(1)
+np.void(np.int64(1))
+np.void(True)
+np.void(np.bool_(True))
+np.void(b"test")
+np.void(np.bytes_("test"))
+np.void(object(), [("a", "O"), ("b", "O")])
+np.void(object(), dtype=[("a", "O"), ("b", "O")])
+
+# Protocols
+i8 = np.int64()
+u8 = np.uint64()
+f8 = np.float64()
+c16 = np.complex128()
+b_ = np.bool_()
+td = np.timedelta64()
+U = np.str_("1")
+S = np.bytes_("1")
+AR = np.array(1, dtype=np.float64)
+
+int(i8)
+int(u8)
+int(f8)
+int(b_)
+int(td)
+int(U)
+int(S)
+int(AR)
+with pytest.warns(np.ComplexWarning):
+    int(c16)
+
+float(i8)
+float(u8)
+float(f8)
+float(b_)
+float(td)
+float(U)
+float(S)
+float(AR)
+with pytest.warns(np.ComplexWarning):
+    float(c16)
+
+complex(i8)
+complex(u8)
+complex(f8)
+complex(c16)
+complex(b_)
+complex(td)
+complex(U)
+complex(AR)
+
+
+# Misc
+c16.dtype
+c16.real
+c16.imag
+c16.real.real
+c16.real.imag
+c16.ndim
+c16.size
+c16.itemsize
+c16.shape
+c16.strides
+c16.squeeze()
+c16.byteswap()
+c16.transpose()
+
+# Aliases
+np.string_()
+
+np.byte()
+np.short()
+np.intc()
+np.intp()
+np.int_()
+np.longlong()
+
+np.ubyte()
+np.ushort()
+np.uintc()
+np.uintp()
+np.uint()
+np.ulonglong()
+
+np.half()
+np.single()
+np.double()
+np.float_()
+np.longdouble()
+np.longfloat()
+
+np.csingle()
+np.singlecomplex()
+np.cdouble()
+np.complex_()
+np.cfloat()
+np.clongdouble()
+np.clongfloat()
+np.longcomplex()
+
+b.item()
+i8.item()
+u8.item()
+f8.item()
+c16.item()
+U.item()
+S.item()
+
+b.tolist()
+i8.tolist()
+u8.tolist()
+f8.tolist()
+c16.tolist()
+U.tolist()
+S.tolist()
+
+b.ravel()
+i8.ravel()
+u8.ravel()
+f8.ravel()
+c16.ravel()
+U.ravel()
+S.ravel()
+
+b.flatten()
+i8.flatten()
+u8.flatten()
+f8.flatten()
+c16.flatten()
+U.flatten()
+S.flatten()
+
+b.reshape(1)
+i8.reshape(1)
+u8.reshape(1)
+f8.reshape(1)
+c16.reshape(1)
+U.reshape(1)
+S.reshape(1)
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/pass/simple.py b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/simple.py
new file mode 100644
index 0000000000000000000000000000000000000000..80116870287e4faa58f1640974536ae0ee6250d0
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/simple.py
@@ -0,0 +1,165 @@
+"""Simple expression that should pass with mypy."""
+import operator
+
+import numpy as np
+from collections.abc import Iterable
+
+# Basic checks
+array = np.array([1, 2])
+
+
+def ndarray_func(x):
+    # type: (np.ndarray) -> np.ndarray
+    return x
+
+
+ndarray_func(np.array([1, 2]))
+array == 1
+array.dtype == float
+
+# Dtype construction
+np.dtype(float)
+np.dtype(np.float64)
+np.dtype(None)
+np.dtype("float64")
+np.dtype(np.dtype(float))
+np.dtype(("U", 10))
+np.dtype((np.int32, (2, 2)))
+# Define the arguments on the previous line to prevent bidirectional
+# type inference in mypy from broadening the types.
+two_tuples_dtype = [("R", "u1"), ("G", "u1"), ("B", "u1")]
+np.dtype(two_tuples_dtype)
+
+three_tuples_dtype = [("R", "u1", 2)]
+np.dtype(three_tuples_dtype)
+
+mixed_tuples_dtype = [("R", "u1"), ("G", np.str_, 1)]
+np.dtype(mixed_tuples_dtype)
+
+shape_tuple_dtype = [("R", "u1", (2, 2))]
+np.dtype(shape_tuple_dtype)
+
+shape_like_dtype = [("R", "u1", (2, 2)), ("G", np.str_, 1)]
+np.dtype(shape_like_dtype)
+
+object_dtype = [("field1", object)]
+np.dtype(object_dtype)
+
+np.dtype((np.int32, (np.int8, 4)))
+
+# Dtype comparison
+np.dtype(float) == float
+np.dtype(float) != np.float64
+np.dtype(float) < None
+np.dtype(float) <= "float64"
+np.dtype(float) > np.dtype(float)
+np.dtype(float) >= np.dtype(("U", 10))
+
+# Iteration and indexing
+def iterable_func(x):
+    # type: (Iterable) -> Iterable
+    return x
+
+
+iterable_func(array)
+[element for element in array]
+iter(array)
+zip(array, array)
+array[1]
+array[:]
+array[...]
+array[:] = 0
+
+array_2d = np.ones((3, 3))
+array_2d[:2, :2]
+array_2d[..., 0]
+array_2d[:2, :2] = 0
+
+# Other special methods
+len(array)
+str(array)
+array_scalar = np.array(1)
+int(array_scalar)
+float(array_scalar)
+# currently does not work due to https://github.com/python/typeshed/issues/1904
+# complex(array_scalar)
+bytes(array_scalar)
+operator.index(array_scalar)
+bool(array_scalar)
+
+# comparisons
+array < 1
+array <= 1
+array == 1
+array != 1
+array > 1
+array >= 1
+1 < array
+1 <= array
+1 == array
+1 != array
+1 > array
+1 >= array
+
+# binary arithmetic
+array + 1
+1 + array
+array += 1
+
+array - 1
+1 - array
+array -= 1
+
+array * 1
+1 * array
+array *= 1
+
+nonzero_array = np.array([1, 2])
+array / 1
+1 / nonzero_array
+float_array = np.array([1.0, 2.0])
+float_array /= 1
+
+array // 1
+1 // nonzero_array
+array //= 1
+
+array % 1
+1 % nonzero_array
+array %= 1
+
+divmod(array, 1)
+divmod(1, nonzero_array)
+
+array ** 1
+1 ** array
+array **= 1
+
+array << 1
+1 << array
+array <<= 1
+
+array >> 1
+1 >> array
+array >>= 1
+
+array & 1
+1 & array
+array &= 1
+
+array ^ 1
+1 ^ array
+array ^= 1
+
+array | 1
+1 | array
+array |= 1
+
+# unary arithmetic
+-array
++array
+abs(array)
+~array
+
+# Other methods
+np.array([1, 2]).transpose()
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/pass/simple_py3.py b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/simple_py3.py
new file mode 100644
index 0000000000000000000000000000000000000000..c05a1ce612ac5e40d0914732c4c72ad1d3f2d552
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/simple_py3.py
@@ -0,0 +1,6 @@
+import numpy as np
+
+array = np.array([1, 2])
+
+# The @ operator is not in python 2
+array @ array
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/pass/ufunc_config.py b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/ufunc_config.py
new file mode 100644
index 0000000000000000000000000000000000000000..58dd3e550a51984e2d331f9f017ef5651630d749
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/ufunc_config.py
@@ -0,0 +1,64 @@
+"""Typing tests for `numpy.core._ufunc_config`."""
+
+import numpy as np
+
+
+def func1(a: str, b: int) -> None:
+    return None
+
+
+def func2(a: str, b: int, c: float = 1.0) -> None:
+    return None
+
+
+def func3(a: str, b: int) -> int:
+    return 0
+
+
+class Write1:
+    def write(self, a: str) -> None:
+        return None
+
+
+class Write2:
+    def write(self, a: str, b: int = 1) -> None:
+        return None
+
+
+class Write3:
+    def write(self, a: str) -> int:
+        return 0
+
+
+_err_default = np.geterr()
+_bufsize_default = np.getbufsize()
+_errcall_default = np.geterrcall()
+
+try:
+    np.seterr(all=None)
+    np.seterr(divide="ignore")
+    np.seterr(over="warn")
+    np.seterr(under="call")
+    np.seterr(invalid="raise")
+    np.geterr()
+
+    np.setbufsize(4096)
+    np.getbufsize()
+
+    np.seterrcall(func1)
+    np.seterrcall(func2)
+    np.seterrcall(func3)
+    np.seterrcall(Write1())
+    np.seterrcall(Write2())
+    np.seterrcall(Write3())
+    np.geterrcall()
+
+    with np.errstate(call=func1, all="call"):
+        pass
+    with np.errstate(call=Write1(), divide="log", over="log"):
+        pass
+
+finally:
+    np.seterr(**_err_default)
+    np.setbufsize(_bufsize_default)
+    np.seterrcall(_errcall_default)
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/pass/ufunclike.py b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/ufunclike.py
new file mode 100644
index 0000000000000000000000000000000000000000..7eac89e8f9aac8c32c54c9e88183e05721a82325
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/ufunclike.py
@@ -0,0 +1,46 @@
+from __future__ import annotations
+from typing import Any
+import numpy as np
+
+
+class Object:
+    def __ceil__(self) -> Object:
+        return self
+
+    def __floor__(self) -> Object:
+        return self
+
+    def __ge__(self, value: object) -> bool:
+        return True
+
+    def __array__(self) -> np.ndarray[Any, np.dtype[np.object_]]:
+        ret = np.empty((), dtype=object)
+        ret[()] = self
+        return ret
+
+
+AR_LIKE_b = [True, True, False]
+AR_LIKE_u = [np.uint32(1), np.uint32(2), np.uint32(3)]
+AR_LIKE_i = [1, 2, 3]
+AR_LIKE_f = [1.0, 2.0, 3.0]
+AR_LIKE_O = [Object(), Object(), Object()]
+AR_U: np.ndarray[Any, np.dtype[np.str_]] = np.zeros(3, dtype="U5")
+
+np.fix(AR_LIKE_b)
+np.fix(AR_LIKE_u)
+np.fix(AR_LIKE_i)
+np.fix(AR_LIKE_f)
+np.fix(AR_LIKE_O)
+np.fix(AR_LIKE_f, out=AR_U)
+
+np.isposinf(AR_LIKE_b)
+np.isposinf(AR_LIKE_u)
+np.isposinf(AR_LIKE_i)
+np.isposinf(AR_LIKE_f)
+np.isposinf(AR_LIKE_f, out=AR_U)
+
+np.isneginf(AR_LIKE_b)
+np.isneginf(AR_LIKE_u)
+np.isneginf(AR_LIKE_i)
+np.isneginf(AR_LIKE_f)
+np.isneginf(AR_LIKE_f, out=AR_U)
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/pass/ufuncs.py b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/ufuncs.py
new file mode 100644
index 0000000000000000000000000000000000000000..3cc31ae5e30506481192d0e4b2f3df8347af65c8
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/ufuncs.py
@@ -0,0 +1,17 @@
+import numpy as np
+
+np.sin(1)
+np.sin([1, 2, 3])
+np.sin(1, out=np.empty(1))
+np.matmul(np.ones((2, 2, 2)), np.ones((2, 2, 2)), axes=[(0, 1), (0, 1), (0, 1)])
+np.sin(1, signature="D->D")
+np.sin(1, extobj=[16, 1, lambda: None])
+# NOTE: `np.generic` subclasses are not guaranteed to support addition;
+# re-enable this we can infer the exact return type of `np.sin(...)`.
+#
+# np.sin(1) + np.sin(1)
+np.sin.types[0]
+np.sin.__name__
+np.sin.__doc__
+
+np.abs(np.array([1]))
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/pass/warnings_and_errors.py b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/warnings_and_errors.py
new file mode 100644
index 0000000000000000000000000000000000000000..a556bf6bcb35b4b3451b49997bef4c8a10d9995b
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/pass/warnings_and_errors.py
@@ -0,0 +1,6 @@
+import numpy as np
+
+np.AxisError("test")
+np.AxisError(1, ndim=2)
+np.AxisError(1, ndim=2, msg_prefix="error")
+np.AxisError(1, ndim=2, msg_prefix=None)
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/arithmetic.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/arithmetic.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..6291fda6cefceeea0129e4006d1cf77c2e92d609
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/arithmetic.pyi
@@ -0,0 +1,516 @@
+import sys
+from typing import Any
+
+import numpy as np
+import numpy.typing as npt
+from numpy._typing import _32Bit,_64Bit, _128Bit
+
+if sys.version_info >= (3, 11):
+    from typing import assert_type
+else:
+    from typing_extensions import assert_type
+
+# Can't directly import `np.float128` as it is not available on all platforms
+f16: np.floating[_128Bit]
+
+c16 = np.complex128()
+f8 = np.float64()
+i8 = np.int64()
+u8 = np.uint64()
+
+c8 = np.complex64()
+f4 = np.float32()
+i4 = np.int32()
+u4 = np.uint32()
+
+dt = np.datetime64(0, "D")
+td = np.timedelta64(0, "D")
+
+b_ = np.bool_()
+
+b = bool()
+c = complex()
+f = float()
+i = int()
+
+AR_b: npt.NDArray[np.bool_]
+AR_u: npt.NDArray[np.uint32]
+AR_i: npt.NDArray[np.int64]
+AR_f: npt.NDArray[np.float64]
+AR_c: npt.NDArray[np.complex128]
+AR_m: npt.NDArray[np.timedelta64]
+AR_M: npt.NDArray[np.datetime64]
+AR_O: npt.NDArray[np.object_]
+AR_number: npt.NDArray[np.number[Any]]
+
+AR_LIKE_b: list[bool]
+AR_LIKE_u: list[np.uint32]
+AR_LIKE_i: list[int]
+AR_LIKE_f: list[float]
+AR_LIKE_c: list[complex]
+AR_LIKE_m: list[np.timedelta64]
+AR_LIKE_M: list[np.datetime64]
+AR_LIKE_O: list[np.object_]
+
+# Array subtraction
+
+assert_type(AR_number - AR_number, npt.NDArray[np.number[Any]])
+
+assert_type(AR_b - AR_LIKE_u, npt.NDArray[np.unsignedinteger[Any]])
+assert_type(AR_b - AR_LIKE_i, npt.NDArray[np.signedinteger[Any]])
+assert_type(AR_b - AR_LIKE_f, npt.NDArray[np.floating[Any]])
+assert_type(AR_b - AR_LIKE_c, npt.NDArray[np.complexfloating[Any, Any]])
+assert_type(AR_b - AR_LIKE_m, npt.NDArray[np.timedelta64])
+assert_type(AR_b - AR_LIKE_O, Any)
+
+assert_type(AR_LIKE_u - AR_b, npt.NDArray[np.unsignedinteger[Any]])
+assert_type(AR_LIKE_i - AR_b, npt.NDArray[np.signedinteger[Any]])
+assert_type(AR_LIKE_f - AR_b, npt.NDArray[np.floating[Any]])
+assert_type(AR_LIKE_c - AR_b, npt.NDArray[np.complexfloating[Any, Any]])
+assert_type(AR_LIKE_m - AR_b, npt.NDArray[np.timedelta64])
+assert_type(AR_LIKE_M - AR_b, npt.NDArray[np.datetime64])
+assert_type(AR_LIKE_O - AR_b, Any)
+
+assert_type(AR_u - AR_LIKE_b, npt.NDArray[np.unsignedinteger[Any]])
+assert_type(AR_u - AR_LIKE_u, npt.NDArray[np.unsignedinteger[Any]])
+assert_type(AR_u - AR_LIKE_i, npt.NDArray[np.signedinteger[Any]])
+assert_type(AR_u - AR_LIKE_f, npt.NDArray[np.floating[Any]])
+assert_type(AR_u - AR_LIKE_c, npt.NDArray[np.complexfloating[Any, Any]])
+assert_type(AR_u - AR_LIKE_m, npt.NDArray[np.timedelta64])
+assert_type(AR_u - AR_LIKE_O, Any)
+
+assert_type(AR_LIKE_b - AR_u, npt.NDArray[np.unsignedinteger[Any]])
+assert_type(AR_LIKE_u - AR_u, npt.NDArray[np.unsignedinteger[Any]])
+assert_type(AR_LIKE_i - AR_u, npt.NDArray[np.signedinteger[Any]])
+assert_type(AR_LIKE_f - AR_u, npt.NDArray[np.floating[Any]])
+assert_type(AR_LIKE_c - AR_u, npt.NDArray[np.complexfloating[Any, Any]])
+assert_type(AR_LIKE_m - AR_u, npt.NDArray[np.timedelta64])
+assert_type(AR_LIKE_M - AR_u, npt.NDArray[np.datetime64])
+assert_type(AR_LIKE_O - AR_u, Any)
+
+assert_type(AR_i - AR_LIKE_b, npt.NDArray[np.signedinteger[Any]])
+assert_type(AR_i - AR_LIKE_u, npt.NDArray[np.signedinteger[Any]])
+assert_type(AR_i - AR_LIKE_i, npt.NDArray[np.signedinteger[Any]])
+assert_type(AR_i - AR_LIKE_f, npt.NDArray[np.floating[Any]])
+assert_type(AR_i - AR_LIKE_c, npt.NDArray[np.complexfloating[Any, Any]])
+assert_type(AR_i - AR_LIKE_m, npt.NDArray[np.timedelta64])
+assert_type(AR_i - AR_LIKE_O, Any)
+
+assert_type(AR_LIKE_b - AR_i, npt.NDArray[np.signedinteger[Any]])
+assert_type(AR_LIKE_u - AR_i, npt.NDArray[np.signedinteger[Any]])
+assert_type(AR_LIKE_i - AR_i, npt.NDArray[np.signedinteger[Any]])
+assert_type(AR_LIKE_f - AR_i, npt.NDArray[np.floating[Any]])
+assert_type(AR_LIKE_c - AR_i, npt.NDArray[np.complexfloating[Any, Any]])
+assert_type(AR_LIKE_m - AR_i, npt.NDArray[np.timedelta64])
+assert_type(AR_LIKE_M - AR_i, npt.NDArray[np.datetime64])
+assert_type(AR_LIKE_O - AR_i, Any)
+
+assert_type(AR_f - AR_LIKE_b, npt.NDArray[np.floating[Any]])
+assert_type(AR_f - AR_LIKE_u, npt.NDArray[np.floating[Any]])
+assert_type(AR_f - AR_LIKE_i, npt.NDArray[np.floating[Any]])
+assert_type(AR_f - AR_LIKE_f, npt.NDArray[np.floating[Any]])
+assert_type(AR_f - AR_LIKE_c, npt.NDArray[np.complexfloating[Any, Any]])
+assert_type(AR_f - AR_LIKE_O, Any)
+
+assert_type(AR_LIKE_b - AR_f, npt.NDArray[np.floating[Any]])
+assert_type(AR_LIKE_u - AR_f, npt.NDArray[np.floating[Any]])
+assert_type(AR_LIKE_i - AR_f, npt.NDArray[np.floating[Any]])
+assert_type(AR_LIKE_f - AR_f, npt.NDArray[np.floating[Any]])
+assert_type(AR_LIKE_c - AR_f, npt.NDArray[np.complexfloating[Any, Any]])
+assert_type(AR_LIKE_O - AR_f, Any)
+
+assert_type(AR_c - AR_LIKE_b, npt.NDArray[np.complexfloating[Any, Any]])
+assert_type(AR_c - AR_LIKE_u, npt.NDArray[np.complexfloating[Any, Any]])
+assert_type(AR_c - AR_LIKE_i, npt.NDArray[np.complexfloating[Any, Any]])
+assert_type(AR_c - AR_LIKE_f, npt.NDArray[np.complexfloating[Any, Any]])
+assert_type(AR_c - AR_LIKE_c, npt.NDArray[np.complexfloating[Any, Any]])
+assert_type(AR_c - AR_LIKE_O, Any)
+
+assert_type(AR_LIKE_b - AR_c, npt.NDArray[np.complexfloating[Any, Any]])
+assert_type(AR_LIKE_u - AR_c, npt.NDArray[np.complexfloating[Any, Any]])
+assert_type(AR_LIKE_i - AR_c, npt.NDArray[np.complexfloating[Any, Any]])
+assert_type(AR_LIKE_f - AR_c, npt.NDArray[np.complexfloating[Any, Any]])
+assert_type(AR_LIKE_c - AR_c, npt.NDArray[np.complexfloating[Any, Any]])
+assert_type(AR_LIKE_O - AR_c, Any)
+
+assert_type(AR_m - AR_LIKE_b, npt.NDArray[np.timedelta64])
+assert_type(AR_m - AR_LIKE_u, npt.NDArray[np.timedelta64])
+assert_type(AR_m - AR_LIKE_i, npt.NDArray[np.timedelta64])
+assert_type(AR_m - AR_LIKE_m, npt.NDArray[np.timedelta64])
+assert_type(AR_m - AR_LIKE_O, Any)
+
+assert_type(AR_LIKE_b - AR_m, npt.NDArray[np.timedelta64])
+assert_type(AR_LIKE_u - AR_m, npt.NDArray[np.timedelta64])
+assert_type(AR_LIKE_i - AR_m, npt.NDArray[np.timedelta64])
+assert_type(AR_LIKE_m - AR_m, npt.NDArray[np.timedelta64])
+assert_type(AR_LIKE_M - AR_m, npt.NDArray[np.datetime64])
+assert_type(AR_LIKE_O - AR_m, Any)
+
+assert_type(AR_M - AR_LIKE_b, npt.NDArray[np.datetime64])
+assert_type(AR_M - AR_LIKE_u, npt.NDArray[np.datetime64])
+assert_type(AR_M - AR_LIKE_i, npt.NDArray[np.datetime64])
+assert_type(AR_M - AR_LIKE_m, npt.NDArray[np.datetime64])
+assert_type(AR_M - AR_LIKE_M, npt.NDArray[np.timedelta64])
+assert_type(AR_M - AR_LIKE_O, Any)
+
+assert_type(AR_LIKE_M - AR_M, npt.NDArray[np.timedelta64])
+assert_type(AR_LIKE_O - AR_M, Any)
+
+assert_type(AR_O - AR_LIKE_b, Any)
+assert_type(AR_O - AR_LIKE_u, Any)
+assert_type(AR_O - AR_LIKE_i, Any)
+assert_type(AR_O - AR_LIKE_f, Any)
+assert_type(AR_O - AR_LIKE_c, Any)
+assert_type(AR_O - AR_LIKE_m, Any)
+assert_type(AR_O - AR_LIKE_M, Any)
+assert_type(AR_O - AR_LIKE_O, Any)
+
+assert_type(AR_LIKE_b - AR_O, Any)
+assert_type(AR_LIKE_u - AR_O, Any)
+assert_type(AR_LIKE_i - AR_O, Any)
+assert_type(AR_LIKE_f - AR_O, Any)
+assert_type(AR_LIKE_c - AR_O, Any)
+assert_type(AR_LIKE_m - AR_O, Any)
+assert_type(AR_LIKE_M - AR_O, Any)
+assert_type(AR_LIKE_O - AR_O, Any)
+
+# Array floor division
+
+assert_type(AR_b // AR_LIKE_b, npt.NDArray[np.int8])
+assert_type(AR_b // AR_LIKE_u, npt.NDArray[np.unsignedinteger[Any]])
+assert_type(AR_b // AR_LIKE_i, npt.NDArray[np.signedinteger[Any]])
+assert_type(AR_b // AR_LIKE_f, npt.NDArray[np.floating[Any]])
+assert_type(AR_b // AR_LIKE_O, Any)
+
+assert_type(AR_LIKE_b // AR_b, npt.NDArray[np.int8])
+assert_type(AR_LIKE_u // AR_b, npt.NDArray[np.unsignedinteger[Any]])
+assert_type(AR_LIKE_i // AR_b, npt.NDArray[np.signedinteger[Any]])
+assert_type(AR_LIKE_f // AR_b, npt.NDArray[np.floating[Any]])
+assert_type(AR_LIKE_O // AR_b, Any)
+
+assert_type(AR_u // AR_LIKE_b, npt.NDArray[np.unsignedinteger[Any]])
+assert_type(AR_u // AR_LIKE_u, npt.NDArray[np.unsignedinteger[Any]])
+assert_type(AR_u // AR_LIKE_i, npt.NDArray[np.signedinteger[Any]])
+assert_type(AR_u // AR_LIKE_f, npt.NDArray[np.floating[Any]])
+assert_type(AR_u // AR_LIKE_O, Any)
+
+assert_type(AR_LIKE_b // AR_u, npt.NDArray[np.unsignedinteger[Any]])
+assert_type(AR_LIKE_u // AR_u, npt.NDArray[np.unsignedinteger[Any]])
+assert_type(AR_LIKE_i // AR_u, npt.NDArray[np.signedinteger[Any]])
+assert_type(AR_LIKE_f // AR_u, npt.NDArray[np.floating[Any]])
+assert_type(AR_LIKE_m // AR_u, npt.NDArray[np.timedelta64])
+assert_type(AR_LIKE_O // AR_u, Any)
+
+assert_type(AR_i // AR_LIKE_b, npt.NDArray[np.signedinteger[Any]])
+assert_type(AR_i // AR_LIKE_u, npt.NDArray[np.signedinteger[Any]])
+assert_type(AR_i // AR_LIKE_i, npt.NDArray[np.signedinteger[Any]])
+assert_type(AR_i // AR_LIKE_f, npt.NDArray[np.floating[Any]])
+assert_type(AR_i // AR_LIKE_O, Any)
+
+assert_type(AR_LIKE_b // AR_i, npt.NDArray[np.signedinteger[Any]])
+assert_type(AR_LIKE_u // AR_i, npt.NDArray[np.signedinteger[Any]])
+assert_type(AR_LIKE_i // AR_i, npt.NDArray[np.signedinteger[Any]])
+assert_type(AR_LIKE_f // AR_i, npt.NDArray[np.floating[Any]])
+assert_type(AR_LIKE_m // AR_i, npt.NDArray[np.timedelta64])
+assert_type(AR_LIKE_O // AR_i, Any)
+
+assert_type(AR_f // AR_LIKE_b, npt.NDArray[np.floating[Any]])
+assert_type(AR_f // AR_LIKE_u, npt.NDArray[np.floating[Any]])
+assert_type(AR_f // AR_LIKE_i, npt.NDArray[np.floating[Any]])
+assert_type(AR_f // AR_LIKE_f, npt.NDArray[np.floating[Any]])
+assert_type(AR_f // AR_LIKE_O, Any)
+
+assert_type(AR_LIKE_b // AR_f, npt.NDArray[np.floating[Any]])
+assert_type(AR_LIKE_u // AR_f, npt.NDArray[np.floating[Any]])
+assert_type(AR_LIKE_i // AR_f, npt.NDArray[np.floating[Any]])
+assert_type(AR_LIKE_f // AR_f, npt.NDArray[np.floating[Any]])
+assert_type(AR_LIKE_m // AR_f, npt.NDArray[np.timedelta64])
+assert_type(AR_LIKE_O // AR_f, Any)
+
+assert_type(AR_m // AR_LIKE_u, npt.NDArray[np.timedelta64])
+assert_type(AR_m // AR_LIKE_i, npt.NDArray[np.timedelta64])
+assert_type(AR_m // AR_LIKE_f, npt.NDArray[np.timedelta64])
+assert_type(AR_m // AR_LIKE_m, npt.NDArray[np.int64])
+assert_type(AR_m // AR_LIKE_O, Any)
+
+assert_type(AR_LIKE_m // AR_m, npt.NDArray[np.int64])
+assert_type(AR_LIKE_O // AR_m, Any)
+
+assert_type(AR_O // AR_LIKE_b, Any)
+assert_type(AR_O // AR_LIKE_u, Any)
+assert_type(AR_O // AR_LIKE_i, Any)
+assert_type(AR_O // AR_LIKE_f, Any)
+assert_type(AR_O // AR_LIKE_m, Any)
+assert_type(AR_O // AR_LIKE_M, Any)
+assert_type(AR_O // AR_LIKE_O, Any)
+
+assert_type(AR_LIKE_b // AR_O, Any)
+assert_type(AR_LIKE_u // AR_O, Any)
+assert_type(AR_LIKE_i // AR_O, Any)
+assert_type(AR_LIKE_f // AR_O, Any)
+assert_type(AR_LIKE_m // AR_O, Any)
+assert_type(AR_LIKE_M // AR_O, Any)
+assert_type(AR_LIKE_O // AR_O, Any)
+
+# unary ops
+
+assert_type(-f16, np.floating[_128Bit])
+assert_type(-c16, np.complex128)
+assert_type(-c8, np.complex64)
+assert_type(-f8, np.float64)
+assert_type(-f4, np.float32)
+assert_type(-i8, np.int64)
+assert_type(-i4, np.int32)
+assert_type(-u8, np.uint64)
+assert_type(-u4, np.uint32)
+assert_type(-td, np.timedelta64)
+assert_type(-AR_f, npt.NDArray[np.float64])
+
+assert_type(+f16, np.floating[_128Bit])
+assert_type(+c16, np.complex128)
+assert_type(+c8, np.complex64)
+assert_type(+f8, np.float64)
+assert_type(+f4, np.float32)
+assert_type(+i8, np.int64)
+assert_type(+i4, np.int32)
+assert_type(+u8, np.uint64)
+assert_type(+u4, np.uint32)
+assert_type(+td, np.timedelta64)
+assert_type(+AR_f, npt.NDArray[np.float64])
+
+assert_type(abs(f16), np.floating[_128Bit])
+assert_type(abs(c16), np.float64)
+assert_type(abs(c8), np.float32)
+assert_type(abs(f8), np.float64)
+assert_type(abs(f4), np.float32)
+assert_type(abs(i8), np.int64)
+assert_type(abs(i4), np.int32)
+assert_type(abs(u8), np.uint64)
+assert_type(abs(u4), np.uint32)
+assert_type(abs(td), np.timedelta64)
+assert_type(abs(b_), np.bool_)
+
+# Time structures
+
+assert_type(dt + td, np.datetime64)
+assert_type(dt + i, np.datetime64)
+assert_type(dt + i4, np.datetime64)
+assert_type(dt + i8, np.datetime64)
+assert_type(dt - dt, np.timedelta64)
+assert_type(dt - i, np.datetime64)
+assert_type(dt - i4, np.datetime64)
+assert_type(dt - i8, np.datetime64)
+
+assert_type(td + td, np.timedelta64)
+assert_type(td + i, np.timedelta64)
+assert_type(td + i4, np.timedelta64)
+assert_type(td + i8, np.timedelta64)
+assert_type(td - td, np.timedelta64)
+assert_type(td - i, np.timedelta64)
+assert_type(td - i4, np.timedelta64)
+assert_type(td - i8, np.timedelta64)
+assert_type(td / f, np.timedelta64)
+assert_type(td / f4, np.timedelta64)
+assert_type(td / f8, np.timedelta64)
+assert_type(td / td, np.float64)
+assert_type(td // td, np.int64)
+
+# boolean
+
+assert_type(b_ / b, np.float64)
+assert_type(b_ / b_, np.float64)
+assert_type(b_ / i, np.float64)
+assert_type(b_ / i8, np.float64)
+assert_type(b_ / i4, np.float64)
+assert_type(b_ / u8, np.float64)
+assert_type(b_ / u4, np.float64)
+assert_type(b_ / f, np.float64)
+assert_type(b_ / f16, np.floating[_128Bit])
+assert_type(b_ / f8, np.float64)
+assert_type(b_ / f4, np.float32)
+assert_type(b_ / c, np.complex128)
+assert_type(b_ / c16, np.complex128)
+assert_type(b_ / c8, np.complex64)
+
+assert_type(b / b_, np.float64)
+assert_type(b_ / b_, np.float64)
+assert_type(i / b_, np.float64)
+assert_type(i8 / b_, np.float64)
+assert_type(i4 / b_, np.float64)
+assert_type(u8 / b_, np.float64)
+assert_type(u4 / b_, np.float64)
+assert_type(f / b_, np.float64)
+assert_type(f16 / b_, np.floating[_128Bit])
+assert_type(f8 / b_, np.float64)
+assert_type(f4 / b_, np.float32)
+assert_type(c / b_, np.complex128)
+assert_type(c16 / b_, np.complex128)
+assert_type(c8 / b_, np.complex64)
+
+# Complex
+
+assert_type(c16 + f16, np.complexfloating[_64Bit | _128Bit, _64Bit | _128Bit])
+assert_type(c16 + c16, np.complex128)
+assert_type(c16 + f8, np.complex128)
+assert_type(c16 + i8, np.complex128)
+assert_type(c16 + c8, np.complexfloating[_32Bit | _64Bit, _32Bit | _64Bit])
+assert_type(c16 + f4, np.complexfloating[_32Bit | _64Bit, _32Bit | _64Bit])
+assert_type(c16 + i4, np.complexfloating[_32Bit | _64Bit, _32Bit | _64Bit])
+assert_type(c16 + b_, np.complex128)
+assert_type(c16 + b, np.complex128)
+assert_type(c16 + c, np.complex128)
+assert_type(c16 + f, np.complex128)
+assert_type(c16 + AR_f, npt.NDArray[np.complexfloating[Any, Any]])
+
+assert_type(f16 + c16, np.complexfloating[_64Bit | _128Bit, _64Bit | _128Bit])
+assert_type(c16 + c16, np.complex128)
+assert_type(f8 + c16, np.complex128)
+assert_type(i8 + c16, np.complex128)
+assert_type(c8 + c16, np.complexfloating[_32Bit | _64Bit, _32Bit | _64Bit])
+assert_type(f4 + c16, np.complexfloating[_32Bit | _64Bit, _32Bit | _64Bit])
+assert_type(i4 + c16, np.complexfloating[_32Bit | _64Bit, _32Bit | _64Bit])
+assert_type(b_ + c16, np.complex128)
+assert_type(b + c16, np.complex128)
+assert_type(c + c16, np.complex128)
+assert_type(f + c16, np.complex128)
+assert_type(AR_f + c16, npt.NDArray[np.complexfloating[Any, Any]])
+
+assert_type(c8 + f16, np.complexfloating[_32Bit | _128Bit, _32Bit | _128Bit])
+assert_type(c8 + c16, np.complexfloating[_32Bit | _64Bit, _32Bit | _64Bit])
+assert_type(c8 + f8, np.complexfloating[_32Bit | _64Bit, _32Bit | _64Bit])
+assert_type(c8 + i8, np.complexfloating[_32Bit | _64Bit, _32Bit | _64Bit])
+assert_type(c8 + c8, np.complex64)
+assert_type(c8 + f4, np.complex64)
+assert_type(c8 + i4, np.complex64)
+assert_type(c8 + b_, np.complex64)
+assert_type(c8 + b, np.complex64)
+assert_type(c8 + c, np.complexfloating[_32Bit | _64Bit, _32Bit | _64Bit])
+assert_type(c8 + f, np.complexfloating[_32Bit | _64Bit, _32Bit | _64Bit])
+assert_type(c8 + AR_f, npt.NDArray[np.complexfloating[Any, Any]])
+
+assert_type(f16 + c8, np.complexfloating[_32Bit | _128Bit, _32Bit | _128Bit])
+assert_type(c16 + c8, np.complexfloating[_32Bit | _64Bit, _32Bit | _64Bit])
+assert_type(f8 + c8, np.complexfloating[_32Bit | _64Bit, _32Bit | _64Bit])
+assert_type(i8 + c8, np.complexfloating[_32Bit | _64Bit, _32Bit | _64Bit])
+assert_type(c8 + c8, np.complex64)
+assert_type(f4 + c8, np.complex64)
+assert_type(i4 + c8, np.complex64)
+assert_type(b_ + c8, np.complex64)
+assert_type(b + c8, np.complex64)
+assert_type(c + c8, np.complexfloating[_32Bit | _64Bit, _32Bit | _64Bit])
+assert_type(f + c8, np.complexfloating[_32Bit | _64Bit, _32Bit | _64Bit])
+assert_type(AR_f + c8, npt.NDArray[np.complexfloating[Any, Any]])
+
+# Float
+
+assert_type(f8 + f16, np.floating[_64Bit | _128Bit])
+assert_type(f8 + f8, np.float64)
+assert_type(f8 + i8, np.float64)
+assert_type(f8 + f4, np.floating[_32Bit | _64Bit])
+assert_type(f8 + i4, np.floating[_32Bit | _64Bit])
+assert_type(f8 + b_, np.float64)
+assert_type(f8 + b, np.float64)
+assert_type(f8 + c, np.complex128)
+assert_type(f8 + f, np.float64)
+assert_type(f8 + AR_f, npt.NDArray[np.floating[Any]])
+
+assert_type(f16 + f8, np.floating[_64Bit | _128Bit])
+assert_type(f8 + f8, np.float64)
+assert_type(i8 + f8, np.float64)
+assert_type(f4 + f8, np.floating[_32Bit | _64Bit])
+assert_type(i4 + f8, np.floating[_32Bit | _64Bit])
+assert_type(b_ + f8, np.float64)
+assert_type(b + f8, np.float64)
+assert_type(c + f8, np.complex128)
+assert_type(f + f8, np.float64)
+assert_type(AR_f + f8, npt.NDArray[np.floating[Any]])
+
+assert_type(f4 + f16, np.floating[_32Bit | _128Bit])
+assert_type(f4 + f8, np.floating[_32Bit | _64Bit])
+assert_type(f4 + i8, np.floating[_32Bit | _64Bit])
+assert_type(f4 + f4, np.float32)
+assert_type(f4 + i4, np.float32)
+assert_type(f4 + b_, np.float32)
+assert_type(f4 + b, np.float32)
+assert_type(f4 + c, np.complexfloating[_32Bit | _64Bit, _32Bit | _64Bit])
+assert_type(f4 + f, np.floating[_32Bit | _64Bit])
+assert_type(f4 + AR_f, npt.NDArray[np.floating[Any]])
+
+assert_type(f16 + f4, np.floating[_32Bit | _128Bit])
+assert_type(f8 + f4, np.floating[_32Bit | _64Bit])
+assert_type(i8 + f4, np.floating[_32Bit | _64Bit])
+assert_type(f4 + f4, np.float32)
+assert_type(i4 + f4, np.float32)
+assert_type(b_ + f4, np.float32)
+assert_type(b + f4, np.float32)
+assert_type(c + f4, np.complexfloating[_32Bit | _64Bit, _32Bit | _64Bit])
+assert_type(f + f4, np.floating[_32Bit | _64Bit])
+assert_type(AR_f + f4, npt.NDArray[np.floating[Any]])
+
+# Int
+
+assert_type(i8 + i8, np.int64)
+assert_type(i8 + u8, Any)
+assert_type(i8 + i4, np.signedinteger[_32Bit | _64Bit])
+assert_type(i8 + u4, Any)
+assert_type(i8 + b_, np.int64)
+assert_type(i8 + b, np.int64)
+assert_type(i8 + c, np.complex128)
+assert_type(i8 + f, np.float64)
+assert_type(i8 + AR_f, npt.NDArray[np.floating[Any]])
+
+assert_type(u8 + u8, np.uint64)
+assert_type(u8 + i4, Any)
+assert_type(u8 + u4, np.unsignedinteger[_32Bit | _64Bit])
+assert_type(u8 + b_, np.uint64)
+assert_type(u8 + b, np.uint64)
+assert_type(u8 + c, np.complex128)
+assert_type(u8 + f, np.float64)
+assert_type(u8 + AR_f, npt.NDArray[np.floating[Any]])
+
+assert_type(i8 + i8, np.int64)
+assert_type(u8 + i8, Any)
+assert_type(i4 + i8, np.signedinteger[_32Bit | _64Bit])
+assert_type(u4 + i8, Any)
+assert_type(b_ + i8, np.int64)
+assert_type(b + i8, np.int64)
+assert_type(c + i8, np.complex128)
+assert_type(f + i8, np.float64)
+assert_type(AR_f + i8, npt.NDArray[np.floating[Any]])
+
+assert_type(u8 + u8, np.uint64)
+assert_type(i4 + u8, Any)
+assert_type(u4 + u8, np.unsignedinteger[_32Bit | _64Bit])
+assert_type(b_ + u8, np.uint64)
+assert_type(b + u8, np.uint64)
+assert_type(c + u8, np.complex128)
+assert_type(f + u8, np.float64)
+assert_type(AR_f + u8, npt.NDArray[np.floating[Any]])
+
+assert_type(i4 + i8, np.signedinteger[_32Bit | _64Bit])
+assert_type(i4 + i4, np.int32)
+assert_type(i4 + b_, np.int32)
+assert_type(i4 + b, np.int32)
+assert_type(i4 + AR_f, npt.NDArray[np.floating[Any]])
+
+assert_type(u4 + i8, Any)
+assert_type(u4 + i4, Any)
+assert_type(u4 + u8, np.unsignedinteger[_32Bit | _64Bit])
+assert_type(u4 + u4, np.uint32)
+assert_type(u4 + b_, np.uint32)
+assert_type(u4 + b, np.uint32)
+assert_type(u4 + AR_f, npt.NDArray[np.floating[Any]])
+
+assert_type(i8 + i4, np.signedinteger[_32Bit | _64Bit])
+assert_type(i4 + i4, np.int32)
+assert_type(b_ + i4, np.int32)
+assert_type(b + i4, np.int32)
+assert_type(AR_f + i4, npt.NDArray[np.floating[Any]])
+
+assert_type(i8 + u4, Any)
+assert_type(i4 + u4, Any)
+assert_type(u8 + u4, np.unsignedinteger[_32Bit | _64Bit])
+assert_type(u4 + u4, np.uint32)
+assert_type(b_ + u4, np.uint32)
+assert_type(b + u4, np.uint32)
+assert_type(AR_f + u4, npt.NDArray[np.floating[Any]])
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/array_constructors.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/array_constructors.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..0bfbc63093a331accc4339347b48004aec683c9f
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/array_constructors.pyi
@@ -0,0 +1,221 @@
+import sys
+from typing import Any, TypeVar
+from pathlib import Path
+from collections import deque
+
+import numpy as np
+import numpy.typing as npt
+
+if sys.version_info >= (3, 11):
+    from typing import assert_type
+else:
+    from typing_extensions import assert_type
+
+_SCT = TypeVar("_SCT", bound=np.generic, covariant=True)
+
+class SubClass(np.ndarray[Any, np.dtype[_SCT]]): ...
+
+i8: np.int64
+
+A: npt.NDArray[np.float64]
+B: SubClass[np.float64]
+C: list[int]
+
+def func(i: int, j: int, **kwargs: Any) -> SubClass[np.float64]: ...
+
+assert_type(np.empty_like(A), npt.NDArray[np.float64])
+assert_type(np.empty_like(B), SubClass[np.float64])
+assert_type(np.empty_like([1, 1.0]), npt.NDArray[Any])
+assert_type(np.empty_like(A, dtype=np.int64), npt.NDArray[np.int64])
+assert_type(np.empty_like(A, dtype='c16'), npt.NDArray[Any])
+
+assert_type(np.array(A), npt.NDArray[np.float64])
+assert_type(np.array(B), npt.NDArray[np.float64])
+assert_type(np.array(B, subok=True), SubClass[np.float64])
+assert_type(np.array([1, 1.0]), npt.NDArray[Any])
+assert_type(np.array(deque([1, 2, 3])), npt.NDArray[Any])
+assert_type(np.array(A, dtype=np.int64), npt.NDArray[np.int64])
+assert_type(np.array(A, dtype='c16'), npt.NDArray[Any])
+assert_type(np.array(A, like=A), npt.NDArray[np.float64])
+
+assert_type(np.zeros([1, 5, 6]), npt.NDArray[np.float64])
+assert_type(np.zeros([1, 5, 6], dtype=np.int64), npt.NDArray[np.int64])
+assert_type(np.zeros([1, 5, 6], dtype='c16'), npt.NDArray[Any])
+
+assert_type(np.empty([1, 5, 6]), npt.NDArray[np.float64])
+assert_type(np.empty([1, 5, 6], dtype=np.int64), npt.NDArray[np.int64])
+assert_type(np.empty([1, 5, 6], dtype='c16'), npt.NDArray[Any])
+
+assert_type(np.concatenate(A), npt.NDArray[np.float64])
+assert_type(np.concatenate([A, A]), Any)
+assert_type(np.concatenate([[1], A]), npt.NDArray[Any])
+assert_type(np.concatenate([[1], [1]]), npt.NDArray[Any])
+assert_type(np.concatenate((A, A)), npt.NDArray[np.float64])
+assert_type(np.concatenate(([1], [1])), npt.NDArray[Any])
+assert_type(np.concatenate([1, 1.0]), npt.NDArray[Any])
+assert_type(np.concatenate(A, dtype=np.int64), npt.NDArray[np.int64])
+assert_type(np.concatenate(A, dtype='c16'), npt.NDArray[Any])
+assert_type(np.concatenate([1, 1.0], out=A), npt.NDArray[np.float64])
+
+assert_type(np.asarray(A), npt.NDArray[np.float64])
+assert_type(np.asarray(B), npt.NDArray[np.float64])
+assert_type(np.asarray([1, 1.0]), npt.NDArray[Any])
+assert_type(np.asarray(A, dtype=np.int64), npt.NDArray[np.int64])
+assert_type(np.asarray(A, dtype='c16'), npt.NDArray[Any])
+
+assert_type(np.asanyarray(A), npt.NDArray[np.float64])
+assert_type(np.asanyarray(B), SubClass[np.float64])
+assert_type(np.asanyarray([1, 1.0]), npt.NDArray[Any])
+assert_type(np.asanyarray(A, dtype=np.int64), npt.NDArray[np.int64])
+assert_type(np.asanyarray(A, dtype='c16'), npt.NDArray[Any])
+
+assert_type(np.ascontiguousarray(A), npt.NDArray[np.float64])
+assert_type(np.ascontiguousarray(B), npt.NDArray[np.float64])
+assert_type(np.ascontiguousarray([1, 1.0]), npt.NDArray[Any])
+assert_type(np.ascontiguousarray(A, dtype=np.int64), npt.NDArray[np.int64])
+assert_type(np.ascontiguousarray(A, dtype='c16'), npt.NDArray[Any])
+
+assert_type(np.asfortranarray(A), npt.NDArray[np.float64])
+assert_type(np.asfortranarray(B), npt.NDArray[np.float64])
+assert_type(np.asfortranarray([1, 1.0]), npt.NDArray[Any])
+assert_type(np.asfortranarray(A, dtype=np.int64), npt.NDArray[np.int64])
+assert_type(np.asfortranarray(A, dtype='c16'), npt.NDArray[Any])
+
+assert_type(np.fromstring("1 1 1", sep=" "), npt.NDArray[np.float64])
+assert_type(np.fromstring(b"1 1 1", sep=" "), npt.NDArray[np.float64])
+assert_type(np.fromstring("1 1 1", dtype=np.int64, sep=" "), npt.NDArray[np.int64])
+assert_type(np.fromstring(b"1 1 1", dtype=np.int64, sep=" "), npt.NDArray[np.int64])
+assert_type(np.fromstring("1 1 1", dtype="c16", sep=" "), npt.NDArray[Any])
+assert_type(np.fromstring(b"1 1 1", dtype="c16", sep=" "), npt.NDArray[Any])
+
+assert_type(np.fromfile("test.txt", sep=" "), npt.NDArray[np.float64])
+assert_type(np.fromfile("test.txt", dtype=np.int64, sep=" "), npt.NDArray[np.int64])
+assert_type(np.fromfile("test.txt", dtype="c16", sep=" "), npt.NDArray[Any])
+with open("test.txt") as f:
+    assert_type(np.fromfile(f, sep=" "), npt.NDArray[np.float64])
+    assert_type(np.fromfile(b"test.txt", sep=" "), npt.NDArray[np.float64])
+    assert_type(np.fromfile(Path("test.txt"), sep=" "), npt.NDArray[np.float64])
+
+assert_type(np.fromiter("12345", np.float64), npt.NDArray[np.float64])
+assert_type(np.fromiter("12345", float), npt.NDArray[Any])
+
+assert_type(np.frombuffer(A), npt.NDArray[np.float64])
+assert_type(np.frombuffer(A, dtype=np.int64), npt.NDArray[np.int64])
+assert_type(np.frombuffer(A, dtype="c16"), npt.NDArray[Any])
+
+assert_type(np.arange(False, True), npt.NDArray[np.signedinteger[Any]])
+assert_type(np.arange(10), npt.NDArray[np.signedinteger[Any]])
+assert_type(np.arange(0, 10, step=2), npt.NDArray[np.signedinteger[Any]])
+assert_type(np.arange(10.0), npt.NDArray[np.floating[Any]])
+assert_type(np.arange(start=0, stop=10.0), npt.NDArray[np.floating[Any]])
+assert_type(np.arange(np.timedelta64(0)), npt.NDArray[np.timedelta64])
+assert_type(np.arange(0, np.timedelta64(10)), npt.NDArray[np.timedelta64])
+assert_type(np.arange(np.datetime64("0"), np.datetime64("10")), npt.NDArray[np.datetime64])
+assert_type(np.arange(10, dtype=np.float64), npt.NDArray[np.float64])
+assert_type(np.arange(0, 10, step=2, dtype=np.int16), npt.NDArray[np.int16])
+assert_type(np.arange(10, dtype=int), npt.NDArray[Any])
+assert_type(np.arange(0, 10, dtype="f8"), npt.NDArray[Any])
+
+assert_type(np.require(A), npt.NDArray[np.float64])
+assert_type(np.require(B), SubClass[np.float64])
+assert_type(np.require(B, requirements=None), SubClass[np.float64])
+assert_type(np.require(B, dtype=int), np.ndarray[Any, Any])
+assert_type(np.require(B, requirements="E"), np.ndarray[Any, Any])
+assert_type(np.require(B, requirements=["ENSUREARRAY"]), np.ndarray[Any, Any])
+assert_type(np.require(B, requirements={"F", "E"}), np.ndarray[Any, Any])
+assert_type(np.require(B, requirements=["C", "OWNDATA"]), SubClass[np.float64])
+assert_type(np.require(B, requirements="W"), SubClass[np.float64])
+assert_type(np.require(B, requirements="A"), SubClass[np.float64])
+assert_type(np.require(C), np.ndarray[Any, Any])
+
+assert_type(np.linspace(0, 10), npt.NDArray[np.floating[Any]])
+assert_type(np.linspace(0, 10j), npt.NDArray[np.complexfloating[Any, Any]])
+assert_type(np.linspace(0, 10, dtype=np.int64), npt.NDArray[np.int64])
+assert_type(np.linspace(0, 10, dtype=int), npt.NDArray[Any])
+assert_type(np.linspace(0, 10, retstep=True), tuple[npt.NDArray[np.floating[Any]], np.floating[Any]])
+assert_type(np.linspace(0j, 10, retstep=True), tuple[npt.NDArray[np.complexfloating[Any, Any]], np.complexfloating[Any, Any]])
+assert_type(np.linspace(0, 10, retstep=True, dtype=np.int64), tuple[npt.NDArray[np.int64], np.int64])
+assert_type(np.linspace(0j, 10, retstep=True, dtype=int), tuple[npt.NDArray[Any], Any])
+
+assert_type(np.logspace(0, 10), npt.NDArray[np.floating[Any]])
+assert_type(np.logspace(0, 10j), npt.NDArray[np.complexfloating[Any, Any]])
+assert_type(np.logspace(0, 10, dtype=np.int64), npt.NDArray[np.int64])
+assert_type(np.logspace(0, 10, dtype=int), npt.NDArray[Any])
+
+assert_type(np.geomspace(0, 10), npt.NDArray[np.floating[Any]])
+assert_type(np.geomspace(0, 10j), npt.NDArray[np.complexfloating[Any, Any]])
+assert_type(np.geomspace(0, 10, dtype=np.int64), npt.NDArray[np.int64])
+assert_type(np.geomspace(0, 10, dtype=int), npt.NDArray[Any])
+
+assert_type(np.zeros_like(A), npt.NDArray[np.float64])
+assert_type(np.zeros_like(C), npt.NDArray[Any])
+assert_type(np.zeros_like(A, dtype=float), npt.NDArray[Any])
+assert_type(np.zeros_like(B), SubClass[np.float64])
+assert_type(np.zeros_like(B, dtype=np.int64), npt.NDArray[np.int64])
+
+assert_type(np.ones_like(A), npt.NDArray[np.float64])
+assert_type(np.ones_like(C), npt.NDArray[Any])
+assert_type(np.ones_like(A, dtype=float), npt.NDArray[Any])
+assert_type(np.ones_like(B), SubClass[np.float64])
+assert_type(np.ones_like(B, dtype=np.int64), npt.NDArray[np.int64])
+
+assert_type(np.full_like(A, i8), npt.NDArray[np.float64])
+assert_type(np.full_like(C, i8), npt.NDArray[Any])
+assert_type(np.full_like(A, i8, dtype=int), npt.NDArray[Any])
+assert_type(np.full_like(B, i8), SubClass[np.float64])
+assert_type(np.full_like(B, i8, dtype=np.int64), npt.NDArray[np.int64])
+
+assert_type(np.ones(1), npt.NDArray[np.float64])
+assert_type(np.ones([1, 1, 1]), npt.NDArray[np.float64])
+assert_type(np.ones(5, dtype=np.int64), npt.NDArray[np.int64])
+assert_type(np.ones(5, dtype=int), npt.NDArray[Any])
+
+assert_type(np.full(1, i8), npt.NDArray[Any])
+assert_type(np.full([1, 1, 1], i8), npt.NDArray[Any])
+assert_type(np.full(1, i8, dtype=np.float64), npt.NDArray[np.float64])
+assert_type(np.full(1, i8, dtype=float), npt.NDArray[Any])
+
+assert_type(np.indices([1, 2, 3]), npt.NDArray[np.int_])
+assert_type(np.indices([1, 2, 3], sparse=True), tuple[npt.NDArray[np.int_], ...])
+
+assert_type(np.fromfunction(func, (3, 5)), SubClass[np.float64])
+
+assert_type(np.identity(10), npt.NDArray[np.float64])
+assert_type(np.identity(10, dtype=np.int64), npt.NDArray[np.int64])
+assert_type(np.identity(10, dtype=int), npt.NDArray[Any])
+
+assert_type(np.atleast_1d(A), npt.NDArray[np.float64])
+assert_type(np.atleast_1d(C), npt.NDArray[Any])
+assert_type(np.atleast_1d(A, A), list[npt.NDArray[Any]])
+assert_type(np.atleast_1d(A, C), list[npt.NDArray[Any]])
+assert_type(np.atleast_1d(C, C), list[npt.NDArray[Any]])
+
+assert_type(np.atleast_2d(A), npt.NDArray[np.float64])
+
+assert_type(np.atleast_3d(A), npt.NDArray[np.float64])
+
+assert_type(np.vstack([A, A]), np.ndarray[Any, Any])
+assert_type(np.vstack([A, A], dtype=np.float64), npt.NDArray[np.float64])
+assert_type(np.vstack([A, C]), npt.NDArray[Any])
+assert_type(np.vstack([C, C]), npt.NDArray[Any])
+
+assert_type(np.hstack([A, A]), np.ndarray[Any, Any])
+assert_type(np.hstack([A, A], dtype=np.float64), npt.NDArray[np.float64])
+
+assert_type(np.stack([A, A]), Any)
+assert_type(np.stack([A, A], dtype=np.float64), npt.NDArray[np.float64])
+assert_type(np.stack([A, C]), npt.NDArray[Any])
+assert_type(np.stack([C, C]), npt.NDArray[Any])
+assert_type(np.stack([A, A], axis=0), Any)
+assert_type(np.stack([A, A], out=B), SubClass[np.float64])
+
+assert_type(np.block([[A, A], [A, A]]), npt.NDArray[Any])
+assert_type(np.block(C), npt.NDArray[Any])
+
+if sys.version_info >= (3, 12):
+    from collections.abc import Buffer
+
+    def create_array(obj: npt.ArrayLike) -> npt.NDArray[Any]: ...
+
+    buffer: Buffer
+    assert_type(create_array(buffer), npt.NDArray[Any])
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/arraypad.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/arraypad.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..f53613ba2fd4bb70ec28c0d38b2c4197232e5dce
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/arraypad.pyi
@@ -0,0 +1,28 @@
+import sys
+from collections.abc import Mapping
+from typing import Any, SupportsIndex
+
+import numpy as np
+import numpy.typing as npt
+
+if sys.version_info >= (3, 11):
+    from typing import assert_type
+else:
+    from typing_extensions import assert_type
+
+def mode_func(
+    ar: npt.NDArray[np.number[Any]],
+    width: tuple[int, int],
+    iaxis: SupportsIndex,
+    kwargs: Mapping[str, Any],
+) -> None: ...
+
+AR_i8: npt.NDArray[np.int64]
+AR_f8: npt.NDArray[np.float64]
+AR_LIKE: list[int]
+
+assert_type(np.pad(AR_i8, (2, 3), "constant"), npt.NDArray[np.int64])
+assert_type(np.pad(AR_LIKE, (2, 3), "constant"), npt.NDArray[Any])
+
+assert_type(np.pad(AR_f8, (2, 3), mode_func), npt.NDArray[np.float64])
+assert_type(np.pad(AR_f8, (2, 3), mode_func, a=1, b=2), npt.NDArray[np.float64])
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/arrayprint.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/arrayprint.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..8f41bd2fe8be4152e428e5f0ed17f776cc23e70a
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/arrayprint.pyi
@@ -0,0 +1,30 @@
+import sys
+import contextlib
+from collections.abc import Callable
+from typing import Any
+
+import numpy as np
+from numpy.core.arrayprint import _FormatOptions
+
+if sys.version_info >= (3, 11):
+    from typing import assert_type
+else:
+    from typing_extensions import assert_type
+
+AR: np.ndarray[Any, Any]
+func_float: Callable[[np.floating[Any]], str]
+func_int: Callable[[np.integer[Any]], str]
+
+assert_type(np.get_printoptions(), _FormatOptions)
+assert_type(
+    np.array2string(AR, formatter={'float_kind': func_float, 'int_kind': func_int}),
+    str,
+)
+assert_type(np.format_float_scientific(1.0), str)
+assert_type(np.format_float_positional(1), str)
+assert_type(np.array_repr(AR), str)
+assert_type(np.array_str(AR), str)
+
+assert_type(np.printoptions(), contextlib._GeneratorContextManager[_FormatOptions])
+with np.printoptions() as dct:
+    assert_type(dct, _FormatOptions)
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/arraysetops.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/arraysetops.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..877ea667d5202ca06a5e00f3cf75f109585942b1
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/arraysetops.pyi
@@ -0,0 +1,68 @@
+import sys
+from typing import Any
+
+import numpy as np
+import numpy.typing as npt
+
+if sys.version_info >= (3, 11):
+    from typing import assert_type
+else:
+    from typing_extensions import assert_type
+
+AR_b: npt.NDArray[np.bool_]
+AR_i8: npt.NDArray[np.int64]
+AR_f8: npt.NDArray[np.float64]
+AR_M: npt.NDArray[np.datetime64]
+AR_O: npt.NDArray[np.object_]
+
+AR_LIKE_f8: list[float]
+
+assert_type(np.ediff1d(AR_b), npt.NDArray[np.int8])
+assert_type(np.ediff1d(AR_i8, to_end=[1, 2, 3]), npt.NDArray[np.int64])
+assert_type(np.ediff1d(AR_M), npt.NDArray[np.timedelta64])
+assert_type(np.ediff1d(AR_O), npt.NDArray[np.object_])
+assert_type(np.ediff1d(AR_LIKE_f8, to_begin=[1, 1.5]), npt.NDArray[Any])
+
+assert_type(np.intersect1d(AR_i8, AR_i8), npt.NDArray[np.int64])
+assert_type(np.intersect1d(AR_M, AR_M, assume_unique=True), npt.NDArray[np.datetime64])
+assert_type(np.intersect1d(AR_f8, AR_i8), npt.NDArray[Any])
+assert_type(np.intersect1d(AR_f8, AR_f8, return_indices=True), tuple[npt.NDArray[np.float64], npt.NDArray[np.intp], npt.NDArray[np.intp]])
+
+assert_type(np.setxor1d(AR_i8, AR_i8), npt.NDArray[np.int64])
+assert_type(np.setxor1d(AR_M, AR_M, assume_unique=True), npt.NDArray[np.datetime64])
+assert_type(np.setxor1d(AR_f8, AR_i8), npt.NDArray[Any])
+
+assert_type(np.in1d(AR_i8, AR_i8), npt.NDArray[np.bool_])
+assert_type(np.in1d(AR_M, AR_M, assume_unique=True), npt.NDArray[np.bool_])
+assert_type(np.in1d(AR_f8, AR_i8), npt.NDArray[np.bool_])
+assert_type(np.in1d(AR_f8, AR_LIKE_f8, invert=True), npt.NDArray[np.bool_])
+
+assert_type(np.isin(AR_i8, AR_i8), npt.NDArray[np.bool_])
+assert_type(np.isin(AR_M, AR_M, assume_unique=True), npt.NDArray[np.bool_])
+assert_type(np.isin(AR_f8, AR_i8), npt.NDArray[np.bool_])
+assert_type(np.isin(AR_f8, AR_LIKE_f8, invert=True), npt.NDArray[np.bool_])
+
+assert_type(np.union1d(AR_i8, AR_i8), npt.NDArray[np.int64])
+assert_type(np.union1d(AR_M, AR_M), npt.NDArray[np.datetime64])
+assert_type(np.union1d(AR_f8, AR_i8), npt.NDArray[Any])
+
+assert_type(np.setdiff1d(AR_i8, AR_i8), npt.NDArray[np.int64])
+assert_type(np.setdiff1d(AR_M, AR_M, assume_unique=True), npt.NDArray[np.datetime64])
+assert_type(np.setdiff1d(AR_f8, AR_i8), npt.NDArray[Any])
+
+assert_type(np.unique(AR_f8), npt.NDArray[np.float64])
+assert_type(np.unique(AR_LIKE_f8, axis=0), npt.NDArray[Any])
+assert_type(np.unique(AR_f8, return_index=True), tuple[npt.NDArray[np.float64], npt.NDArray[np.intp]])
+assert_type(np.unique(AR_LIKE_f8, return_index=True), tuple[npt.NDArray[Any], npt.NDArray[np.intp]])
+assert_type(np.unique(AR_f8, return_inverse=True), tuple[npt.NDArray[np.float64], npt.NDArray[np.intp]])
+assert_type(np.unique(AR_LIKE_f8, return_inverse=True), tuple[npt.NDArray[Any], npt.NDArray[np.intp]])
+assert_type(np.unique(AR_f8, return_counts=True), tuple[npt.NDArray[np.float64], npt.NDArray[np.intp]])
+assert_type(np.unique(AR_LIKE_f8, return_counts=True), tuple[npt.NDArray[Any], npt.NDArray[np.intp]])
+assert_type(np.unique(AR_f8, return_index=True, return_inverse=True), tuple[npt.NDArray[np.float64], npt.NDArray[np.intp], npt.NDArray[np.intp]])
+assert_type(np.unique(AR_LIKE_f8, return_index=True, return_inverse=True), tuple[npt.NDArray[Any], npt.NDArray[np.intp], npt.NDArray[np.intp]])
+assert_type(np.unique(AR_f8, return_index=True, return_counts=True), tuple[npt.NDArray[np.float64], npt.NDArray[np.intp], npt.NDArray[np.intp]])
+assert_type(np.unique(AR_LIKE_f8, return_index=True, return_counts=True), tuple[npt.NDArray[Any], npt.NDArray[np.intp], npt.NDArray[np.intp]])
+assert_type(np.unique(AR_f8, return_inverse=True, return_counts=True), tuple[npt.NDArray[np.float64], npt.NDArray[np.intp], npt.NDArray[np.intp]])
+assert_type(np.unique(AR_LIKE_f8, return_inverse=True, return_counts=True), tuple[npt.NDArray[Any], npt.NDArray[np.intp], npt.NDArray[np.intp]])
+assert_type(np.unique(AR_f8, return_index=True, return_inverse=True, return_counts=True), tuple[npt.NDArray[np.float64], npt.NDArray[np.intp], npt.NDArray[np.intp], npt.NDArray[np.intp]])
+assert_type(np.unique(AR_LIKE_f8, return_index=True, return_inverse=True, return_counts=True), tuple[npt.NDArray[Any], npt.NDArray[np.intp], npt.NDArray[np.intp], npt.NDArray[np.intp]])
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/arrayterator.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/arrayterator.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..7988b5c0c767ad6280db016b1aa56adc721826d6
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/arrayterator.pyi
@@ -0,0 +1,33 @@
+import sys
+from typing import Any
+from collections.abc import Generator
+
+import numpy as np
+import numpy.typing as npt
+
+if sys.version_info >= (3, 11):
+    from typing import assert_type
+else:
+    from typing_extensions import assert_type
+
+AR_i8: np.ndarray[Any, np.dtype[np.int64]]
+ar_iter = np.lib.Arrayterator(AR_i8)
+
+assert_type(ar_iter.var, npt.NDArray[np.int64])
+assert_type(ar_iter.buf_size, None | int)
+assert_type(ar_iter.start, list[int])
+assert_type(ar_iter.stop, list[int])
+assert_type(ar_iter.step, list[int])
+assert_type(ar_iter.shape, tuple[int, ...])
+assert_type(ar_iter.flat, Generator[np.int64, None, None])
+
+assert_type(ar_iter.__array__(), npt.NDArray[np.int64])
+
+for i in ar_iter:
+    assert_type(i, npt.NDArray[np.int64])
+
+assert_type(ar_iter[0], np.lib.Arrayterator[Any, np.dtype[np.int64]])
+assert_type(ar_iter[...], np.lib.Arrayterator[Any, np.dtype[np.int64]])
+assert_type(ar_iter[:], np.lib.Arrayterator[Any, np.dtype[np.int64]])
+assert_type(ar_iter[0, 0, 0], np.lib.Arrayterator[Any, np.dtype[np.int64]])
+assert_type(ar_iter[..., 0, :], np.lib.Arrayterator[Any, np.dtype[np.int64]])
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/bitwise_ops.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/bitwise_ops.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..4c51ab7154bd44aa294755827861d347107352a0
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/bitwise_ops.pyi
@@ -0,0 +1,135 @@
+import sys
+from typing import Any
+
+import numpy as np
+import numpy.typing as npt
+from numpy._typing import _64Bit, _32Bit
+
+if sys.version_info >= (3, 11):
+    from typing import assert_type
+else:
+    from typing_extensions import assert_type
+
+i8 = np.int64(1)
+u8 = np.uint64(1)
+
+i4 = np.int32(1)
+u4 = np.uint32(1)
+
+b_ = np.bool_(1)
+
+b = bool(1)
+i = int(1)
+
+AR = np.array([0, 1, 2], dtype=np.int32)
+AR.setflags(write=False)
+
+
+assert_type(i8 << i8, np.int64)
+assert_type(i8 >> i8, np.int64)
+assert_type(i8 | i8, np.int64)
+assert_type(i8 ^ i8, np.int64)
+assert_type(i8 & i8, np.int64)
+
+assert_type(i8 << AR, npt.NDArray[np.signedinteger[Any]])
+assert_type(i8 >> AR, npt.NDArray[np.signedinteger[Any]])
+assert_type(i8 | AR, npt.NDArray[np.signedinteger[Any]])
+assert_type(i8 ^ AR, npt.NDArray[np.signedinteger[Any]])
+assert_type(i8 & AR, npt.NDArray[np.signedinteger[Any]])
+
+assert_type(i4 << i4, np.int32)
+assert_type(i4 >> i4, np.int32)
+assert_type(i4 | i4, np.int32)
+assert_type(i4 ^ i4, np.int32)
+assert_type(i4 & i4, np.int32)
+
+assert_type(i8 << i4, np.signedinteger[_32Bit | _64Bit])
+assert_type(i8 >> i4, np.signedinteger[_32Bit | _64Bit])
+assert_type(i8 | i4, np.signedinteger[_32Bit | _64Bit])
+assert_type(i8 ^ i4, np.signedinteger[_32Bit | _64Bit])
+assert_type(i8 & i4, np.signedinteger[_32Bit | _64Bit])
+
+assert_type(i8 << b_, np.int64)
+assert_type(i8 >> b_, np.int64)
+assert_type(i8 | b_, np.int64)
+assert_type(i8 ^ b_, np.int64)
+assert_type(i8 & b_, np.int64)
+
+assert_type(i8 << b, np.int64)
+assert_type(i8 >> b, np.int64)
+assert_type(i8 | b, np.int64)
+assert_type(i8 ^ b, np.int64)
+assert_type(i8 & b, np.int64)
+
+assert_type(u8 << u8, np.uint64)
+assert_type(u8 >> u8, np.uint64)
+assert_type(u8 | u8, np.uint64)
+assert_type(u8 ^ u8, np.uint64)
+assert_type(u8 & u8, np.uint64)
+
+assert_type(u8 << AR, npt.NDArray[np.signedinteger[Any]])
+assert_type(u8 >> AR, npt.NDArray[np.signedinteger[Any]])
+assert_type(u8 | AR, npt.NDArray[np.signedinteger[Any]])
+assert_type(u8 ^ AR, npt.NDArray[np.signedinteger[Any]])
+assert_type(u8 & AR, npt.NDArray[np.signedinteger[Any]])
+
+assert_type(u4 << u4, np.uint32)
+assert_type(u4 >> u4, np.uint32)
+assert_type(u4 | u4, np.uint32)
+assert_type(u4 ^ u4, np.uint32)
+assert_type(u4 & u4, np.uint32)
+
+assert_type(u4 << i4, np.signedinteger[Any])
+assert_type(u4 >> i4, np.signedinteger[Any])
+assert_type(u4 | i4, np.signedinteger[Any])
+assert_type(u4 ^ i4, np.signedinteger[Any])
+assert_type(u4 & i4, np.signedinteger[Any])
+
+assert_type(u4 << i, np.signedinteger[Any])
+assert_type(u4 >> i, np.signedinteger[Any])
+assert_type(u4 | i, np.signedinteger[Any])
+assert_type(u4 ^ i, np.signedinteger[Any])
+assert_type(u4 & i, np.signedinteger[Any])
+
+assert_type(u8 << b_, np.uint64)
+assert_type(u8 >> b_, np.uint64)
+assert_type(u8 | b_, np.uint64)
+assert_type(u8 ^ b_, np.uint64)
+assert_type(u8 & b_, np.uint64)
+
+assert_type(u8 << b, np.uint64)
+assert_type(u8 >> b, np.uint64)
+assert_type(u8 | b, np.uint64)
+assert_type(u8 ^ b, np.uint64)
+assert_type(u8 & b, np.uint64)
+
+assert_type(b_ << b_, np.int8)
+assert_type(b_ >> b_, np.int8)
+assert_type(b_ | b_, np.bool_)
+assert_type(b_ ^ b_, np.bool_)
+assert_type(b_ & b_, np.bool_)
+
+assert_type(b_ << AR, npt.NDArray[np.signedinteger[Any]])
+assert_type(b_ >> AR, npt.NDArray[np.signedinteger[Any]])
+assert_type(b_ | AR, npt.NDArray[np.signedinteger[Any]])
+assert_type(b_ ^ AR, npt.NDArray[np.signedinteger[Any]])
+assert_type(b_ & AR, npt.NDArray[np.signedinteger[Any]])
+
+assert_type(b_ << b, np.int8)
+assert_type(b_ >> b, np.int8)
+assert_type(b_ | b, np.bool_)
+assert_type(b_ ^ b, np.bool_)
+assert_type(b_ & b, np.bool_)
+
+assert_type(b_ << i, np.int_)
+assert_type(b_ >> i, np.int_)
+assert_type(b_ | i, np.int_)
+assert_type(b_ ^ i, np.int_)
+assert_type(b_ & i, np.int_)
+
+assert_type(~i8, np.int64)
+assert_type(~i4, np.int32)
+assert_type(~u8, np.uint64)
+assert_type(~u4, np.uint32)
+assert_type(~b_, np.bool_)
+assert_type(~AR, npt.NDArray[np.int32])
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/char.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/char.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..e15ed0801a0d9b70c0abdb0723df6793fae12046
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/char.pyi
@@ -0,0 +1,154 @@
+import sys
+from typing import Any
+
+import numpy as np
+import numpy.typing as npt
+
+if sys.version_info >= (3, 11):
+    from typing import assert_type
+else:
+    from typing_extensions import assert_type
+
+AR_U: npt.NDArray[np.str_]
+AR_S: npt.NDArray[np.bytes_]
+
+assert_type(np.char.equal(AR_U, AR_U), npt.NDArray[np.bool_])
+assert_type(np.char.equal(AR_S, AR_S), npt.NDArray[np.bool_])
+
+assert_type(np.char.not_equal(AR_U, AR_U), npt.NDArray[np.bool_])
+assert_type(np.char.not_equal(AR_S, AR_S), npt.NDArray[np.bool_])
+
+assert_type(np.char.greater_equal(AR_U, AR_U), npt.NDArray[np.bool_])
+assert_type(np.char.greater_equal(AR_S, AR_S), npt.NDArray[np.bool_])
+
+assert_type(np.char.less_equal(AR_U, AR_U), npt.NDArray[np.bool_])
+assert_type(np.char.less_equal(AR_S, AR_S), npt.NDArray[np.bool_])
+
+assert_type(np.char.greater(AR_U, AR_U), npt.NDArray[np.bool_])
+assert_type(np.char.greater(AR_S, AR_S), npt.NDArray[np.bool_])
+
+assert_type(np.char.less(AR_U, AR_U), npt.NDArray[np.bool_])
+assert_type(np.char.less(AR_S, AR_S), npt.NDArray[np.bool_])
+
+assert_type(np.char.multiply(AR_U, 5), npt.NDArray[np.str_])
+assert_type(np.char.multiply(AR_S, [5, 4, 3]), npt.NDArray[np.bytes_])
+
+assert_type(np.char.mod(AR_U, "test"), npt.NDArray[np.str_])
+assert_type(np.char.mod(AR_S, "test"), npt.NDArray[np.bytes_])
+
+assert_type(np.char.capitalize(AR_U), npt.NDArray[np.str_])
+assert_type(np.char.capitalize(AR_S), npt.NDArray[np.bytes_])
+
+assert_type(np.char.center(AR_U, 5), npt.NDArray[np.str_])
+assert_type(np.char.center(AR_S, [2, 3, 4], b"a"), npt.NDArray[np.bytes_])
+
+assert_type(np.char.encode(AR_U), npt.NDArray[np.bytes_])
+assert_type(np.char.decode(AR_S), npt.NDArray[np.str_])
+
+assert_type(np.char.expandtabs(AR_U), npt.NDArray[np.str_])
+assert_type(np.char.expandtabs(AR_S, tabsize=4), npt.NDArray[np.bytes_])
+
+assert_type(np.char.join(AR_U, "_"), npt.NDArray[np.str_])
+assert_type(np.char.join(AR_S, [b"_", b""]), npt.NDArray[np.bytes_])
+
+assert_type(np.char.ljust(AR_U, 5), npt.NDArray[np.str_])
+assert_type(np.char.ljust(AR_S, [4, 3, 1], fillchar=[b"a", b"b", b"c"]), npt.NDArray[np.bytes_])
+assert_type(np.char.rjust(AR_U, 5), npt.NDArray[np.str_])
+assert_type(np.char.rjust(AR_S, [4, 3, 1], fillchar=[b"a", b"b", b"c"]), npt.NDArray[np.bytes_])
+
+assert_type(np.char.lstrip(AR_U), npt.NDArray[np.str_])
+assert_type(np.char.lstrip(AR_S, chars=b"_"), npt.NDArray[np.bytes_])
+assert_type(np.char.rstrip(AR_U), npt.NDArray[np.str_])
+assert_type(np.char.rstrip(AR_S, chars=b"_"), npt.NDArray[np.bytes_])
+assert_type(np.char.strip(AR_U), npt.NDArray[np.str_])
+assert_type(np.char.strip(AR_S, chars=b"_"), npt.NDArray[np.bytes_])
+
+assert_type(np.char.partition(AR_U, "\n"), npt.NDArray[np.str_])
+assert_type(np.char.partition(AR_S, [b"a", b"b", b"c"]), npt.NDArray[np.bytes_])
+assert_type(np.char.rpartition(AR_U, "\n"), npt.NDArray[np.str_])
+assert_type(np.char.rpartition(AR_S, [b"a", b"b", b"c"]), npt.NDArray[np.bytes_])
+
+assert_type(np.char.replace(AR_U, "_", "-"), npt.NDArray[np.str_])
+assert_type(np.char.replace(AR_S, [b"_", b""], [b"a", b"b"]), npt.NDArray[np.bytes_])
+
+assert_type(np.char.split(AR_U, "_"), npt.NDArray[np.object_])
+assert_type(np.char.split(AR_S, maxsplit=[1, 2, 3]), npt.NDArray[np.object_])
+assert_type(np.char.rsplit(AR_U, "_"), npt.NDArray[np.object_])
+assert_type(np.char.rsplit(AR_S, maxsplit=[1, 2, 3]), npt.NDArray[np.object_])
+
+assert_type(np.char.splitlines(AR_U), npt.NDArray[np.object_])
+assert_type(np.char.splitlines(AR_S, keepends=[True, True, False]), npt.NDArray[np.object_])
+
+assert_type(np.char.swapcase(AR_U), npt.NDArray[np.str_])
+assert_type(np.char.swapcase(AR_S), npt.NDArray[np.bytes_])
+
+assert_type(np.char.title(AR_U), npt.NDArray[np.str_])
+assert_type(np.char.title(AR_S), npt.NDArray[np.bytes_])
+
+assert_type(np.char.upper(AR_U), npt.NDArray[np.str_])
+assert_type(np.char.upper(AR_S), npt.NDArray[np.bytes_])
+
+assert_type(np.char.zfill(AR_U, 5), npt.NDArray[np.str_])
+assert_type(np.char.zfill(AR_S, [2, 3, 4]), npt.NDArray[np.bytes_])
+
+assert_type(np.char.count(AR_U, "a", start=[1, 2, 3]), npt.NDArray[np.int_])
+assert_type(np.char.count(AR_S, [b"a", b"b", b"c"], end=9), npt.NDArray[np.int_])
+
+assert_type(np.char.endswith(AR_U, "a", start=[1, 2, 3]), npt.NDArray[np.bool_])
+assert_type(np.char.endswith(AR_S, [b"a", b"b", b"c"], end=9), npt.NDArray[np.bool_])
+assert_type(np.char.startswith(AR_U, "a", start=[1, 2, 3]), npt.NDArray[np.bool_])
+assert_type(np.char.startswith(AR_S, [b"a", b"b", b"c"], end=9), npt.NDArray[np.bool_])
+
+assert_type(np.char.find(AR_U, "a", start=[1, 2, 3]), npt.NDArray[np.int_])
+assert_type(np.char.find(AR_S, [b"a", b"b", b"c"], end=9), npt.NDArray[np.int_])
+assert_type(np.char.rfind(AR_U, "a", start=[1, 2, 3]), npt.NDArray[np.int_])
+assert_type(np.char.rfind(AR_S, [b"a", b"b", b"c"], end=9), npt.NDArray[np.int_])
+
+assert_type(np.char.index(AR_U, "a", start=[1, 2, 3]), npt.NDArray[np.int_])
+assert_type(np.char.index(AR_S, [b"a", b"b", b"c"], end=9), npt.NDArray[np.int_])
+assert_type(np.char.rindex(AR_U, "a", start=[1, 2, 3]), npt.NDArray[np.int_])
+assert_type(np.char.rindex(AR_S, [b"a", b"b", b"c"], end=9), npt.NDArray[np.int_])
+
+assert_type(np.char.isalpha(AR_U), npt.NDArray[np.bool_])
+assert_type(np.char.isalpha(AR_S), npt.NDArray[np.bool_])
+
+assert_type(np.char.isalnum(AR_U), npt.NDArray[np.bool_])
+assert_type(np.char.isalnum(AR_S), npt.NDArray[np.bool_])
+
+assert_type(np.char.isdecimal(AR_U), npt.NDArray[np.bool_])
+assert_type(np.char.isdecimal(AR_S), npt.NDArray[np.bool_])
+
+assert_type(np.char.isdigit(AR_U), npt.NDArray[np.bool_])
+assert_type(np.char.isdigit(AR_S), npt.NDArray[np.bool_])
+
+assert_type(np.char.islower(AR_U), npt.NDArray[np.bool_])
+assert_type(np.char.islower(AR_S), npt.NDArray[np.bool_])
+
+assert_type(np.char.isnumeric(AR_U), npt.NDArray[np.bool_])
+assert_type(np.char.isnumeric(AR_S), npt.NDArray[np.bool_])
+
+assert_type(np.char.isspace(AR_U), npt.NDArray[np.bool_])
+assert_type(np.char.isspace(AR_S), npt.NDArray[np.bool_])
+
+assert_type(np.char.istitle(AR_U), npt.NDArray[np.bool_])
+assert_type(np.char.istitle(AR_S), npt.NDArray[np.bool_])
+
+assert_type(np.char.isupper(AR_U), npt.NDArray[np.bool_])
+assert_type(np.char.isupper(AR_S), npt.NDArray[np.bool_])
+
+assert_type(np.char.str_len(AR_U), npt.NDArray[np.int_])
+assert_type(np.char.str_len(AR_S), npt.NDArray[np.int_])
+
+assert_type(np.char.array(AR_U), np.chararray[Any, np.dtype[np.str_]])
+assert_type(np.char.array(AR_S, order="K"), np.chararray[Any, np.dtype[np.bytes_]])
+assert_type(np.char.array("bob", copy=True), np.chararray[Any, np.dtype[np.str_]])
+assert_type(np.char.array(b"bob", itemsize=5), np.chararray[Any, np.dtype[np.bytes_]])
+assert_type(np.char.array(1, unicode=False), np.chararray[Any, np.dtype[np.bytes_]])
+assert_type(np.char.array(1, unicode=True), np.chararray[Any, np.dtype[np.str_]])
+
+assert_type(np.char.asarray(AR_U), np.chararray[Any, np.dtype[np.str_]])
+assert_type(np.char.asarray(AR_S, order="K"), np.chararray[Any, np.dtype[np.bytes_]])
+assert_type(np.char.asarray("bob"), np.chararray[Any, np.dtype[np.str_]])
+assert_type(np.char.asarray(b"bob", itemsize=5), np.chararray[Any, np.dtype[np.bytes_]])
+assert_type(np.char.asarray(1, unicode=False), np.chararray[Any, np.dtype[np.bytes_]])
+assert_type(np.char.asarray(1, unicode=True), np.chararray[Any, np.dtype[np.str_]])
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/chararray.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/chararray.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..4bcbeda2e6ad620a192060de2864c6e4d3f1d68c
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/chararray.pyi
@@ -0,0 +1,140 @@
+import sys
+from typing import Any
+
+import numpy as np
+import numpy.typing as npt
+
+if sys.version_info >= (3, 11):
+    from typing import assert_type
+else:
+    from typing_extensions import assert_type
+
+AR_U: np.chararray[Any, np.dtype[np.str_]]
+AR_S: np.chararray[Any, np.dtype[np.bytes_]]
+
+assert_type(AR_U == AR_U, npt.NDArray[np.bool_])
+assert_type(AR_S == AR_S, npt.NDArray[np.bool_])
+
+assert_type(AR_U != AR_U, npt.NDArray[np.bool_])
+assert_type(AR_S != AR_S, npt.NDArray[np.bool_])
+
+assert_type(AR_U >= AR_U, npt.NDArray[np.bool_])
+assert_type(AR_S >= AR_S, npt.NDArray[np.bool_])
+
+assert_type(AR_U <= AR_U, npt.NDArray[np.bool_])
+assert_type(AR_S <= AR_S, npt.NDArray[np.bool_])
+
+assert_type(AR_U > AR_U, npt.NDArray[np.bool_])
+assert_type(AR_S > AR_S, npt.NDArray[np.bool_])
+
+assert_type(AR_U < AR_U, npt.NDArray[np.bool_])
+assert_type(AR_S < AR_S, npt.NDArray[np.bool_])
+
+assert_type(AR_U * 5, np.chararray[Any, np.dtype[np.str_]])
+assert_type(AR_S * [5], np.chararray[Any, np.dtype[np.bytes_]])
+
+assert_type(AR_U % "test", np.chararray[Any, np.dtype[np.str_]])
+assert_type(AR_S % b"test", np.chararray[Any, np.dtype[np.bytes_]])
+
+assert_type(AR_U.capitalize(), np.chararray[Any, np.dtype[np.str_]])
+assert_type(AR_S.capitalize(), np.chararray[Any, np.dtype[np.bytes_]])
+
+assert_type(AR_U.center(5), np.chararray[Any, np.dtype[np.str_]])
+assert_type(AR_S.center([2, 3, 4], b"a"), np.chararray[Any, np.dtype[np.bytes_]])
+
+assert_type(AR_U.encode(), np.chararray[Any, np.dtype[np.bytes_]])
+assert_type(AR_S.decode(), np.chararray[Any, np.dtype[np.str_]])
+
+assert_type(AR_U.expandtabs(), np.chararray[Any, np.dtype[np.str_]])
+assert_type(AR_S.expandtabs(tabsize=4), np.chararray[Any, np.dtype[np.bytes_]])
+
+assert_type(AR_U.join("_"), np.chararray[Any, np.dtype[np.str_]])
+assert_type(AR_S.join([b"_", b""]), np.chararray[Any, np.dtype[np.bytes_]])
+
+assert_type(AR_U.ljust(5), np.chararray[Any, np.dtype[np.str_]])
+assert_type(AR_S.ljust([4, 3, 1], fillchar=[b"a", b"b", b"c"]), np.chararray[Any, np.dtype[np.bytes_]])
+assert_type(AR_U.rjust(5), np.chararray[Any, np.dtype[np.str_]])
+assert_type(AR_S.rjust([4, 3, 1], fillchar=[b"a", b"b", b"c"]), np.chararray[Any, np.dtype[np.bytes_]])
+
+assert_type(AR_U.lstrip(), np.chararray[Any, np.dtype[np.str_]])
+assert_type(AR_S.lstrip(chars=b"_"), np.chararray[Any, np.dtype[np.bytes_]])
+assert_type(AR_U.rstrip(), np.chararray[Any, np.dtype[np.str_]])
+assert_type(AR_S.rstrip(chars=b"_"), np.chararray[Any, np.dtype[np.bytes_]])
+assert_type(AR_U.strip(), np.chararray[Any, np.dtype[np.str_]])
+assert_type(AR_S.strip(chars=b"_"), np.chararray[Any, np.dtype[np.bytes_]])
+
+assert_type(AR_U.partition("\n"), np.chararray[Any, np.dtype[np.str_]])
+assert_type(AR_S.partition([b"a", b"b", b"c"]), np.chararray[Any, np.dtype[np.bytes_]])
+assert_type(AR_U.rpartition("\n"), np.chararray[Any, np.dtype[np.str_]])
+assert_type(AR_S.rpartition([b"a", b"b", b"c"]), np.chararray[Any, np.dtype[np.bytes_]])
+
+assert_type(AR_U.replace("_", "-"), np.chararray[Any, np.dtype[np.str_]])
+assert_type(AR_S.replace([b"_", b""], [b"a", b"b"]), np.chararray[Any, np.dtype[np.bytes_]])
+
+assert_type(AR_U.split("_"), npt.NDArray[np.object_])
+assert_type(AR_S.split(maxsplit=[1, 2, 3]), npt.NDArray[np.object_])
+assert_type(AR_U.rsplit("_"), npt.NDArray[np.object_])
+assert_type(AR_S.rsplit(maxsplit=[1, 2, 3]), npt.NDArray[np.object_])
+
+assert_type(AR_U.splitlines(), npt.NDArray[np.object_])
+assert_type(AR_S.splitlines(keepends=[True, True, False]), npt.NDArray[np.object_])
+
+assert_type(AR_U.swapcase(), np.chararray[Any, np.dtype[np.str_]])
+assert_type(AR_S.swapcase(), np.chararray[Any, np.dtype[np.bytes_]])
+
+assert_type(AR_U.title(), np.chararray[Any, np.dtype[np.str_]])
+assert_type(AR_S.title(), np.chararray[Any, np.dtype[np.bytes_]])
+
+assert_type(AR_U.upper(), np.chararray[Any, np.dtype[np.str_]])
+assert_type(AR_S.upper(), np.chararray[Any, np.dtype[np.bytes_]])
+
+assert_type(AR_U.zfill(5), np.chararray[Any, np.dtype[np.str_]])
+assert_type(AR_S.zfill([2, 3, 4]), np.chararray[Any, np.dtype[np.bytes_]])
+
+assert_type(AR_U.count("a", start=[1, 2, 3]), npt.NDArray[np.int_])
+assert_type(AR_S.count([b"a", b"b", b"c"], end=9), npt.NDArray[np.int_])
+
+assert_type(AR_U.endswith("a", start=[1, 2, 3]), npt.NDArray[np.bool_])
+assert_type(AR_S.endswith([b"a", b"b", b"c"], end=9), npt.NDArray[np.bool_])
+assert_type(AR_U.startswith("a", start=[1, 2, 3]), npt.NDArray[np.bool_])
+assert_type(AR_S.startswith([b"a", b"b", b"c"], end=9), npt.NDArray[np.bool_])
+
+assert_type(AR_U.find("a", start=[1, 2, 3]), npt.NDArray[np.int_])
+assert_type(AR_S.find([b"a", b"b", b"c"], end=9), npt.NDArray[np.int_])
+assert_type(AR_U.rfind("a", start=[1, 2, 3]), npt.NDArray[np.int_])
+assert_type(AR_S.rfind([b"a", b"b", b"c"], end=9), npt.NDArray[np.int_])
+
+assert_type(AR_U.index("a", start=[1, 2, 3]), npt.NDArray[np.int_])
+assert_type(AR_S.index([b"a", b"b", b"c"], end=9), npt.NDArray[np.int_])
+assert_type(AR_U.rindex("a", start=[1, 2, 3]), npt.NDArray[np.int_])
+assert_type(AR_S.rindex([b"a", b"b", b"c"], end=9), npt.NDArray[np.int_])
+
+assert_type(AR_U.isalpha(), npt.NDArray[np.bool_])
+assert_type(AR_S.isalpha(), npt.NDArray[np.bool_])
+
+assert_type(AR_U.isalnum(), npt.NDArray[np.bool_])
+assert_type(AR_S.isalnum(), npt.NDArray[np.bool_])
+
+assert_type(AR_U.isdecimal(), npt.NDArray[np.bool_])
+assert_type(AR_S.isdecimal(), npt.NDArray[np.bool_])
+
+assert_type(AR_U.isdigit(), npt.NDArray[np.bool_])
+assert_type(AR_S.isdigit(), npt.NDArray[np.bool_])
+
+assert_type(AR_U.islower(), npt.NDArray[np.bool_])
+assert_type(AR_S.islower(), npt.NDArray[np.bool_])
+
+assert_type(AR_U.isnumeric(), npt.NDArray[np.bool_])
+assert_type(AR_S.isnumeric(), npt.NDArray[np.bool_])
+
+assert_type(AR_U.isspace(), npt.NDArray[np.bool_])
+assert_type(AR_S.isspace(), npt.NDArray[np.bool_])
+
+assert_type(AR_U.istitle(), npt.NDArray[np.bool_])
+assert_type(AR_S.istitle(), npt.NDArray[np.bool_])
+
+assert_type(AR_U.isupper(), npt.NDArray[np.bool_])
+assert_type(AR_S.isupper(), npt.NDArray[np.bool_])
+
+assert_type(AR_U.__array_finalize__(object()), None)
+assert_type(AR_S.__array_finalize__(object()), None)
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/comparisons.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/comparisons.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..5765302a02f8a90db8884f68ec1c8bb569f7c47a
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/comparisons.pyi
@@ -0,0 +1,270 @@
+import sys
+import fractions
+import decimal
+from typing import Any
+
+import numpy as np
+import numpy.typing as npt
+
+if sys.version_info >= (3, 11):
+    from typing import assert_type
+else:
+    from typing_extensions import assert_type
+
+c16 = np.complex128()
+f8 = np.float64()
+i8 = np.int64()
+u8 = np.uint64()
+
+c8 = np.complex64()
+f4 = np.float32()
+i4 = np.int32()
+u4 = np.uint32()
+
+dt = np.datetime64(0, "D")
+td = np.timedelta64(0, "D")
+
+b_ = np.bool_()
+
+b = bool()
+c = complex()
+f = float()
+i = int()
+
+AR = np.array([0], dtype=np.int64)
+AR.setflags(write=False)
+
+SEQ = (0, 1, 2, 3, 4)
+
+# object-like comparisons
+
+assert_type(i8 > fractions.Fraction(1, 5), Any)
+assert_type(i8 > [fractions.Fraction(1, 5)], Any)
+assert_type(i8 > decimal.Decimal("1.5"), Any)
+assert_type(i8 > [decimal.Decimal("1.5")], Any)
+
+# Time structures
+
+assert_type(dt > dt, np.bool_)
+
+assert_type(td > td, np.bool_)
+assert_type(td > i, np.bool_)
+assert_type(td > i4, np.bool_)
+assert_type(td > i8, np.bool_)
+
+assert_type(td > AR, npt.NDArray[np.bool_])
+assert_type(td > SEQ, npt.NDArray[np.bool_])
+assert_type(AR > SEQ, npt.NDArray[np.bool_])
+assert_type(AR > td, npt.NDArray[np.bool_])
+assert_type(SEQ > td, npt.NDArray[np.bool_])
+assert_type(SEQ > AR, npt.NDArray[np.bool_])
+
+# boolean
+
+assert_type(b_ > b, np.bool_)
+assert_type(b_ > b_, np.bool_)
+assert_type(b_ > i, np.bool_)
+assert_type(b_ > i8, np.bool_)
+assert_type(b_ > i4, np.bool_)
+assert_type(b_ > u8, np.bool_)
+assert_type(b_ > u4, np.bool_)
+assert_type(b_ > f, np.bool_)
+assert_type(b_ > f8, np.bool_)
+assert_type(b_ > f4, np.bool_)
+assert_type(b_ > c, np.bool_)
+assert_type(b_ > c16, np.bool_)
+assert_type(b_ > c8, np.bool_)
+assert_type(b_ > AR, npt.NDArray[np.bool_])
+assert_type(b_ > SEQ, npt.NDArray[np.bool_])
+
+# Complex
+
+assert_type(c16 > c16, np.bool_)
+assert_type(c16 > f8, np.bool_)
+assert_type(c16 > i8, np.bool_)
+assert_type(c16 > c8, np.bool_)
+assert_type(c16 > f4, np.bool_)
+assert_type(c16 > i4, np.bool_)
+assert_type(c16 > b_, np.bool_)
+assert_type(c16 > b, np.bool_)
+assert_type(c16 > c, np.bool_)
+assert_type(c16 > f, np.bool_)
+assert_type(c16 > i, np.bool_)
+assert_type(c16 > AR, npt.NDArray[np.bool_])
+assert_type(c16 > SEQ, npt.NDArray[np.bool_])
+
+assert_type(c16 > c16, np.bool_)
+assert_type(f8 > c16, np.bool_)
+assert_type(i8 > c16, np.bool_)
+assert_type(c8 > c16, np.bool_)
+assert_type(f4 > c16, np.bool_)
+assert_type(i4 > c16, np.bool_)
+assert_type(b_ > c16, np.bool_)
+assert_type(b > c16, np.bool_)
+assert_type(c > c16, np.bool_)
+assert_type(f > c16, np.bool_)
+assert_type(i > c16, np.bool_)
+assert_type(AR > c16, npt.NDArray[np.bool_])
+assert_type(SEQ > c16, npt.NDArray[np.bool_])
+
+assert_type(c8 > c16, np.bool_)
+assert_type(c8 > f8, np.bool_)
+assert_type(c8 > i8, np.bool_)
+assert_type(c8 > c8, np.bool_)
+assert_type(c8 > f4, np.bool_)
+assert_type(c8 > i4, np.bool_)
+assert_type(c8 > b_, np.bool_)
+assert_type(c8 > b, np.bool_)
+assert_type(c8 > c, np.bool_)
+assert_type(c8 > f, np.bool_)
+assert_type(c8 > i, np.bool_)
+assert_type(c8 > AR, npt.NDArray[np.bool_])
+assert_type(c8 > SEQ, npt.NDArray[np.bool_])
+
+assert_type(c16 > c8, np.bool_)
+assert_type(f8 > c8, np.bool_)
+assert_type(i8 > c8, np.bool_)
+assert_type(c8 > c8, np.bool_)
+assert_type(f4 > c8, np.bool_)
+assert_type(i4 > c8, np.bool_)
+assert_type(b_ > c8, np.bool_)
+assert_type(b > c8, np.bool_)
+assert_type(c > c8, np.bool_)
+assert_type(f > c8, np.bool_)
+assert_type(i > c8, np.bool_)
+assert_type(AR > c8, npt.NDArray[np.bool_])
+assert_type(SEQ > c8, npt.NDArray[np.bool_])
+
+# Float
+
+assert_type(f8 > f8, np.bool_)
+assert_type(f8 > i8, np.bool_)
+assert_type(f8 > f4, np.bool_)
+assert_type(f8 > i4, np.bool_)
+assert_type(f8 > b_, np.bool_)
+assert_type(f8 > b, np.bool_)
+assert_type(f8 > c, np.bool_)
+assert_type(f8 > f, np.bool_)
+assert_type(f8 > i, np.bool_)
+assert_type(f8 > AR, npt.NDArray[np.bool_])
+assert_type(f8 > SEQ, npt.NDArray[np.bool_])
+
+assert_type(f8 > f8, np.bool_)
+assert_type(i8 > f8, np.bool_)
+assert_type(f4 > f8, np.bool_)
+assert_type(i4 > f8, np.bool_)
+assert_type(b_ > f8, np.bool_)
+assert_type(b > f8, np.bool_)
+assert_type(c > f8, np.bool_)
+assert_type(f > f8, np.bool_)
+assert_type(i > f8, np.bool_)
+assert_type(AR > f8, npt.NDArray[np.bool_])
+assert_type(SEQ > f8, npt.NDArray[np.bool_])
+
+assert_type(f4 > f8, np.bool_)
+assert_type(f4 > i8, np.bool_)
+assert_type(f4 > f4, np.bool_)
+assert_type(f4 > i4, np.bool_)
+assert_type(f4 > b_, np.bool_)
+assert_type(f4 > b, np.bool_)
+assert_type(f4 > c, np.bool_)
+assert_type(f4 > f, np.bool_)
+assert_type(f4 > i, np.bool_)
+assert_type(f4 > AR, npt.NDArray[np.bool_])
+assert_type(f4 > SEQ, npt.NDArray[np.bool_])
+
+assert_type(f8 > f4, np.bool_)
+assert_type(i8 > f4, np.bool_)
+assert_type(f4 > f4, np.bool_)
+assert_type(i4 > f4, np.bool_)
+assert_type(b_ > f4, np.bool_)
+assert_type(b > f4, np.bool_)
+assert_type(c > f4, np.bool_)
+assert_type(f > f4, np.bool_)
+assert_type(i > f4, np.bool_)
+assert_type(AR > f4, npt.NDArray[np.bool_])
+assert_type(SEQ > f4, npt.NDArray[np.bool_])
+
+# Int
+
+assert_type(i8 > i8, np.bool_)
+assert_type(i8 > u8, np.bool_)
+assert_type(i8 > i4, np.bool_)
+assert_type(i8 > u4, np.bool_)
+assert_type(i8 > b_, np.bool_)
+assert_type(i8 > b, np.bool_)
+assert_type(i8 > c, np.bool_)
+assert_type(i8 > f, np.bool_)
+assert_type(i8 > i, np.bool_)
+assert_type(i8 > AR, npt.NDArray[np.bool_])
+assert_type(i8 > SEQ, npt.NDArray[np.bool_])
+
+assert_type(u8 > u8, np.bool_)
+assert_type(u8 > i4, np.bool_)
+assert_type(u8 > u4, np.bool_)
+assert_type(u8 > b_, np.bool_)
+assert_type(u8 > b, np.bool_)
+assert_type(u8 > c, np.bool_)
+assert_type(u8 > f, np.bool_)
+assert_type(u8 > i, np.bool_)
+assert_type(u8 > AR, npt.NDArray[np.bool_])
+assert_type(u8 > SEQ, npt.NDArray[np.bool_])
+
+assert_type(i8 > i8, np.bool_)
+assert_type(u8 > i8, np.bool_)
+assert_type(i4 > i8, np.bool_)
+assert_type(u4 > i8, np.bool_)
+assert_type(b_ > i8, np.bool_)
+assert_type(b > i8, np.bool_)
+assert_type(c > i8, np.bool_)
+assert_type(f > i8, np.bool_)
+assert_type(i > i8, np.bool_)
+assert_type(AR > i8, npt.NDArray[np.bool_])
+assert_type(SEQ > i8, npt.NDArray[np.bool_])
+
+assert_type(u8 > u8, np.bool_)
+assert_type(i4 > u8, np.bool_)
+assert_type(u4 > u8, np.bool_)
+assert_type(b_ > u8, np.bool_)
+assert_type(b > u8, np.bool_)
+assert_type(c > u8, np.bool_)
+assert_type(f > u8, np.bool_)
+assert_type(i > u8, np.bool_)
+assert_type(AR > u8, npt.NDArray[np.bool_])
+assert_type(SEQ > u8, npt.NDArray[np.bool_])
+
+assert_type(i4 > i8, np.bool_)
+assert_type(i4 > i4, np.bool_)
+assert_type(i4 > i, np.bool_)
+assert_type(i4 > b_, np.bool_)
+assert_type(i4 > b, np.bool_)
+assert_type(i4 > AR, npt.NDArray[np.bool_])
+assert_type(i4 > SEQ, npt.NDArray[np.bool_])
+
+assert_type(u4 > i8, np.bool_)
+assert_type(u4 > i4, np.bool_)
+assert_type(u4 > u8, np.bool_)
+assert_type(u4 > u4, np.bool_)
+assert_type(u4 > i, np.bool_)
+assert_type(u4 > b_, np.bool_)
+assert_type(u4 > b, np.bool_)
+assert_type(u4 > AR, npt.NDArray[np.bool_])
+assert_type(u4 > SEQ, npt.NDArray[np.bool_])
+
+assert_type(i8 > i4, np.bool_)
+assert_type(i4 > i4, np.bool_)
+assert_type(i > i4, np.bool_)
+assert_type(b_ > i4, np.bool_)
+assert_type(b > i4, np.bool_)
+assert_type(AR > i4, npt.NDArray[np.bool_])
+assert_type(SEQ > i4, npt.NDArray[np.bool_])
+
+assert_type(i8 > u4, np.bool_)
+assert_type(i4 > u4, np.bool_)
+assert_type(u8 > u4, np.bool_)
+assert_type(u4 > u4, np.bool_)
+assert_type(b_ > u4, np.bool_)
+assert_type(b > u4, np.bool_)
+assert_type(i > u4, np.bool_)
+assert_type(AR > u4, npt.NDArray[np.bool_])
+assert_type(SEQ > u4, npt.NDArray[np.bool_])
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/constants.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/constants.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..ce2fcef1e2fc637c20738cb6f9570de8a35f0ee4
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/constants.pyi
@@ -0,0 +1,61 @@
+import sys
+from typing import Literal
+
+import numpy as np
+from numpy.core._type_aliases import _SCTypes
+
+if sys.version_info >= (3, 11):
+    from typing import assert_type
+else:
+    from typing_extensions import assert_type
+
+assert_type(np.Inf, float)
+assert_type(np.Infinity, float)
+assert_type(np.NAN, float)
+assert_type(np.NINF, float)
+assert_type(np.NZERO, float)
+assert_type(np.NaN, float)
+assert_type(np.PINF, float)
+assert_type(np.PZERO, float)
+assert_type(np.e, float)
+assert_type(np.euler_gamma, float)
+assert_type(np.inf, float)
+assert_type(np.infty, float)
+assert_type(np.nan, float)
+assert_type(np.pi, float)
+
+assert_type(np.ALLOW_THREADS, int)
+assert_type(np.BUFSIZE, Literal[8192])
+assert_type(np.CLIP, Literal[0])
+assert_type(np.ERR_CALL, Literal[3])
+assert_type(np.ERR_DEFAULT, Literal[521])
+assert_type(np.ERR_IGNORE, Literal[0])
+assert_type(np.ERR_LOG, Literal[5])
+assert_type(np.ERR_PRINT, Literal[4])
+assert_type(np.ERR_RAISE, Literal[2])
+assert_type(np.ERR_WARN, Literal[1])
+assert_type(np.FLOATING_POINT_SUPPORT, Literal[1])
+assert_type(np.FPE_DIVIDEBYZERO, Literal[1])
+assert_type(np.FPE_INVALID, Literal[8])
+assert_type(np.FPE_OVERFLOW, Literal[2])
+assert_type(np.FPE_UNDERFLOW, Literal[4])
+assert_type(np.MAXDIMS, Literal[32])
+assert_type(np.MAY_SHARE_BOUNDS, Literal[0])
+assert_type(np.MAY_SHARE_EXACT, Literal[-1])
+assert_type(np.RAISE, Literal[2])
+assert_type(np.SHIFT_DIVIDEBYZERO, Literal[0])
+assert_type(np.SHIFT_INVALID, Literal[9])
+assert_type(np.SHIFT_OVERFLOW, Literal[3])
+assert_type(np.SHIFT_UNDERFLOW, Literal[6])
+assert_type(np.UFUNC_BUFSIZE_DEFAULT, Literal[8192])
+assert_type(np.WRAP, Literal[1])
+assert_type(np.tracemalloc_domain, Literal[389047])
+
+assert_type(np.little_endian, bool)
+assert_type(np.True_, np.bool_)
+assert_type(np.False_, np.bool_)
+
+assert_type(np.UFUNC_PYVALS_NAME, Literal["UFUNC_PYVALS"])
+
+assert_type(np.sctypeDict, dict[int | str, type[np.generic]])
+assert_type(np.sctypes, _SCTypes)
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/ctypeslib.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/ctypeslib.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..a9712c074c408ae71873c6cf5058748857aa79d6
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/ctypeslib.pyi
@@ -0,0 +1,95 @@
+import sys
+import ctypes as ct
+from typing import Any
+
+import numpy as np
+import numpy.typing as npt
+from numpy import ctypeslib
+
+if sys.version_info >= (3, 11):
+    from typing import assert_type
+else:
+    from typing_extensions import assert_type
+
+AR_bool: npt.NDArray[np.bool_]
+AR_ubyte: npt.NDArray[np.ubyte]
+AR_ushort: npt.NDArray[np.ushort]
+AR_uintc: npt.NDArray[np.uintc]
+AR_uint: npt.NDArray[np.uint]
+AR_ulonglong: npt.NDArray[np.ulonglong]
+AR_byte: npt.NDArray[np.byte]
+AR_short: npt.NDArray[np.short]
+AR_intc: npt.NDArray[np.intc]
+AR_int: npt.NDArray[np.int_]
+AR_longlong: npt.NDArray[np.longlong]
+AR_single: npt.NDArray[np.single]
+AR_double: npt.NDArray[np.double]
+AR_longdouble: npt.NDArray[np.longdouble]
+AR_void: npt.NDArray[np.void]
+
+pointer: ct._Pointer[Any]
+
+assert_type(np.ctypeslib.c_intp(), ctypeslib.c_intp)
+
+assert_type(np.ctypeslib.ndpointer(), type[ctypeslib._ndptr[None]])
+assert_type(np.ctypeslib.ndpointer(dtype=np.float64), type[ctypeslib._ndptr[np.dtype[np.float64]]])
+assert_type(np.ctypeslib.ndpointer(dtype=float), type[ctypeslib._ndptr[np.dtype[Any]]])
+assert_type(np.ctypeslib.ndpointer(shape=(10, 3)), type[ctypeslib._ndptr[None]])
+assert_type(np.ctypeslib.ndpointer(np.int64, shape=(10, 3)), type[ctypeslib._concrete_ndptr[np.dtype[np.int64]]])
+assert_type(np.ctypeslib.ndpointer(int, shape=(1,)), type[np.ctypeslib._concrete_ndptr[np.dtype[Any]]])
+
+assert_type(np.ctypeslib.as_ctypes_type(np.bool_), type[ct.c_bool])
+assert_type(np.ctypeslib.as_ctypes_type(np.ubyte), type[ct.c_ubyte])
+assert_type(np.ctypeslib.as_ctypes_type(np.ushort), type[ct.c_ushort])
+assert_type(np.ctypeslib.as_ctypes_type(np.uintc), type[ct.c_uint])
+assert_type(np.ctypeslib.as_ctypes_type(np.byte), type[ct.c_byte])
+assert_type(np.ctypeslib.as_ctypes_type(np.short), type[ct.c_short])
+assert_type(np.ctypeslib.as_ctypes_type(np.intc), type[ct.c_int])
+assert_type(np.ctypeslib.as_ctypes_type(np.single), type[ct.c_float])
+assert_type(np.ctypeslib.as_ctypes_type(np.double), type[ct.c_double])
+assert_type(np.ctypeslib.as_ctypes_type(ct.c_double), type[ct.c_double])
+assert_type(np.ctypeslib.as_ctypes_type("q"), type[ct.c_longlong])
+assert_type(np.ctypeslib.as_ctypes_type([("i8", np.int64), ("f8", np.float64)]), type[Any])
+assert_type(np.ctypeslib.as_ctypes_type("i8"), type[Any])
+assert_type(np.ctypeslib.as_ctypes_type("f8"), type[Any])
+
+assert_type(np.ctypeslib.as_ctypes(AR_bool.take(0)), ct.c_bool)
+assert_type(np.ctypeslib.as_ctypes(AR_ubyte.take(0)), ct.c_ubyte)
+assert_type(np.ctypeslib.as_ctypes(AR_ushort.take(0)), ct.c_ushort)
+assert_type(np.ctypeslib.as_ctypes(AR_uintc.take(0)), ct.c_uint)
+
+assert_type(np.ctypeslib.as_ctypes(AR_byte.take(0)), ct.c_byte)
+assert_type(np.ctypeslib.as_ctypes(AR_short.take(0)), ct.c_short)
+assert_type(np.ctypeslib.as_ctypes(AR_intc.take(0)), ct.c_int)
+assert_type(np.ctypeslib.as_ctypes(AR_single.take(0)), ct.c_float)
+assert_type(np.ctypeslib.as_ctypes(AR_double.take(0)), ct.c_double)
+assert_type(np.ctypeslib.as_ctypes(AR_void.take(0)), Any)
+assert_type(np.ctypeslib.as_ctypes(AR_bool), ct.Array[ct.c_bool])
+assert_type(np.ctypeslib.as_ctypes(AR_ubyte), ct.Array[ct.c_ubyte])
+assert_type(np.ctypeslib.as_ctypes(AR_ushort), ct.Array[ct.c_ushort])
+assert_type(np.ctypeslib.as_ctypes(AR_uintc), ct.Array[ct.c_uint])
+assert_type(np.ctypeslib.as_ctypes(AR_byte), ct.Array[ct.c_byte])
+assert_type(np.ctypeslib.as_ctypes(AR_short), ct.Array[ct.c_short])
+assert_type(np.ctypeslib.as_ctypes(AR_intc), ct.Array[ct.c_int])
+assert_type(np.ctypeslib.as_ctypes(AR_single), ct.Array[ct.c_float])
+assert_type(np.ctypeslib.as_ctypes(AR_double), ct.Array[ct.c_double])
+assert_type(np.ctypeslib.as_ctypes(AR_void), ct.Array[Any])
+
+assert_type(np.ctypeslib.as_array(AR_ubyte), npt.NDArray[np.ubyte])
+assert_type(np.ctypeslib.as_array(1), npt.NDArray[Any])
+assert_type(np.ctypeslib.as_array(pointer), npt.NDArray[Any])
+
+if sys.platform == "win32":
+    assert_type(np.ctypeslib.as_ctypes_type(np.int_), type[ct.c_int])
+    assert_type(np.ctypeslib.as_ctypes_type(np.uint), type[ct.c_uint])
+    assert_type(np.ctypeslib.as_ctypes(AR_uint), ct.Array[ct.c_uint])
+    assert_type(np.ctypeslib.as_ctypes(AR_int), ct.Array[ct.c_int])
+    assert_type(np.ctypeslib.as_ctypes(AR_uint.take(0)), ct.c_uint)
+    assert_type(np.ctypeslib.as_ctypes(AR_int.take(0)), ct.c_int)
+else:
+    assert_type(np.ctypeslib.as_ctypes_type(np.int_), type[ct.c_long])
+    assert_type(np.ctypeslib.as_ctypes_type(np.uint), type[ct.c_ulong])
+    assert_type(np.ctypeslib.as_ctypes(AR_uint), ct.Array[ct.c_ulong])
+    assert_type(np.ctypeslib.as_ctypes(AR_int), ct.Array[ct.c_long])
+    assert_type(np.ctypeslib.as_ctypes(AR_uint.take(0)), ct.c_ulong)
+    assert_type(np.ctypeslib.as_ctypes(AR_int.take(0)), ct.c_long)
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/datasource.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/datasource.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..865722d8c9448ffa601ce20838315c5df1c80852
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/datasource.pyi
@@ -0,0 +1,29 @@
+import sys
+from pathlib import Path
+from typing import IO, Any
+
+import numpy as np
+
+if sys.version_info >= (3, 11):
+    from typing import assert_type
+else:
+    from typing_extensions import assert_type
+
+path1: Path
+path2: str
+
+d1 = np.DataSource(path1)
+d2 = np.DataSource(path2)
+d3 = np.DataSource(None)
+
+assert_type(d1.abspath("..."), str)
+assert_type(d2.abspath("..."), str)
+assert_type(d3.abspath("..."), str)
+
+assert_type(d1.exists("..."), bool)
+assert_type(d2.exists("..."), bool)
+assert_type(d3.exists("..."), bool)
+
+assert_type(d1.open("...", "r"), IO[Any])
+assert_type(d2.open("...", encoding="utf8"), IO[Any])
+assert_type(d3.open("...", newline="/n"), IO[Any])
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/dtype.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/dtype.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..19713098bba3046d1ca3f4976f3c0600e76d0dee
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/dtype.pyi
@@ -0,0 +1,85 @@
+import sys
+import ctypes as ct
+from typing import Any
+
+import numpy as np
+
+if sys.version_info >= (3, 11):
+    from typing import assert_type
+else:
+    from typing_extensions import assert_type
+
+dtype_U: np.dtype[np.str_]
+dtype_V: np.dtype[np.void]
+dtype_i8: np.dtype[np.int64]
+
+assert_type(np.dtype(np.float64), np.dtype[np.float64])
+assert_type(np.dtype(np.float64, metadata={"test": "test"}), np.dtype[np.float64])
+assert_type(np.dtype(np.int64), np.dtype[np.int64])
+
+# String aliases
+assert_type(np.dtype("float64"), np.dtype[np.float64])
+assert_type(np.dtype("float32"), np.dtype[np.float32])
+assert_type(np.dtype("int64"), np.dtype[np.int64])
+assert_type(np.dtype("int32"), np.dtype[np.int32])
+assert_type(np.dtype("bool"), np.dtype[np.bool_])
+assert_type(np.dtype("bytes"), np.dtype[np.bytes_])
+assert_type(np.dtype("str"), np.dtype[np.str_])
+
+# Python types
+assert_type(np.dtype(complex), np.dtype[np.cdouble])
+assert_type(np.dtype(float), np.dtype[np.double])
+assert_type(np.dtype(int), np.dtype[np.int_])
+assert_type(np.dtype(bool), np.dtype[np.bool_])
+assert_type(np.dtype(str), np.dtype[np.str_])
+assert_type(np.dtype(bytes), np.dtype[np.bytes_])
+assert_type(np.dtype(object), np.dtype[np.object_])
+
+# ctypes
+assert_type(np.dtype(ct.c_double), np.dtype[np.double])
+assert_type(np.dtype(ct.c_longlong), np.dtype[np.longlong])
+assert_type(np.dtype(ct.c_uint32), np.dtype[np.uint32])
+assert_type(np.dtype(ct.c_bool), np.dtype[np.bool_])
+assert_type(np.dtype(ct.c_char), np.dtype[np.bytes_])
+assert_type(np.dtype(ct.py_object), np.dtype[np.object_])
+
+# Special case for None
+assert_type(np.dtype(None), np.dtype[np.double])
+
+# Dtypes of dtypes
+assert_type(np.dtype(np.dtype(np.float64)), np.dtype[np.float64])
+
+# Parameterized dtypes
+assert_type(np.dtype("S8"), np.dtype)
+
+# Void
+assert_type(np.dtype(("U", 10)), np.dtype[np.void])
+
+# Methods and attributes
+assert_type(dtype_U.base, np.dtype[Any])
+assert_type(dtype_U.subdtype, None | tuple[np.dtype[Any], tuple[int, ...]])
+assert_type(dtype_U.newbyteorder(), np.dtype[np.str_])
+assert_type(dtype_U.type, type[np.str_])
+assert_type(dtype_U.name, str)
+assert_type(dtype_U.names, None | tuple[str, ...])
+
+assert_type(dtype_U * 0, np.dtype[np.str_])
+assert_type(dtype_U * 1, np.dtype[np.str_])
+assert_type(dtype_U * 2, np.dtype[np.str_])
+
+assert_type(dtype_i8 * 0, np.dtype[np.void])
+assert_type(dtype_i8 * 1, np.dtype[np.int64])
+assert_type(dtype_i8 * 2, np.dtype[np.void])
+
+assert_type(0 * dtype_U, np.dtype[np.str_])
+assert_type(1 * dtype_U, np.dtype[np.str_])
+assert_type(2 * dtype_U, np.dtype[np.str_])
+
+assert_type(0 * dtype_i8, np.dtype[Any])
+assert_type(1 * dtype_i8, np.dtype[Any])
+assert_type(2 * dtype_i8, np.dtype[Any])
+
+assert_type(dtype_V["f0"], np.dtype[Any])
+assert_type(dtype_V[0], np.dtype[Any])
+assert_type(dtype_V[["f0", "f1"]], np.dtype[np.void])
+assert_type(dtype_V[["f0"]], np.dtype[np.void])
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/einsumfunc.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/einsumfunc.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..645aaad31cf172727452df6cecd9b192e0d7162d
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/einsumfunc.pyi
@@ -0,0 +1,45 @@
+import sys
+from typing import Any
+
+import numpy as np
+import numpy.typing as npt
+
+if sys.version_info >= (3, 11):
+    from typing import assert_type
+else:
+    from typing_extensions import assert_type
+
+AR_LIKE_b: list[bool]
+AR_LIKE_u: list[np.uint32]
+AR_LIKE_i: list[int]
+AR_LIKE_f: list[float]
+AR_LIKE_c: list[complex]
+AR_LIKE_U: list[str]
+AR_o: npt.NDArray[np.object_]
+
+OUT_f: npt.NDArray[np.float64]
+
+assert_type(np.einsum("i,i->i", AR_LIKE_b, AR_LIKE_b), Any)
+assert_type(np.einsum("i,i->i", AR_o, AR_o), Any)
+assert_type(np.einsum("i,i->i", AR_LIKE_u, AR_LIKE_u), Any)
+assert_type(np.einsum("i,i->i", AR_LIKE_i, AR_LIKE_i), Any)
+assert_type(np.einsum("i,i->i", AR_LIKE_f, AR_LIKE_f), Any)
+assert_type(np.einsum("i,i->i", AR_LIKE_c, AR_LIKE_c), Any)
+assert_type(np.einsum("i,i->i", AR_LIKE_b, AR_LIKE_i), Any)
+assert_type(np.einsum("i,i,i,i->i", AR_LIKE_b, AR_LIKE_u, AR_LIKE_i, AR_LIKE_c), Any)
+
+assert_type(np.einsum("i,i->i", AR_LIKE_c, AR_LIKE_c, out=OUT_f), npt.NDArray[np.float64])
+assert_type(np.einsum("i,i->i", AR_LIKE_U, AR_LIKE_U, dtype=bool, casting="unsafe", out=OUT_f), npt.NDArray[np.float64])
+assert_type(np.einsum("i,i->i", AR_LIKE_f, AR_LIKE_f, dtype="c16"), Any)
+assert_type(np.einsum("i,i->i", AR_LIKE_U, AR_LIKE_U, dtype=bool, casting="unsafe"), Any)
+
+assert_type(np.einsum_path("i,i->i", AR_LIKE_b, AR_LIKE_b), tuple[list[Any], str])
+assert_type(np.einsum_path("i,i->i", AR_LIKE_u, AR_LIKE_u), tuple[list[Any], str])
+assert_type(np.einsum_path("i,i->i", AR_LIKE_i, AR_LIKE_i), tuple[list[Any], str])
+assert_type(np.einsum_path("i,i->i", AR_LIKE_f, AR_LIKE_f), tuple[list[Any], str])
+assert_type(np.einsum_path("i,i->i", AR_LIKE_c, AR_LIKE_c), tuple[list[Any], str])
+assert_type(np.einsum_path("i,i->i", AR_LIKE_b, AR_LIKE_i), tuple[list[Any], str])
+assert_type(np.einsum_path("i,i,i,i->i", AR_LIKE_b, AR_LIKE_u, AR_LIKE_i, AR_LIKE_c), tuple[list[Any], str])
+
+assert_type(np.einsum([[1, 1], [1, 1]], AR_LIKE_i, AR_LIKE_i), Any)
+assert_type(np.einsum_path([[1, 1], [1, 1]], AR_LIKE_i, AR_LIKE_i), tuple[list[Any], str])
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/emath.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/emath.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..d1027bf48d509a7264d602e27a673fe170559565
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/emath.pyi
@@ -0,0 +1,60 @@
+import sys
+from typing import Any
+
+import numpy as np
+import numpy.typing as npt
+
+if sys.version_info >= (3, 11):
+    from typing import assert_type
+else:
+    from typing_extensions import assert_type
+
+AR_f8: npt.NDArray[np.float64]
+AR_c16: npt.NDArray[np.complex128]
+f8: np.float64
+c16: np.complex128
+
+assert_type(np.emath.sqrt(f8), Any)
+assert_type(np.emath.sqrt(AR_f8), npt.NDArray[Any])
+assert_type(np.emath.sqrt(c16), np.complexfloating[Any, Any])
+assert_type(np.emath.sqrt(AR_c16), npt.NDArray[np.complexfloating[Any, Any]])
+
+assert_type(np.emath.log(f8), Any)
+assert_type(np.emath.log(AR_f8), npt.NDArray[Any])
+assert_type(np.emath.log(c16), np.complexfloating[Any, Any])
+assert_type(np.emath.log(AR_c16), npt.NDArray[np.complexfloating[Any, Any]])
+
+assert_type(np.emath.log10(f8), Any)
+assert_type(np.emath.log10(AR_f8), npt.NDArray[Any])
+assert_type(np.emath.log10(c16), np.complexfloating[Any, Any])
+assert_type(np.emath.log10(AR_c16), npt.NDArray[np.complexfloating[Any, Any]])
+
+assert_type(np.emath.log2(f8), Any)
+assert_type(np.emath.log2(AR_f8), npt.NDArray[Any])
+assert_type(np.emath.log2(c16), np.complexfloating[Any, Any])
+assert_type(np.emath.log2(AR_c16), npt.NDArray[np.complexfloating[Any, Any]])
+
+assert_type(np.emath.logn(f8, 2), Any)
+assert_type(np.emath.logn(AR_f8, 4), npt.NDArray[Any])
+assert_type(np.emath.logn(f8, 1j), np.complexfloating[Any, Any])
+assert_type(np.emath.logn(AR_c16, 1.5), npt.NDArray[np.complexfloating[Any, Any]])
+
+assert_type(np.emath.power(f8, 2), Any)
+assert_type(np.emath.power(AR_f8, 4), npt.NDArray[Any])
+assert_type(np.emath.power(f8, 2j), np.complexfloating[Any, Any])
+assert_type(np.emath.power(AR_c16, 1.5), npt.NDArray[np.complexfloating[Any, Any]])
+
+assert_type(np.emath.arccos(f8), Any)
+assert_type(np.emath.arccos(AR_f8), npt.NDArray[Any])
+assert_type(np.emath.arccos(c16), np.complexfloating[Any, Any])
+assert_type(np.emath.arccos(AR_c16), npt.NDArray[np.complexfloating[Any, Any]])
+
+assert_type(np.emath.arcsin(f8), Any)
+assert_type(np.emath.arcsin(AR_f8), npt.NDArray[Any])
+assert_type(np.emath.arcsin(c16), np.complexfloating[Any, Any])
+assert_type(np.emath.arcsin(AR_c16), npt.NDArray[np.complexfloating[Any, Any]])
+
+assert_type(np.emath.arctanh(f8), Any)
+assert_type(np.emath.arctanh(AR_f8), npt.NDArray[Any])
+assert_type(np.emath.arctanh(c16), np.complexfloating[Any, Any])
+assert_type(np.emath.arctanh(AR_c16), npt.NDArray[np.complexfloating[Any, Any]])
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/false_positives.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/false_positives.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..7a2e016245a60cd163bf64222f3a6c8fb7514283
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/false_positives.pyi
@@ -0,0 +1,18 @@
+import sys
+from typing import Any
+
+import numpy as np
+import numpy.typing as npt
+
+if sys.version_info >= (3, 11):
+    from typing import assert_type
+else:
+    from typing_extensions import assert_type
+
+AR_Any: npt.NDArray[Any]
+
+# Mypy bug where overload ambiguity is ignored for `Any`-parametrized types;
+# xref numpy/numpy#20099 and python/mypy#11347
+#
+# The expected output would be something akin to `npt.NDArray[Any]`
+assert_type(AR_Any + 2, npt.NDArray[np.signedinteger[Any]])
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/fft.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/fft.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..d6e9ba756d97add86a3a2a545a96d957d1954c02
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/fft.pyi
@@ -0,0 +1,43 @@
+import sys
+from typing import Any
+
+import numpy as np
+import numpy.typing as npt
+
+if sys.version_info >= (3, 11):
+    from typing import assert_type
+else:
+    from typing_extensions import assert_type
+
+AR_f8: npt.NDArray[np.float64]
+AR_c16: npt.NDArray[np.complex128]
+AR_LIKE_f8: list[float]
+
+assert_type(np.fft.fftshift(AR_f8), npt.NDArray[np.float64])
+assert_type(np.fft.fftshift(AR_LIKE_f8, axes=0), npt.NDArray[Any])
+
+assert_type(np.fft.ifftshift(AR_f8), npt.NDArray[np.float64])
+assert_type(np.fft.ifftshift(AR_LIKE_f8, axes=0), npt.NDArray[Any])
+
+assert_type(np.fft.fftfreq(5, AR_f8), npt.NDArray[np.floating[Any]])
+assert_type(np.fft.fftfreq(np.int64(), AR_c16), npt.NDArray[np.complexfloating[Any, Any]])
+
+assert_type(np.fft.fftfreq(5, AR_f8), npt.NDArray[np.floating[Any]])
+assert_type(np.fft.fftfreq(np.int64(), AR_c16), npt.NDArray[np.complexfloating[Any, Any]])
+
+assert_type(np.fft.fft(AR_f8), npt.NDArray[np.complex128])
+assert_type(np.fft.ifft(AR_f8, axis=1), npt.NDArray[np.complex128])
+assert_type(np.fft.rfft(AR_f8, n=None), npt.NDArray[np.complex128])
+assert_type(np.fft.irfft(AR_f8, norm="ortho"), npt.NDArray[np.float64])
+assert_type(np.fft.hfft(AR_f8, n=2), npt.NDArray[np.float64])
+assert_type(np.fft.ihfft(AR_f8), npt.NDArray[np.complex128])
+
+assert_type(np.fft.fftn(AR_f8), npt.NDArray[np.complex128])
+assert_type(np.fft.ifftn(AR_f8), npt.NDArray[np.complex128])
+assert_type(np.fft.rfftn(AR_f8), npt.NDArray[np.complex128])
+assert_type(np.fft.irfftn(AR_f8), npt.NDArray[np.float64])
+
+assert_type(np.fft.rfft2(AR_f8), npt.NDArray[np.complex128])
+assert_type(np.fft.ifft2(AR_f8), npt.NDArray[np.complex128])
+assert_type(np.fft.fft2(AR_f8), npt.NDArray[np.complex128])
+assert_type(np.fft.irfft2(AR_f8), npt.NDArray[np.float64])
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/flatiter.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/flatiter.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..84d3b03b7d37afb0ddb2965300f9ce49ba9e4a53
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/flatiter.pyi
@@ -0,0 +1,31 @@
+import sys
+from typing import Any
+
+import numpy as np
+import numpy.typing as npt
+
+if sys.version_info >= (3, 11):
+    from typing import assert_type
+else:
+    from typing_extensions import assert_type
+
+a: np.flatiter[npt.NDArray[np.str_]]
+
+assert_type(a.base, npt.NDArray[np.str_])
+assert_type(a.copy(), npt.NDArray[np.str_])
+assert_type(a.coords, tuple[int, ...])
+assert_type(a.index, int)
+assert_type(iter(a), np.flatiter[npt.NDArray[np.str_]])
+assert_type(next(a), np.str_)
+assert_type(a[0], np.str_)
+assert_type(a[[0, 1, 2]], npt.NDArray[np.str_])
+assert_type(a[...], npt.NDArray[np.str_])
+assert_type(a[:], npt.NDArray[np.str_])
+assert_type(a[(...,)], npt.NDArray[np.str_])
+assert_type(a[(0,)], np.str_)
+assert_type(a.__array__(), npt.NDArray[np.str_])
+assert_type(a.__array__(np.dtype(np.float64)), npt.NDArray[np.float64])
+a[0] = "a"
+a[:5] = "a"
+a[...] = "a"
+a[(...,)] = "a"
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/fromnumeric.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/fromnumeric.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..aec21ec22c93335245a77810081e8eb700a52e0d
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/fromnumeric.pyi
@@ -0,0 +1,305 @@
+"""Tests for :mod:`core.fromnumeric`."""
+
+import sys
+from typing import Any
+
+import numpy as np
+import numpy.typing as npt
+
+if sys.version_info >= (3, 11):
+    from typing import assert_type
+else:
+    from typing_extensions import assert_type
+
+class NDArraySubclass(npt.NDArray[np.complex128]):
+    ...
+
+AR_b: npt.NDArray[np.bool_]
+AR_f4: npt.NDArray[np.float32]
+AR_c16: npt.NDArray[np.complex128]
+AR_u8: npt.NDArray[np.uint64]
+AR_i8: npt.NDArray[np.int64]
+AR_O: npt.NDArray[np.object_]
+AR_subclass: NDArraySubclass
+
+b: np.bool_
+f4: np.float32
+i8: np.int64
+f: float
+
+assert_type(np.take(b, 0), np.bool_)
+assert_type(np.take(f4, 0), np.float32)
+assert_type(np.take(f, 0), Any)
+assert_type(np.take(AR_b, 0), np.bool_)
+assert_type(np.take(AR_f4, 0), np.float32)
+assert_type(np.take(AR_b, [0]), npt.NDArray[np.bool_])
+assert_type(np.take(AR_f4, [0]), npt.NDArray[np.float32])
+assert_type(np.take([1], [0]), npt.NDArray[Any])
+assert_type(np.take(AR_f4, [0], out=AR_subclass), NDArraySubclass)
+
+assert_type(np.reshape(b, 1), npt.NDArray[np.bool_])
+assert_type(np.reshape(f4, 1), npt.NDArray[np.float32])
+assert_type(np.reshape(f, 1), npt.NDArray[Any])
+assert_type(np.reshape(AR_b, 1), npt.NDArray[np.bool_])
+assert_type(np.reshape(AR_f4, 1), npt.NDArray[np.float32])
+
+assert_type(np.choose(1, [True, True]), Any)
+assert_type(np.choose([1], [True, True]), npt.NDArray[Any])
+assert_type(np.choose([1], AR_b), npt.NDArray[np.bool_])
+assert_type(np.choose([1], AR_b, out=AR_f4), npt.NDArray[np.float32])
+
+assert_type(np.repeat(b, 1), npt.NDArray[np.bool_])
+assert_type(np.repeat(f4, 1), npt.NDArray[np.float32])
+assert_type(np.repeat(f, 1), npt.NDArray[Any])
+assert_type(np.repeat(AR_b, 1), npt.NDArray[np.bool_])
+assert_type(np.repeat(AR_f4, 1), npt.NDArray[np.float32])
+
+# TODO: array_bdd tests for np.put()
+
+assert_type(np.swapaxes([[0, 1]], 0, 0), npt.NDArray[Any])
+assert_type(np.swapaxes(AR_b, 0, 0), npt.NDArray[np.bool_])
+assert_type(np.swapaxes(AR_f4, 0, 0), npt.NDArray[np.float32])
+
+assert_type(np.transpose(b), npt.NDArray[np.bool_])
+assert_type(np.transpose(f4), npt.NDArray[np.float32])
+assert_type(np.transpose(f), npt.NDArray[Any])
+assert_type(np.transpose(AR_b), npt.NDArray[np.bool_])
+assert_type(np.transpose(AR_f4), npt.NDArray[np.float32])
+
+assert_type(np.partition(b, 0, axis=None), npt.NDArray[np.bool_])
+assert_type(np.partition(f4, 0, axis=None), npt.NDArray[np.float32])
+assert_type(np.partition(f, 0, axis=None), npt.NDArray[Any])
+assert_type(np.partition(AR_b, 0), npt.NDArray[np.bool_])
+assert_type(np.partition(AR_f4, 0), npt.NDArray[np.float32])
+
+assert_type(np.argpartition(b, 0), npt.NDArray[np.intp])
+assert_type(np.argpartition(f4, 0), npt.NDArray[np.intp])
+assert_type(np.argpartition(f, 0), npt.NDArray[np.intp])
+assert_type(np.argpartition(AR_b, 0), npt.NDArray[np.intp])
+assert_type(np.argpartition(AR_f4, 0), npt.NDArray[np.intp])
+
+assert_type(np.sort([2, 1], 0), npt.NDArray[Any])
+assert_type(np.sort(AR_b, 0), npt.NDArray[np.bool_])
+assert_type(np.sort(AR_f4, 0), npt.NDArray[np.float32])
+
+assert_type(np.argsort(AR_b, 0), npt.NDArray[np.intp])
+assert_type(np.argsort(AR_f4, 0), npt.NDArray[np.intp])
+
+assert_type(np.argmax(AR_b), np.intp)
+assert_type(np.argmax(AR_f4), np.intp)
+assert_type(np.argmax(AR_b, axis=0), Any)
+assert_type(np.argmax(AR_f4, axis=0), Any)
+assert_type(np.argmax(AR_f4, out=AR_subclass), NDArraySubclass)
+
+assert_type(np.argmin(AR_b), np.intp)
+assert_type(np.argmin(AR_f4), np.intp)
+assert_type(np.argmin(AR_b, axis=0), Any)
+assert_type(np.argmin(AR_f4, axis=0), Any)
+assert_type(np.argmin(AR_f4, out=AR_subclass), NDArraySubclass)
+
+assert_type(np.searchsorted(AR_b[0], 0), np.intp)
+assert_type(np.searchsorted(AR_f4[0], 0), np.intp)
+assert_type(np.searchsorted(AR_b[0], [0]), npt.NDArray[np.intp])
+assert_type(np.searchsorted(AR_f4[0], [0]), npt.NDArray[np.intp])
+
+assert_type(np.resize(b, (5, 5)), npt.NDArray[np.bool_])
+assert_type(np.resize(f4, (5, 5)), npt.NDArray[np.float32])
+assert_type(np.resize(f, (5, 5)), npt.NDArray[Any])
+assert_type(np.resize(AR_b, (5, 5)), npt.NDArray[np.bool_])
+assert_type(np.resize(AR_f4, (5, 5)), npt.NDArray[np.float32])
+
+assert_type(np.squeeze(b), np.bool_)
+assert_type(np.squeeze(f4), np.float32)
+assert_type(np.squeeze(f), npt.NDArray[Any])
+assert_type(np.squeeze(AR_b), npt.NDArray[np.bool_])
+assert_type(np.squeeze(AR_f4), npt.NDArray[np.float32])
+
+assert_type(np.diagonal(AR_b), npt.NDArray[np.bool_])
+assert_type(np.diagonal(AR_f4), npt.NDArray[np.float32])
+
+assert_type(np.trace(AR_b), Any)
+assert_type(np.trace(AR_f4), Any)
+assert_type(np.trace(AR_f4, out=AR_subclass), NDArraySubclass)
+
+assert_type(np.ravel(b), npt.NDArray[np.bool_])
+assert_type(np.ravel(f4), npt.NDArray[np.float32])
+assert_type(np.ravel(f), npt.NDArray[Any])
+assert_type(np.ravel(AR_b), npt.NDArray[np.bool_])
+assert_type(np.ravel(AR_f4), npt.NDArray[np.float32])
+
+assert_type(np.nonzero(b), tuple[npt.NDArray[np.intp], ...])
+assert_type(np.nonzero(f4), tuple[npt.NDArray[np.intp], ...])
+assert_type(np.nonzero(f), tuple[npt.NDArray[np.intp], ...])
+assert_type(np.nonzero(AR_b), tuple[npt.NDArray[np.intp], ...])
+assert_type(np.nonzero(AR_f4), tuple[npt.NDArray[np.intp], ...])
+
+assert_type(np.shape(b), tuple[int, ...])
+assert_type(np.shape(f4), tuple[int, ...])
+assert_type(np.shape(f), tuple[int, ...])
+assert_type(np.shape(AR_b), tuple[int, ...])
+assert_type(np.shape(AR_f4), tuple[int, ...])
+
+assert_type(np.compress([True], b), npt.NDArray[np.bool_])
+assert_type(np.compress([True], f4), npt.NDArray[np.float32])
+assert_type(np.compress([True], f), npt.NDArray[Any])
+assert_type(np.compress([True], AR_b), npt.NDArray[np.bool_])
+assert_type(np.compress([True], AR_f4), npt.NDArray[np.float32])
+
+assert_type(np.clip(b, 0, 1.0), np.bool_)
+assert_type(np.clip(f4, -1, 1), np.float32)
+assert_type(np.clip(f, 0, 1), Any)
+assert_type(np.clip(AR_b, 0, 1), npt.NDArray[np.bool_])
+assert_type(np.clip(AR_f4, 0, 1), npt.NDArray[np.float32])
+assert_type(np.clip([0], 0, 1), npt.NDArray[Any])
+assert_type(np.clip(AR_b, 0, 1, out=AR_subclass), NDArraySubclass)
+
+assert_type(np.sum(b), np.bool_)
+assert_type(np.sum(f4), np.float32)
+assert_type(np.sum(f), Any)
+assert_type(np.sum(AR_b), np.bool_)
+assert_type(np.sum(AR_f4), np.float32)
+assert_type(np.sum(AR_b, axis=0), Any)
+assert_type(np.sum(AR_f4, axis=0), Any)
+assert_type(np.sum(AR_f4, out=AR_subclass), NDArraySubclass)
+
+assert_type(np.all(b), np.bool_)
+assert_type(np.all(f4), np.bool_)
+assert_type(np.all(f), np.bool_)
+assert_type(np.all(AR_b), np.bool_)
+assert_type(np.all(AR_f4), np.bool_)
+assert_type(np.all(AR_b, axis=0), Any)
+assert_type(np.all(AR_f4, axis=0), Any)
+assert_type(np.all(AR_b, keepdims=True), Any)
+assert_type(np.all(AR_f4, keepdims=True), Any)
+assert_type(np.all(AR_f4, out=AR_subclass), NDArraySubclass)
+
+assert_type(np.any(b), np.bool_)
+assert_type(np.any(f4), np.bool_)
+assert_type(np.any(f), np.bool_)
+assert_type(np.any(AR_b), np.bool_)
+assert_type(np.any(AR_f4), np.bool_)
+assert_type(np.any(AR_b, axis=0), Any)
+assert_type(np.any(AR_f4, axis=0), Any)
+assert_type(np.any(AR_b, keepdims=True), Any)
+assert_type(np.any(AR_f4, keepdims=True), Any)
+assert_type(np.any(AR_f4, out=AR_subclass), NDArraySubclass)
+
+assert_type(np.cumsum(b), npt.NDArray[np.bool_])
+assert_type(np.cumsum(f4), npt.NDArray[np.float32])
+assert_type(np.cumsum(f), npt.NDArray[Any])
+assert_type(np.cumsum(AR_b), npt.NDArray[np.bool_])
+assert_type(np.cumsum(AR_f4), npt.NDArray[np.float32])
+assert_type(np.cumsum(f, dtype=float), npt.NDArray[Any])
+assert_type(np.cumsum(f, dtype=np.float64), npt.NDArray[np.float64])
+assert_type(np.cumsum(AR_f4, out=AR_subclass), NDArraySubclass)
+
+assert_type(np.ptp(b), np.bool_)
+assert_type(np.ptp(f4), np.float32)
+assert_type(np.ptp(f), Any)
+assert_type(np.ptp(AR_b), np.bool_)
+assert_type(np.ptp(AR_f4), np.float32)
+assert_type(np.ptp(AR_b, axis=0), Any)
+assert_type(np.ptp(AR_f4, axis=0), Any)
+assert_type(np.ptp(AR_b, keepdims=True), Any)
+assert_type(np.ptp(AR_f4, keepdims=True), Any)
+assert_type(np.ptp(AR_f4, out=AR_subclass), NDArraySubclass)
+
+assert_type(np.amax(b), np.bool_)
+assert_type(np.amax(f4), np.float32)
+assert_type(np.amax(f), Any)
+assert_type(np.amax(AR_b), np.bool_)
+assert_type(np.amax(AR_f4), np.float32)
+assert_type(np.amax(AR_b, axis=0), Any)
+assert_type(np.amax(AR_f4, axis=0), Any)
+assert_type(np.amax(AR_b, keepdims=True), Any)
+assert_type(np.amax(AR_f4, keepdims=True), Any)
+assert_type(np.amax(AR_f4, out=AR_subclass), NDArraySubclass)
+
+assert_type(np.amin(b), np.bool_)
+assert_type(np.amin(f4), np.float32)
+assert_type(np.amin(f), Any)
+assert_type(np.amin(AR_b), np.bool_)
+assert_type(np.amin(AR_f4), np.float32)
+assert_type(np.amin(AR_b, axis=0), Any)
+assert_type(np.amin(AR_f4, axis=0), Any)
+assert_type(np.amin(AR_b, keepdims=True), Any)
+assert_type(np.amin(AR_f4, keepdims=True), Any)
+assert_type(np.amin(AR_f4, out=AR_subclass), NDArraySubclass)
+
+assert_type(np.prod(AR_b), np.int_)
+assert_type(np.prod(AR_u8), np.uint64)
+assert_type(np.prod(AR_i8), np.int64)
+assert_type(np.prod(AR_f4), np.floating[Any])
+assert_type(np.prod(AR_c16), np.complexfloating[Any, Any])
+assert_type(np.prod(AR_O), Any)
+assert_type(np.prod(AR_f4, axis=0), Any)
+assert_type(np.prod(AR_f4, keepdims=True), Any)
+assert_type(np.prod(AR_f4, dtype=np.float64), np.float64)
+assert_type(np.prod(AR_f4, dtype=float), Any)
+assert_type(np.prod(AR_f4, out=AR_subclass), NDArraySubclass)
+
+assert_type(np.cumprod(AR_b), npt.NDArray[np.int_])
+assert_type(np.cumprod(AR_u8), npt.NDArray[np.uint64])
+assert_type(np.cumprod(AR_i8), npt.NDArray[np.int64])
+assert_type(np.cumprod(AR_f4), npt.NDArray[np.floating[Any]])
+assert_type(np.cumprod(AR_c16), npt.NDArray[np.complexfloating[Any, Any]])
+assert_type(np.cumprod(AR_O), npt.NDArray[np.object_])
+assert_type(np.cumprod(AR_f4, axis=0), npt.NDArray[np.floating[Any]])
+assert_type(np.cumprod(AR_f4, dtype=np.float64), npt.NDArray[np.float64])
+assert_type(np.cumprod(AR_f4, dtype=float), npt.NDArray[Any])
+assert_type(np.cumprod(AR_f4, out=AR_subclass), NDArraySubclass)
+
+assert_type(np.ndim(b), int)
+assert_type(np.ndim(f4), int)
+assert_type(np.ndim(f), int)
+assert_type(np.ndim(AR_b), int)
+assert_type(np.ndim(AR_f4), int)
+
+assert_type(np.size(b), int)
+assert_type(np.size(f4), int)
+assert_type(np.size(f), int)
+assert_type(np.size(AR_b), int)
+assert_type(np.size(AR_f4), int)
+
+assert_type(np.around(b), np.float16)
+assert_type(np.around(f), Any)
+assert_type(np.around(i8), np.int64)
+assert_type(np.around(f4), np.float32)
+assert_type(np.around(AR_b), npt.NDArray[np.float16])
+assert_type(np.around(AR_i8), npt.NDArray[np.int64])
+assert_type(np.around(AR_f4), npt.NDArray[np.float32])
+assert_type(np.around([1.5]), npt.NDArray[Any])
+assert_type(np.around(AR_f4, out=AR_subclass), NDArraySubclass)
+
+assert_type(np.mean(AR_b), np.floating[Any])
+assert_type(np.mean(AR_i8), np.floating[Any])
+assert_type(np.mean(AR_f4), np.floating[Any])
+assert_type(np.mean(AR_c16), np.complexfloating[Any, Any])
+assert_type(np.mean(AR_O), Any)
+assert_type(np.mean(AR_f4, axis=0), Any)
+assert_type(np.mean(AR_f4, keepdims=True), Any)
+assert_type(np.mean(AR_f4, dtype=float), Any)
+assert_type(np.mean(AR_f4, dtype=np.float64), np.float64)
+assert_type(np.mean(AR_f4, out=AR_subclass), NDArraySubclass)
+
+assert_type(np.std(AR_b), np.floating[Any])
+assert_type(np.std(AR_i8), np.floating[Any])
+assert_type(np.std(AR_f4), np.floating[Any])
+assert_type(np.std(AR_c16), np.floating[Any])
+assert_type(np.std(AR_O), Any)
+assert_type(np.std(AR_f4, axis=0), Any)
+assert_type(np.std(AR_f4, keepdims=True), Any)
+assert_type(np.std(AR_f4, dtype=float), Any)
+assert_type(np.std(AR_f4, dtype=np.float64), np.float64)
+assert_type(np.std(AR_f4, out=AR_subclass), NDArraySubclass)
+
+assert_type(np.var(AR_b), np.floating[Any])
+assert_type(np.var(AR_i8), np.floating[Any])
+assert_type(np.var(AR_f4), np.floating[Any])
+assert_type(np.var(AR_c16), np.floating[Any])
+assert_type(np.var(AR_O), Any)
+assert_type(np.var(AR_f4, axis=0), Any)
+assert_type(np.var(AR_f4, keepdims=True), Any)
+assert_type(np.var(AR_f4, dtype=float), Any)
+assert_type(np.var(AR_f4, dtype=np.float64), np.float64)
+assert_type(np.var(AR_f4, out=AR_subclass), NDArraySubclass)
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/getlimits.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/getlimits.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..f53fdf48824e055cbae4cafb579e62440898886e
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/getlimits.pyi
@@ -0,0 +1,56 @@
+import sys
+from typing import Any
+
+import numpy as np
+
+if sys.version_info >= (3, 11):
+    from typing import assert_type
+else:
+    from typing_extensions import assert_type
+
+f: float
+f8: np.float64
+c8: np.complex64
+
+i: int
+i8: np.int64
+u4: np.uint32
+
+finfo_f8: np.finfo[np.float64]
+iinfo_i8: np.iinfo[np.int64]
+
+assert_type(np.finfo(f), np.finfo[np.double])
+assert_type(np.finfo(f8), np.finfo[np.float64])
+assert_type(np.finfo(c8), np.finfo[np.float32])
+assert_type(np.finfo('f2'), np.finfo[np.floating[Any]])
+
+assert_type(finfo_f8.dtype, np.dtype[np.float64])
+assert_type(finfo_f8.bits, int)
+assert_type(finfo_f8.eps, np.float64)
+assert_type(finfo_f8.epsneg, np.float64)
+assert_type(finfo_f8.iexp, int)
+assert_type(finfo_f8.machep, int)
+assert_type(finfo_f8.max, np.float64)
+assert_type(finfo_f8.maxexp, int)
+assert_type(finfo_f8.min, np.float64)
+assert_type(finfo_f8.minexp, int)
+assert_type(finfo_f8.negep, int)
+assert_type(finfo_f8.nexp, int)
+assert_type(finfo_f8.nmant, int)
+assert_type(finfo_f8.precision, int)
+assert_type(finfo_f8.resolution, np.float64)
+assert_type(finfo_f8.tiny, np.float64)
+assert_type(finfo_f8.smallest_normal, np.float64)
+assert_type(finfo_f8.smallest_subnormal, np.float64)
+
+assert_type(np.iinfo(i), np.iinfo[np.int_])
+assert_type(np.iinfo(i8), np.iinfo[np.int64])
+assert_type(np.iinfo(u4), np.iinfo[np.uint32])
+assert_type(np.iinfo('i2'), np.iinfo[Any])
+
+assert_type(iinfo_i8.dtype, np.dtype[np.int64])
+assert_type(iinfo_i8.kind, str)
+assert_type(iinfo_i8.bits, int)
+assert_type(iinfo_i8.key, str)
+assert_type(iinfo_i8.min, int)
+assert_type(iinfo_i8.max, int)
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/histograms.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/histograms.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..68df0b96f48d80f386bfe68a164bd7320c73fa6e
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/histograms.pyi
@@ -0,0 +1,27 @@
+import sys
+from typing import Any
+
+import numpy as np
+import numpy.typing as npt
+
+if sys.version_info >= (3, 11):
+    from typing import assert_type
+else:
+    from typing_extensions import assert_type
+
+AR_i8: npt.NDArray[np.int64]
+AR_f8: npt.NDArray[np.float64]
+
+assert_type(np.histogram_bin_edges(AR_i8, bins="auto"), npt.NDArray[Any])
+assert_type(np.histogram_bin_edges(AR_i8, bins="rice", range=(0, 3)), npt.NDArray[Any])
+assert_type(np.histogram_bin_edges(AR_i8, bins="scott", weights=AR_f8), npt.NDArray[Any])
+
+assert_type(np.histogram(AR_i8, bins="auto"), tuple[npt.NDArray[Any], npt.NDArray[Any]])
+assert_type(np.histogram(AR_i8, bins="rice", range=(0, 3)), tuple[npt.NDArray[Any], npt.NDArray[Any]])
+assert_type(np.histogram(AR_i8, bins="scott", weights=AR_f8), tuple[npt.NDArray[Any], npt.NDArray[Any]])
+assert_type(np.histogram(AR_f8, bins=1, density=True), tuple[npt.NDArray[Any], npt.NDArray[Any]])
+
+assert_type(np.histogramdd(AR_i8, bins=[1]), tuple[npt.NDArray[Any], list[npt.NDArray[Any]]])
+assert_type(np.histogramdd(AR_i8, range=[(0, 3)]), tuple[npt.NDArray[Any], list[npt.NDArray[Any]]])
+assert_type(np.histogramdd(AR_i8, weights=AR_f8), tuple[npt.NDArray[Any], list[npt.NDArray[Any]]])
+assert_type(np.histogramdd(AR_f8, density=True), tuple[npt.NDArray[Any], list[npt.NDArray[Any]]])
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/index_tricks.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/index_tricks.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..e74eb56768676cd16f7463841a8e27e04f5017d5
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/index_tricks.pyi
@@ -0,0 +1,74 @@
+import sys
+from typing import Any, Literal
+
+import numpy as np
+import numpy.typing as npt
+
+if sys.version_info >= (3, 11):
+    from typing import assert_type
+else:
+    from typing_extensions import assert_type
+
+AR_LIKE_b: list[bool]
+AR_LIKE_i: list[int]
+AR_LIKE_f: list[float]
+AR_LIKE_U: list[str]
+
+AR_i8: np.ndarray[Any, np.dtype[np.int64]]
+
+assert_type(np.ndenumerate(AR_i8), np.ndenumerate[np.int64])
+assert_type(np.ndenumerate(AR_LIKE_f), np.ndenumerate[np.float64])
+assert_type(np.ndenumerate(AR_LIKE_U), np.ndenumerate[np.str_])
+
+assert_type(np.ndenumerate(AR_i8).iter, np.flatiter[npt.NDArray[np.int64]])
+assert_type(np.ndenumerate(AR_LIKE_f).iter, np.flatiter[npt.NDArray[np.float64]])
+assert_type(np.ndenumerate(AR_LIKE_U).iter, np.flatiter[npt.NDArray[np.str_]])
+
+assert_type(next(np.ndenumerate(AR_i8)), tuple[tuple[int, ...], np.int64])
+assert_type(next(np.ndenumerate(AR_LIKE_f)), tuple[tuple[int, ...], np.float64])
+assert_type(next(np.ndenumerate(AR_LIKE_U)), tuple[tuple[int, ...], np.str_])
+
+assert_type(iter(np.ndenumerate(AR_i8)), np.ndenumerate[np.int64])
+assert_type(iter(np.ndenumerate(AR_LIKE_f)), np.ndenumerate[np.float64])
+assert_type(iter(np.ndenumerate(AR_LIKE_U)), np.ndenumerate[np.str_])
+
+assert_type(np.ndindex(1, 2, 3), np.ndindex)
+assert_type(np.ndindex((1, 2, 3)), np.ndindex)
+assert_type(iter(np.ndindex(1, 2, 3)), np.ndindex)
+assert_type(next(np.ndindex(1, 2, 3)), tuple[int, ...])
+
+assert_type(np.unravel_index([22, 41, 37], (7, 6)), tuple[npt.NDArray[np.intp], ...])
+assert_type(np.unravel_index([31, 41, 13], (7, 6), order="F"), tuple[npt.NDArray[np.intp], ...])
+assert_type(np.unravel_index(1621, (6, 7, 8, 9)), tuple[np.intp, ...])
+
+assert_type(np.ravel_multi_index([[1]], (7, 6)), npt.NDArray[np.intp])
+assert_type(np.ravel_multi_index(AR_LIKE_i, (7, 6)), np.intp)
+assert_type(np.ravel_multi_index(AR_LIKE_i, (7, 6), order="F"), np.intp)
+assert_type(np.ravel_multi_index(AR_LIKE_i, (4, 6), mode="clip"), np.intp)
+assert_type(np.ravel_multi_index(AR_LIKE_i, (4, 4), mode=("clip", "wrap")), np.intp)
+assert_type(np.ravel_multi_index((3, 1, 4, 1), (6, 7, 8, 9)), np.intp)
+
+assert_type(np.mgrid[1:1:2], npt.NDArray[Any])
+assert_type(np.mgrid[1:1:2, None:10], npt.NDArray[Any])
+
+assert_type(np.ogrid[1:1:2], list[npt.NDArray[Any]])
+assert_type(np.ogrid[1:1:2, None:10], list[npt.NDArray[Any]])
+
+assert_type(np.index_exp[0:1], tuple[slice])
+assert_type(np.index_exp[0:1, None:3], tuple[slice, slice])
+assert_type(np.index_exp[0, 0:1, ..., [0, 1, 3]], tuple[Literal[0], slice, ellipsis, list[int]])
+
+assert_type(np.s_[0:1], slice)
+assert_type(np.s_[0:1, None:3], tuple[slice, slice])
+assert_type(np.s_[0, 0:1, ..., [0, 1, 3]], tuple[Literal[0], slice, ellipsis, list[int]])
+
+assert_type(np.ix_(AR_LIKE_b), tuple[npt.NDArray[np.bool_], ...])
+assert_type(np.ix_(AR_LIKE_i, AR_LIKE_f), tuple[npt.NDArray[np.float64], ...])
+assert_type(np.ix_(AR_i8), tuple[npt.NDArray[np.int64], ...])
+
+assert_type(np.fill_diagonal(AR_i8, 5), None)
+
+assert_type(np.diag_indices(4), tuple[npt.NDArray[np.int_], ...])
+assert_type(np.diag_indices(2, 3), tuple[npt.NDArray[np.int_], ...])
+
+assert_type(np.diag_indices_from(AR_i8), tuple[npt.NDArray[np.int_], ...])
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/lib_function_base.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/lib_function_base.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..0420511a7d722374fa5f3043c3557c0bb2bb3b09
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/lib_function_base.pyi
@@ -0,0 +1,185 @@
+import sys
+from typing import Any
+from collections.abc import Callable
+
+import numpy as np
+import numpy.typing as npt
+
+if sys.version_info >= (3, 11):
+    from typing import assert_type
+else:
+    from typing_extensions import assert_type
+
+vectorized_func: np.vectorize
+
+f8: np.float64
+AR_LIKE_f8: list[float]
+
+AR_i8: npt.NDArray[np.int64]
+AR_f8: npt.NDArray[np.float64]
+AR_c16: npt.NDArray[np.complex128]
+AR_m: npt.NDArray[np.timedelta64]
+AR_M: npt.NDArray[np.datetime64]
+AR_O: npt.NDArray[np.object_]
+AR_b: npt.NDArray[np.bool_]
+AR_U: npt.NDArray[np.str_]
+CHAR_AR_U: np.chararray[Any, np.dtype[np.str_]]
+
+def func(*args: Any, **kwargs: Any) -> Any: ...
+
+assert_type(vectorized_func.pyfunc, Callable[..., Any])
+assert_type(vectorized_func.cache, bool)
+assert_type(vectorized_func.signature, None | str)
+assert_type(vectorized_func.otypes, None | str)
+assert_type(vectorized_func.excluded, set[int | str])
+assert_type(vectorized_func.__doc__, None | str)
+assert_type(vectorized_func([1]), Any)
+assert_type(np.vectorize(int), np.vectorize)
+assert_type(
+    np.vectorize(int, otypes="i", doc="doc", excluded=(), cache=True, signature=None),
+    np.vectorize,
+)
+
+assert_type(np.add_newdoc("__main__", "blabla", doc="test doc"), None)
+assert_type(np.add_newdoc("__main__", "blabla", doc=("meth", "test doc")), None)
+assert_type(np.add_newdoc("__main__", "blabla", doc=[("meth", "test doc")]), None)
+
+assert_type(np.rot90(AR_f8, k=2), npt.NDArray[np.float64])
+assert_type(np.rot90(AR_LIKE_f8, axes=(0, 1)), npt.NDArray[Any])
+
+assert_type(np.flip(f8), np.float64)
+assert_type(np.flip(1.0), Any)
+assert_type(np.flip(AR_f8, axis=(0, 1)), npt.NDArray[np.float64])
+assert_type(np.flip(AR_LIKE_f8, axis=0), npt.NDArray[Any])
+
+assert_type(np.iterable(1), bool)
+assert_type(np.iterable([1]), bool)
+
+assert_type(np.average(AR_f8), np.floating[Any])
+assert_type(np.average(AR_f8, weights=AR_c16), np.complexfloating[Any, Any])
+assert_type(np.average(AR_O), Any)
+assert_type(np.average(AR_f8, returned=True), tuple[np.floating[Any], np.floating[Any]])
+assert_type(np.average(AR_f8, weights=AR_c16, returned=True), tuple[np.complexfloating[Any, Any], np.complexfloating[Any, Any]])
+assert_type(np.average(AR_O, returned=True), tuple[Any, Any])
+assert_type(np.average(AR_f8, axis=0), Any)
+assert_type(np.average(AR_f8, axis=0, returned=True), tuple[Any, Any])
+
+assert_type(np.asarray_chkfinite(AR_f8), npt.NDArray[np.float64])
+assert_type(np.asarray_chkfinite(AR_LIKE_f8), npt.NDArray[Any])
+assert_type(np.asarray_chkfinite(AR_f8, dtype=np.float64), npt.NDArray[np.float64])
+assert_type(np.asarray_chkfinite(AR_f8, dtype=float), npt.NDArray[Any])
+
+assert_type(np.piecewise(AR_f8, AR_b, [func]), npt.NDArray[np.float64])
+assert_type(np.piecewise(AR_LIKE_f8, AR_b, [func]), npt.NDArray[Any])
+
+assert_type(np.select([AR_f8], [AR_f8]), npt.NDArray[Any])
+
+assert_type(np.copy(AR_LIKE_f8), npt.NDArray[Any])
+assert_type(np.copy(AR_U), npt.NDArray[np.str_])
+assert_type(np.copy(CHAR_AR_U), np.ndarray[Any, Any])
+assert_type(np.copy(CHAR_AR_U, "K", subok=True), np.chararray[Any, np.dtype[np.str_]])
+assert_type(np.copy(CHAR_AR_U, subok=True), np.chararray[Any, np.dtype[np.str_]])
+
+assert_type(np.gradient(AR_f8, axis=None), Any)
+assert_type(np.gradient(AR_LIKE_f8, edge_order=2), Any)
+
+assert_type(np.diff("bob", n=0), str)
+assert_type(np.diff(AR_f8, axis=0), npt.NDArray[Any])
+assert_type(np.diff(AR_LIKE_f8, prepend=1.5), npt.NDArray[Any])
+
+assert_type(np.angle(f8), np.floating[Any])
+assert_type(np.angle(AR_f8), npt.NDArray[np.floating[Any]])
+assert_type(np.angle(AR_c16, deg=True), npt.NDArray[np.floating[Any]])
+assert_type(np.angle(AR_O), npt.NDArray[np.object_])
+
+assert_type(np.unwrap(AR_f8), npt.NDArray[np.floating[Any]])
+assert_type(np.unwrap(AR_O), npt.NDArray[np.object_])
+
+assert_type(np.sort_complex(AR_f8), npt.NDArray[np.complexfloating[Any, Any]])
+
+assert_type(np.trim_zeros(AR_f8), npt.NDArray[np.float64])
+assert_type(np.trim_zeros(AR_LIKE_f8), list[float])
+
+assert_type(np.extract(AR_i8, AR_f8), npt.NDArray[np.float64])
+assert_type(np.extract(AR_i8, AR_LIKE_f8), npt.NDArray[Any])
+
+assert_type(np.place(AR_f8, mask=AR_i8, vals=5.0), None)
+
+assert_type(np.disp(1, linefeed=True), None)
+with open("test", "w") as f:
+    assert_type(np.disp("message", device=f), None)
+
+assert_type(np.cov(AR_f8, bias=True), npt.NDArray[np.floating[Any]])
+assert_type(np.cov(AR_f8, AR_c16, ddof=1), npt.NDArray[np.complexfloating[Any, Any]])
+assert_type(np.cov(AR_f8, aweights=AR_f8, dtype=np.float32), npt.NDArray[np.float32])
+assert_type(np.cov(AR_f8, fweights=AR_f8, dtype=float), npt.NDArray[Any])
+
+assert_type(np.corrcoef(AR_f8, rowvar=True), npt.NDArray[np.floating[Any]])
+assert_type(np.corrcoef(AR_f8, AR_c16), npt.NDArray[np.complexfloating[Any, Any]])
+assert_type(np.corrcoef(AR_f8, dtype=np.float32), npt.NDArray[np.float32])
+assert_type(np.corrcoef(AR_f8, dtype=float), npt.NDArray[Any])
+
+assert_type(np.blackman(5), npt.NDArray[np.floating[Any]])
+assert_type(np.bartlett(6), npt.NDArray[np.floating[Any]])
+assert_type(np.hanning(4.5), npt.NDArray[np.floating[Any]])
+assert_type(np.hamming(0), npt.NDArray[np.floating[Any]])
+assert_type(np.i0(AR_i8), npt.NDArray[np.floating[Any]])
+assert_type(np.kaiser(4, 5.9), npt.NDArray[np.floating[Any]])
+
+assert_type(np.sinc(1.0), np.floating[Any])
+assert_type(np.sinc(1j), np.complexfloating[Any, Any])
+assert_type(np.sinc(AR_f8), npt.NDArray[np.floating[Any]])
+assert_type(np.sinc(AR_c16), npt.NDArray[np.complexfloating[Any, Any]])
+
+assert_type(np.median(AR_f8, keepdims=False), np.floating[Any])
+assert_type(np.median(AR_c16, overwrite_input=True), np.complexfloating[Any, Any])
+assert_type(np.median(AR_m), np.timedelta64)
+assert_type(np.median(AR_O), Any)
+assert_type(np.median(AR_f8, keepdims=True), Any)
+assert_type(np.median(AR_c16, axis=0), Any)
+assert_type(np.median(AR_LIKE_f8, out=AR_c16), npt.NDArray[np.complex128])
+
+assert_type(np.add_newdoc_ufunc(np.add, "docstring"), None)
+
+assert_type(np.percentile(AR_f8, 50), np.floating[Any])
+assert_type(np.percentile(AR_c16, 50), np.complexfloating[Any, Any])
+assert_type(np.percentile(AR_m, 50), np.timedelta64)
+assert_type(np.percentile(AR_M, 50, overwrite_input=True), np.datetime64)
+assert_type(np.percentile(AR_O, 50), Any)
+assert_type(np.percentile(AR_f8, [50]), npt.NDArray[np.floating[Any]])
+assert_type(np.percentile(AR_c16, [50]), npt.NDArray[np.complexfloating[Any, Any]])
+assert_type(np.percentile(AR_m, [50]), npt.NDArray[np.timedelta64])
+assert_type(np.percentile(AR_M, [50], method="nearest"), npt.NDArray[np.datetime64])
+assert_type(np.percentile(AR_O, [50]), npt.NDArray[np.object_])
+assert_type(np.percentile(AR_f8, [50], keepdims=True), Any)
+assert_type(np.percentile(AR_f8, [50], axis=[1]), Any)
+assert_type(np.percentile(AR_f8, [50], out=AR_c16), npt.NDArray[np.complex128])
+
+assert_type(np.quantile(AR_f8, 0.5), np.floating[Any])
+assert_type(np.quantile(AR_c16, 0.5), np.complexfloating[Any, Any])
+assert_type(np.quantile(AR_m, 0.5), np.timedelta64)
+assert_type(np.quantile(AR_M, 0.5, overwrite_input=True), np.datetime64)
+assert_type(np.quantile(AR_O, 0.5), Any)
+assert_type(np.quantile(AR_f8, [0.5]), npt.NDArray[np.floating[Any]])
+assert_type(np.quantile(AR_c16, [0.5]), npt.NDArray[np.complexfloating[Any, Any]])
+assert_type(np.quantile(AR_m, [0.5]), npt.NDArray[np.timedelta64])
+assert_type(np.quantile(AR_M, [0.5], method="nearest"), npt.NDArray[np.datetime64])
+assert_type(np.quantile(AR_O, [0.5]), npt.NDArray[np.object_])
+assert_type(np.quantile(AR_f8, [0.5], keepdims=True), Any)
+assert_type(np.quantile(AR_f8, [0.5], axis=[1]), Any)
+assert_type(np.quantile(AR_f8, [0.5], out=AR_c16), npt.NDArray[np.complex128])
+
+assert_type(np.meshgrid(AR_f8, AR_i8, copy=False), list[npt.NDArray[Any]])
+assert_type(np.meshgrid(AR_f8, AR_i8, AR_c16, indexing="ij"), list[npt.NDArray[Any]])
+
+assert_type(np.delete(AR_f8, np.s_[:5]), npt.NDArray[np.float64])
+assert_type(np.delete(AR_LIKE_f8, [0, 4, 9], axis=0), npt.NDArray[Any])
+
+assert_type(np.insert(AR_f8, np.s_[:5], 5), npt.NDArray[np.float64])
+assert_type(np.insert(AR_LIKE_f8, [0, 4, 9], [0.5, 9.2, 7], axis=0), npt.NDArray[Any])
+
+assert_type(np.append(AR_f8, 5), npt.NDArray[Any])
+assert_type(np.append(AR_LIKE_f8, 1j, axis=0), npt.NDArray[Any])
+
+assert_type(np.digitize(4.5, [1]), np.intp)
+assert_type(np.digitize(AR_f8, [1, 2, 3]), npt.NDArray[np.intp])
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/lib_polynomial.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/lib_polynomial.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..9d258ca3e0e7cc1ec88e1fd0eca5945ed590738a
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/lib_polynomial.pyi
@@ -0,0 +1,150 @@
+import sys
+from typing import Any, NoReturn
+from collections.abc import Iterator
+
+import numpy as np
+import numpy.typing as npt
+
+if sys.version_info >= (3, 11):
+    from typing import assert_type
+else:
+    from typing_extensions import assert_type
+
+AR_b: npt.NDArray[np.bool_]
+AR_u4: npt.NDArray[np.uint32]
+AR_i8: npt.NDArray[np.int64]
+AR_f8: npt.NDArray[np.float64]
+AR_c16: npt.NDArray[np.complex128]
+AR_O: npt.NDArray[np.object_]
+
+poly_obj: np.poly1d
+
+assert_type(poly_obj.variable, str)
+assert_type(poly_obj.order, int)
+assert_type(poly_obj.o, int)
+assert_type(poly_obj.roots, npt.NDArray[Any])
+assert_type(poly_obj.r, npt.NDArray[Any])
+assert_type(poly_obj.coeffs, npt.NDArray[Any])
+assert_type(poly_obj.c, npt.NDArray[Any])
+assert_type(poly_obj.coef, npt.NDArray[Any])
+assert_type(poly_obj.coefficients, npt.NDArray[Any])
+assert_type(poly_obj.__hash__, None)
+
+assert_type(poly_obj(1), Any)
+assert_type(poly_obj([1]), npt.NDArray[Any])
+assert_type(poly_obj(poly_obj), np.poly1d)
+
+assert_type(len(poly_obj), int)
+assert_type(-poly_obj, np.poly1d)
+assert_type(+poly_obj, np.poly1d)
+
+assert_type(poly_obj * 5, np.poly1d)
+assert_type(5 * poly_obj, np.poly1d)
+assert_type(poly_obj + 5, np.poly1d)
+assert_type(5 + poly_obj, np.poly1d)
+assert_type(poly_obj - 5, np.poly1d)
+assert_type(5 - poly_obj, np.poly1d)
+assert_type(poly_obj**1, np.poly1d)
+assert_type(poly_obj**1.0, np.poly1d)
+assert_type(poly_obj / 5, np.poly1d)
+assert_type(5 / poly_obj, np.poly1d)
+
+assert_type(poly_obj[0], Any)
+poly_obj[0] = 5
+assert_type(iter(poly_obj), Iterator[Any])
+assert_type(poly_obj.deriv(), np.poly1d)
+assert_type(poly_obj.integ(), np.poly1d)
+
+assert_type(np.poly(poly_obj), npt.NDArray[np.floating[Any]])
+assert_type(np.poly(AR_f8), npt.NDArray[np.floating[Any]])
+assert_type(np.poly(AR_c16), npt.NDArray[np.floating[Any]])
+
+assert_type(np.polyint(poly_obj), np.poly1d)
+assert_type(np.polyint(AR_f8), npt.NDArray[np.floating[Any]])
+assert_type(np.polyint(AR_f8, k=AR_c16), npt.NDArray[np.complexfloating[Any, Any]])
+assert_type(np.polyint(AR_O, m=2), npt.NDArray[np.object_])
+
+assert_type(np.polyder(poly_obj), np.poly1d)
+assert_type(np.polyder(AR_f8), npt.NDArray[np.floating[Any]])
+assert_type(np.polyder(AR_c16), npt.NDArray[np.complexfloating[Any, Any]])
+assert_type(np.polyder(AR_O, m=2), npt.NDArray[np.object_])
+
+assert_type(np.polyfit(AR_f8, AR_f8, 2), npt.NDArray[np.float64])
+assert_type(
+    np.polyfit(AR_f8, AR_i8, 1, full=True),
+    tuple[
+        npt.NDArray[np.float64],
+        npt.NDArray[np.float64],
+        npt.NDArray[np.int32],
+        npt.NDArray[np.float64],
+        npt.NDArray[np.float64],
+    ],
+)
+assert_type(
+    np.polyfit(AR_u4, AR_f8, 1.0, cov="unscaled"),
+    tuple[
+        npt.NDArray[np.float64],
+        npt.NDArray[np.float64],
+    ],
+)
+assert_type(np.polyfit(AR_c16, AR_f8, 2), npt.NDArray[np.complex128])
+assert_type(
+    np.polyfit(AR_f8, AR_c16, 1, full=True),
+    tuple[
+        npt.NDArray[np.complex128],
+        npt.NDArray[np.float64],
+        npt.NDArray[np.int32],
+        npt.NDArray[np.float64],
+        npt.NDArray[np.float64],
+    ],
+)
+assert_type(
+    np.polyfit(AR_u4, AR_c16, 1.0, cov=True),
+    tuple[
+        npt.NDArray[np.complex128],
+        npt.NDArray[np.complex128],
+    ],
+)
+
+assert_type(np.polyval(AR_b, AR_b), npt.NDArray[np.int64])
+assert_type(np.polyval(AR_u4, AR_b), npt.NDArray[np.unsignedinteger[Any]])
+assert_type(np.polyval(AR_i8, AR_i8), npt.NDArray[np.signedinteger[Any]])
+assert_type(np.polyval(AR_f8, AR_i8), npt.NDArray[np.floating[Any]])
+assert_type(np.polyval(AR_i8, AR_c16), npt.NDArray[np.complexfloating[Any, Any]])
+assert_type(np.polyval(AR_O, AR_O), npt.NDArray[np.object_])
+
+assert_type(np.polyadd(poly_obj, AR_i8), np.poly1d)
+assert_type(np.polyadd(AR_f8, poly_obj), np.poly1d)
+assert_type(np.polyadd(AR_b, AR_b), npt.NDArray[np.bool_])
+assert_type(np.polyadd(AR_u4, AR_b), npt.NDArray[np.unsignedinteger[Any]])
+assert_type(np.polyadd(AR_i8, AR_i8), npt.NDArray[np.signedinteger[Any]])
+assert_type(np.polyadd(AR_f8, AR_i8), npt.NDArray[np.floating[Any]])
+assert_type(np.polyadd(AR_i8, AR_c16), npt.NDArray[np.complexfloating[Any, Any]])
+assert_type(np.polyadd(AR_O, AR_O), npt.NDArray[np.object_])
+
+assert_type(np.polysub(poly_obj, AR_i8), np.poly1d)
+assert_type(np.polysub(AR_f8, poly_obj), np.poly1d)
+assert_type(np.polysub(AR_b, AR_b), NoReturn)
+assert_type(np.polysub(AR_u4, AR_b), npt.NDArray[np.unsignedinteger[Any]])
+assert_type(np.polysub(AR_i8, AR_i8), npt.NDArray[np.signedinteger[Any]])
+assert_type(np.polysub(AR_f8, AR_i8), npt.NDArray[np.floating[Any]])
+assert_type(np.polysub(AR_i8, AR_c16), npt.NDArray[np.complexfloating[Any, Any]])
+assert_type(np.polysub(AR_O, AR_O), npt.NDArray[np.object_])
+
+assert_type(np.polymul(poly_obj, AR_i8), np.poly1d)
+assert_type(np.polymul(AR_f8, poly_obj), np.poly1d)
+assert_type(np.polymul(AR_b, AR_b), npt.NDArray[np.bool_])
+assert_type(np.polymul(AR_u4, AR_b), npt.NDArray[np.unsignedinteger[Any]])
+assert_type(np.polymul(AR_i8, AR_i8), npt.NDArray[np.signedinteger[Any]])
+assert_type(np.polymul(AR_f8, AR_i8), npt.NDArray[np.floating[Any]])
+assert_type(np.polymul(AR_i8, AR_c16), npt.NDArray[np.complexfloating[Any, Any]])
+assert_type(np.polymul(AR_O, AR_O), npt.NDArray[np.object_])
+
+assert_type(np.polydiv(poly_obj, AR_i8), tuple[np.poly1d, np.poly1d])
+assert_type(np.polydiv(AR_f8, poly_obj), tuple[np.poly1d, np.poly1d])
+assert_type(np.polydiv(AR_b, AR_b), tuple[npt.NDArray[np.floating[Any]], npt.NDArray[np.floating[Any]]])
+assert_type(np.polydiv(AR_u4, AR_b), tuple[npt.NDArray[np.floating[Any]], npt.NDArray[np.floating[Any]]])
+assert_type(np.polydiv(AR_i8, AR_i8), tuple[npt.NDArray[np.floating[Any]], npt.NDArray[np.floating[Any]]])
+assert_type(np.polydiv(AR_f8, AR_i8), tuple[npt.NDArray[np.floating[Any]], npt.NDArray[np.floating[Any]]])
+assert_type(np.polydiv(AR_i8, AR_c16), tuple[npt.NDArray[np.complexfloating[Any, Any]], npt.NDArray[np.complexfloating[Any, Any]]])
+assert_type(np.polydiv(AR_O, AR_O), tuple[npt.NDArray[Any], npt.NDArray[Any]])
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/lib_utils.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/lib_utils.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..7b15cf18fdf57924449a0ab3200e60f557a46b8e
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/lib_utils.pyi
@@ -0,0 +1,41 @@
+import sys
+from io import StringIO
+from typing import Any, Protocol
+
+import numpy as np
+import numpy.typing as npt
+from numpy.lib.utils import _Deprecate
+
+if sys.version_info >= (3, 11):
+    from typing import assert_type
+else:
+    from typing_extensions import assert_type
+
+AR: npt.NDArray[np.float64]
+AR_DICT: dict[str, npt.NDArray[np.float64]]
+FILE: StringIO
+
+def func(a: int) -> bool: ...
+
+class FuncProtocol(Protocol):
+    def __call__(self, a: int) -> bool: ...
+
+assert_type(np.deprecate(func), FuncProtocol)
+assert_type(np.deprecate(), _Deprecate)
+
+assert_type(np.deprecate_with_doc("test"), _Deprecate)
+assert_type(np.deprecate_with_doc(None), _Deprecate)
+
+assert_type(np.byte_bounds(AR), tuple[int, int])
+assert_type(np.byte_bounds(np.float64()), tuple[int, int])
+
+assert_type(np.who(None), None)
+assert_type(np.who(AR_DICT), None)
+
+assert_type(np.info(1, output=FILE), None)
+
+assert_type(np.source(np.interp, output=FILE), None)
+
+assert_type(np.lookfor("binary representation", output=FILE), None)
+
+assert_type(np.safe_eval("1 + 1"), Any)
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/lib_version.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/lib_version.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..142d88bdbb8aae6bfd7354b1a48a33fd6f6b67b5
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/lib_version.pyi
@@ -0,0 +1,25 @@
+import sys
+
+from numpy.lib import NumpyVersion
+
+if sys.version_info >= (3, 11):
+    from typing import assert_type
+else:
+    from typing_extensions import assert_type
+
+version = NumpyVersion("1.8.0")
+
+assert_type(version.vstring, str)
+assert_type(version.version, str)
+assert_type(version.major, int)
+assert_type(version.minor, int)
+assert_type(version.bugfix, int)
+assert_type(version.pre_release, str)
+assert_type(version.is_devversion, bool)
+
+assert_type(version == version, bool)
+assert_type(version != version, bool)
+assert_type(version < "1.8.0", bool)
+assert_type(version <= version, bool)
+assert_type(version > version, bool)
+assert_type(version >= "1.8.0", bool)
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/linalg.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/linalg.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..f011aedd93db337e468a6f4f450c11800a5f3ae4
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/linalg.pyi
@@ -0,0 +1,106 @@
+import sys
+from typing import Any
+
+import numpy as np
+import numpy.typing as npt
+from numpy.linalg.linalg import QRResult, EigResult, EighResult, SVDResult, SlogdetResult
+
+if sys.version_info >= (3, 11):
+    from typing import assert_type
+else:
+    from typing_extensions import assert_type
+
+AR_i8: npt.NDArray[np.int64]
+AR_f8: npt.NDArray[np.float64]
+AR_c16: npt.NDArray[np.complex128]
+AR_O: npt.NDArray[np.object_]
+AR_m: npt.NDArray[np.timedelta64]
+AR_S: npt.NDArray[np.str_]
+
+assert_type(np.linalg.tensorsolve(AR_i8, AR_i8), npt.NDArray[np.float64])
+assert_type(np.linalg.tensorsolve(AR_i8, AR_f8), npt.NDArray[np.floating[Any]])
+assert_type(np.linalg.tensorsolve(AR_c16, AR_f8), npt.NDArray[np.complexfloating[Any, Any]])
+
+assert_type(np.linalg.solve(AR_i8, AR_i8), npt.NDArray[np.float64])
+assert_type(np.linalg.solve(AR_i8, AR_f8), npt.NDArray[np.floating[Any]])
+assert_type(np.linalg.solve(AR_c16, AR_f8), npt.NDArray[np.complexfloating[Any, Any]])
+
+assert_type(np.linalg.tensorinv(AR_i8), npt.NDArray[np.float64])
+assert_type(np.linalg.tensorinv(AR_f8), npt.NDArray[np.floating[Any]])
+assert_type(np.linalg.tensorinv(AR_c16), npt.NDArray[np.complexfloating[Any, Any]])
+
+assert_type(np.linalg.inv(AR_i8), npt.NDArray[np.float64])
+assert_type(np.linalg.inv(AR_f8), npt.NDArray[np.floating[Any]])
+assert_type(np.linalg.inv(AR_c16), npt.NDArray[np.complexfloating[Any, Any]])
+
+assert_type(np.linalg.matrix_power(AR_i8, -1), npt.NDArray[Any])
+assert_type(np.linalg.matrix_power(AR_f8, 0), npt.NDArray[Any])
+assert_type(np.linalg.matrix_power(AR_c16, 1), npt.NDArray[Any])
+assert_type(np.linalg.matrix_power(AR_O, 2), npt.NDArray[Any])
+
+assert_type(np.linalg.cholesky(AR_i8), npt.NDArray[np.float64])
+assert_type(np.linalg.cholesky(AR_f8), npt.NDArray[np.floating[Any]])
+assert_type(np.linalg.cholesky(AR_c16), npt.NDArray[np.complexfloating[Any, Any]])
+
+assert_type(np.linalg.qr(AR_i8), QRResult)
+assert_type(np.linalg.qr(AR_f8), QRResult)
+assert_type(np.linalg.qr(AR_c16), QRResult)
+
+assert_type(np.linalg.eigvals(AR_i8), npt.NDArray[np.float64] | npt.NDArray[np.complex128])
+assert_type(np.linalg.eigvals(AR_f8), npt.NDArray[np.floating[Any]] | npt.NDArray[np.complexfloating[Any, Any]])
+assert_type(np.linalg.eigvals(AR_c16), npt.NDArray[np.complexfloating[Any, Any]])
+
+assert_type(np.linalg.eigvalsh(AR_i8), npt.NDArray[np.float64])
+assert_type(np.linalg.eigvalsh(AR_f8), npt.NDArray[np.floating[Any]])
+assert_type(np.linalg.eigvalsh(AR_c16), npt.NDArray[np.floating[Any]])
+
+assert_type(np.linalg.eig(AR_i8), EigResult)
+assert_type(np.linalg.eig(AR_f8), EigResult)
+assert_type(np.linalg.eig(AR_c16), EigResult)
+
+assert_type(np.linalg.eigh(AR_i8), EighResult)
+assert_type(np.linalg.eigh(AR_f8), EighResult)
+assert_type(np.linalg.eigh(AR_c16), EighResult)
+
+assert_type(np.linalg.svd(AR_i8), SVDResult)
+assert_type(np.linalg.svd(AR_f8), SVDResult)
+assert_type(np.linalg.svd(AR_c16), SVDResult)
+assert_type(np.linalg.svd(AR_i8, compute_uv=False), npt.NDArray[np.float64])
+assert_type(np.linalg.svd(AR_f8, compute_uv=False), npt.NDArray[np.floating[Any]])
+assert_type(np.linalg.svd(AR_c16, compute_uv=False), npt.NDArray[np.floating[Any]])
+
+assert_type(np.linalg.cond(AR_i8), Any)
+assert_type(np.linalg.cond(AR_f8), Any)
+assert_type(np.linalg.cond(AR_c16), Any)
+
+assert_type(np.linalg.matrix_rank(AR_i8), Any)
+assert_type(np.linalg.matrix_rank(AR_f8), Any)
+assert_type(np.linalg.matrix_rank(AR_c16), Any)
+
+assert_type(np.linalg.pinv(AR_i8), npt.NDArray[np.float64])
+assert_type(np.linalg.pinv(AR_f8), npt.NDArray[np.floating[Any]])
+assert_type(np.linalg.pinv(AR_c16), npt.NDArray[np.complexfloating[Any, Any]])
+
+assert_type(np.linalg.slogdet(AR_i8), SlogdetResult)
+assert_type(np.linalg.slogdet(AR_f8), SlogdetResult)
+assert_type(np.linalg.slogdet(AR_c16), SlogdetResult)
+
+assert_type(np.linalg.det(AR_i8), Any)
+assert_type(np.linalg.det(AR_f8), Any)
+assert_type(np.linalg.det(AR_c16), Any)
+
+assert_type(np.linalg.lstsq(AR_i8, AR_i8), tuple[npt.NDArray[np.float64], npt.NDArray[np.float64], np.int32, npt.NDArray[np.float64]])
+assert_type(np.linalg.lstsq(AR_i8, AR_f8), tuple[npt.NDArray[np.floating[Any]], npt.NDArray[np.floating[Any]], np.int32, npt.NDArray[np.floating[Any]]])
+assert_type(np.linalg.lstsq(AR_f8, AR_c16), tuple[npt.NDArray[np.complexfloating[Any, Any]], npt.NDArray[np.floating[Any]], np.int32, npt.NDArray[np.floating[Any]]])
+
+assert_type(np.linalg.norm(AR_i8), np.floating[Any])
+assert_type(np.linalg.norm(AR_f8), np.floating[Any])
+assert_type(np.linalg.norm(AR_c16), np.floating[Any])
+assert_type(np.linalg.norm(AR_S), np.floating[Any])
+assert_type(np.linalg.norm(AR_f8, axis=0), Any)
+
+assert_type(np.linalg.multi_dot([AR_i8, AR_i8]), Any)
+assert_type(np.linalg.multi_dot([AR_i8, AR_f8]), Any)
+assert_type(np.linalg.multi_dot([AR_f8, AR_c16]), Any)
+assert_type(np.linalg.multi_dot([AR_O, AR_O]), Any)
+assert_type(np.linalg.multi_dot([AR_m, AR_m]), Any)
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/matrix.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/matrix.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..3fd1ddb94d253a53f786c2b54d40273dbcb42ee9
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/matrix.pyi
@@ -0,0 +1,76 @@
+import sys
+from typing import Any
+
+import numpy as np
+import numpy.typing as npt
+
+if sys.version_info >= (3, 11):
+    from typing import assert_type
+else:
+    from typing_extensions import assert_type
+
+mat: np.matrix[Any, np.dtype[np.int64]]
+ar_f8: npt.NDArray[np.float64]
+
+assert_type(mat * 5, np.matrix[Any, Any])
+assert_type(5 * mat, np.matrix[Any, Any])
+mat *= 5
+
+assert_type(mat**5, np.matrix[Any, Any])
+mat **= 5
+
+assert_type(mat.sum(), Any)
+assert_type(mat.mean(), Any)
+assert_type(mat.std(), Any)
+assert_type(mat.var(), Any)
+assert_type(mat.prod(), Any)
+assert_type(mat.any(), np.bool_)
+assert_type(mat.all(), np.bool_)
+assert_type(mat.max(), np.int64)
+assert_type(mat.min(), np.int64)
+assert_type(mat.argmax(), np.intp)
+assert_type(mat.argmin(), np.intp)
+assert_type(mat.ptp(), np.int64)
+
+assert_type(mat.sum(axis=0), np.matrix[Any, Any])
+assert_type(mat.mean(axis=0), np.matrix[Any, Any])
+assert_type(mat.std(axis=0), np.matrix[Any, Any])
+assert_type(mat.var(axis=0), np.matrix[Any, Any])
+assert_type(mat.prod(axis=0), np.matrix[Any, Any])
+assert_type(mat.any(axis=0), np.matrix[Any, np.dtype[np.bool_]])
+assert_type(mat.all(axis=0), np.matrix[Any, np.dtype[np.bool_]])
+assert_type(mat.max(axis=0), np.matrix[Any, np.dtype[np.int64]])
+assert_type(mat.min(axis=0), np.matrix[Any, np.dtype[np.int64]])
+assert_type(mat.argmax(axis=0), np.matrix[Any, np.dtype[np.intp]])
+assert_type(mat.argmin(axis=0), np.matrix[Any, np.dtype[np.intp]])
+assert_type(mat.ptp(axis=0), np.matrix[Any, np.dtype[np.int64]])
+
+assert_type(mat.sum(out=ar_f8), npt.NDArray[np.float64])
+assert_type(mat.mean(out=ar_f8), npt.NDArray[np.float64])
+assert_type(mat.std(out=ar_f8), npt.NDArray[np.float64])
+assert_type(mat.var(out=ar_f8), npt.NDArray[np.float64])
+assert_type(mat.prod(out=ar_f8), npt.NDArray[np.float64])
+assert_type(mat.any(out=ar_f8), npt.NDArray[np.float64])
+assert_type(mat.all(out=ar_f8), npt.NDArray[np.float64])
+assert_type(mat.max(out=ar_f8), npt.NDArray[np.float64])
+assert_type(mat.min(out=ar_f8), npt.NDArray[np.float64])
+assert_type(mat.argmax(out=ar_f8), npt.NDArray[np.float64])
+assert_type(mat.argmin(out=ar_f8), npt.NDArray[np.float64])
+assert_type(mat.ptp(out=ar_f8), npt.NDArray[np.float64])
+
+assert_type(mat.T, np.matrix[Any, np.dtype[np.int64]])
+assert_type(mat.I, np.matrix[Any, Any])
+assert_type(mat.A, npt.NDArray[np.int64])
+assert_type(mat.A1, npt.NDArray[np.int64])
+assert_type(mat.H, np.matrix[Any, np.dtype[np.int64]])
+assert_type(mat.getT(), np.matrix[Any, np.dtype[np.int64]])
+assert_type(mat.getI(), np.matrix[Any, Any])
+assert_type(mat.getA(), npt.NDArray[np.int64])
+assert_type(mat.getA1(), npt.NDArray[np.int64])
+assert_type(mat.getH(), np.matrix[Any, np.dtype[np.int64]])
+
+assert_type(np.bmat(ar_f8), np.matrix[Any, Any])
+assert_type(np.bmat([[0, 1, 2]]), np.matrix[Any, Any])
+assert_type(np.bmat("mat"), np.matrix[Any, Any])
+
+assert_type(np.asmatrix(ar_f8, dtype=np.int64), np.matrix[Any, Any])
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/memmap.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/memmap.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..53278ff1122b126c90ac45ecbd1b0b26b09a037b
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/memmap.pyi
@@ -0,0 +1,25 @@
+import sys
+from typing import Any
+
+import numpy as np
+
+if sys.version_info >= (3, 11):
+    from typing import assert_type
+else:
+    from typing_extensions import assert_type
+
+memmap_obj: np.memmap[Any, np.dtype[np.str_]]
+
+assert_type(np.memmap.__array_priority__, float)
+assert_type(memmap_obj.__array_priority__, float)
+assert_type(memmap_obj.filename, str | None)
+assert_type(memmap_obj.offset, int)
+assert_type(memmap_obj.mode, str)
+assert_type(memmap_obj.flush(), None)
+
+assert_type(np.memmap("file.txt", offset=5), np.memmap[Any, np.dtype[np.uint8]])
+assert_type(np.memmap(b"file.txt", dtype=np.float64, shape=(10, 3)), np.memmap[Any, np.dtype[np.float64]])
+with open("file.txt", "rb") as f:
+    assert_type(np.memmap(f, dtype=float, order="K"), np.memmap[Any, np.dtype[Any]])
+
+assert_type(memmap_obj.__array_finalize__(object()), None)
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/mod.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/mod.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..48fee893cd895fe4ab7cda95421f90a0c587167d
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/mod.pyi
@@ -0,0 +1,148 @@
+import sys
+from typing import Any
+
+import numpy as np
+import numpy.typing as npt
+from numpy._typing import _32Bit, _64Bit
+
+if sys.version_info >= (3, 11):
+    from typing import assert_type
+else:
+    from typing_extensions import assert_type
+
+f8 = np.float64()
+i8 = np.int64()
+u8 = np.uint64()
+
+f4 = np.float32()
+i4 = np.int32()
+u4 = np.uint32()
+
+td = np.timedelta64(0, "D")
+b_ = np.bool_()
+
+b = bool()
+f = float()
+i = int()
+
+AR_b: npt.NDArray[np.bool_]
+AR_m: npt.NDArray[np.timedelta64]
+
+# Time structures
+
+assert_type(td % td, np.timedelta64)
+assert_type(AR_m % td, npt.NDArray[np.timedelta64])
+assert_type(td % AR_m, npt.NDArray[np.timedelta64])
+
+assert_type(divmod(td, td), tuple[np.int64, np.timedelta64])
+assert_type(divmod(AR_m, td), tuple[npt.NDArray[np.int64], npt.NDArray[np.timedelta64]])
+assert_type(divmod(td, AR_m), tuple[npt.NDArray[np.int64], npt.NDArray[np.timedelta64]])
+
+# Bool
+
+assert_type(b_ % b, np.int8)
+assert_type(b_ % i, np.int_)
+assert_type(b_ % f, np.float64)
+assert_type(b_ % b_, np.int8)
+assert_type(b_ % i8, np.int64)
+assert_type(b_ % u8, np.uint64)
+assert_type(b_ % f8, np.float64)
+assert_type(b_ % AR_b, npt.NDArray[np.int8])
+
+assert_type(divmod(b_, b), tuple[np.int8, np.int8])
+assert_type(divmod(b_, i), tuple[np.int_, np.int_])
+assert_type(divmod(b_, f), tuple[np.float64, np.float64])
+assert_type(divmod(b_, b_), tuple[np.int8, np.int8])
+assert_type(divmod(b_, i8), tuple[np.int64, np.int64])
+assert_type(divmod(b_, u8), tuple[np.uint64, np.uint64])
+assert_type(divmod(b_, f8), tuple[np.float64, np.float64])
+assert_type(divmod(b_, AR_b), tuple[npt.NDArray[np.int8], npt.NDArray[np.int8]])
+
+assert_type(b % b_, np.int8)
+assert_type(i % b_, np.int_)
+assert_type(f % b_, np.float64)
+assert_type(b_ % b_, np.int8)
+assert_type(i8 % b_, np.int64)
+assert_type(u8 % b_, np.uint64)
+assert_type(f8 % b_, np.float64)
+assert_type(AR_b % b_, npt.NDArray[np.int8])
+
+assert_type(divmod(b, b_), tuple[np.int8, np.int8])
+assert_type(divmod(i, b_), tuple[np.int_, np.int_])
+assert_type(divmod(f, b_), tuple[np.float64, np.float64])
+assert_type(divmod(b_, b_), tuple[np.int8, np.int8])
+assert_type(divmod(i8, b_), tuple[np.int64, np.int64])
+assert_type(divmod(u8, b_), tuple[np.uint64, np.uint64])
+assert_type(divmod(f8, b_), tuple[np.float64, np.float64])
+assert_type(divmod(AR_b, b_), tuple[npt.NDArray[np.int8], npt.NDArray[np.int8]])
+
+# int
+
+assert_type(i8 % b, np.int64)
+assert_type(i8 % f, np.float64)
+assert_type(i8 % i8, np.int64)
+assert_type(i8 % f8, np.float64)
+assert_type(i4 % i8, np.signedinteger[_32Bit | _64Bit])
+assert_type(i4 % f8, np.floating[_32Bit | _64Bit])
+assert_type(i4 % i4, np.int32)
+assert_type(i4 % f4, np.float32)
+assert_type(i8 % AR_b, npt.NDArray[np.signedinteger[Any]])
+
+assert_type(divmod(i8, b), tuple[np.int64, np.int64])
+assert_type(divmod(i8, f), tuple[np.float64, np.float64])
+assert_type(divmod(i8, i8), tuple[np.int64, np.int64])
+assert_type(divmod(i8, f8), tuple[np.float64, np.float64])
+assert_type(divmod(i8, i4), tuple[np.signedinteger[_32Bit | _64Bit], np.signedinteger[_32Bit | _64Bit]])
+assert_type(divmod(i8, f4), tuple[np.floating[_32Bit | _64Bit], np.floating[_32Bit | _64Bit]])
+assert_type(divmod(i4, i4), tuple[np.int32, np.int32])
+assert_type(divmod(i4, f4), tuple[np.float32, np.float32])
+assert_type(divmod(i8, AR_b), tuple[npt.NDArray[np.signedinteger[Any]], npt.NDArray[np.signedinteger[Any]]])
+
+assert_type(b % i8, np.int64)
+assert_type(f % i8, np.float64)
+assert_type(i8 % i8, np.int64)
+assert_type(f8 % i8, np.float64)
+assert_type(i8 % i4, np.signedinteger[_32Bit | _64Bit])
+assert_type(f8 % i4, np.floating[_32Bit | _64Bit])
+assert_type(i4 % i4, np.int32)
+assert_type(f4 % i4, np.float32)
+assert_type(AR_b % i8, npt.NDArray[np.signedinteger[Any]])
+
+assert_type(divmod(b, i8), tuple[np.int64, np.int64])
+assert_type(divmod(f, i8), tuple[np.float64, np.float64])
+assert_type(divmod(i8, i8), tuple[np.int64, np.int64])
+assert_type(divmod(f8, i8), tuple[np.float64, np.float64])
+assert_type(divmod(i4, i8), tuple[np.signedinteger[_32Bit | _64Bit], np.signedinteger[_32Bit | _64Bit]])
+assert_type(divmod(f4, i8), tuple[np.floating[_32Bit | _64Bit], np.floating[_32Bit | _64Bit]])
+assert_type(divmod(i4, i4), tuple[np.int32, np.int32])
+assert_type(divmod(f4, i4), tuple[np.float32, np.float32])
+assert_type(divmod(AR_b, i8), tuple[npt.NDArray[np.signedinteger[Any]], npt.NDArray[np.signedinteger[Any]]])
+
+# float
+
+assert_type(f8 % b, np.float64)
+assert_type(f8 % f, np.float64)
+assert_type(i8 % f4, np.floating[_32Bit | _64Bit])
+assert_type(f4 % f4, np.float32)
+assert_type(f8 % AR_b, npt.NDArray[np.floating[Any]])
+
+assert_type(divmod(f8, b), tuple[np.float64, np.float64])
+assert_type(divmod(f8, f), tuple[np.float64, np.float64])
+assert_type(divmod(f8, f8), tuple[np.float64, np.float64])
+assert_type(divmod(f8, f4), tuple[np.floating[_32Bit | _64Bit], np.floating[_32Bit | _64Bit]])
+assert_type(divmod(f4, f4), tuple[np.float32, np.float32])
+assert_type(divmod(f8, AR_b), tuple[npt.NDArray[np.floating[Any]], npt.NDArray[np.floating[Any]]])
+
+assert_type(b % f8, np.float64)
+assert_type(f % f8, np.float64)
+assert_type(f8 % f8, np.float64)
+assert_type(f8 % f8, np.float64)
+assert_type(f4 % f4, np.float32)
+assert_type(AR_b % f8, npt.NDArray[np.floating[Any]])
+
+assert_type(divmod(b, f8), tuple[np.float64, np.float64])
+assert_type(divmod(f, f8), tuple[np.float64, np.float64])
+assert_type(divmod(f8, f8), tuple[np.float64, np.float64])
+assert_type(divmod(f4, f8), tuple[np.floating[_32Bit | _64Bit], np.floating[_32Bit | _64Bit]])
+assert_type(divmod(f4, f4), tuple[np.float32, np.float32])
+assert_type(divmod(AR_b, f8), tuple[npt.NDArray[np.floating[Any]], npt.NDArray[np.floating[Any]]])
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/modules.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/modules.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..1ab01cd079c20203657ef3f3e784d84f55d0dee4
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/modules.pyi
@@ -0,0 +1,56 @@
+import sys
+import types
+
+import numpy as np
+from numpy import f2py
+
+if sys.version_info >= (3, 11):
+    from typing import assert_type
+else:
+    from typing_extensions import assert_type
+
+assert_type(np, types.ModuleType)
+
+assert_type(np.char, types.ModuleType)
+assert_type(np.ctypeslib, types.ModuleType)
+assert_type(np.emath, types.ModuleType)
+assert_type(np.fft, types.ModuleType)
+assert_type(np.lib, types.ModuleType)
+assert_type(np.linalg, types.ModuleType)
+assert_type(np.ma, types.ModuleType)
+assert_type(np.matrixlib, types.ModuleType)
+assert_type(np.polynomial, types.ModuleType)
+assert_type(np.random, types.ModuleType)
+assert_type(np.rec, types.ModuleType)
+assert_type(np.testing, types.ModuleType)
+assert_type(np.version, types.ModuleType)
+assert_type(np.exceptions, types.ModuleType)
+assert_type(np.dtypes, types.ModuleType)
+
+assert_type(np.lib.format, types.ModuleType)
+assert_type(np.lib.mixins, types.ModuleType)
+assert_type(np.lib.scimath, types.ModuleType)
+assert_type(np.lib.stride_tricks, types.ModuleType)
+assert_type(np.ma.extras, types.ModuleType)
+assert_type(np.polynomial.chebyshev, types.ModuleType)
+assert_type(np.polynomial.hermite, types.ModuleType)
+assert_type(np.polynomial.hermite_e, types.ModuleType)
+assert_type(np.polynomial.laguerre, types.ModuleType)
+assert_type(np.polynomial.legendre, types.ModuleType)
+assert_type(np.polynomial.polynomial, types.ModuleType)
+
+assert_type(np.__path__, list[str])
+assert_type(np.__version__, str)
+assert_type(np.test, np._pytesttester.PytestTester)
+assert_type(np.test.module_name, str)
+
+assert_type(np.__all__, list[str])
+assert_type(np.char.__all__, list[str])
+assert_type(np.ctypeslib.__all__, list[str])
+assert_type(np.emath.__all__, list[str])
+assert_type(np.lib.__all__, list[str])
+assert_type(np.ma.__all__, list[str])
+assert_type(np.random.__all__, list[str])
+assert_type(np.rec.__all__, list[str])
+assert_type(np.testing.__all__, list[str])
+assert_type(f2py.__all__, list[str])
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/multiarray.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/multiarray.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..4254b796df76edcc9705117e906c7f6f1fb5a1c1
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/multiarray.pyi
@@ -0,0 +1,150 @@
+import sys
+import datetime as dt
+from typing import Any, TypeVar
+from pathlib import Path
+
+import numpy as np
+import numpy.typing as npt
+
+if sys.version_info >= (3, 11):
+    from typing import assert_type
+else:
+    from typing_extensions import assert_type
+
+_SCT = TypeVar("_SCT", bound=np.generic, covariant=True)
+
+class SubClass(np.ndarray[Any, np.dtype[_SCT]]): ...
+
+subclass: SubClass[np.float64]
+
+AR_f8: npt.NDArray[np.float64]
+AR_i8: npt.NDArray[np.int64]
+AR_u1: npt.NDArray[np.uint8]
+AR_m: npt.NDArray[np.timedelta64]
+AR_M: npt.NDArray[np.datetime64]
+
+AR_LIKE_f: list[float]
+AR_LIKE_i: list[int]
+
+m: np.timedelta64
+M: np.datetime64
+
+b_f8 = np.broadcast(AR_f8)
+b_i8_f8_f8 = np.broadcast(AR_i8, AR_f8, AR_f8)
+
+nditer_obj: np.nditer
+
+date_scalar: dt.date
+date_seq: list[dt.date]
+timedelta_seq: list[dt.timedelta]
+
+def func(a: int) -> bool: ...
+
+assert_type(next(b_f8), tuple[Any, ...])
+assert_type(b_f8.reset(), None)
+assert_type(b_f8.index, int)
+assert_type(b_f8.iters, tuple[np.flatiter[Any], ...])
+assert_type(b_f8.nd, int)
+assert_type(b_f8.ndim, int)
+assert_type(b_f8.numiter, int)
+assert_type(b_f8.shape, tuple[int, ...])
+assert_type(b_f8.size, int)
+
+assert_type(next(b_i8_f8_f8), tuple[Any, ...])
+assert_type(b_i8_f8_f8.reset(), None)
+assert_type(b_i8_f8_f8.index, int)
+assert_type(b_i8_f8_f8.iters, tuple[np.flatiter[Any], ...])
+assert_type(b_i8_f8_f8.nd, int)
+assert_type(b_i8_f8_f8.ndim, int)
+assert_type(b_i8_f8_f8.numiter, int)
+assert_type(b_i8_f8_f8.shape, tuple[int, ...])
+assert_type(b_i8_f8_f8.size, int)
+
+assert_type(np.inner(AR_f8, AR_i8), Any)
+
+assert_type(np.where([True, True, False]), tuple[npt.NDArray[np.intp], ...])
+assert_type(np.where([True, True, False], 1, 0), npt.NDArray[Any])
+
+assert_type(np.lexsort([0, 1, 2]), Any)
+
+assert_type(np.can_cast(np.dtype("i8"), int), bool)
+assert_type(np.can_cast(AR_f8, "f8"), bool)
+assert_type(np.can_cast(AR_f8, np.complex128, casting="unsafe"), bool)
+
+assert_type(np.min_scalar_type([1]), np.dtype[Any])
+assert_type(np.min_scalar_type(AR_f8), np.dtype[Any])
+
+assert_type(np.result_type(int, [1]), np.dtype[Any])
+assert_type(np.result_type(AR_f8, AR_u1), np.dtype[Any])
+assert_type(np.result_type(AR_f8, np.complex128), np.dtype[Any])
+
+assert_type(np.dot(AR_LIKE_f, AR_i8), Any)
+assert_type(np.dot(AR_u1, 1), Any)
+assert_type(np.dot(1.5j, 1), Any)
+assert_type(np.dot(AR_u1, 1, out=AR_f8), npt.NDArray[np.float64])
+
+assert_type(np.vdot(AR_LIKE_f, AR_i8), np.floating[Any])
+assert_type(np.vdot(AR_u1, 1), np.signedinteger[Any])
+assert_type(np.vdot(1.5j, 1), np.complexfloating[Any, Any])
+
+assert_type(np.bincount(AR_i8), npt.NDArray[np.intp])
+
+assert_type(np.copyto(AR_f8, [1., 1.5, 1.6]), None)
+
+assert_type(np.putmask(AR_f8, [True, True, False], 1.5), None)
+
+assert_type(np.packbits(AR_i8), npt.NDArray[np.uint8])
+assert_type(np.packbits(AR_u1), npt.NDArray[np.uint8])
+
+assert_type(np.unpackbits(AR_u1), npt.NDArray[np.uint8])
+
+assert_type(np.shares_memory(1, 2), bool)
+assert_type(np.shares_memory(AR_f8, AR_f8, max_work=1), bool)
+
+assert_type(np.may_share_memory(1, 2), bool)
+assert_type(np.may_share_memory(AR_f8, AR_f8, max_work=1), bool)
+
+assert_type(np.geterrobj(), list[Any])
+
+assert_type(np.seterrobj([8192, 521, None]), None)
+
+assert_type(np.promote_types(np.int32, np.int64), np.dtype[Any])
+assert_type(np.promote_types("f4", float), np.dtype[Any])
+
+assert_type(np.frompyfunc(func, 1, 1, identity=None), np.ufunc)
+
+assert_type(np.datetime_data("m8[D]"), tuple[str, int])
+assert_type(np.datetime_data(np.datetime64), tuple[str, int])
+assert_type(np.datetime_data(np.dtype(np.timedelta64)), tuple[str, int])
+
+assert_type(np.busday_count("2011-01", "2011-02"), np.int_)
+assert_type(np.busday_count(["2011-01"], "2011-02"), npt.NDArray[np.int_])
+assert_type(np.busday_count(["2011-01"], date_scalar), npt.NDArray[np.int_])
+
+assert_type(np.busday_offset(M, m), np.datetime64)
+assert_type(np.busday_offset(date_scalar, m), np.datetime64)
+assert_type(np.busday_offset(M, 5), np.datetime64)
+assert_type(np.busday_offset(AR_M, m), npt.NDArray[np.datetime64])
+assert_type(np.busday_offset(M, timedelta_seq), npt.NDArray[np.datetime64])
+assert_type(np.busday_offset("2011-01", "2011-02", roll="forward"), np.datetime64)
+assert_type(np.busday_offset(["2011-01"], "2011-02", roll="forward"), npt.NDArray[np.datetime64])
+
+assert_type(np.is_busday("2012"), np.bool_)
+assert_type(np.is_busday(date_scalar), np.bool_)
+assert_type(np.is_busday(["2012"]), npt.NDArray[np.bool_])
+
+assert_type(np.datetime_as_string(M), np.str_)
+assert_type(np.datetime_as_string(AR_M), npt.NDArray[np.str_])
+
+assert_type(np.busdaycalendar(holidays=date_seq), np.busdaycalendar)
+assert_type(np.busdaycalendar(holidays=[M]), np.busdaycalendar)
+
+assert_type(np.compare_chararrays("a", "b", "!=", rstrip=False), npt.NDArray[np.bool_])
+assert_type(np.compare_chararrays(b"a", b"a", "==", True), npt.NDArray[np.bool_])
+
+assert_type(np.add_docstring(func, "test"), None)
+
+assert_type(np.nested_iters([AR_i8, AR_i8], [[0], [1]], flags=["c_index"]), tuple[np.nditer, ...])
+assert_type(np.nested_iters([AR_i8, AR_i8], [[0], [1]], op_flags=[["readonly", "readonly"]]), tuple[np.nditer, ...])
+assert_type(np.nested_iters([AR_i8, AR_i8], [[0], [1]], op_dtypes=np.int_), tuple[np.nditer, ...])
+assert_type(np.nested_iters([AR_i8, AR_i8], [[0], [1]], order="C", casting="no"), tuple[np.nditer, ...])
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/nbit_base_example.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/nbit_base_example.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..ac2eb1d253235ba6832f7cf2205b760db6ff8b73
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/nbit_base_example.pyi
@@ -0,0 +1,27 @@
+import sys
+from typing import TypeVar
+
+import numpy as np
+import numpy.typing as npt
+from numpy._typing import _64Bit, _32Bit
+
+if sys.version_info >= (3, 11):
+    from typing import assert_type
+else:
+    from typing_extensions import assert_type
+
+T1 = TypeVar("T1", bound=npt.NBitBase)
+T2 = TypeVar("T2", bound=npt.NBitBase)
+
+def add(a: np.floating[T1], b: np.integer[T2]) -> np.floating[T1 | T2]:
+    return a + b
+
+i8: np.int64
+i4: np.int32
+f8: np.float64
+f4: np.float32
+
+assert_type(add(f8, i8), np.float64)
+assert_type(add(f4, i8), np.floating[_32Bit | _64Bit])
+assert_type(add(f8, i4), np.floating[_32Bit | _64Bit])
+assert_type(add(f4, i4), np.float32)
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/ndarray_conversion.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/ndarray_conversion.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..a2fe73891f8478f01539d93d15bd987081e29c7b
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/ndarray_conversion.pyi
@@ -0,0 +1,59 @@
+import sys
+from typing import Any
+
+import numpy as np
+import numpy.typing as npt
+
+if sys.version_info >= (3, 11):
+    from typing import assert_type
+else:
+    from typing_extensions import assert_type
+
+nd: npt.NDArray[np.int_]
+
+# item
+assert_type(nd.item(), int)
+assert_type(nd.item(1), int)
+assert_type(nd.item(0, 1), int)
+assert_type(nd.item((0, 1)), int)
+
+# tolist
+assert_type(nd.tolist(), Any)
+
+# itemset does not return a value
+# tostring is pretty simple
+# tobytes is pretty simple
+# tofile does not return a value
+# dump does not return a value
+# dumps is pretty simple
+
+# astype
+assert_type(nd.astype("float"), npt.NDArray[Any])
+assert_type(nd.astype(float), npt.NDArray[Any])
+assert_type(nd.astype(np.float64), npt.NDArray[np.float64])
+assert_type(nd.astype(np.float64, "K"), npt.NDArray[np.float64])
+assert_type(nd.astype(np.float64, "K", "unsafe"), npt.NDArray[np.float64])
+assert_type(nd.astype(np.float64, "K", "unsafe", True), npt.NDArray[np.float64])
+assert_type(nd.astype(np.float64, "K", "unsafe", True, True), npt.NDArray[np.float64])
+
+# byteswap
+assert_type(nd.byteswap(), npt.NDArray[np.int_])
+assert_type(nd.byteswap(True), npt.NDArray[np.int_])
+
+# copy
+assert_type(nd.copy(), npt.NDArray[np.int_])
+assert_type(nd.copy("C"), npt.NDArray[np.int_])
+
+assert_type(nd.view(), npt.NDArray[np.int_])
+assert_type(nd.view(np.float64), npt.NDArray[np.float64])
+assert_type(nd.view(float), npt.NDArray[Any])
+assert_type(nd.view(np.float64, np.matrix), np.matrix[Any, Any])
+
+# getfield
+assert_type(nd.getfield("float"), npt.NDArray[Any])
+assert_type(nd.getfield(float), npt.NDArray[Any])
+assert_type(nd.getfield(np.float64), npt.NDArray[np.float64])
+assert_type(nd.getfield(np.float64, 8), npt.NDArray[np.float64])
+
+# setflags does not return a value
+# fill does not return a value
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/ndarray_misc.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/ndarray_misc.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..4c1f0935862d98cf25ad67d2c0437abfe80757b4
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/ndarray_misc.pyi
@@ -0,0 +1,226 @@
+"""
+Tests for miscellaneous (non-magic) ``np.ndarray``/``np.generic`` methods.
+
+More extensive tests are performed for the methods'
+function-based counterpart in `../from_numeric.py`.
+
+"""
+
+import sys
+import operator
+import ctypes as ct
+from typing import Any, Literal
+
+import numpy as np
+import numpy.typing as npt
+
+if sys.version_info >= (3, 11):
+    from typing import assert_type
+else:
+    from typing_extensions import assert_type
+
+class SubClass(npt.NDArray[np.object_]): ...
+
+f8: np.float64
+B: SubClass
+AR_f8: npt.NDArray[np.float64]
+AR_i8: npt.NDArray[np.int64]
+AR_U: npt.NDArray[np.str_]
+AR_V: npt.NDArray[np.void]
+
+ctypes_obj = AR_f8.ctypes
+
+assert_type(AR_f8.__dlpack__(), Any)
+assert_type(AR_f8.__dlpack_device__(), tuple[int, Literal[0]])
+
+assert_type(ctypes_obj.data, int)
+assert_type(ctypes_obj.shape, ct.Array[np.ctypeslib.c_intp])
+assert_type(ctypes_obj.strides, ct.Array[np.ctypeslib.c_intp])
+assert_type(ctypes_obj._as_parameter_, ct.c_void_p)
+
+assert_type(ctypes_obj.data_as(ct.c_void_p), ct.c_void_p)
+assert_type(ctypes_obj.shape_as(ct.c_longlong), ct.Array[ct.c_longlong])
+assert_type(ctypes_obj.strides_as(ct.c_ubyte), ct.Array[ct.c_ubyte])
+
+assert_type(f8.all(), np.bool_)
+assert_type(AR_f8.all(), np.bool_)
+assert_type(AR_f8.all(axis=0), Any)
+assert_type(AR_f8.all(keepdims=True), Any)
+assert_type(AR_f8.all(out=B), SubClass)
+
+assert_type(f8.any(), np.bool_)
+assert_type(AR_f8.any(), np.bool_)
+assert_type(AR_f8.any(axis=0), Any)
+assert_type(AR_f8.any(keepdims=True), Any)
+assert_type(AR_f8.any(out=B), SubClass)
+
+assert_type(f8.argmax(), np.intp)
+assert_type(AR_f8.argmax(), np.intp)
+assert_type(AR_f8.argmax(axis=0), Any)
+assert_type(AR_f8.argmax(out=B), SubClass)
+
+assert_type(f8.argmin(), np.intp)
+assert_type(AR_f8.argmin(), np.intp)
+assert_type(AR_f8.argmin(axis=0), Any)
+assert_type(AR_f8.argmin(out=B), SubClass)
+
+assert_type(f8.argsort(), np.ndarray[Any, Any])
+assert_type(AR_f8.argsort(), np.ndarray[Any, Any])
+
+assert_type(f8.astype(np.int64).choose([()]), np.ndarray[Any, Any])
+assert_type(AR_f8.choose([0]), np.ndarray[Any, Any])
+assert_type(AR_f8.choose([0], out=B), SubClass)
+
+assert_type(f8.clip(1), np.ndarray[Any, Any])
+assert_type(AR_f8.clip(1), np.ndarray[Any, Any])
+assert_type(AR_f8.clip(None, 1), np.ndarray[Any, Any])
+assert_type(AR_f8.clip(1, out=B), SubClass)
+assert_type(AR_f8.clip(None, 1, out=B), SubClass)
+
+assert_type(f8.compress([0]), np.ndarray[Any, Any])
+assert_type(AR_f8.compress([0]), np.ndarray[Any, Any])
+assert_type(AR_f8.compress([0], out=B), SubClass)
+
+assert_type(f8.conj(), np.float64)
+assert_type(AR_f8.conj(), npt.NDArray[np.float64])
+assert_type(B.conj(), SubClass)
+
+assert_type(f8.conjugate(), np.float64)
+assert_type(AR_f8.conjugate(), npt.NDArray[np.float64])
+assert_type(B.conjugate(), SubClass)
+
+assert_type(f8.cumprod(), np.ndarray[Any, Any])
+assert_type(AR_f8.cumprod(), np.ndarray[Any, Any])
+assert_type(AR_f8.cumprod(out=B), SubClass)
+
+assert_type(f8.cumsum(), np.ndarray[Any, Any])
+assert_type(AR_f8.cumsum(), np.ndarray[Any, Any])
+assert_type(AR_f8.cumsum(out=B), SubClass)
+
+assert_type(f8.max(), Any)
+assert_type(AR_f8.max(), Any)
+assert_type(AR_f8.max(axis=0), Any)
+assert_type(AR_f8.max(keepdims=True), Any)
+assert_type(AR_f8.max(out=B), SubClass)
+
+assert_type(f8.mean(), Any)
+assert_type(AR_f8.mean(), Any)
+assert_type(AR_f8.mean(axis=0), Any)
+assert_type(AR_f8.mean(keepdims=True), Any)
+assert_type(AR_f8.mean(out=B), SubClass)
+
+assert_type(f8.min(), Any)
+assert_type(AR_f8.min(), Any)
+assert_type(AR_f8.min(axis=0), Any)
+assert_type(AR_f8.min(keepdims=True), Any)
+assert_type(AR_f8.min(out=B), SubClass)
+
+assert_type(f8.newbyteorder(), np.float64)
+assert_type(AR_f8.newbyteorder(), npt.NDArray[np.float64])
+assert_type(B.newbyteorder('|'), SubClass)
+
+assert_type(f8.prod(), Any)
+assert_type(AR_f8.prod(), Any)
+assert_type(AR_f8.prod(axis=0), Any)
+assert_type(AR_f8.prod(keepdims=True), Any)
+assert_type(AR_f8.prod(out=B), SubClass)
+
+assert_type(f8.ptp(), Any)
+assert_type(AR_f8.ptp(), Any)
+assert_type(AR_f8.ptp(axis=0), Any)
+assert_type(AR_f8.ptp(keepdims=True), Any)
+assert_type(AR_f8.ptp(out=B), SubClass)
+
+assert_type(f8.round(), np.float64)
+assert_type(AR_f8.round(), npt.NDArray[np.float64])
+assert_type(AR_f8.round(out=B), SubClass)
+
+assert_type(f8.repeat(1), npt.NDArray[np.float64])
+assert_type(AR_f8.repeat(1), npt.NDArray[np.float64])
+assert_type(B.repeat(1), npt.NDArray[np.object_])
+
+assert_type(f8.std(), Any)
+assert_type(AR_f8.std(), Any)
+assert_type(AR_f8.std(axis=0), Any)
+assert_type(AR_f8.std(keepdims=True), Any)
+assert_type(AR_f8.std(out=B), SubClass)
+
+assert_type(f8.sum(), Any)
+assert_type(AR_f8.sum(), Any)
+assert_type(AR_f8.sum(axis=0), Any)
+assert_type(AR_f8.sum(keepdims=True), Any)
+assert_type(AR_f8.sum(out=B), SubClass)
+
+assert_type(f8.take(0), np.float64)
+assert_type(AR_f8.take(0), np.float64)
+assert_type(AR_f8.take([0]), npt.NDArray[np.float64])
+assert_type(AR_f8.take(0, out=B), SubClass)
+assert_type(AR_f8.take([0], out=B), SubClass)
+
+assert_type(f8.var(), Any)
+assert_type(AR_f8.var(), Any)
+assert_type(AR_f8.var(axis=0), Any)
+assert_type(AR_f8.var(keepdims=True), Any)
+assert_type(AR_f8.var(out=B), SubClass)
+
+assert_type(AR_f8.argpartition([0]), npt.NDArray[np.intp])
+
+assert_type(AR_f8.diagonal(), npt.NDArray[np.float64])
+
+assert_type(AR_f8.dot(1), np.ndarray[Any, Any])
+assert_type(AR_f8.dot([1]), Any)
+assert_type(AR_f8.dot(1, out=B), SubClass)
+
+assert_type(AR_f8.nonzero(), tuple[npt.NDArray[np.intp], ...])
+
+assert_type(AR_f8.searchsorted(1), np.intp)
+assert_type(AR_f8.searchsorted([1]), npt.NDArray[np.intp])
+
+assert_type(AR_f8.trace(), Any)
+assert_type(AR_f8.trace(out=B), SubClass)
+
+assert_type(AR_f8.item(), float)
+assert_type(AR_U.item(), str)
+
+assert_type(AR_f8.ravel(), npt.NDArray[np.float64])
+assert_type(AR_U.ravel(), npt.NDArray[np.str_])
+
+assert_type(AR_f8.flatten(), npt.NDArray[np.float64])
+assert_type(AR_U.flatten(), npt.NDArray[np.str_])
+
+assert_type(AR_f8.reshape(1), npt.NDArray[np.float64])
+assert_type(AR_U.reshape(1), npt.NDArray[np.str_])
+
+assert_type(int(AR_f8), int)
+assert_type(int(AR_U), int)
+
+assert_type(float(AR_f8), float)
+assert_type(float(AR_U), float)
+
+assert_type(complex(AR_f8), complex)
+
+assert_type(operator.index(AR_i8), int)
+
+assert_type(AR_f8.__array_prepare__(B), npt.NDArray[np.object_])
+assert_type(AR_f8.__array_wrap__(B), npt.NDArray[np.object_])
+
+assert_type(AR_V[0], Any)
+assert_type(AR_V[0, 0], Any)
+assert_type(AR_V[AR_i8], npt.NDArray[np.void])
+assert_type(AR_V[AR_i8, AR_i8], npt.NDArray[np.void])
+assert_type(AR_V[AR_i8, None], npt.NDArray[np.void])
+assert_type(AR_V[0, ...], npt.NDArray[np.void])
+assert_type(AR_V[[0]], npt.NDArray[np.void])
+assert_type(AR_V[[0], [0]], npt.NDArray[np.void])
+assert_type(AR_V[:], npt.NDArray[np.void])
+assert_type(AR_V["a"], npt.NDArray[Any])
+assert_type(AR_V[["a", "b"]], npt.NDArray[np.void])
+
+assert_type(AR_f8.dump("test_file"), None)
+assert_type(AR_f8.dump(b"test_file"), None)
+with open("test_file", "wb") as f:
+    assert_type(AR_f8.dump(f), None)
+
+assert_type(AR_f8.__array_finalize__(None), None)
+assert_type(AR_f8.__array_finalize__(B), None)
+assert_type(AR_f8.__array_finalize__(AR_f8), None)
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/ndarray_shape_manipulation.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/ndarray_shape_manipulation.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..9a41a90f1ee92baa07605d5d202530623369bd8a
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/ndarray_shape_manipulation.pyi
@@ -0,0 +1,44 @@
+import sys
+from typing import Any
+
+import numpy as np
+import numpy.typing as npt
+
+if sys.version_info >= (3, 11):
+    from typing import assert_type
+else:
+    from typing_extensions import assert_type
+
+nd: npt.NDArray[np.int64]
+
+# reshape
+assert_type(nd.reshape(), npt.NDArray[np.int64])
+assert_type(nd.reshape(4), npt.NDArray[np.int64])
+assert_type(nd.reshape(2, 2), npt.NDArray[np.int64])
+assert_type(nd.reshape((2, 2)), npt.NDArray[np.int64])
+
+assert_type(nd.reshape((2, 2), order="C"), npt.NDArray[np.int64])
+assert_type(nd.reshape(4, order="C"), npt.NDArray[np.int64])
+
+# resize does not return a value
+
+# transpose
+assert_type(nd.transpose(), npt.NDArray[np.int64])
+assert_type(nd.transpose(1, 0), npt.NDArray[np.int64])
+assert_type(nd.transpose((1, 0)), npt.NDArray[np.int64])
+
+# swapaxes
+assert_type(nd.swapaxes(0, 1), npt.NDArray[np.int64])
+
+# flatten
+assert_type(nd.flatten(), npt.NDArray[np.int64])
+assert_type(nd.flatten("C"), npt.NDArray[np.int64])
+
+# ravel
+assert_type(nd.ravel(), npt.NDArray[np.int64])
+assert_type(nd.ravel("C"), npt.NDArray[np.int64])
+
+# squeeze
+assert_type(nd.squeeze(), npt.NDArray[np.int64])
+assert_type(nd.squeeze(0), npt.NDArray[np.int64])
+assert_type(nd.squeeze((0, 2)), npt.NDArray[np.int64])
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/nditer.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/nditer.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..589453e777f222fa409ae10226921bf848164cd3
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/nditer.pyi
@@ -0,0 +1,55 @@
+import sys
+from typing import Any
+
+import numpy as np
+import numpy.typing as npt
+
+if sys.version_info >= (3, 11):
+    from typing import assert_type
+else:
+    from typing_extensions import assert_type
+
+nditer_obj: np.nditer
+
+assert_type(np.nditer([0, 1], flags=["c_index"]), np.nditer)
+assert_type(np.nditer([0, 1], op_flags=[["readonly", "readonly"]]), np.nditer)
+assert_type(np.nditer([0, 1], op_dtypes=np.int_), np.nditer)
+assert_type(np.nditer([0, 1], order="C", casting="no"), np.nditer)
+
+assert_type(nditer_obj.dtypes, tuple[np.dtype[Any], ...])
+assert_type(nditer_obj.finished, bool)
+assert_type(nditer_obj.has_delayed_bufalloc, bool)
+assert_type(nditer_obj.has_index, bool)
+assert_type(nditer_obj.has_multi_index, bool)
+assert_type(nditer_obj.index, int)
+assert_type(nditer_obj.iterationneedsapi, bool)
+assert_type(nditer_obj.iterindex, int)
+assert_type(nditer_obj.iterrange, tuple[int, ...])
+assert_type(nditer_obj.itersize, int)
+assert_type(nditer_obj.itviews, tuple[npt.NDArray[Any], ...])
+assert_type(nditer_obj.multi_index, tuple[int, ...])
+assert_type(nditer_obj.ndim, int)
+assert_type(nditer_obj.nop, int)
+assert_type(nditer_obj.operands, tuple[npt.NDArray[Any], ...])
+assert_type(nditer_obj.shape, tuple[int, ...])
+assert_type(nditer_obj.value, tuple[npt.NDArray[Any], ...])
+
+assert_type(nditer_obj.close(), None)
+assert_type(nditer_obj.copy(), np.nditer)
+assert_type(nditer_obj.debug_print(), None)
+assert_type(nditer_obj.enable_external_loop(), None)
+assert_type(nditer_obj.iternext(), bool)
+assert_type(nditer_obj.remove_axis(0), None)
+assert_type(nditer_obj.remove_multi_index(), None)
+assert_type(nditer_obj.reset(), None)
+
+assert_type(len(nditer_obj), int)
+assert_type(iter(nditer_obj), np.nditer)
+assert_type(next(nditer_obj), tuple[npt.NDArray[Any], ...])
+assert_type(nditer_obj.__copy__(), np.nditer)
+with nditer_obj as f:
+    assert_type(f, np.nditer)
+assert_type(nditer_obj[0], npt.NDArray[Any])
+assert_type(nditer_obj[:], tuple[npt.NDArray[Any], ...])
+nditer_obj[0] = 0
+nditer_obj[:] = [0, 1]
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/nested_sequence.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/nested_sequence.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..3ca23d6875e8f40143c8c323aa938fdd98b41673
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/nested_sequence.pyi
@@ -0,0 +1,32 @@
+import sys
+from collections.abc import Sequence
+from typing import Any
+
+from numpy._typing import _NestedSequence
+
+if sys.version_info >= (3, 11):
+    from typing import assert_type
+else:
+    from typing_extensions import assert_type
+
+a: Sequence[int]
+b: Sequence[Sequence[int]]
+c: Sequence[Sequence[Sequence[int]]]
+d: Sequence[Sequence[Sequence[Sequence[int]]]]
+e: Sequence[bool]
+f: tuple[int, ...]
+g: list[int]
+h: Sequence[Any]
+
+def func(a: _NestedSequence[int]) -> None:
+    ...
+
+assert_type(func(a), None)
+assert_type(func(b), None)
+assert_type(func(c), None)
+assert_type(func(d), None)
+assert_type(func(e), None)
+assert_type(func(f), None)
+assert_type(func(g), None)
+assert_type(func(h), None)
+assert_type(func(range(15)), None)
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/npyio.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/npyio.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..bbd906068da9254ae00ce343af696fa250b0c815
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/npyio.pyi
@@ -0,0 +1,102 @@
+import re
+import sys
+import zipfile
+import pathlib
+from typing import IO, Any
+from collections.abc import Mapping
+
+import numpy.typing as npt
+import numpy as np
+from numpy.lib.npyio import BagObj, NpzFile
+from numpy.ma.mrecords import MaskedRecords
+
+if sys.version_info >= (3, 11):
+    from typing import assert_type
+else:
+    from typing_extensions import assert_type
+
+str_path: str
+pathlib_path: pathlib.Path
+str_file: IO[str]
+bytes_file: IO[bytes]
+
+bag_obj: BagObj[int]
+npz_file: NpzFile
+
+AR_i8: npt.NDArray[np.int64]
+AR_LIKE_f8: list[float]
+
+class BytesWriter:
+    def write(self, data: bytes) -> None: ...
+
+class BytesReader:
+    def read(self, n: int = ...) -> bytes: ...
+    def seek(self, offset: int, whence: int = ...) -> int: ...
+
+bytes_writer: BytesWriter
+bytes_reader: BytesReader
+
+assert_type(bag_obj.a, int)
+assert_type(bag_obj.b, int)
+
+assert_type(npz_file.zip, zipfile.ZipFile)
+assert_type(npz_file.fid, None | IO[str])
+assert_type(npz_file.files, list[str])
+assert_type(npz_file.allow_pickle, bool)
+assert_type(npz_file.pickle_kwargs, None | Mapping[str, Any])
+assert_type(npz_file.f, BagObj[NpzFile])
+assert_type(npz_file["test"], npt.NDArray[Any])
+assert_type(len(npz_file), int)
+with npz_file as f:
+    assert_type(f, NpzFile)
+
+assert_type(np.load(bytes_file), Any)
+assert_type(np.load(pathlib_path, allow_pickle=True), Any)
+assert_type(np.load(str_path, encoding="bytes"), Any)
+assert_type(np.load(bytes_reader), Any)
+
+assert_type(np.save(bytes_file, AR_LIKE_f8), None)
+assert_type(np.save(pathlib_path, AR_i8, allow_pickle=True), None)
+assert_type(np.save(str_path, AR_LIKE_f8), None)
+assert_type(np.save(bytes_writer, AR_LIKE_f8), None)
+
+assert_type(np.savez(bytes_file, AR_LIKE_f8), None)
+assert_type(np.savez(pathlib_path, ar1=AR_i8, ar2=AR_i8), None)
+assert_type(np.savez(str_path, AR_LIKE_f8, ar1=AR_i8), None)
+assert_type(np.savez(bytes_writer, AR_LIKE_f8, ar1=AR_i8), None)
+
+assert_type(np.savez_compressed(bytes_file, AR_LIKE_f8), None)
+assert_type(np.savez_compressed(pathlib_path, ar1=AR_i8, ar2=AR_i8), None)
+assert_type(np.savez_compressed(str_path, AR_LIKE_f8, ar1=AR_i8), None)
+assert_type(np.savez_compressed(bytes_writer, AR_LIKE_f8, ar1=AR_i8), None)
+
+assert_type(np.loadtxt(bytes_file), npt.NDArray[np.float64])
+assert_type(np.loadtxt(pathlib_path, dtype=np.str_), npt.NDArray[np.str_])
+assert_type(np.loadtxt(str_path, dtype=str, skiprows=2), npt.NDArray[Any])
+assert_type(np.loadtxt(str_file, comments="test"), npt.NDArray[np.float64])
+assert_type(np.loadtxt(str_file, comments=None), npt.NDArray[np.float64])
+assert_type(np.loadtxt(str_path, delimiter="\n"), npt.NDArray[np.float64])
+assert_type(np.loadtxt(str_path, ndmin=2), npt.NDArray[np.float64])
+assert_type(np.loadtxt(["1", "2", "3"]), npt.NDArray[np.float64])
+
+assert_type(np.fromregex(bytes_file, "test", np.float64), npt.NDArray[np.float64])
+assert_type(np.fromregex(str_file, b"test", dtype=float), npt.NDArray[Any])
+assert_type(np.fromregex(str_path, re.compile("test"), dtype=np.str_, encoding="utf8"), npt.NDArray[np.str_])
+assert_type(np.fromregex(pathlib_path, "test", np.float64), npt.NDArray[np.float64])
+assert_type(np.fromregex(bytes_reader, "test", np.float64), npt.NDArray[np.float64])
+
+assert_type(np.genfromtxt(bytes_file), npt.NDArray[Any])
+assert_type(np.genfromtxt(pathlib_path, dtype=np.str_), npt.NDArray[np.str_])
+assert_type(np.genfromtxt(str_path, dtype=str, skip_header=2), npt.NDArray[Any])
+assert_type(np.genfromtxt(str_file, comments="test"), npt.NDArray[Any])
+assert_type(np.genfromtxt(str_path, delimiter="\n"), npt.NDArray[Any])
+assert_type(np.genfromtxt(str_path, ndmin=2), npt.NDArray[Any])
+assert_type(np.genfromtxt(["1", "2", "3"], ndmin=2), npt.NDArray[Any])
+
+assert_type(np.recfromtxt(bytes_file), np.recarray[Any, np.dtype[np.record]])
+assert_type(np.recfromtxt(pathlib_path, usemask=True), MaskedRecords[Any, np.dtype[np.void]])
+assert_type(np.recfromtxt(["1", "2", "3"]), np.recarray[Any, np.dtype[np.record]])
+
+assert_type(np.recfromcsv(bytes_file), np.recarray[Any, np.dtype[np.record]])
+assert_type(np.recfromcsv(pathlib_path, usemask=True), MaskedRecords[Any, np.dtype[np.void]])
+assert_type(np.recfromcsv(["1", "2", "3"]), np.recarray[Any, np.dtype[np.record]])
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/numeric.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/numeric.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..78f3980aedc5ce408d718aea2ab1300c55b396d0
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/numeric.pyi
@@ -0,0 +1,141 @@
+"""
+Tests for :mod:`core.numeric`.
+
+Does not include tests which fall under ``array_constructors``.
+
+"""
+
+import sys
+from typing import Any
+
+import numpy as np
+import numpy.typing as npt
+
+if sys.version_info >= (3, 11):
+    from typing import assert_type
+else:
+    from typing_extensions import assert_type
+
+class SubClass(npt.NDArray[np.int64]):
+    ...
+
+i8: np.int64
+
+AR_b: npt.NDArray[np.bool_]
+AR_u8: npt.NDArray[np.uint64]
+AR_i8: npt.NDArray[np.int64]
+AR_f8: npt.NDArray[np.float64]
+AR_c16: npt.NDArray[np.complex128]
+AR_m: npt.NDArray[np.timedelta64]
+AR_O: npt.NDArray[np.object_]
+
+B: list[int]
+C: SubClass
+
+assert_type(np.count_nonzero(i8), int)
+assert_type(np.count_nonzero(AR_i8), int)
+assert_type(np.count_nonzero(B), int)
+assert_type(np.count_nonzero(AR_i8, keepdims=True), Any)
+assert_type(np.count_nonzero(AR_i8, axis=0), Any)
+
+assert_type(np.isfortran(i8), bool)
+assert_type(np.isfortran(AR_i8), bool)
+
+assert_type(np.argwhere(i8), npt.NDArray[np.intp])
+assert_type(np.argwhere(AR_i8), npt.NDArray[np.intp])
+
+assert_type(np.flatnonzero(i8), npt.NDArray[np.intp])
+assert_type(np.flatnonzero(AR_i8), npt.NDArray[np.intp])
+
+assert_type(np.correlate(B, AR_i8, mode="valid"), npt.NDArray[np.signedinteger[Any]])
+assert_type(np.correlate(AR_i8, AR_i8, mode="same"), npt.NDArray[np.signedinteger[Any]])
+assert_type(np.correlate(AR_b, AR_b), npt.NDArray[np.bool_])
+assert_type(np.correlate(AR_b, AR_u8), npt.NDArray[np.unsignedinteger[Any]])
+assert_type(np.correlate(AR_i8, AR_b), npt.NDArray[np.signedinteger[Any]])
+assert_type(np.correlate(AR_i8, AR_f8), npt.NDArray[np.floating[Any]])
+assert_type(np.correlate(AR_i8, AR_c16), npt.NDArray[np.complexfloating[Any, Any]])
+assert_type(np.correlate(AR_i8, AR_m), npt.NDArray[np.timedelta64])
+assert_type(np.correlate(AR_O, AR_O), npt.NDArray[np.object_])
+
+assert_type(np.convolve(B, AR_i8, mode="valid"), npt.NDArray[np.signedinteger[Any]])
+assert_type(np.convolve(AR_i8, AR_i8, mode="same"), npt.NDArray[np.signedinteger[Any]])
+assert_type(np.convolve(AR_b, AR_b), npt.NDArray[np.bool_])
+assert_type(np.convolve(AR_b, AR_u8), npt.NDArray[np.unsignedinteger[Any]])
+assert_type(np.convolve(AR_i8, AR_b), npt.NDArray[np.signedinteger[Any]])
+assert_type(np.convolve(AR_i8, AR_f8), npt.NDArray[np.floating[Any]])
+assert_type(np.convolve(AR_i8, AR_c16), npt.NDArray[np.complexfloating[Any, Any]])
+assert_type(np.convolve(AR_i8, AR_m), npt.NDArray[np.timedelta64])
+assert_type(np.convolve(AR_O, AR_O), npt.NDArray[np.object_])
+
+assert_type(np.outer(i8, AR_i8), npt.NDArray[np.signedinteger[Any]])
+assert_type(np.outer(B, AR_i8), npt.NDArray[np.signedinteger[Any]])
+assert_type(np.outer(AR_i8, AR_i8), npt.NDArray[np.signedinteger[Any]])
+assert_type(np.outer(AR_i8, AR_i8, out=C), SubClass)
+assert_type(np.outer(AR_b, AR_b), npt.NDArray[np.bool_])
+assert_type(np.outer(AR_b, AR_u8), npt.NDArray[np.unsignedinteger[Any]])
+assert_type(np.outer(AR_i8, AR_b), npt.NDArray[np.signedinteger[Any]])
+assert_type(np.convolve(AR_i8, AR_f8), npt.NDArray[np.floating[Any]])
+assert_type(np.outer(AR_i8, AR_c16), npt.NDArray[np.complexfloating[Any, Any]])
+assert_type(np.outer(AR_i8, AR_m), npt.NDArray[np.timedelta64])
+assert_type(np.outer(AR_O, AR_O), npt.NDArray[np.object_])
+
+assert_type(np.tensordot(B, AR_i8), npt.NDArray[np.signedinteger[Any]])
+assert_type(np.tensordot(AR_i8, AR_i8), npt.NDArray[np.signedinteger[Any]])
+assert_type(np.tensordot(AR_i8, AR_i8, axes=0), npt.NDArray[np.signedinteger[Any]])
+assert_type(np.tensordot(AR_i8, AR_i8, axes=(0, 1)), npt.NDArray[np.signedinteger[Any]])
+assert_type(np.tensordot(AR_b, AR_b), npt.NDArray[np.bool_])
+assert_type(np.tensordot(AR_b, AR_u8), npt.NDArray[np.unsignedinteger[Any]])
+assert_type(np.tensordot(AR_i8, AR_b), npt.NDArray[np.signedinteger[Any]])
+assert_type(np.tensordot(AR_i8, AR_f8), npt.NDArray[np.floating[Any]])
+assert_type(np.tensordot(AR_i8, AR_c16), npt.NDArray[np.complexfloating[Any, Any]])
+assert_type(np.tensordot(AR_i8, AR_m), npt.NDArray[np.timedelta64])
+assert_type(np.tensordot(AR_O, AR_O), npt.NDArray[np.object_])
+
+assert_type(np.isscalar(i8), bool)
+assert_type(np.isscalar(AR_i8), bool)
+assert_type(np.isscalar(B), bool)
+
+assert_type(np.roll(AR_i8, 1), npt.NDArray[np.int64])
+assert_type(np.roll(AR_i8, (1, 2)), npt.NDArray[np.int64])
+assert_type(np.roll(B, 1), npt.NDArray[Any])
+
+assert_type(np.rollaxis(AR_i8, 0, 1), npt.NDArray[np.int64])
+
+assert_type(np.moveaxis(AR_i8, 0, 1), npt.NDArray[np.int64])
+assert_type(np.moveaxis(AR_i8, (0, 1), (1, 2)), npt.NDArray[np.int64])
+
+assert_type(np.cross(B, AR_i8), npt.NDArray[np.signedinteger[Any]])
+assert_type(np.cross(AR_i8, AR_i8), npt.NDArray[np.signedinteger[Any]])
+assert_type(np.cross(AR_b, AR_u8), npt.NDArray[np.unsignedinteger[Any]])
+assert_type(np.cross(AR_i8, AR_b), npt.NDArray[np.signedinteger[Any]])
+assert_type(np.cross(AR_i8, AR_f8), npt.NDArray[np.floating[Any]])
+assert_type(np.cross(AR_i8, AR_c16), npt.NDArray[np.complexfloating[Any, Any]])
+assert_type(np.cross(AR_O, AR_O), npt.NDArray[np.object_])
+
+assert_type(np.indices([0, 1, 2]), npt.NDArray[np.int_])
+assert_type(np.indices([0, 1, 2], sparse=True), tuple[npt.NDArray[np.int_], ...])
+assert_type(np.indices([0, 1, 2], dtype=np.float64), npt.NDArray[np.float64])
+assert_type(np.indices([0, 1, 2], sparse=True, dtype=np.float64), tuple[npt.NDArray[np.float64], ...])
+assert_type(np.indices([0, 1, 2], dtype=float), npt.NDArray[Any])
+assert_type(np.indices([0, 1, 2], sparse=True, dtype=float), tuple[npt.NDArray[Any], ...])
+
+assert_type(np.binary_repr(1), str)
+
+assert_type(np.base_repr(1), str)
+
+assert_type(np.allclose(i8, AR_i8), bool)
+assert_type(np.allclose(B, AR_i8), bool)
+assert_type(np.allclose(AR_i8, AR_i8), bool)
+
+assert_type(np.isclose(i8, i8), np.bool_)
+assert_type(np.isclose(i8, AR_i8), npt.NDArray[np.bool_])
+assert_type(np.isclose(B, AR_i8), npt.NDArray[np.bool_])
+assert_type(np.isclose(AR_i8, AR_i8), npt.NDArray[np.bool_])
+
+assert_type(np.array_equal(i8, AR_i8), bool)
+assert_type(np.array_equal(B, AR_i8), bool)
+assert_type(np.array_equal(AR_i8, AR_i8), bool)
+
+assert_type(np.array_equiv(i8, AR_i8), bool)
+assert_type(np.array_equiv(B, AR_i8), bool)
+assert_type(np.array_equiv(AR_i8, AR_i8), bool)
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/numerictypes.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/numerictypes.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..5d5a7a7af4c9dabac148dda8727f7f7c2af3e02a
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/numerictypes.pyi
@@ -0,0 +1,84 @@
+import sys
+from typing import Literal, Any
+
+import numpy as np
+from numpy.core.numerictypes import _CastFunc
+
+if sys.version_info >= (3, 11):
+    from typing import assert_type
+else:
+    from typing_extensions import assert_type
+
+assert_type(np.cast[int], _CastFunc)
+assert_type(np.cast["i8"], _CastFunc)
+assert_type(np.cast[np.int64], _CastFunc)
+
+assert_type(np.maximum_sctype(np.float64), type[np.float64])
+assert_type(np.maximum_sctype("f8"), type[Any])
+
+assert_type(np.issctype(np.float64), bool)
+assert_type(np.issctype("foo"), Literal[False])
+
+assert_type(np.obj2sctype(np.float64), None | type[np.float64])
+assert_type(np.obj2sctype(np.float64, default=False), bool | type[np.float64])
+assert_type(np.obj2sctype("S8"), None | type[Any])
+assert_type(np.obj2sctype("S8", default=None),  None | type[Any])
+assert_type(np.obj2sctype("foo", default=False),  bool | type[Any])
+assert_type(np.obj2sctype(1), None)
+assert_type(np.obj2sctype(1, default=False), bool)
+
+assert_type(np.issubclass_(np.float64, float), bool)
+assert_type(np.issubclass_(np.float64, (int, float)), bool)
+assert_type(np.issubclass_(1, 1), Literal[False])
+
+assert_type(np.sctype2char("S8"), str)
+assert_type(np.sctype2char(list), str)
+
+assert_type(np.nbytes[int], int)
+assert_type(np.nbytes["i8"], int)
+assert_type(np.nbytes[np.int64], int)
+
+assert_type(
+    np.ScalarType,
+    tuple[
+        type[int],
+        type[float],
+        type[complex],
+        type[bool],
+        type[bytes],
+        type[str],
+        type[memoryview],
+        type[np.bool_],
+        type[np.csingle],
+        type[np.cdouble],
+        type[np.clongdouble],
+        type[np.half],
+        type[np.single],
+        type[np.double],
+        type[np.longdouble],
+        type[np.byte],
+        type[np.short],
+        type[np.intc],
+        type[np.int_],
+        type[np.longlong],
+        type[np.timedelta64],
+        type[np.datetime64],
+        type[np.object_],
+        type[np.bytes_],
+        type[np.str_],
+        type[np.ubyte],
+        type[np.ushort],
+        type[np.uintc],
+        type[np.uint],
+        type[np.ulonglong],
+        type[np.void],
+    ],
+)
+assert_type(np.ScalarType[0], type[int])
+assert_type(np.ScalarType[3], type[bool])
+assert_type(np.ScalarType[8], type[np.csingle])
+assert_type(np.ScalarType[10], type[np.clongdouble])
+
+assert_type(np.typecodes["Character"], Literal["c"])
+assert_type(np.typecodes["Complex"], Literal["FDG"])
+assert_type(np.typecodes["All"], Literal["?bhilqpBHILQPefdgFDGSUVOMm"])
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/random.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/random.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..4aefc01cf6b53876ea987037a1f3fb030d328bf0
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/random.pyi
@@ -0,0 +1,1555 @@
+import sys
+import threading
+from typing import Any
+from collections.abc import Sequence
+
+import numpy as np
+import numpy.typing as npt
+from numpy.random._generator import Generator
+from numpy.random._mt19937 import MT19937
+from numpy.random._pcg64 import PCG64
+from numpy.random._sfc64 import SFC64
+from numpy.random._philox import Philox
+from numpy.random.bit_generator import SeedSequence, SeedlessSeedSequence
+
+if sys.version_info >= (3, 11):
+    from typing import assert_type
+else:
+    from typing_extensions import assert_type
+
+def_rng = np.random.default_rng()
+seed_seq = np.random.SeedSequence()
+mt19937 = np.random.MT19937()
+pcg64 = np.random.PCG64()
+sfc64 = np.random.SFC64()
+philox = np.random.Philox()
+seedless_seq = SeedlessSeedSequence()
+
+assert_type(def_rng, Generator)
+assert_type(mt19937, MT19937)
+assert_type(pcg64, PCG64)
+assert_type(sfc64, SFC64)
+assert_type(philox, Philox)
+assert_type(seed_seq, SeedSequence)
+assert_type(seedless_seq, SeedlessSeedSequence)
+
+mt19937_jumped = mt19937.jumped()
+mt19937_jumped3 = mt19937.jumped(3)
+mt19937_raw = mt19937.random_raw()
+mt19937_raw_arr = mt19937.random_raw(5)
+
+assert_type(mt19937_jumped, MT19937)
+assert_type(mt19937_jumped3, MT19937)
+assert_type(mt19937_raw, int)
+assert_type(mt19937_raw_arr, npt.NDArray[np.uint64])
+assert_type(mt19937.lock, threading.Lock)
+
+pcg64_jumped = pcg64.jumped()
+pcg64_jumped3 = pcg64.jumped(3)
+pcg64_adv = pcg64.advance(3)
+pcg64_raw = pcg64.random_raw()
+pcg64_raw_arr = pcg64.random_raw(5)
+
+assert_type(pcg64_jumped, PCG64)
+assert_type(pcg64_jumped3, PCG64)
+assert_type(pcg64_adv, PCG64)
+assert_type(pcg64_raw, int)
+assert_type(pcg64_raw_arr, npt.NDArray[np.uint64])
+assert_type(pcg64.lock, threading.Lock)
+
+philox_jumped = philox.jumped()
+philox_jumped3 = philox.jumped(3)
+philox_adv = philox.advance(3)
+philox_raw = philox.random_raw()
+philox_raw_arr = philox.random_raw(5)
+
+assert_type(philox_jumped, Philox)
+assert_type(philox_jumped3, Philox)
+assert_type(philox_adv, Philox)
+assert_type(philox_raw, int)
+assert_type(philox_raw_arr, npt.NDArray[np.uint64])
+assert_type(philox.lock, threading.Lock)
+
+sfc64_raw = sfc64.random_raw()
+sfc64_raw_arr = sfc64.random_raw(5)
+
+assert_type(sfc64_raw, int)
+assert_type(sfc64_raw_arr, npt.NDArray[np.uint64])
+assert_type(sfc64.lock, threading.Lock)
+
+assert_type(seed_seq.pool, npt.NDArray[np.uint32])
+assert_type(seed_seq.entropy, None | int | Sequence[int])
+assert_type(seed_seq.spawn(1), list[np.random.SeedSequence])
+assert_type(seed_seq.generate_state(8, "uint32"), npt.NDArray[np.uint32 | np.uint64])
+assert_type(seed_seq.generate_state(8, "uint64"), npt.NDArray[np.uint32 | np.uint64])
+
+
+def_gen: np.random.Generator = np.random.default_rng()
+
+D_arr_0p1: npt.NDArray[np.float64] = np.array([0.1])
+D_arr_0p5: npt.NDArray[np.float64] = np.array([0.5])
+D_arr_0p9: npt.NDArray[np.float64] = np.array([0.9])
+D_arr_1p5: npt.NDArray[np.float64] = np.array([1.5])
+I_arr_10: np.ndarray[Any, np.dtype[np.int_]] = np.array([10], dtype=np.int_)
+I_arr_20: np.ndarray[Any, np.dtype[np.int_]] = np.array([20], dtype=np.int_)
+D_arr_like_0p1: list[float] = [0.1]
+D_arr_like_0p5: list[float] = [0.5]
+D_arr_like_0p9: list[float] = [0.9]
+D_arr_like_1p5: list[float] = [1.5]
+I_arr_like_10: list[int] = [10]
+I_arr_like_20: list[int] = [20]
+D_2D_like: list[list[float]] = [[1, 2], [2, 3], [3, 4], [4, 5.1]]
+D_2D: npt.NDArray[np.float64] = np.array(D_2D_like)
+S_out: npt.NDArray[np.float32] = np.empty(1, dtype=np.float32)
+D_out: npt.NDArray[np.float64] = np.empty(1)
+
+assert_type(def_gen.standard_normal(), float)
+assert_type(def_gen.standard_normal(dtype=np.float32), float)
+assert_type(def_gen.standard_normal(dtype="float32"), float)
+assert_type(def_gen.standard_normal(dtype="double"), float)
+assert_type(def_gen.standard_normal(dtype=np.float64), float)
+assert_type(def_gen.standard_normal(size=None), float)
+assert_type(def_gen.standard_normal(size=1), npt.NDArray[np.float64])
+assert_type(def_gen.standard_normal(size=1, dtype=np.float32), npt.NDArray[np.float32])
+assert_type(def_gen.standard_normal(size=1, dtype="f4"), npt.NDArray[np.float32])
+assert_type(def_gen.standard_normal(size=1, dtype="float32", out=S_out), npt.NDArray[np.float32])
+assert_type(def_gen.standard_normal(dtype=np.float32, out=S_out), npt.NDArray[np.float32])
+assert_type(def_gen.standard_normal(size=1, dtype=np.float64), npt.NDArray[np.float64])
+assert_type(def_gen.standard_normal(size=1, dtype="float64"), npt.NDArray[np.float64])
+assert_type(def_gen.standard_normal(size=1, dtype="f8"), npt.NDArray[np.float64])
+assert_type(def_gen.standard_normal(out=D_out), npt.NDArray[np.float64])
+assert_type(def_gen.standard_normal(size=1, dtype="float64"), npt.NDArray[np.float64])
+assert_type(def_gen.standard_normal(size=1, dtype="float64", out=D_out), npt.NDArray[np.float64])
+
+assert_type(def_gen.random(), float)
+assert_type(def_gen.random(dtype=np.float32), float)
+assert_type(def_gen.random(dtype="float32"), float)
+assert_type(def_gen.random(dtype="double"), float)
+assert_type(def_gen.random(dtype=np.float64), float)
+assert_type(def_gen.random(size=None), float)
+assert_type(def_gen.random(size=1), npt.NDArray[np.float64])
+assert_type(def_gen.random(size=1, dtype=np.float32), npt.NDArray[np.float32])
+assert_type(def_gen.random(size=1, dtype="f4"), npt.NDArray[np.float32])
+assert_type(def_gen.random(size=1, dtype="float32", out=S_out), npt.NDArray[np.float32])
+assert_type(def_gen.random(dtype=np.float32, out=S_out), npt.NDArray[np.float32])
+assert_type(def_gen.random(size=1, dtype=np.float64), npt.NDArray[np.float64])
+assert_type(def_gen.random(size=1, dtype="float64"), npt.NDArray[np.float64])
+assert_type(def_gen.random(size=1, dtype="f8"), npt.NDArray[np.float64])
+assert_type(def_gen.random(out=D_out), npt.NDArray[np.float64])
+assert_type(def_gen.random(size=1, dtype="float64"), npt.NDArray[np.float64])
+assert_type(def_gen.random(size=1, dtype="float64", out=D_out), npt.NDArray[np.float64])
+
+assert_type(def_gen.standard_cauchy(), float)
+assert_type(def_gen.standard_cauchy(size=None), float)
+assert_type(def_gen.standard_cauchy(size=1), npt.NDArray[np.float64])
+
+assert_type(def_gen.standard_exponential(), float)
+assert_type(def_gen.standard_exponential(method="inv"), float)
+assert_type(def_gen.standard_exponential(dtype=np.float32), float)
+assert_type(def_gen.standard_exponential(dtype="float32"), float)
+assert_type(def_gen.standard_exponential(dtype="double"), float)
+assert_type(def_gen.standard_exponential(dtype=np.float64), float)
+assert_type(def_gen.standard_exponential(size=None), float)
+assert_type(def_gen.standard_exponential(size=None, method="inv"), float)
+assert_type(def_gen.standard_exponential(size=1, method="inv"), npt.NDArray[np.float64])
+assert_type(def_gen.standard_exponential(size=1, dtype=np.float32), npt.NDArray[np.float32])
+assert_type(def_gen.standard_exponential(size=1, dtype="f4", method="inv"), npt.NDArray[np.float32])
+assert_type(def_gen.standard_exponential(size=1, dtype="float32", out=S_out), npt.NDArray[np.float32])
+assert_type(def_gen.standard_exponential(dtype=np.float32, out=S_out), npt.NDArray[np.float32])
+assert_type(def_gen.standard_exponential(size=1, dtype=np.float64, method="inv"), npt.NDArray[np.float64])
+assert_type(def_gen.standard_exponential(size=1, dtype="float64"), npt.NDArray[np.float64])
+assert_type(def_gen.standard_exponential(size=1, dtype="f8"), npt.NDArray[np.float64])
+assert_type(def_gen.standard_exponential(out=D_out), npt.NDArray[np.float64])
+assert_type(def_gen.standard_exponential(size=1, dtype="float64"), npt.NDArray[np.float64])
+assert_type(def_gen.standard_exponential(size=1, dtype="float64", out=D_out), npt.NDArray[np.float64])
+
+assert_type(def_gen.zipf(1.5), int)
+assert_type(def_gen.zipf(1.5, size=None), int)
+assert_type(def_gen.zipf(1.5, size=1), npt.NDArray[np.int64])
+assert_type(def_gen.zipf(D_arr_1p5), npt.NDArray[np.int64])
+assert_type(def_gen.zipf(D_arr_1p5, size=1), npt.NDArray[np.int64])
+assert_type(def_gen.zipf(D_arr_like_1p5), npt.NDArray[np.int64])
+assert_type(def_gen.zipf(D_arr_like_1p5, size=1), npt.NDArray[np.int64])
+
+assert_type(def_gen.weibull(0.5), float)
+assert_type(def_gen.weibull(0.5, size=None), float)
+assert_type(def_gen.weibull(0.5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.weibull(D_arr_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.weibull(D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.weibull(D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.weibull(D_arr_like_0p5, size=1), npt.NDArray[np.float64])
+
+assert_type(def_gen.standard_t(0.5), float)
+assert_type(def_gen.standard_t(0.5, size=None), float)
+assert_type(def_gen.standard_t(0.5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.standard_t(D_arr_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.standard_t(D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.standard_t(D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.standard_t(D_arr_like_0p5, size=1), npt.NDArray[np.float64])
+
+assert_type(def_gen.poisson(0.5), int)
+assert_type(def_gen.poisson(0.5, size=None), int)
+assert_type(def_gen.poisson(0.5, size=1), npt.NDArray[np.int64])
+assert_type(def_gen.poisson(D_arr_0p5), npt.NDArray[np.int64])
+assert_type(def_gen.poisson(D_arr_0p5, size=1), npt.NDArray[np.int64])
+assert_type(def_gen.poisson(D_arr_like_0p5), npt.NDArray[np.int64])
+assert_type(def_gen.poisson(D_arr_like_0p5, size=1), npt.NDArray[np.int64])
+
+assert_type(def_gen.power(0.5), float)
+assert_type(def_gen.power(0.5, size=None), float)
+assert_type(def_gen.power(0.5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.power(D_arr_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.power(D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.power(D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.power(D_arr_like_0p5, size=1), npt.NDArray[np.float64])
+
+assert_type(def_gen.pareto(0.5), float)
+assert_type(def_gen.pareto(0.5, size=None), float)
+assert_type(def_gen.pareto(0.5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.pareto(D_arr_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.pareto(D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.pareto(D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.pareto(D_arr_like_0p5, size=1), npt.NDArray[np.float64])
+
+assert_type(def_gen.chisquare(0.5), float)
+assert_type(def_gen.chisquare(0.5, size=None), float)
+assert_type(def_gen.chisquare(0.5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.chisquare(D_arr_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.chisquare(D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.chisquare(D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.chisquare(D_arr_like_0p5, size=1), npt.NDArray[np.float64])
+
+assert_type(def_gen.exponential(0.5), float)
+assert_type(def_gen.exponential(0.5, size=None), float)
+assert_type(def_gen.exponential(0.5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.exponential(D_arr_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.exponential(D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.exponential(D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.exponential(D_arr_like_0p5, size=1), npt.NDArray[np.float64])
+
+assert_type(def_gen.geometric(0.5), int)
+assert_type(def_gen.geometric(0.5, size=None), int)
+assert_type(def_gen.geometric(0.5, size=1), npt.NDArray[np.int64])
+assert_type(def_gen.geometric(D_arr_0p5), npt.NDArray[np.int64])
+assert_type(def_gen.geometric(D_arr_0p5, size=1), npt.NDArray[np.int64])
+assert_type(def_gen.geometric(D_arr_like_0p5), npt.NDArray[np.int64])
+assert_type(def_gen.geometric(D_arr_like_0p5, size=1), npt.NDArray[np.int64])
+
+assert_type(def_gen.logseries(0.5), int)
+assert_type(def_gen.logseries(0.5, size=None), int)
+assert_type(def_gen.logseries(0.5, size=1), npt.NDArray[np.int64])
+assert_type(def_gen.logseries(D_arr_0p5), npt.NDArray[np.int64])
+assert_type(def_gen.logseries(D_arr_0p5, size=1), npt.NDArray[np.int64])
+assert_type(def_gen.logseries(D_arr_like_0p5), npt.NDArray[np.int64])
+assert_type(def_gen.logseries(D_arr_like_0p5, size=1), npt.NDArray[np.int64])
+
+assert_type(def_gen.rayleigh(0.5), float)
+assert_type(def_gen.rayleigh(0.5, size=None), float)
+assert_type(def_gen.rayleigh(0.5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.rayleigh(D_arr_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.rayleigh(D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.rayleigh(D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.rayleigh(D_arr_like_0p5, size=1), npt.NDArray[np.float64])
+
+assert_type(def_gen.standard_gamma(0.5), float)
+assert_type(def_gen.standard_gamma(0.5, size=None), float)
+assert_type(def_gen.standard_gamma(0.5, dtype="float32"), float)
+assert_type(def_gen.standard_gamma(0.5, size=None, dtype="float32"), float)
+assert_type(def_gen.standard_gamma(0.5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.standard_gamma(D_arr_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.standard_gamma(D_arr_0p5, dtype="f4"), npt.NDArray[np.float32])
+assert_type(def_gen.standard_gamma(0.5, size=1, dtype="float32", out=S_out), npt.NDArray[np.float32])
+assert_type(def_gen.standard_gamma(D_arr_0p5, dtype=np.float32, out=S_out), npt.NDArray[np.float32])
+assert_type(def_gen.standard_gamma(D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.standard_gamma(D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.standard_gamma(D_arr_like_0p5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.standard_gamma(0.5, out=D_out), npt.NDArray[np.float64])
+assert_type(def_gen.standard_gamma(D_arr_like_0p5, out=D_out), npt.NDArray[np.float64])
+assert_type(def_gen.standard_gamma(D_arr_like_0p5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.standard_gamma(D_arr_like_0p5, size=1, out=D_out, dtype=np.float64), npt.NDArray[np.float64])
+
+assert_type(def_gen.vonmises(0.5, 0.5), float)
+assert_type(def_gen.vonmises(0.5, 0.5, size=None), float)
+assert_type(def_gen.vonmises(0.5, 0.5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.vonmises(D_arr_0p5, 0.5), npt.NDArray[np.float64])
+assert_type(def_gen.vonmises(0.5, D_arr_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.vonmises(D_arr_0p5, 0.5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.vonmises(0.5, D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.vonmises(D_arr_like_0p5, 0.5), npt.NDArray[np.float64])
+assert_type(def_gen.vonmises(0.5, D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.vonmises(D_arr_0p5, D_arr_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.vonmises(D_arr_like_0p5, D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.vonmises(D_arr_0p5, D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.vonmises(D_arr_like_0p5, D_arr_like_0p5, size=1), npt.NDArray[np.float64])
+
+assert_type(def_gen.wald(0.5, 0.5), float)
+assert_type(def_gen.wald(0.5, 0.5, size=None), float)
+assert_type(def_gen.wald(0.5, 0.5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.wald(D_arr_0p5, 0.5), npt.NDArray[np.float64])
+assert_type(def_gen.wald(0.5, D_arr_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.wald(D_arr_0p5, 0.5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.wald(0.5, D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.wald(D_arr_like_0p5, 0.5), npt.NDArray[np.float64])
+assert_type(def_gen.wald(0.5, D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.wald(D_arr_0p5, D_arr_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.wald(D_arr_like_0p5, D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.wald(D_arr_0p5, D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.wald(D_arr_like_0p5, D_arr_like_0p5, size=1), npt.NDArray[np.float64])
+
+assert_type(def_gen.uniform(0.5, 0.5), float)
+assert_type(def_gen.uniform(0.5, 0.5, size=None), float)
+assert_type(def_gen.uniform(0.5, 0.5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.uniform(D_arr_0p5, 0.5), npt.NDArray[np.float64])
+assert_type(def_gen.uniform(0.5, D_arr_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.uniform(D_arr_0p5, 0.5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.uniform(0.5, D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.uniform(D_arr_like_0p5, 0.5), npt.NDArray[np.float64])
+assert_type(def_gen.uniform(0.5, D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.uniform(D_arr_0p5, D_arr_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.uniform(D_arr_like_0p5, D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.uniform(D_arr_0p5, D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.uniform(D_arr_like_0p5, D_arr_like_0p5, size=1), npt.NDArray[np.float64])
+
+assert_type(def_gen.beta(0.5, 0.5), float)
+assert_type(def_gen.beta(0.5, 0.5, size=None), float)
+assert_type(def_gen.beta(0.5, 0.5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.beta(D_arr_0p5, 0.5), npt.NDArray[np.float64])
+assert_type(def_gen.beta(0.5, D_arr_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.beta(D_arr_0p5, 0.5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.beta(0.5, D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.beta(D_arr_like_0p5, 0.5), npt.NDArray[np.float64])
+assert_type(def_gen.beta(0.5, D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.beta(D_arr_0p5, D_arr_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.beta(D_arr_like_0p5, D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.beta(D_arr_0p5, D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.beta(D_arr_like_0p5, D_arr_like_0p5, size=1), npt.NDArray[np.float64])
+
+assert_type(def_gen.f(0.5, 0.5), float)
+assert_type(def_gen.f(0.5, 0.5, size=None), float)
+assert_type(def_gen.f(0.5, 0.5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.f(D_arr_0p5, 0.5), npt.NDArray[np.float64])
+assert_type(def_gen.f(0.5, D_arr_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.f(D_arr_0p5, 0.5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.f(0.5, D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.f(D_arr_like_0p5, 0.5), npt.NDArray[np.float64])
+assert_type(def_gen.f(0.5, D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.f(D_arr_0p5, D_arr_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.f(D_arr_like_0p5, D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.f(D_arr_0p5, D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.f(D_arr_like_0p5, D_arr_like_0p5, size=1), npt.NDArray[np.float64])
+
+assert_type(def_gen.gamma(0.5, 0.5), float)
+assert_type(def_gen.gamma(0.5, 0.5, size=None), float)
+assert_type(def_gen.gamma(0.5, 0.5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.gamma(D_arr_0p5, 0.5), npt.NDArray[np.float64])
+assert_type(def_gen.gamma(0.5, D_arr_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.gamma(D_arr_0p5, 0.5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.gamma(0.5, D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.gamma(D_arr_like_0p5, 0.5), npt.NDArray[np.float64])
+assert_type(def_gen.gamma(0.5, D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.gamma(D_arr_0p5, D_arr_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.gamma(D_arr_like_0p5, D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.gamma(D_arr_0p5, D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.gamma(D_arr_like_0p5, D_arr_like_0p5, size=1), npt.NDArray[np.float64])
+
+assert_type(def_gen.gumbel(0.5, 0.5), float)
+assert_type(def_gen.gumbel(0.5, 0.5, size=None), float)
+assert_type(def_gen.gumbel(0.5, 0.5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.gumbel(D_arr_0p5, 0.5), npt.NDArray[np.float64])
+assert_type(def_gen.gumbel(0.5, D_arr_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.gumbel(D_arr_0p5, 0.5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.gumbel(0.5, D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.gumbel(D_arr_like_0p5, 0.5), npt.NDArray[np.float64])
+assert_type(def_gen.gumbel(0.5, D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.gumbel(D_arr_0p5, D_arr_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.gumbel(D_arr_like_0p5, D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.gumbel(D_arr_0p5, D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.gumbel(D_arr_like_0p5, D_arr_like_0p5, size=1), npt.NDArray[np.float64])
+
+assert_type(def_gen.laplace(0.5, 0.5), float)
+assert_type(def_gen.laplace(0.5, 0.5, size=None), float)
+assert_type(def_gen.laplace(0.5, 0.5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.laplace(D_arr_0p5, 0.5), npt.NDArray[np.float64])
+assert_type(def_gen.laplace(0.5, D_arr_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.laplace(D_arr_0p5, 0.5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.laplace(0.5, D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.laplace(D_arr_like_0p5, 0.5), npt.NDArray[np.float64])
+assert_type(def_gen.laplace(0.5, D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.laplace(D_arr_0p5, D_arr_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.laplace(D_arr_like_0p5, D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.laplace(D_arr_0p5, D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.laplace(D_arr_like_0p5, D_arr_like_0p5, size=1), npt.NDArray[np.float64])
+
+assert_type(def_gen.logistic(0.5, 0.5), float)
+assert_type(def_gen.logistic(0.5, 0.5, size=None), float)
+assert_type(def_gen.logistic(0.5, 0.5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.logistic(D_arr_0p5, 0.5), npt.NDArray[np.float64])
+assert_type(def_gen.logistic(0.5, D_arr_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.logistic(D_arr_0p5, 0.5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.logistic(0.5, D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.logistic(D_arr_like_0p5, 0.5), npt.NDArray[np.float64])
+assert_type(def_gen.logistic(0.5, D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.logistic(D_arr_0p5, D_arr_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.logistic(D_arr_like_0p5, D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.logistic(D_arr_0p5, D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.logistic(D_arr_like_0p5, D_arr_like_0p5, size=1), npt.NDArray[np.float64])
+
+assert_type(def_gen.lognormal(0.5, 0.5), float)
+assert_type(def_gen.lognormal(0.5, 0.5, size=None), float)
+assert_type(def_gen.lognormal(0.5, 0.5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.lognormal(D_arr_0p5, 0.5), npt.NDArray[np.float64])
+assert_type(def_gen.lognormal(0.5, D_arr_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.lognormal(D_arr_0p5, 0.5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.lognormal(0.5, D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.lognormal(D_arr_like_0p5, 0.5), npt.NDArray[np.float64])
+assert_type(def_gen.lognormal(0.5, D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.lognormal(D_arr_0p5, D_arr_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.lognormal(D_arr_like_0p5, D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.lognormal(D_arr_0p5, D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.lognormal(D_arr_like_0p5, D_arr_like_0p5, size=1), npt.NDArray[np.float64])
+
+assert_type(def_gen.noncentral_chisquare(0.5, 0.5), float)
+assert_type(def_gen.noncentral_chisquare(0.5, 0.5, size=None), float)
+assert_type(def_gen.noncentral_chisquare(0.5, 0.5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.noncentral_chisquare(D_arr_0p5, 0.5), npt.NDArray[np.float64])
+assert_type(def_gen.noncentral_chisquare(0.5, D_arr_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.noncentral_chisquare(D_arr_0p5, 0.5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.noncentral_chisquare(0.5, D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.noncentral_chisquare(D_arr_like_0p5, 0.5), npt.NDArray[np.float64])
+assert_type(def_gen.noncentral_chisquare(0.5, D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.noncentral_chisquare(D_arr_0p5, D_arr_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.noncentral_chisquare(D_arr_like_0p5, D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.noncentral_chisquare(D_arr_0p5, D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.noncentral_chisquare(D_arr_like_0p5, D_arr_like_0p5, size=1), npt.NDArray[np.float64])
+
+assert_type(def_gen.normal(0.5, 0.5), float)
+assert_type(def_gen.normal(0.5, 0.5, size=None), float)
+assert_type(def_gen.normal(0.5, 0.5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.normal(D_arr_0p5, 0.5), npt.NDArray[np.float64])
+assert_type(def_gen.normal(0.5, D_arr_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.normal(D_arr_0p5, 0.5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.normal(0.5, D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.normal(D_arr_like_0p5, 0.5), npt.NDArray[np.float64])
+assert_type(def_gen.normal(0.5, D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.normal(D_arr_0p5, D_arr_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.normal(D_arr_like_0p5, D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.normal(D_arr_0p5, D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.normal(D_arr_like_0p5, D_arr_like_0p5, size=1), npt.NDArray[np.float64])
+
+assert_type(def_gen.triangular(0.1, 0.5, 0.9), float)
+assert_type(def_gen.triangular(0.1, 0.5, 0.9, size=None), float)
+assert_type(def_gen.triangular(0.1, 0.5, 0.9, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.triangular(D_arr_0p1, 0.5, 0.9), npt.NDArray[np.float64])
+assert_type(def_gen.triangular(0.1, D_arr_0p5, 0.9), npt.NDArray[np.float64])
+assert_type(def_gen.triangular(D_arr_0p1, 0.5, D_arr_like_0p9, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.triangular(0.1, D_arr_0p5, 0.9, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.triangular(D_arr_like_0p1, 0.5, D_arr_0p9), npt.NDArray[np.float64])
+assert_type(def_gen.triangular(0.5, D_arr_like_0p5, 0.9), npt.NDArray[np.float64])
+assert_type(def_gen.triangular(D_arr_0p1, D_arr_0p5, 0.9), npt.NDArray[np.float64])
+assert_type(def_gen.triangular(D_arr_like_0p1, D_arr_like_0p5, 0.9), npt.NDArray[np.float64])
+assert_type(def_gen.triangular(D_arr_0p1, D_arr_0p5, D_arr_0p9, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.triangular(D_arr_like_0p1, D_arr_like_0p5, D_arr_like_0p9, size=1), npt.NDArray[np.float64])
+
+assert_type(def_gen.noncentral_f(0.1, 0.5, 0.9), float)
+assert_type(def_gen.noncentral_f(0.1, 0.5, 0.9, size=None), float)
+assert_type(def_gen.noncentral_f(0.1, 0.5, 0.9, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.noncentral_f(D_arr_0p1, 0.5, 0.9), npt.NDArray[np.float64])
+assert_type(def_gen.noncentral_f(0.1, D_arr_0p5, 0.9), npt.NDArray[np.float64])
+assert_type(def_gen.noncentral_f(D_arr_0p1, 0.5, D_arr_like_0p9, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.noncentral_f(0.1, D_arr_0p5, 0.9, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.noncentral_f(D_arr_like_0p1, 0.5, D_arr_0p9), npt.NDArray[np.float64])
+assert_type(def_gen.noncentral_f(0.5, D_arr_like_0p5, 0.9), npt.NDArray[np.float64])
+assert_type(def_gen.noncentral_f(D_arr_0p1, D_arr_0p5, 0.9), npt.NDArray[np.float64])
+assert_type(def_gen.noncentral_f(D_arr_like_0p1, D_arr_like_0p5, 0.9), npt.NDArray[np.float64])
+assert_type(def_gen.noncentral_f(D_arr_0p1, D_arr_0p5, D_arr_0p9, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.noncentral_f(D_arr_like_0p1, D_arr_like_0p5, D_arr_like_0p9, size=1), npt.NDArray[np.float64])
+
+assert_type(def_gen.binomial(10, 0.5), int)
+assert_type(def_gen.binomial(10, 0.5, size=None), int)
+assert_type(def_gen.binomial(10, 0.5, size=1), npt.NDArray[np.int64])
+assert_type(def_gen.binomial(I_arr_10, 0.5), npt.NDArray[np.int64])
+assert_type(def_gen.binomial(10, D_arr_0p5), npt.NDArray[np.int64])
+assert_type(def_gen.binomial(I_arr_10, 0.5, size=1), npt.NDArray[np.int64])
+assert_type(def_gen.binomial(10, D_arr_0p5, size=1), npt.NDArray[np.int64])
+assert_type(def_gen.binomial(I_arr_like_10, 0.5), npt.NDArray[np.int64])
+assert_type(def_gen.binomial(10, D_arr_like_0p5), npt.NDArray[np.int64])
+assert_type(def_gen.binomial(I_arr_10, D_arr_0p5), npt.NDArray[np.int64])
+assert_type(def_gen.binomial(I_arr_like_10, D_arr_like_0p5), npt.NDArray[np.int64])
+assert_type(def_gen.binomial(I_arr_10, D_arr_0p5, size=1), npt.NDArray[np.int64])
+assert_type(def_gen.binomial(I_arr_like_10, D_arr_like_0p5, size=1), npt.NDArray[np.int64])
+
+assert_type(def_gen.negative_binomial(10, 0.5), int)
+assert_type(def_gen.negative_binomial(10, 0.5, size=None), int)
+assert_type(def_gen.negative_binomial(10, 0.5, size=1), npt.NDArray[np.int64])
+assert_type(def_gen.negative_binomial(I_arr_10, 0.5), npt.NDArray[np.int64])
+assert_type(def_gen.negative_binomial(10, D_arr_0p5), npt.NDArray[np.int64])
+assert_type(def_gen.negative_binomial(I_arr_10, 0.5, size=1), npt.NDArray[np.int64])
+assert_type(def_gen.negative_binomial(10, D_arr_0p5, size=1), npt.NDArray[np.int64])
+assert_type(def_gen.negative_binomial(I_arr_like_10, 0.5), npt.NDArray[np.int64])
+assert_type(def_gen.negative_binomial(10, D_arr_like_0p5), npt.NDArray[np.int64])
+assert_type(def_gen.negative_binomial(I_arr_10, D_arr_0p5), npt.NDArray[np.int64])
+assert_type(def_gen.negative_binomial(I_arr_like_10, D_arr_like_0p5), npt.NDArray[np.int64])
+assert_type(def_gen.negative_binomial(I_arr_10, D_arr_0p5, size=1), npt.NDArray[np.int64])
+assert_type(def_gen.negative_binomial(I_arr_like_10, D_arr_like_0p5, size=1), npt.NDArray[np.int64])
+
+assert_type(def_gen.hypergeometric(20, 20, 10), int)
+assert_type(def_gen.hypergeometric(20, 20, 10, size=None), int)
+assert_type(def_gen.hypergeometric(20, 20, 10, size=1), npt.NDArray[np.int64])
+assert_type(def_gen.hypergeometric(I_arr_20, 20, 10), npt.NDArray[np.int64])
+assert_type(def_gen.hypergeometric(20, I_arr_20, 10), npt.NDArray[np.int64])
+assert_type(def_gen.hypergeometric(I_arr_20, 20, I_arr_like_10, size=1), npt.NDArray[np.int64])
+assert_type(def_gen.hypergeometric(20, I_arr_20, 10, size=1), npt.NDArray[np.int64])
+assert_type(def_gen.hypergeometric(I_arr_like_20, 20, I_arr_10), npt.NDArray[np.int64])
+assert_type(def_gen.hypergeometric(20, I_arr_like_20, 10), npt.NDArray[np.int64])
+assert_type(def_gen.hypergeometric(I_arr_20, I_arr_20, 10), npt.NDArray[np.int64])
+assert_type(def_gen.hypergeometric(I_arr_like_20, I_arr_like_20, 10), npt.NDArray[np.int64])
+assert_type(def_gen.hypergeometric(I_arr_20, I_arr_20, I_arr_10, size=1), npt.NDArray[np.int64])
+assert_type(def_gen.hypergeometric(I_arr_like_20, I_arr_like_20, I_arr_like_10, size=1), npt.NDArray[np.int64])
+
+I_int64_100: np.ndarray[Any, np.dtype[np.int64]] = np.array([100], dtype=np.int64)
+
+assert_type(def_gen.integers(0, 100), int)
+assert_type(def_gen.integers(100), int)
+assert_type(def_gen.integers([100]), npt.NDArray[np.int64])
+assert_type(def_gen.integers(0, [100]), npt.NDArray[np.int64])
+
+I_bool_low: npt.NDArray[np.bool_] = np.array([0], dtype=np.bool_)
+I_bool_low_like: list[int] = [0]
+I_bool_high_open: npt.NDArray[np.bool_] = np.array([1], dtype=np.bool_)
+I_bool_high_closed: npt.NDArray[np.bool_] = np.array([1], dtype=np.bool_)
+
+assert_type(def_gen.integers(2, dtype=bool), bool)
+assert_type(def_gen.integers(0, 2, dtype=bool), bool)
+assert_type(def_gen.integers(1, dtype=bool, endpoint=True), bool)
+assert_type(def_gen.integers(0, 1, dtype=bool, endpoint=True), bool)
+assert_type(def_gen.integers(I_bool_low_like, 1, dtype=bool, endpoint=True), npt.NDArray[np.bool_])
+assert_type(def_gen.integers(I_bool_high_open, dtype=bool), npt.NDArray[np.bool_])
+assert_type(def_gen.integers(I_bool_low, I_bool_high_open, dtype=bool), npt.NDArray[np.bool_])
+assert_type(def_gen.integers(0, I_bool_high_open, dtype=bool), npt.NDArray[np.bool_])
+assert_type(def_gen.integers(I_bool_high_closed, dtype=bool, endpoint=True), npt.NDArray[np.bool_])
+assert_type(def_gen.integers(I_bool_low, I_bool_high_closed, dtype=bool, endpoint=True), npt.NDArray[np.bool_])
+assert_type(def_gen.integers(0, I_bool_high_closed, dtype=bool, endpoint=True), npt.NDArray[np.bool_])
+
+assert_type(def_gen.integers(2, dtype=np.bool_), bool)
+assert_type(def_gen.integers(0, 2, dtype=np.bool_), bool)
+assert_type(def_gen.integers(1, dtype=np.bool_, endpoint=True), bool)
+assert_type(def_gen.integers(0, 1, dtype=np.bool_, endpoint=True), bool)
+assert_type(def_gen.integers(I_bool_low_like, 1, dtype=np.bool_, endpoint=True), npt.NDArray[np.bool_])
+assert_type(def_gen.integers(I_bool_high_open, dtype=np.bool_), npt.NDArray[np.bool_])
+assert_type(def_gen.integers(I_bool_low, I_bool_high_open, dtype=np.bool_), npt.NDArray[np.bool_])
+assert_type(def_gen.integers(0, I_bool_high_open, dtype=np.bool_), npt.NDArray[np.bool_])
+assert_type(def_gen.integers(I_bool_high_closed, dtype=np.bool_, endpoint=True), npt.NDArray[np.bool_])
+assert_type(def_gen.integers(I_bool_low, I_bool_high_closed, dtype=np.bool_, endpoint=True), npt.NDArray[np.bool_])
+assert_type(def_gen.integers(0, I_bool_high_closed, dtype=np.bool_, endpoint=True), npt.NDArray[np.bool_])
+
+I_u1_low: np.ndarray[Any, np.dtype[np.uint8]] = np.array([0], dtype=np.uint8)
+I_u1_low_like: list[int] = [0]
+I_u1_high_open: np.ndarray[Any, np.dtype[np.uint8]] = np.array([255], dtype=np.uint8)
+I_u1_high_closed: np.ndarray[Any, np.dtype[np.uint8]] = np.array([255], dtype=np.uint8)
+
+assert_type(def_gen.integers(256, dtype="u1"), int)
+assert_type(def_gen.integers(0, 256, dtype="u1"), int)
+assert_type(def_gen.integers(255, dtype="u1", endpoint=True), int)
+assert_type(def_gen.integers(0, 255, dtype="u1", endpoint=True), int)
+assert_type(def_gen.integers(I_u1_low_like, 255, dtype="u1", endpoint=True), npt.NDArray[np.uint8])
+assert_type(def_gen.integers(I_u1_high_open, dtype="u1"), npt.NDArray[np.uint8])
+assert_type(def_gen.integers(I_u1_low, I_u1_high_open, dtype="u1"), npt.NDArray[np.uint8])
+assert_type(def_gen.integers(0, I_u1_high_open, dtype="u1"), npt.NDArray[np.uint8])
+assert_type(def_gen.integers(I_u1_high_closed, dtype="u1", endpoint=True), npt.NDArray[np.uint8])
+assert_type(def_gen.integers(I_u1_low, I_u1_high_closed, dtype="u1", endpoint=True), npt.NDArray[np.uint8])
+assert_type(def_gen.integers(0, I_u1_high_closed, dtype="u1", endpoint=True), npt.NDArray[np.uint8])
+
+assert_type(def_gen.integers(256, dtype="uint8"), int)
+assert_type(def_gen.integers(0, 256, dtype="uint8"), int)
+assert_type(def_gen.integers(255, dtype="uint8", endpoint=True), int)
+assert_type(def_gen.integers(0, 255, dtype="uint8", endpoint=True), int)
+assert_type(def_gen.integers(I_u1_low_like, 255, dtype="uint8", endpoint=True), npt.NDArray[np.uint8])
+assert_type(def_gen.integers(I_u1_high_open, dtype="uint8"), npt.NDArray[np.uint8])
+assert_type(def_gen.integers(I_u1_low, I_u1_high_open, dtype="uint8"), npt.NDArray[np.uint8])
+assert_type(def_gen.integers(0, I_u1_high_open, dtype="uint8"), npt.NDArray[np.uint8])
+assert_type(def_gen.integers(I_u1_high_closed, dtype="uint8", endpoint=True), npt.NDArray[np.uint8])
+assert_type(def_gen.integers(I_u1_low, I_u1_high_closed, dtype="uint8", endpoint=True), npt.NDArray[np.uint8])
+assert_type(def_gen.integers(0, I_u1_high_closed, dtype="uint8", endpoint=True), npt.NDArray[np.uint8])
+
+assert_type(def_gen.integers(256, dtype=np.uint8), int)
+assert_type(def_gen.integers(0, 256, dtype=np.uint8), int)
+assert_type(def_gen.integers(255, dtype=np.uint8, endpoint=True), int)
+assert_type(def_gen.integers(0, 255, dtype=np.uint8, endpoint=True), int)
+assert_type(def_gen.integers(I_u1_low_like, 255, dtype=np.uint8, endpoint=True), npt.NDArray[np.uint8])
+assert_type(def_gen.integers(I_u1_high_open, dtype=np.uint8), npt.NDArray[np.uint8])
+assert_type(def_gen.integers(I_u1_low, I_u1_high_open, dtype=np.uint8), npt.NDArray[np.uint8])
+assert_type(def_gen.integers(0, I_u1_high_open, dtype=np.uint8), npt.NDArray[np.uint8])
+assert_type(def_gen.integers(I_u1_high_closed, dtype=np.uint8, endpoint=True), npt.NDArray[np.uint8])
+assert_type(def_gen.integers(I_u1_low, I_u1_high_closed, dtype=np.uint8, endpoint=True), npt.NDArray[np.uint8])
+assert_type(def_gen.integers(0, I_u1_high_closed, dtype=np.uint8, endpoint=True), npt.NDArray[np.uint8])
+
+I_u2_low: np.ndarray[Any, np.dtype[np.uint16]] = np.array([0], dtype=np.uint16)
+I_u2_low_like: list[int] = [0]
+I_u2_high_open: np.ndarray[Any, np.dtype[np.uint16]] = np.array([65535], dtype=np.uint16)
+I_u2_high_closed: np.ndarray[Any, np.dtype[np.uint16]] = np.array([65535], dtype=np.uint16)
+
+assert_type(def_gen.integers(65536, dtype="u2"), int)
+assert_type(def_gen.integers(0, 65536, dtype="u2"), int)
+assert_type(def_gen.integers(65535, dtype="u2", endpoint=True), int)
+assert_type(def_gen.integers(0, 65535, dtype="u2", endpoint=True), int)
+assert_type(def_gen.integers(I_u2_low_like, 65535, dtype="u2", endpoint=True), npt.NDArray[np.uint16])
+assert_type(def_gen.integers(I_u2_high_open, dtype="u2"), npt.NDArray[np.uint16])
+assert_type(def_gen.integers(I_u2_low, I_u2_high_open, dtype="u2"), npt.NDArray[np.uint16])
+assert_type(def_gen.integers(0, I_u2_high_open, dtype="u2"), npt.NDArray[np.uint16])
+assert_type(def_gen.integers(I_u2_high_closed, dtype="u2", endpoint=True), npt.NDArray[np.uint16])
+assert_type(def_gen.integers(I_u2_low, I_u2_high_closed, dtype="u2", endpoint=True), npt.NDArray[np.uint16])
+assert_type(def_gen.integers(0, I_u2_high_closed, dtype="u2", endpoint=True), npt.NDArray[np.uint16])
+
+assert_type(def_gen.integers(65536, dtype="uint16"), int)
+assert_type(def_gen.integers(0, 65536, dtype="uint16"), int)
+assert_type(def_gen.integers(65535, dtype="uint16", endpoint=True), int)
+assert_type(def_gen.integers(0, 65535, dtype="uint16", endpoint=True), int)
+assert_type(def_gen.integers(I_u2_low_like, 65535, dtype="uint16", endpoint=True), npt.NDArray[np.uint16])
+assert_type(def_gen.integers(I_u2_high_open, dtype="uint16"), npt.NDArray[np.uint16])
+assert_type(def_gen.integers(I_u2_low, I_u2_high_open, dtype="uint16"), npt.NDArray[np.uint16])
+assert_type(def_gen.integers(0, I_u2_high_open, dtype="uint16"), npt.NDArray[np.uint16])
+assert_type(def_gen.integers(I_u2_high_closed, dtype="uint16", endpoint=True), npt.NDArray[np.uint16])
+assert_type(def_gen.integers(I_u2_low, I_u2_high_closed, dtype="uint16", endpoint=True), npt.NDArray[np.uint16])
+assert_type(def_gen.integers(0, I_u2_high_closed, dtype="uint16", endpoint=True), npt.NDArray[np.uint16])
+
+assert_type(def_gen.integers(65536, dtype=np.uint16), int)
+assert_type(def_gen.integers(0, 65536, dtype=np.uint16), int)
+assert_type(def_gen.integers(65535, dtype=np.uint16, endpoint=True), int)
+assert_type(def_gen.integers(0, 65535, dtype=np.uint16, endpoint=True), int)
+assert_type(def_gen.integers(I_u2_low_like, 65535, dtype=np.uint16, endpoint=True), npt.NDArray[np.uint16])
+assert_type(def_gen.integers(I_u2_high_open, dtype=np.uint16), npt.NDArray[np.uint16])
+assert_type(def_gen.integers(I_u2_low, I_u2_high_open, dtype=np.uint16), npt.NDArray[np.uint16])
+assert_type(def_gen.integers(0, I_u2_high_open, dtype=np.uint16), npt.NDArray[np.uint16])
+assert_type(def_gen.integers(I_u2_high_closed, dtype=np.uint16, endpoint=True), npt.NDArray[np.uint16])
+assert_type(def_gen.integers(I_u2_low, I_u2_high_closed, dtype=np.uint16, endpoint=True), npt.NDArray[np.uint16])
+assert_type(def_gen.integers(0, I_u2_high_closed, dtype=np.uint16, endpoint=True), npt.NDArray[np.uint16])
+
+I_u4_low: np.ndarray[Any, np.dtype[np.uint32]] = np.array([0], dtype=np.uint32)
+I_u4_low_like: list[int] = [0]
+I_u4_high_open: np.ndarray[Any, np.dtype[np.uint32]] = np.array([4294967295], dtype=np.uint32)
+I_u4_high_closed: np.ndarray[Any, np.dtype[np.uint32]] = np.array([4294967295], dtype=np.uint32)
+
+assert_type(def_gen.integers(4294967296, dtype=np.int_), int)
+assert_type(def_gen.integers(0, 4294967296, dtype=np.int_), int)
+assert_type(def_gen.integers(4294967295, dtype=np.int_, endpoint=True), int)
+assert_type(def_gen.integers(0, 4294967295, dtype=np.int_, endpoint=True), int)
+assert_type(def_gen.integers(I_u4_low_like, 4294967295, dtype=np.int_, endpoint=True), npt.NDArray[np.int_])
+assert_type(def_gen.integers(I_u4_high_open, dtype=np.int_), npt.NDArray[np.int_])
+assert_type(def_gen.integers(I_u4_low, I_u4_high_open, dtype=np.int_), npt.NDArray[np.int_])
+assert_type(def_gen.integers(0, I_u4_high_open, dtype=np.int_), npt.NDArray[np.int_])
+assert_type(def_gen.integers(I_u4_high_closed, dtype=np.int_, endpoint=True), npt.NDArray[np.int_])
+assert_type(def_gen.integers(I_u4_low, I_u4_high_closed, dtype=np.int_, endpoint=True), npt.NDArray[np.int_])
+assert_type(def_gen.integers(0, I_u4_high_closed, dtype=np.int_, endpoint=True), npt.NDArray[np.int_])
+
+
+assert_type(def_gen.integers(4294967296, dtype="u4"), int)
+assert_type(def_gen.integers(0, 4294967296, dtype="u4"), int)
+assert_type(def_gen.integers(4294967295, dtype="u4", endpoint=True), int)
+assert_type(def_gen.integers(0, 4294967295, dtype="u4", endpoint=True), int)
+assert_type(def_gen.integers(I_u4_low_like, 4294967295, dtype="u4", endpoint=True), npt.NDArray[np.uint32])
+assert_type(def_gen.integers(I_u4_high_open, dtype="u4"), npt.NDArray[np.uint32])
+assert_type(def_gen.integers(I_u4_low, I_u4_high_open, dtype="u4"), npt.NDArray[np.uint32])
+assert_type(def_gen.integers(0, I_u4_high_open, dtype="u4"), npt.NDArray[np.uint32])
+assert_type(def_gen.integers(I_u4_high_closed, dtype="u4", endpoint=True), npt.NDArray[np.uint32])
+assert_type(def_gen.integers(I_u4_low, I_u4_high_closed, dtype="u4", endpoint=True), npt.NDArray[np.uint32])
+assert_type(def_gen.integers(0, I_u4_high_closed, dtype="u4", endpoint=True), npt.NDArray[np.uint32])
+
+assert_type(def_gen.integers(4294967296, dtype="uint32"), int)
+assert_type(def_gen.integers(0, 4294967296, dtype="uint32"), int)
+assert_type(def_gen.integers(4294967295, dtype="uint32", endpoint=True), int)
+assert_type(def_gen.integers(0, 4294967295, dtype="uint32", endpoint=True), int)
+assert_type(def_gen.integers(I_u4_low_like, 4294967295, dtype="uint32", endpoint=True), npt.NDArray[np.uint32])
+assert_type(def_gen.integers(I_u4_high_open, dtype="uint32"), npt.NDArray[np.uint32])
+assert_type(def_gen.integers(I_u4_low, I_u4_high_open, dtype="uint32"), npt.NDArray[np.uint32])
+assert_type(def_gen.integers(0, I_u4_high_open, dtype="uint32"), npt.NDArray[np.uint32])
+assert_type(def_gen.integers(I_u4_high_closed, dtype="uint32", endpoint=True), npt.NDArray[np.uint32])
+assert_type(def_gen.integers(I_u4_low, I_u4_high_closed, dtype="uint32", endpoint=True), npt.NDArray[np.uint32])
+assert_type(def_gen.integers(0, I_u4_high_closed, dtype="uint32", endpoint=True), npt.NDArray[np.uint32])
+
+assert_type(def_gen.integers(4294967296, dtype=np.uint32), int)
+assert_type(def_gen.integers(0, 4294967296, dtype=np.uint32), int)
+assert_type(def_gen.integers(4294967295, dtype=np.uint32, endpoint=True), int)
+assert_type(def_gen.integers(0, 4294967295, dtype=np.uint32, endpoint=True), int)
+assert_type(def_gen.integers(I_u4_low_like, 4294967295, dtype=np.uint32, endpoint=True), npt.NDArray[np.uint32])
+assert_type(def_gen.integers(I_u4_high_open, dtype=np.uint32), npt.NDArray[np.uint32])
+assert_type(def_gen.integers(I_u4_low, I_u4_high_open, dtype=np.uint32), npt.NDArray[np.uint32])
+assert_type(def_gen.integers(0, I_u4_high_open, dtype=np.uint32), npt.NDArray[np.uint32])
+assert_type(def_gen.integers(I_u4_high_closed, dtype=np.uint32, endpoint=True), npt.NDArray[np.uint32])
+assert_type(def_gen.integers(I_u4_low, I_u4_high_closed, dtype=np.uint32, endpoint=True), npt.NDArray[np.uint32])
+assert_type(def_gen.integers(0, I_u4_high_closed, dtype=np.uint32, endpoint=True), npt.NDArray[np.uint32])
+
+assert_type(def_gen.integers(4294967296, dtype=np.uint), int)
+assert_type(def_gen.integers(0, 4294967296, dtype=np.uint), int)
+assert_type(def_gen.integers(4294967295, dtype=np.uint, endpoint=True), int)
+assert_type(def_gen.integers(0, 4294967295, dtype=np.uint, endpoint=True), int)
+assert_type(def_gen.integers(I_u4_low_like, 4294967295, dtype=np.uint, endpoint=True), npt.NDArray[np.uint])
+assert_type(def_gen.integers(I_u4_high_open, dtype=np.uint), npt.NDArray[np.uint])
+assert_type(def_gen.integers(I_u4_low, I_u4_high_open, dtype=np.uint), npt.NDArray[np.uint])
+assert_type(def_gen.integers(0, I_u4_high_open, dtype=np.uint), npt.NDArray[np.uint])
+assert_type(def_gen.integers(I_u4_high_closed, dtype=np.uint, endpoint=True), npt.NDArray[np.uint])
+assert_type(def_gen.integers(I_u4_low, I_u4_high_closed, dtype=np.uint, endpoint=True), npt.NDArray[np.uint])
+assert_type(def_gen.integers(0, I_u4_high_closed, dtype=np.uint, endpoint=True), npt.NDArray[np.uint])
+
+I_u8_low: np.ndarray[Any, np.dtype[np.uint64]] = np.array([0], dtype=np.uint64)
+I_u8_low_like: list[int] = [0]
+I_u8_high_open: np.ndarray[Any, np.dtype[np.uint64]] = np.array([18446744073709551615], dtype=np.uint64)
+I_u8_high_closed: np.ndarray[Any, np.dtype[np.uint64]] = np.array([18446744073709551615], dtype=np.uint64)
+
+assert_type(def_gen.integers(18446744073709551616, dtype="u8"), int)
+assert_type(def_gen.integers(0, 18446744073709551616, dtype="u8"), int)
+assert_type(def_gen.integers(18446744073709551615, dtype="u8", endpoint=True), int)
+assert_type(def_gen.integers(0, 18446744073709551615, dtype="u8", endpoint=True), int)
+assert_type(def_gen.integers(I_u8_low_like, 18446744073709551615, dtype="u8", endpoint=True), npt.NDArray[np.uint64])
+assert_type(def_gen.integers(I_u8_high_open, dtype="u8"), npt.NDArray[np.uint64])
+assert_type(def_gen.integers(I_u8_low, I_u8_high_open, dtype="u8"), npt.NDArray[np.uint64])
+assert_type(def_gen.integers(0, I_u8_high_open, dtype="u8"), npt.NDArray[np.uint64])
+assert_type(def_gen.integers(I_u8_high_closed, dtype="u8", endpoint=True), npt.NDArray[np.uint64])
+assert_type(def_gen.integers(I_u8_low, I_u8_high_closed, dtype="u8", endpoint=True), npt.NDArray[np.uint64])
+assert_type(def_gen.integers(0, I_u8_high_closed, dtype="u8", endpoint=True), npt.NDArray[np.uint64])
+
+assert_type(def_gen.integers(18446744073709551616, dtype="uint64"), int)
+assert_type(def_gen.integers(0, 18446744073709551616, dtype="uint64"), int)
+assert_type(def_gen.integers(18446744073709551615, dtype="uint64", endpoint=True), int)
+assert_type(def_gen.integers(0, 18446744073709551615, dtype="uint64", endpoint=True), int)
+assert_type(def_gen.integers(I_u8_low_like, 18446744073709551615, dtype="uint64", endpoint=True), npt.NDArray[np.uint64])
+assert_type(def_gen.integers(I_u8_high_open, dtype="uint64"), npt.NDArray[np.uint64])
+assert_type(def_gen.integers(I_u8_low, I_u8_high_open, dtype="uint64"), npt.NDArray[np.uint64])
+assert_type(def_gen.integers(0, I_u8_high_open, dtype="uint64"), npt.NDArray[np.uint64])
+assert_type(def_gen.integers(I_u8_high_closed, dtype="uint64", endpoint=True), npt.NDArray[np.uint64])
+assert_type(def_gen.integers(I_u8_low, I_u8_high_closed, dtype="uint64", endpoint=True), npt.NDArray[np.uint64])
+assert_type(def_gen.integers(0, I_u8_high_closed, dtype="uint64", endpoint=True), npt.NDArray[np.uint64])
+
+assert_type(def_gen.integers(18446744073709551616, dtype=np.uint64), int)
+assert_type(def_gen.integers(0, 18446744073709551616, dtype=np.uint64), int)
+assert_type(def_gen.integers(18446744073709551615, dtype=np.uint64, endpoint=True), int)
+assert_type(def_gen.integers(0, 18446744073709551615, dtype=np.uint64, endpoint=True), int)
+assert_type(def_gen.integers(I_u8_low_like, 18446744073709551615, dtype=np.uint64, endpoint=True), npt.NDArray[np.uint64])
+assert_type(def_gen.integers(I_u8_high_open, dtype=np.uint64), npt.NDArray[np.uint64])
+assert_type(def_gen.integers(I_u8_low, I_u8_high_open, dtype=np.uint64), npt.NDArray[np.uint64])
+assert_type(def_gen.integers(0, I_u8_high_open, dtype=np.uint64), npt.NDArray[np.uint64])
+assert_type(def_gen.integers(I_u8_high_closed, dtype=np.uint64, endpoint=True), npt.NDArray[np.uint64])
+assert_type(def_gen.integers(I_u8_low, I_u8_high_closed, dtype=np.uint64, endpoint=True), npt.NDArray[np.uint64])
+assert_type(def_gen.integers(0, I_u8_high_closed, dtype=np.uint64, endpoint=True), npt.NDArray[np.uint64])
+
+I_i1_low: np.ndarray[Any, np.dtype[np.int8]] = np.array([-128], dtype=np.int8)
+I_i1_low_like: list[int] = [-128]
+I_i1_high_open: np.ndarray[Any, np.dtype[np.int8]] = np.array([127], dtype=np.int8)
+I_i1_high_closed: np.ndarray[Any, np.dtype[np.int8]] = np.array([127], dtype=np.int8)
+
+assert_type(def_gen.integers(128, dtype="i1"), int)
+assert_type(def_gen.integers(-128, 128, dtype="i1"), int)
+assert_type(def_gen.integers(127, dtype="i1", endpoint=True), int)
+assert_type(def_gen.integers(-128, 127, dtype="i1", endpoint=True), int)
+assert_type(def_gen.integers(I_i1_low_like, 127, dtype="i1", endpoint=True), npt.NDArray[np.int8])
+assert_type(def_gen.integers(I_i1_high_open, dtype="i1"), npt.NDArray[np.int8])
+assert_type(def_gen.integers(I_i1_low, I_i1_high_open, dtype="i1"), npt.NDArray[np.int8])
+assert_type(def_gen.integers(-128, I_i1_high_open, dtype="i1"), npt.NDArray[np.int8])
+assert_type(def_gen.integers(I_i1_high_closed, dtype="i1", endpoint=True), npt.NDArray[np.int8])
+assert_type(def_gen.integers(I_i1_low, I_i1_high_closed, dtype="i1", endpoint=True), npt.NDArray[np.int8])
+assert_type(def_gen.integers(-128, I_i1_high_closed, dtype="i1", endpoint=True), npt.NDArray[np.int8])
+
+assert_type(def_gen.integers(128, dtype="int8"), int)
+assert_type(def_gen.integers(-128, 128, dtype="int8"), int)
+assert_type(def_gen.integers(127, dtype="int8", endpoint=True), int)
+assert_type(def_gen.integers(-128, 127, dtype="int8", endpoint=True), int)
+assert_type(def_gen.integers(I_i1_low_like, 127, dtype="int8", endpoint=True), npt.NDArray[np.int8])
+assert_type(def_gen.integers(I_i1_high_open, dtype="int8"), npt.NDArray[np.int8])
+assert_type(def_gen.integers(I_i1_low, I_i1_high_open, dtype="int8"), npt.NDArray[np.int8])
+assert_type(def_gen.integers(-128, I_i1_high_open, dtype="int8"), npt.NDArray[np.int8])
+assert_type(def_gen.integers(I_i1_high_closed, dtype="int8", endpoint=True), npt.NDArray[np.int8])
+assert_type(def_gen.integers(I_i1_low, I_i1_high_closed, dtype="int8", endpoint=True), npt.NDArray[np.int8])
+assert_type(def_gen.integers(-128, I_i1_high_closed, dtype="int8", endpoint=True), npt.NDArray[np.int8])
+
+assert_type(def_gen.integers(128, dtype=np.int8), int)
+assert_type(def_gen.integers(-128, 128, dtype=np.int8), int)
+assert_type(def_gen.integers(127, dtype=np.int8, endpoint=True), int)
+assert_type(def_gen.integers(-128, 127, dtype=np.int8, endpoint=True), int)
+assert_type(def_gen.integers(I_i1_low_like, 127, dtype=np.int8, endpoint=True), npt.NDArray[np.int8])
+assert_type(def_gen.integers(I_i1_high_open, dtype=np.int8), npt.NDArray[np.int8])
+assert_type(def_gen.integers(I_i1_low, I_i1_high_open, dtype=np.int8), npt.NDArray[np.int8])
+assert_type(def_gen.integers(-128, I_i1_high_open, dtype=np.int8), npt.NDArray[np.int8])
+assert_type(def_gen.integers(I_i1_high_closed, dtype=np.int8, endpoint=True), npt.NDArray[np.int8])
+assert_type(def_gen.integers(I_i1_low, I_i1_high_closed, dtype=np.int8, endpoint=True), npt.NDArray[np.int8])
+assert_type(def_gen.integers(-128, I_i1_high_closed, dtype=np.int8, endpoint=True), npt.NDArray[np.int8])
+
+I_i2_low: npt.NDArray[np.int16] = np.array([-32768], dtype=np.int16)
+I_i2_low_like: list[int] = [-32768]
+I_i2_high_open: npt.NDArray[np.int16] = np.array([32767], dtype=np.int16)
+I_i2_high_closed: npt.NDArray[np.int16] = np.array([32767], dtype=np.int16)
+
+assert_type(def_gen.integers(32768, dtype="i2"), int)
+assert_type(def_gen.integers(-32768, 32768, dtype="i2"), int)
+assert_type(def_gen.integers(32767, dtype="i2", endpoint=True), int)
+assert_type(def_gen.integers(-32768, 32767, dtype="i2", endpoint=True), int)
+assert_type(def_gen.integers(I_i2_low_like, 32767, dtype="i2", endpoint=True), npt.NDArray[np.int16])
+assert_type(def_gen.integers(I_i2_high_open, dtype="i2"), npt.NDArray[np.int16])
+assert_type(def_gen.integers(I_i2_low, I_i2_high_open, dtype="i2"), npt.NDArray[np.int16])
+assert_type(def_gen.integers(-32768, I_i2_high_open, dtype="i2"), npt.NDArray[np.int16])
+assert_type(def_gen.integers(I_i2_high_closed, dtype="i2", endpoint=True), npt.NDArray[np.int16])
+assert_type(def_gen.integers(I_i2_low, I_i2_high_closed, dtype="i2", endpoint=True), npt.NDArray[np.int16])
+assert_type(def_gen.integers(-32768, I_i2_high_closed, dtype="i2", endpoint=True), npt.NDArray[np.int16])
+
+assert_type(def_gen.integers(32768, dtype="int16"), int)
+assert_type(def_gen.integers(-32768, 32768, dtype="int16"), int)
+assert_type(def_gen.integers(32767, dtype="int16", endpoint=True), int)
+assert_type(def_gen.integers(-32768, 32767, dtype="int16", endpoint=True), int)
+assert_type(def_gen.integers(I_i2_low_like, 32767, dtype="int16", endpoint=True), npt.NDArray[np.int16])
+assert_type(def_gen.integers(I_i2_high_open, dtype="int16"), npt.NDArray[np.int16])
+assert_type(def_gen.integers(I_i2_low, I_i2_high_open, dtype="int16"), npt.NDArray[np.int16])
+assert_type(def_gen.integers(-32768, I_i2_high_open, dtype="int16"), npt.NDArray[np.int16])
+assert_type(def_gen.integers(I_i2_high_closed, dtype="int16", endpoint=True), npt.NDArray[np.int16])
+assert_type(def_gen.integers(I_i2_low, I_i2_high_closed, dtype="int16", endpoint=True), npt.NDArray[np.int16])
+assert_type(def_gen.integers(-32768, I_i2_high_closed, dtype="int16", endpoint=True), npt.NDArray[np.int16])
+
+assert_type(def_gen.integers(32768, dtype=np.int16), int)
+assert_type(def_gen.integers(-32768, 32768, dtype=np.int16), int)
+assert_type(def_gen.integers(32767, dtype=np.int16, endpoint=True), int)
+assert_type(def_gen.integers(-32768, 32767, dtype=np.int16, endpoint=True), int)
+assert_type(def_gen.integers(I_i2_low_like, 32767, dtype=np.int16, endpoint=True), npt.NDArray[np.int16])
+assert_type(def_gen.integers(I_i2_high_open, dtype=np.int16), npt.NDArray[np.int16])
+assert_type(def_gen.integers(I_i2_low, I_i2_high_open, dtype=np.int16), npt.NDArray[np.int16])
+assert_type(def_gen.integers(-32768, I_i2_high_open, dtype=np.int16), npt.NDArray[np.int16])
+assert_type(def_gen.integers(I_i2_high_closed, dtype=np.int16, endpoint=True), npt.NDArray[np.int16])
+assert_type(def_gen.integers(I_i2_low, I_i2_high_closed, dtype=np.int16, endpoint=True), npt.NDArray[np.int16])
+assert_type(def_gen.integers(-32768, I_i2_high_closed, dtype=np.int16, endpoint=True), npt.NDArray[np.int16])
+
+I_i4_low: np.ndarray[Any, np.dtype[np.int32]] = np.array([-2147483648], dtype=np.int32)
+I_i4_low_like: list[int] = [-2147483648]
+I_i4_high_open: np.ndarray[Any, np.dtype[np.int32]] = np.array([2147483647], dtype=np.int32)
+I_i4_high_closed: np.ndarray[Any, np.dtype[np.int32]] = np.array([2147483647], dtype=np.int32)
+
+assert_type(def_gen.integers(2147483648, dtype="i4"), int)
+assert_type(def_gen.integers(-2147483648, 2147483648, dtype="i4"), int)
+assert_type(def_gen.integers(2147483647, dtype="i4", endpoint=True), int)
+assert_type(def_gen.integers(-2147483648, 2147483647, dtype="i4", endpoint=True), int)
+assert_type(def_gen.integers(I_i4_low_like, 2147483647, dtype="i4", endpoint=True), npt.NDArray[np.int32])
+assert_type(def_gen.integers(I_i4_high_open, dtype="i4"), npt.NDArray[np.int32])
+assert_type(def_gen.integers(I_i4_low, I_i4_high_open, dtype="i4"), npt.NDArray[np.int32])
+assert_type(def_gen.integers(-2147483648, I_i4_high_open, dtype="i4"), npt.NDArray[np.int32])
+assert_type(def_gen.integers(I_i4_high_closed, dtype="i4", endpoint=True), npt.NDArray[np.int32])
+assert_type(def_gen.integers(I_i4_low, I_i4_high_closed, dtype="i4", endpoint=True), npt.NDArray[np.int32])
+assert_type(def_gen.integers(-2147483648, I_i4_high_closed, dtype="i4", endpoint=True), npt.NDArray[np.int32])
+
+assert_type(def_gen.integers(2147483648, dtype="int32"), int)
+assert_type(def_gen.integers(-2147483648, 2147483648, dtype="int32"), int)
+assert_type(def_gen.integers(2147483647, dtype="int32", endpoint=True), int)
+assert_type(def_gen.integers(-2147483648, 2147483647, dtype="int32", endpoint=True), int)
+assert_type(def_gen.integers(I_i4_low_like, 2147483647, dtype="int32", endpoint=True), npt.NDArray[np.int32])
+assert_type(def_gen.integers(I_i4_high_open, dtype="int32"), npt.NDArray[np.int32])
+assert_type(def_gen.integers(I_i4_low, I_i4_high_open, dtype="int32"), npt.NDArray[np.int32])
+assert_type(def_gen.integers(-2147483648, I_i4_high_open, dtype="int32"), npt.NDArray[np.int32])
+assert_type(def_gen.integers(I_i4_high_closed, dtype="int32", endpoint=True), npt.NDArray[np.int32])
+assert_type(def_gen.integers(I_i4_low, I_i4_high_closed, dtype="int32", endpoint=True), npt.NDArray[np.int32])
+assert_type(def_gen.integers(-2147483648, I_i4_high_closed, dtype="int32", endpoint=True), npt.NDArray[np.int32])
+
+assert_type(def_gen.integers(2147483648, dtype=np.int32), int)
+assert_type(def_gen.integers(-2147483648, 2147483648, dtype=np.int32), int)
+assert_type(def_gen.integers(2147483647, dtype=np.int32, endpoint=True), int)
+assert_type(def_gen.integers(-2147483648, 2147483647, dtype=np.int32, endpoint=True), int)
+assert_type(def_gen.integers(I_i4_low_like, 2147483647, dtype=np.int32, endpoint=True), npt.NDArray[np.int32])
+assert_type(def_gen.integers(I_i4_high_open, dtype=np.int32), npt.NDArray[np.int32])
+assert_type(def_gen.integers(I_i4_low, I_i4_high_open, dtype=np.int32), npt.NDArray[np.int32])
+assert_type(def_gen.integers(-2147483648, I_i4_high_open, dtype=np.int32), npt.NDArray[np.int32])
+assert_type(def_gen.integers(I_i4_high_closed, dtype=np.int32, endpoint=True), npt.NDArray[np.int32])
+assert_type(def_gen.integers(I_i4_low, I_i4_high_closed, dtype=np.int32, endpoint=True), npt.NDArray[np.int32])
+assert_type(def_gen.integers(-2147483648, I_i4_high_closed, dtype=np.int32, endpoint=True), npt.NDArray[np.int32])
+
+I_i8_low: np.ndarray[Any, np.dtype[np.int64]] = np.array([-9223372036854775808], dtype=np.int64)
+I_i8_low_like: list[int] = [-9223372036854775808]
+I_i8_high_open: np.ndarray[Any, np.dtype[np.int64]] = np.array([9223372036854775807], dtype=np.int64)
+I_i8_high_closed: np.ndarray[Any, np.dtype[np.int64]] = np.array([9223372036854775807], dtype=np.int64)
+
+assert_type(def_gen.integers(9223372036854775808, dtype="i8"), int)
+assert_type(def_gen.integers(-9223372036854775808, 9223372036854775808, dtype="i8"), int)
+assert_type(def_gen.integers(9223372036854775807, dtype="i8", endpoint=True), int)
+assert_type(def_gen.integers(-9223372036854775808, 9223372036854775807, dtype="i8", endpoint=True), int)
+assert_type(def_gen.integers(I_i8_low_like, 9223372036854775807, dtype="i8", endpoint=True), npt.NDArray[np.int64])
+assert_type(def_gen.integers(I_i8_high_open, dtype="i8"), npt.NDArray[np.int64])
+assert_type(def_gen.integers(I_i8_low, I_i8_high_open, dtype="i8"), npt.NDArray[np.int64])
+assert_type(def_gen.integers(-9223372036854775808, I_i8_high_open, dtype="i8"), npt.NDArray[np.int64])
+assert_type(def_gen.integers(I_i8_high_closed, dtype="i8", endpoint=True), npt.NDArray[np.int64])
+assert_type(def_gen.integers(I_i8_low, I_i8_high_closed, dtype="i8", endpoint=True), npt.NDArray[np.int64])
+assert_type(def_gen.integers(-9223372036854775808, I_i8_high_closed, dtype="i8", endpoint=True), npt.NDArray[np.int64])
+
+assert_type(def_gen.integers(9223372036854775808, dtype="int64"), int)
+assert_type(def_gen.integers(-9223372036854775808, 9223372036854775808, dtype="int64"), int)
+assert_type(def_gen.integers(9223372036854775807, dtype="int64", endpoint=True), int)
+assert_type(def_gen.integers(-9223372036854775808, 9223372036854775807, dtype="int64", endpoint=True), int)
+assert_type(def_gen.integers(I_i8_low_like, 9223372036854775807, dtype="int64", endpoint=True), npt.NDArray[np.int64])
+assert_type(def_gen.integers(I_i8_high_open, dtype="int64"), npt.NDArray[np.int64])
+assert_type(def_gen.integers(I_i8_low, I_i8_high_open, dtype="int64"), npt.NDArray[np.int64])
+assert_type(def_gen.integers(-9223372036854775808, I_i8_high_open, dtype="int64"), npt.NDArray[np.int64])
+assert_type(def_gen.integers(I_i8_high_closed, dtype="int64", endpoint=True), npt.NDArray[np.int64])
+assert_type(def_gen.integers(I_i8_low, I_i8_high_closed, dtype="int64", endpoint=True), npt.NDArray[np.int64])
+assert_type(def_gen.integers(-9223372036854775808, I_i8_high_closed, dtype="int64", endpoint=True), npt.NDArray[np.int64])
+
+assert_type(def_gen.integers(9223372036854775808, dtype=np.int64), int)
+assert_type(def_gen.integers(-9223372036854775808, 9223372036854775808, dtype=np.int64), int)
+assert_type(def_gen.integers(9223372036854775807, dtype=np.int64, endpoint=True), int)
+assert_type(def_gen.integers(-9223372036854775808, 9223372036854775807, dtype=np.int64, endpoint=True), int)
+assert_type(def_gen.integers(I_i8_low_like, 9223372036854775807, dtype=np.int64, endpoint=True), npt.NDArray[np.int64])
+assert_type(def_gen.integers(I_i8_high_open, dtype=np.int64), npt.NDArray[np.int64])
+assert_type(def_gen.integers(I_i8_low, I_i8_high_open, dtype=np.int64), npt.NDArray[np.int64])
+assert_type(def_gen.integers(-9223372036854775808, I_i8_high_open, dtype=np.int64), npt.NDArray[np.int64])
+assert_type(def_gen.integers(I_i8_high_closed, dtype=np.int64, endpoint=True), npt.NDArray[np.int64])
+assert_type(def_gen.integers(I_i8_low, I_i8_high_closed, dtype=np.int64, endpoint=True), npt.NDArray[np.int64])
+assert_type(def_gen.integers(-9223372036854775808, I_i8_high_closed, dtype=np.int64, endpoint=True), npt.NDArray[np.int64])
+
+
+assert_type(def_gen.bit_generator, np.random.BitGenerator)
+
+assert_type(def_gen.bytes(2), bytes)
+
+assert_type(def_gen.choice(5), int)
+assert_type(def_gen.choice(5, 3), npt.NDArray[np.int64])
+assert_type(def_gen.choice(5, 3, replace=True), npt.NDArray[np.int64])
+assert_type(def_gen.choice(5, 3, p=[1 / 5] * 5), npt.NDArray[np.int64])
+assert_type(def_gen.choice(5, 3, p=[1 / 5] * 5, replace=False), npt.NDArray[np.int64])
+
+assert_type(def_gen.choice(["pooh", "rabbit", "piglet", "Christopher"]), Any)
+assert_type(def_gen.choice(["pooh", "rabbit", "piglet", "Christopher"], 3), np.ndarray[Any, Any])
+assert_type(def_gen.choice(["pooh", "rabbit", "piglet", "Christopher"], 3, p=[1 / 4] * 4), np.ndarray[Any, Any])
+assert_type(def_gen.choice(["pooh", "rabbit", "piglet", "Christopher"], 3, replace=True), np.ndarray[Any, Any])
+assert_type(def_gen.choice(["pooh", "rabbit", "piglet", "Christopher"], 3, replace=False, p=np.array([1 / 8, 1 / 8, 1 / 2, 1 / 4])), np.ndarray[Any, Any])
+
+assert_type(def_gen.dirichlet([0.5, 0.5]), npt.NDArray[np.float64])
+assert_type(def_gen.dirichlet(np.array([0.5, 0.5])), npt.NDArray[np.float64])
+assert_type(def_gen.dirichlet(np.array([0.5, 0.5]), size=3), npt.NDArray[np.float64])
+
+assert_type(def_gen.multinomial(20, [1 / 6.0] * 6), npt.NDArray[np.int64])
+assert_type(def_gen.multinomial(20, np.array([0.5, 0.5])), npt.NDArray[np.int64])
+assert_type(def_gen.multinomial(20, [1 / 6.0] * 6, size=2), npt.NDArray[np.int64])
+assert_type(def_gen.multinomial([[10], [20]], [1 / 6.0] * 6, size=(2, 2)), npt.NDArray[np.int64])
+assert_type(def_gen.multinomial(np.array([[10], [20]]), np.array([0.5, 0.5]), size=(2, 2)), npt.NDArray[np.int64])
+
+assert_type(def_gen.multivariate_hypergeometric([3, 5, 7], 2), npt.NDArray[np.int64])
+assert_type(def_gen.multivariate_hypergeometric(np.array([3, 5, 7]), 2), npt.NDArray[np.int64])
+assert_type(def_gen.multivariate_hypergeometric(np.array([3, 5, 7]), 2, size=4), npt.NDArray[np.int64])
+assert_type(def_gen.multivariate_hypergeometric(np.array([3, 5, 7]), 2, size=(4, 7)), npt.NDArray[np.int64])
+assert_type(def_gen.multivariate_hypergeometric([3, 5, 7], 2, method="count"), npt.NDArray[np.int64])
+assert_type(def_gen.multivariate_hypergeometric(np.array([3, 5, 7]), 2, method="marginals"), npt.NDArray[np.int64])
+
+assert_type(def_gen.multivariate_normal([0.0], [[1.0]]), npt.NDArray[np.float64])
+assert_type(def_gen.multivariate_normal([0.0], np.array([[1.0]])), npt.NDArray[np.float64])
+assert_type(def_gen.multivariate_normal(np.array([0.0]), [[1.0]]), npt.NDArray[np.float64])
+assert_type(def_gen.multivariate_normal([0.0], np.array([[1.0]])), npt.NDArray[np.float64])
+
+assert_type(def_gen.permutation(10), npt.NDArray[np.int64])
+assert_type(def_gen.permutation([1, 2, 3, 4]), np.ndarray[Any, Any])
+assert_type(def_gen.permutation(np.array([1, 2, 3, 4])), np.ndarray[Any, Any])
+assert_type(def_gen.permutation(D_2D, axis=1), np.ndarray[Any, Any])
+assert_type(def_gen.permuted(D_2D), np.ndarray[Any, Any])
+assert_type(def_gen.permuted(D_2D_like), np.ndarray[Any, Any])
+assert_type(def_gen.permuted(D_2D, axis=1), np.ndarray[Any, Any])
+assert_type(def_gen.permuted(D_2D, out=D_2D), np.ndarray[Any, Any])
+assert_type(def_gen.permuted(D_2D_like, out=D_2D), np.ndarray[Any, Any])
+assert_type(def_gen.permuted(D_2D_like, out=D_2D), np.ndarray[Any, Any])
+assert_type(def_gen.permuted(D_2D, axis=1, out=D_2D), np.ndarray[Any, Any])
+
+assert_type(def_gen.shuffle(np.arange(10)), None)
+assert_type(def_gen.shuffle([1, 2, 3, 4, 5]), None)
+assert_type(def_gen.shuffle(D_2D, axis=1), None)
+
+assert_type(np.random.Generator(pcg64), np.random.Generator)
+assert_type(def_gen.__str__(), str)
+assert_type(def_gen.__repr__(), str)
+def_gen_state = def_gen.__getstate__()
+assert_type(def_gen_state, dict[str, Any])
+assert_type(def_gen.__setstate__(def_gen_state), None)
+
+# RandomState
+random_st: np.random.RandomState = np.random.RandomState()
+
+assert_type(random_st.standard_normal(), float)
+assert_type(random_st.standard_normal(size=None), float)
+assert_type(random_st.standard_normal(size=1), npt.NDArray[np.float64])
+
+assert_type(random_st.random(), float)
+assert_type(random_st.random(size=None), float)
+assert_type(random_st.random(size=1), npt.NDArray[np.float64])
+
+assert_type(random_st.standard_cauchy(), float)
+assert_type(random_st.standard_cauchy(size=None), float)
+assert_type(random_st.standard_cauchy(size=1), npt.NDArray[np.float64])
+
+assert_type(random_st.standard_exponential(), float)
+assert_type(random_st.standard_exponential(size=None), float)
+assert_type(random_st.standard_exponential(size=1), npt.NDArray[np.float64])
+
+assert_type(random_st.zipf(1.5), int)
+assert_type(random_st.zipf(1.5, size=None), int)
+assert_type(random_st.zipf(1.5, size=1), npt.NDArray[np.int_])
+assert_type(random_st.zipf(D_arr_1p5), npt.NDArray[np.int_])
+assert_type(random_st.zipf(D_arr_1p5, size=1), npt.NDArray[np.int_])
+assert_type(random_st.zipf(D_arr_like_1p5), npt.NDArray[np.int_])
+assert_type(random_st.zipf(D_arr_like_1p5, size=1), npt.NDArray[np.int_])
+
+assert_type(random_st.weibull(0.5), float)
+assert_type(random_st.weibull(0.5, size=None), float)
+assert_type(random_st.weibull(0.5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.weibull(D_arr_0p5), npt.NDArray[np.float64])
+assert_type(random_st.weibull(D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.weibull(D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(random_st.weibull(D_arr_like_0p5, size=1), npt.NDArray[np.float64])
+
+assert_type(random_st.standard_t(0.5), float)
+assert_type(random_st.standard_t(0.5, size=None), float)
+assert_type(random_st.standard_t(0.5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.standard_t(D_arr_0p5), npt.NDArray[np.float64])
+assert_type(random_st.standard_t(D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.standard_t(D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(random_st.standard_t(D_arr_like_0p5, size=1), npt.NDArray[np.float64])
+
+assert_type(random_st.poisson(0.5), int)
+assert_type(random_st.poisson(0.5, size=None), int)
+assert_type(random_st.poisson(0.5, size=1), npt.NDArray[np.int_])
+assert_type(random_st.poisson(D_arr_0p5), npt.NDArray[np.int_])
+assert_type(random_st.poisson(D_arr_0p5, size=1), npt.NDArray[np.int_])
+assert_type(random_st.poisson(D_arr_like_0p5), npt.NDArray[np.int_])
+assert_type(random_st.poisson(D_arr_like_0p5, size=1), npt.NDArray[np.int_])
+
+assert_type(random_st.power(0.5), float)
+assert_type(random_st.power(0.5, size=None), float)
+assert_type(random_st.power(0.5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.power(D_arr_0p5), npt.NDArray[np.float64])
+assert_type(random_st.power(D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.power(D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(random_st.power(D_arr_like_0p5, size=1), npt.NDArray[np.float64])
+
+assert_type(random_st.pareto(0.5), float)
+assert_type(random_st.pareto(0.5, size=None), float)
+assert_type(random_st.pareto(0.5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.pareto(D_arr_0p5), npt.NDArray[np.float64])
+assert_type(random_st.pareto(D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.pareto(D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(random_st.pareto(D_arr_like_0p5, size=1), npt.NDArray[np.float64])
+
+assert_type(random_st.chisquare(0.5), float)
+assert_type(random_st.chisquare(0.5, size=None), float)
+assert_type(random_st.chisquare(0.5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.chisquare(D_arr_0p5), npt.NDArray[np.float64])
+assert_type(random_st.chisquare(D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.chisquare(D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(random_st.chisquare(D_arr_like_0p5, size=1), npt.NDArray[np.float64])
+
+assert_type(random_st.exponential(0.5), float)
+assert_type(random_st.exponential(0.5, size=None), float)
+assert_type(random_st.exponential(0.5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.exponential(D_arr_0p5), npt.NDArray[np.float64])
+assert_type(random_st.exponential(D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.exponential(D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(random_st.exponential(D_arr_like_0p5, size=1), npt.NDArray[np.float64])
+
+assert_type(random_st.geometric(0.5), int)
+assert_type(random_st.geometric(0.5, size=None), int)
+assert_type(random_st.geometric(0.5, size=1), npt.NDArray[np.int_])
+assert_type(random_st.geometric(D_arr_0p5), npt.NDArray[np.int_])
+assert_type(random_st.geometric(D_arr_0p5, size=1), npt.NDArray[np.int_])
+assert_type(random_st.geometric(D_arr_like_0p5), npt.NDArray[np.int_])
+assert_type(random_st.geometric(D_arr_like_0p5, size=1), npt.NDArray[np.int_])
+
+assert_type(random_st.logseries(0.5), int)
+assert_type(random_st.logseries(0.5, size=None), int)
+assert_type(random_st.logseries(0.5, size=1), npt.NDArray[np.int_])
+assert_type(random_st.logseries(D_arr_0p5), npt.NDArray[np.int_])
+assert_type(random_st.logseries(D_arr_0p5, size=1), npt.NDArray[np.int_])
+assert_type(random_st.logseries(D_arr_like_0p5), npt.NDArray[np.int_])
+assert_type(random_st.logseries(D_arr_like_0p5, size=1), npt.NDArray[np.int_])
+
+assert_type(random_st.rayleigh(0.5), float)
+assert_type(random_st.rayleigh(0.5, size=None), float)
+assert_type(random_st.rayleigh(0.5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.rayleigh(D_arr_0p5), npt.NDArray[np.float64])
+assert_type(random_st.rayleigh(D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.rayleigh(D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(random_st.rayleigh(D_arr_like_0p5, size=1), npt.NDArray[np.float64])
+
+assert_type(random_st.standard_gamma(0.5), float)
+assert_type(random_st.standard_gamma(0.5, size=None), float)
+assert_type(random_st.standard_gamma(0.5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.standard_gamma(D_arr_0p5), npt.NDArray[np.float64])
+assert_type(random_st.standard_gamma(D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.standard_gamma(D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(random_st.standard_gamma(D_arr_like_0p5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.standard_gamma(D_arr_like_0p5, size=1), npt.NDArray[np.float64])
+
+assert_type(random_st.vonmises(0.5, 0.5), float)
+assert_type(random_st.vonmises(0.5, 0.5, size=None), float)
+assert_type(random_st.vonmises(0.5, 0.5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.vonmises(D_arr_0p5, 0.5), npt.NDArray[np.float64])
+assert_type(random_st.vonmises(0.5, D_arr_0p5), npt.NDArray[np.float64])
+assert_type(random_st.vonmises(D_arr_0p5, 0.5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.vonmises(0.5, D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.vonmises(D_arr_like_0p5, 0.5), npt.NDArray[np.float64])
+assert_type(random_st.vonmises(0.5, D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(random_st.vonmises(D_arr_0p5, D_arr_0p5), npt.NDArray[np.float64])
+assert_type(random_st.vonmises(D_arr_like_0p5, D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(random_st.vonmises(D_arr_0p5, D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.vonmises(D_arr_like_0p5, D_arr_like_0p5, size=1), npt.NDArray[np.float64])
+
+assert_type(random_st.wald(0.5, 0.5), float)
+assert_type(random_st.wald(0.5, 0.5, size=None), float)
+assert_type(random_st.wald(0.5, 0.5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.wald(D_arr_0p5, 0.5), npt.NDArray[np.float64])
+assert_type(random_st.wald(0.5, D_arr_0p5), npt.NDArray[np.float64])
+assert_type(random_st.wald(D_arr_0p5, 0.5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.wald(0.5, D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.wald(D_arr_like_0p5, 0.5), npt.NDArray[np.float64])
+assert_type(random_st.wald(0.5, D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(random_st.wald(D_arr_0p5, D_arr_0p5), npt.NDArray[np.float64])
+assert_type(random_st.wald(D_arr_like_0p5, D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(random_st.wald(D_arr_0p5, D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.wald(D_arr_like_0p5, D_arr_like_0p5, size=1), npt.NDArray[np.float64])
+
+assert_type(random_st.uniform(0.5, 0.5), float)
+assert_type(random_st.uniform(0.5, 0.5, size=None), float)
+assert_type(random_st.uniform(0.5, 0.5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.uniform(D_arr_0p5, 0.5), npt.NDArray[np.float64])
+assert_type(random_st.uniform(0.5, D_arr_0p5), npt.NDArray[np.float64])
+assert_type(random_st.uniform(D_arr_0p5, 0.5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.uniform(0.5, D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.uniform(D_arr_like_0p5, 0.5), npt.NDArray[np.float64])
+assert_type(random_st.uniform(0.5, D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(random_st.uniform(D_arr_0p5, D_arr_0p5), npt.NDArray[np.float64])
+assert_type(random_st.uniform(D_arr_like_0p5, D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(random_st.uniform(D_arr_0p5, D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.uniform(D_arr_like_0p5, D_arr_like_0p5, size=1), npt.NDArray[np.float64])
+
+assert_type(random_st.beta(0.5, 0.5), float)
+assert_type(random_st.beta(0.5, 0.5, size=None), float)
+assert_type(random_st.beta(0.5, 0.5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.beta(D_arr_0p5, 0.5), npt.NDArray[np.float64])
+assert_type(random_st.beta(0.5, D_arr_0p5), npt.NDArray[np.float64])
+assert_type(random_st.beta(D_arr_0p5, 0.5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.beta(0.5, D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.beta(D_arr_like_0p5, 0.5), npt.NDArray[np.float64])
+assert_type(random_st.beta(0.5, D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(random_st.beta(D_arr_0p5, D_arr_0p5), npt.NDArray[np.float64])
+assert_type(random_st.beta(D_arr_like_0p5, D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(random_st.beta(D_arr_0p5, D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.beta(D_arr_like_0p5, D_arr_like_0p5, size=1), npt.NDArray[np.float64])
+
+assert_type(random_st.f(0.5, 0.5), float)
+assert_type(random_st.f(0.5, 0.5, size=None), float)
+assert_type(random_st.f(0.5, 0.5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.f(D_arr_0p5, 0.5), npt.NDArray[np.float64])
+assert_type(random_st.f(0.5, D_arr_0p5), npt.NDArray[np.float64])
+assert_type(random_st.f(D_arr_0p5, 0.5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.f(0.5, D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.f(D_arr_like_0p5, 0.5), npt.NDArray[np.float64])
+assert_type(random_st.f(0.5, D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(random_st.f(D_arr_0p5, D_arr_0p5), npt.NDArray[np.float64])
+assert_type(random_st.f(D_arr_like_0p5, D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(random_st.f(D_arr_0p5, D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.f(D_arr_like_0p5, D_arr_like_0p5, size=1), npt.NDArray[np.float64])
+
+assert_type(random_st.gamma(0.5, 0.5), float)
+assert_type(random_st.gamma(0.5, 0.5, size=None), float)
+assert_type(random_st.gamma(0.5, 0.5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.gamma(D_arr_0p5, 0.5), npt.NDArray[np.float64])
+assert_type(random_st.gamma(0.5, D_arr_0p5), npt.NDArray[np.float64])
+assert_type(random_st.gamma(D_arr_0p5, 0.5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.gamma(0.5, D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.gamma(D_arr_like_0p5, 0.5), npt.NDArray[np.float64])
+assert_type(random_st.gamma(0.5, D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(random_st.gamma(D_arr_0p5, D_arr_0p5), npt.NDArray[np.float64])
+assert_type(random_st.gamma(D_arr_like_0p5, D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(random_st.gamma(D_arr_0p5, D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.gamma(D_arr_like_0p5, D_arr_like_0p5, size=1), npt.NDArray[np.float64])
+
+assert_type(random_st.gumbel(0.5, 0.5), float)
+assert_type(random_st.gumbel(0.5, 0.5, size=None), float)
+assert_type(random_st.gumbel(0.5, 0.5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.gumbel(D_arr_0p5, 0.5), npt.NDArray[np.float64])
+assert_type(random_st.gumbel(0.5, D_arr_0p5), npt.NDArray[np.float64])
+assert_type(random_st.gumbel(D_arr_0p5, 0.5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.gumbel(0.5, D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.gumbel(D_arr_like_0p5, 0.5), npt.NDArray[np.float64])
+assert_type(random_st.gumbel(0.5, D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(random_st.gumbel(D_arr_0p5, D_arr_0p5), npt.NDArray[np.float64])
+assert_type(random_st.gumbel(D_arr_like_0p5, D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(random_st.gumbel(D_arr_0p5, D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.gumbel(D_arr_like_0p5, D_arr_like_0p5, size=1), npt.NDArray[np.float64])
+
+assert_type(random_st.laplace(0.5, 0.5), float)
+assert_type(random_st.laplace(0.5, 0.5, size=None), float)
+assert_type(random_st.laplace(0.5, 0.5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.laplace(D_arr_0p5, 0.5), npt.NDArray[np.float64])
+assert_type(random_st.laplace(0.5, D_arr_0p5), npt.NDArray[np.float64])
+assert_type(random_st.laplace(D_arr_0p5, 0.5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.laplace(0.5, D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.laplace(D_arr_like_0p5, 0.5), npt.NDArray[np.float64])
+assert_type(random_st.laplace(0.5, D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(random_st.laplace(D_arr_0p5, D_arr_0p5), npt.NDArray[np.float64])
+assert_type(random_st.laplace(D_arr_like_0p5, D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(random_st.laplace(D_arr_0p5, D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.laplace(D_arr_like_0p5, D_arr_like_0p5, size=1), npt.NDArray[np.float64])
+
+assert_type(random_st.logistic(0.5, 0.5), float)
+assert_type(random_st.logistic(0.5, 0.5, size=None), float)
+assert_type(random_st.logistic(0.5, 0.5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.logistic(D_arr_0p5, 0.5), npt.NDArray[np.float64])
+assert_type(random_st.logistic(0.5, D_arr_0p5), npt.NDArray[np.float64])
+assert_type(random_st.logistic(D_arr_0p5, 0.5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.logistic(0.5, D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.logistic(D_arr_like_0p5, 0.5), npt.NDArray[np.float64])
+assert_type(random_st.logistic(0.5, D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(random_st.logistic(D_arr_0p5, D_arr_0p5), npt.NDArray[np.float64])
+assert_type(random_st.logistic(D_arr_like_0p5, D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(random_st.logistic(D_arr_0p5, D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.logistic(D_arr_like_0p5, D_arr_like_0p5, size=1), npt.NDArray[np.float64])
+
+assert_type(random_st.lognormal(0.5, 0.5), float)
+assert_type(random_st.lognormal(0.5, 0.5, size=None), float)
+assert_type(random_st.lognormal(0.5, 0.5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.lognormal(D_arr_0p5, 0.5), npt.NDArray[np.float64])
+assert_type(random_st.lognormal(0.5, D_arr_0p5), npt.NDArray[np.float64])
+assert_type(random_st.lognormal(D_arr_0p5, 0.5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.lognormal(0.5, D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.lognormal(D_arr_like_0p5, 0.5), npt.NDArray[np.float64])
+assert_type(random_st.lognormal(0.5, D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(random_st.lognormal(D_arr_0p5, D_arr_0p5), npt.NDArray[np.float64])
+assert_type(random_st.lognormal(D_arr_like_0p5, D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(random_st.lognormal(D_arr_0p5, D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.lognormal(D_arr_like_0p5, D_arr_like_0p5, size=1), npt.NDArray[np.float64])
+
+assert_type(random_st.noncentral_chisquare(0.5, 0.5), float)
+assert_type(random_st.noncentral_chisquare(0.5, 0.5, size=None), float)
+assert_type(random_st.noncentral_chisquare(0.5, 0.5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.noncentral_chisquare(D_arr_0p5, 0.5), npt.NDArray[np.float64])
+assert_type(random_st.noncentral_chisquare(0.5, D_arr_0p5), npt.NDArray[np.float64])
+assert_type(random_st.noncentral_chisquare(D_arr_0p5, 0.5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.noncentral_chisquare(0.5, D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.noncentral_chisquare(D_arr_like_0p5, 0.5), npt.NDArray[np.float64])
+assert_type(random_st.noncentral_chisquare(0.5, D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(random_st.noncentral_chisquare(D_arr_0p5, D_arr_0p5), npt.NDArray[np.float64])
+assert_type(random_st.noncentral_chisquare(D_arr_like_0p5, D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(random_st.noncentral_chisquare(D_arr_0p5, D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.noncentral_chisquare(D_arr_like_0p5, D_arr_like_0p5, size=1), npt.NDArray[np.float64])
+
+assert_type(random_st.normal(0.5, 0.5), float)
+assert_type(random_st.normal(0.5, 0.5, size=None), float)
+assert_type(random_st.normal(0.5, 0.5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.normal(D_arr_0p5, 0.5), npt.NDArray[np.float64])
+assert_type(random_st.normal(0.5, D_arr_0p5), npt.NDArray[np.float64])
+assert_type(random_st.normal(D_arr_0p5, 0.5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.normal(0.5, D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.normal(D_arr_like_0p5, 0.5), npt.NDArray[np.float64])
+assert_type(random_st.normal(0.5, D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(random_st.normal(D_arr_0p5, D_arr_0p5), npt.NDArray[np.float64])
+assert_type(random_st.normal(D_arr_like_0p5, D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(random_st.normal(D_arr_0p5, D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.normal(D_arr_like_0p5, D_arr_like_0p5, size=1), npt.NDArray[np.float64])
+
+assert_type(random_st.triangular(0.1, 0.5, 0.9), float)
+assert_type(random_st.triangular(0.1, 0.5, 0.9, size=None), float)
+assert_type(random_st.triangular(0.1, 0.5, 0.9, size=1), npt.NDArray[np.float64])
+assert_type(random_st.triangular(D_arr_0p1, 0.5, 0.9), npt.NDArray[np.float64])
+assert_type(random_st.triangular(0.1, D_arr_0p5, 0.9), npt.NDArray[np.float64])
+assert_type(random_st.triangular(D_arr_0p1, 0.5, D_arr_like_0p9, size=1), npt.NDArray[np.float64])
+assert_type(random_st.triangular(0.1, D_arr_0p5, 0.9, size=1), npt.NDArray[np.float64])
+assert_type(random_st.triangular(D_arr_like_0p1, 0.5, D_arr_0p9), npt.NDArray[np.float64])
+assert_type(random_st.triangular(0.5, D_arr_like_0p5, 0.9), npt.NDArray[np.float64])
+assert_type(random_st.triangular(D_arr_0p1, D_arr_0p5, 0.9), npt.NDArray[np.float64])
+assert_type(random_st.triangular(D_arr_like_0p1, D_arr_like_0p5, 0.9), npt.NDArray[np.float64])
+assert_type(random_st.triangular(D_arr_0p1, D_arr_0p5, D_arr_0p9, size=1), npt.NDArray[np.float64])
+assert_type(random_st.triangular(D_arr_like_0p1, D_arr_like_0p5, D_arr_like_0p9, size=1), npt.NDArray[np.float64])
+
+assert_type(random_st.noncentral_f(0.1, 0.5, 0.9), float)
+assert_type(random_st.noncentral_f(0.1, 0.5, 0.9, size=None), float)
+assert_type(random_st.noncentral_f(0.1, 0.5, 0.9, size=1), npt.NDArray[np.float64])
+assert_type(random_st.noncentral_f(D_arr_0p1, 0.5, 0.9), npt.NDArray[np.float64])
+assert_type(random_st.noncentral_f(0.1, D_arr_0p5, 0.9), npt.NDArray[np.float64])
+assert_type(random_st.noncentral_f(D_arr_0p1, 0.5, D_arr_like_0p9, size=1), npt.NDArray[np.float64])
+assert_type(random_st.noncentral_f(0.1, D_arr_0p5, 0.9, size=1), npt.NDArray[np.float64])
+assert_type(random_st.noncentral_f(D_arr_like_0p1, 0.5, D_arr_0p9), npt.NDArray[np.float64])
+assert_type(random_st.noncentral_f(0.5, D_arr_like_0p5, 0.9), npt.NDArray[np.float64])
+assert_type(random_st.noncentral_f(D_arr_0p1, D_arr_0p5, 0.9), npt.NDArray[np.float64])
+assert_type(random_st.noncentral_f(D_arr_like_0p1, D_arr_like_0p5, 0.9), npt.NDArray[np.float64])
+assert_type(random_st.noncentral_f(D_arr_0p1, D_arr_0p5, D_arr_0p9, size=1), npt.NDArray[np.float64])
+assert_type(random_st.noncentral_f(D_arr_like_0p1, D_arr_like_0p5, D_arr_like_0p9, size=1), npt.NDArray[np.float64])
+
+assert_type(random_st.binomial(10, 0.5), int)
+assert_type(random_st.binomial(10, 0.5, size=None), int)
+assert_type(random_st.binomial(10, 0.5, size=1), npt.NDArray[np.int_])
+assert_type(random_st.binomial(I_arr_10, 0.5), npt.NDArray[np.int_])
+assert_type(random_st.binomial(10, D_arr_0p5), npt.NDArray[np.int_])
+assert_type(random_st.binomial(I_arr_10, 0.5, size=1), npt.NDArray[np.int_])
+assert_type(random_st.binomial(10, D_arr_0p5, size=1), npt.NDArray[np.int_])
+assert_type(random_st.binomial(I_arr_like_10, 0.5), npt.NDArray[np.int_])
+assert_type(random_st.binomial(10, D_arr_like_0p5), npt.NDArray[np.int_])
+assert_type(random_st.binomial(I_arr_10, D_arr_0p5), npt.NDArray[np.int_])
+assert_type(random_st.binomial(I_arr_like_10, D_arr_like_0p5), npt.NDArray[np.int_])
+assert_type(random_st.binomial(I_arr_10, D_arr_0p5, size=1), npt.NDArray[np.int_])
+assert_type(random_st.binomial(I_arr_like_10, D_arr_like_0p5, size=1), npt.NDArray[np.int_])
+
+assert_type(random_st.negative_binomial(10, 0.5), int)
+assert_type(random_st.negative_binomial(10, 0.5, size=None), int)
+assert_type(random_st.negative_binomial(10, 0.5, size=1), npt.NDArray[np.int_])
+assert_type(random_st.negative_binomial(I_arr_10, 0.5), npt.NDArray[np.int_])
+assert_type(random_st.negative_binomial(10, D_arr_0p5), npt.NDArray[np.int_])
+assert_type(random_st.negative_binomial(I_arr_10, 0.5, size=1), npt.NDArray[np.int_])
+assert_type(random_st.negative_binomial(10, D_arr_0p5, size=1), npt.NDArray[np.int_])
+assert_type(random_st.negative_binomial(I_arr_like_10, 0.5), npt.NDArray[np.int_])
+assert_type(random_st.negative_binomial(10, D_arr_like_0p5), npt.NDArray[np.int_])
+assert_type(random_st.negative_binomial(I_arr_10, D_arr_0p5), npt.NDArray[np.int_])
+assert_type(random_st.negative_binomial(I_arr_like_10, D_arr_like_0p5), npt.NDArray[np.int_])
+assert_type(random_st.negative_binomial(I_arr_10, D_arr_0p5, size=1), npt.NDArray[np.int_])
+assert_type(random_st.negative_binomial(I_arr_like_10, D_arr_like_0p5, size=1), npt.NDArray[np.int_])
+
+assert_type(random_st.hypergeometric(20, 20, 10), int)
+assert_type(random_st.hypergeometric(20, 20, 10, size=None), int)
+assert_type(random_st.hypergeometric(20, 20, 10, size=1), npt.NDArray[np.int_])
+assert_type(random_st.hypergeometric(I_arr_20, 20, 10), npt.NDArray[np.int_])
+assert_type(random_st.hypergeometric(20, I_arr_20, 10), npt.NDArray[np.int_])
+assert_type(random_st.hypergeometric(I_arr_20, 20, I_arr_like_10, size=1), npt.NDArray[np.int_])
+assert_type(random_st.hypergeometric(20, I_arr_20, 10, size=1), npt.NDArray[np.int_])
+assert_type(random_st.hypergeometric(I_arr_like_20, 20, I_arr_10), npt.NDArray[np.int_])
+assert_type(random_st.hypergeometric(20, I_arr_like_20, 10), npt.NDArray[np.int_])
+assert_type(random_st.hypergeometric(I_arr_20, I_arr_20, 10), npt.NDArray[np.int_])
+assert_type(random_st.hypergeometric(I_arr_like_20, I_arr_like_20, 10), npt.NDArray[np.int_])
+assert_type(random_st.hypergeometric(I_arr_20, I_arr_20, I_arr_10, size=1), npt.NDArray[np.int_])
+assert_type(random_st.hypergeometric(I_arr_like_20, I_arr_like_20, I_arr_like_10, size=1), npt.NDArray[np.int_])
+
+assert_type(random_st.randint(0, 100), int)
+assert_type(random_st.randint(100), int)
+assert_type(random_st.randint([100]), npt.NDArray[np.int_])
+assert_type(random_st.randint(0, [100]), npt.NDArray[np.int_])
+
+assert_type(random_st.randint(2, dtype=bool), bool)
+assert_type(random_st.randint(0, 2, dtype=bool), bool)
+assert_type(random_st.randint(I_bool_high_open, dtype=bool), npt.NDArray[np.bool_])
+assert_type(random_st.randint(I_bool_low, I_bool_high_open, dtype=bool), npt.NDArray[np.bool_])
+assert_type(random_st.randint(0, I_bool_high_open, dtype=bool), npt.NDArray[np.bool_])
+
+assert_type(random_st.randint(2, dtype=np.bool_), bool)
+assert_type(random_st.randint(0, 2, dtype=np.bool_), bool)
+assert_type(random_st.randint(I_bool_high_open, dtype=np.bool_), npt.NDArray[np.bool_])
+assert_type(random_st.randint(I_bool_low, I_bool_high_open, dtype=np.bool_), npt.NDArray[np.bool_])
+assert_type(random_st.randint(0, I_bool_high_open, dtype=np.bool_), npt.NDArray[np.bool_])
+
+assert_type(random_st.randint(256, dtype="u1"), int)
+assert_type(random_st.randint(0, 256, dtype="u1"), int)
+assert_type(random_st.randint(I_u1_high_open, dtype="u1"), npt.NDArray[np.uint8])
+assert_type(random_st.randint(I_u1_low, I_u1_high_open, dtype="u1"), npt.NDArray[np.uint8])
+assert_type(random_st.randint(0, I_u1_high_open, dtype="u1"), npt.NDArray[np.uint8])
+
+assert_type(random_st.randint(256, dtype="uint8"), int)
+assert_type(random_st.randint(0, 256, dtype="uint8"), int)
+assert_type(random_st.randint(I_u1_high_open, dtype="uint8"), npt.NDArray[np.uint8])
+assert_type(random_st.randint(I_u1_low, I_u1_high_open, dtype="uint8"), npt.NDArray[np.uint8])
+assert_type(random_st.randint(0, I_u1_high_open, dtype="uint8"), npt.NDArray[np.uint8])
+
+assert_type(random_st.randint(256, dtype=np.uint8), int)
+assert_type(random_st.randint(0, 256, dtype=np.uint8), int)
+assert_type(random_st.randint(I_u1_high_open, dtype=np.uint8), npt.NDArray[np.uint8])
+assert_type(random_st.randint(I_u1_low, I_u1_high_open, dtype=np.uint8), npt.NDArray[np.uint8])
+assert_type(random_st.randint(0, I_u1_high_open, dtype=np.uint8), npt.NDArray[np.uint8])
+
+assert_type(random_st.randint(65536, dtype="u2"), int)
+assert_type(random_st.randint(0, 65536, dtype="u2"), int)
+assert_type(random_st.randint(I_u2_high_open, dtype="u2"), npt.NDArray[np.uint16])
+assert_type(random_st.randint(I_u2_low, I_u2_high_open, dtype="u2"), npt.NDArray[np.uint16])
+assert_type(random_st.randint(0, I_u2_high_open, dtype="u2"), npt.NDArray[np.uint16])
+
+assert_type(random_st.randint(65536, dtype="uint16"), int)
+assert_type(random_st.randint(0, 65536, dtype="uint16"), int)
+assert_type(random_st.randint(I_u2_high_open, dtype="uint16"), npt.NDArray[np.uint16])
+assert_type(random_st.randint(I_u2_low, I_u2_high_open, dtype="uint16"), npt.NDArray[np.uint16])
+assert_type(random_st.randint(0, I_u2_high_open, dtype="uint16"), npt.NDArray[np.uint16])
+
+assert_type(random_st.randint(65536, dtype=np.uint16), int)
+assert_type(random_st.randint(0, 65536, dtype=np.uint16), int)
+assert_type(random_st.randint(I_u2_high_open, dtype=np.uint16), npt.NDArray[np.uint16])
+assert_type(random_st.randint(I_u2_low, I_u2_high_open, dtype=np.uint16), npt.NDArray[np.uint16])
+assert_type(random_st.randint(0, I_u2_high_open, dtype=np.uint16), npt.NDArray[np.uint16])
+
+assert_type(random_st.randint(4294967296, dtype="u4"), int)
+assert_type(random_st.randint(0, 4294967296, dtype="u4"), int)
+assert_type(random_st.randint(I_u4_high_open, dtype="u4"), npt.NDArray[np.uint32])
+assert_type(random_st.randint(I_u4_low, I_u4_high_open, dtype="u4"), npt.NDArray[np.uint32])
+assert_type(random_st.randint(0, I_u4_high_open, dtype="u4"), npt.NDArray[np.uint32])
+
+assert_type(random_st.randint(4294967296, dtype="uint32"), int)
+assert_type(random_st.randint(0, 4294967296, dtype="uint32"), int)
+assert_type(random_st.randint(I_u4_high_open, dtype="uint32"), npt.NDArray[np.uint32])
+assert_type(random_st.randint(I_u4_low, I_u4_high_open, dtype="uint32"), npt.NDArray[np.uint32])
+assert_type(random_st.randint(0, I_u4_high_open, dtype="uint32"), npt.NDArray[np.uint32])
+
+assert_type(random_st.randint(4294967296, dtype=np.uint32), int)
+assert_type(random_st.randint(0, 4294967296, dtype=np.uint32), int)
+assert_type(random_st.randint(I_u4_high_open, dtype=np.uint32), npt.NDArray[np.uint32])
+assert_type(random_st.randint(I_u4_low, I_u4_high_open, dtype=np.uint32), npt.NDArray[np.uint32])
+assert_type(random_st.randint(0, I_u4_high_open, dtype=np.uint32), npt.NDArray[np.uint32])
+
+assert_type(random_st.randint(4294967296, dtype=np.uint), int)
+assert_type(random_st.randint(0, 4294967296, dtype=np.uint), int)
+assert_type(random_st.randint(I_u4_high_open, dtype=np.uint), npt.NDArray[np.uint])
+assert_type(random_st.randint(I_u4_low, I_u4_high_open, dtype=np.uint), npt.NDArray[np.uint])
+assert_type(random_st.randint(0, I_u4_high_open, dtype=np.uint), npt.NDArray[np.uint])
+
+assert_type(random_st.randint(18446744073709551616, dtype="u8"), int)
+assert_type(random_st.randint(0, 18446744073709551616, dtype="u8"), int)
+assert_type(random_st.randint(I_u8_high_open, dtype="u8"), npt.NDArray[np.uint64])
+assert_type(random_st.randint(I_u8_low, I_u8_high_open, dtype="u8"), npt.NDArray[np.uint64])
+assert_type(random_st.randint(0, I_u8_high_open, dtype="u8"), npt.NDArray[np.uint64])
+
+assert_type(random_st.randint(18446744073709551616, dtype="uint64"), int)
+assert_type(random_st.randint(0, 18446744073709551616, dtype="uint64"), int)
+assert_type(random_st.randint(I_u8_high_open, dtype="uint64"), npt.NDArray[np.uint64])
+assert_type(random_st.randint(I_u8_low, I_u8_high_open, dtype="uint64"), npt.NDArray[np.uint64])
+assert_type(random_st.randint(0, I_u8_high_open, dtype="uint64"), npt.NDArray[np.uint64])
+
+assert_type(random_st.randint(18446744073709551616, dtype=np.uint64), int)
+assert_type(random_st.randint(0, 18446744073709551616, dtype=np.uint64), int)
+assert_type(random_st.randint(I_u8_high_open, dtype=np.uint64), npt.NDArray[np.uint64])
+assert_type(random_st.randint(I_u8_low, I_u8_high_open, dtype=np.uint64), npt.NDArray[np.uint64])
+assert_type(random_st.randint(0, I_u8_high_open, dtype=np.uint64), npt.NDArray[np.uint64])
+
+assert_type(random_st.randint(128, dtype="i1"), int)
+assert_type(random_st.randint(-128, 128, dtype="i1"), int)
+assert_type(random_st.randint(I_i1_high_open, dtype="i1"), npt.NDArray[np.int8])
+assert_type(random_st.randint(I_i1_low, I_i1_high_open, dtype="i1"), npt.NDArray[np.int8])
+assert_type(random_st.randint(-128, I_i1_high_open, dtype="i1"), npt.NDArray[np.int8])
+
+assert_type(random_st.randint(128, dtype="int8"), int)
+assert_type(random_st.randint(-128, 128, dtype="int8"), int)
+assert_type(random_st.randint(I_i1_high_open, dtype="int8"), npt.NDArray[np.int8])
+assert_type(random_st.randint(I_i1_low, I_i1_high_open, dtype="int8"), npt.NDArray[np.int8])
+assert_type(random_st.randint(-128, I_i1_high_open, dtype="int8"), npt.NDArray[np.int8])
+
+assert_type(random_st.randint(128, dtype=np.int8), int)
+assert_type(random_st.randint(-128, 128, dtype=np.int8), int)
+assert_type(random_st.randint(I_i1_high_open, dtype=np.int8), npt.NDArray[np.int8])
+assert_type(random_st.randint(I_i1_low, I_i1_high_open, dtype=np.int8), npt.NDArray[np.int8])
+assert_type(random_st.randint(-128, I_i1_high_open, dtype=np.int8), npt.NDArray[np.int8])
+
+assert_type(random_st.randint(32768, dtype="i2"), int)
+assert_type(random_st.randint(-32768, 32768, dtype="i2"), int)
+assert_type(random_st.randint(I_i2_high_open, dtype="i2"), npt.NDArray[np.int16])
+assert_type(random_st.randint(I_i2_low, I_i2_high_open, dtype="i2"), npt.NDArray[np.int16])
+assert_type(random_st.randint(-32768, I_i2_high_open, dtype="i2"), npt.NDArray[np.int16])
+assert_type(random_st.randint(32768, dtype="int16"), int)
+assert_type(random_st.randint(-32768, 32768, dtype="int16"), int)
+assert_type(random_st.randint(I_i2_high_open, dtype="int16"), npt.NDArray[np.int16])
+assert_type(random_st.randint(I_i2_low, I_i2_high_open, dtype="int16"), npt.NDArray[np.int16])
+assert_type(random_st.randint(-32768, I_i2_high_open, dtype="int16"), npt.NDArray[np.int16])
+assert_type(random_st.randint(32768, dtype=np.int16), int)
+assert_type(random_st.randint(-32768, 32768, dtype=np.int16), int)
+assert_type(random_st.randint(I_i2_high_open, dtype=np.int16), npt.NDArray[np.int16])
+assert_type(random_st.randint(I_i2_low, I_i2_high_open, dtype=np.int16), npt.NDArray[np.int16])
+assert_type(random_st.randint(-32768, I_i2_high_open, dtype=np.int16), npt.NDArray[np.int16])
+
+assert_type(random_st.randint(2147483648, dtype="i4"), int)
+assert_type(random_st.randint(-2147483648, 2147483648, dtype="i4"), int)
+assert_type(random_st.randint(I_i4_high_open, dtype="i4"), npt.NDArray[np.int32])
+assert_type(random_st.randint(I_i4_low, I_i4_high_open, dtype="i4"), npt.NDArray[np.int32])
+assert_type(random_st.randint(-2147483648, I_i4_high_open, dtype="i4"), npt.NDArray[np.int32])
+
+assert_type(random_st.randint(2147483648, dtype="int32"), int)
+assert_type(random_st.randint(-2147483648, 2147483648, dtype="int32"), int)
+assert_type(random_st.randint(I_i4_high_open, dtype="int32"), npt.NDArray[np.int32])
+assert_type(random_st.randint(I_i4_low, I_i4_high_open, dtype="int32"), npt.NDArray[np.int32])
+assert_type(random_st.randint(-2147483648, I_i4_high_open, dtype="int32"), npt.NDArray[np.int32])
+
+assert_type(random_st.randint(2147483648, dtype=np.int32), int)
+assert_type(random_st.randint(-2147483648, 2147483648, dtype=np.int32), int)
+assert_type(random_st.randint(I_i4_high_open, dtype=np.int32), npt.NDArray[np.int32])
+assert_type(random_st.randint(I_i4_low, I_i4_high_open, dtype=np.int32), npt.NDArray[np.int32])
+assert_type(random_st.randint(-2147483648, I_i4_high_open, dtype=np.int32), npt.NDArray[np.int32])
+
+assert_type(random_st.randint(2147483648, dtype=np.int_), int)
+assert_type(random_st.randint(-2147483648, 2147483648, dtype=np.int_), int)
+assert_type(random_st.randint(I_i4_high_open, dtype=np.int_), npt.NDArray[np.int_])
+assert_type(random_st.randint(I_i4_low, I_i4_high_open, dtype=np.int_), npt.NDArray[np.int_])
+assert_type(random_st.randint(-2147483648, I_i4_high_open, dtype=np.int_), npt.NDArray[np.int_])
+
+assert_type(random_st.randint(9223372036854775808, dtype="i8"), int)
+assert_type(random_st.randint(-9223372036854775808, 9223372036854775808, dtype="i8"), int)
+assert_type(random_st.randint(I_i8_high_open, dtype="i8"), npt.NDArray[np.int64])
+assert_type(random_st.randint(I_i8_low, I_i8_high_open, dtype="i8"), npt.NDArray[np.int64])
+assert_type(random_st.randint(-9223372036854775808, I_i8_high_open, dtype="i8"), npt.NDArray[np.int64])
+
+assert_type(random_st.randint(9223372036854775808, dtype="int64"), int)
+assert_type(random_st.randint(-9223372036854775808, 9223372036854775808, dtype="int64"), int)
+assert_type(random_st.randint(I_i8_high_open, dtype="int64"), npt.NDArray[np.int64])
+assert_type(random_st.randint(I_i8_low, I_i8_high_open, dtype="int64"), npt.NDArray[np.int64])
+assert_type(random_st.randint(-9223372036854775808, I_i8_high_open, dtype="int64"), npt.NDArray[np.int64])
+
+assert_type(random_st.randint(9223372036854775808, dtype=np.int64), int)
+assert_type(random_st.randint(-9223372036854775808, 9223372036854775808, dtype=np.int64), int)
+assert_type(random_st.randint(I_i8_high_open, dtype=np.int64), npt.NDArray[np.int64])
+assert_type(random_st.randint(I_i8_low, I_i8_high_open, dtype=np.int64), npt.NDArray[np.int64])
+assert_type(random_st.randint(-9223372036854775808, I_i8_high_open, dtype=np.int64), npt.NDArray[np.int64])
+
+assert_type(random_st._bit_generator, np.random.BitGenerator)
+
+assert_type(random_st.bytes(2), bytes)
+
+assert_type(random_st.choice(5), int)
+assert_type(random_st.choice(5, 3), npt.NDArray[np.int_])
+assert_type(random_st.choice(5, 3, replace=True), npt.NDArray[np.int_])
+assert_type(random_st.choice(5, 3, p=[1 / 5] * 5), npt.NDArray[np.int_])
+assert_type(random_st.choice(5, 3, p=[1 / 5] * 5, replace=False), npt.NDArray[np.int_])
+
+assert_type(random_st.choice(["pooh", "rabbit", "piglet", "Christopher"]), Any)
+assert_type(random_st.choice(["pooh", "rabbit", "piglet", "Christopher"], 3), np.ndarray[Any, Any])
+assert_type(random_st.choice(["pooh", "rabbit", "piglet", "Christopher"], 3, p=[1 / 4] * 4), np.ndarray[Any, Any])
+assert_type(random_st.choice(["pooh", "rabbit", "piglet", "Christopher"], 3, replace=True), np.ndarray[Any, Any])
+assert_type(random_st.choice(["pooh", "rabbit", "piglet", "Christopher"], 3, replace=False, p=np.array([1 / 8, 1 / 8, 1 / 2, 1 / 4])), np.ndarray[Any, Any])
+
+assert_type(random_st.dirichlet([0.5, 0.5]), npt.NDArray[np.float64])
+assert_type(random_st.dirichlet(np.array([0.5, 0.5])), npt.NDArray[np.float64])
+assert_type(random_st.dirichlet(np.array([0.5, 0.5]), size=3), npt.NDArray[np.float64])
+
+assert_type(random_st.multinomial(20, [1 / 6.0] * 6), npt.NDArray[np.int_])
+assert_type(random_st.multinomial(20, np.array([0.5, 0.5])), npt.NDArray[np.int_])
+assert_type(random_st.multinomial(20, [1 / 6.0] * 6, size=2), npt.NDArray[np.int_])
+
+assert_type(random_st.multivariate_normal([0.0], [[1.0]]), npt.NDArray[np.float64])
+assert_type(random_st.multivariate_normal([0.0], np.array([[1.0]])), npt.NDArray[np.float64])
+assert_type(random_st.multivariate_normal(np.array([0.0]), [[1.0]]), npt.NDArray[np.float64])
+assert_type(random_st.multivariate_normal([0.0], np.array([[1.0]])), npt.NDArray[np.float64])
+
+assert_type(random_st.permutation(10), npt.NDArray[np.int_])
+assert_type(random_st.permutation([1, 2, 3, 4]), np.ndarray[Any, Any])
+assert_type(random_st.permutation(np.array([1, 2, 3, 4])), np.ndarray[Any, Any])
+assert_type(random_st.permutation(D_2D), np.ndarray[Any, Any])
+
+assert_type(random_st.shuffle(np.arange(10)), None)
+assert_type(random_st.shuffle([1, 2, 3, 4, 5]), None)
+assert_type(random_st.shuffle(D_2D), None)
+
+assert_type(np.random.RandomState(pcg64), np.random.RandomState)
+assert_type(np.random.RandomState(0), np.random.RandomState)
+assert_type(np.random.RandomState([0, 1, 2]), np.random.RandomState)
+assert_type(random_st.__str__(), str)
+assert_type(random_st.__repr__(), str)
+random_st_state = random_st.__getstate__()
+assert_type(random_st_state, dict[str, Any])
+assert_type(random_st.__setstate__(random_st_state), None)
+assert_type(random_st.seed(), None)
+assert_type(random_st.seed(1), None)
+assert_type(random_st.seed([0, 1]), None)
+random_st_get_state = random_st.get_state()
+assert_type(random_st_state, dict[str, Any])
+random_st_get_state_legacy = random_st.get_state(legacy=True)
+assert_type(random_st_get_state_legacy, dict[str, Any] | tuple[str, npt.NDArray[np.uint32], int, int, float])
+assert_type(random_st.set_state(random_st_get_state), None)
+
+assert_type(random_st.rand(), float)
+assert_type(random_st.rand(1), npt.NDArray[np.float64])
+assert_type(random_st.rand(1, 2), npt.NDArray[np.float64])
+assert_type(random_st.randn(), float)
+assert_type(random_st.randn(1), npt.NDArray[np.float64])
+assert_type(random_st.randn(1, 2), npt.NDArray[np.float64])
+assert_type(random_st.random_sample(), float)
+assert_type(random_st.random_sample(1), npt.NDArray[np.float64])
+assert_type(random_st.random_sample(size=(1, 2)), npt.NDArray[np.float64])
+
+assert_type(random_st.tomaxint(), int)
+assert_type(random_st.tomaxint(1), npt.NDArray[np.int_])
+assert_type(random_st.tomaxint((1,)), npt.NDArray[np.int_])
+
+assert_type(np.random.set_bit_generator(pcg64), None)
+assert_type(np.random.get_bit_generator(), np.random.BitGenerator)
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/rec.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/rec.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..37408d839f51780c1158c92625d3cb9bf099d5ff
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/rec.pyi
@@ -0,0 +1,167 @@
+import io
+import sys
+from typing import Any
+
+import numpy as np
+import numpy.typing as npt
+
+if sys.version_info >= (3, 11):
+    from typing import assert_type
+else:
+    from typing_extensions import assert_type
+
+AR_i8: npt.NDArray[np.int64]
+REC_AR_V: np.recarray[Any, np.dtype[np.record]]
+AR_LIST: list[npt.NDArray[np.int64]]
+
+format_parser: np.format_parser
+record: np.record
+file_obj: io.BufferedIOBase
+
+assert_type(np.format_parser(
+    formats=[np.float64, np.int64, np.bool_],
+    names=["f8", "i8", "?"],
+    titles=None,
+    aligned=True,
+), np.format_parser)
+assert_type(format_parser.dtype, np.dtype[np.void])
+
+assert_type(record.field_a, Any)
+assert_type(record.field_b, Any)
+assert_type(record["field_a"], Any)
+assert_type(record["field_b"], Any)
+assert_type(record.pprint(), str)
+record.field_c = 5
+
+assert_type(REC_AR_V.field(0), Any)
+assert_type(REC_AR_V.field("field_a"), Any)
+assert_type(REC_AR_V.field(0, AR_i8), None)
+assert_type(REC_AR_V.field("field_a", AR_i8), None)
+assert_type(REC_AR_V["field_a"], npt.NDArray[Any])
+assert_type(REC_AR_V.field_a, Any)
+assert_type(REC_AR_V.__array_finalize__(object()), None)
+
+assert_type(
+    np.recarray(
+        shape=(10, 5),
+        formats=[np.float64, np.int64, np.bool_],
+        order="K",
+        byteorder="|",
+    ),
+    np.recarray[Any, np.dtype[np.record]],
+)
+
+assert_type(
+    np.recarray(
+        shape=(10, 5),
+        dtype=[("f8", np.float64), ("i8", np.int64)],
+        strides=(5, 5),
+    ),
+    np.recarray[Any, np.dtype[Any]],
+)
+
+assert_type(np.rec.fromarrays(AR_LIST), np.recarray[Any, np.dtype[Any]])
+assert_type(
+    np.rec.fromarrays(AR_LIST, dtype=np.int64),
+    np.recarray[Any, np.dtype[Any]],
+)
+assert_type(
+    np.rec.fromarrays(
+        AR_LIST,
+        formats=[np.int64, np.float64],
+        names=["i8", "f8"]
+    ),
+    np.recarray[Any, np.dtype[np.record]],
+)
+
+assert_type(np.rec.fromrecords((1, 1.5)), np.recarray[Any, np.dtype[np.record]])
+assert_type(
+    np.rec.fromrecords(
+        [(1, 1.5)],
+        dtype=[("i8", np.int64), ("f8", np.float64)],
+    ),
+    np.recarray[Any, np.dtype[np.record]],
+)
+assert_type(
+    np.rec.fromrecords(
+        REC_AR_V,
+        formats=[np.int64, np.float64],
+        names=["i8", "f8"]
+    ),
+    np.recarray[Any, np.dtype[np.record]],
+)
+
+assert_type(
+    np.rec.fromstring(
+        b"(1, 1.5)",
+        dtype=[("i8", np.int64), ("f8", np.float64)],
+    ),
+    np.recarray[Any, np.dtype[np.record]],
+)
+assert_type(
+    np.rec.fromstring(
+        REC_AR_V,
+        formats=[np.int64, np.float64],
+        names=["i8", "f8"]
+    ),
+    np.recarray[Any, np.dtype[np.record]],
+)
+
+assert_type(np.rec.fromfile(
+    "test_file.txt",
+    dtype=[("i8", np.int64), ("f8", np.float64)],
+), np.recarray[Any, np.dtype[Any]])
+
+assert_type(
+    np.rec.fromfile(
+        file_obj,
+        formats=[np.int64, np.float64],
+        names=["i8", "f8"]
+    ),
+    np.recarray[Any, np.dtype[np.record]],
+)
+
+assert_type(np.rec.array(AR_i8), np.recarray[Any, np.dtype[np.int64]])
+
+assert_type(
+    np.rec.array([(1, 1.5)], dtype=[("i8", np.int64), ("f8", np.float64)]),
+    np.recarray[Any, np.dtype[Any]],
+)
+
+assert_type(
+    np.rec.array(
+        [(1, 1.5)],
+        formats=[np.int64, np.float64],
+        names=["i8", "f8"]
+    ),
+    np.recarray[Any, np.dtype[np.record]],
+)
+
+assert_type(
+    np.rec.array(
+        None,
+        dtype=np.float64,
+        shape=(10, 3),
+    ),
+    np.recarray[Any, np.dtype[Any]],
+)
+
+assert_type(
+    np.rec.array(
+        None,
+        formats=[np.int64, np.float64],
+        names=["i8", "f8"],
+        shape=(10, 3),
+    ),
+    np.recarray[Any, np.dtype[np.record]],
+)
+
+assert_type(
+    np.rec.array(file_obj, dtype=np.float64),
+    np.recarray[Any, np.dtype[Any]],
+)
+
+assert_type(
+    np.rec.array(file_obj, formats=[np.int64, np.float64], names=["i8", "f8"]),
+    np.recarray[Any, np.dtype[np.record]],
+)
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/scalars.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/scalars.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..6b134f7432f43323df28fc9d960d7ec133bfe9f1
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/scalars.pyi
@@ -0,0 +1,162 @@
+import sys
+from typing import Any, Literal
+
+import numpy as np
+import numpy.typing as npt
+
+if sys.version_info >= (3, 11):
+    from typing import assert_type
+else:
+    from typing_extensions import assert_type
+
+b: np.bool_
+u8: np.uint64
+i8: np.int64
+f8: np.float64
+c8: np.complex64
+c16: np.complex128
+m: np.timedelta64
+U: np.str_
+S: np.bytes_
+V: np.void
+
+assert_type(c8.real, np.float32)
+assert_type(c8.imag, np.float32)
+
+assert_type(c8.real.real, np.float32)
+assert_type(c8.real.imag, np.float32)
+
+assert_type(c8.itemsize, int)
+assert_type(c8.shape, tuple[()])
+assert_type(c8.strides, tuple[()])
+
+assert_type(c8.ndim, Literal[0])
+assert_type(c8.size, Literal[1])
+
+assert_type(c8.squeeze(), np.complex64)
+assert_type(c8.byteswap(), np.complex64)
+assert_type(c8.transpose(), np.complex64)
+
+assert_type(c8.dtype, np.dtype[np.complex64])
+
+assert_type(c8.real, np.float32)
+assert_type(c16.imag, np.float64)
+
+assert_type(np.str_('foo'), np.str_)
+
+assert_type(V[0], Any)
+assert_type(V["field1"], Any)
+assert_type(V[["field1", "field2"]], np.void)
+V[0] = 5
+
+# Aliases
+assert_type(np.byte(), np.byte)
+assert_type(np.short(), np.short)
+assert_type(np.intc(), np.intc)
+assert_type(np.intp(), np.intp)
+assert_type(np.int_(), np.int_)
+assert_type(np.longlong(), np.longlong)
+
+assert_type(np.ubyte(), np.ubyte)
+assert_type(np.ushort(), np.ushort)
+assert_type(np.uintc(), np.uintc)
+assert_type(np.uintp(), np.uintp)
+assert_type(np.uint(), np.uint)
+assert_type(np.ulonglong(), np.ulonglong)
+
+assert_type(np.half(), np.half)
+assert_type(np.single(), np.single)
+assert_type(np.double(), np.double)
+assert_type(np.longdouble(), np.longdouble)
+assert_type(np.float_(), np.float_)
+assert_type(np.longfloat(), np.longfloat)
+
+assert_type(np.csingle(), np.csingle)
+assert_type(np.cdouble(), np.cdouble)
+assert_type(np.clongdouble(), np.clongdouble)
+assert_type(np.singlecomplex(), np.singlecomplex)
+assert_type(np.complex_(), np.complex_)
+assert_type(np.cfloat(), np.cfloat)
+assert_type(np.clongfloat(), np.clongfloat)
+assert_type(np.longcomplex(), np.longcomplex)
+
+assert_type(b.item(), bool)
+assert_type(i8.item(), int)
+assert_type(u8.item(), int)
+assert_type(f8.item(), float)
+assert_type(c16.item(), complex)
+assert_type(U.item(), str)
+assert_type(S.item(), bytes)
+
+assert_type(b.tolist(), bool)
+assert_type(i8.tolist(), int)
+assert_type(u8.tolist(), int)
+assert_type(f8.tolist(), float)
+assert_type(c16.tolist(), complex)
+assert_type(U.tolist(), str)
+assert_type(S.tolist(), bytes)
+
+assert_type(b.ravel(), npt.NDArray[np.bool_])
+assert_type(i8.ravel(), npt.NDArray[np.int64])
+assert_type(u8.ravel(), npt.NDArray[np.uint64])
+assert_type(f8.ravel(), npt.NDArray[np.float64])
+assert_type(c16.ravel(), npt.NDArray[np.complex128])
+assert_type(U.ravel(), npt.NDArray[np.str_])
+assert_type(S.ravel(), npt.NDArray[np.bytes_])
+
+assert_type(b.flatten(), npt.NDArray[np.bool_])
+assert_type(i8.flatten(), npt.NDArray[np.int64])
+assert_type(u8.flatten(), npt.NDArray[np.uint64])
+assert_type(f8.flatten(), npt.NDArray[np.float64])
+assert_type(c16.flatten(), npt.NDArray[np.complex128])
+assert_type(U.flatten(), npt.NDArray[np.str_])
+assert_type(S.flatten(), npt.NDArray[np.bytes_])
+
+assert_type(b.reshape(1), npt.NDArray[np.bool_])
+assert_type(i8.reshape(1), npt.NDArray[np.int64])
+assert_type(u8.reshape(1), npt.NDArray[np.uint64])
+assert_type(f8.reshape(1), npt.NDArray[np.float64])
+assert_type(c16.reshape(1), npt.NDArray[np.complex128])
+assert_type(U.reshape(1), npt.NDArray[np.str_])
+assert_type(S.reshape(1), npt.NDArray[np.bytes_])
+
+assert_type(i8.astype(float), Any)
+assert_type(i8.astype(np.float64), np.float64)
+
+assert_type(i8.view(), np.int64)
+assert_type(i8.view(np.float64), np.float64)
+assert_type(i8.view(float), Any)
+assert_type(i8.view(np.float64, np.ndarray), np.float64)
+
+assert_type(i8.getfield(float), Any)
+assert_type(i8.getfield(np.float64), np.float64)
+assert_type(i8.getfield(np.float64, 8), np.float64)
+
+assert_type(f8.as_integer_ratio(), tuple[int, int])
+assert_type(f8.is_integer(), bool)
+assert_type(f8.__trunc__(), int)
+assert_type(f8.__getformat__("float"), str)
+assert_type(f8.hex(), str)
+assert_type(np.float64.fromhex("0x0.0p+0"), np.float64)
+
+assert_type(f8.__getnewargs__(), tuple[float])
+assert_type(c16.__getnewargs__(), tuple[float, float])
+
+assert_type(i8.numerator, np.int64)
+assert_type(i8.denominator, Literal[1])
+assert_type(u8.numerator, np.uint64)
+assert_type(u8.denominator, Literal[1])
+assert_type(m.numerator, np.timedelta64)
+assert_type(m.denominator, Literal[1])
+
+assert_type(round(i8), int)
+assert_type(round(i8, 3), np.int64)
+assert_type(round(u8), int)
+assert_type(round(u8, 3), np.uint64)
+assert_type(round(f8), int)
+assert_type(round(f8, 3), np.float64)
+
+assert_type(f8.__ceil__(), int)
+assert_type(f8.__floor__(), int)
+
+assert_type(i8.is_integer(), Literal[True])
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/shape_base.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/shape_base.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..db75d1b015ac70912c3cb5d4b994cc8618246aa6
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/shape_base.pyi
@@ -0,0 +1,65 @@
+import sys
+from typing import Any
+
+import numpy as np
+import numpy.typing as npt
+from numpy.lib.shape_base import _ArrayPrepare, _ArrayWrap
+
+if sys.version_info >= (3, 11):
+    from typing import assert_type
+else:
+    from typing_extensions import assert_type
+
+i8: np.int64
+f8: np.float64
+
+AR_b: npt.NDArray[np.bool_]
+AR_i8: npt.NDArray[np.int64]
+AR_f8: npt.NDArray[np.float64]
+
+AR_LIKE_f8: list[float]
+
+assert_type(np.take_along_axis(AR_f8, AR_i8, axis=1), npt.NDArray[np.float64])
+assert_type(np.take_along_axis(f8, AR_i8, axis=None), npt.NDArray[np.float64])
+
+assert_type(np.put_along_axis(AR_f8, AR_i8, "1.0", axis=1), None)
+
+assert_type(np.expand_dims(AR_i8, 2), npt.NDArray[np.int64])
+assert_type(np.expand_dims(AR_LIKE_f8, 2), npt.NDArray[Any])
+
+assert_type(np.column_stack([AR_i8]), npt.NDArray[np.int64])
+assert_type(np.column_stack([AR_LIKE_f8]), npt.NDArray[Any])
+
+assert_type(np.dstack([AR_i8]), npt.NDArray[np.int64])
+assert_type(np.dstack([AR_LIKE_f8]), npt.NDArray[Any])
+
+assert_type(np.row_stack([AR_i8]), npt.NDArray[np.int64])
+assert_type(np.row_stack([AR_LIKE_f8]), npt.NDArray[Any])
+
+assert_type(np.array_split(AR_i8, [3, 5, 6, 10]), list[npt.NDArray[np.int64]])
+assert_type(np.array_split(AR_LIKE_f8, [3, 5, 6, 10]), list[npt.NDArray[Any]])
+
+assert_type(np.split(AR_i8, [3, 5, 6, 10]), list[npt.NDArray[np.int64]])
+assert_type(np.split(AR_LIKE_f8, [3, 5, 6, 10]), list[npt.NDArray[Any]])
+
+assert_type(np.hsplit(AR_i8, [3, 5, 6, 10]), list[npt.NDArray[np.int64]])
+assert_type(np.hsplit(AR_LIKE_f8, [3, 5, 6, 10]), list[npt.NDArray[Any]])
+
+assert_type(np.vsplit(AR_i8, [3, 5, 6, 10]), list[npt.NDArray[np.int64]])
+assert_type(np.vsplit(AR_LIKE_f8, [3, 5, 6, 10]), list[npt.NDArray[Any]])
+
+assert_type(np.dsplit(AR_i8, [3, 5, 6, 10]), list[npt.NDArray[np.int64]])
+assert_type(np.dsplit(AR_LIKE_f8, [3, 5, 6, 10]), list[npt.NDArray[Any]])
+
+assert_type(np.lib.shape_base.get_array_prepare(AR_i8), _ArrayPrepare)
+assert_type(np.lib.shape_base.get_array_prepare(AR_i8, 1), None | _ArrayPrepare)
+
+assert_type(np.get_array_wrap(AR_i8), _ArrayWrap)
+assert_type(np.get_array_wrap(AR_i8, 1), None | _ArrayWrap)
+
+assert_type(np.kron(AR_b, AR_b), npt.NDArray[np.bool_])
+assert_type(np.kron(AR_b, AR_i8), npt.NDArray[np.signedinteger[Any]])
+assert_type(np.kron(AR_f8, AR_f8), npt.NDArray[np.floating[Any]])
+
+assert_type(np.tile(AR_i8, 5), npt.NDArray[np.int64])
+assert_type(np.tile(AR_LIKE_f8, [2, 2]), npt.NDArray[Any])
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/stride_tricks.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/stride_tricks.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..68e1eeac98fbb1badc6fc02f7cf9b6a6ee558389
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/stride_tricks.pyi
@@ -0,0 +1,36 @@
+import sys
+from typing import Any
+
+import numpy as np
+import numpy.typing as npt
+from numpy.lib.stride_tricks import DummyArray
+
+if sys.version_info >= (3, 11):
+    from typing import assert_type
+else:
+    from typing_extensions import assert_type
+
+AR_f8: npt.NDArray[np.float64]
+AR_LIKE_f: list[float]
+interface_dict: dict[str, Any]
+
+assert_type(np.lib.stride_tricks.DummyArray(interface_dict), DummyArray)
+
+assert_type(np.lib.stride_tricks.as_strided(AR_f8), npt.NDArray[np.float64])
+assert_type(np.lib.stride_tricks.as_strided(AR_LIKE_f), npt.NDArray[Any])
+assert_type(np.lib.stride_tricks.as_strided(AR_f8, strides=(1, 5)), npt.NDArray[np.float64])
+assert_type(np.lib.stride_tricks.as_strided(AR_f8, shape=[9, 20]), npt.NDArray[np.float64])
+
+assert_type(np.lib.stride_tricks.sliding_window_view(AR_f8, 5), npt.NDArray[np.float64])
+assert_type(np.lib.stride_tricks.sliding_window_view(AR_LIKE_f, (1, 5)), npt.NDArray[Any])
+assert_type(np.lib.stride_tricks.sliding_window_view(AR_f8, [9], axis=1), npt.NDArray[np.float64])
+
+assert_type(np.broadcast_to(AR_f8, 5), npt.NDArray[np.float64])
+assert_type(np.broadcast_to(AR_LIKE_f, (1, 5)), npt.NDArray[Any])
+assert_type(np.broadcast_to(AR_f8, [4, 6], subok=True), npt.NDArray[np.float64])
+
+assert_type(np.broadcast_shapes((1, 2), [3, 1], (3, 2)), tuple[int, ...])
+assert_type(np.broadcast_shapes((6, 7), (5, 6, 1), 7, (5, 1, 7)), tuple[int, ...])
+
+assert_type(np.broadcast_arrays(AR_f8, AR_f8), list[npt.NDArray[Any]])
+assert_type(np.broadcast_arrays(AR_f8, AR_LIKE_f), list[npt.NDArray[Any]])
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/testing.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/testing.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..ecd74e9aa3d3aafca0e91d9803a6add4de5f4cdf
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/testing.pyi
@@ -0,0 +1,203 @@
+import re
+import sys
+import warnings
+import types
+import unittest
+import contextlib
+from collections.abc import Callable
+from typing import Any, TypeVar
+from pathlib import Path
+
+import numpy as np
+import numpy.typing as npt
+
+if sys.version_info >= (3, 11):
+    from typing import assert_type
+else:
+    from typing_extensions import assert_type
+
+AR_f8: npt.NDArray[np.float64]
+AR_i8: npt.NDArray[np.int64]
+
+bool_obj: bool
+suppress_obj: np.testing.suppress_warnings
+FT = TypeVar("FT", bound=Callable[..., Any])
+
+def func() -> int: ...
+
+def func2(
+    x: npt.NDArray[np.number[Any]],
+    y: npt.NDArray[np.number[Any]],
+) -> npt.NDArray[np.bool_]: ...
+
+assert_type(np.testing.KnownFailureException(), np.testing.KnownFailureException)
+assert_type(np.testing.IgnoreException(), np.testing.IgnoreException)
+
+assert_type(
+    np.testing.clear_and_catch_warnings(modules=[np.testing]),
+    np.testing._private.utils._clear_and_catch_warnings_without_records,
+)
+assert_type(
+    np.testing.clear_and_catch_warnings(True),
+    np.testing._private.utils._clear_and_catch_warnings_with_records,
+)
+assert_type(
+    np.testing.clear_and_catch_warnings(False),
+    np.testing._private.utils._clear_and_catch_warnings_without_records,
+)
+assert_type(
+    np.testing.clear_and_catch_warnings(bool_obj),
+    np.testing.clear_and_catch_warnings,
+)
+assert_type(
+    np.testing.clear_and_catch_warnings.class_modules,
+    tuple[types.ModuleType, ...],
+)
+assert_type(
+    np.testing.clear_and_catch_warnings.modules,
+    set[types.ModuleType],
+)
+
+with np.testing.clear_and_catch_warnings(True) as c1:
+    assert_type(c1, list[warnings.WarningMessage])
+with np.testing.clear_and_catch_warnings() as c2:
+    assert_type(c2, None)
+
+assert_type(np.testing.suppress_warnings("once"), np.testing.suppress_warnings)
+assert_type(np.testing.suppress_warnings()(func), Callable[[], int])
+assert_type(suppress_obj.filter(RuntimeWarning), None)
+assert_type(suppress_obj.record(RuntimeWarning), list[warnings.WarningMessage])
+with suppress_obj as c3:
+    assert_type(c3, np.testing.suppress_warnings)
+
+assert_type(np.testing.verbose, int)
+assert_type(np.testing.IS_PYPY, bool)
+assert_type(np.testing.HAS_REFCOUNT, bool)
+assert_type(np.testing.HAS_LAPACK64, bool)
+
+assert_type(np.testing.assert_(1, msg="test"), None)
+assert_type(np.testing.assert_(2, msg=lambda: "test"), None)
+
+if sys.platform == "win32" or sys.platform == "cygwin":
+    assert_type(np.testing.memusage(), int)
+elif sys.platform == "linux":
+    assert_type(np.testing.memusage(), None | int)
+
+assert_type(np.testing.jiffies(), int)
+
+assert_type(np.testing.build_err_msg([0, 1, 2], "test"), str)
+assert_type(np.testing.build_err_msg(range(2), "test", header="header"), str)
+assert_type(np.testing.build_err_msg(np.arange(9).reshape(3, 3), "test", verbose=False), str)
+assert_type(np.testing.build_err_msg("abc", "test", names=["x", "y"]), str)
+assert_type(np.testing.build_err_msg([1.0, 2.0], "test", precision=5), str)
+
+assert_type(np.testing.assert_equal({1}, {1}), None)
+assert_type(np.testing.assert_equal([1, 2, 3], [1, 2, 3], err_msg="fail"), None)
+assert_type(np.testing.assert_equal(1, 1.0, verbose=True), None)
+
+assert_type(np.testing.print_assert_equal('Test XYZ of func xyz', [0, 1], [0, 1]), None)
+
+assert_type(np.testing.assert_almost_equal(1.0, 1.1), None)
+assert_type(np.testing.assert_almost_equal([1, 2, 3], [1, 2, 3], err_msg="fail"), None)
+assert_type(np.testing.assert_almost_equal(1, 1.0, verbose=True), None)
+assert_type(np.testing.assert_almost_equal(1, 1.0001, decimal=2), None)
+
+assert_type(np.testing.assert_approx_equal(1.0, 1.1), None)
+assert_type(np.testing.assert_approx_equal("1", "2", err_msg="fail"), None)
+assert_type(np.testing.assert_approx_equal(1, 1.0, verbose=True), None)
+assert_type(np.testing.assert_approx_equal(1, 1.0001, significant=2), None)
+
+assert_type(np.testing.assert_array_compare(func2, AR_i8, AR_f8, err_msg="test"), None)
+assert_type(np.testing.assert_array_compare(func2, AR_i8, AR_f8, verbose=True), None)
+assert_type(np.testing.assert_array_compare(func2, AR_i8, AR_f8, header="header"), None)
+assert_type(np.testing.assert_array_compare(func2, AR_i8, AR_f8, precision=np.int64()), None)
+assert_type(np.testing.assert_array_compare(func2, AR_i8, AR_f8, equal_nan=False), None)
+assert_type(np.testing.assert_array_compare(func2, AR_i8, AR_f8, equal_inf=True), None)
+
+assert_type(np.testing.assert_array_equal(AR_i8, AR_f8), None)
+assert_type(np.testing.assert_array_equal(AR_i8, AR_f8, err_msg="test"), None)
+assert_type(np.testing.assert_array_equal(AR_i8, AR_f8, verbose=True), None)
+
+assert_type(np.testing.assert_array_almost_equal(AR_i8, AR_f8), None)
+assert_type(np.testing.assert_array_almost_equal(AR_i8, AR_f8, err_msg="test"), None)
+assert_type(np.testing.assert_array_almost_equal(AR_i8, AR_f8, verbose=True), None)
+assert_type(np.testing.assert_array_almost_equal(AR_i8, AR_f8, decimal=1), None)
+
+assert_type(np.testing.assert_array_less(AR_i8, AR_f8), None)
+assert_type(np.testing.assert_array_less(AR_i8, AR_f8, err_msg="test"), None)
+assert_type(np.testing.assert_array_less(AR_i8, AR_f8, verbose=True), None)
+
+assert_type(np.testing.runstring("1 + 1", {}), Any)
+assert_type(np.testing.runstring("int64() + 1", {"int64": np.int64}), Any)
+
+assert_type(np.testing.assert_string_equal("1", "1"), None)
+
+assert_type(np.testing.rundocs(), None)
+assert_type(np.testing.rundocs("test.py"), None)
+assert_type(np.testing.rundocs(Path("test.py"), raise_on_error=True), None)
+
+def func3(a: int) -> bool: ...
+
+assert_type(
+    np.testing.assert_raises(RuntimeWarning),
+    unittest.case._AssertRaisesContext[RuntimeWarning],
+)
+assert_type(np.testing.assert_raises(RuntimeWarning, func3, 5), None)
+
+assert_type(
+    np.testing.assert_raises_regex(RuntimeWarning, r"test"),
+    unittest.case._AssertRaisesContext[RuntimeWarning],
+)
+assert_type(np.testing.assert_raises_regex(RuntimeWarning, b"test", func3, 5), None)
+assert_type(np.testing.assert_raises_regex(RuntimeWarning, re.compile(b"test"), func3, 5), None)
+
+class Test: ...
+
+def decorate(a: FT) -> FT:
+    return a
+
+assert_type(np.testing.decorate_methods(Test, decorate), None)
+assert_type(np.testing.decorate_methods(Test, decorate, None), None)
+assert_type(np.testing.decorate_methods(Test, decorate, "test"), None)
+assert_type(np.testing.decorate_methods(Test, decorate, b"test"), None)
+assert_type(np.testing.decorate_methods(Test, decorate, re.compile("test")), None)
+
+assert_type(np.testing.measure("for i in range(1000): np.sqrt(i**2)"), float)
+assert_type(np.testing.measure(b"for i in range(1000): np.sqrt(i**2)", times=5), float)
+
+assert_type(np.testing.assert_allclose(AR_i8, AR_f8), None)
+assert_type(np.testing.assert_allclose(AR_i8, AR_f8, rtol=0.005), None)
+assert_type(np.testing.assert_allclose(AR_i8, AR_f8, atol=1), None)
+assert_type(np.testing.assert_allclose(AR_i8, AR_f8, equal_nan=True), None)
+assert_type(np.testing.assert_allclose(AR_i8, AR_f8, err_msg="err"), None)
+assert_type(np.testing.assert_allclose(AR_i8, AR_f8, verbose=False), None)
+
+assert_type(np.testing.assert_array_almost_equal_nulp(AR_i8, AR_f8, nulp=2), None)
+
+assert_type(np.testing.assert_array_max_ulp(AR_i8, AR_f8, maxulp=2), npt.NDArray[Any])
+assert_type(np.testing.assert_array_max_ulp(AR_i8, AR_f8, dtype=np.float32), npt.NDArray[Any])
+
+assert_type(np.testing.assert_warns(RuntimeWarning), contextlib._GeneratorContextManager[None])
+assert_type(np.testing.assert_warns(RuntimeWarning, func3, 5), bool)
+
+def func4(a: int, b: str) -> bool: ...
+
+assert_type(np.testing.assert_no_warnings(), contextlib._GeneratorContextManager[None])
+assert_type(np.testing.assert_no_warnings(func3, 5), bool)
+assert_type(np.testing.assert_no_warnings(func4, a=1, b="test"), bool)
+assert_type(np.testing.assert_no_warnings(func4, 1, "test"), bool)
+
+assert_type(np.testing.tempdir("test_dir"), contextlib._GeneratorContextManager[str])
+assert_type(np.testing.tempdir(prefix=b"test"), contextlib._GeneratorContextManager[bytes])
+assert_type(np.testing.tempdir("test_dir", dir=Path("here")), contextlib._GeneratorContextManager[str])
+
+assert_type(np.testing.temppath("test_dir", text=True), contextlib._GeneratorContextManager[str])
+assert_type(np.testing.temppath(prefix=b"test"), contextlib._GeneratorContextManager[bytes])
+assert_type(np.testing.temppath("test_dir", dir=Path("here")), contextlib._GeneratorContextManager[str])
+
+assert_type(np.testing.assert_no_gc_cycles(), contextlib._GeneratorContextManager[None])
+assert_type(np.testing.assert_no_gc_cycles(func3, 5), None)
+
+assert_type(np.testing.break_cycles(), None)
+
+assert_type(np.testing.TestCase(), unittest.case.TestCase)
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/twodim_base.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/twodim_base.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..506786c78743db225e764af1ac35b415fb981674
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/twodim_base.pyi
@@ -0,0 +1,99 @@
+import sys
+from typing import Any, TypeVar
+
+import numpy as np
+import numpy.typing as npt
+
+if sys.version_info >= (3, 11):
+    from typing import assert_type
+else:
+    from typing_extensions import assert_type
+
+_SCT = TypeVar("_SCT", bound=np.generic)
+
+
+def func1(ar: npt.NDArray[_SCT], a: int) -> npt.NDArray[_SCT]:
+    pass
+
+
+def func2(ar: npt.NDArray[np.number[Any]], a: str) -> npt.NDArray[np.float64]:
+    pass
+
+
+AR_b: npt.NDArray[np.bool_]
+AR_u: npt.NDArray[np.uint64]
+AR_i: npt.NDArray[np.int64]
+AR_f: npt.NDArray[np.float64]
+AR_c: npt.NDArray[np.complex128]
+AR_O: npt.NDArray[np.object_]
+
+AR_LIKE_b: list[bool]
+
+assert_type(np.fliplr(AR_b), npt.NDArray[np.bool_])
+assert_type(np.fliplr(AR_LIKE_b), npt.NDArray[Any])
+
+assert_type(np.flipud(AR_b), npt.NDArray[np.bool_])
+assert_type(np.flipud(AR_LIKE_b), npt.NDArray[Any])
+
+assert_type(np.eye(10), npt.NDArray[np.float64])
+assert_type(np.eye(10, M=20, dtype=np.int64), npt.NDArray[np.int64])
+assert_type(np.eye(10, k=2, dtype=int), npt.NDArray[Any])
+
+assert_type(np.diag(AR_b), npt.NDArray[np.bool_])
+assert_type(np.diag(AR_LIKE_b, k=0), npt.NDArray[Any])
+
+assert_type(np.diagflat(AR_b), npt.NDArray[np.bool_])
+assert_type(np.diagflat(AR_LIKE_b, k=0), npt.NDArray[Any])
+
+assert_type(np.tri(10), npt.NDArray[np.float64])
+assert_type(np.tri(10, M=20, dtype=np.int64), npt.NDArray[np.int64])
+assert_type(np.tri(10, k=2, dtype=int), npt.NDArray[Any])
+
+assert_type(np.tril(AR_b), npt.NDArray[np.bool_])
+assert_type(np.tril(AR_LIKE_b, k=0), npt.NDArray[Any])
+
+assert_type(np.triu(AR_b), npt.NDArray[np.bool_])
+assert_type(np.triu(AR_LIKE_b, k=0), npt.NDArray[Any])
+
+assert_type(np.vander(AR_b), npt.NDArray[np.signedinteger[Any]])
+assert_type(np.vander(AR_u), npt.NDArray[np.signedinteger[Any]])
+assert_type(np.vander(AR_i, N=2), npt.NDArray[np.signedinteger[Any]])
+assert_type(np.vander(AR_f, increasing=True), npt.NDArray[np.floating[Any]])
+assert_type(np.vander(AR_c), npt.NDArray[np.complexfloating[Any, Any]])
+assert_type(np.vander(AR_O), npt.NDArray[np.object_])
+
+assert_type(
+    np.histogram2d(AR_i, AR_b),
+    tuple[
+        npt.NDArray[np.float64],
+        npt.NDArray[np.floating[Any]],
+        npt.NDArray[np.floating[Any]],
+    ],
+)
+assert_type(
+    np.histogram2d(AR_f, AR_f),
+    tuple[
+        npt.NDArray[np.float64],
+        npt.NDArray[np.floating[Any]],
+        npt.NDArray[np.floating[Any]],
+    ],
+)
+assert_type(
+    np.histogram2d(AR_f, AR_c, weights=AR_LIKE_b),
+    tuple[
+        npt.NDArray[np.float64],
+        npt.NDArray[np.complexfloating[Any, Any]],
+        npt.NDArray[np.complexfloating[Any, Any]],
+    ],
+)
+
+assert_type(np.mask_indices(10, func1), tuple[npt.NDArray[np.intp], npt.NDArray[np.intp]])
+assert_type(np.mask_indices(8, func2, "0"), tuple[npt.NDArray[np.intp], npt.NDArray[np.intp]])
+
+assert_type(np.tril_indices(10), tuple[npt.NDArray[np.int_], npt.NDArray[np.int_]])
+
+assert_type(np.tril_indices_from(AR_b), tuple[npt.NDArray[np.int_], npt.NDArray[np.int_]])
+
+assert_type(np.triu_indices(10), tuple[npt.NDArray[np.int_], npt.NDArray[np.int_]])
+
+assert_type(np.triu_indices_from(AR_b), tuple[npt.NDArray[np.int_], npt.NDArray[np.int_]])
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/type_check.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/type_check.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..12af9a66d9dd9eab04ede2baf9e8471044cfbe74
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/type_check.pyi
@@ -0,0 +1,87 @@
+import sys
+from typing import Any, Literal
+
+import numpy as np
+import numpy.typing as npt
+from numpy._typing import _16Bit, _32Bit, _64Bit, _128Bit
+
+if sys.version_info >= (3, 11):
+    from typing import assert_type
+else:
+    from typing_extensions import assert_type
+
+f8: np.float64
+f: float
+
+# NOTE: Avoid importing the platform specific `np.float128` type
+AR_i8: npt.NDArray[np.int64]
+AR_i4: npt.NDArray[np.int32]
+AR_f2: npt.NDArray[np.float16]
+AR_f8: npt.NDArray[np.float64]
+AR_f16: npt.NDArray[np.floating[_128Bit]]
+AR_c8: npt.NDArray[np.complex64]
+AR_c16: npt.NDArray[np.complex128]
+
+AR_LIKE_f: list[float]
+
+class RealObj:
+    real: slice
+
+class ImagObj:
+    imag: slice
+
+assert_type(np.mintypecode(["f8"], typeset="qfQF"), str)
+
+assert_type(np.asfarray(AR_f8), npt.NDArray[np.float64])
+assert_type(np.asfarray(AR_LIKE_f), npt.NDArray[np.float64])
+assert_type(np.asfarray(AR_f8, dtype="c16"), npt.NDArray[np.complexfloating[Any, Any]])
+assert_type(np.asfarray(AR_f8, dtype="i8"), npt.NDArray[np.floating[Any]])
+
+assert_type(np.real(RealObj()), slice)
+assert_type(np.real(AR_f8), npt.NDArray[np.float64])
+assert_type(np.real(AR_c16), npt.NDArray[np.float64])
+assert_type(np.real(AR_LIKE_f), npt.NDArray[Any])
+
+assert_type(np.imag(ImagObj()), slice)
+assert_type(np.imag(AR_f8), npt.NDArray[np.float64])
+assert_type(np.imag(AR_c16), npt.NDArray[np.float64])
+assert_type(np.imag(AR_LIKE_f), npt.NDArray[Any])
+
+assert_type(np.iscomplex(f8), np.bool_)
+assert_type(np.iscomplex(AR_f8), npt.NDArray[np.bool_])
+assert_type(np.iscomplex(AR_LIKE_f), npt.NDArray[np.bool_])
+
+assert_type(np.isreal(f8), np.bool_)
+assert_type(np.isreal(AR_f8), npt.NDArray[np.bool_])
+assert_type(np.isreal(AR_LIKE_f), npt.NDArray[np.bool_])
+
+assert_type(np.iscomplexobj(f8), bool)
+assert_type(np.isrealobj(f8), bool)
+
+assert_type(np.nan_to_num(f8), np.float64)
+assert_type(np.nan_to_num(f, copy=True), Any)
+assert_type(np.nan_to_num(AR_f8, nan=1.5), npt.NDArray[np.float64])
+assert_type(np.nan_to_num(AR_LIKE_f, posinf=9999), npt.NDArray[Any])
+
+assert_type(np.real_if_close(AR_f8), npt.NDArray[np.float64])
+assert_type(np.real_if_close(AR_c16), npt.NDArray[np.float64] | npt.NDArray[np.complex128])
+assert_type(np.real_if_close(AR_c8), npt.NDArray[np.float32] | npt.NDArray[np.complex64])
+assert_type(np.real_if_close(AR_LIKE_f), npt.NDArray[Any])
+
+assert_type(np.typename("h"), Literal["short"])
+assert_type(np.typename("B"), Literal["unsigned char"])
+assert_type(np.typename("V"), Literal["void"])
+assert_type(np.typename("S1"), Literal["character"])
+
+assert_type(np.common_type(AR_i4), type[np.float64])
+assert_type(np.common_type(AR_f2), type[np.float16])
+assert_type(np.common_type(AR_f2, AR_i4), type[np.floating[_16Bit | _64Bit]])
+assert_type(np.common_type(AR_f16, AR_i4), type[np.floating[_64Bit | _128Bit]])
+assert_type(
+    np.common_type(AR_c8, AR_f2),
+    type[np.complexfloating[_16Bit | _32Bit, _16Bit | _32Bit]],
+)
+assert_type(
+    np.common_type(AR_f2, AR_c8, AR_i4),
+    type[np.complexfloating[_16Bit | _32Bit | _64Bit, _16Bit | _32Bit | _64Bit]],
+)
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/ufunc_config.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/ufunc_config.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..38474f1e73fbf4ac0371b6c72243a3f94d8145e0
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/ufunc_config.pyi
@@ -0,0 +1,41 @@
+"""Typing tests for `core._ufunc_config`."""
+
+import sys
+from typing import Any, Protocol
+from collections.abc import Callable
+
+import numpy as np
+from numpy.core._ufunc_config import _ErrDict
+
+if sys.version_info >= (3, 11):
+    from typing import assert_type
+else:
+    from typing_extensions import assert_type
+
+def func(a: str, b: int) -> None: ...
+
+class FuncProtocol(Protocol):
+    def __call__(self, a: str, b: int) -> None: ...
+
+class Write:
+    def write(self, value: str) -> None: ...
+
+class SupportsWrite(Protocol):
+    def write(self, s: str, /) -> object: ...
+
+assert_type(np.seterr(all=None), _ErrDict)
+assert_type(np.seterr(divide="ignore"), _ErrDict)
+assert_type(np.seterr(over="warn"), _ErrDict)
+assert_type(np.seterr(under="call"), _ErrDict)
+assert_type(np.seterr(invalid="raise"), _ErrDict)
+assert_type(np.geterr(), _ErrDict)
+
+assert_type(np.setbufsize(4096), int)
+assert_type(np.getbufsize(), int)
+
+assert_type(np.seterrcall(func), Callable[[str, int], Any] | None | SupportsWrite)
+assert_type(np.seterrcall(Write()), Callable[[str, int], Any] | None | SupportsWrite)
+assert_type(np.geterrcall(), Callable[[str, int], Any] | None | SupportsWrite)
+
+assert_type(np.errstate(call=func, all="call"), np.errstate[FuncProtocol])
+assert_type(np.errstate(call=Write(), divide="log", over="log"), np.errstate[Write])
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/ufunclike.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/ufunclike.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..5f7a03eb6225ba970b7f2b1e221858df1afa4f68
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/ufunclike.pyi
@@ -0,0 +1,37 @@
+import sys
+from typing import Any
+
+import numpy as np
+import numpy.typing as npt
+
+if sys.version_info >= (3, 11):
+    from typing import assert_type
+else:
+    from typing_extensions import assert_type
+
+AR_LIKE_b: list[bool]
+AR_LIKE_u: list[np.uint32]
+AR_LIKE_i: list[int]
+AR_LIKE_f: list[float]
+AR_LIKE_O: list[np.object_]
+
+AR_U: npt.NDArray[np.str_]
+
+assert_type(np.fix(AR_LIKE_b), npt.NDArray[np.floating[Any]])
+assert_type(np.fix(AR_LIKE_u), npt.NDArray[np.floating[Any]])
+assert_type(np.fix(AR_LIKE_i), npt.NDArray[np.floating[Any]])
+assert_type(np.fix(AR_LIKE_f), npt.NDArray[np.floating[Any]])
+assert_type(np.fix(AR_LIKE_O), npt.NDArray[np.object_])
+assert_type(np.fix(AR_LIKE_f, out=AR_U), npt.NDArray[np.str_])
+
+assert_type(np.isposinf(AR_LIKE_b), npt.NDArray[np.bool_])
+assert_type(np.isposinf(AR_LIKE_u), npt.NDArray[np.bool_])
+assert_type(np.isposinf(AR_LIKE_i), npt.NDArray[np.bool_])
+assert_type(np.isposinf(AR_LIKE_f), npt.NDArray[np.bool_])
+assert_type(np.isposinf(AR_LIKE_f, out=AR_U), npt.NDArray[np.str_])
+
+assert_type(np.isneginf(AR_LIKE_b), npt.NDArray[np.bool_])
+assert_type(np.isneginf(AR_LIKE_u), npt.NDArray[np.bool_])
+assert_type(np.isneginf(AR_LIKE_i), npt.NDArray[np.bool_])
+assert_type(np.isneginf(AR_LIKE_f), npt.NDArray[np.bool_])
+assert_type(np.isneginf(AR_LIKE_f, out=AR_U), npt.NDArray[np.str_])
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/ufuncs.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/ufuncs.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..5f7d99efd12d3052e5442238bf826d13b5acf6b3
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/ufuncs.pyi
@@ -0,0 +1,76 @@
+import sys
+from typing import Literal, Any
+
+import numpy as np
+import numpy.typing as npt
+
+if sys.version_info >= (3, 11):
+    from typing import assert_type
+else:
+    from typing_extensions import assert_type
+
+f8: np.float64
+AR_f8: npt.NDArray[np.float64]
+AR_i8: npt.NDArray[np.int64]
+
+assert_type(np.absolute.__doc__, str)
+assert_type(np.absolute.types, list[str])
+
+assert_type(np.absolute.__name__, Literal["absolute"])
+assert_type(np.absolute.ntypes, Literal[20])
+assert_type(np.absolute.identity, None)
+assert_type(np.absolute.nin, Literal[1])
+assert_type(np.absolute.nin, Literal[1])
+assert_type(np.absolute.nout, Literal[1])
+assert_type(np.absolute.nargs, Literal[2])
+assert_type(np.absolute.signature, None)
+assert_type(np.absolute(f8), Any)
+assert_type(np.absolute(AR_f8), npt.NDArray[Any])
+assert_type(np.absolute.at(AR_f8, AR_i8), None)
+
+assert_type(np.add.__name__, Literal["add"])
+assert_type(np.add.ntypes, Literal[22])
+assert_type(np.add.identity, Literal[0])
+assert_type(np.add.nin, Literal[2])
+assert_type(np.add.nout, Literal[1])
+assert_type(np.add.nargs, Literal[3])
+assert_type(np.add.signature, None)
+assert_type(np.add(f8, f8), Any)
+assert_type(np.add(AR_f8, f8), npt.NDArray[Any])
+assert_type(np.add.at(AR_f8, AR_i8, f8), None)
+assert_type(np.add.reduce(AR_f8, axis=0), Any)
+assert_type(np.add.accumulate(AR_f8), npt.NDArray[Any])
+assert_type(np.add.reduceat(AR_f8, AR_i8), npt.NDArray[Any])
+assert_type(np.add.outer(f8, f8), Any)
+assert_type(np.add.outer(AR_f8, f8), npt.NDArray[Any])
+
+assert_type(np.frexp.__name__, Literal["frexp"])
+assert_type(np.frexp.ntypes, Literal[4])
+assert_type(np.frexp.identity, None)
+assert_type(np.frexp.nin, Literal[1])
+assert_type(np.frexp.nout, Literal[2])
+assert_type(np.frexp.nargs, Literal[3])
+assert_type(np.frexp.signature, None)
+assert_type(np.frexp(f8), tuple[Any, Any])
+assert_type(np.frexp(AR_f8), tuple[npt.NDArray[Any], npt.NDArray[Any]])
+
+assert_type(np.divmod.__name__, Literal["divmod"])
+assert_type(np.divmod.ntypes, Literal[15])
+assert_type(np.divmod.identity, None)
+assert_type(np.divmod.nin, Literal[2])
+assert_type(np.divmod.nout, Literal[2])
+assert_type(np.divmod.nargs, Literal[4])
+assert_type(np.divmod.signature, None)
+assert_type(np.divmod(f8, f8), tuple[Any, Any])
+assert_type(np.divmod(AR_f8, f8), tuple[npt.NDArray[Any], npt.NDArray[Any]])
+
+assert_type(np.matmul.__name__, Literal["matmul"])
+assert_type(np.matmul.ntypes, Literal[19])
+assert_type(np.matmul.identity, None)
+assert_type(np.matmul.nin, Literal[2])
+assert_type(np.matmul.nout, Literal[1])
+assert_type(np.matmul.nargs, Literal[3])
+assert_type(np.matmul.signature, Literal["(n?,k),(k,m?)->(n?,m?)"])
+assert_type(np.matmul.identity, None)
+assert_type(np.matmul(AR_f8, AR_f8), Any)
+assert_type(np.matmul(AR_f8, AR_f8, axes=[(0, 1), (0, 1), (0, 1)]), Any)
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/warnings_and_errors.pyi b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/warnings_and_errors.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..b026e4f6e3b03dd0a4750a74ce49f7ec0336ee4d
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/warnings_and_errors.pyi
@@ -0,0 +1,16 @@
+import sys
+
+import numpy as np
+
+if sys.version_info >= (3, 11):
+    from typing import assert_type
+else:
+    from typing_extensions import assert_type
+
+assert_type(np.ModuleDeprecationWarning(), np.ModuleDeprecationWarning)
+assert_type(np.VisibleDeprecationWarning(), np.VisibleDeprecationWarning)
+assert_type(np.ComplexWarning(), np.ComplexWarning)
+assert_type(np.RankWarning(), np.RankWarning)
+assert_type(np.TooHardError(), np.TooHardError)
+assert_type(np.AxisError("test"), np.AxisError)
+assert_type(np.AxisError(5, 1), np.AxisError)
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/test_isfile.py b/lib/python3.12/site-packages/numpy/typing/tests/test_isfile.py
new file mode 100644
index 0000000000000000000000000000000000000000..2ca2c9b21f94c37252fc6130f9f03a4ad4e04433
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/test_isfile.py
@@ -0,0 +1,32 @@
+import os
+import sys
+from pathlib import Path
+
+import numpy as np
+from numpy.testing import assert_
+
+ROOT = Path(np.__file__).parents[0]
+FILES = [
+    ROOT / "py.typed",
+    ROOT / "__init__.pyi",
+    ROOT / "ctypeslib.pyi",
+    ROOT / "core" / "__init__.pyi",
+    ROOT / "f2py" / "__init__.pyi",
+    ROOT / "fft" / "__init__.pyi",
+    ROOT / "lib" / "__init__.pyi",
+    ROOT / "linalg" / "__init__.pyi",
+    ROOT / "ma" / "__init__.pyi",
+    ROOT / "matrixlib" / "__init__.pyi",
+    ROOT / "polynomial" / "__init__.pyi",
+    ROOT / "random" / "__init__.pyi",
+    ROOT / "testing" / "__init__.pyi",
+]
+if sys.version_info < (3, 12):
+    FILES += [ROOT / "distutils" / "__init__.pyi"]
+
+
+class TestIsFile:
+    def test_isfile(self):
+        """Test if all ``.pyi`` files are properly installed."""
+        for file in FILES:
+            assert_(os.path.isfile(file))
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/test_runtime.py b/lib/python3.12/site-packages/numpy/typing/tests/test_runtime.py
new file mode 100644
index 0000000000000000000000000000000000000000..c32c5db3266aff7643cc70b1e139aa17e24a26f6
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/test_runtime.py
@@ -0,0 +1,109 @@
+"""Test the runtime usage of `numpy.typing`."""
+
+from __future__ import annotations
+
+from typing import (
+    get_type_hints,
+    Union,
+    NamedTuple,
+    get_args,
+    get_origin,
+    Any,
+)
+
+import pytest
+import numpy as np
+import numpy.typing as npt
+import numpy._typing as _npt
+
+
+class TypeTup(NamedTuple):
+    typ: type
+    args: tuple[type, ...]
+    origin: None | type
+
+
+NDArrayTup = TypeTup(npt.NDArray, npt.NDArray.__args__, np.ndarray)
+
+TYPES = {
+    "ArrayLike": TypeTup(npt.ArrayLike, npt.ArrayLike.__args__, Union),
+    "DTypeLike": TypeTup(npt.DTypeLike, npt.DTypeLike.__args__, Union),
+    "NBitBase": TypeTup(npt.NBitBase, (), None),
+    "NDArray": NDArrayTup,
+}
+
+
+@pytest.mark.parametrize("name,tup", TYPES.items(), ids=TYPES.keys())
+def test_get_args(name: type, tup: TypeTup) -> None:
+    """Test `typing.get_args`."""
+    typ, ref = tup.typ, tup.args
+    out = get_args(typ)
+    assert out == ref
+
+
+@pytest.mark.parametrize("name,tup", TYPES.items(), ids=TYPES.keys())
+def test_get_origin(name: type, tup: TypeTup) -> None:
+    """Test `typing.get_origin`."""
+    typ, ref = tup.typ, tup.origin
+    out = get_origin(typ)
+    assert out == ref
+
+
+@pytest.mark.parametrize("name,tup", TYPES.items(), ids=TYPES.keys())
+def test_get_type_hints(name: type, tup: TypeTup) -> None:
+    """Test `typing.get_type_hints`."""
+    typ = tup.typ
+
+    # Explicitly set `__annotations__` in order to circumvent the
+    # stringification performed by `from __future__ import annotations`
+    def func(a): pass
+    func.__annotations__ = {"a": typ, "return": None}
+
+    out = get_type_hints(func)
+    ref = {"a": typ, "return": type(None)}
+    assert out == ref
+
+
+@pytest.mark.parametrize("name,tup", TYPES.items(), ids=TYPES.keys())
+def test_get_type_hints_str(name: type, tup: TypeTup) -> None:
+    """Test `typing.get_type_hints` with string-representation of types."""
+    typ_str, typ = f"npt.{name}", tup.typ
+
+    # Explicitly set `__annotations__` in order to circumvent the
+    # stringification performed by `from __future__ import annotations`
+    def func(a): pass
+    func.__annotations__ = {"a": typ_str, "return": None}
+
+    out = get_type_hints(func)
+    ref = {"a": typ, "return": type(None)}
+    assert out == ref
+
+
+def test_keys() -> None:
+    """Test that ``TYPES.keys()`` and ``numpy.typing.__all__`` are synced."""
+    keys = TYPES.keys()
+    ref = set(npt.__all__)
+    assert keys == ref
+
+
+PROTOCOLS: dict[str, tuple[type[Any], object]] = {
+    "_SupportsDType": (_npt._SupportsDType, np.int64(1)),
+    "_SupportsArray": (_npt._SupportsArray, np.arange(10)),
+    "_SupportsArrayFunc": (_npt._SupportsArrayFunc, np.arange(10)),
+    "_NestedSequence": (_npt._NestedSequence, [1]),
+}
+
+
+@pytest.mark.parametrize("cls,obj", PROTOCOLS.values(), ids=PROTOCOLS.keys())
+class TestRuntimeProtocol:
+    def test_isinstance(self, cls: type[Any], obj: object) -> None:
+        assert isinstance(obj, cls)
+        assert not isinstance(None, cls)
+
+    def test_issubclass(self, cls: type[Any], obj: object) -> None:
+        if cls is _npt._SupportsDType:
+            pytest.xfail(
+                "Protocols with non-method members don't support issubclass()"
+            )
+        assert issubclass(type(obj), cls)
+        assert not issubclass(type(None), cls)
diff --git a/lib/python3.12/site-packages/numpy/typing/tests/test_typing.py b/lib/python3.12/site-packages/numpy/typing/tests/test_typing.py
new file mode 100644
index 0000000000000000000000000000000000000000..6f778e551576a0a18099dc7fcc06745e0d4f030b
--- /dev/null
+++ b/lib/python3.12/site-packages/numpy/typing/tests/test_typing.py
@@ -0,0 +1,300 @@
+from __future__ import annotations
+
+import importlib.util
+import os
+import re
+import shutil
+from collections import defaultdict
+from collections.abc import Iterator
+from typing import TYPE_CHECKING
+
+import pytest
+from numpy.typing.mypy_plugin import _EXTENDED_PRECISION_LIST
+
+
+# Only trigger a full `mypy` run if this environment variable is set
+# Note that these tests tend to take over a minute even on a macOS M1 CPU,
+# and more than that in CI.
+RUN_MYPY = "NPY_RUN_MYPY_IN_TESTSUITE" in os.environ
+if RUN_MYPY and RUN_MYPY not in ('0', '', 'false'):
+    RUN_MYPY = True
+
+# Skips all functions in this file
+pytestmark = pytest.mark.skipif(
+    not RUN_MYPY,
+    reason="`NPY_RUN_MYPY_IN_TESTSUITE` not set"
+)
+
+
+# Only trigger a full `mypy` run if this environment variable is set
+# Note that these tests tend to take over a minute even on a macOS M1 CPU,
+# and more than that in CI.
+RUN_MYPY = "NPY_RUN_MYPY_IN_TESTSUITE" in os.environ
+if RUN_MYPY and RUN_MYPY not in ('0', '', 'false'):
+    RUN_MYPY = True
+
+# Skips all functions in this file
+pytestmark = pytest.mark.skipif(
+    not RUN_MYPY,
+    reason="`NPY_RUN_MYPY_IN_TESTSUITE` not set"
+)
+
+
+try:
+    from mypy import api
+except ImportError:
+    NO_MYPY = True
+else:
+    NO_MYPY = False
+
+if TYPE_CHECKING:
+    # We need this as annotation, but it's located in a private namespace.
+    # As a compromise, do *not* import it during runtime
+    from _pytest.mark.structures import ParameterSet
+
+DATA_DIR = os.path.join(os.path.dirname(__file__), "data")
+PASS_DIR = os.path.join(DATA_DIR, "pass")
+FAIL_DIR = os.path.join(DATA_DIR, "fail")
+REVEAL_DIR = os.path.join(DATA_DIR, "reveal")
+MISC_DIR = os.path.join(DATA_DIR, "misc")
+MYPY_INI = os.path.join(DATA_DIR, "mypy.ini")
+CACHE_DIR = os.path.join(DATA_DIR, ".mypy_cache")
+
+#: A dictionary with file names as keys and lists of the mypy stdout as values.
+#: To-be populated by `run_mypy`.
+OUTPUT_MYPY: defaultdict[str, list[str]] = defaultdict(list)
+
+
+def _key_func(key: str) -> str:
+    """Split at the first occurrence of the ``:`` character.
+
+    Windows drive-letters (*e.g.* ``C:``) are ignored herein.
+    """
+    drive, tail = os.path.splitdrive(key)
+    return os.path.join(drive, tail.split(":", 1)[0])
+
+
+def _strip_filename(msg: str) -> tuple[int, str]:
+    """Strip the filename and line number from a mypy message."""
+    _, tail = os.path.splitdrive(msg)
+    _, lineno, msg = tail.split(":", 2)
+    return int(lineno), msg.strip()
+
+
+def strip_func(match: re.Match[str]) -> str:
+    """`re.sub` helper function for stripping module names."""
+    return match.groups()[1]
+
+
+@pytest.fixture(scope="module", autouse=True)
+def run_mypy() -> None:
+    """Clears the cache and run mypy before running any of the typing tests.
+
+    The mypy results are cached in `OUTPUT_MYPY` for further use.
+
+    The cache refresh can be skipped using
+
+    NUMPY_TYPING_TEST_CLEAR_CACHE=0 pytest numpy/typing/tests
+    """
+    if (
+        os.path.isdir(CACHE_DIR)
+        and bool(os.environ.get("NUMPY_TYPING_TEST_CLEAR_CACHE", True))
+    ):
+        shutil.rmtree(CACHE_DIR)
+
+    split_pattern = re.compile(r"(\s+)?\^(\~+)?")
+    for directory in (PASS_DIR, REVEAL_DIR, FAIL_DIR, MISC_DIR):
+        # Run mypy
+        stdout, stderr, exit_code = api.run([
+            "--config-file",
+            MYPY_INI,
+            "--cache-dir",
+            CACHE_DIR,
+            directory,
+        ])
+        if stderr:
+            pytest.fail(f"Unexpected mypy standard error\n\n{stderr}")
+        elif exit_code not in {0, 1}:
+            pytest.fail(f"Unexpected mypy exit code: {exit_code}\n\n{stdout}")
+
+        str_concat = ""
+        filename: str | None = None
+        for i in stdout.split("\n"):
+            if "note:" in i:
+                continue
+            if filename is None:
+                filename = _key_func(i)
+
+            str_concat += f"{i}\n"
+            if split_pattern.match(i) is not None:
+                OUTPUT_MYPY[filename].append(str_concat)
+                str_concat = ""
+                filename = None
+
+
+def get_test_cases(directory: str) -> Iterator[ParameterSet]:
+    for root, _, files in os.walk(directory):
+        for fname in files:
+            short_fname, ext = os.path.splitext(fname)
+            if ext in (".pyi", ".py"):
+                fullpath = os.path.join(root, fname)
+                yield pytest.param(fullpath, id=short_fname)
+
+
+@pytest.mark.slow
+@pytest.mark.skipif(NO_MYPY, reason="Mypy is not installed")
+@pytest.mark.parametrize("path", get_test_cases(PASS_DIR))
+def test_success(path) -> None:
+    # Alias `OUTPUT_MYPY` so that it appears in the local namespace
+    output_mypy = OUTPUT_MYPY
+    if path in output_mypy:
+        msg = "Unexpected mypy output\n\n"
+        msg += "\n".join(_strip_filename(v)[1] for v in output_mypy[path])
+        raise AssertionError(msg)
+
+
+@pytest.mark.slow
+@pytest.mark.skipif(NO_MYPY, reason="Mypy is not installed")
+@pytest.mark.parametrize("path", get_test_cases(FAIL_DIR))
+def test_fail(path: str) -> None:
+    __tracebackhide__ = True
+
+    with open(path) as fin:
+        lines = fin.readlines()
+
+    errors = defaultdict(lambda: "")
+
+    output_mypy = OUTPUT_MYPY
+    assert path in output_mypy
+
+    for error_line in output_mypy[path]:
+        lineno, error_line = _strip_filename(error_line)
+        errors[lineno] += f'{error_line}\n'
+
+    for i, line in enumerate(lines):
+        lineno = i + 1
+        if (
+            line.startswith('#')
+            or (" E:" not in line and lineno not in errors)
+        ):
+            continue
+
+        target_line = lines[lineno - 1]
+        if "# E:" in target_line:
+            expression, _, marker = target_line.partition("  # E: ")
+            expected_error = errors[lineno].strip()
+            marker = marker.strip()
+            _test_fail(path, expression, marker, expected_error, lineno)
+        else:
+            pytest.fail(
+                f"Unexpected mypy output at line {lineno}\n\n{errors[lineno]}"
+            )
+
+
+_FAIL_MSG1 = """Extra error at line {}
+
+Expression: {}
+Extra error: {!r}
+"""
+
+_FAIL_MSG2 = """Error mismatch at line {}
+
+Expression: {}
+Expected error: {}
+Observed error: {!r}
+"""
+
+
+def _test_fail(
+    path: str,
+    expression: str,
+    error: str,
+    expected_error: None | str,
+    lineno: int,
+) -> None:
+    if expected_error is None:
+        raise AssertionError(_FAIL_MSG1.format(lineno, expression, error))
+    elif error not in expected_error:
+        raise AssertionError(_FAIL_MSG2.format(
+            lineno, expression, expected_error, error
+        ))
+
+
+_REVEAL_MSG = """Reveal mismatch at line {}
+
+{}
+"""
+
+
+@pytest.mark.slow
+@pytest.mark.skipif(NO_MYPY, reason="Mypy is not installed")
+@pytest.mark.parametrize("path", get_test_cases(REVEAL_DIR))
+def test_reveal(path: str) -> None:
+    """Validate that mypy correctly infers the return-types of
+    the expressions in `path`.
+    """
+    __tracebackhide__ = True
+
+    output_mypy = OUTPUT_MYPY
+    if path not in output_mypy:
+        return
+
+    for error_line in output_mypy[path]:
+        lineno, error_line = _strip_filename(error_line)
+        raise AssertionError(_REVEAL_MSG.format(lineno, error_line))
+
+
+@pytest.mark.slow
+@pytest.mark.skipif(NO_MYPY, reason="Mypy is not installed")
+@pytest.mark.parametrize("path", get_test_cases(PASS_DIR))
+def test_code_runs(path: str) -> None:
+    """Validate that the code in `path` properly during runtime."""
+    path_without_extension, _ = os.path.splitext(path)
+    dirname, filename = path.split(os.sep)[-2:]
+
+    spec = importlib.util.spec_from_file_location(
+        f"{dirname}.{filename}", path
+    )
+    assert spec is not None
+    assert spec.loader is not None
+
+    test_module = importlib.util.module_from_spec(spec)
+    spec.loader.exec_module(test_module)
+
+
+LINENO_MAPPING = {
+    11: "uint128",
+    12: "uint256",
+    14: "int128",
+    15: "int256",
+    17: "float80",
+    18: "float96",
+    19: "float128",
+    20: "float256",
+    22: "complex160",
+    23: "complex192",
+    24: "complex256",
+    25: "complex512",
+}
+
+
+@pytest.mark.slow
+@pytest.mark.skipif(NO_MYPY, reason="Mypy is not installed")
+def test_extended_precision() -> None:
+    path = os.path.join(MISC_DIR, "extended_precision.pyi")
+    output_mypy = OUTPUT_MYPY
+    assert path in output_mypy
+
+    with open(path) as f:
+        expression_list = f.readlines()
+
+    for _msg in output_mypy[path]:
+        lineno, msg = _strip_filename(_msg)
+        expression = expression_list[lineno - 1].rstrip("\n")
+
+        if LINENO_MAPPING[lineno] in _EXTENDED_PRECISION_LIST:
+            raise AssertionError(_REVEAL_MSG.format(lineno, msg))
+        elif "error" not in msg:
+            _test_fail(
+                path, expression, msg, 'Expression is of type "Any"', lineno
+            )
diff --git a/lib/python3.12/site-packages/nvidia_nvtx_cu12-12.4.127.dist-info/INSTALLER b/lib/python3.12/site-packages/nvidia_nvtx_cu12-12.4.127.dist-info/INSTALLER
new file mode 100644
index 0000000000000000000000000000000000000000..a1b589e38a32041e49332e5e81c2d363dc418d68
--- /dev/null
+++ b/lib/python3.12/site-packages/nvidia_nvtx_cu12-12.4.127.dist-info/INSTALLER
@@ -0,0 +1 @@
+pip
diff --git a/lib/python3.12/site-packages/nvidia_nvtx_cu12-12.4.127.dist-info/License.txt b/lib/python3.12/site-packages/nvidia_nvtx_cu12-12.4.127.dist-info/License.txt
new file mode 100644
index 0000000000000000000000000000000000000000..b491c70e0aef319022ded661e111ddbd45b8a17f
--- /dev/null
+++ b/lib/python3.12/site-packages/nvidia_nvtx_cu12-12.4.127.dist-info/License.txt
@@ -0,0 +1,1568 @@
+End User License Agreement
+--------------------------
+
+
+Preface
+-------
+
+The Software License Agreement in Chapter 1 and the Supplement
+in Chapter 2 contain license terms and conditions that govern
+the use of NVIDIA software. By accepting this agreement, you
+agree to comply with all the terms and conditions applicable
+to the product(s) included herein.
+
+
+NVIDIA Driver
+
+
+Description
+
+This package contains the operating system driver and
+fundamental system software components for NVIDIA GPUs.
+
+
+NVIDIA CUDA Toolkit
+
+
+Description
+
+The NVIDIA CUDA Toolkit provides command-line and graphical
+tools for building, debugging and optimizing the performance
+of applications accelerated by NVIDIA GPUs, runtime and math
+libraries, and documentation including programming guides,
+user manuals, and API references.
+
+
+Default Install Location of CUDA Toolkit
+
+Windows platform:
+
+%ProgramFiles%\NVIDIA GPU Computing Toolkit\CUDA\v#.#
+
+Linux platform:
+
+/usr/local/cuda-#.#
+
+Mac platform:
+
+/Developer/NVIDIA/CUDA-#.#
+
+
+NVIDIA CUDA Samples
+
+
+Description
+
+This package includes over 100+ CUDA examples that demonstrate
+various CUDA programming principles, and efficient CUDA
+implementation of algorithms in specific application domains.
+
+
+Default Install Location of CUDA Samples
+
+Windows platform:
+
+%ProgramData%\NVIDIA Corporation\CUDA Samples\v#.#
+
+Linux platform:
+
+/usr/local/cuda-#.#/samples
+
+and
+
+$HOME/NVIDIA_CUDA-#.#_Samples
+
+Mac platform:
+
+/Developer/NVIDIA/CUDA-#.#/samples
+
+
+NVIDIA Nsight Visual Studio Edition (Windows only)
+
+
+Description
+
+NVIDIA Nsight Development Platform, Visual Studio Edition is a
+development environment integrated into Microsoft Visual
+Studio that provides tools for debugging, profiling, analyzing
+and optimizing your GPU computing and graphics applications.
+
+
+Default Install Location of Nsight Visual Studio Edition
+
+Windows platform:
+
+%ProgramFiles(x86)%\NVIDIA Corporation\Nsight Visual Studio Edition #.#
+
+
+1. License Agreement for NVIDIA Software Development Kits
+---------------------------------------------------------
+
+
+Release Date: July 26, 2018
+---------------------------
+
+
+Important NoticeRead before downloading, installing,
+copying or using the licensed software:
+-------------------------------------------------------
+
+This license agreement, including exhibits attached
+("Agreement”) is a legal agreement between you and NVIDIA
+Corporation ("NVIDIA") and governs your use of a NVIDIA
+software development kit (“SDK”).
+
+Each SDK has its own set of software and materials, but here
+is a description of the types of items that may be included in
+a SDK: source code, header files, APIs, data sets and assets
+(examples include images, textures, models, scenes, videos,
+native API input/output files), binary software, sample code,
+libraries, utility programs, programming code and
+documentation.
+
+This Agreement can be accepted only by an adult of legal age
+of majority in the country in which the SDK is used.
+
+If you are entering into this Agreement on behalf of a company
+or other legal entity, you represent that you have the legal
+authority to bind the entity to this Agreement, in which case
+“you” will mean the entity you represent.
+
+If you don’t have the required age or authority to accept
+this Agreement, or if you don’t accept all the terms and
+conditions of this Agreement, do not download, install or use
+the SDK.
+
+You agree to use the SDK only for purposes that are permitted
+by (a) this Agreement, and (b) any applicable law, regulation
+or generally accepted practices or guidelines in the relevant
+jurisdictions.
+
+
+1.1. License
+
+
+1.1.1. License Grant
+
+Subject to the terms of this Agreement, NVIDIA hereby grants
+you a non-exclusive, non-transferable license, without the
+right to sublicense (except as expressly provided in this
+Agreement) to:
+
+  1. Install and use the SDK,
+
+  2. Modify and create derivative works of sample source code
+    delivered in the SDK, and
+
+  3. Distribute those portions of the SDK that are identified
+    in this Agreement as distributable, as incorporated in
+    object code format into a software application that meets
+    the distribution requirements indicated in this Agreement.
+
+
+1.1.2. Distribution Requirements
+
+These are the distribution requirements for you to exercise
+the distribution grant:
+
+  1. Your application must have material additional
+    functionality, beyond the included portions of the SDK.
+
+  2. The distributable portions of the SDK shall only be
+    accessed by your application.
+
+  3. The following notice shall be included in modifications
+    and derivative works of sample source code distributed:
+    “This software contains source code provided by NVIDIA
+    Corporation.”
+
+  4. Unless a developer tool is identified in this Agreement
+    as distributable, it is delivered for your internal use
+    only.
+
+  5. The terms under which you distribute your application
+    must be consistent with the terms of this Agreement,
+    including (without limitation) terms relating to the
+    license grant and license restrictions and protection of
+    NVIDIA’s intellectual property rights. Additionally, you
+    agree that you will protect the privacy, security and
+    legal rights of your application users.
+
+  6. You agree to notify NVIDIA in writing of any known or
+    suspected distribution or use of the SDK not in compliance
+    with the requirements of this Agreement, and to enforce
+    the terms of your agreements with respect to distributed
+    SDK.
+
+
+1.1.3. Authorized Users
+
+You may allow employees and contractors of your entity or of
+your subsidiary(ies) to access and use the SDK from your
+secure network to perform work on your behalf.
+
+If you are an academic institution you may allow users
+enrolled or employed by the academic institution to access and
+use the SDK from your secure network.
+
+You are responsible for the compliance with the terms of this
+Agreement by your authorized users. If you become aware that
+your authorized users didn’t follow the terms of this
+Agreement, you agree to take reasonable steps to resolve the
+non-compliance and prevent new occurrences.
+
+
+1.1.4. Pre-Release SDK
+
+The SDK versions identified as alpha, beta, preview or
+otherwise as pre-release, may not be fully functional, may
+contain errors or design flaws, and may have reduced or
+different security, privacy, accessibility, availability, and
+reliability standards relative to commercial versions of
+NVIDIA software and materials. Use of a pre-release SDK may
+result in unexpected results, loss of data, project delays or
+other unpredictable damage or loss.
+
+You may use a pre-release SDK at your own risk, understanding
+that pre-release SDKs are not intended for use in production
+or business-critical systems.
+
+NVIDIA may choose not to make available a commercial version
+of any pre-release SDK. NVIDIA may also choose to abandon
+development and terminate the availability of a pre-release
+SDK at any time without liability.
+
+
+1.1.5. Updates
+
+NVIDIA may, at its option, make available patches, workarounds
+or other updates to this SDK. Unless the updates are provided
+with their separate governing terms, they are deemed part of
+the SDK licensed to you as provided in this Agreement. You
+agree that the form and content of the SDK that NVIDIA
+provides may change without prior notice to you. While NVIDIA
+generally maintains compatibility between versions, NVIDIA may
+in some cases make changes that introduce incompatibilities in
+future versions of the SDK.
+
+
+1.1.6. Third Party Licenses
+
+The SDK may come bundled with, or otherwise include or be
+distributed with, third party software licensed by a NVIDIA
+supplier and/or open source software provided under an open
+source license. Use of third party software is subject to the
+third-party license terms, or in the absence of third party
+terms, the terms of this Agreement. Copyright to third party
+software is held by the copyright holders indicated in the
+third-party software or license.
+
+
+1.1.7. Reservation of Rights
+
+NVIDIA reserves all rights, title, and interest in and to the
+SDK, not expressly granted to you under this Agreement.
+
+
+1.2. Limitations
+
+The following license limitations apply to your use of the
+SDK:
+
+  1. You may not reverse engineer, decompile or disassemble,
+    or remove copyright or other proprietary notices from any
+    portion of the SDK or copies of the SDK.
+
+  2. Except as expressly provided in this Agreement, you may
+    not copy, sell, rent, sublicense, transfer, distribute,
+    modify, or create derivative works of any portion of the
+    SDK. For clarity, you may not distribute or sublicense the
+    SDK as a stand-alone product.
+
+  3. Unless you have an agreement with NVIDIA for this
+    purpose, you may not indicate that an application created
+    with the SDK is sponsored or endorsed by NVIDIA.
+
+  4. You may not bypass, disable, or circumvent any
+    encryption, security, digital rights management or
+    authentication mechanism in the SDK.
+
+  5. You may not use the SDK in any manner that would cause it
+    to become subject to an open source software license. As
+    examples, licenses that require as a condition of use,
+    modification, and/or distribution that the SDK be:
+
+      a. Disclosed or distributed in source code form;
+
+      b. Licensed for the purpose of making derivative works;
+        or
+
+      c. Redistributable at no charge.
+
+  6. Unless you have an agreement with NVIDIA for this
+    purpose, you may not use the SDK with any system or
+    application where the use or failure of the system or
+    application can reasonably be expected to threaten or
+    result in personal injury, death, or catastrophic loss.
+    Examples include use in avionics, navigation, military,
+    medical, life support or other life critical applications.
+    NVIDIA does not design, test or manufacture the SDK for
+    these critical uses and NVIDIA shall not be liable to you
+    or any third party, in whole or in part, for any claims or
+    damages arising from such uses.
+
+  7. You agree to defend, indemnify and hold harmless NVIDIA
+    and its affiliates, and their respective employees,
+    contractors, agents, officers and directors, from and
+    against any and all claims, damages, obligations, losses,
+    liabilities, costs or debt, fines, restitutions and
+    expenses (including but not limited to attorney’s fees
+    and costs incident to establishing the right of
+    indemnification) arising out of or related to your use of
+    the SDK outside of the scope of this Agreement, or not in
+    compliance with its terms.
+
+
+1.3. Ownership
+
+  1.  NVIDIA or its licensors hold all rights, title and
+    interest in and to the SDK and its modifications and
+    derivative works, including their respective intellectual
+    property rights, subject to your rights described in this
+    section. This SDK may include software and materials from
+    NVIDIA’s licensors, and these licensors are intended
+    third party beneficiaries that may enforce this Agreement
+    with respect to their intellectual property rights.
+
+  2.  You hold all rights, title and interest in and to your
+    applications and your derivative works of the sample
+    source code delivered in the SDK, including their
+    respective intellectual property rights, subject to
+    NVIDIA’s rights described in this section.
+
+  3. You may, but don’t have to, provide to NVIDIA
+    suggestions, feature requests or other feedback regarding
+    the SDK, including possible enhancements or modifications
+    to the SDK. For any feedback that you voluntarily provide,
+    you hereby grant NVIDIA and its affiliates a perpetual,
+    non-exclusive, worldwide, irrevocable license to use,
+    reproduce, modify, license, sublicense (through multiple
+    tiers of sublicensees), and distribute (through multiple
+    tiers of distributors) it without the payment of any
+    royalties or fees to you. NVIDIA will use feedback at its
+    choice. NVIDIA is constantly looking for ways to improve
+    its products, so you may send feedback to NVIDIA through
+    the developer portal at https://developer.nvidia.com.
+
+
+1.4. No Warranties
+
+THE SDK IS PROVIDED BY NVIDIA “AS IS” AND “WITH ALL
+FAULTS.” TO THE MAXIMUM EXTENT PERMITTED BY LAW, NVIDIA AND
+ITS AFFILIATES EXPRESSLY DISCLAIM ALL WARRANTIES OF ANY KIND
+OR NATURE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING,
+BUT NOT LIMITED TO, ANY WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE, TITLE, NON-INFRINGEMENT, OR THE
+ABSENCE OF ANY DEFECTS THEREIN, WHETHER LATENT OR PATENT. NO
+WARRANTY IS MADE ON THE BASIS OF TRADE USAGE, COURSE OF
+DEALING OR COURSE OF TRADE.
+
+
+1.5. Limitation of Liability
+
+TO THE MAXIMUM EXTENT PERMITTED BY LAW, NVIDIA AND ITS
+AFFILIATES SHALL NOT BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
+PUNITIVE OR CONSEQUENTIAL DAMAGES, OR ANY LOST PROFITS, LOSS
+OF USE, LOSS OF DATA OR LOSS OF GOODWILL, OR THE COSTS OF
+PROCURING SUBSTITUTE PRODUCTS, ARISING OUT OF OR IN CONNECTION
+WITH THIS AGREEMENT OR THE USE OR PERFORMANCE OF THE SDK,
+WHETHER SUCH LIABILITY ARISES FROM ANY CLAIM BASED UPON BREACH
+OF CONTRACT, BREACH OF WARRANTY, TORT (INCLUDING NEGLIGENCE),
+PRODUCT LIABILITY OR ANY OTHER CAUSE OF ACTION OR THEORY OF
+LIABILITY. IN NO EVENT WILL NVIDIA’S AND ITS AFFILIATES
+TOTAL CUMULATIVE LIABILITY UNDER OR ARISING OUT OF THIS
+AGREEMENT EXCEED US$10.00. THE NATURE OF THE LIABILITY OR THE
+NUMBER OF CLAIMS OR SUITS SHALL NOT ENLARGE OR EXTEND THIS
+LIMIT.
+
+These exclusions and limitations of liability shall apply
+regardless if NVIDIA or its affiliates have been advised of
+the possibility of such damages, and regardless of whether a
+remedy fails its essential purpose. These exclusions and
+limitations of liability form an essential basis of the
+bargain between the parties, and, absent any of these
+exclusions or limitations of liability, the provisions of this
+Agreement, including, without limitation, the economic terms,
+would be substantially different.
+
+
+1.6. Termination
+
+  1. This Agreement will continue to apply until terminated by
+    either you or NVIDIA as described below.
+
+  2. If you want to terminate this Agreement, you may do so by
+    stopping to use the SDK.
+
+  3. NVIDIA may, at any time, terminate this Agreement if:
+
+      a. (i) you fail to comply with any term of this
+        Agreement and the non-compliance is not fixed within
+        thirty (30) days following notice from NVIDIA (or
+        immediately if you violate NVIDIA’s intellectual
+        property rights);
+
+      b. (ii) you commence or participate in any legal
+        proceeding against NVIDIA with respect to the SDK; or
+
+      c. (iii) NVIDIA decides to no longer provide the SDK in
+        a country or, in NVIDIA’s sole discretion, the
+        continued use of it is no longer commercially viable.
+
+  4. Upon any termination of this Agreement, you agree to
+    promptly discontinue use of the SDK and destroy all copies
+    in your possession or control. Your prior distributions in
+    accordance with this Agreement are not affected by the
+    termination of this Agreement. Upon written request, you
+    will certify in writing that you have complied with your
+    commitments under this section. Upon any termination of
+    this Agreement all provisions survive except for the
+    license grant provisions.
+
+
+1.7. General
+
+If you wish to assign this Agreement or your rights and
+obligations, including by merger, consolidation, dissolution
+or operation of law, contact NVIDIA to ask for permission. Any
+attempted assignment not approved by NVIDIA in writing shall
+be void and of no effect. NVIDIA may assign, delegate or
+transfer this Agreement and its rights and obligations, and if
+to a non-affiliate you will be notified.
+
+You agree to cooperate with NVIDIA and provide reasonably
+requested information to verify your compliance with this
+Agreement.
+
+This Agreement will be governed in all respects by the laws of
+the United States and of the State of Delaware as those laws
+are applied to contracts entered into and performed entirely
+within Delaware by Delaware residents, without regard to the
+conflicts of laws principles. The United Nations Convention on
+Contracts for the International Sale of Goods is specifically
+disclaimed. You agree to all terms of this Agreement in the
+English language.
+
+The state or federal courts residing in Santa Clara County,
+California shall have exclusive jurisdiction over any dispute
+or claim arising out of this Agreement. Notwithstanding this,
+you agree that NVIDIA shall still be allowed to apply for
+injunctive remedies or an equivalent type of urgent legal
+relief in any jurisdiction.
+
+If any court of competent jurisdiction determines that any
+provision of this Agreement is illegal, invalid or
+unenforceable, such provision will be construed as limited to
+the extent necessary to be consistent with and fully
+enforceable under the law and the remaining provisions will
+remain in full force and effect. Unless otherwise specified,
+remedies are cumulative.
+
+Each party acknowledges and agrees that the other is an
+independent contractor in the performance of this Agreement.
+
+The SDK has been developed entirely at private expense and is
+“commercial items” consisting of “commercial computer
+software” and “commercial computer software
+documentation” provided with RESTRICTED RIGHTS. Use,
+duplication or disclosure by the U.S. Government or a U.S.
+Government subcontractor is subject to the restrictions in
+this Agreement pursuant to DFARS 227.7202-3(a) or as set forth
+in subparagraphs (c)(1) and (2) of the Commercial Computer
+Software - Restricted Rights clause at FAR 52.227-19, as
+applicable. Contractor/manufacturer is NVIDIA, 2788 San Tomas
+Expressway, Santa Clara, CA 95051.
+
+The SDK is subject to United States export laws and
+regulations. You agree that you will not ship, transfer or
+export the SDK into any country, or use the SDK in any manner,
+prohibited by the United States Bureau of Industry and
+Security or economic sanctions regulations administered by the
+U.S. Department of Treasury’s Office of Foreign Assets
+Control (OFAC), or any applicable export laws, restrictions or
+regulations. These laws include restrictions on destinations,
+end users and end use. By accepting this Agreement, you
+confirm that you are not a resident or citizen of any country
+currently embargoed by the U.S. and that you are not otherwise
+prohibited from receiving the SDK.
+
+Any notice delivered by NVIDIA to you under this Agreement
+will be delivered via mail, email or fax. You agree that any
+notices that NVIDIA sends you electronically will satisfy any
+legal communication requirements. Please direct your legal
+notices or other correspondence to NVIDIA Corporation, 2788
+San Tomas Expressway, Santa Clara, California 95051, United
+States of America, Attention: Legal Department.
+
+This Agreement and any exhibits incorporated into this
+Agreement constitute the entire agreement of the parties with
+respect to the subject matter of this Agreement and supersede
+all prior negotiations or documentation exchanged between the
+parties relating to this SDK license. Any additional and/or
+conflicting terms on documents issued by you are null, void,
+and invalid. Any amendment or waiver under this Agreement
+shall be in writing and signed by representatives of both
+parties.
+
+
+2. CUDA Toolkit Supplement to Software License Agreement for
+NVIDIA Software Development Kits
+------------------------------------------------------------
+
+
+Release date: August 16, 2018
+-----------------------------
+
+The terms in this supplement govern your use of the NVIDIA
+CUDA Toolkit SDK under the terms of your license agreement
+(“Agreement”) as modified by this supplement. Capitalized
+terms used but not defined below have the meaning assigned to
+them in the Agreement.
+
+This supplement is an exhibit to the Agreement and is
+incorporated as an integral part of the Agreement. In the
+event of conflict between the terms in this supplement and the
+terms in the Agreement, the terms in this supplement govern.
+
+
+2.1. License Scope
+
+The SDK is licensed for you to develop applications only for
+use in systems with NVIDIA GPUs.
+
+
+2.2. Distribution
+
+The portions of the SDK that are distributable under the
+Agreement are listed in Attachment A.
+
+
+2.3. Operating Systems
+
+Those portions of the SDK designed exclusively for use on the
+Linux or FreeBSD operating systems, or other operating systems
+derived from the source code to these operating systems, may
+be copied and redistributed for use in accordance with this
+Agreement, provided that the object code files are not
+modified in any way (except for unzipping of compressed
+files).
+
+
+2.4. Audio and Video Encoders and Decoders
+
+You acknowledge and agree that it is your sole responsibility
+to obtain any additional third-party licenses required to
+make, have made, use, have used, sell, import, and offer for
+sale your products or services that include or incorporate any
+third-party software and content relating to audio and/or
+video encoders and decoders from, including but not limited
+to, Microsoft, Thomson, Fraunhofer IIS, Sisvel S.p.A.,
+MPEG-LA, and Coding Technologies. NVIDIA does not grant to you
+under this Agreement any necessary patent or other rights with
+respect to any audio and/or video encoders and decoders.
+
+
+2.5. Licensing
+
+If the distribution terms in this Agreement are not suitable
+for your organization, or for any questions regarding this
+Agreement, please contact NVIDIA at
+nvidia-compute-license-questions@nvidia.com.
+
+
+2.6. Attachment A
+
+The following portions of the SDK are distributable under the
+Agreement:
+
+Component
+
+CUDA Runtime
+
+Windows
+
+cudart.dll, cudart_static.lib, cudadevrt.lib
+
+Mac OSX
+
+libcudart.dylib, libcudart_static.a, libcudadevrt.a
+
+Linux
+
+libcudart.so, libcudart_static.a, libcudadevrt.a
+
+Android
+
+libcudart.so, libcudart_static.a, libcudadevrt.a
+
+Component
+
+CUDA FFT Library
+
+Windows
+
+cufft.dll, cufftw.dll, cufft.lib, cufftw.lib
+
+Mac OSX
+
+libcufft.dylib, libcufft_static.a, libcufftw.dylib,
+libcufftw_static.a
+
+Linux
+
+libcufft.so, libcufft_static.a, libcufftw.so,
+libcufftw_static.a
+
+Android
+
+libcufft.so, libcufft_static.a, libcufftw.so,
+libcufftw_static.a
+
+Component
+
+CUDA BLAS Library
+
+Windows
+
+cublas.dll, cublasLt.dll
+
+Mac OSX
+
+libcublas.dylib, libcublasLt.dylib, libcublas_static.a,
+libcublasLt_static.a
+
+Linux
+
+libcublas.so, libcublasLt.so, libcublas_static.a,
+libcublasLt_static.a
+
+Android
+
+libcublas.so, libcublasLt.so, libcublas_static.a,
+libcublasLt_static.a
+
+Component
+
+NVIDIA "Drop-in" BLAS Library
+
+Windows
+
+nvblas.dll
+
+Mac OSX
+
+libnvblas.dylib
+
+Linux
+
+libnvblas.so
+
+Component
+
+CUDA Sparse Matrix Library
+
+Windows
+
+cusparse.dll, cusparse.lib
+
+Mac OSX
+
+libcusparse.dylib, libcusparse_static.a
+
+Linux
+
+libcusparse.so, libcusparse_static.a
+
+Android
+
+libcusparse.so, libcusparse_static.a
+
+Component
+
+CUDA Linear Solver Library
+
+Windows
+
+cusolver.dll, cusolver.lib
+
+Mac OSX
+
+libcusolver.dylib, libcusolver_static.a
+
+Linux
+
+libcusolver.so, libcusolver_static.a
+
+Android
+
+libcusolver.so, libcusolver_static.a
+
+Component
+
+CUDA Random Number Generation Library
+
+Windows
+
+curand.dll, curand.lib
+
+Mac OSX
+
+libcurand.dylib, libcurand_static.a
+
+Linux
+
+libcurand.so, libcurand_static.a
+
+Android
+
+libcurand.so, libcurand_static.a
+
+Component
+
+CUDA Accelerated Graph Library
+
+Component
+
+NVIDIA Performance Primitives Library
+
+Windows
+
+nppc.dll, nppc.lib, nppial.dll, nppial.lib, nppicc.dll,
+nppicc.lib, nppicom.dll, nppicom.lib, nppidei.dll,
+nppidei.lib, nppif.dll, nppif.lib, nppig.dll, nppig.lib,
+nppim.dll, nppim.lib, nppist.dll, nppist.lib, nppisu.dll,
+nppisu.lib, nppitc.dll, nppitc.lib, npps.dll, npps.lib
+
+Mac OSX
+
+libnppc.dylib, libnppc_static.a, libnppial.dylib,
+libnppial_static.a, libnppicc.dylib, libnppicc_static.a,
+libnppicom.dylib, libnppicom_static.a, libnppidei.dylib,
+libnppidei_static.a, libnppif.dylib, libnppif_static.a,
+libnppig.dylib, libnppig_static.a, libnppim.dylib,
+libnppisu_static.a, libnppitc.dylib, libnppitc_static.a,
+libnpps.dylib, libnpps_static.a
+
+Linux
+
+libnppc.so, libnppc_static.a, libnppial.so,
+libnppial_static.a, libnppicc.so, libnppicc_static.a,
+libnppicom.so, libnppicom_static.a, libnppidei.so,
+libnppidei_static.a, libnppif.so, libnppif_static.a
+libnppig.so, libnppig_static.a, libnppim.so,
+libnppim_static.a, libnppist.so, libnppist_static.a,
+libnppisu.so, libnppisu_static.a, libnppitc.so
+libnppitc_static.a, libnpps.so, libnpps_static.a
+
+Android
+
+libnppc.so, libnppc_static.a, libnppial.so,
+libnppial_static.a, libnppicc.so, libnppicc_static.a,
+libnppicom.so, libnppicom_static.a, libnppidei.so,
+libnppidei_static.a, libnppif.so, libnppif_static.a
+libnppig.so, libnppig_static.a, libnppim.so,
+libnppim_static.a, libnppist.so, libnppist_static.a,
+libnppisu.so, libnppisu_static.a, libnppitc.so
+libnppitc_static.a, libnpps.so, libnpps_static.a
+
+Component
+
+NVIDIA JPEG Library
+
+Linux
+
+libnvjpeg.so, libnvjpeg_static.a
+
+Component
+
+Internal common library required for statically linking to
+cuBLAS, cuSPARSE, cuFFT, cuRAND, nvJPEG and NPP
+
+Mac OSX
+
+libculibos.a
+
+Linux
+
+libculibos.a
+
+Component
+
+NVIDIA Runtime Compilation Library and Header
+
+All
+
+nvrtc.h
+
+Windows
+
+nvrtc.dll, nvrtc-builtins.dll
+
+Mac OSX
+
+libnvrtc.dylib, libnvrtc-builtins.dylib
+
+Linux
+
+libnvrtc.so, libnvrtc-builtins.so
+
+Component
+
+NVIDIA Optimizing Compiler Library
+
+Windows
+
+nvvm.dll
+
+Mac OSX
+
+libnvvm.dylib
+
+Linux
+
+libnvvm.so
+
+Component
+
+NVIDIA Common Device Math Functions Library
+
+Windows
+
+libdevice.10.bc
+
+Mac OSX
+
+libdevice.10.bc
+
+Linux
+
+libdevice.10.bc
+
+Component
+
+CUDA Occupancy Calculation Header Library
+
+All
+
+cuda_occupancy.h
+
+Component
+
+CUDA Half Precision Headers
+
+All
+
+cuda_fp16.h, cuda_fp16.hpp
+
+Component
+
+CUDA Profiling Tools Interface (CUPTI) Library
+
+Windows
+
+cupti.dll
+
+Mac OSX
+
+libcupti.dylib
+
+Linux
+
+libcupti.so
+
+Component
+
+NVIDIA Tools Extension Library
+
+Windows
+
+nvToolsExt.dll, nvToolsExt.lib
+
+Mac OSX
+
+libnvToolsExt.dylib
+
+Linux
+
+libnvToolsExt.so
+
+Component
+
+NVIDIA CUDA Driver Libraries
+
+Linux
+
+libcuda.so, libnvidia-fatbinaryloader.so,
+libnvidia-ptxjitcompiler.so
+
+The NVIDIA CUDA Driver Libraries are only distributable in
+applications that meet this criteria:
+
+  1. The application was developed starting from a NVIDIA CUDA
+    container obtained from Docker Hub or the NVIDIA GPU
+    Cloud, and
+
+  2. The resulting application is packaged as a Docker
+    container and distributed to users on Docker Hub or the
+    NVIDIA GPU Cloud only.
+
+
+2.7. Attachment B
+
+
+Additional Licensing Obligations
+
+The following third party components included in the SOFTWARE
+are licensed to Licensee pursuant to the following terms and
+conditions:
+
+  1. Licensee's use of the GDB third party component is
+    subject to the terms and conditions of GNU GPL v3:
+
+    This product includes copyrighted third-party software licensed
+    under the terms of the GNU General Public License v3 ("GPL v3").
+    All third-party software packages are copyright by their respective
+    authors. GPL v3 terms and conditions are hereby incorporated into
+    the Agreement by this reference:     http://www.gnu.org/licenses/gpl.txt
+
+    Consistent with these licensing requirements, the software
+    listed below is provided under the terms of the specified
+    open source software licenses. To obtain source code for
+    software provided under licenses that require
+    redistribution of source code, including the GNU General
+    Public License (GPL) and GNU Lesser General Public License
+    (LGPL), contact oss-requests@nvidia.com. This offer is
+    valid for a period of three (3) years from the date of the
+    distribution of this product by NVIDIA CORPORATION.
+
+    Component          License
+    CUDA-GDB           GPL v3
+
+  2. Licensee represents and warrants that any and all third
+    party licensing and/or royalty payment obligations in
+    connection with Licensee's use of the H.264 video codecs
+    are solely the responsibility of Licensee.
+
+  3. Licensee's use of the Thrust library is subject to the
+    terms and conditions of the Apache License Version 2.0.
+    All third-party software packages are copyright by their
+    respective authors. Apache License Version 2.0 terms and
+    conditions are hereby incorporated into the Agreement by
+    this reference.
+    http://www.apache.org/licenses/LICENSE-2.0.html
+
+    In addition, Licensee acknowledges the following notice:
+    Thrust includes source code from the Boost Iterator,
+    Tuple, System, and Random Number libraries.
+
+    Boost Software License - Version 1.0 - August 17th, 2003
+    . . . .
+
+    Permission is hereby granted, free of charge, to any person or
+    organization obtaining a copy of the software and accompanying
+    documentation covered by this license (the "Software") to use,
+    reproduce, display, distribute, execute, and transmit the Software,
+    and to prepare derivative works of the Software, and to permit
+    third-parties to whom the Software is furnished to do so, all
+    subject to the following:
+
+    The copyright notices in the Software and this entire statement,
+    including the above license grant, this restriction and the following
+    disclaimer, must be included in all copies of the Software, in whole
+    or in part, and all derivative works of the Software, unless such
+    copies or derivative works are solely in the form of machine-executable
+    object code generated by a source language processor.
+
+    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+    EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
+    NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR
+    ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES OR
+    OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, ARISING
+    FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+    OTHER DEALINGS IN THE SOFTWARE.
+
+  4. Licensee's use of the LLVM third party component is
+    subject to the following terms and conditions:
+
+    ======================================================
+    LLVM Release License
+    ======================================================
+    University of Illinois/NCSA
+    Open Source License
+
+    Copyright (c) 2003-2010 University of Illinois at Urbana-Champaign.
+    All rights reserved.
+
+    Developed by:
+
+        LLVM Team
+
+        University of Illinois at Urbana-Champaign
+
+        http://llvm.org
+
+    Permission is hereby granted, free of charge, to any person obtaining a copy
+    of this software and associated documentation files (the "Software"), to
+    deal with the Software without restriction, including without limitation the
+    rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+    sell copies of the Software, and to permit persons to whom the Software is
+    furnished to do so, subject to the following conditions:
+
+    *  Redistributions of source code must retain the above copyright notice,
+       this list of conditions and the following disclaimers.
+
+    *  Redistributions in binary form must reproduce the above copyright
+       notice, this list of conditions and the following disclaimers in the
+       documentation and/or other materials provided with the distribution.
+
+    *  Neither the names of the LLVM Team, University of Illinois at Urbana-
+       Champaign, nor the names of its contributors may be used to endorse or
+       promote products derived from this Software without specific prior
+       written permission.
+
+    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+    THE CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+    OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+    ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+    DEALINGS WITH THE SOFTWARE.
+
+  5. Licensee's use (e.g. nvprof) of the PCRE third party
+    component is subject to the following terms and
+    conditions:
+
+    ------------
+    PCRE LICENCE
+    ------------
+    PCRE is a library of functions to support regular expressions whose syntax
+    and semantics are as close as possible to those of the Perl 5 language.
+    Release 8 of PCRE is distributed under the terms of the "BSD" licence, as
+    specified below. The documentation for PCRE, supplied in the "doc"
+    directory, is distributed under the same terms as the software itself. The
+    basic library functions are written in C and are freestanding. Also
+    included in the distribution is a set of C++ wrapper functions, and a just-
+    in-time compiler that can be used to optimize pattern matching. These are
+    both optional features that can be omitted when the library is built.
+
+    THE BASIC LIBRARY FUNCTIONS
+    ---------------------------
+    Written by:       Philip Hazel
+    Email local part: ph10
+    Email domain:     cam.ac.uk
+    University of Cambridge Computing Service,
+    Cambridge, England.
+    Copyright (c) 1997-2012 University of Cambridge
+    All rights reserved.
+
+    PCRE JUST-IN-TIME COMPILATION SUPPORT
+    -------------------------------------
+    Written by:       Zoltan Herczeg
+    Email local part: hzmester
+    Emain domain:     freemail.hu
+    Copyright(c) 2010-2012 Zoltan Herczeg
+    All rights reserved.
+
+    STACK-LESS JUST-IN-TIME COMPILER
+    --------------------------------
+    Written by:       Zoltan Herczeg
+    Email local part: hzmester
+    Emain domain:     freemail.hu
+    Copyright(c) 2009-2012 Zoltan Herczeg
+    All rights reserved.
+
+    THE C++ WRAPPER FUNCTIONS
+    -------------------------
+    Contributed by:   Google Inc.
+    Copyright (c) 2007-2012, Google Inc.
+    All rights reserved.
+
+    THE "BSD" LICENCE
+    -----------------
+    Redistribution and use in source and binary forms, with or without
+    modification, are permitted provided that the following conditions are met:
+
+      * Redistributions of source code must retain the above copyright notice,
+        this list of conditions and the following disclaimer.
+
+      * Redistributions in binary form must reproduce the above copyright
+        notice, this list of conditions and the following disclaimer in the
+        documentation and/or other materials provided with the distribution.
+
+      * Neither the name of the University of Cambridge nor the name of Google
+        Inc. nor the names of their contributors may be used to endorse or
+        promote products derived from this software without specific prior
+        written permission.
+
+    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+    AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+    IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+    ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+    LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+    CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+    SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+    INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+    CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+    ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+    POSSIBILITY OF SUCH DAMAGE.
+
+  6. Some of the cuBLAS library routines were written by or
+    derived from code written by Vasily Volkov and are subject
+    to the Modified Berkeley Software Distribution License as
+    follows:
+
+    Copyright (c) 2007-2009, Regents of the University of California
+
+    All rights reserved.
+
+    Redistribution and use in source and binary forms, with or without
+    modification, are permitted provided that the following conditions are
+    met:
+        * Redistributions of source code must retain the above copyright
+          notice, this list of conditions and the following disclaimer.
+        * Redistributions in binary form must reproduce the above
+          copyright notice, this list of conditions and the following
+          disclaimer in the documentation and/or other materials provided
+          with the distribution.
+        * Neither the name of the University of California, Berkeley nor
+          the names of its contributors may be used to endorse or promote
+          products derived from this software without specific prior
+          written permission.
+
+    THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR
+    IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+    DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
+    INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+    (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+    SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+    STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
+    IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+    POSSIBILITY OF SUCH DAMAGE.
+
+  7. Some of the cuBLAS library routines were written by or
+    derived from code written by Davide Barbieri and are
+    subject to the Modified Berkeley Software Distribution
+    License as follows:
+
+    Copyright (c) 2008-2009 Davide Barbieri @ University of Rome Tor Vergata.
+
+    All rights reserved.
+
+    Redistribution and use in source and binary forms, with or without
+    modification, are permitted provided that the following conditions are
+    met:
+        * Redistributions of source code must retain the above copyright
+          notice, this list of conditions and the following disclaimer.
+        * Redistributions in binary form must reproduce the above
+          copyright notice, this list of conditions and the following
+          disclaimer in the documentation and/or other materials provided
+          with the distribution.
+        * The name of the author may not be used to endorse or promote
+          products derived from this software without specific prior
+          written permission.
+
+    THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR
+    IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+    DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
+    INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+    (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+    SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+    STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
+    IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+    POSSIBILITY OF SUCH DAMAGE.
+
+  8. Some of the cuBLAS library routines were derived from
+    code developed by the University of Tennessee and are
+    subject to the Modified Berkeley Software Distribution
+    License as follows:
+
+    Copyright (c) 2010 The University of Tennessee.
+
+    All rights reserved.
+
+    Redistribution and use in source and binary forms, with or without
+    modification, are permitted provided that the following conditions are
+    met:
+        * Redistributions of source code must retain the above copyright
+          notice, this list of conditions and the following disclaimer.
+        * Redistributions in binary form must reproduce the above
+          copyright notice, this list of conditions and the following
+          disclaimer listed in this license in the documentation and/or
+          other materials provided with the distribution.
+        * Neither the name of the copyright holders nor the names of its
+          contributors may be used to endorse or promote products derived
+          from this software without specific prior written permission.
+
+    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+    "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+    LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+    A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+    OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+    SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+    LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+    DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+    THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+    (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+    OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+  9. Some of the cuBLAS library routines were written by or
+    derived from code written by Jonathan Hogg and are subject
+    to the Modified Berkeley Software Distribution License as
+    follows:
+
+    Copyright (c) 2012, The Science and Technology Facilities Council (STFC).
+
+    All rights reserved.
+
+    Redistribution and use in source and binary forms, with or without
+    modification, are permitted provided that the following conditions are
+    met:
+        * Redistributions of source code must retain the above copyright
+          notice, this list of conditions and the following disclaimer.
+        * Redistributions in binary form must reproduce the above
+          copyright notice, this list of conditions and the following
+          disclaimer in the documentation and/or other materials provided
+          with the distribution.
+        * Neither the name of the STFC nor the names of its contributors
+          may be used to endorse or promote products derived from this
+          software without specific prior written permission.
+
+    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+    "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+    LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+    A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE STFC BE
+    LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+    CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+    SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+    BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+    WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+    OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+    IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+  10. Some of the cuBLAS library routines were written by or
+    derived from code written by Ahmad M. Abdelfattah, David
+    Keyes, and Hatem Ltaief, and are subject to the Apache
+    License, Version 2.0, as follows:
+
+     -- (C) Copyright 2013 King Abdullah University of Science and Technology
+      Authors:
+      Ahmad Abdelfattah (ahmad.ahmad@kaust.edu.sa)
+      David Keyes (david.keyes@kaust.edu.sa)
+      Hatem Ltaief (hatem.ltaief@kaust.edu.sa)
+
+      Redistribution  and  use  in  source and binary forms, with or without
+      modification,  are  permitted  provided  that the following conditions
+      are met:
+
+      * Redistributions  of  source  code  must  retain  the above copyright
+        notice,  this  list  of  conditions  and  the  following  disclaimer.
+      * Redistributions  in  binary  form must reproduce the above copyright
+        notice,  this list of conditions and the following disclaimer in the
+        documentation  and/or other materials provided with the distribution.
+      * Neither  the  name of the King Abdullah University of Science and
+        Technology nor the names of its contributors may be used to endorse
+        or promote products derived from this software without specific prior
+        written permission.
+
+      THIS  SOFTWARE  IS  PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+      ``AS IS''  AND  ANY  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+      LIMITED  TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+      A  PARTICULAR  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+      HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+      SPECIAL,  EXEMPLARY,  OR  CONSEQUENTIAL  DAMAGES  (INCLUDING,  BUT NOT
+      LIMITED  TO,  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+      DATA,  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+      THEORY  OF  LIABILITY,  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+      (INCLUDING  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+      OF  THIS  SOFTWARE,  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+
+  11. Some of the cuSPARSE library routines were written by or
+    derived from code written by Li-Wen Chang and are subject
+    to the NCSA Open Source License as follows:
+
+    Copyright (c) 2012, University of Illinois.
+
+    All rights reserved.
+
+    Developed by: IMPACT Group, University of Illinois, http://impact.crhc.illinois.edu
+
+    Permission is hereby granted, free of charge, to any person obtaining
+    a copy of this software and associated documentation files (the
+    "Software"), to deal with the Software without restriction, including
+    without limitation the rights to use, copy, modify, merge, publish,
+    distribute, sublicense, and/or sell copies of the Software, and to
+    permit persons to whom the Software is furnished to do so, subject to
+    the following conditions:
+        * Redistributions of source code must retain the above copyright
+          notice, this list of conditions and the following disclaimer.
+        * Redistributions in binary form must reproduce the above
+          copyright notice, this list of conditions and the following
+          disclaimers in the documentation and/or other materials provided
+          with the distribution.
+        * Neither the names of IMPACT Group, University of Illinois, nor
+          the names of its contributors may be used to endorse or promote
+          products derived from this Software without specific prior
+          written permission.
+
+    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+    EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+    NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS OR COPYRIGHT
+    HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+    IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
+    IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE
+    SOFTWARE.
+
+  12. Some of the cuRAND library routines were written by or
+    derived from code written by Mutsuo Saito and Makoto
+    Matsumoto and are subject to the following license:
+
+    Copyright (c) 2009, 2010 Mutsuo Saito, Makoto Matsumoto and Hiroshima
+    University. All rights reserved.
+
+    Copyright (c) 2011 Mutsuo Saito, Makoto Matsumoto, Hiroshima
+    University and University of Tokyo.  All rights reserved.
+
+    Redistribution and use in source and binary forms, with or without
+    modification, are permitted provided that the following conditions are
+    met:
+        * Redistributions of source code must retain the above copyright
+          notice, this list of conditions and the following disclaimer.
+        * Redistributions in binary form must reproduce the above
+          copyright notice, this list of conditions and the following
+          disclaimer in the documentation and/or other materials provided
+          with the distribution.
+        * Neither the name of the Hiroshima University nor the names of
+          its contributors may be used to endorse or promote products
+          derived from this software without specific prior written
+          permission.
+
+    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+    "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+    LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+    A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+    OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+    SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+    LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+    DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+    THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+    (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+    OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+  13. Some of the cuRAND library routines were derived from
+    code developed by D. E. Shaw Research and are subject to
+    the following license:
+
+    Copyright 2010-2011, D. E. Shaw Research.
+
+    All rights reserved.
+
+    Redistribution and use in source and binary forms, with or without
+    modification, are permitted provided that the following conditions are
+    met:
+        * Redistributions of source code must retain the above copyright
+          notice, this list of conditions, and the following disclaimer.
+        * Redistributions in binary form must reproduce the above
+          copyright notice, this list of conditions, and the following
+          disclaimer in the documentation and/or other materials provided
+          with the distribution.
+        * Neither the name of D. E. Shaw Research nor the names of its
+          contributors may be used to endorse or promote products derived
+          from this software without specific prior written permission.
+
+    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+    "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+    LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+    A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+    OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+    SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+    LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+    DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+    THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+    (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+    OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+  14. Some of the Math library routines were written by or
+    derived from code developed by Norbert Juffa and are
+    subject to the following license:
+
+    Copyright (c) 2015-2017, Norbert Juffa
+    All rights reserved.
+
+    Redistribution and use in source and binary forms, with or without
+    modification, are permitted provided that the following conditions
+    are met:
+
+    1. Redistributions of source code must retain the above copyright
+       notice, this list of conditions and the following disclaimer.
+
+    2. Redistributions in binary form must reproduce the above copyright
+       notice, this list of conditions and the following disclaimer in the
+       documentation and/or other materials provided with the distribution.
+
+    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+    "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+    LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+    A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+    HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+    SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+    LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+    DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+    THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+    (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+    OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+  15. Licensee's use of the lz4 third party component is
+    subject to the following terms and conditions:
+
+    Copyright (C) 2011-2013, Yann Collet.
+    BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php)
+
+    Redistribution and use in source and binary forms, with or without
+    modification, are permitted provided that the following conditions are
+    met:
+
+        * Redistributions of source code must retain the above copyright
+    notice, this list of conditions and the following disclaimer.
+        * Redistributions in binary form must reproduce the above
+    copyright notice, this list of conditions and the following disclaimer
+    in the documentation and/or other materials provided with the
+    distribution.
+
+    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+    "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+    LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+    A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+    OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+    SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+    LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+    DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+    THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+    (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+    OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+  16. The NPP library uses code from the Boost Math Toolkit,
+    and is subject to the following license:
+
+    Boost Software License - Version 1.0 - August 17th, 2003
+    . . . .
+
+    Permission is hereby granted, free of charge, to any person or
+    organization obtaining a copy of the software and accompanying
+    documentation covered by this license (the "Software") to use,
+    reproduce, display, distribute, execute, and transmit the Software,
+    and to prepare derivative works of the Software, and to permit
+    third-parties to whom the Software is furnished to do so, all
+    subject to the following:
+
+    The copyright notices in the Software and this entire statement,
+    including the above license grant, this restriction and the following
+    disclaimer, must be included in all copies of the Software, in whole
+    or in part, and all derivative works of the Software, unless such
+    copies or derivative works are solely in the form of machine-executable
+    object code generated by a source language processor.
+
+    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+    EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
+    NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR
+    ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES OR
+    OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, ARISING
+    FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+    OTHER DEALINGS IN THE SOFTWARE.
+
+  17. Portions of the Nsight Eclipse Edition is subject to the
+    following license:
+
+    The Eclipse Foundation makes available all content in this plug-in
+    ("Content"). Unless otherwise indicated below, the Content is provided
+    to you under the terms and conditions of the Eclipse Public License
+    Version 1.0 ("EPL"). A copy of the EPL is available at http://
+    www.eclipse.org/legal/epl-v10.html. For purposes of the EPL, "Program"
+    will mean the Content.
+
+    If you did not receive this Content directly from the Eclipse
+    Foundation, the Content is being redistributed by another party
+    ("Redistributor") and different terms and conditions may apply to your
+    use of any object code in the Content. Check the Redistributor's
+    license that was provided with the Content. If no such license exists,
+    contact the Redistributor. Unless otherwise indicated below, the terms
+    and conditions of the EPL still apply to any source code in the
+    Content and such source code may be obtained at http://www.eclipse.org.
+
+  18. Some of the cuBLAS library routines uses code from
+    OpenAI, which is subject to the following license:
+
+    License URL
+    https://github.com/openai/openai-gemm/blob/master/LICENSE
+
+    License Text
+    The MIT License
+
+    Copyright (c) 2016 OpenAI (http://openai.com), 2016 Google Inc.
+
+    Permission is hereby granted, free of charge, to any person obtaining a copy
+    of this software and associated documentation files (the "Software"), to deal
+    in the Software without restriction, including without limitation the rights
+    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+    copies of the Software, and to permit persons to whom the Software is
+    furnished to do so, subject to the following conditions:
+
+    The above copyright notice and this permission notice shall be included in
+    all copies or substantial portions of the Software.
+
+    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+    THE SOFTWARE.
+
+  19. Licensee's use of the Visual Studio Setup Configuration
+    Samples is subject to the following license:
+
+    The MIT License (MIT)
+    Copyright (C) Microsoft Corporation. All rights reserved.
+
+    Permission is hereby granted, free of charge, to any person
+    obtaining a copy of this software and associated documentation
+    files (the "Software"), to deal in the Software without restriction,
+    including without limitation the rights to use, copy, modify, merge,
+    publish, distribute, sublicense, and/or sell copies of the Software,
+    and to permit persons to whom the Software is furnished to do so,
+    subject to the following conditions:
+
+    The above copyright notice and this permission notice shall be included
+    in all copies or substantial portions of the Software.
+
+    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+    OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+  20. Licensee's use of linmath.h header for CPU functions for
+    GL vector/matrix operations from lunarG is subject to the
+    Apache License Version 2.0.
+
+  21. The DX12-CUDA sample uses the d3dx12.h header, which is
+    subject to the MIT license .
+
+-----------------
diff --git a/lib/python3.12/site-packages/nvidia_nvtx_cu12-12.4.127.dist-info/METADATA b/lib/python3.12/site-packages/nvidia_nvtx_cu12-12.4.127.dist-info/METADATA
new file mode 100644
index 0000000000000000000000000000000000000000..be77ebbf5aeb12d47b5cb0a0afe85c4ca023b793
--- /dev/null
+++ b/lib/python3.12/site-packages/nvidia_nvtx_cu12-12.4.127.dist-info/METADATA
@@ -0,0 +1,35 @@
+Metadata-Version: 2.1
+Name: nvidia-nvtx-cu12
+Version: 12.4.127
+Summary: NVIDIA Tools Extension
+Home-page: https://developer.nvidia.com/cuda-zone
+Author: Nvidia CUDA Installer Team
+Author-email: cuda_installer@nvidia.com
+License: NVIDIA Proprietary Software
+Keywords: cuda,nvidia,runtime,machine learning,deep learning
+Classifier: Development Status :: 4 - Beta
+Classifier: Intended Audience :: Developers
+Classifier: Intended Audience :: Education
+Classifier: Intended Audience :: Science/Research
+Classifier: License :: Other/Proprietary License
+Classifier: Natural Language :: English
+Classifier: Programming Language :: Python :: 3
+Classifier: Programming Language :: Python :: 3.5
+Classifier: Programming Language :: Python :: 3.6
+Classifier: Programming Language :: Python :: 3.7
+Classifier: Programming Language :: Python :: 3.8
+Classifier: Programming Language :: Python :: 3.9
+Classifier: Programming Language :: Python :: 3.10
+Classifier: Programming Language :: Python :: 3.11
+Classifier: Programming Language :: Python :: 3 :: Only
+Classifier: Topic :: Scientific/Engineering
+Classifier: Topic :: Scientific/Engineering :: Mathematics
+Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
+Classifier: Topic :: Software Development
+Classifier: Topic :: Software Development :: Libraries
+Classifier: Operating System :: Microsoft :: Windows
+Classifier: Operating System :: POSIX :: Linux
+Requires-Python: >=3
+License-File: License.txt
+
+A C-based API for annotating events, code ranges, and resources in your applications. Applications which integrate NVTX can use the Visual Profiler to capture and visualize these events and ranges.
diff --git a/lib/python3.12/site-packages/nvidia_nvtx_cu12-12.4.127.dist-info/RECORD b/lib/python3.12/site-packages/nvidia_nvtx_cu12-12.4.127.dist-info/RECORD
new file mode 100644
index 0000000000000000000000000000000000000000..472ba07974431f1a6f316b38d8542c7878fb7cfb
--- /dev/null
+++ b/lib/python3.12/site-packages/nvidia_nvtx_cu12-12.4.127.dist-info/RECORD
@@ -0,0 +1,37 @@
+nvidia/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
+nvidia/__pycache__/__init__.cpython-312.pyc,,
+nvidia/nvtx/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
+nvidia/nvtx/__pycache__/__init__.cpython-312.pyc,,
+nvidia/nvtx/include/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
+nvidia/nvtx/include/__pycache__/__init__.cpython-312.pyc,,
+nvidia/nvtx/include/nvToolsExt.h,sha256=OiT6v1G2-vlkYnpDQZjiGT1O-THDyk1gw2021qMRvQM,53680
+nvidia/nvtx/include/nvToolsExtCuda.h,sha256=UDA1pbmvoRFmlJ11Et9tIMEztOtOVw-10mO27Q6K8jg,6009
+nvidia/nvtx/include/nvToolsExtCudaRt.h,sha256=6IbgdRGObly53jzRqvsZ4FQoTrXJOJwSyCOLuXr9ncA,5192
+nvidia/nvtx/include/nvToolsExtOpenCL.h,sha256=gETZH9ch_o6MYE_BYQ2pj9SSuxyAo1H4ptmRK-DMWSo,8360
+nvidia/nvtx/include/nvToolsExtSync.h,sha256=wqONIiycUPaUUCzQBmCippilgKt8sOL9tpzG773u0nY,14562
+nvidia/nvtx/include/nvtx3/nvToolsExt.h,sha256=TFEF3fx1043EwMdbS7FqvvavwK0koZeGrIOAsCrB12s,52247
+nvidia/nvtx/include/nvtx3/nvToolsExtCuda.h,sha256=4ZbZHUMcmHRf4SdKB7nH0E3uHd_9ZhZBuwuWPItK-Vs,6204
+nvidia/nvtx/include/nvtx3/nvToolsExtCudaRt.h,sha256=boW0zdYobNFFE9wwxCyzBGBLcSGtdbQ5osKjQGNC2E8,5393
+nvidia/nvtx/include/nvtx3/nvToolsExtOpenCL.h,sha256=RPfsZl3lHAPIOCzTipmz07-vaiIO4cxelcx12EjB2L0,8563
+nvidia/nvtx/include/nvtx3/nvToolsExtSync.h,sha256=C-HIVBaupxYom3BqMggQ_ePq1bxFhw8kXsOfYJKBWrI,14756
+nvidia/nvtx/include/nvtx3/nvtxDetail/nvtxImpl.h,sha256=jEnYF3MyLsD72euw2It3Bz0X0GK4Xv_htEd8BeIrPjY,23333
+nvidia/nvtx/include/nvtx3/nvtxDetail/nvtxImplCore.h,sha256=sYpWqZfYrjsMddxtezPX3qSTIbAOn4dlEoLiYQ9M2nM,9756
+nvidia/nvtx/include/nvtx3/nvtxDetail/nvtxImplCudaRt_v3.h,sha256=SoaiprvsI80yLmEAnlFX0iFufv6RtKjjMMrVwQZjjQI,4775
+nvidia/nvtx/include/nvtx3/nvtxDetail/nvtxImplCuda_v3.h,sha256=IEor-ISqComCRGVDdIzKBLU3eWCuDI0Igqz-eRKKcvg,5550
+nvidia/nvtx/include/nvtx3/nvtxDetail/nvtxImplOpenCL_v3.h,sha256=iPR2x74bJE3plFQBT9FWGBaTm4sC-Pll6WAjpKRnz7g,8275
+nvidia/nvtx/include/nvtx3/nvtxDetail/nvtxImplSync_v3.h,sha256=TqwQfEUVbwc58bpHioE13NMweFhOuHXNql65BnLzhvc,5022
+nvidia/nvtx/include/nvtx3/nvtxDetail/nvtxInit.h,sha256=foajOFacvLGx3BN5ntw5v8o4J3OY4hqkVZE5ZC0x3e4,14716
+nvidia/nvtx/include/nvtx3/nvtxDetail/nvtxInitDecls.h,sha256=-Qyxcy9CDXOBhEtYZ8L7iYd6daJ9aCeyQM48X0BafMM,9361
+nvidia/nvtx/include/nvtx3/nvtxDetail/nvtxInitDefs.h,sha256=dLhOV4knhNrmT2DnUNzXreOt_Qc6GAa3yIlmqJFCeVI,35432
+nvidia/nvtx/include/nvtx3/nvtxDetail/nvtxLinkOnce.h,sha256=Jp-z6LTz_p8fKRulcFfdcskIxzcZ6ybbHkGB9mpJa2M,3863
+nvidia/nvtx/include/nvtx3/nvtxDetail/nvtxTypes.h,sha256=jkbCwyvIP1G-Ef8SwYp4kDi69hjZbzaxKSk7ScgrNI8,17352
+nvidia/nvtx/lib/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
+nvidia/nvtx/lib/__pycache__/__init__.cpython-312.pyc,,
+nvidia/nvtx/lib/libnvToolsExt.so.1,sha256=hH148nXIzJdEKieAcyBL3BoACf_CVZv3JIxw2SEF39w,40136
+nvidia_nvtx_cu12-12.4.127.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
+nvidia_nvtx_cu12-12.4.127.dist-info/License.txt,sha256=rW9YU_ugyg0VnQ9Y1JrkmDDC-Mk_epJki5zpCttMbM0,59262
+nvidia_nvtx_cu12-12.4.127.dist-info/METADATA,sha256=9RLXm3hRj_WuKLEP5eYxTAhsLGAeFt3LoHymjVqrI7I,1660
+nvidia_nvtx_cu12-12.4.127.dist-info/RECORD,,
+nvidia_nvtx_cu12-12.4.127.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
+nvidia_nvtx_cu12-12.4.127.dist-info/WHEEL,sha256=XDTs3wIbcE-BcRO08VJlZpA6z9OaC1mOKPCGGGwuM2g,109
+nvidia_nvtx_cu12-12.4.127.dist-info/top_level.txt,sha256=fTkAtiFuL16nUrB9ytDDtpytz2t0B4NvYTnRzwAhO14,7
diff --git a/lib/python3.12/site-packages/nvidia_nvtx_cu12-12.4.127.dist-info/REQUESTED b/lib/python3.12/site-packages/nvidia_nvtx_cu12-12.4.127.dist-info/REQUESTED
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/lib/python3.12/site-packages/nvidia_nvtx_cu12-12.4.127.dist-info/WHEEL b/lib/python3.12/site-packages/nvidia_nvtx_cu12-12.4.127.dist-info/WHEEL
new file mode 100644
index 0000000000000000000000000000000000000000..e6c30e957cfb045017a9fef3430bb8ee87c4a074
--- /dev/null
+++ b/lib/python3.12/site-packages/nvidia_nvtx_cu12-12.4.127.dist-info/WHEEL
@@ -0,0 +1,5 @@
+Wheel-Version: 1.0
+Generator: bdist_wheel (0.42.0)
+Root-Is-Purelib: true
+Tag: py3-none-manylinux2014_x86_64
+
diff --git a/lib/python3.12/site-packages/nvidia_nvtx_cu12-12.4.127.dist-info/top_level.txt b/lib/python3.12/site-packages/nvidia_nvtx_cu12-12.4.127.dist-info/top_level.txt
new file mode 100644
index 0000000000000000000000000000000000000000..862f7abf232cdfbb928609856247292e81c9decb
--- /dev/null
+++ b/lib/python3.12/site-packages/nvidia_nvtx_cu12-12.4.127.dist-info/top_level.txt
@@ -0,0 +1 @@
+nvidia
diff --git a/lib/python3.12/site-packages/propcache-0.4.1.dist-info/INSTALLER b/lib/python3.12/site-packages/propcache-0.4.1.dist-info/INSTALLER
new file mode 100644
index 0000000000000000000000000000000000000000..a1b589e38a32041e49332e5e81c2d363dc418d68
--- /dev/null
+++ b/lib/python3.12/site-packages/propcache-0.4.1.dist-info/INSTALLER
@@ -0,0 +1 @@
+pip
diff --git a/lib/python3.12/site-packages/propcache-0.4.1.dist-info/METADATA b/lib/python3.12/site-packages/propcache-0.4.1.dist-info/METADATA
new file mode 100644
index 0000000000000000000000000000000000000000..0dd40dc641c0966fad791870ee6bb0f5aa21d131
--- /dev/null
+++ b/lib/python3.12/site-packages/propcache-0.4.1.dist-info/METADATA
@@ -0,0 +1,443 @@
+Metadata-Version: 2.4
+Name: propcache
+Version: 0.4.1
+Summary: Accelerated property cache
+Home-page: https://github.com/aio-libs/propcache
+Author: Andrew Svetlov
+Author-email: andrew.svetlov@gmail.com
+Maintainer: aiohttp team 
+Maintainer-email: team@aiohttp.org
+License: Apache-2.0
+Project-URL: Chat: Matrix, https://matrix.to/#/#aio-libs:matrix.org
+Project-URL: Chat: Matrix Space, https://matrix.to/#/#aio-libs-space:matrix.org
+Project-URL: CI: GitHub Workflows, https://github.com/aio-libs/propcache/actions?query=branch:master
+Project-URL: Code of Conduct, https://github.com/aio-libs/.github/blob/master/CODE_OF_CONDUCT.md
+Project-URL: Coverage: codecov, https://codecov.io/github/aio-libs/propcache
+Project-URL: Docs: Changelog, https://propcache.readthedocs.io/en/latest/changes/
+Project-URL: Docs: RTD, https://propcache.readthedocs.io
+Project-URL: GitHub: issues, https://github.com/aio-libs/propcache/issues
+Project-URL: GitHub: repo, https://github.com/aio-libs/propcache
+Keywords: cython,cext,propcache
+Classifier: Development Status :: 5 - Production/Stable
+Classifier: Intended Audience :: Developers
+Classifier: License :: OSI Approved :: Apache Software License
+Classifier: Programming Language :: Cython
+Classifier: Programming Language :: Python
+Classifier: Programming Language :: Python :: 3
+Classifier: Programming Language :: Python :: 3.9
+Classifier: Programming Language :: Python :: 3.10
+Classifier: Programming Language :: Python :: 3.11
+Classifier: Programming Language :: Python :: 3.12
+Classifier: Programming Language :: Python :: 3.13
+Classifier: Programming Language :: Python :: 3.14
+Classifier: Topic :: Internet :: WWW/HTTP
+Classifier: Topic :: Software Development :: Libraries :: Python Modules
+Requires-Python: >=3.9
+Description-Content-Type: text/x-rst
+License-File: LICENSE
+License-File: NOTICE
+Dynamic: license-file
+
+propcache
+=========
+
+The module provides a fast implementation of cached properties for Python 3.9+.
+
+.. image:: https://github.com/aio-libs/propcache/actions/workflows/ci-cd.yml/badge.svg
+  :target: https://github.com/aio-libs/propcache/actions?query=workflow%3ACI
+  :align: right
+
+.. image:: https://codecov.io/gh/aio-libs/propcache/branch/master/graph/badge.svg
+  :target: https://codecov.io/gh/aio-libs/propcache
+
+.. image:: https://badge.fury.io/py/propcache.svg
+    :target: https://badge.fury.io/py/propcache
+
+
+.. image:: https://readthedocs.org/projects/propcache/badge/?version=latest
+    :target: https://propcache.readthedocs.io
+
+
+.. image:: https://img.shields.io/pypi/pyversions/propcache.svg
+    :target: https://pypi.python.org/pypi/propcache
+
+.. image:: https://img.shields.io/matrix/aio-libs:matrix.org?label=Discuss%20on%20Matrix%20at%20%23aio-libs%3Amatrix.org&logo=matrix&server_fqdn=matrix.org&style=flat
+   :target: https://matrix.to/#/%23aio-libs:matrix.org
+   :alt: Matrix Room — #aio-libs:matrix.org
+
+.. image:: https://img.shields.io/matrix/aio-libs-space:matrix.org?label=Discuss%20on%20Matrix%20at%20%23aio-libs-space%3Amatrix.org&logo=matrix&server_fqdn=matrix.org&style=flat
+   :target: https://matrix.to/#/%23aio-libs-space:matrix.org
+   :alt: Matrix Space — #aio-libs-space:matrix.org
+
+Introduction
+------------
+
+The API is designed to be nearly identical to the built-in ``functools.cached_property`` class,
+except for the additional ``under_cached_property`` class which uses ``self._cache``
+instead of ``self.__dict__`` to store the cached values and prevents ``__set__`` from being called.
+
+For full documentation please read https://propcache.readthedocs.io.
+
+Installation
+------------
+
+::
+
+   $ pip install propcache
+
+The library is Python 3 only!
+
+PyPI contains binary wheels for Linux, Windows and MacOS.  If you want to install
+``propcache`` on another operating system where wheels are not provided,
+the the tarball will be used to compile the library from
+the source code. It requires a C compiler and and Python headers installed.
+
+To skip the compilation you must explicitly opt-in by using a PEP 517
+configuration setting ``pure-python``, or setting the ``PROPCACHE_NO_EXTENSIONS``
+environment variable to a non-empty value, e.g.:
+
+.. code-block:: console
+
+   $ pip install propcache --config-settings=pure-python=false
+
+Please note that the pure-Python (uncompiled) version is much slower. However,
+PyPy always uses a pure-Python implementation, and, as such, it is unaffected
+by this variable.
+
+
+API documentation
+------------------
+
+The documentation is located at https://propcache.readthedocs.io.
+
+Source code
+-----------
+
+The project is hosted on GitHub_
+
+Please file an issue on the `bug tracker
+`_ if you have found a bug
+or have some suggestion in order to improve the library.
+
+Discussion list
+---------------
+
+*aio-libs* google group: https://groups.google.com/forum/#!forum/aio-libs
+
+Feel free to post your questions and ideas here.
+
+
+Authors and License
+-------------------
+
+The ``propcache`` package is derived from ``yarl`` which is written by Andrew Svetlov.
+
+It's *Apache 2* licensed and freely available.
+
+
+.. _GitHub: https://github.com/aio-libs/propcache
+
+=========
+Changelog
+=========
+
+..
+    You should *NOT* be adding new change log entries to this file, this
+    file is managed by towncrier. You *may* edit previous change logs to
+    fix problems like typo corrections or such.
+    To add a new change log entry, please see
+    https://pip.pypa.io/en/latest/development/#adding-a-news-entry
+    we named the news folder "changes".
+
+    WARNING: Don't drop the next directive!
+
+.. towncrier release notes start
+
+0.4.1
+=====
+
+*(2025-10-08)*
+
+
+Bug fixes
+---------
+
+- Fixed reference leak caused by ``Py_INCREF`` because Cython has its own reference counter systems -- by `@Vizonex `__.
+
+  *Related issues and pull requests on GitHub:*
+  `#162 `__.
+
+
+Contributor-facing changes
+--------------------------
+
+- Fixes the default value for the ``os``
+  parameter in ``reusable-build-wheel.yml``
+  to be ``ubuntu-latest`` instead of
+  ``ubuntu``.
+
+  *Related issues and pull requests on GitHub:*
+  `#155 `__.
+
+
+----
+
+
+0.4.0
+=====
+
+*(2025-10-04)*
+
+
+Features
+--------
+
+- Optimized propcache by replacing sentinel ``object`` for checking if
+  the ``object`` is ``NULL`` and changed ``dict`` API for
+  Python C-API -- by `@Vizonex `__.
+
+  *Related issues and pull requests on GitHub:*
+  `#121 `__.
+
+
+Contributor-facing changes
+--------------------------
+
+- Builds have been added for arm64 Windows
+  wheels and the ``reusable-build-wheel.yml``
+  workflow has been modified to allow for
+  an OS value (``windows-11-arm``) which
+  does not include the ``-latest`` postfix
+  -- by `@finnagin `__.
+
+  *Related issues and pull requests on GitHub:*
+  `#133 `__.
+
+- Added CI for CPython 3.14 -- by `@kumaraditya303 `__.
+
+  *Related issues and pull requests on GitHub:*
+  `#140 `__.
+
+
+----
+
+
+0.3.2
+=====
+
+*(2025-06-09)*
+
+
+Improved documentation
+----------------------
+
+- Fixed incorrect decorator usage in the ``~propcache.api.under_cached_property`` example code -- by `@meanmail `__.
+
+  *Related issues and pull requests on GitHub:*
+  `#109 `__.
+
+
+Packaging updates and notes for downstreams
+-------------------------------------------
+
+- Updated to use Cython 3.1 universally across the build path -- by `@lysnikolaou `__.
+
+  *Related issues and pull requests on GitHub:*
+  `#117 `__.
+
+- Made Cython line tracing opt-in via the ``with-cython-tracing`` build config setting -- by `@bdraco `__.
+
+  Previously, line tracing was enabled by default in ``pyproject.toml``, which caused build issues for some users and made wheels nearly twice as slow.
+
+  Now line tracing is only enabled when explicitly requested via ``pip install . --config-setting=with-cython-tracing=true`` or by setting the ``PROPCACHE_CYTHON_TRACING`` environment variable.
+
+  *Related issues and pull requests on GitHub:*
+  `#118 `__.
+
+
+----
+
+
+0.3.1
+=====
+
+*(2025-03-25)*
+
+
+Bug fixes
+---------
+
+- Improved typing annotations, fixing some type errors under correct usage
+  and improving typing robustness generally -- by `@Dreamsorcerer `__.
+
+  *Related issues and pull requests on GitHub:*
+  `#103 `__.
+
+
+----
+
+
+0.3.0
+=====
+
+*(2025-02-20)*
+
+
+Features
+--------
+
+- Implemented support for the free-threaded build of CPython 3.13 -- by `@lysnikolaou `__.
+
+  *Related issues and pull requests on GitHub:*
+  `#84 `__.
+
+
+Packaging updates and notes for downstreams
+-------------------------------------------
+
+- Started building wheels for the free-threaded build of CPython 3.13 -- by `@lysnikolaou `__.
+
+  *Related issues and pull requests on GitHub:*
+  `#84 `__.
+
+
+Contributor-facing changes
+--------------------------
+
+- GitHub Actions CI/CD is now configured to manage caching pip-ecosystem
+  dependencies using `re-actors/cache-python-deps`_ -- an action by
+  `@webknjaz `__ that takes into account ABI stability and the exact
+  version of Python runtime.
+
+  .. _`re-actors/cache-python-deps`:
+     https://github.com/marketplace/actions/cache-python-deps
+
+  *Related issues and pull requests on GitHub:*
+  `#93 `__.
+
+
+----
+
+
+0.2.1
+=====
+
+*(2024-12-01)*
+
+
+Bug fixes
+---------
+
+- Stopped implicitly allowing the use of Cython pre-release versions when
+  building the distribution package -- by `@ajsanchezsanz `__ and
+  `@markgreene74 `__.
+
+  *Related commits on GitHub:*
+  `64df0a6 `__.
+
+- Fixed ``wrapped`` and ``func`` not being accessible in the Cython versions of ``propcache.api.cached_property`` and ``propcache.api.under_cached_property`` decorators -- by `@bdraco `__.
+
+  *Related issues and pull requests on GitHub:*
+  `#72 `__.
+
+
+Removals and backward incompatible breaking changes
+---------------------------------------------------
+
+- Removed support for Python 3.8 as it has reached end of life -- by `@bdraco `__.
+
+  *Related issues and pull requests on GitHub:*
+  `#57 `__.
+
+
+Packaging updates and notes for downstreams
+-------------------------------------------
+
+- Stopped implicitly allowing the use of Cython pre-release versions when
+  building the distribution package -- by `@ajsanchezsanz `__ and
+  `@markgreene74 `__.
+
+  *Related commits on GitHub:*
+  `64df0a6 `__.
+
+
+----
+
+
+0.2.0
+=====
+
+*(2024-10-07)*
+
+
+Bug fixes
+---------
+
+- Fixed loading the C-extensions on Python 3.8 -- by `@bdraco `__.
+
+  *Related issues and pull requests on GitHub:*
+  `#26 `__.
+
+
+Features
+--------
+
+- Improved typing for the ``propcache.api.under_cached_property`` decorator -- by `@bdraco `__.
+
+  *Related issues and pull requests on GitHub:*
+  `#38 `__.
+
+
+Improved documentation
+----------------------
+
+- Added API documentation for the ``propcache.api.cached_property`` and ``propcache.api.under_cached_property`` decorators -- by `@bdraco `__.
+
+  *Related issues and pull requests on GitHub:*
+  `#16 `__.
+
+
+Packaging updates and notes for downstreams
+-------------------------------------------
+
+- Moved ``propcache.api.under_cached_property`` and ``propcache.api.cached_property`` to `propcache.api` -- by `@bdraco `__.
+
+  Both decorators remain importable from the top-level package, however importing from `propcache.api` is now the recommended way to use them.
+
+  *Related issues and pull requests on GitHub:*
+  `#19 `__, `#24 `__, `#32 `__.
+
+- Converted project to use a src layout -- by `@bdraco `__.
+
+  *Related issues and pull requests on GitHub:*
+  `#22 `__, `#29 `__, `#37 `__.
+
+
+----
+
+
+0.1.0
+=====
+
+*(2024-10-03)*
+
+
+Features
+--------
+
+- Added ``armv7l`` wheels -- by `@bdraco `__.
+
+  *Related issues and pull requests on GitHub:*
+  `#5 `__.
+
+
+----
+
+
+0.0.0
+=====
+
+*(2024-10-02)*
+
+
+- Initial release.
diff --git a/lib/python3.12/site-packages/propcache-0.4.1.dist-info/RECORD b/lib/python3.12/site-packages/propcache-0.4.1.dist-info/RECORD
new file mode 100644
index 0000000000000000000000000000000000000000..ce2a41273105db9665891cf1c08369475732ad9f
--- /dev/null
+++ b/lib/python3.12/site-packages/propcache-0.4.1.dist-info/RECORD
@@ -0,0 +1,18 @@
+propcache-0.4.1.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
+propcache-0.4.1.dist-info/METADATA,sha256=_CPzxSszbVM1zQU_R9kf9jFpSeZa0fHj38zVKE9Nbs4,13745
+propcache-0.4.1.dist-info/RECORD,,
+propcache-0.4.1.dist-info/WHEEL,sha256=DxRnWQz-Kp9-4a4hdDHsSv0KUC3H7sN9Nbef3-8RjXU,190
+propcache-0.4.1.dist-info/licenses/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
+propcache-0.4.1.dist-info/licenses/NOTICE,sha256=VtasbIEFwKUTBMIdsGDjYa-ajqCvmnXCOcKLXRNpODg,609
+propcache-0.4.1.dist-info/top_level.txt,sha256=pVF_GbqSAITPMiX27kfU3QP9-ufhRvkADmudDxWdF3w,10
+propcache/__init__.py,sha256=8kebeGvYn7s-ow1AFmK0A4EvonZMpyM7Lkzs2Ktia3Y,965
+propcache/__pycache__/__init__.cpython-312.pyc,,
+propcache/__pycache__/_helpers.cpython-312.pyc,,
+propcache/__pycache__/_helpers_py.cpython-312.pyc,,
+propcache/__pycache__/api.cpython-312.pyc,,
+propcache/_helpers.py,sha256=68SQm6kETN8Mnt9Ol26LJYgHgmB0mKy1tp92888zN4k,1553
+propcache/_helpers_c.cpython-312-x86_64-linux-gnu.so,sha256=tGelusHoANUmokeGexAZA3jwXq-nYzlSbGJv8DEy6ug,745424
+propcache/_helpers_c.pyx,sha256=kcJa1U5lh54TPCqAeZ0cVB7URcb3I8ZbJieOrkNhLQE,3265
+propcache/_helpers_py.py,sha256=Wixs2zWA-FBU-j4zLPyBUU24FEfPhKk-UunFSp9q95U,1909
+propcache/api.py,sha256=wvgB-ypkkI5uf72VVYl2NFGc_TnzUQA2CxC7dTlL5ak,179
+propcache/py.typed,sha256=ay5OMO475PlcZ_Fbun9maHW7Y6MBTk0UXL4ztHx3Iug,14
diff --git a/lib/python3.12/site-packages/propcache-0.4.1.dist-info/WHEEL b/lib/python3.12/site-packages/propcache-0.4.1.dist-info/WHEEL
new file mode 100644
index 0000000000000000000000000000000000000000..f3e8a970f16adf4526f1722547053522d94bf860
--- /dev/null
+++ b/lib/python3.12/site-packages/propcache-0.4.1.dist-info/WHEEL
@@ -0,0 +1,7 @@
+Wheel-Version: 1.0
+Generator: setuptools (80.9.0)
+Root-Is-Purelib: false
+Tag: cp312-cp312-manylinux_2_17_x86_64
+Tag: cp312-cp312-manylinux2014_x86_64
+Tag: cp312-cp312-manylinux_2_28_x86_64
+
diff --git a/lib/python3.12/site-packages/propcache-0.4.1.dist-info/licenses/LICENSE b/lib/python3.12/site-packages/propcache-0.4.1.dist-info/licenses/LICENSE
new file mode 100644
index 0000000000000000000000000000000000000000..d645695673349e3947e8e5ae42332d0ac3164cd7
--- /dev/null
+++ b/lib/python3.12/site-packages/propcache-0.4.1.dist-info/licenses/LICENSE
@@ -0,0 +1,202 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
diff --git a/lib/python3.12/site-packages/propcache-0.4.1.dist-info/licenses/NOTICE b/lib/python3.12/site-packages/propcache-0.4.1.dist-info/licenses/NOTICE
new file mode 100644
index 0000000000000000000000000000000000000000..fa53b2b138df881c4c95239d0e4bede831b36ab5
--- /dev/null
+++ b/lib/python3.12/site-packages/propcache-0.4.1.dist-info/licenses/NOTICE
@@ -0,0 +1,13 @@
+   Copyright 2016-2021, Andrew Svetlov and aio-libs team
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
diff --git a/lib/python3.12/site-packages/propcache-0.4.1.dist-info/top_level.txt b/lib/python3.12/site-packages/propcache-0.4.1.dist-info/top_level.txt
new file mode 100644
index 0000000000000000000000000000000000000000..8c9accf6226df7e4011a41ac5d6014223685cfed
--- /dev/null
+++ b/lib/python3.12/site-packages/propcache-0.4.1.dist-info/top_level.txt
@@ -0,0 +1 @@
+propcache
diff --git a/lib/python3.12/site-packages/wandb-0.21.0.dist-info/INSTALLER b/lib/python3.12/site-packages/wandb-0.21.0.dist-info/INSTALLER
new file mode 100644
index 0000000000000000000000000000000000000000..a1b589e38a32041e49332e5e81c2d363dc418d68
--- /dev/null
+++ b/lib/python3.12/site-packages/wandb-0.21.0.dist-info/INSTALLER
@@ -0,0 +1 @@
+pip
diff --git a/lib/python3.12/site-packages/wandb-0.21.0.dist-info/METADATA b/lib/python3.12/site-packages/wandb-0.21.0.dist-info/METADATA
new file mode 100644
index 0000000000000000000000000000000000000000..71c2058432877f123314fc1e563b6fd1ef761930
--- /dev/null
+++ b/lib/python3.12/site-packages/wandb-0.21.0.dist-info/METADATA
@@ -0,0 +1,223 @@
+Metadata-Version: 2.4
+Name: wandb
+Version: 0.21.0
+Summary: A CLI and library for interacting with the Weights & Biases API.
+Project-URL: Source, https://github.com/wandb/wandb
+Project-URL: Bug Reports, https://github.com/wandb/wandb/issues
+Project-URL: Documentation, https://docs.wandb.ai/
+Author-email: Weights & Biases 
+License: MIT License
+        
+        Copyright (c) 2021 Weights and Biases, Inc.
+        
+        Permission is hereby granted, free of charge, to any person obtaining a copy
+        of this software and associated documentation files (the "Software"), to deal
+        in the Software without restriction, including without limitation the rights
+        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+        copies of the Software, and to permit persons to whom the Software is
+        furnished to do so, subject to the following conditions:
+        
+        The above copyright notice and this permission notice shall be included in all
+        copies or substantial portions of the Software.
+        
+        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+        SOFTWARE.
+License-File: LICENSE
+Classifier: Development Status :: 5 - Production/Stable
+Classifier: Intended Audience :: Developers
+Classifier: Intended Audience :: Science/Research
+Classifier: License :: OSI Approved :: MIT License
+Classifier: Natural Language :: English
+Classifier: Programming Language :: Go
+Classifier: Programming Language :: Python :: 3
+Classifier: Programming Language :: Python :: 3 :: Only
+Classifier: Programming Language :: Python :: 3.8
+Classifier: Programming Language :: Python :: 3.9
+Classifier: Programming Language :: Python :: 3.10
+Classifier: Programming Language :: Python :: 3.11
+Classifier: Programming Language :: Python :: 3.12
+Classifier: Programming Language :: Python :: 3.13
+Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
+Classifier: Topic :: Software Development :: Libraries :: Python Modules
+Classifier: Topic :: System :: Logging
+Classifier: Topic :: System :: Monitoring
+Requires-Python: >=3.8
+Requires-Dist: click!=8.0.0,>=7.1
+Requires-Dist: eval-type-backport; python_version < '3.10'
+Requires-Dist: gitpython!=3.1.29,>=1.0.0
+Requires-Dist: packaging
+Requires-Dist: platformdirs
+Requires-Dist: protobuf!=4.21.0,!=5.28.0,<7,>=3.12.0; python_version < '3.9' and sys_platform == 'linux'
+Requires-Dist: protobuf!=4.21.0,!=5.28.0,<7,>=3.15.0; python_version == '3.9' and sys_platform == 'linux'
+Requires-Dist: protobuf!=4.21.0,!=5.28.0,<7,>=3.19.0; python_version > '3.9' and sys_platform == 'linux'
+Requires-Dist: protobuf!=4.21.0,!=5.28.0,<7,>=3.19.0; sys_platform != 'linux'
+Requires-Dist: pydantic<3
+Requires-Dist: pyyaml
+Requires-Dist: requests<3,>=2.0.0
+Requires-Dist: sentry-sdk>=2.0.0
+Requires-Dist: typing-extensions<5,>=4.8
+Provides-Extra: aws
+Requires-Dist: boto3; extra == 'aws'
+Requires-Dist: botocore>=1.5.76; extra == 'aws'
+Provides-Extra: azure
+Requires-Dist: azure-identity; extra == 'azure'
+Requires-Dist: azure-storage-blob; extra == 'azure'
+Provides-Extra: gcp
+Requires-Dist: google-cloud-storage; extra == 'gcp'
+Provides-Extra: importers
+Requires-Dist: filelock; extra == 'importers'
+Requires-Dist: mlflow; extra == 'importers'
+Requires-Dist: polars<=1.2.1; extra == 'importers'
+Requires-Dist: rich; extra == 'importers'
+Requires-Dist: tenacity; extra == 'importers'
+Provides-Extra: kubeflow
+Requires-Dist: google-cloud-storage; extra == 'kubeflow'
+Requires-Dist: kubernetes; extra == 'kubeflow'
+Requires-Dist: minio; extra == 'kubeflow'
+Requires-Dist: sh; extra == 'kubeflow'
+Provides-Extra: launch
+Requires-Dist: awscli; extra == 'launch'
+Requires-Dist: azure-containerregistry; extra == 'launch'
+Requires-Dist: azure-identity; extra == 'launch'
+Requires-Dist: azure-storage-blob; extra == 'launch'
+Requires-Dist: boto3; extra == 'launch'
+Requires-Dist: botocore>=1.5.76; extra == 'launch'
+Requires-Dist: chardet; extra == 'launch'
+Requires-Dist: google-auth; extra == 'launch'
+Requires-Dist: google-cloud-aiplatform; extra == 'launch'
+Requires-Dist: google-cloud-artifact-registry; extra == 'launch'
+Requires-Dist: google-cloud-compute; extra == 'launch'
+Requires-Dist: google-cloud-storage; extra == 'launch'
+Requires-Dist: iso8601; extra == 'launch'
+Requires-Dist: jsonschema; extra == 'launch'
+Requires-Dist: kubernetes; extra == 'launch'
+Requires-Dist: kubernetes-asyncio; extra == 'launch'
+Requires-Dist: nbconvert; extra == 'launch'
+Requires-Dist: nbformat; extra == 'launch'
+Requires-Dist: optuna; extra == 'launch'
+Requires-Dist: pydantic; extra == 'launch'
+Requires-Dist: pyyaml>=6.0.0; extra == 'launch'
+Requires-Dist: tomli; extra == 'launch'
+Requires-Dist: tornado>=6.5.0; (python_version >= '3.9') and extra == 'launch'
+Requires-Dist: typing-extensions; extra == 'launch'
+Provides-Extra: media
+Requires-Dist: bokeh; extra == 'media'
+Requires-Dist: imageio>=2.28.1; extra == 'media'
+Requires-Dist: moviepy>=1.0.0; extra == 'media'
+Requires-Dist: numpy; extra == 'media'
+Requires-Dist: pillow; extra == 'media'
+Requires-Dist: plotly>=5.18.0; extra == 'media'
+Requires-Dist: rdkit; extra == 'media'
+Requires-Dist: soundfile; extra == 'media'
+Provides-Extra: models
+Requires-Dist: cloudpickle; extra == 'models'
+Provides-Extra: perf
+Requires-Dist: orjson; extra == 'perf'
+Provides-Extra: sweeps
+Requires-Dist: sweeps>=0.2.0; extra == 'sweeps'
+Provides-Extra: workspaces
+Requires-Dist: wandb-workspaces; extra == 'workspaces'
+Description-Content-Type: text/markdown
+
+
+

+
+ +# Weights and Biases [![PyPI](https://img.shields.io/pypi/v/wandb)](https://pypi.python.org/pypi/wandb) [![Conda (channel only)](https://img.shields.io/conda/vn/conda-forge/wandb)](https://anaconda.org/conda-forge/wandb) [![CircleCI](https://img.shields.io/circleci/build/github/wandb/wandb/main)](https://circleci.com/gh/wandb/wandb) [![Codecov](https://img.shields.io/codecov/c/gh/wandb/wandb)](https://codecov.io/gh/wandb/wandb) + +Use W&B to build better models faster. Track and visualize all the pieces of your machine learning pipeline, from datasets to production machine learning models. Get started with W&B today, [sign up for an account!](https://wandb.com?utm_source=github&utm_medium=code&utm_campaign=wandb&utm_content=readme) + + + +See the [W&B Developer Guide](https://docs.wandb.ai/?utm_source=github&utm_medium=code&utm_campaign=wandb&utm_content=documentation) and [API Reference Guide](https://docs.wandb.ai/ref?utm_source=github&utm_medium=code&utm_campaign=wandb&utm_content=documentation) for a full technical description of the W&B platform. + +  + +# Quickstart + +Get started with W&B in four steps: + +1. First, sign up for a [W&B account](https://wandb.ai/login?utm_source=github&utm_medium=code&utm_campaign=wandb&utm_content=quickstart). + +2. Second, install the W&B SDK with [pip](https://pip.pypa.io/en/stable/). Navigate to your terminal and type the following command: + +```shell +pip install wandb +``` + +3. Third, log into W&B: + +```python +wandb.login() +``` + +4. Use the example code snippet below as a template to integrate W&B to your Python script: + +```python +import wandb + +# Start a W&B Run with wandb.init +run = wandb.init(project="my_first_project") + +# Save model inputs and hyperparameters in a wandb.config object +config = run.config +config.learning_rate = 0.01 + +# Model training code here ... + +# Log metrics over time to visualize performance with wandb.log +for i in range(10): + run.log({"loss": ...}) + +# Mark the run as finished, and finish uploading all data +run.finish() +``` + +For example, if the preceding code was stored in a script called train.py: + +```shell +python train.py +``` + +You will see a URL in your terminal logs when your script starts and finishes. Data is staged locally in a directory named _wandb_ relative to your script. Navigate to the W&B App to view a dashboard of your first W&B Experiment. Use the W&B App to compare multiple experiments in a unified place, dive into the results of a single run, and much more! + +  + +# Integrations + +Use your favorite framework with W&B. W&B integrations make it fast and easy to set up experiment tracking and data versioning inside existing projects. For more information on how to integrate W&B with the framework of your choice, see [W&B Integrations](https://docs.wandb.ai/guides/integrations) in the W&B Developer Guide. + +  + +# Python Version Support + +We are committed to supporting our minimum required Python version for *at least* six months after its official end-of-life (EOL) date, as defined by the Python Software Foundation. You can find a list of Python EOL dates [here](https://devguide.python.org/versions/). + +When we discontinue support for a Python version, we will increment the library’s minor version number to reflect this change. + +  + +# Contribution guidelines +Weights & Biases ❤️ open source, and we welcome contributions from the community! See the [Contribution guide](https://github.com/wandb/wandb/blob/main/CONTRIBUTING.md) for more information on the development workflow and the internals of the wandb library. For wandb bugs and feature requests, visit [GitHub Issues](https://github.com/wandb/wandb/issues) or contact support@wandb.com. + +  + +# Academic Researchers +Reach out to W&B Support at support@wandb.com to get a [free academic license](https://www.wandb.com/academic) for you and your research group. + +  + +# W&B Community + +Be a part of the growing W&B Community and interact with the W&B team in our [Discord](https://wandb.me/discord). Stay connected with the latest ML updates and tutorials with [W&B Fully Connected](https://wandb.ai/fully-connected). + +  + +# License + +[MIT License](https://github.com/wandb/wandb/blob/main/LICENSE) diff --git a/lib/python3.12/site-packages/wandb-0.21.0.dist-info/RECORD b/lib/python3.12/site-packages/wandb-0.21.0.dist-info/RECORD new file mode 100644 index 0000000000000000000000000000000000000000..96606e27ac38e0b70e7c000151484b0ba26cbf2c --- /dev/null +++ b/lib/python3.12/site-packages/wandb-0.21.0.dist-info/RECORD @@ -0,0 +1,1769 @@ +../../../bin/wandb,sha256=BrzdcGRHNtPUBJ7YfNEJv8etPCR7nEt9pHS5NKUSlKA,246 +../../../bin/wb,sha256=BrzdcGRHNtPUBJ7YfNEJv8etPCR7nEt9pHS5NKUSlKA,246 +package_readme.md,sha256=U9047nyMDICgctm1HLm4HfXwFnFKsEn2m77hsYPUZ1I,4298 +wandb-0.21.0.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4 +wandb-0.21.0.dist-info/METADATA,sha256=zX0wbvgNv2Rc2fDcJh1iNvdZ4H79e2W80e7QQqBsInU,10250 +wandb-0.21.0.dist-info/RECORD,, +wandb-0.21.0.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +wandb-0.21.0.dist-info/WHEEL,sha256=s7sPrB31V08tAWW9qF5-VggdUkNTqVMOnYoTbE5U7gA,141 +wandb-0.21.0.dist-info/entry_points.txt,sha256=v4FCOZ9gW7Pc6KLsmgQqpCiKTrA1wh2XHmNf-NUP1-I,67 +wandb-0.21.0.dist-info/licenses/LICENSE,sha256=izOKRJpGOx1PrJiGOKR0HsNdlB5JdH2d0Z4P7a7ssTc,1081 +wandb/__init__.py,sha256=Z73q_CWJYtVTu8GMulAsWVIZ-7pALeLKqL3_qJH1fxQ,6984 +wandb/__init__.pyi,sha256=UG_Nbr97ObjZdLyp1ILmKaLwkiGDDmbPvLGPjs2usJc,48450 +wandb/__main__.py,sha256=gripuDgB7J8wMMeJt4CIBRjn1BMSFr5zvsrt585Pnj4,64 +wandb/__pycache__/__init__.cpython-312.pyc,, +wandb/__pycache__/__main__.cpython-312.pyc,, +wandb/__pycache__/_iterutils.cpython-312.pyc,, +wandb/__pycache__/data_types.cpython-312.pyc,, +wandb/__pycache__/env.cpython-312.pyc,, +wandb/__pycache__/jupyter.cpython-312.pyc,, +wandb/__pycache__/sklearn.cpython-312.pyc,, +wandb/__pycache__/trigger.cpython-312.pyc,, +wandb/__pycache__/util.cpython-312.pyc,, +wandb/__pycache__/wandb_agent.cpython-312.pyc,, +wandb/__pycache__/wandb_controller.cpython-312.pyc,, +wandb/__pycache__/wandb_run.cpython-312.pyc,, +wandb/_iterutils.py,sha256=NX6MaIE3JzPXsqKNXUKdnpIlX0spGG8HwGIQt5VASrk,2400 +wandb/_pydantic/__init__.py,sha256=p1Rwdo5z3rgoQgVDz6pgcWzs5eitB2JlgVN6QeFyN0Y,662 +wandb/_pydantic/__pycache__/__init__.cpython-312.pyc,, +wandb/_pydantic/__pycache__/base.cpython-312.pyc,, +wandb/_pydantic/__pycache__/utils.cpython-312.pyc,, +wandb/_pydantic/__pycache__/v1_compat.cpython-312.pyc,, +wandb/_pydantic/base.py,sha256=qOgf1LEMPO3o1kiYli9kOf2ZQLuP0GEMa8Qx2pDnJGY,4277 +wandb/_pydantic/utils.py,sha256=XcnRAEOdjANLxvr_FMnMPKmqv4f2HwjbNo-5J_JKKe0,2810 +wandb/_pydantic/v1_compat.py,sha256=pHEdEVlJv5WSs91o742Cl19Xb_sOiODLVMKSIPuf290,11423 +wandb/agents/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +wandb/agents/__pycache__/__init__.cpython-312.pyc,, +wandb/agents/__pycache__/pyagent.cpython-312.pyc,, +wandb/agents/pyagent.py,sha256=wfJtm5IeIUiDCVv0W6Qckwh7Jef1sNktaKonnj8sm6s,13171 +wandb/analytics/__init__.py,sha256=WG_Mh20Hr8d3vDmGMcfDXCMEIew3uzDYZAJwFsrbAug,50 +wandb/analytics/__pycache__/__init__.cpython-312.pyc,, +wandb/analytics/__pycache__/sentry.cpython-312.pyc,, +wandb/analytics/sentry.py,sha256=7vri0-bFKXeFSV6p7wvelouYz_cYpXhtAwCO1o6tB50,8367 +wandb/apis/__init__.py,sha256=uPZKqlX8Y9YcHoERJshWRGS3ukMOIVWi4sDnkO5_CYY,1338 +wandb/apis/__pycache__/__init__.cpython-312.pyc,, +wandb/apis/__pycache__/attrs.cpython-312.pyc,, +wandb/apis/__pycache__/internal.cpython-312.pyc,, +wandb/apis/__pycache__/normalize.cpython-312.pyc,, +wandb/apis/__pycache__/paginator.cpython-312.pyc,, +wandb/apis/attrs.py,sha256=hn2chCIb02gHw7sDWCkA6bXrmarYBABSbWKNCmx_KFs,1436 +wandb/apis/importers/__init__.py,sha256=ewph-RBUC9FnxL6uWbuuW0Hmdv2cHsxfqnZi0546ds4,38 +wandb/apis/importers/__pycache__/__init__.cpython-312.pyc,, +wandb/apis/importers/__pycache__/mlflow.cpython-312.pyc,, +wandb/apis/importers/__pycache__/validation.cpython-312.pyc,, +wandb/apis/importers/__pycache__/wandb.cpython-312.pyc,, +wandb/apis/importers/internals/__pycache__/internal.cpython-312.pyc,, +wandb/apis/importers/internals/__pycache__/protocols.cpython-312.pyc,, +wandb/apis/importers/internals/__pycache__/util.cpython-312.pyc,, +wandb/apis/importers/internals/internal.py,sha256=ieAnGMYU4-6_rGY9uP7uZePeepMjP964xgUcsr-8f1w,13199 +wandb/apis/importers/internals/protocols.py,sha256=shZBD2bRMo81xPSUQdK2d9KK8qpop4CmMkizg8FI3WM,2885 +wandb/apis/importers/internals/util.py,sha256=lvqLAqNA1UpoOuD6eqe_1ZzRwxj8IkYKxYcP9h0S5jI,2081 +wandb/apis/importers/mlflow.py,sha256=uoxzm3bSOqjQyUkgOBwuzpaBjTdGp4drPaqE9f7Ny5w,8256 +wandb/apis/importers/validation.py,sha256=5odBqLZ3BQvyyO8CkYrm7bPXySOeDt_amQPwIrMcJRE,3183 +wandb/apis/importers/wandb.py,sha256=A4Dd0ioykPa1OmTlxkuvpYzgtH5aNpercDl4AxH_CHo,54531 +wandb/apis/internal.py,sha256=Y03FxkF2lMOysNiw2SVXN00o5choqbTZ47_DXrXIFng,7736 +wandb/apis/normalize.py,sha256=xWm3tualLOtCSdz5g4reU5dUq-WHH0sE2dPool9SmIw,2665 +wandb/apis/paginator.py,sha256=aG4t64c0O8tCLbmJf6de2EDRRSdczOyEQu8fXJVIiWw,3859 +wandb/apis/public/__init__.py,sha256=xHuML6BuYlSNhKR4_k97shA1zoCgndXzMYukQybmZEw,1206 +wandb/apis/public/__pycache__/__init__.cpython-312.pyc,, +wandb/apis/public/__pycache__/api.cpython-312.pyc,, +wandb/apis/public/__pycache__/artifacts.cpython-312.pyc,, +wandb/apis/public/__pycache__/automations.cpython-312.pyc,, +wandb/apis/public/__pycache__/const.cpython-312.pyc,, +wandb/apis/public/__pycache__/files.cpython-312.pyc,, +wandb/apis/public/__pycache__/history.cpython-312.pyc,, +wandb/apis/public/__pycache__/integrations.cpython-312.pyc,, +wandb/apis/public/__pycache__/jobs.cpython-312.pyc,, +wandb/apis/public/__pycache__/projects.cpython-312.pyc,, +wandb/apis/public/__pycache__/query_generator.cpython-312.pyc,, +wandb/apis/public/__pycache__/reports.cpython-312.pyc,, +wandb/apis/public/__pycache__/runs.cpython-312.pyc,, +wandb/apis/public/__pycache__/sweeps.cpython-312.pyc,, +wandb/apis/public/__pycache__/teams.cpython-312.pyc,, +wandb/apis/public/__pycache__/users.cpython-312.pyc,, +wandb/apis/public/__pycache__/utils.cpython-312.pyc,, +wandb/apis/public/api.py,sha256=w_yhFcf330V9TjvCqMLr2BAcQIWLB6evUzCrtBdjCrc,84683 +wandb/apis/public/artifacts.py,sha256=MV-13AAOfyOKYV0Ha_TWgjmjNmoACUqFhJq0B5pMNrI,28138 +wandb/apis/public/automations.py,sha256=meQY6iI5e-1Se77AcV3NvkBet0f14TkdA5nNk8V9SFQ,2311 +wandb/apis/public/const.py,sha256=icNtcS3gTCtvevLWuTOCqm0FHEfLQ0P80mA69dWeEXs,121 +wandb/apis/public/files.py,sha256=BaQULBLKr5G6lP2m87a5TyaVvBfDcMctWmxSjGPDqMY,8491 +wandb/apis/public/history.py,sha256=4gwe9HJ_NH9SSPtLtP7ELw4nIsxLPrY6ji13EK1siyM,4636 +wandb/apis/public/integrations.py,sha256=du02uzOUv6_8heAW1Kwu1pa2uZeYIzPFRgqcAOpF8JY,6772 +wandb/apis/public/jobs.py,sha256=nwm-tLqj0XHNQRQsBKHGf3nOuLSwch0B2i9Gc2DKW90,22399 +wandb/apis/public/projects.py,sha256=HGWSblKEVusBHCb5uTGUu-BzoyGJERivhNa_5tamZ00,6643 +wandb/apis/public/query_generator.py,sha256=WfyaQuBcTHEECOJ2zN_0iqkUufki9MX28fj3axYZCLU,5977 +wandb/apis/public/registries/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +wandb/apis/public/registries/__pycache__/__init__.cpython-312.pyc,, +wandb/apis/public/registries/__pycache__/_freezable_list.cpython-312.pyc,, +wandb/apis/public/registries/__pycache__/_utils.cpython-312.pyc,, +wandb/apis/public/registries/__pycache__/registries_search.cpython-312.pyc,, +wandb/apis/public/registries/__pycache__/registry.cpython-312.pyc,, +wandb/apis/public/registries/_freezable_list.py,sha256=E7qnLNnw1RF6ClQXbtkg3LRpOMs5jx2L5HiSY3RzTMo,6368 +wandb/apis/public/registries/_utils.py,sha256=N1EDMFQgIxoi2zHJGlbolEEzsmKXyn3LKN_vSLsTyxo,4277 +wandb/apis/public/registries/registries_search.py,sha256=fjmQ-iNUlkNiEpLe1Yp9vmrM0wlWtOE1flIb_binznM,15169 +wandb/apis/public/registries/registry.py,sha256=fNX2Iy3yG2skLPIsp0ityR1opQDeTKXIy38VjDDkXCQ,13725 +wandb/apis/public/reports.py,sha256=VOHI5wx4t5s3J3tq9ADMA1eiPN44q6fGF3-O7ZcN4Q8,16998 +wandb/apis/public/runs.py,sha256=TKYSJDtHk-7bBOC4Uy7enHsMChtTeFtHv_7oOoq5W7E,35518 +wandb/apis/public/sweeps.py,sha256=FYWvA-h-xqCnZ8PYXRwOEvRHgl3BS0RhuZpTftIMNrc,6547 +wandb/apis/public/teams.py,sha256=YJAsJLRVM5r6UT48tdGGVA2V_f7nayDe5Q5NRTFQ8m4,5474 +wandb/apis/public/users.py,sha256=nbguWN0QJWvhsmgVx6IrkLYbjJcyI-eJQAUVaoY5Qjc,3796 +wandb/apis/public/utils.py,sha256=62ux6zpRpVug_y-_PaHUSOkPcHMTNFknAPqcINJSHFg,7893 +wandb/apis/reports/__init__.py,sha256=5ZkKvOqwks3UmVeaPuwIZYwyV8_afsGbtybDOXYjSsg,32 +wandb/apis/reports/__pycache__/__init__.cpython-312.pyc,, +wandb/apis/reports/v1/__init__.py,sha256=L5l1BqMaap-w5wXCzn8pC8RXB7_72MsjTx8HeLuC3XU,263 +wandb/apis/reports/v1/__pycache__/__init__.cpython-312.pyc,, +wandb/apis/reports/v2/__init__.py,sha256=jdLiTqf5QIRxnWH8drWV9Y06bZEhI5N6uGGSKAT7tv0,263 +wandb/apis/reports/v2/__pycache__/__init__.cpython-312.pyc,, +wandb/apis/workspaces/__init__.py,sha256=buvqtqELpCFWC7sHzEuslJgx24ZWDj-5lo2mdV6aHdg,265 +wandb/apis/workspaces/__pycache__/__init__.cpython-312.pyc,, +wandb/automations/__init__.py,sha256=rX1bkA2ZpN6CHlyjf6gpwFhWYmrRdGVs14Sm1Z9RBjA,2365 +wandb/automations/__pycache__/__init__.cpython-312.pyc,, +wandb/automations/__pycache__/_utils.cpython-312.pyc,, +wandb/automations/__pycache__/_validators.cpython-312.pyc,, +wandb/automations/__pycache__/actions.cpython-312.pyc,, +wandb/automations/__pycache__/automations.cpython-312.pyc,, +wandb/automations/__pycache__/events.cpython-312.pyc,, +wandb/automations/__pycache__/integrations.cpython-312.pyc,, +wandb/automations/__pycache__/scopes.cpython-312.pyc,, +wandb/automations/_filters/__init__.py,sha256=UxAEPbeI7wUqZY-w8FgsMU4Jp5rgSxwuQXc_VhdpDWE,466 +wandb/automations/_filters/__pycache__/__init__.cpython-312.pyc,, +wandb/automations/_filters/__pycache__/expressions.cpython-312.pyc,, +wandb/automations/_filters/__pycache__/operators.cpython-312.pyc,, +wandb/automations/_filters/__pycache__/run_metrics.cpython-312.pyc,, +wandb/automations/_filters/expressions.py,sha256=JRnjqjeiqBJ7jq1HetO_6YQ9NFNOT6QQMl0Vm_wA2Q4,6603 +wandb/automations/_filters/operators.py,sha256=BVk6wogQCE05fsHoD3oupiOym1ka_fFYT-17S7rPcqc,7159 +wandb/automations/_filters/run_metrics.py,sha256=bTgFimrEej0HS3RYWCdfUD5qeCNDWxyOTptn9qHhxMA,12879 +wandb/automations/_generated/__init__.py,sha256=q2qlYbw2w70_xXVEXpiMisKM4hdZxWMSaW4jmTN-HCc,6824 +wandb/automations/_generated/__pycache__/__init__.cpython-312.pyc,, +wandb/automations/_generated/__pycache__/create_automation.cpython-312.pyc,, +wandb/automations/_generated/__pycache__/create_generic_webhook_integration.cpython-312.pyc,, +wandb/automations/_generated/__pycache__/delete_automation.cpython-312.pyc,, +wandb/automations/_generated/__pycache__/enums.cpython-312.pyc,, +wandb/automations/_generated/__pycache__/fragments.cpython-312.pyc,, +wandb/automations/_generated/__pycache__/generic_webhook_integrations_by_entity.cpython-312.pyc,, +wandb/automations/_generated/__pycache__/get_automations.cpython-312.pyc,, +wandb/automations/_generated/__pycache__/get_automations_by_entity.cpython-312.pyc,, +wandb/automations/_generated/__pycache__/input_types.cpython-312.pyc,, +wandb/automations/_generated/__pycache__/integrations_by_entity.cpython-312.pyc,, +wandb/automations/_generated/__pycache__/operations.cpython-312.pyc,, +wandb/automations/_generated/__pycache__/slack_integrations_by_entity.cpython-312.pyc,, +wandb/automations/_generated/__pycache__/update_automation.cpython-312.pyc,, +wandb/automations/_generated/create_automation.py,sha256=AYIaKKLZDSo0VPU_JqjbVSdcoNfFArUtoxWinf-Q3Uc,340 +wandb/automations/_generated/create_generic_webhook_integration.py,sha256=N0r4pYu6LG4m8PrZLm9CrYmAwbDMOiI4x0W1ygRxPhQ,1420 +wandb/automations/_generated/delete_automation.py,sha256=iL3Q94KMuIIB8fDylXVn9ppicsMfF3xgk7IPqbxVR3A,340 +wandb/automations/_generated/enums.py,sha256=QhdQw-UO89a5Px61iisYgRX_UMYx3QjGqB5FBgKY8DA,799 +wandb/automations/_generated/fragments.py,sha256=52mxhcfT9XTrxCo04Z7QLiyPgbtHHhWXxj4d8qvaIlk,12017 +wandb/automations/_generated/generic_webhook_integrations_by_entity.py,sha256=bwuMMOI2pZYzXWn50HvGH2yC6atEOTU5oNzYvw_MWfU,599 +wandb/automations/_generated/get_automations.py,sha256=4fdmSADMbWV5oHcWc6sUK8PVbAuTUOuhK2izLjfDj0c,537 +wandb/automations/_generated/get_automations_by_entity.py,sha256=G7w2Pnb4zOPq6gkw9jttmoQLjIXGnHXMl0bSeNZKTQw,591 +wandb/automations/_generated/input_types.py,sha256=-BIaTQ03aoDb7vxao_D8s8pkyofFdkAYnkw9sK8IojE,3541 +wandb/automations/_generated/integrations_by_entity.py,sha256=mRAf-LVgyWEmoGIKsI6CKPmuHbX2-Y1qpRzOKIAVW6c,501 +wandb/automations/_generated/operations.py,sha256=hL1Wqd_JJUthNybyQcY4CVnbl6VDzXlXySpyeB0iyhg,11122 +wandb/automations/_generated/slack_integrations_by_entity.py,sha256=87KtiuB4wfsHCiQD9m9_1GF9DYhdvqm4EsZ1dOxYtRU,536 +wandb/automations/_generated/update_automation.py,sha256=M58fqPcHAAYReJ45GU68FZAUCxERvTtWhNLlpiQJEag,340 +wandb/automations/_utils.py,sha256=3a39L976vsrckevwYLNHiHA5bcs-YlCdOwIuJ8UG3jc,8269 +wandb/automations/_validators.py,sha256=5rEU_gC0TRx1UvFVyqCcQU6knAKsZHhTW3z_lU8eZBY,5002 +wandb/automations/actions.py,sha256=7B1DKNYjnSIZKFZ1e0UeEOAxCz0Y11j8iy9TA2kOBA4,7391 +wandb/automations/automations.py,sha256=95Mw-WjGSp5XUdIlW6qX-lDxbVPufwJC2rxEhn87R3g,2642 +wandb/automations/events.py,sha256=ZvAn6347jkp9Ex8h9gVtjXTHyOzREa-RX2J_8w8Tfgs,10443 +wandb/automations/integrations.py,sha256=ok3oBN8c8DMEbjt-wpFViwTd_FC-6nwRMuamsDAOiQc,1059 +wandb/automations/scopes.py,sha256=8H6bxXqffuQHOV__Od28mm29A6ptvVPe9fg0cnKQB-M,2310 +wandb/beta/__pycache__/workflows.cpython-312.pyc,, +wandb/beta/workflows.py,sha256=q9iQpax5iU7p1v_HE-bFee0kDlYFgG9Zz15u6BsCdzM,10360 +wandb/bin/gpu_stats,sha256=0iPqdW7JcLdIw1KTXreX3avNKnE5-M93MdPxWKxsZ2c,11135224 +wandb/bin/wandb-core,sha256=xj3ciWifkmje_r6hcZt-Y1oGbq8wtrz3GAFPkgZcEaM,53772472 +wandb/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +wandb/cli/__pycache__/__init__.cpython-312.pyc,, +wandb/cli/__pycache__/beta.cpython-312.pyc,, +wandb/cli/__pycache__/cli.cpython-312.pyc,, +wandb/cli/beta.py,sha256=Mq-5A-XXH3VLIvhWPxA84DFPeirNMYGPSQ53H78Xkjc,5187 +wandb/cli/cli.py,sha256=bBhFG4VEurWE7qEItkYGnVs8ou0I8j-IBF_HlARQZqM,91136 +wandb/data_types.py,sha256=M-wqAO0FtIqvj28556u3h4nzSwlRcbxhXoX0B9jlJSo,2283 +wandb/docker/__init__.py,sha256=tupkiHAEcpXmrcS7V8gcjHnqim2k9GJH6ZogVMC8nts,8663 +wandb/docker/__pycache__/__init__.cpython-312.pyc,, +wandb/docker/__pycache__/names.cpython-312.pyc,, +wandb/docker/names.py,sha256=xI3DYzgYpkjaCz4qTKnm49fnexMkNCUjBuhunxAYyeE,1311 +wandb/docker/wandb-entrypoint.sh,sha256=P4eTMG7wYsgTfJIws_HT7QFlYBI70ZLnNlDGTZdmYVE,989 +wandb/env.py,sha256=4nXvLaxOokeH1JnrfZAgs4mxlotelSbIvN98yn3jKdw,13862 +wandb/errors/__init__.py,sha256=Tlij_4c-SxruLN-p0sDfDpF-HktBcHeAbztwGqQ84cU,293 +wandb/errors/__pycache__/__init__.cpython-312.pyc,, +wandb/errors/__pycache__/errors.cpython-312.pyc,, +wandb/errors/__pycache__/links.cpython-312.pyc,, +wandb/errors/__pycache__/term.cpython-312.pyc,, +wandb/errors/__pycache__/util.cpython-312.pyc,, +wandb/errors/__pycache__/warnings.cpython-312.pyc,, +wandb/errors/errors.py,sha256=EQy3yZld3hDZA5hOoe34Xcpj7JKJzOg5AkWMMs9ob2E,897 +wandb/errors/links.py,sha256=sNwJ74e9qb0w4GRZfnbPXK5ZdpIqc5lkuaT4T2Snnqw,2520 +wandb/errors/term.py,sha256=kH_noQvl9BDsGBXm7fQfH5u0ERmI6bOZa8Rp49DoAPk,12207 +wandb/errors/util.py,sha256=YqO_fpZeXubXWBUAVQ6gmuLAiz3Q9pYVE5LbQ2Rq5Ck,1711 +wandb/errors/warnings.py,sha256=kyLP3bfXSmlztp8nOepLtfTdM-03N-i7Ho1Y568BOtk,57 +wandb/filesync/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +wandb/filesync/__pycache__/__init__.cpython-312.pyc,, +wandb/filesync/__pycache__/dir_watcher.cpython-312.pyc,, +wandb/filesync/__pycache__/stats.cpython-312.pyc,, +wandb/filesync/__pycache__/step_checksum.cpython-312.pyc,, +wandb/filesync/__pycache__/step_prepare.cpython-312.pyc,, +wandb/filesync/__pycache__/step_upload.cpython-312.pyc,, +wandb/filesync/__pycache__/upload_job.cpython-312.pyc,, +wandb/filesync/dir_watcher.py,sha256=9Y57-5-hWZFzCuBL6HQVtm-MIE9p8kCRU_g_YZUVHvo,16345 +wandb/filesync/stats.py,sha256=bjVBoCU9I9ke_XbEqtUgmKJVSmFxxAs2JciBzGWPhDg,3050 +wandb/filesync/step_checksum.py,sha256=IWp7I8WMobTTrZw3Ip2IBlBmvElaG_ihvsis0HW5QMM,4672 +wandb/filesync/step_prepare.py,sha256=CmGgLMbDtwgqC-ooDrLIfWP1NZWAf0Icl3sx3KNXnCc,5495 +wandb/filesync/step_upload.py,sha256=fzLWa_7SD-Jze5EWT8jpGqH6Sw0Qdv2puCbv6HHa7hg,10256 +wandb/filesync/upload_job.py,sha256=t-QgMheUcxFE8C9TIJ5Wp9Cl_4jlpCzCKfsRoPzrHbs,5493 +wandb/integration/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +wandb/integration/__pycache__/__init__.cpython-312.pyc,, +wandb/integration/catboost/__init__.py,sha256=dxef0C9s9Xez_sF3sOqSJpKaSrAibAqMA_TpVUyIwac,127 +wandb/integration/catboost/__pycache__/__init__.cpython-312.pyc,, +wandb/integration/catboost/__pycache__/catboost.cpython-312.pyc,, +wandb/integration/catboost/catboost.py,sha256=DutGAM8LNWFCgN5JIXpwXFIrgmZtSmq46A-LlEWXlcA,5986 +wandb/integration/cohere/__init__.py,sha256=8yTJGhWznxEAxHYDY7oMghvsak_KqLngSLpqjR8ic3g,52 +wandb/integration/cohere/__pycache__/__init__.cpython-312.pyc,, +wandb/integration/cohere/__pycache__/cohere.cpython-312.pyc,, +wandb/integration/cohere/__pycache__/resolver.cpython-312.pyc,, +wandb/integration/cohere/cohere.py,sha256=CyALJXyLDnic6ZRc8I4UXmR7hYqtIOCi5Wav12JcXd0,453 +wandb/integration/cohere/resolver.py,sha256=pQ2kbO-ynL3FKemSZeCdcsqusQrfB3n29znj-KdSiNo,13813 +wandb/integration/diffusers/__init__.py,sha256=Rdenl4seOrFR1_LrKP9P2Sl9_JwGnD3BC5bgHSWXRgY,55 +wandb/integration/diffusers/__pycache__/__init__.cpython-312.pyc,, +wandb/integration/diffusers/__pycache__/autologger.cpython-312.pyc,, +wandb/integration/diffusers/__pycache__/pipeline_resolver.cpython-312.pyc,, +wandb/integration/diffusers/autologger.py,sha256=RsfHZsJQnZBGL9TSHHkspdWOTotveBcVPXGdeqL2YBE,3254 +wandb/integration/diffusers/pipeline_resolver.py,sha256=AYnMDpSwjSdf0mno9y43tDCVHhkv1UJYOtTxc5y4WFw,1834 +wandb/integration/diffusers/resolvers/__init__.py,sha256=07La9KIUpsOE3nNPnrcA4fESpmkeJFNhTI4FL8WPJ5k,201 +wandb/integration/diffusers/resolvers/__pycache__/__init__.cpython-312.pyc,, +wandb/integration/diffusers/resolvers/__pycache__/multimodal.cpython-312.pyc,, +wandb/integration/diffusers/resolvers/__pycache__/utils.cpython-312.pyc,, +wandb/integration/diffusers/resolvers/multimodal.py,sha256=msmBLGd2-GDBx8doet0QfM-POPVhn6K4STqKgmAtHF8,29990 +wandb/integration/diffusers/resolvers/utils.py,sha256=30RyIDGzkVd_SAIbIy6WT0DYjhgcigJtMyIwHDvvqBI,3824 +wandb/integration/fastai/__init__.py,sha256=A_bmZh0TaQlM4qkcDtZvwIdw8it2hdwR-WCjgLiz5Uw,9302 +wandb/integration/fastai/__pycache__/__init__.cpython-312.pyc,, +wandb/integration/gym/__init__.py,sha256=oE_dAVdB6CbzS72UG7VOl7gKD3oYaDPVSlFdxz5AWJQ,2994 +wandb/integration/gym/__pycache__/__init__.cpython-312.pyc,, +wandb/integration/huggingface/__init__.py,sha256=Ui-JiM_yel2YZuS9U_LyReL3mhBZZSIUNLBODjS4l4Q,57 +wandb/integration/huggingface/__pycache__/__init__.cpython-312.pyc,, +wandb/integration/huggingface/__pycache__/huggingface.cpython-312.pyc,, +wandb/integration/huggingface/__pycache__/resolver.cpython-312.pyc,, +wandb/integration/huggingface/huggingface.py,sha256=KYP0dCYERORLNE1Sk6jfp0krHF2BQ4q4qOlF-0H-vrI,443 +wandb/integration/huggingface/resolver.py,sha256=Atc0vwdPar5yKzTcJF6Fu2i7h7a6TX0W9B2HdeToqrI,7858 +wandb/integration/keras/__init__.py,sha256=8_vNA4cEbj1lg2pgMz-c5Iu1XJQtX9x5_vNGrv4NBdE,345 +wandb/integration/keras/__pycache__/__init__.cpython-312.pyc,, +wandb/integration/keras/__pycache__/keras.cpython-312.pyc,, +wandb/integration/keras/callbacks/__init__.py,sha256=sY5AMC3x28iA815fqbqkkArtjctqG-m9N2D5FnyR0no,223 +wandb/integration/keras/callbacks/__pycache__/__init__.cpython-312.pyc,, +wandb/integration/keras/callbacks/__pycache__/metrics_logger.cpython-312.pyc,, +wandb/integration/keras/callbacks/__pycache__/model_checkpoint.cpython-312.pyc,, +wandb/integration/keras/callbacks/__pycache__/tables_builder.cpython-312.pyc,, +wandb/integration/keras/callbacks/metrics_logger.py,sha256=gA2ui3ZCV4DyOEx5vQZOYRA59jPIlsZhCIC6IGvdy5k,4919 +wandb/integration/keras/callbacks/model_checkpoint.py,sha256=9gXBUwreT6XXsIsv5iyIHk80iLGecZFG-z-fGThAOLU,8529 +wandb/integration/keras/callbacks/tables_builder.py,sha256=01NGafVQJoJFvu6JmaLZsXIdmhYRkzY08KYyzOrxmEg,8881 +wandb/integration/keras/keras.py,sha256=pruhbbGr4mqRqzICwT1qppEHkaLR2c6Ufa7oiZN1XEY,44131 +wandb/integration/kfp/__init__.py,sha256=WhBhg3mQopGNDbWzGJ8Xyld8w3FAAvmP1G1Wtv_QaC0,136 +wandb/integration/kfp/__pycache__/__init__.cpython-312.pyc,, +wandb/integration/kfp/__pycache__/helpers.cpython-312.pyc,, +wandb/integration/kfp/__pycache__/kfp_patch.cpython-312.pyc,, +wandb/integration/kfp/__pycache__/wandb_logging.cpython-312.pyc,, +wandb/integration/kfp/helpers.py,sha256=yEVO9rrz27hc4nk3WwNL3v1aRAUlS-OlXMC8Rj0G1tI,1016 +wandb/integration/kfp/kfp_patch.py,sha256=mnpx9cayPj06adPD95t-ghNnVpIGbFMWbONvuSYi-CM,13204 +wandb/integration/kfp/wandb_logging.py,sha256=fYMImccQagOm6HB-dTV7O1LvH_1jJ-qrd7ngTUu7WVo,6167 +wandb/integration/langchain/__init__.py,sha256=afRoYH4bPOw6Tyrn9YvuYHzbSae97iQT-Ufi0puJqNw,66 +wandb/integration/langchain/__pycache__/__init__.cpython-312.pyc,, +wandb/integration/langchain/__pycache__/wandb_tracer.cpython-312.pyc,, +wandb/integration/langchain/wandb_tracer.py,sha256=oDtb_4-3P1xxBY-nXrA4h6-WnsdEYpH6AD1z5pen0eI,2253 +wandb/integration/lightgbm/__init__.py,sha256=ztwqeaVneF_f6ngCd0UowwksnNopl1bhSQN9hAeyoyU,7981 +wandb/integration/lightgbm/__pycache__/__init__.cpython-312.pyc,, +wandb/integration/lightning/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +wandb/integration/lightning/__pycache__/__init__.cpython-312.pyc,, +wandb/integration/lightning/fabric/__init__.py,sha256=RFhr2VkC0D8b6bAXUMZzcVzqDQaoOozfP_HOogAWi9o,94 +wandb/integration/lightning/fabric/__pycache__/__init__.cpython-312.pyc,, +wandb/integration/lightning/fabric/__pycache__/logger.cpython-312.pyc,, +wandb/integration/lightning/fabric/logger.py,sha256=ev8xFbCohaRp4MvrBn1x_5ypuvLe2FJdUWY7Jjw0ylk,27251 +wandb/integration/metaflow/__init__.py,sha256=nYn3ubiX9Ay6PFxr7r7F8Ia_2dLImb63rpYDmuDlkkQ,109 +wandb/integration/metaflow/__pycache__/__init__.cpython-312.pyc,, +wandb/integration/metaflow/__pycache__/metaflow.cpython-312.pyc,, +wandb/integration/metaflow/metaflow.py,sha256=plhPb2F6AhvLP6NoAmSgBT9nGATh9WSqqC9E6E32uLM,11632 +wandb/integration/openai/__init__.py,sha256=T6x9lIFfw2NzOSi46wi3otY_-DSwyMgnIjMIOIod7iU,66 +wandb/integration/openai/__pycache__/__init__.cpython-312.pyc,, +wandb/integration/openai/__pycache__/fine_tuning.cpython-312.pyc,, +wandb/integration/openai/__pycache__/openai.cpython-312.pyc,, +wandb/integration/openai/__pycache__/resolver.cpython-312.pyc,, +wandb/integration/openai/fine_tuning.py,sha256=UpIJILybS6-tE-rStokvSMAkEute255PjOyDCkJOIaI,18539 +wandb/integration/openai/openai.py,sha256=zGD1kj6yjDP1IfAAYRcltuXD5Bf569CSnMHMf4rDm54,496 +wandb/integration/openai/resolver.py,sha256=KrndobRki0C9SNRL8SgPISea0-D7-1g8kvJMcFMN7SA,8164 +wandb/integration/prodigy/__init__.py,sha256=1-Hg98Y4T1kSNAbrlR9TUrr7dwL1Gxxa-Exu0fsfxl0,66 +wandb/integration/prodigy/__pycache__/__init__.cpython-312.pyc,, +wandb/integration/prodigy/__pycache__/prodigy.cpython-312.pyc,, +wandb/integration/prodigy/prodigy.py,sha256=RQBptD6zlcyuHM5hHU8XUYUZG3smHPRYtgonmW5tirw,11368 +wandb/integration/sacred/__init__.py,sha256=Zzi-m0yRvtbyEgB0N67xSUAWZc1eYBz8Nni3e3OxcHg,5751 +wandb/integration/sacred/__pycache__/__init__.cpython-312.pyc,, +wandb/integration/sagemaker/__init__.py,sha256=Eyd7rArw0IKGR2ll6zGiTXBi6y7E5nYYuyrVABt_9sI,360 +wandb/integration/sagemaker/__pycache__/__init__.cpython-312.pyc,, +wandb/integration/sagemaker/__pycache__/auth.cpython-312.pyc,, +wandb/integration/sagemaker/__pycache__/config.cpython-312.pyc,, +wandb/integration/sagemaker/__pycache__/files.cpython-312.pyc,, +wandb/integration/sagemaker/__pycache__/resources.cpython-312.pyc,, +wandb/integration/sagemaker/auth.py,sha256=X8ns8yOQNikjz4_er-BAy4zdYMmWnQobHmHY1Ytc66w,1013 +wandb/integration/sagemaker/config.py,sha256=XLtB9n0cEUe3hA1N9OAA51E9rKco5UZGRteGv_9SCfE,1748 +wandb/integration/sagemaker/files.py,sha256=WaMBg5Im3GoPHM2AU8GnWEzqmm29EAOtsGsaE3nBaB4,89 +wandb/integration/sagemaker/resources.py,sha256=YBU_dgMt3kqhOCShc2Ge6FFPlwPBjb44fvgvkRMfvJk,1944 +wandb/integration/sb3/__init__.py,sha256=w_VX7C6qAE1vK7xb24JchQtORxzfpXvl6YmZHUIskJM,60 +wandb/integration/sb3/__pycache__/__init__.cpython-312.pyc,, +wandb/integration/sb3/__pycache__/sb3.cpython-312.pyc,, +wandb/integration/sb3/sb3.py,sha256=25fGTc_A1Zve-4MK_6IelAIaKYPg0pj4hB4ZWr0xekw,4797 +wandb/integration/sklearn/__init__.py,sha256=bDnzytR60EFQblaAZdw76WlJBmfG-O7NrKavIEY97Ck,861 +wandb/integration/sklearn/__pycache__/__init__.cpython-312.pyc,, +wandb/integration/sklearn/__pycache__/utils.cpython-312.pyc,, +wandb/integration/sklearn/calculate/__init__.py,sha256=T19bKtuyTbRNzcIg3QbnRD8vm085QJXQFZfQ_STjrCk,1055 +wandb/integration/sklearn/calculate/__pycache__/__init__.cpython-312.pyc,, +wandb/integration/sklearn/calculate/__pycache__/calibration_curves.cpython-312.pyc,, +wandb/integration/sklearn/calculate/__pycache__/class_proportions.cpython-312.pyc,, +wandb/integration/sklearn/calculate/__pycache__/confusion_matrix.cpython-312.pyc,, +wandb/integration/sklearn/calculate/__pycache__/decision_boundaries.cpython-312.pyc,, +wandb/integration/sklearn/calculate/__pycache__/elbow_curve.cpython-312.pyc,, +wandb/integration/sklearn/calculate/__pycache__/feature_importances.cpython-312.pyc,, +wandb/integration/sklearn/calculate/__pycache__/learning_curve.cpython-312.pyc,, +wandb/integration/sklearn/calculate/__pycache__/outlier_candidates.cpython-312.pyc,, +wandb/integration/sklearn/calculate/__pycache__/residuals.cpython-312.pyc,, +wandb/integration/sklearn/calculate/__pycache__/silhouette.cpython-312.pyc,, +wandb/integration/sklearn/calculate/__pycache__/summary_metrics.cpython-312.pyc,, +wandb/integration/sklearn/calculate/calibration_curves.py,sha256=MFGIyWnK5b3Y5uHMHJhtI_a_ZKFawtCgzVYzlw9pf_U,3823 +wandb/integration/sklearn/calculate/class_proportions.py,sha256=ve4zo0F-qslaLoYo2oqzLA5-P4oiYKJNegwSPIFoeZg,2119 +wandb/integration/sklearn/calculate/confusion_matrix.py,sha256=9u6AieiGlq8NPyQIiybalJ4ZQRkPDAZMxFrB2Q_KaJM,2543 +wandb/integration/sklearn/calculate/decision_boundaries.py,sha256=jHpx3WN6_Dbv3C4mUrRegZYmi5NnT-8SJGKkXpNG4Qo,1087 +wandb/integration/sklearn/calculate/elbow_curve.py,sha256=bMkksPxpySAVgzITe-WECwkCXQa2iT6wH1v3po6G328,1454 +wandb/integration/sklearn/calculate/feature_importances.py,sha256=MyhIsOac3P43wDyExblzfFK54ZI2-FfAZpF9jK7is5o,2261 +wandb/integration/sklearn/calculate/learning_curve.py,sha256=c45MVKN9c6nusVs4qNDLr7H5C0OvfHX8W-6yRUQCZJ4,1728 +wandb/integration/sklearn/calculate/outlier_candidates.py,sha256=JCva0qVvamlYQ3KbvL50Wdd9M1-NV9mIos5O1pmjAAw,1946 +wandb/integration/sklearn/calculate/residuals.py,sha256=mkw4VH_JjK2i31zu3dliTWqnwwQa41PZzUMc3abpaHI,2371 +wandb/integration/sklearn/calculate/silhouette.py,sha256=efTHK3sCjLDiTrpnfrYg7AwhSPg8MTRbLPOehfnG2vc,3321 +wandb/integration/sklearn/calculate/summary_metrics.py,sha256=moxThZVRHVHMIp_A5mzS7_66FZTN3w2hu1wY_AgcKj4,2010 +wandb/integration/sklearn/plot/__init__.py,sha256=7RgC3Dakive4tLSmYOBTiNWtFZz-9AJG3AWtW00xcJs,1368 +wandb/integration/sklearn/plot/__pycache__/__init__.cpython-312.pyc,, +wandb/integration/sklearn/plot/__pycache__/classifier.cpython-312.pyc,, +wandb/integration/sklearn/plot/__pycache__/clusterer.cpython-312.pyc,, +wandb/integration/sklearn/plot/__pycache__/regressor.cpython-312.pyc,, +wandb/integration/sklearn/plot/__pycache__/shared.cpython-312.pyc,, +wandb/integration/sklearn/plot/classifier.py,sha256=d9YsJ5Y3j8F4WikxkALruvqilzq5hqLIFuhghzyB48E,11753 +wandb/integration/sklearn/plot/clusterer.py,sha256=iV-UsSjc3VVUKboILhTUZRmd_rLm58HR-xda_5D-fAg,4917 +wandb/integration/sklearn/plot/regressor.py,sha256=mFLK7yhxfRE6MAoF2aQRPbS1hDJQtTxw8W-yD2uau8s,3943 +wandb/integration/sklearn/plot/shared.py,sha256=elvnlCHFlASs7Olnh-MVh7kvuuR89qvfmit2GmbeRMo,2763 +wandb/integration/sklearn/utils.py,sha256=xLJ1VnZkiHcNUxkFRnOoHHq5OKKB8JoVl5buCfIL5gU,5884 +wandb/integration/tensorboard/__init__.py,sha256=6WVdC0NhHePhIk1-j_yqm7jNjByevhfzxgotGsfGm-g,199 +wandb/integration/tensorboard/__pycache__/__init__.cpython-312.pyc,, +wandb/integration/tensorboard/__pycache__/log.cpython-312.pyc,, +wandb/integration/tensorboard/__pycache__/monkeypatch.cpython-312.pyc,, +wandb/integration/tensorboard/log.py,sha256=ErQjGuuqkiMNs3PCdbtycX-hDbAIe7cRtF5MuZyP8so,14076 +wandb/integration/tensorboard/monkeypatch.py,sha256=o-kduzrUmuFfapyFSOKtVtJV4auaut8jZg9p6gcO-UU,6886 +wandb/integration/tensorflow/__init__.py,sha256=_g9Ic-Y4giu-kQHge9Q3kIT52gvFOYVtGXUtMpmH1KU,97 +wandb/integration/tensorflow/__pycache__/__init__.cpython-312.pyc,, +wandb/integration/tensorflow/__pycache__/estimator_hook.cpython-312.pyc,, +wandb/integration/tensorflow/estimator_hook.py,sha256=fi-UtjNZxUnDkzfbNP09iH074z5x0ItZiB4dkvwMGNI,1756 +wandb/integration/torch/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +wandb/integration/torch/__pycache__/__init__.cpython-312.pyc,, +wandb/integration/torch/__pycache__/wandb_torch.cpython-312.pyc,, +wandb/integration/torch/wandb_torch.py,sha256=2mXNijW9HrjwIM7qpFSdIOosiqaIVhcaUeL2BVAwobw,21526 +wandb/integration/ultralytics/__init__.py,sha256=omtrUwOg6GWKWyunhIPclFdQmxW8XIXQaPoF1Ai5WxU,340 +wandb/integration/ultralytics/__pycache__/__init__.cpython-312.pyc,, +wandb/integration/ultralytics/__pycache__/bbox_utils.cpython-312.pyc,, +wandb/integration/ultralytics/__pycache__/callback.cpython-312.pyc,, +wandb/integration/ultralytics/__pycache__/classification_utils.cpython-312.pyc,, +wandb/integration/ultralytics/__pycache__/mask_utils.cpython-312.pyc,, +wandb/integration/ultralytics/__pycache__/pose_utils.cpython-312.pyc,, +wandb/integration/ultralytics/bbox_utils.py,sha256=668VePOI5SuQj2frko8wovH-XZsEwU8s-BQd_yX-NcE,8023 +wandb/integration/ultralytics/callback.py,sha256=1TrtTPYfezTNV1_ugOfNEAhFiaochREnYk2Dx4gNQdU,21297 +wandb/integration/ultralytics/classification_utils.py,sha256=NZy8LA1GYf_qP9SptwIWw8FCaODteuLvbTAd7z_YzAs,3168 +wandb/integration/ultralytics/mask_utils.py,sha256=uzUtDjg4C9_4Z6_fWo0wiylauYvmckZ9JQn0afd1NJg,7080 +wandb/integration/ultralytics/pose_utils.py,sha256=oknJAy_eoyokJY1u03uk_MpR7kKrJIK4wSRBK5lJGyw,3709 +wandb/integration/xgboost/__init__.py,sha256=Pwmii-OI64seJjfwM28cS4BdkEN2_Ms_qMGdwp3QRn8,343 +wandb/integration/xgboost/__pycache__/__init__.cpython-312.pyc,, +wandb/integration/xgboost/__pycache__/xgboost.cpython-312.pyc,, +wandb/integration/xgboost/xgboost.py,sha256=fAaoNixCOeUhxIqVTtrlu85oQu9jmx2aUCVp49oCDYo,6495 +wandb/integration/yolov8/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +wandb/integration/yolov8/__pycache__/__init__.cpython-312.pyc,, +wandb/integration/yolov8/__pycache__/yolov8.cpython-312.pyc,, +wandb/integration/yolov8/yolov8.py,sha256=srryantZqO65pj1x52MiKD5m2SzdQc4nIsj4o1GPK8o,11371 +wandb/jupyter.py,sha256=ADLvYDYK4mSJrsxmwVuE6IBx5o8prFMQvCizm-13_bg,17350 +wandb/mpmain/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +wandb/mpmain/__main__.py,sha256=bLhspPeHQvNMyRNR7xi9v-02XfW1mhJY2yBWI3bYtbg,57 +wandb/mpmain/__pycache__/__init__.cpython-312.pyc,, +wandb/mpmain/__pycache__/__main__.cpython-312.pyc,, +wandb/old/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +wandb/old/__pycache__/__init__.cpython-312.pyc,, +wandb/old/__pycache__/core.cpython-312.pyc,, +wandb/old/__pycache__/settings.cpython-312.pyc,, +wandb/old/__pycache__/summary.cpython-312.pyc,, +wandb/old/core.py,sha256=bIIFlU3_E2hvrVCzMQk1VcwJtxbadbAZwDC0qsF4C2g,1501 +wandb/old/settings.py,sha256=Cug-8ImuV4_x8HFGOnlATuh0iJ4JOUfmymguPFqlXvE,6482 +wandb/old/summary.py,sha256=FZrkTyycUy6MRY1n4q7713rlTV7h-CMr8_kNoeb-wzY,13856 +wandb/plot/__init__.py,sha256=M7sOlxO_hYYV64ZM007B3OjmIqSxF8ToY1aU0DtC-dI,863 +wandb/plot/__pycache__/__init__.cpython-312.pyc,, +wandb/plot/__pycache__/bar.cpython-312.pyc,, +wandb/plot/__pycache__/confusion_matrix.cpython-312.pyc,, +wandb/plot/__pycache__/custom_chart.cpython-312.pyc,, +wandb/plot/__pycache__/histogram.cpython-312.pyc,, +wandb/plot/__pycache__/line.cpython-312.pyc,, +wandb/plot/__pycache__/line_series.cpython-312.pyc,, +wandb/plot/__pycache__/pr_curve.cpython-312.pyc,, +wandb/plot/__pycache__/roc_curve.cpython-312.pyc,, +wandb/plot/__pycache__/scatter.cpython-312.pyc,, +wandb/plot/__pycache__/utils.cpython-312.pyc,, +wandb/plot/__pycache__/viz.cpython-312.pyc,, +wandb/plot/bar.py,sha256=gH29ianBYs-1iV8jjuUlWO6KixXA8Bq_kz0nXmlLmQU,2036 +wandb/plot/confusion_matrix.py,sha256=cjRFhh6WXVvQzuuhieKZ0fVcaMDLLevkrNZlofWiXds,6339 +wandb/plot/custom_chart.py,sha256=NBI5FmSTH9DsrS3eeVbCP04IKRzb2DMcAvmfoOcHnys,4384 +wandb/plot/histogram.py,sha256=aZqM5gLaVU3BbFnngFfchb-2QFSYc32TtEqcBofhaTQ,1701 +wandb/plot/line.py,sha256=LCGgQKhvDwEsypsUMVuGMKKi_AmC716mNh1p1hCWljE,2369 +wandb/plot/line_series.py,sha256=Mr_UgVS8VAWytDZryQ5R3rXc_K8war2B1OZNaLJFYog,5558 +wandb/plot/pr_curve.py,sha256=fZDATHJHK10vCLcZaUSmIwSCfr8uoMVfvO4njLTzC0E,6602 +wandb/plot/roc_curve.py,sha256=rzKwKKC-ZQzkKLoUZ3rKmG4-oRF2sZcRkcsQEnKRZWM,5619 +wandb/plot/scatter.py,sha256=ilFNDknfPL7qj6VRCTKVTeq3-8agS-3ogU83UpP-gUA,2045 +wandb/plot/utils.py,sha256=Q3SN29syvRBsb6dpcg11-Km6PFT4uQPOEfhtNrG0pmQ,6769 +wandb/plot/viz.py,sha256=ni1MTkt3k1TxSqArdIR_sVcD1cV0j9eKmJdX0QlBcOM,943 +wandb/proto/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +wandb/proto/__pycache__/__init__.cpython-312.pyc,, +wandb/proto/__pycache__/wandb_base_pb2.cpython-312.pyc,, +wandb/proto/__pycache__/wandb_deprecated.cpython-312.pyc,, +wandb/proto/__pycache__/wandb_generate_deprecated.cpython-312.pyc,, +wandb/proto/__pycache__/wandb_generate_proto.cpython-312.pyc,, +wandb/proto/__pycache__/wandb_internal_pb2.cpython-312.pyc,, +wandb/proto/__pycache__/wandb_server_pb2.cpython-312.pyc,, +wandb/proto/__pycache__/wandb_settings_pb2.cpython-312.pyc,, +wandb/proto/__pycache__/wandb_telemetry_pb2.cpython-312.pyc,, +wandb/proto/v3/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +wandb/proto/v3/__pycache__/__init__.cpython-312.pyc,, +wandb/proto/v3/__pycache__/wandb_base_pb2.cpython-312.pyc,, +wandb/proto/v3/__pycache__/wandb_internal_pb2.cpython-312.pyc,, +wandb/proto/v3/__pycache__/wandb_server_pb2.cpython-312.pyc,, +wandb/proto/v3/__pycache__/wandb_settings_pb2.cpython-312.pyc,, +wandb/proto/v3/__pycache__/wandb_telemetry_pb2.cpython-312.pyc,, +wandb/proto/v3/wandb_base_pb2.py,sha256=_nsr_HW4Fdz62-KiXGo6Dw0_9bwdXz07auZkkH2QfSI,2355 +wandb/proto/v3/wandb_internal_pb2.py,sha256=4H5TAutKIw2P0etvIaaqFFaontK5mog4KKlVd2fFEmA,116940 +wandb/proto/v3/wandb_server_pb2.py,sha256=LQCUmuy0NFDo20N9uCUiE5VPyhP5r929WKtniae4CdQ,15514 +wandb/proto/v3/wandb_settings_pb2.py,sha256=GlmZKFANXdZmqv-glm8pgM9XxHXhzf1JWNYIgtKLJGw,21846 +wandb/proto/v3/wandb_telemetry_pb2.py,sha256=fD1_oZfqgiRghlqZE5CyXO437-_OgVv9ZIBjx9YtCno,14332 +wandb/proto/v4/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +wandb/proto/v4/__pycache__/__init__.cpython-312.pyc,, +wandb/proto/v4/__pycache__/wandb_base_pb2.cpython-312.pyc,, +wandb/proto/v4/__pycache__/wandb_internal_pb2.cpython-312.pyc,, +wandb/proto/v4/__pycache__/wandb_server_pb2.cpython-312.pyc,, +wandb/proto/v4/__pycache__/wandb_settings_pb2.cpython-312.pyc,, +wandb/proto/v4/__pycache__/wandb_telemetry_pb2.cpython-312.pyc,, +wandb/proto/v4/wandb_base_pb2.py,sha256=El5lnZMRpkc1W4SlZgeKoDPqWiJau0BG8QfigMMt6bM,1422 +wandb/proto/v4/wandb_internal_pb2.py,sha256=36TH4nj7e_VyMKeBsOKvlZu7vRxG2S8T_QPEAbwBXgA,53715 +wandb/proto/v4/wandb_server_pb2.py,sha256=NiG6Xv9CDvxc8v8NmnM237jyYqMuRyE_nqmLAMZVdI8,6977 +wandb/proto/v4/wandb_settings_pb2.py,sha256=gPObgqI1Uy3BushWew48n8rgCLCsH06cMFCIGbP7EHg,18221 +wandb/proto/v4/wandb_telemetry_pb2.py,sha256=xQdi3cm85CE4Ck0NAtPvdK7FFtEYoXXBEGlIIF2TXvs,11779 +wandb/proto/v5/__pycache__/wandb_base_pb2.cpython-312.pyc,, +wandb/proto/v5/__pycache__/wandb_internal_pb2.cpython-312.pyc,, +wandb/proto/v5/__pycache__/wandb_server_pb2.cpython-312.pyc,, +wandb/proto/v5/__pycache__/wandb_settings_pb2.cpython-312.pyc,, +wandb/proto/v5/__pycache__/wandb_telemetry_pb2.cpython-312.pyc,, +wandb/proto/v5/wandb_base_pb2.py,sha256=u7VVWdExJ4WDkYNMV-xvWvyQ-NTIbAqToTKtgEqt_Lg,1572 +wandb/proto/v5/wandb_internal_pb2.py,sha256=fnAbLeuCfkFJkndKR-El1Xx6etwwoLDkJAuXd2ShYYE,58062 +wandb/proto/v5/wandb_server_pb2.py,sha256=f55mk3Z77xUnq_tAbTd_Q75CiOJz6ppPbZT7CoeF7-I,7535 +wandb/proto/v5/wandb_settings_pb2.py,sha256=12an1CH04EdQAZ0EPeJHFXhVbLcKXIGco3iKFvv8gnI,18577 +wandb/proto/v5/wandb_telemetry_pb2.py,sha256=vzKZOXISSGB0C2HaPAqCwC0gh_tQ-LzkT9qIkqmwSqg,12049 +wandb/proto/v6/__pycache__/wandb_base_pb2.cpython-312.pyc,, +wandb/proto/v6/__pycache__/wandb_internal_pb2.cpython-312.pyc,, +wandb/proto/v6/__pycache__/wandb_server_pb2.cpython-312.pyc,, +wandb/proto/v6/__pycache__/wandb_settings_pb2.cpython-312.pyc,, +wandb/proto/v6/__pycache__/wandb_telemetry_pb2.cpython-312.pyc,, +wandb/proto/v6/wandb_base_pb2.py,sha256=5NJU1W7zgKLIsKL5brRoOL4HcLOxWieIKlWEe1IM0_g,1821 +wandb/proto/v6/wandb_internal_pb2.py,sha256=DvKxkCsrcGowXBPKKV93ZnQlAmPNHtf1kTYbKILdhcw,58315 +wandb/proto/v6/wandb_server_pb2.py,sha256=jH4AJat2sz9hR88er6D4yb-6bNLY5nPW5oX5CuHjBLc,7786 +wandb/proto/v6/wandb_settings_pb2.py,sha256=pAJA82SYCRtZs7OgUQL-OYs1Kkp1iyVayoVmRLaI6O4,18830 +wandb/proto/v6/wandb_telemetry_pb2.py,sha256=PcQVbRaqN01nHu0OBi6UPHSeSpuw7rDy4mup2RYWH04,12303 +wandb/proto/wandb_base_pb2.py,sha256=h09-9fMDbMC82T3jWHzmh8MB8llZ9o9za0uBOF_bL_s,385 +wandb/proto/wandb_deprecated.py,sha256=1-Q8uG5gowgpWg9loSLwavCGDCyLbcL6UQBcZ3OzNoI,2422 +wandb/proto/wandb_generate_deprecated.py,sha256=Iyf7PwIL_2B7XohrckYLbjjT09lccwbqknxtWelJpJM,1002 +wandb/proto/wandb_generate_proto.py,sha256=KO1hlAUBGHQRNKsddhcSXvh5a6rmFM3kshKTWftbWwY,1278 +wandb/proto/wandb_internal_pb2.py,sha256=hTpbURqJyoNcwHD7o3k0ofmKgZdmKEYUm9sBqLHa5iA,628 +wandb/proto/wandb_server_pb2.py,sha256=82Cf27PnDjHbkQT_-ZPjQyI0AVYd9YWoAlABrGPD-xo,393 +wandb/proto/wandb_settings_pb2.py,sha256=Wba7SDYTKy-Sm2sYrTmqwYH6sBvdD9ogE1i87lt_85A,401 +wandb/proto/wandb_telemetry_pb2.py,sha256=Y9uzA6O9yUJ3HKqYOi86hg-mZ49NtSzQ_XRFSCONolA,405 +wandb/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +wandb/sdk/__init__.py,sha256=N-GTAC0AzbZF2J8RzB33DTmYk9u-jubllCwvhWrPgsE,813 +wandb/sdk/__pycache__/__init__.cpython-312.pyc,, +wandb/sdk/__pycache__/wandb_alerts.cpython-312.pyc,, +wandb/sdk/__pycache__/wandb_config.cpython-312.pyc,, +wandb/sdk/__pycache__/wandb_helper.cpython-312.pyc,, +wandb/sdk/__pycache__/wandb_init.cpython-312.pyc,, +wandb/sdk/__pycache__/wandb_login.cpython-312.pyc,, +wandb/sdk/__pycache__/wandb_metric.cpython-312.pyc,, +wandb/sdk/__pycache__/wandb_require.cpython-312.pyc,, +wandb/sdk/__pycache__/wandb_require_helpers.cpython-312.pyc,, +wandb/sdk/__pycache__/wandb_run.cpython-312.pyc,, +wandb/sdk/__pycache__/wandb_settings.cpython-312.pyc,, +wandb/sdk/__pycache__/wandb_setup.cpython-312.pyc,, +wandb/sdk/__pycache__/wandb_summary.cpython-312.pyc,, +wandb/sdk/__pycache__/wandb_sweep.cpython-312.pyc,, +wandb/sdk/__pycache__/wandb_sync.cpython-312.pyc,, +wandb/sdk/__pycache__/wandb_watch.cpython-312.pyc,, +wandb/sdk/artifacts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +wandb/sdk/artifacts/__pycache__/__init__.cpython-312.pyc,, +wandb/sdk/artifacts/__pycache__/_graphql_fragments.cpython-312.pyc,, +wandb/sdk/artifacts/__pycache__/_internal_artifact.cpython-312.pyc,, +wandb/sdk/artifacts/__pycache__/_validators.cpython-312.pyc,, +wandb/sdk/artifacts/__pycache__/artifact.cpython-312.pyc,, +wandb/sdk/artifacts/__pycache__/artifact_download_logger.cpython-312.pyc,, +wandb/sdk/artifacts/__pycache__/artifact_file_cache.cpython-312.pyc,, +wandb/sdk/artifacts/__pycache__/artifact_instance_cache.cpython-312.pyc,, +wandb/sdk/artifacts/__pycache__/artifact_manifest.cpython-312.pyc,, +wandb/sdk/artifacts/__pycache__/artifact_manifest_entry.cpython-312.pyc,, +wandb/sdk/artifacts/__pycache__/artifact_saver.cpython-312.pyc,, +wandb/sdk/artifacts/__pycache__/artifact_state.cpython-312.pyc,, +wandb/sdk/artifacts/__pycache__/artifact_ttl.cpython-312.pyc,, +wandb/sdk/artifacts/__pycache__/exceptions.cpython-312.pyc,, +wandb/sdk/artifacts/__pycache__/staging.cpython-312.pyc,, +wandb/sdk/artifacts/__pycache__/storage_handler.cpython-312.pyc,, +wandb/sdk/artifacts/__pycache__/storage_layout.cpython-312.pyc,, +wandb/sdk/artifacts/__pycache__/storage_policy.cpython-312.pyc,, +wandb/sdk/artifacts/_generated/__init__.py,sha256=-SEKkwBmb5R6FhvBF83HcA-ieoxt6rjVYlpIpzBdd4I,12294 +wandb/sdk/artifacts/_generated/__pycache__/__init__.cpython-312.pyc,, +wandb/sdk/artifacts/_generated/__pycache__/add_aliases.cpython-312.pyc,, +wandb/sdk/artifacts/_generated/__pycache__/artifact_collection_membership_files.cpython-312.pyc,, +wandb/sdk/artifacts/_generated/__pycache__/artifact_version_files.cpython-312.pyc,, +wandb/sdk/artifacts/_generated/__pycache__/create_artifact_collection_tag_assignments.cpython-312.pyc,, +wandb/sdk/artifacts/_generated/__pycache__/delete_aliases.cpython-312.pyc,, +wandb/sdk/artifacts/_generated/__pycache__/delete_artifact_collection_tag_assignments.cpython-312.pyc,, +wandb/sdk/artifacts/_generated/__pycache__/delete_artifact_portfolio.cpython-312.pyc,, +wandb/sdk/artifacts/_generated/__pycache__/delete_artifact_sequence.cpython-312.pyc,, +wandb/sdk/artifacts/_generated/__pycache__/enums.cpython-312.pyc,, +wandb/sdk/artifacts/_generated/__pycache__/fetch_linked_artifacts.cpython-312.pyc,, +wandb/sdk/artifacts/_generated/__pycache__/fragments.cpython-312.pyc,, +wandb/sdk/artifacts/_generated/__pycache__/input_types.cpython-312.pyc,, +wandb/sdk/artifacts/_generated/__pycache__/link_artifact.cpython-312.pyc,, +wandb/sdk/artifacts/_generated/__pycache__/move_artifact_collection.cpython-312.pyc,, +wandb/sdk/artifacts/_generated/__pycache__/operations.cpython-312.pyc,, +wandb/sdk/artifacts/_generated/__pycache__/project_artifact_collection.cpython-312.pyc,, +wandb/sdk/artifacts/_generated/__pycache__/project_artifact_collections.cpython-312.pyc,, +wandb/sdk/artifacts/_generated/__pycache__/project_artifact_type.cpython-312.pyc,, +wandb/sdk/artifacts/_generated/__pycache__/project_artifact_types.cpython-312.pyc,, +wandb/sdk/artifacts/_generated/__pycache__/project_artifacts.cpython-312.pyc,, +wandb/sdk/artifacts/_generated/__pycache__/run_input_artifacts.cpython-312.pyc,, +wandb/sdk/artifacts/_generated/__pycache__/run_output_artifacts.cpython-312.pyc,, +wandb/sdk/artifacts/_generated/__pycache__/update_artifact.cpython-312.pyc,, +wandb/sdk/artifacts/_generated/__pycache__/update_artifact_portfolio.cpython-312.pyc,, +wandb/sdk/artifacts/_generated/__pycache__/update_artifact_sequence.cpython-312.pyc,, +wandb/sdk/artifacts/_generated/add_aliases.py,sha256=-DCPnnu6-ydKyALEd8E0pxDXGGaYriHj-ktUixML4Lk,395 +wandb/sdk/artifacts/_generated/artifact_collection_membership_files.py,sha256=iRG2YDjHIDgG9_O5sI4ltkJX6ILCAGJgEKJA_ImO7wE,1343 +wandb/sdk/artifacts/_generated/artifact_version_files.py,sha256=-yPP-7wlB-jgv4BKrIm_7NeCucCcDwGvOb2rZSphUsk,925 +wandb/sdk/artifacts/_generated/create_artifact_collection_tag_assignments.py,sha256=jvM9wBU7gfqbIyno7IvfQAh9Jbvp_bMFFDKph7qjpe8,1034 +wandb/sdk/artifacts/_generated/delete_aliases.py,sha256=0lDMciBaXsJR2XSjFO0_zgTaNRc0gPrBMwmOJLogD_A,419 +wandb/sdk/artifacts/_generated/delete_artifact_collection_tag_assignments.py,sha256=BHJKnPZbWcdHLg4-uQ2V51i4OM2voSUdovfYM5Zv7JA,642 +wandb/sdk/artifacts/_generated/delete_artifact_portfolio.py,sha256=lsGr5vO2EiySHEOZ-KdWdaEXdLO9-YEavXlbuIKanYY,991 +wandb/sdk/artifacts/_generated/delete_artifact_sequence.py,sha256=UGA_ymMNL8t1Bu5ThfKRl89B-elsUYhCdMa9_dGkUXU,979 +wandb/sdk/artifacts/_generated/enums.py,sha256=Av9fHhSrUJDDaWPhS4fGJGLu_9X0lGhGjpKKnAEQ8iM,345 +wandb/sdk/artifacts/_generated/fetch_linked_artifacts.py,sha256=17-3j0Tmiv2D1H--RpdE1AoRC5sHnw6DoGpavaEZ52U,2148 +wandb/sdk/artifacts/_generated/fragments.py,sha256=xrqKHgziNdYqbxcJ6QBsHaxeb1Ok8dnxpI-MpS9z7uE,6691 +wandb/sdk/artifacts/_generated/input_types.py,sha256=nq6YCF9DLpvIXqcJ7HiJ1MJgmed69sFJUcU7hV5TRSE,1514 +wandb/sdk/artifacts/_generated/link_artifact.py,sha256=c9qxPnQitxuKGms5F8iOOHwixD0ftlr8RhIe7jcadxs,456 +wandb/sdk/artifacts/_generated/move_artifact_collection.py,sha256=Jb4kOxyoNinSY_UUuqskBG3uuFN0KanevXOgXb4Q8mw,962 +wandb/sdk/artifacts/_generated/operations.py,sha256=xjEoM-wn45swtYk8EGgce3vP_jkGkOr2rYjCfsh-sGk,13035 +wandb/sdk/artifacts/_generated/project_artifact_collection.py,sha256=sMfS5nueyZz_EEQrdo2J7h9xo346jsAglAofHnqz1-k,3393 +wandb/sdk/artifacts/_generated/project_artifact_collections.py,sha256=4vgbbsMeblXtbn3ebloXDGz20x5JRxzwZpZhci5x--w,865 +wandb/sdk/artifacts/_generated/project_artifact_type.py,sha256=NOYXo2UYV1cslcbjSi0Q9167Iv5iksj9LS1XzcbsbXM,543 +wandb/sdk/artifacts/_generated/project_artifact_types.py,sha256=rGbW8kK66zR72kLklWuAcDnzmp7KkCFTXLvsUctlewY,542 +wandb/sdk/artifacts/_generated/project_artifacts.py,sha256=noPODtFVotO69VK5oHZeU8NF4aYLKsPPRHOtNMPhn38,1128 +wandb/sdk/artifacts/_generated/run_input_artifacts.py,sha256=B9qtwEBoYXG55UuNq18MmRtOlMk2mvXukKDTW_dmPbQ,1406 +wandb/sdk/artifacts/_generated/run_output_artifacts.py,sha256=055RjKbfuVwiWM2eKpErMIFiY7S74pLTjFdRSypYf1g,1432 +wandb/sdk/artifacts/_generated/update_artifact.py,sha256=FYzYORox9ZaQA_QI-bBYJnytHQeq9DrrRgOj4iYvlQc,540 +wandb/sdk/artifacts/_generated/update_artifact_portfolio.py,sha256=tcEUGOoAE8pqr27tCwJoA9-Z95s_gNlIQkDCaUiFqkE,978 +wandb/sdk/artifacts/_generated/update_artifact_sequence.py,sha256=dwkvOYLgSbTSuwjZKvW9DtlW1Q78YPgQnayuVIA1P0U,966 +wandb/sdk/artifacts/_graphql_fragments.py,sha256=71o_SBwXhaD21UPWrCUu6zyhwez1btQBj6POmVvt0H0,2602 +wandb/sdk/artifacts/_internal_artifact.py,sha256=9DbDv5EbBm1W10gE2bWbzykv2BtpdkUG-k8zlpaL9Tw,1451 +wandb/sdk/artifacts/_validators.py,sha256=0EzuoBKoopT-aR10k3qBKsFzjj43hng9LsOrPJLMPfY,10576 +wandb/sdk/artifacts/artifact.py,sha256=0Tqtu0IM47OWWDzKOAnmowpIvqxmLMJpVv1skNCM1_A,106191 +wandb/sdk/artifacts/artifact_download_logger.py,sha256=bS4v544rFcTOTRTXMUSd6tfLUXzezbIogDpQmZUjah0,1537 +wandb/sdk/artifacts/artifact_file_cache.py,sha256=ErHjabIx-g8gWoCICAGEM5FU4_7aACQc3j0i0h7tm9A,9677 +wandb/sdk/artifacts/artifact_instance_cache.py,sha256=atSUDvKjkp6by6QY0w2FLMrFUg9UKc8TIrMVWGauV64,501 +wandb/sdk/artifacts/artifact_manifest.py,sha256=YYC6o2OooTcVfkzqQIIVcxVxqdSN9TELG-qWgaSI2Qo,2545 +wandb/sdk/artifacts/artifact_manifest_entry.py,sha256=JyvVLSMFISgwj-O-UkdzsjmuAV0UOzjrsl7OAaKUjHA,8643 +wandb/sdk/artifacts/artifact_manifests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +wandb/sdk/artifacts/artifact_manifests/__pycache__/__init__.cpython-312.pyc,, +wandb/sdk/artifacts/artifact_manifests/__pycache__/artifact_manifest_v1.cpython-312.pyc,, +wandb/sdk/artifacts/artifact_manifests/artifact_manifest_v1.py,sha256=IW0xTXh4j-GxgypmcJkkefXnopPrycnSnPF1Sl5ypfs,3443 +wandb/sdk/artifacts/artifact_saver.py,sha256=RwJIveLn87UE3_tk5zAJ8ry-TAvxwTS94yNAChwhLAk,9654 +wandb/sdk/artifacts/artifact_state.py,sha256=JbPVinN8Vaq16IKdPtFmiYbBdBtCKLDMVU_ViMI8QOA,272 +wandb/sdk/artifacts/artifact_ttl.py,sha256=kD_JfKVcQzZlif6PF-WKnemucWPwcISq8hX6Y8lKtY8,122 +wandb/sdk/artifacts/exceptions.py,sha256=w0ScWmElSSHHFeh_HQ-Wae4P1U1RMztDCXN0PhyejbE,2333 +wandb/sdk/artifacts/staging.py,sha256=QNbPQhlW-w2liQ_5ZgGJaxsp-prPrOAZ1InmCx3N9Zk,890 +wandb/sdk/artifacts/storage_handler.py,sha256=ebMCKXvvn7z_eYunXriTOYescstuBbNbxn7MDW9qZAw,1834 +wandb/sdk/artifacts/storage_handlers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +wandb/sdk/artifacts/storage_handlers/__pycache__/__init__.cpython-312.pyc,, +wandb/sdk/artifacts/storage_handlers/__pycache__/azure_handler.cpython-312.pyc,, +wandb/sdk/artifacts/storage_handlers/__pycache__/gcs_handler.cpython-312.pyc,, +wandb/sdk/artifacts/storage_handlers/__pycache__/http_handler.cpython-312.pyc,, +wandb/sdk/artifacts/storage_handlers/__pycache__/local_file_handler.cpython-312.pyc,, +wandb/sdk/artifacts/storage_handlers/__pycache__/multi_handler.cpython-312.pyc,, +wandb/sdk/artifacts/storage_handlers/__pycache__/s3_handler.cpython-312.pyc,, +wandb/sdk/artifacts/storage_handlers/__pycache__/tracking_handler.cpython-312.pyc,, +wandb/sdk/artifacts/storage_handlers/__pycache__/wb_artifact_handler.cpython-312.pyc,, +wandb/sdk/artifacts/storage_handlers/__pycache__/wb_local_artifact_handler.cpython-312.pyc,, +wandb/sdk/artifacts/storage_handlers/azure_handler.py,sha256=Y0B79t9xDrXo361O9x6VFPQWJOozIPlzQRaGx6768Sw,8333 +wandb/sdk/artifacts/storage_handlers/gcs_handler.py,sha256=hGslEr9QYi0Jp5_C5fxv7CaRu219tdmldyayncze0vc,8514 +wandb/sdk/artifacts/storage_handlers/http_handler.py,sha256=BI-NlGm0WRwGz8B-ZW9YtDEwlClvNwCE4_LRwSlXlpw,4070 +wandb/sdk/artifacts/storage_handlers/local_file_handler.py,sha256=SiRfKwfr9brkm0tDhMDpgxhHH6FOlasRaliznL9zyN0,5470 +wandb/sdk/artifacts/storage_handlers/multi_handler.py,sha256=GZ9wAfVSuZE3IGL5F5ojM_GPrRqYIYTJxWSsqFn9HiI,1842 +wandb/sdk/artifacts/storage_handlers/s3_handler.py,sha256=WLplF8kL3vRKnhxIitrYciN58PmIcReVfxQEkkMqeA0,12898 +wandb/sdk/artifacts/storage_handlers/tracking_handler.py,sha256=4MFqhnVciygmANKOrMSZwew4TXAFg5Q7zAZFz0FbpWM,2487 +wandb/sdk/artifacts/storage_handlers/wb_artifact_handler.py,sha256=sKu9VRCcgd9DYPPdCN49Fl63g6_HfHX124xnnFyZPe8,4764 +wandb/sdk/artifacts/storage_handlers/wb_local_artifact_handler.py,sha256=MpYHgEkbjt1VCUV-lfg1f3MscOK10tZHSJwOFjCzGBg,2562 +wandb/sdk/artifacts/storage_layout.py,sha256=JeI2uVqreJynIVNhFVvh7Acm-Wem25ueFQvcxg_svZU,109 +wandb/sdk/artifacts/storage_policies/__init__.py,sha256=bgpWKElL-3iHcLO8pF-L8oezG-dQbp_6vcCYo7CEFAU,226 +wandb/sdk/artifacts/storage_policies/__pycache__/__init__.cpython-312.pyc,, +wandb/sdk/artifacts/storage_policies/__pycache__/register.cpython-312.pyc,, +wandb/sdk/artifacts/storage_policies/__pycache__/wandb_storage_policy.cpython-312.pyc,, +wandb/sdk/artifacts/storage_policies/register.py,sha256=xT7kUxubtLqyE-9S6U9E4mCo1PtXl0ZEJ6gVQiS-kGQ,49 +wandb/sdk/artifacts/storage_policies/wandb_storage_policy.py,sha256=g2HXQ_8Zg8ZzZS1P1UUf7Y2ePPGeWLA62GCARuu8zfc,22174 +wandb/sdk/artifacts/storage_policy.py,sha256=b87WYRCrzKBKy0WBNjZIB_98_YbnqP7eKS3CoKT_Ig0,2216 +wandb/sdk/backend/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +wandb/sdk/backend/__pycache__/__init__.cpython-312.pyc,, +wandb/sdk/backend/__pycache__/backend.cpython-312.pyc,, +wandb/sdk/backend/backend.py,sha256=yh3ldxlKXXIXGk7vKDwEu0OolI6MD1B2LTQSu6sBEg4,1310 +wandb/sdk/data_types/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +wandb/sdk/data_types/__pycache__/__init__.cpython-312.pyc,, +wandb/sdk/data_types/__pycache__/_dtypes.cpython-312.pyc,, +wandb/sdk/data_types/__pycache__/_private.cpython-312.pyc,, +wandb/sdk/data_types/__pycache__/audio.cpython-312.pyc,, +wandb/sdk/data_types/__pycache__/bokeh.cpython-312.pyc,, +wandb/sdk/data_types/__pycache__/graph.cpython-312.pyc,, +wandb/sdk/data_types/__pycache__/histogram.cpython-312.pyc,, +wandb/sdk/data_types/__pycache__/html.cpython-312.pyc,, +wandb/sdk/data_types/__pycache__/image.cpython-312.pyc,, +wandb/sdk/data_types/__pycache__/molecule.cpython-312.pyc,, +wandb/sdk/data_types/__pycache__/object_3d.cpython-312.pyc,, +wandb/sdk/data_types/__pycache__/plotly.cpython-312.pyc,, +wandb/sdk/data_types/__pycache__/saved_model.cpython-312.pyc,, +wandb/sdk/data_types/__pycache__/table.cpython-312.pyc,, +wandb/sdk/data_types/__pycache__/table_decorators.cpython-312.pyc,, +wandb/sdk/data_types/__pycache__/trace_tree.cpython-312.pyc,, +wandb/sdk/data_types/__pycache__/utils.cpython-312.pyc,, +wandb/sdk/data_types/__pycache__/video.cpython-312.pyc,, +wandb/sdk/data_types/_dtypes.py,sha256=rzcYQjkQeD9Xb9zJg-5w8RWs7LEMcXf_167zKWgXfiE,29988 +wandb/sdk/data_types/_private.py,sha256=zp2NRarTlIq4Hk3R2xp7j_qPGNzBMnaGHrZUN82shaY,299 +wandb/sdk/data_types/audio.py,sha256=1wGIHBIsYknRuTdrSB-TE124xfWrq4_JLTkOuCZkM2I,5625 +wandb/sdk/data_types/base_types/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +wandb/sdk/data_types/base_types/__pycache__/__init__.cpython-312.pyc,, +wandb/sdk/data_types/base_types/__pycache__/json_metadata.cpython-312.pyc,, +wandb/sdk/data_types/base_types/__pycache__/media.cpython-312.pyc,, +wandb/sdk/data_types/base_types/__pycache__/wb_value.cpython-312.pyc,, +wandb/sdk/data_types/base_types/json_metadata.py,sha256=oKpimndUQvDW30n15tb2pbyyyKhhWwm8wsYNBEot060,1553 +wandb/sdk/data_types/base_types/media.py,sha256=0ctA_rMUKAvOzF68ZbRmrDdvL0q-O6y2icfJ5UGyIYY,14552 +wandb/sdk/data_types/base_types/wb_value.py,sha256=1HMmyMv7khaAu2scP9GYsmXbr0XAw75W2-RCNK5Nm_o,12067 +wandb/sdk/data_types/bokeh.py,sha256=RuMsi7v_yJyMEuYjfrwTL1q1B8svdCW9t_eNge9aEJA,2874 +wandb/sdk/data_types/graph.py,sha256=_P_z2dNj2mCJeSvusIfVHkSkVB9AL0AEO-6KaguC1ys,12089 +wandb/sdk/data_types/helper_types/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +wandb/sdk/data_types/helper_types/__pycache__/__init__.cpython-312.pyc,, +wandb/sdk/data_types/helper_types/__pycache__/bounding_boxes_2d.cpython-312.pyc,, +wandb/sdk/data_types/helper_types/__pycache__/classes.cpython-312.pyc,, +wandb/sdk/data_types/helper_types/__pycache__/image_mask.cpython-312.pyc,, +wandb/sdk/data_types/helper_types/bounding_boxes_2d.py,sha256=Uy7b059tDU_XLfbwbjlIZKfalATk3frCKprSALnSBlo,13833 +wandb/sdk/data_types/helper_types/classes.py,sha256=cg-AwUgULbb3T_-ptOdliXGvYjXZYRj8rvSmT7fl9ds,5520 +wandb/sdk/data_types/helper_types/image_mask.py,sha256=vlLHCByb1ZdAjSTX2uKXm9Ro_4xSjhD5BoNFe7h1Zd8,8914 +wandb/sdk/data_types/histogram.py,sha256=syx3fUDoP6vYqA3r5m7bHXK6MAWo2MkRhpCKasihwvg,3145 +wandb/sdk/data_types/html.py,sha256=HTh2nNlJsncLgou1gXz6e-f_loaHInMEJerzlDLqKzc,4381 +wandb/sdk/data_types/image.py,sha256=xdYth860StgcqoUJ0o4NPncj83XB5BRWI7ypY5PbrUY,34811 +wandb/sdk/data_types/molecule.py,sha256=_eVzkFEO-uydch8dsw6GjaW_hNGrZwUFfU_inMj70gM,8549 +wandb/sdk/data_types/object_3d.py,sha256=83ordMmzmmFun2fp2z9P3dffNJ0fW_Hv7MfpDZROYcc,16282 +wandb/sdk/data_types/plotly.py,sha256=LEIHRqtHHpSou04AEUsyH8_UMXP4adrEHHaKoEtQkxo,2913 +wandb/sdk/data_types/saved_model.py,sha256=WMohx2DfSaPREqLfVcOvh8fBBft_FkoWLjWMw1GeFSE,16312 +wandb/sdk/data_types/table.py,sha256=9mb7_KZKSZ-rQNy0si_pWTerVbKLG44abtSqd2kXLeQ,53707 +wandb/sdk/data_types/table_decorators.py,sha256=2D0dlnv7sBvrHyYH61LCCMhowmg8CENqyvth9BID-VQ,3727 +wandb/sdk/data_types/trace_tree.py,sha256=zPWT-tofO4YqaFhB65SnqFMnpXgTwRl48apU04y6VeQ,14838 +wandb/sdk/data_types/utils.py,sha256=s9aVonN1_vZH7o29lHJPGOMKZkyjroAs3VkT6ENlN0g,8962 +wandb/sdk/data_types/video.py,sha256=JQ9ZJ-IqocQ7fI9iGswG_JwB0gUk89JXgMSUOemVak8,9835 +wandb/sdk/integration_utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +wandb/sdk/integration_utils/__pycache__/__init__.cpython-312.pyc,, +wandb/sdk/integration_utils/__pycache__/auto_logging.cpython-312.pyc,, +wandb/sdk/integration_utils/__pycache__/data_logging.cpython-312.pyc,, +wandb/sdk/integration_utils/auto_logging.py,sha256=sblNn9BIG7memxTj23UfrGXyA06t39FEt5igMwS0-zU,8233 +wandb/sdk/integration_utils/data_logging.py,sha256=DDFtDaUu50aeTTgxCHHYd2f85guqqf2xfEOburRlwwQ,19533 +wandb/sdk/interface/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +wandb/sdk/interface/__pycache__/__init__.cpython-312.pyc,, +wandb/sdk/interface/__pycache__/constants.cpython-312.pyc,, +wandb/sdk/interface/__pycache__/interface.cpython-312.pyc,, +wandb/sdk/interface/__pycache__/interface_queue.cpython-312.pyc,, +wandb/sdk/interface/__pycache__/interface_relay.cpython-312.pyc,, +wandb/sdk/interface/__pycache__/interface_shared.cpython-312.pyc,, +wandb/sdk/interface/__pycache__/interface_sock.cpython-312.pyc,, +wandb/sdk/interface/__pycache__/router.cpython-312.pyc,, +wandb/sdk/interface/__pycache__/router_queue.cpython-312.pyc,, +wandb/sdk/interface/__pycache__/router_relay.cpython-312.pyc,, +wandb/sdk/interface/__pycache__/router_sock.cpython-312.pyc,, +wandb/sdk/interface/__pycache__/summary_record.cpython-312.pyc,, +wandb/sdk/interface/constants.py,sha256=NJNBFr7LkshLI837D3LU3JuEURLzBwza9H-kxcy4ihw,60 +wandb/sdk/interface/interface.py,sha256=eHQEQinq_tU8uCM3I_nqDXvyjEGrt3cs4a_S8D9b9KU,37888 +wandb/sdk/interface/interface_queue.py,sha256=zOjUB2nf_wNMoEeXGWP5di-u4-UL2_jvsVZw53EbEsk,1257 +wandb/sdk/interface/interface_relay.py,sha256=lM5ZgJc6m8BS-nWOuzMCwAK0ve9UBGgOD2rgJ9flIhI,867 +wandb/sdk/interface/interface_shared.py,sha256=rDLFSkBWIUp-4Z3eh7r434WjCrI90hHJ6YV62x-XEao,18234 +wandb/sdk/interface/interface_sock.py,sha256=rz6uwKNzLpGDCCVGSlC6ABspmkYD5LnGX_cd9dvaAwU,1043 +wandb/sdk/interface/router.py,sha256=hlYzz7DjDt3sYDJQYLE1NHkxGFDezHgmfznnPRHPcHU,2630 +wandb/sdk/interface/router_queue.py,sha256=wnApY1iXa_3L0-HO6t42Nbsh68zyEw3FWN3oI6PmoXM,1049 +wandb/sdk/interface/router_relay.py,sha256=tOBQYEX7PGw9-qE91CdNhLEQb9KbJiQnlHg7XBOsijA,1390 +wandb/sdk/interface/router_sock.py,sha256=S15CRwMoDFYKnEzwqAjvPQC6BlKtJpxE_rZHeaxM2V4,1002 +wandb/sdk/interface/summary_record.py,sha256=-wDv_zLYueeUY8IzyF9NPYnYwF3iBpUWbrsGcHAd2YM,1677 +wandb/sdk/internal/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +wandb/sdk/internal/__pycache__/__init__.cpython-312.pyc,, +wandb/sdk/internal/__pycache__/context.cpython-312.pyc,, +wandb/sdk/internal/__pycache__/datastore.cpython-312.pyc,, +wandb/sdk/internal/__pycache__/file_pusher.cpython-312.pyc,, +wandb/sdk/internal/__pycache__/file_stream.cpython-312.pyc,, +wandb/sdk/internal/__pycache__/handler.cpython-312.pyc,, +wandb/sdk/internal/__pycache__/incremental_table_util.cpython-312.pyc,, +wandb/sdk/internal/__pycache__/internal_api.cpython-312.pyc,, +wandb/sdk/internal/__pycache__/job_builder.cpython-312.pyc,, +wandb/sdk/internal/__pycache__/profiler.cpython-312.pyc,, +wandb/sdk/internal/__pycache__/progress.cpython-312.pyc,, +wandb/sdk/internal/__pycache__/run.cpython-312.pyc,, +wandb/sdk/internal/__pycache__/sample.cpython-312.pyc,, +wandb/sdk/internal/__pycache__/sender.cpython-312.pyc,, +wandb/sdk/internal/__pycache__/sender_config.cpython-312.pyc,, +wandb/sdk/internal/__pycache__/settings_static.cpython-312.pyc,, +wandb/sdk/internal/__pycache__/tb_watcher.cpython-312.pyc,, +wandb/sdk/internal/__pycache__/thread_local_settings.cpython-312.pyc,, +wandb/sdk/internal/_generated/__init__.py,sha256=DRBzTksuUuVY9oRJQsLtRTMMItykywWYvDxktHbCfk8,381 +wandb/sdk/internal/_generated/__pycache__/__init__.cpython-312.pyc,, +wandb/sdk/internal/_generated/__pycache__/enums.cpython-312.pyc,, +wandb/sdk/internal/_generated/__pycache__/input_types.cpython-312.pyc,, +wandb/sdk/internal/_generated/__pycache__/operations.cpython-312.pyc,, +wandb/sdk/internal/_generated/__pycache__/server_features_query.cpython-312.pyc,, +wandb/sdk/internal/_generated/enums.py,sha256=vPRi0TPBkZS4D4to-WzhesolsPj3a2B1Okr1xmjRy5k,124 +wandb/sdk/internal/_generated/input_types.py,sha256=vPRi0TPBkZS4D4to-WzhesolsPj3a2B1Okr1xmjRy5k,124 +wandb/sdk/internal/_generated/operations.py,sha256=e_jeUmwP9mnaFe2WUssdmKw2AeN-Iuf3j3FkG9fDnUY,245 +wandb/sdk/internal/_generated/server_features_query.py,sha256=WGjefMl-SDR7o7OVtJk7xKEYICBFA2wceGMXbuyj5QU,647 +wandb/sdk/internal/context.py,sha256=dnmsKEoQ2xOtmXM5OBVHdyGO3XdTQrqjxfb1lRADSTc,2518 +wandb/sdk/internal/datastore.py,sha256=cbTtq452ZGSbzDVnvEJ3wdVTTCkCqSEmHullPYOnEvE,9774 +wandb/sdk/internal/file_pusher.py,sha256=G6JLdqasdMMeNV6wiHUVgv3nGXiCrXFYwGOa7vOfTR0,6023 +wandb/sdk/internal/file_stream.py,sha256=dLzl8RnbQQR2taSgcLff1Br5XghCKSPgxSxkBgzegyY,25604 +wandb/sdk/internal/handler.py,sha256=ZmZrzaJUw-caclqGmOfQMRmv5s5ha9eDf72pcOFOcZc,31549 +wandb/sdk/internal/incremental_table_util.py,sha256=SwcLG366undgZ5nw4xfyVZ5BZS4mAUw1K9HfmenFbqg,1490 +wandb/sdk/internal/internal_api.py,sha256=T8CO_9AQeEI3jiCix-g48ICha2WJHbR5_jm9bBJkPMk,163682 +wandb/sdk/internal/job_builder.py,sha256=2W-Oq100LaP3hoMiHajER0BNPl-KZtP6fmMg17aHFRs,22827 +wandb/sdk/internal/profiler.py,sha256=6IJ18j5saTzX_GrGUm-qKLAYF8tW_iQMCP_jUqbaVn8,2391 +wandb/sdk/internal/progress.py,sha256=526DYzhDMnfBNAI3TN0p7R487c-0W8PBT8_Yft334Ro,2289 +wandb/sdk/internal/run.py,sha256=MD3D-o8Zo9hYpd-v9UlslTAuvCJHD6J1gBnZeZoD4o0,624 +wandb/sdk/internal/sample.py,sha256=USAWLhEeP83J13BVOSIy1Rb3kDDKTK9kzR88SlhO7dw,2470 +wandb/sdk/internal/sender.py,sha256=x3OuoCK44M8oY4DQM1GVKrjcFOkfN3oWQ4Z7fUw0wCM,65180 +wandb/sdk/internal/sender_config.py,sha256=wZkz25ikhSoO9FCb-H06QdPKGCkZzdyXXa1LZEdpu2g,7133 +wandb/sdk/internal/settings_static.py,sha256=-3pJ5RCWxGbNVVE4RvGudTurpn8ObN8wTEx_4dkrS3o,4284 +wandb/sdk/internal/tb_watcher.py,sha256=wqlBUrQKyTYQth8q_ABPb9MNMNmeatyv59_Bq5pCtaU,18676 +wandb/sdk/internal/thread_local_settings.py,sha256=UqD6kfjsy6mvxIWcjhd-vJWkNRCeU1whuRe_-VGIklQ,527 +wandb/sdk/launch/__init__.py,sha256=moXY557JibPbvE1GSSh3nGFiyelTVaJZMdFSv61Dn2k,399 +wandb/sdk/launch/__pycache__/__init__.cpython-312.pyc,, +wandb/sdk/launch/__pycache__/_launch.cpython-312.pyc,, +wandb/sdk/launch/__pycache__/_launch_add.cpython-312.pyc,, +wandb/sdk/launch/__pycache__/_project_spec.cpython-312.pyc,, +wandb/sdk/launch/__pycache__/create_job.cpython-312.pyc,, +wandb/sdk/launch/__pycache__/errors.cpython-312.pyc,, +wandb/sdk/launch/__pycache__/git_reference.cpython-312.pyc,, +wandb/sdk/launch/__pycache__/loader.cpython-312.pyc,, +wandb/sdk/launch/__pycache__/utils.cpython-312.pyc,, +wandb/sdk/launch/__pycache__/wandb_reference.cpython-312.pyc,, +wandb/sdk/launch/_launch.py,sha256=V4CvEVWawFIZaxwFGa0KnBCsVisZeaaYH4wwaeWAnTY,11815 +wandb/sdk/launch/_launch_add.py,sha256=OD6JPJN3dCNz5FZ_8MzgUOBAWGRtcgMz8UYoeV26g9c,8795 +wandb/sdk/launch/_project_spec.py,sha256=n21vwzY3leq0Fi7EjpL1RFIN_c5Y6JRgpQCzvGbRi1Q,21631 +wandb/sdk/launch/agent/__init__.py,sha256=nwGHzJptq87cXCSAJi7Wv2ShL-HZwDgMo2aFC2Rh20w,85 +wandb/sdk/launch/agent/__pycache__/__init__.cpython-312.pyc,, +wandb/sdk/launch/agent/__pycache__/agent.cpython-312.pyc,, +wandb/sdk/launch/agent/__pycache__/config.cpython-312.pyc,, +wandb/sdk/launch/agent/__pycache__/job_status_tracker.cpython-312.pyc,, +wandb/sdk/launch/agent/__pycache__/run_queue_item_file_saver.cpython-312.pyc,, +wandb/sdk/launch/agent/agent.py,sha256=wrO2aFH6w1BJMppWr4al_pnDFinTL9Oe3iBrJJ4bxDw,36518 +wandb/sdk/launch/agent/config.py,sha256=eojwtkeke7PEiPJW2EJfJSRNjB2E0AzL7mn3fCRNY24,9498 +wandb/sdk/launch/agent/job_status_tracker.py,sha256=yIOlPfsEi1vEQZNRnxZ9hmyW1ZjuXOf4LYzlruC6_DM,1830 +wandb/sdk/launch/agent/run_queue_item_file_saver.py,sha256=ty_1AZwVUQiZK10DC0gbM7hy4UKIXwir7swCrVC5VE0,1336 +wandb/sdk/launch/builder/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +wandb/sdk/launch/builder/__pycache__/__init__.cpython-312.pyc,, +wandb/sdk/launch/builder/__pycache__/abstract.cpython-312.pyc,, +wandb/sdk/launch/builder/__pycache__/build.cpython-312.pyc,, +wandb/sdk/launch/builder/__pycache__/context_manager.cpython-312.pyc,, +wandb/sdk/launch/builder/__pycache__/docker_builder.cpython-312.pyc,, +wandb/sdk/launch/builder/__pycache__/kaniko_builder.cpython-312.pyc,, +wandb/sdk/launch/builder/__pycache__/noop.cpython-312.pyc,, +wandb/sdk/launch/builder/abstract.py,sha256=OveMZmrZ-L7qkS5ex0_5RChnSaLXPLfaCdL6jb-zmpk,5076 +wandb/sdk/launch/builder/build.py,sha256=Nm-KUxZBIQOIRhywCoiBcGldXL4SDJLSD8KoR7m1SDs,10813 +wandb/sdk/launch/builder/context_manager.py,sha256=p8rVZj7TDolsU4DEY0HRTgXBt_ht31Bv4GODMRxQSms,9618 +wandb/sdk/launch/builder/docker_builder.py,sha256=0HbPxwWuCHXogmIc6o18nvBaHIx-xcWOQfHnfOJIgcI,6316 +wandb/sdk/launch/builder/kaniko_builder.py,sha256=bYiKdWfFixoY3RVK8QeJYQBZkzP83qKSXS7TFR6Cq8M,23963 +wandb/sdk/launch/builder/noop.py,sha256=A--UUfqkcZxCpTmBKbL6JvkE_emcJRXIkAhAfVv5u7k,1900 +wandb/sdk/launch/builder/templates/__pycache__/_wandb_bootstrap.cpython-312.pyc,, +wandb/sdk/launch/builder/templates/__pycache__/dockerfile.cpython-312.pyc,, +wandb/sdk/launch/builder/templates/_wandb_bootstrap.py,sha256=AuI7GXUoW3MdPWVTkSjhxZQTmW4Rk_nTNllHbZzfoDQ,7316 +wandb/sdk/launch/builder/templates/dockerfile.py,sha256=X8D6n6tyyh69oNHeFiUp-d8ClEtMpHSjwk45N12CR68,2264 +wandb/sdk/launch/create_job.py,sha256=Uue7UhbLFZSe4Nljy_S2T92uOAAASFFoOme37UjgAxc,17381 +wandb/sdk/launch/environment/__pycache__/abstract.cpython-312.pyc,, +wandb/sdk/launch/environment/__pycache__/aws_environment.cpython-312.pyc,, +wandb/sdk/launch/environment/__pycache__/azure_environment.cpython-312.pyc,, +wandb/sdk/launch/environment/__pycache__/gcp_environment.cpython-312.pyc,, +wandb/sdk/launch/environment/__pycache__/local_environment.cpython-312.pyc,, +wandb/sdk/launch/environment/abstract.py,sha256=FpQSsLqJ_PpU5Jy25YpZnWTiN4_6cihmynZFI1isuE0,951 +wandb/sdk/launch/environment/aws_environment.py,sha256=9Os8Q6wXIq7ouXUWF-58lC2r-ijeZ83BRu6H56p-34M,12522 +wandb/sdk/launch/environment/azure_environment.py,sha256=2Yt-NVD-_eXR73-pp6CAneKvb9T30x6eQU-YtHO1Tko,3885 +wandb/sdk/launch/environment/gcp_environment.py,sha256=OiL1M9GAGF6du1TlyEEmxSa1ALSMHk0tzkQhQF1mgI4,12715 +wandb/sdk/launch/environment/local_environment.py,sha256=rtcmVq_wrqcNXxWXG153SOKKbFmTbIwhDxCfd5Pgidg,2245 +wandb/sdk/launch/errors.py,sha256=G86cx2IZSRBBxLE7thxcVFKzN9d4mGyvciaWRz0uWWM,275 +wandb/sdk/launch/git_reference.py,sha256=6pTVlD7-BICWoraN8PsAzCKu64GV7g_GzqMSD9w3Sos,3758 +wandb/sdk/launch/inputs/__pycache__/files.cpython-312.pyc,, +wandb/sdk/launch/inputs/__pycache__/internal.cpython-312.pyc,, +wandb/sdk/launch/inputs/__pycache__/manage.cpython-312.pyc,, +wandb/sdk/launch/inputs/__pycache__/schema.cpython-312.pyc,, +wandb/sdk/launch/inputs/files.py,sha256=BWGDmAfDPLja7zz0bUzYLaF3wH4cTPesD9LqDuJRUoU,4685 +wandb/sdk/launch/inputs/internal.py,sha256=xtEZ7znfUCL2ME7xZv5bD8I5C6hNpN2EqjgNduAPvFM,10054 +wandb/sdk/launch/inputs/manage.py,sha256=O0IsTWhjUftihohRfK7DkT186LjHMMcE2NSMeG8IFBY,5003 +wandb/sdk/launch/inputs/schema.py,sha256=Fs4CcxI0ifFagazbNp47uJP15JL3v43PAvVNO93f9XY,1418 +wandb/sdk/launch/loader.py,sha256=rSXCgiR7dStpdd_FQTm3qqzY3aa5L2vMpF1M_0OsxEE,8927 +wandb/sdk/launch/registry/__pycache__/abstract.cpython-312.pyc,, +wandb/sdk/launch/registry/__pycache__/anon.cpython-312.pyc,, +wandb/sdk/launch/registry/__pycache__/azure_container_registry.cpython-312.pyc,, +wandb/sdk/launch/registry/__pycache__/elastic_container_registry.cpython-312.pyc,, +wandb/sdk/launch/registry/__pycache__/google_artifact_registry.cpython-312.pyc,, +wandb/sdk/launch/registry/__pycache__/local_registry.cpython-312.pyc,, +wandb/sdk/launch/registry/abstract.py,sha256=eTiuMPEm0NnrTkU6M8UteZQfK50BN-n7tyev4nMA1oQ,1146 +wandb/sdk/launch/registry/anon.py,sha256=jft6cCObrI1mgydwX2rR9xYfdLDokHv8RqlZiMHBFCI,943 +wandb/sdk/launch/registry/azure_container_registry.py,sha256=KzzoDGA1zoYV55oK1b11aTAm4Q6L23W1shGG8gUI5VY,4542 +wandb/sdk/launch/registry/elastic_container_registry.py,sha256=_5kZ-Z4qEfzbGaJYv0h0-wlc-KVlOyJ9tU47DCbQRmo,7248 +wandb/sdk/launch/registry/google_artifact_registry.py,sha256=R7qe5VhZzL5vgZWrFYv9jpZogO4clBjqEf36DCjW1Fo,8510 +wandb/sdk/launch/registry/local_registry.py,sha256=mwYOeZPGBb0eIYUgDCuQBLRJl4TqFK2GsOt770emolE,1755 +wandb/sdk/launch/runner/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +wandb/sdk/launch/runner/__pycache__/__init__.cpython-312.pyc,, +wandb/sdk/launch/runner/__pycache__/abstract.cpython-312.pyc,, +wandb/sdk/launch/runner/__pycache__/kubernetes_monitor.cpython-312.pyc,, +wandb/sdk/launch/runner/__pycache__/kubernetes_runner.cpython-312.pyc,, +wandb/sdk/launch/runner/__pycache__/local_container.cpython-312.pyc,, +wandb/sdk/launch/runner/__pycache__/local_process.cpython-312.pyc,, +wandb/sdk/launch/runner/__pycache__/sagemaker_runner.cpython-312.pyc,, +wandb/sdk/launch/runner/__pycache__/vertex_runner.cpython-312.pyc,, +wandb/sdk/launch/runner/abstract.py,sha256=CltVdK6hFECpxFfP8yaxacJ-HxoRWNgakShGmQfnhC8,5619 +wandb/sdk/launch/runner/kubernetes_monitor.py,sha256=utq0wGC1fyPLDER3d35MZEHzdHK_KSa-aDVY63a77Qg,17738 +wandb/sdk/launch/runner/kubernetes_runner.py,sha256=bKPL6xOc3dn3U7LalZpkwzmIQWIMIHA_8X3WdRziqFI,35753 +wandb/sdk/launch/runner/local_container.py,sha256=nhxTNwQop183VRFGSzO-2GjctWohqJnzCSc8FC7LiqM,10358 +wandb/sdk/launch/runner/local_process.py,sha256=jomOlDY2eiKTNMSejG6dcBnVHqZOVaFjpUWIjCDNXS8,2665 +wandb/sdk/launch/runner/sagemaker_runner.py,sha256=in9-GMypI5J1tGgSDpz2rdHZjwafUIMEwrp0AzL_IGI,15268 +wandb/sdk/launch/runner/vertex_runner.py,sha256=e_tvhRPX03ntftx6ZOwDs_6xXplRlFgfRDrNIKqCiPs,8169 +wandb/sdk/launch/sweeps/__init__.py,sha256=Vv3WTuhqs7064cv23YevqzX8jGca9qYZ5JpdhorBk0w,906 +wandb/sdk/launch/sweeps/__pycache__/__init__.cpython-312.pyc,, +wandb/sdk/launch/sweeps/__pycache__/scheduler.cpython-312.pyc,, +wandb/sdk/launch/sweeps/__pycache__/scheduler_sweep.cpython-312.pyc,, +wandb/sdk/launch/sweeps/__pycache__/utils.cpython-312.pyc,, +wandb/sdk/launch/sweeps/scheduler.py,sha256=NPIywdWeRq3D9CdVB800-tkB7hmD7YjyfXHjxzeqObA,26903 +wandb/sdk/launch/sweeps/scheduler_sweep.py,sha256=beM0go0u9xRcXW20ED8MyTqq4ol_O5_4PODbA7FpN88,2987 +wandb/sdk/launch/sweeps/utils.py,sha256=T6Zr3QwEN1dl26mRDcRwlHXrZMoVNysAwqyCQ4MIU6k,10229 +wandb/sdk/launch/utils.py,sha256=mS_h8z_1VHB5eKyShiMMnJkJb2FhnCYgiO1CH5ktts0,25670 +wandb/sdk/launch/wandb_reference.py,sha256=t4REjZz5lwB9fjDW2eo8uRgw9KeLsPeZ1Uu8tiFDBfA,4253 +wandb/sdk/lib/__init__.py,sha256=53BA5lIOtUXciXZcPpNsFbp-iUPzI5gQFxplTykNmOE,183 +wandb/sdk/lib/__pycache__/__init__.cpython-312.pyc,, +wandb/sdk/lib/__pycache__/apikey.cpython-312.pyc,, +wandb/sdk/lib/__pycache__/asyncio_compat.cpython-312.pyc,, +wandb/sdk/lib/__pycache__/capped_dict.cpython-312.pyc,, +wandb/sdk/lib/__pycache__/config_util.cpython-312.pyc,, +wandb/sdk/lib/__pycache__/console_capture.cpython-312.pyc,, +wandb/sdk/lib/__pycache__/credentials.cpython-312.pyc,, +wandb/sdk/lib/__pycache__/deprecate.cpython-312.pyc,, +wandb/sdk/lib/__pycache__/disabled.cpython-312.pyc,, +wandb/sdk/lib/__pycache__/exit_hooks.cpython-312.pyc,, +wandb/sdk/lib/__pycache__/file_stream_utils.cpython-312.pyc,, +wandb/sdk/lib/__pycache__/filenames.cpython-312.pyc,, +wandb/sdk/lib/__pycache__/filesystem.cpython-312.pyc,, +wandb/sdk/lib/__pycache__/fsm.cpython-312.pyc,, +wandb/sdk/lib/__pycache__/gitlib.cpython-312.pyc,, +wandb/sdk/lib/__pycache__/gql_request.cpython-312.pyc,, +wandb/sdk/lib/__pycache__/handler_util.cpython-312.pyc,, +wandb/sdk/lib/__pycache__/hashutil.cpython-312.pyc,, +wandb/sdk/lib/__pycache__/import_hooks.cpython-312.pyc,, +wandb/sdk/lib/__pycache__/interrupt.cpython-312.pyc,, +wandb/sdk/lib/__pycache__/ipython.cpython-312.pyc,, +wandb/sdk/lib/__pycache__/json_util.cpython-312.pyc,, +wandb/sdk/lib/__pycache__/lazyloader.cpython-312.pyc,, +wandb/sdk/lib/__pycache__/module.cpython-312.pyc,, +wandb/sdk/lib/__pycache__/paths.cpython-312.pyc,, +wandb/sdk/lib/__pycache__/preinit.cpython-312.pyc,, +wandb/sdk/lib/__pycache__/printer.cpython-312.pyc,, +wandb/sdk/lib/__pycache__/printer_asyncio.cpython-312.pyc,, +wandb/sdk/lib/__pycache__/progress.cpython-312.pyc,, +wandb/sdk/lib/__pycache__/proto_util.cpython-312.pyc,, +wandb/sdk/lib/__pycache__/redirect.cpython-312.pyc,, +wandb/sdk/lib/__pycache__/retry.cpython-312.pyc,, +wandb/sdk/lib/__pycache__/run_moment.cpython-312.pyc,, +wandb/sdk/lib/__pycache__/runid.cpython-312.pyc,, +wandb/sdk/lib/__pycache__/server.cpython-312.pyc,, +wandb/sdk/lib/__pycache__/sock_client.cpython-312.pyc,, +wandb/sdk/lib/__pycache__/sparkline.cpython-312.pyc,, +wandb/sdk/lib/__pycache__/telemetry.cpython-312.pyc,, +wandb/sdk/lib/__pycache__/timed_input.cpython-312.pyc,, +wandb/sdk/lib/__pycache__/timer.cpython-312.pyc,, +wandb/sdk/lib/__pycache__/wb_logging.cpython-312.pyc,, +wandb/sdk/lib/apikey.py,sha256=s2uw8B2O53rCpBCDgiWyF8ceQH9MNpOdaTil1uvy-O0,11097 +wandb/sdk/lib/asyncio_compat.py,sha256=zBC5yVXTPryiyK129ml56CW0PJE7vFm1N00Od5_WiKc,6579 +wandb/sdk/lib/capped_dict.py,sha256=T2CNkmzfWeFgXOsFmx5IDPzgYmP1jxaVAb-nn3-qBBE,820 +wandb/sdk/lib/config_util.py,sha256=Y00nnEcq0zspuDb0yqraxRuo5JIUh1HflDvZYppeDyk,2893 +wandb/sdk/lib/console_capture.py,sha256=gUG6n-FtogU6DW9dJ9icF_8mMh3svW5yiC3s_fiof9U,6622 +wandb/sdk/lib/credentials.py,sha256=WmVdzL1rFy7S0WIHf1ZYd98_eaHTxPKUobReRSPQgBM,4737 +wandb/sdk/lib/deprecate.py,sha256=g5fIRwR5FrBmNpbLJhBmxh-pyvSbGh2ZumUEfScT0NA,941 +wandb/sdk/lib/disabled.py,sha256=43T-YKrab-Lwkb7XBM5McPuRJX3mOnO_ne01u9h71Lg,926 +wandb/sdk/lib/exit_hooks.py,sha256=_4oozaRQCJi8NJfZvHsA8livvFb0trZKLOGB8_UcHGk,1540 +wandb/sdk/lib/file_stream_utils.py,sha256=NN4qaSyNufvlkg96a1YUjQ8-pYtCVU7xagJaW8mqAyI,4018 +wandb/sdk/lib/filenames.py,sha256=GvzWOq85BO_Od7f69PkRKS6zYhQ88dTCtMr3c19jLEk,2006 +wandb/sdk/lib/filesystem.py,sha256=AWEY6dqFYPw_ump1nsaOCl-FwVo0ui5iZ_YH0tUTeyQ,14132 +wandb/sdk/lib/fsm.py,sha256=2fRiEF2jF95xDoVVbOmeIRaxMqlOv0bCv4RD8F2Ivj0,5044 +wandb/sdk/lib/gitlib.py,sha256=UAKpxnWTyIp3xkn4bRRqxvUmv5c_xyN0gmc5nL91hpM,7832 +wandb/sdk/lib/gql_request.py,sha256=-KRTtT2zqn7pTOBcl41IBdbvQ25YCrxVurROpRqrWqw,2399 +wandb/sdk/lib/handler_util.py,sha256=mT9CKsmboq4lPWElsi4uo9ORHhx6OYTr7KY2QtgbM6M,589 +wandb/sdk/lib/hashutil.py,sha256=aU8YsAgkTcYDlqshfcDjItiO2s9lqq2YdKt7RoA2adQ,2763 +wandb/sdk/lib/import_hooks.py,sha256=0_TJwq-EuZFUIFzFOZoVDWOMP9-Af1r2Vq5sV5sfzg4,10271 +wandb/sdk/lib/interrupt.py,sha256=Ea7aSVHcY0wLYnyMfm4jZbQcwGPgRcuPuoBSe0Swuds,1353 +wandb/sdk/lib/ipython.py,sha256=TcKyUyoCBGCNkItaJRDx8PFUHtvuPPDDIduqyMYuGfQ,3810 +wandb/sdk/lib/json_util.py,sha256=pfUM7euVZYhiRvUOPuZJx1NKXejr3lpU_u1x1fCmJX0,2466 +wandb/sdk/lib/lazyloader.py,sha256=4Seis4C8Ph6a2-3scfYqeHh7KjKG6PO0WJ2ZPW30O0o,1891 +wandb/sdk/lib/module.py,sha256=PWxpFqOYmLyKPF-VgfINZXzkFxDcoQVunVDVNWNnbxQ,2098 +wandb/sdk/lib/paths.py,sha256=YiEE5mkYB5ahMuI4C27IsNvejC3z6MI5JPW1iISi864,4529 +wandb/sdk/lib/preinit.py,sha256=11QkGmBpoGazNaUGvyDIzBJA4QTggj7fGQdugpCvOiw,1450 +wandb/sdk/lib/printer.py,sha256=6QjcnG2n2Q68MyAug7Y_glnpUdsFipiHnzpi4bI3r0A,16257 +wandb/sdk/lib/printer_asyncio.py,sha256=KfCnRz54XcJrTbVOe_yBOumO9Dhk80j95aYhv3xLEDI,1424 +wandb/sdk/lib/progress.py,sha256=AsmqmmJQvlslb5pDb-4yuL7sAOH1l6yC4F6Vgezaju4,10550 +wandb/sdk/lib/proto_util.py,sha256=JxDldi8j6dfF_Lx9zOwqYL6LQZhYYGgKt_AfZtYHAW0,2894 +wandb/sdk/lib/redirect.py,sha256=X4JHJ3W5-kG25aOYUyuYc8TBgVAKwhpV6yTaFWaR7tI,27373 +wandb/sdk/lib/retry.py,sha256=SR1xvjZDr1tavxkuiFSALKi2ecky1zH1bvHKODO6Xlk,10015 +wandb/sdk/lib/run_moment.py,sha256=hFx3S-F9SAF6xtwRYbBnP5fMDkllMJvGSSla_eqbsA8,2419 +wandb/sdk/lib/runid.py,sha256=Qa-5ft4B85YUazkV_18OYwf9JhMaAVp0JAInZzxzX5o,392 +wandb/sdk/lib/server.py,sha256=dn0RXjAnpmigAULLyq75XHYyHxw17MLCJ9fhPq2v22I,1623 +wandb/sdk/lib/service/__pycache__/ipc_support.cpython-312.pyc,, +wandb/sdk/lib/service/__pycache__/service_connection.cpython-312.pyc,, +wandb/sdk/lib/service/__pycache__/service_port_file.cpython-312.pyc,, +wandb/sdk/lib/service/__pycache__/service_process.cpython-312.pyc,, +wandb/sdk/lib/service/__pycache__/service_token.cpython-312.pyc,, +wandb/sdk/lib/service/ipc_support.py,sha256=UPa-bV_wY25WhYmMelVyLGZzbztSz2LSf2SUhVB-omQ,341 +wandb/sdk/lib/service/service_connection.py,sha256=wbbpy5_n5OCqhwQ7OJKKgwdQxT3ngx0JJpJ5e0DVvm4,6434 +wandb/sdk/lib/service/service_port_file.py,sha256=Oonq46Ml4vKR-JTcxx4exi5MthGYRvIqy8hCv84Lc5k,2943 +wandb/sdk/lib/service/service_process.py,sha256=EDv7zYeUpF4NgN4ClTlzyUtfs75CiimdmLxTqvo72Tg,3100 +wandb/sdk/lib/service/service_token.py,sha256=4oDIDNzRZ3egXYcyPUpqmcwvptM6x0jnhFrMKP8T52s,4676 +wandb/sdk/lib/sock_client.py,sha256=ehrvRJ2e-I0cLtuKdlQXSelagC0Jf2dvQBBoq-1EGK0,8225 +wandb/sdk/lib/sparkline.py,sha256=9xQkuZ0z1DM7rHE2jFNDy5vBdPirnurd__A_bC6-Bgc,1363 +wandb/sdk/lib/telemetry.py,sha256=Q7rh7qyeicy9KdgQffVK6ZI8vHUdOtwFvxEeeJtOWcI,2754 +wandb/sdk/lib/timed_input.py,sha256=D7vx3N3m4LlxwkQpzS7lDi7IOnccqZ3WfLlDYRs8Oes,3229 +wandb/sdk/lib/timer.py,sha256=VZUyl7fmQAB75l9QXw9Nkz9SxyYj-CvLPawAk866YKM,440 +wandb/sdk/lib/wb_logging.py,sha256=9km7TAnJRSwBTQaFSYA4BmQZV3_Gb0y1PBlzqEOdUHA,4839 +wandb/sdk/mailbox/__init__.py,sha256=C4x3ym_hymymKFZiI1Q0HPlGx5x5CzeKPVF229Z2V8w,856 +wandb/sdk/mailbox/__pycache__/__init__.cpython-312.pyc,, +wandb/sdk/mailbox/__pycache__/mailbox.cpython-312.pyc,, +wandb/sdk/mailbox/__pycache__/mailbox_handle.cpython-312.pyc,, +wandb/sdk/mailbox/__pycache__/response_handle.cpython-312.pyc,, +wandb/sdk/mailbox/__pycache__/wait_with_progress.cpython-312.pyc,, +wandb/sdk/mailbox/mailbox.py,sha256=jUEP2Ltgi9rCZmiDtfb5ZESaqwB2wH-sy72OLRvATZk,4314 +wandb/sdk/mailbox/mailbox_handle.py,sha256=vFBQQWVTiLNgJl1gi8EoWc3UkGhHa7JLls2L401-auo,3658 +wandb/sdk/mailbox/response_handle.py,sha256=frQNLUG9_z7kd5MPEuhQnOrjRZcq719qMcn6z4CrV_0,4946 +wandb/sdk/mailbox/wait_with_progress.py,sha256=O3yGgUC3ztpfmdLk_CyirJVeXiCzF8nuDI2CqNiak90,4126 +wandb/sdk/projects/_generated/__init__.py,sha256=ZjHH69hD3ps0Rrs0g5BJIXbz5JRdShWGQLTXq5ZGmzA,1303 +wandb/sdk/projects/_generated/__pycache__/__init__.cpython-312.pyc,, +wandb/sdk/projects/_generated/__pycache__/delete_project.cpython-312.pyc,, +wandb/sdk/projects/_generated/__pycache__/enums.cpython-312.pyc,, +wandb/sdk/projects/_generated/__pycache__/fetch_registry.cpython-312.pyc,, +wandb/sdk/projects/_generated/__pycache__/fragments.cpython-312.pyc,, +wandb/sdk/projects/_generated/__pycache__/input_types.cpython-312.pyc,, +wandb/sdk/projects/_generated/__pycache__/operations.cpython-312.pyc,, +wandb/sdk/projects/_generated/__pycache__/rename_project.cpython-312.pyc,, +wandb/sdk/projects/_generated/__pycache__/upsert_registry_project.cpython-312.pyc,, +wandb/sdk/projects/_generated/delete_project.py,sha256=2fguHdSAtLSjUl-J_t4kqCjoAeW6i5OUl2H3yv6Ig3o,495 +wandb/sdk/projects/_generated/enums.py,sha256=vPRi0TPBkZS4D4to-WzhesolsPj3a2B1Okr1xmjRy5k,124 +wandb/sdk/projects/_generated/fetch_registry.py,sha256=DvhQFgvf4yI32Q2puWRMcXzn7ZuHJfOgKmBxEk3AuLU,436 +wandb/sdk/projects/_generated/fragments.py,sha256=iFeb_dX2RwGhnwKItiqv4QUX9stJwvGTS2UCsGwIynM,1101 +wandb/sdk/projects/_generated/input_types.py,sha256=izPOosvLVVURHZgWC6yL6_uL_b7PDwz3Kw7qc3uoU0M,278 +wandb/sdk/projects/_generated/operations.py,sha256=MhLYsTHjekySMt3jdlXdruDI0Sg5xR6wQSOeDvTu5b4,1785 +wandb/sdk/projects/_generated/rename_project.py,sha256=gwiq_rlA55YUT-ZB6mukewxMmi7jSbMr1drZMKpFV98,595 +wandb/sdk/projects/_generated/upsert_registry_project.py,sha256=yNkkeiImzvEbwL9yeJLIePZoBEfVuJB-u8VZFgixymo,597 +wandb/sdk/verify/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +wandb/sdk/verify/__pycache__/__init__.cpython-312.pyc,, +wandb/sdk/verify/__pycache__/verify.cpython-312.pyc,, +wandb/sdk/verify/verify.py,sha256=Z7-QyYaro0-I0iIv4r9X7argyq2ks_SyOl_TGE9KYHE,18258 +wandb/sdk/wandb_alerts.py,sha256=SwBPBiXRxknMTMGbsVoMMWqWK65UWMcKAdTWZtdwAeo,193 +wandb/sdk/wandb_config.py,sha256=uvbpaV3yObsYsaYedYde95B4CzDZBlaU3zOPJ7tPkhs,10692 +wandb/sdk/wandb_helper.py,sha256=IbJ7opO8UkfwCDekSjRYIrGBblUxnTPBfp1EdesfF4U,1824 +wandb/sdk/wandb_init.py,sha256=PtGDN-l3ozxKehWl1yuBBVoD83pX2O-upmWm_POWisg,62428 +wandb/sdk/wandb_login.py,sha256=ZX1e5WVRu-_Xq2Yp3JqSRxZSTvAQmVLSOk7lEWa7WhU,11312 +wandb/sdk/wandb_metric.py,sha256=a3GiQXr6H18m81uobYjlJaC8CL8iANzI42qxkxfZsDs,3268 +wandb/sdk/wandb_require.py,sha256=MYzhsbMLjXVoGRHxssg802w79BPsoyEbBXuZ6cffjCs,2713 +wandb/sdk/wandb_require_helpers.py,sha256=ZmKv5aXXHDTTU6nYHMLKW4_pt9X-PlaMtbRJl77kHX8,1331 +wandb/sdk/wandb_run.py,sha256=9RHDTMEBNX4xhJt2DPFMy-0KyT-3qRVJSnaj5eScpw4,146456 +wandb/sdk/wandb_settings.py,sha256=IosTbkiq9gxrlDRGynLJRM3HBm0Xh_eHy-ulF7TbKpE,68811 +wandb/sdk/wandb_setup.py,sha256=zdYuHg_ynqqCm6oOUya-_plJYQxgyIcn3RZM6VPgLSU,16261 +wandb/sdk/wandb_summary.py,sha256=yQdOVIPrZaZanhBQ7yuSfPLX0x6dxwkN_KAn4SgjSZU,4536 +wandb/sdk/wandb_sweep.py,sha256=Sg_JqxVzmjUBvii41azpdr-c6RPwHOBnSha8k7jrRhk,4028 +wandb/sdk/wandb_sync.py,sha256=GNC8xYqT56ws4aw6Vd_mV_Ck-InEbqnyioSqHIybDug,2106 +wandb/sdk/wandb_watch.py,sha256=oFBRAKi7dQ3aOj3urK8V8TR-Drqp-MNMcZut5qFSl2o,4803 +wandb/sklearn.py,sha256=hbPkefhS39A1RRymn0nHZZmKM2TrOd4xjlkthTZe9pY,803 +wandb/sync/__init__.py,sha256=e0Ygm4RRlZjqQe8tkBkF7aYtXAYWxR2PeY_zLi-dzZc,79 +wandb/sync/__pycache__/__init__.cpython-312.pyc,, +wandb/sync/__pycache__/sync.cpython-312.pyc,, +wandb/sync/sync.py,sha256=w-DqT1VnYGrEvKz3PbrTcYqJ_8e744DWLLnmkcQ6w1w,15712 +wandb/trigger.py,sha256=PaitU3sX6ekGkd2R8iD6d_VtI72ypF7LaPBXh3rXY7Q,615 +wandb/util.py,sha256=fCPwfepeZVKoR9eVgEntygISAmP6Mz5q7KknhF7cn50,63114 +wandb/vendor/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +wandb/vendor/__pycache__/__init__.cpython-312.pyc,, +wandb/vendor/gql-0.2.0/__pycache__/setup.cpython-312.pyc,, +wandb/vendor/gql-0.2.0/setup.py,sha256=_osNap_aCOVvTlDwP9f-aI10TJbpIflxcG6fEQoAxNs,1314 +wandb/vendor/gql-0.2.0/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +wandb/vendor/gql-0.2.0/tests/__pycache__/__init__.cpython-312.pyc,, +wandb/vendor/gql-0.2.0/tests/__pycache__/test_client.cpython-312.pyc,, +wandb/vendor/gql-0.2.0/tests/__pycache__/test_transport.cpython-312.pyc,, +wandb/vendor/gql-0.2.0/tests/starwars/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +wandb/vendor/gql-0.2.0/tests/starwars/__pycache__/__init__.cpython-312.pyc,, +wandb/vendor/gql-0.2.0/tests/starwars/__pycache__/fixtures.cpython-312.pyc,, +wandb/vendor/gql-0.2.0/tests/starwars/__pycache__/schema.cpython-312.pyc,, +wandb/vendor/gql-0.2.0/tests/starwars/__pycache__/test_dsl.cpython-312.pyc,, +wandb/vendor/gql-0.2.0/tests/starwars/__pycache__/test_query.cpython-312.pyc,, +wandb/vendor/gql-0.2.0/tests/starwars/__pycache__/test_validation.cpython-312.pyc,, +wandb/vendor/gql-0.2.0/tests/starwars/fixtures.py,sha256=VSe1BHn6ltu2O_tPOUAFqDg7extW41OiEFO7AjRb8ic,1681 +wandb/vendor/gql-0.2.0/tests/starwars/schema.py,sha256=uCQATEOQIPd3IP4LSEtVjLHmKJ_ArLvEUArVFDf-D0U,4755 +wandb/vendor/gql-0.2.0/tests/starwars/test_dsl.py,sha256=DjJ5ot7wAt84ICcFPpKcxlL-zZTHUBn0QF6I2eSZk9o,5986 +wandb/vendor/gql-0.2.0/tests/starwars/test_query.py,sha256=QcjH1DwLqqb1N-qCx5shN4yo9Qw3-j-NlxoBUw3huqI,7964 +wandb/vendor/gql-0.2.0/tests/starwars/test_validation.py,sha256=DvaFqQ_hy0W92Gsw2av8IjQR51QN2tfZ-NHTM_KCbWs,3350 +wandb/vendor/gql-0.2.0/tests/test_client.py,sha256=ITo-5YBgRTq7vrBOJ97ztXKcyQn5niWOnAkE6sqJgM0,697 +wandb/vendor/gql-0.2.0/tests/test_transport.py,sha256=BZwYV6DQBlRFkLVHp_dH2CzSbOQsLNR9peEPCsZCqmU,2240 +wandb/vendor/gql-0.2.0/wandb_gql/__init__.py,sha256=sokx5ACyDmgDtL-io3gBEVKcBAi1CV4nSiXEjeGMjVI,77 +wandb/vendor/gql-0.2.0/wandb_gql/__pycache__/__init__.cpython-312.pyc,, +wandb/vendor/gql-0.2.0/wandb_gql/__pycache__/client.cpython-312.pyc,, +wandb/vendor/gql-0.2.0/wandb_gql/__pycache__/dsl.cpython-312.pyc,, +wandb/vendor/gql-0.2.0/wandb_gql/__pycache__/gql.cpython-312.pyc,, +wandb/vendor/gql-0.2.0/wandb_gql/__pycache__/utils.cpython-312.pyc,, +wandb/vendor/gql-0.2.0/wandb_gql/client.py,sha256=AR45930Eaf1DYmcA-Fm9NouXU0kKTCl1aEyZtECKAY0,2964 +wandb/vendor/gql-0.2.0/wandb_gql/dsl.py,sha256=fZTUZlq7NbuJULYgfTpQ_oNSK-gvF1v3O7Soaq-tv6M,4375 +wandb/vendor/gql-0.2.0/wandb_gql/gql.py,sha256=JZEozVeuOxb6rkactNzs_0v6TvM799KYCdXQTzorbFM,348 +wandb/vendor/gql-0.2.0/wandb_gql/transport/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +wandb/vendor/gql-0.2.0/wandb_gql/transport/__pycache__/__init__.cpython-312.pyc,, +wandb/vendor/gql-0.2.0/wandb_gql/transport/__pycache__/http.cpython-312.pyc,, +wandb/vendor/gql-0.2.0/wandb_gql/transport/__pycache__/local_schema.cpython-312.pyc,, +wandb/vendor/gql-0.2.0/wandb_gql/transport/__pycache__/requests.cpython-312.pyc,, +wandb/vendor/gql-0.2.0/wandb_gql/transport/http.py,sha256=W_21pHSLCNme_ukkin1muiF7vUtK21LEzUcqPNK-6_k,172 +wandb/vendor/gql-0.2.0/wandb_gql/transport/local_schema.py,sha256=rWiVTPpRJGCZIkLkp-QiV26pc0YkgVpt2PtoNivihGg,316 +wandb/vendor/gql-0.2.0/wandb_gql/transport/requests.py,sha256=eaSF9HIGaBwRvXbUzifemmQ5uNbDj4e9lzGfD4zH-gY,1637 +wandb/vendor/gql-0.2.0/wandb_gql/utils.py,sha256=rV2mkAU9-6DBPTyyHTSq0lBuXC5o6HHOLN2Kmy0ifds,676 +wandb/vendor/graphql-core-1.1/__pycache__/setup.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/setup.py,sha256=FV94NFqGy3w5eILAhH_rldtMwyQ7KNEomxwUR-ceJ3M,2743 +wandb/vendor/graphql-core-1.1/wandb_graphql/__init__.py,sha256=x2MzOC7YipdFCsvCmZV1ogaacUxvdHaTTkbdb4dZuNI,7300 +wandb/vendor/graphql-core-1.1/wandb_graphql/__pycache__/__init__.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/__pycache__/graphql.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/error/__init__.py,sha256=9yXJJMFCWiPT_ljIvpkYvDJ0-nx9BAx3bEGOwtPQkqA,251 +wandb/vendor/graphql-core-1.1/wandb_graphql/error/__pycache__/__init__.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/error/__pycache__/base.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/error/__pycache__/format_error.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/error/__pycache__/located_error.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/error/__pycache__/syntax_error.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/error/base.py,sha256=PxPIdFLH6bfl3cy1HUsFNch6jcMS6lqUUwL2lTvOPOM,1270 +wandb/vendor/graphql-core-1.1/wandb_graphql/error/format_error.py,sha256=McCg1u3AEgfAGug7QnhXWUHHYpzbsJpaW8YGbS5f4XQ,296 +wandb/vendor/graphql-core-1.1/wandb_graphql/error/located_error.py,sha256=HLg4fJmLDtRcUVZ331dhd2rIA9Lg3DI09kpq7cSS6BA,757 +wandb/vendor/graphql-core-1.1/wandb_graphql/error/syntax_error.py,sha256=d5oGQt5wjORtqR7o8hKYsITl1COSt_gZlT3gScSds4I,1132 +wandb/vendor/graphql-core-1.1/wandb_graphql/execution/__init__.py,sha256=OQcZ6FkavSXLlrqOYTC1Q-H7CQ4S1onzJnsSOkta6IA,723 +wandb/vendor/graphql-core-1.1/wandb_graphql/execution/__pycache__/__init__.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/execution/__pycache__/base.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/execution/__pycache__/executor.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/execution/__pycache__/middleware.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/execution/__pycache__/values.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/execution/base.py,sha256=WYuAfruLgMl9__UMg24yA9VBckcOaWgw0csrFDQ_oxw,11264 +wandb/vendor/graphql-core-1.1/wandb_graphql/execution/executor.py,sha256=67xPlV8im1YlLem8V3KY8_9U3mKaiCZlNKiRRfCRI0c,14308 +wandb/vendor/graphql-core-1.1/wandb_graphql/execution/executors/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +wandb/vendor/graphql-core-1.1/wandb_graphql/execution/executors/__pycache__/__init__.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/execution/executors/__pycache__/asyncio.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/execution/executors/__pycache__/gevent.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/execution/executors/__pycache__/process.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/execution/executors/__pycache__/sync.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/execution/executors/__pycache__/thread.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/execution/executors/__pycache__/utils.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/execution/executors/asyncio.py,sha256=FS5HajefEO68JXw8vqpcYMir0jIsU-z9YQu5YT6bnjw,1794 +wandb/vendor/graphql-core-1.1/wandb_graphql/execution/executors/gevent.py,sha256=o4R9f77Fe0lldzeqnTPQOvkSsnrfT-90l6y2fBZkfTk,495 +wandb/vendor/graphql-core-1.1/wandb_graphql/execution/executors/process.py,sha256=ncW65pMpnfsXSw171p-sqEJRSfPC5bjbHY5A6hGtbxQ,757 +wandb/vendor/graphql-core-1.1/wandb_graphql/execution/executors/sync.py,sha256=57ylY5MVMo3P5EJbaNPQtsx8kLCK7ZaHDKuXKY30HQ8,157 +wandb/vendor/graphql-core-1.1/wandb_graphql/execution/executors/thread.py,sha256=JdXtp1hJaW7V1I58C7cGHziCqC3U3DAmOuYMXPrbvcc,953 +wandb/vendor/graphql-core-1.1/wandb_graphql/execution/executors/utils.py,sha256=3zHgHZKyrbDIWsDRuLHRtrRYFmi6mQ14q6n9hjKr30E,151 +wandb/vendor/graphql-core-1.1/wandb_graphql/execution/experimental/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +wandb/vendor/graphql-core-1.1/wandb_graphql/execution/experimental/__pycache__/__init__.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/execution/experimental/__pycache__/executor.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/execution/experimental/__pycache__/fragment.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/execution/experimental/__pycache__/resolver.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/execution/experimental/__pycache__/utils.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/execution/experimental/executor.py,sha256=gxwgR0Fl59b8dGkx5JgwjReBH4h3bT0-Bz0alL_5fcA,2251 +wandb/vendor/graphql-core-1.1/wandb_graphql/execution/experimental/fragment.py,sha256=ppscuvjnaMT-YgHcomzSfXRjrxT9rEQe-vb_zj5g_Ao,8329 +wandb/vendor/graphql-core-1.1/wandb_graphql/execution/experimental/resolver.py,sha256=9bakNNeCgI8YuAnV2OTAEkyvYOScuaIELCQ4WK5KqUg,6344 +wandb/vendor/graphql-core-1.1/wandb_graphql/execution/experimental/utils.py,sha256=akGcXkBUaN7Qig7Y1itPkcarjVZYwjfJG-97sNsylT4,149 +wandb/vendor/graphql-core-1.1/wandb_graphql/execution/middleware.py,sha256=CQBz9W-qgfLOHOKbm3TuDSG7It49PXTHfcUzozxjDpQ,1725 +wandb/vendor/graphql-core-1.1/wandb_graphql/execution/values.py,sha256=1t_uGTA86cs1vIa0imkMt-zSLKG1LyxbOA38yF-3Q7Y,4734 +wandb/vendor/graphql-core-1.1/wandb_graphql/graphql.py,sha256=9Fu2CLxgimKzSpZAkqeWUSA8lDK8LRRkUnn40-rTjF0,2224 +wandb/vendor/graphql-core-1.1/wandb_graphql/language/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +wandb/vendor/graphql-core-1.1/wandb_graphql/language/__pycache__/__init__.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/language/__pycache__/ast.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/language/__pycache__/base.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/language/__pycache__/lexer.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/language/__pycache__/location.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/language/__pycache__/parser.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/language/__pycache__/printer.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/language/__pycache__/source.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/language/__pycache__/visitor.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/language/__pycache__/visitor_meta.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/language/ast.py,sha256=VnBTudpMQoxmGHgiHyKN_74uGf3baiU-c13zzcR_QtQ,35008 +wandb/vendor/graphql-core-1.1/wandb_graphql/language/base.py,sha256=Q07CFeZbOfxiR_Dc5HOIBRbJK6Zk5mfl8KE2e7WVrq4,408 +wandb/vendor/graphql-core-1.1/wandb_graphql/language/lexer.py,sha256=TMlNjDoNatPxVdJsCjp4OSvH3K-lxfBhips4MqRbkoI,11467 +wandb/vendor/graphql-core-1.1/wandb_graphql/language/location.py,sha256=QcVvx0NKUUt8L2LSGQzSWKjnCoaOnoxqokp-mlnQ9TI,746 +wandb/vendor/graphql-core-1.1/wandb_graphql/language/parser.py,sha256=da64gvknlunEC3TDgrgf74h22NpfsEPPm-OdBmof92A,20905 +wandb/vendor/graphql-core-1.1/wandb_graphql/language/printer.py,sha256=gH-I-gieWXw9FcCIISaXoxK_v_mzmhzAOqwiRiVbTQ8,5888 +wandb/vendor/graphql-core-1.1/wandb_graphql/language/source.py,sha256=UI0kq69Mujj986BiQoqeNDrxEBWPzf3IH4C1NZ1PXW8,405 +wandb/vendor/graphql-core-1.1/wandb_graphql/language/visitor.py,sha256=VzScdaIv3q8cCt95GiK3h8bDPXm8p-0wdBot8cthSuY,6247 +wandb/vendor/graphql-core-1.1/wandb_graphql/language/visitor_meta.py,sha256=Qat5ccqiNGOHE9W7z38YGdtW2c8koBw0OUWEMxpdBhk,2980 +wandb/vendor/graphql-core-1.1/wandb_graphql/pyutils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +wandb/vendor/graphql-core-1.1/wandb_graphql/pyutils/__pycache__/__init__.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/pyutils/__pycache__/cached_property.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/pyutils/__pycache__/contain_subset.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/pyutils/__pycache__/default_ordered_dict.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/pyutils/__pycache__/ordereddict.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/pyutils/__pycache__/pair_set.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/pyutils/__pycache__/version.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/pyutils/cached_property.py,sha256=eaxADzdmkEbkQmiu47k5p72Inyce9pxaVto1gvkkmMY,588 +wandb/vendor/graphql-core-1.1/wandb_graphql/pyutils/contain_subset.py,sha256=_-KYbYuSC3fiVSxcCwKHpwtS_Ig85HgRP6Hx5xbDF0E,1006 +wandb/vendor/graphql-core-1.1/wandb_graphql/pyutils/default_ordered_dict.py,sha256=xcFbt16AzcQsYehMOn-w04q1gOUiMzzySsKhpvpSQ6o,1288 +wandb/vendor/graphql-core-1.1/wandb_graphql/pyutils/ordereddict.py,sha256=YNLfN47G2nhMvl9Tm4DYPSJMzeLXKwTwAIPDarMtgjk,256 +wandb/vendor/graphql-core-1.1/wandb_graphql/pyutils/pair_set.py,sha256=gbdnd55q1UkTBdNSsAYVquiSSOAhI1q4mMWe6xfNkoI,1168 +wandb/vendor/graphql-core-1.1/wandb_graphql/pyutils/version.py,sha256=sd6hPQbuZ3kwijdPr5h6iZm2YFsmvqc9-6KtjRw7JU8,2454 +wandb/vendor/graphql-core-1.1/wandb_graphql/type/__init__.py,sha256=B_uo71CK3pr19VJjJf0G2dSEvS5p6zA5KbS53OxGsbY,1366 +wandb/vendor/graphql-core-1.1/wandb_graphql/type/__pycache__/__init__.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/type/__pycache__/definition.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/type/__pycache__/directives.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/type/__pycache__/introspection.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/type/__pycache__/scalars.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/type/__pycache__/schema.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/type/__pycache__/typemap.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/type/definition.py,sha256=IHihIcxrBxVlyYtFFQr4R_4qC6o3JELUvwzL08goRbw,19250 +wandb/vendor/graphql-core-1.1/wandb_graphql/type/directives.py,sha256=snrI-WsyBoxOqEG3NC5Aau2e8_YiMmBPd2_TBgu41ks,4098 +wandb/vendor/graphql-core-1.1/wandb_graphql/type/introspection.py,sha256=ZyyA_zIbe8HaSThL7O9Kl44NKDBAkKKp0QOlbUI4tLU,17580 +wandb/vendor/graphql-core-1.1/wandb_graphql/type/scalars.py,sha256=HTwIgW1-O5tww8nA9pnEDTykaAVWQDWX1VV5zbkseK4,3849 +wandb/vendor/graphql-core-1.1/wandb_graphql/type/schema.py,sha256=grEnY-oKDaEu3Fr5LfsUk7xtXVhXD7MuOrIprkQ5q14,3474 +wandb/vendor/graphql-core-1.1/wandb_graphql/type/typemap.py,sha256=SB-wqQ7-UVtyv4HrK0rh5DLb6-T3nYpsOvhJAjHlwhU,6844 +wandb/vendor/graphql-core-1.1/wandb_graphql/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +wandb/vendor/graphql-core-1.1/wandb_graphql/utils/__pycache__/__init__.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/utils/__pycache__/assert_valid_name.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/utils/__pycache__/ast_from_value.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/utils/__pycache__/ast_to_code.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/utils/__pycache__/ast_to_dict.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/utils/__pycache__/base.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/utils/__pycache__/build_ast_schema.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/utils/__pycache__/build_client_schema.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/utils/__pycache__/concat_ast.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/utils/__pycache__/extend_schema.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/utils/__pycache__/get_field_def.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/utils/__pycache__/get_operation_ast.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/utils/__pycache__/introspection_query.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/utils/__pycache__/is_valid_literal_value.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/utils/__pycache__/is_valid_value.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/utils/__pycache__/quoted_or_list.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/utils/__pycache__/schema_printer.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/utils/__pycache__/suggestion_list.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/utils/__pycache__/type_comparators.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/utils/__pycache__/type_from_ast.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/utils/__pycache__/type_info.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/utils/__pycache__/value_from_ast.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/utils/assert_valid_name.py,sha256=xqNTzOxF5UjdxIev_hUy3ewgBA9OOCiBQbIpdQlI3xs,308 +wandb/vendor/graphql-core-1.1/wandb_graphql/utils/ast_from_value.py,sha256=mx8CdvRQAllQniX0IXiVaTOvbKXYHFqMFPr5dNMhRK4,1998 +wandb/vendor/graphql-core-1.1/wandb_graphql/utils/ast_to_code.py,sha256=b5Qf8SeaqULW16bGIWTCZV5Mi0n-oUB_d5A-ez-d47k,1200 +wandb/vendor/graphql-core-1.1/wandb_graphql/utils/ast_to_dict.py,sha256=VtXQ63TuKC1EpKt3A96v4Bd4xIciRqVhk-rIHv8JiSs,638 +wandb/vendor/graphql-core-1.1/wandb_graphql/utils/base.py,sha256=qDhQwKRHDUN63UY4UbocIj6J8BnCEZD4meP_15ujzeo,2120 +wandb/vendor/graphql-core-1.1/wandb_graphql/utils/build_ast_schema.py,sha256=ljtWw-UiZZWaBsY3lfuHvsyXpoJ39KaxBwFVpbQjJ2o,10596 +wandb/vendor/graphql-core-1.1/wandb_graphql/utils/build_client_schema.py,sha256=a3x9-BKBa0xAQRNAuFtY6xbn9PChLrqpdG4Nu2sYPcY,10027 +wandb/vendor/graphql-core-1.1/wandb_graphql/utils/concat_ast.py,sha256=M7tFprLml4VjGXpxB5C_HLrRPbXcgr0dYyS_Ph4XCI8,204 +wandb/vendor/graphql-core-1.1/wandb_graphql/utils/extend_schema.py,sha256=A3uGbTgctv3AK4Bjd1tJM0x-AP6nP1Tv9MUYfoGhlaw,14143 +wandb/vendor/graphql-core-1.1/wandb_graphql/utils/get_field_def.py,sha256=PQU-C728tQHUOHBwK0oIc6iCnI8RdAEWZ3D3xtAJUkc,1108 +wandb/vendor/graphql-core-1.1/wandb_graphql/utils/get_operation_ast.py,sha256=h5_Ftqy1f2UExbOIw0EWENj-CY91KP_eStXRBvuL9Xc,834 +wandb/vendor/graphql-core-1.1/wandb_graphql/utils/introspection_query.py,sha256=UUt5Uiw9JHpkClfXyd6CIuC9LABoW2qxg95EH6OK_OE,1472 +wandb/vendor/graphql-core-1.1/wandb_graphql/utils/is_valid_literal_value.py,sha256=bIU5jV8pLARq_3qIc6jAWf1N2OCC5w4-qYCMzljupss,2366 +wandb/vendor/graphql-core-1.1/wandb_graphql/utils/is_valid_value.py,sha256=mUXwjh_1HKTJ0Mke7JSLhFWOaLT7qDQqBzpSHvTE4cY,2143 +wandb/vendor/graphql-core-1.1/wandb_graphql/utils/quoted_or_list.py,sha256=5nxFfvx2zMjravOr4uQadWxZ5KilIfOFSFyiGuTv9SY,704 +wandb/vendor/graphql-core-1.1/wandb_graphql/utils/schema_printer.py,sha256=dPXqQI-HjebWPcjKJj_Sgj4jiRauGPQMTaV808PLpCw,4792 +wandb/vendor/graphql-core-1.1/wandb_graphql/utils/suggestion_list.py,sha256=eW9FUe3-ByBL86Rr3EZ5wSMqX_rEHWkzSFCYt_67jeI,1845 +wandb/vendor/graphql-core-1.1/wandb_graphql/utils/type_comparators.py,sha256=bwHJP9lVRgTiwhxgGyrwpcn9VAE1q7J2coJRJZs-ETg,2433 +wandb/vendor/graphql-core-1.1/wandb_graphql/utils/type_from_ast.py,sha256=TylOn7PMSmbggdoKibSA2-O2A_JvGn3NDWySeJ6k9g8,703 +wandb/vendor/graphql-core-1.1/wandb_graphql/utils/type_info.py,sha256=md0lKaIolOlyzHSHY0ZwZaE_9DB6aO3ztQRYFrxiE0w,4886 +wandb/vendor/graphql-core-1.1/wandb_graphql/utils/value_from_ast.py,sha256=XVlFlYTPeXf5HaO0M3lZjFj_3jvlAMJRjbQTFcQhURc,2437 +wandb/vendor/graphql-core-1.1/wandb_graphql/validation/__init__.py,sha256=dZtKP6R2FTSCc2gAkTOTayqmyrRl_gQlzBQCIDb3k10,111 +wandb/vendor/graphql-core-1.1/wandb_graphql/validation/__pycache__/__init__.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/validation/__pycache__/validation.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/__init__.py,sha256=WZsygnTsLd51GgWvmSWUAhGptrV0GzCB2pIcmDExFYA,2736 +wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/__pycache__/__init__.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/__pycache__/arguments_of_correct_type.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/__pycache__/base.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/__pycache__/default_values_of_correct_type.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/__pycache__/fields_on_correct_type.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/__pycache__/fragments_on_composite_types.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/__pycache__/known_argument_names.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/__pycache__/known_directives.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/__pycache__/known_fragment_names.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/__pycache__/known_type_names.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/__pycache__/lone_anonymous_operation.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/__pycache__/no_fragment_cycles.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/__pycache__/no_undefined_variables.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/__pycache__/no_unused_fragments.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/__pycache__/no_unused_variables.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/__pycache__/overlapping_fields_can_be_merged.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/__pycache__/possible_fragment_spreads.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/__pycache__/provided_non_null_arguments.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/__pycache__/scalar_leafs.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/__pycache__/unique_argument_names.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/__pycache__/unique_fragment_names.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/__pycache__/unique_input_field_names.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/__pycache__/unique_operation_names.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/__pycache__/unique_variable_names.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/__pycache__/variables_are_input_types.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/__pycache__/variables_in_allowed_position.cpython-312.pyc,, +wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/arguments_of_correct_type.py,sha256=0aFzTM-khI1psJZWnAMG91bCg1aZZphdSYRGslaymwc,982 +wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/base.py,sha256=7hsprORsfDPcxJ4Ojvpn0qe1ZuGrnbrDT9BgK3Bd3EQ,165 +wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/default_values_of_correct_type.py,sha256=l6khdFWN7K_we_uftEOjpaIx6bFYNdqTNqHr9RZHG9Q,1851 +wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/fields_on_correct_type.py,sha256=hySfm5eYpG8ZIhDMVqpd2Ryo2JksBQBAlJZUoMekdF4,4401 +wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/fragments_on_composite_types.py,sha256=5C4MABVySMpqlnE54e54D1gUn1EtBgQxTliu_aG_IV4,1333 +wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/known_argument_names.py,sha256=4uDSSjMWlCVmYspTU0TR-SKBmjGqcuhBdbtejx4pctY,2484 +wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/known_directives.py,sha256=0_V12oJpcblXXdPD7yZDeL_vp2lg90xfKT0-Q1N-nU0,3434 +wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/known_fragment_names.py,sha256=W7k15YYDlsQqET6Frdn7_5NRhXGz0YKzlH8sBj30m90,597 +wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/known_type_names.py,sha256=bLW1UkYYCu_KFEGZJEHydMjqrSprkHjHlzAnmLZjQnw,1258 +wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/lone_anonymous_operation.py,sha256=egiNdBr2s1QHpP9Z2i9fL6PtlT17GXPfEiMh2F_v1Os,897 +wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/no_fragment_cycles.py,sha256=myRMv0nLzmW0KGfyYUxvv6DiMZG50y7FTfNKkFg42MU,2275 +wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/no_undefined_variables.py,sha256=1LqfZ3rH9E5KH3zQA5wd_BXUQdihrkFSTqVKG4j7gVo,1391 +wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/no_unused_fragments.py,sha256=RG4DVQL7nA2MCijZtCVqKLVJN4dqQxVM_I1IQUUluNA,1489 +wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/no_unused_variables.py,sha256=L4N3BzkvJ1GZI6gi2zsMinhej5bWQZqUcJWQ1qu5YJw,1508 +wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/overlapping_fields_can_be_merged.py,sha256=CbtRQfEnQP6FTsqC_Jk9XSw4eGVb8shkA5P6yWxAxpk,24145 +wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/possible_fragment_spreads.py,sha256=Oky-9Ta0aYgP0Fe1oOtwiOjrWvTpLVWGGwY6B-18l0g,2193 +wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/provided_non_null_arguments.py,sha256=fdTVBXQXVgi3MKhGL0FYHYGq-HKCh3HLKAyc9POqD5c,1869 +wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/scalar_leafs.py,sha256=Dei3Ss_ycaYfan-F8UBL6IyBjCWdGRoQ85nAq8Y2sFg,1115 +wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/unique_argument_names.py,sha256=sCdSGBraWwNUpHhwPu3dk0t3aCPqVWgo1Y4v6LOMnzU,1024 +wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/unique_fragment_names.py,sha256=xb_0UhQF7YDlK-vA1u-li6PL3V2FF3Z_kTLGTEKksoI,1002 +wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/unique_input_field_names.py,sha256=_YAne-NO_OIenreW4v1XnJES4AK3Y9O_HhUk6M6ilPo,1187 +wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/unique_operation_names.py,sha256=kzWjZtAiBou5WhZaOMzrB9UE_fZ8iN2M-VuOlN93lqA,1114 +wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/unique_variable_names.py,sha256=5L90Rgnz8UM7N16mxZ4f263Wa4GCGIfLIHKh-UW3mlU,1034 +wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/variables_are_input_types.py,sha256=9SbvdDA6ZshPM9-LqHI1byqO-3PwtfvyIgeXr5PHHvA,826 +wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/variables_in_allowed_position.py,sha256=hqX7f5LJw3we9OoPWXgQpF333nrYDG_AZr4sSITTyXc,2367 +wandb/vendor/graphql-core-1.1/wandb_graphql/validation/validation.py,sha256=hRqVfs3jp0GFm44DDfKQipb0BEs-dgEeg8X5BcXf8lA,5580 +wandb/vendor/promise-2.3.0/__pycache__/conftest.cpython-312.pyc,, +wandb/vendor/promise-2.3.0/__pycache__/setup.cpython-312.pyc,, +wandb/vendor/promise-2.3.0/conftest.py,sha256=c455VxJib8oEtrs7X9Ixz9rHVlQVl9mRVDVnJ5PhE0g,1010 +wandb/vendor/promise-2.3.0/setup.py,sha256=Wy9FnhHpm7dTLLnTPWYP2RTD8w_31zNlzl28GVv67PQ,1899 +wandb/vendor/promise-2.3.0/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +wandb/vendor/promise-2.3.0/tests/__pycache__/__init__.cpython-312.pyc,, +wandb/vendor/promise-2.3.0/tests/__pycache__/conftest.cpython-312.pyc,, +wandb/vendor/promise-2.3.0/tests/__pycache__/test_awaitable.cpython-312.pyc,, +wandb/vendor/promise-2.3.0/tests/__pycache__/test_awaitable_35.cpython-312.pyc,, +wandb/vendor/promise-2.3.0/tests/__pycache__/test_benchmark.cpython-312.pyc,, +wandb/vendor/promise-2.3.0/tests/__pycache__/test_complex_threads.cpython-312.pyc,, +wandb/vendor/promise-2.3.0/tests/__pycache__/test_dataloader.cpython-312.pyc,, +wandb/vendor/promise-2.3.0/tests/__pycache__/test_dataloader_awaitable_35.cpython-312.pyc,, +wandb/vendor/promise-2.3.0/tests/__pycache__/test_dataloader_extra.cpython-312.pyc,, +wandb/vendor/promise-2.3.0/tests/__pycache__/test_extra.cpython-312.pyc,, +wandb/vendor/promise-2.3.0/tests/__pycache__/test_issues.cpython-312.pyc,, +wandb/vendor/promise-2.3.0/tests/__pycache__/test_promise_list.cpython-312.pyc,, +wandb/vendor/promise-2.3.0/tests/__pycache__/test_spec.cpython-312.pyc,, +wandb/vendor/promise-2.3.0/tests/__pycache__/test_thread_safety.cpython-312.pyc,, +wandb/vendor/promise-2.3.0/tests/__pycache__/utils.cpython-312.pyc,, +wandb/vendor/promise-2.3.0/tests/conftest.py,sha256=cNLj3Q3qG2bYyALzO3xbkYp1Gz5zwjZf_aHw-kk_84U,268 +wandb/vendor/promise-2.3.0/tests/test_awaitable.py,sha256=hWLcgrmySIF2o6dvQqbp84sWVsAowa7GU91rccvhge4,598 +wandb/vendor/promise-2.3.0/tests/test_awaitable_35.py,sha256=h2xndKzvtHF5aEtfRbtKXwjIeHuufOt2luBIBpmOjp8,980 +wandb/vendor/promise-2.3.0/tests/test_benchmark.py,sha256=6X2wr4_cSNXI0oKrPar8DUU3pUMnBQ3morJ4CwzW8iY,2868 +wandb/vendor/promise-2.3.0/tests/test_complex_threads.py,sha256=kQEw0mH2o1VGAx4qOKrcaE_zJJSUicGpvCpMEUOPZNA,485 +wandb/vendor/promise-2.3.0/tests/test_dataloader.py,sha256=gC_PiGDR64LxCcs4aB1NCl-G9oIssbvkwGazrTOrN9U,10637 +wandb/vendor/promise-2.3.0/tests/test_dataloader_awaitable_35.py,sha256=7toBZsOtUXsxeheeHFYiRNOaw1OAc-jDwHx46342hxU,2846 +wandb/vendor/promise-2.3.0/tests/test_dataloader_extra.py,sha256=nN9X1HevfUSkBuFXdLZKad9OFKCYTL9aDIqaeq5Qs1U,1522 +wandb/vendor/promise-2.3.0/tests/test_extra.py,sha256=F2cYhWoIEXo57xZQMU01lQBOZmVNbRhejdjX63xGUMY,14574 +wandb/vendor/promise-2.3.0/tests/test_issues.py,sha256=1eKsHU6MJqHo4CH2sJ2Q7zKPNj3dZLZM678Nx1LKdb4,3690 +wandb/vendor/promise-2.3.0/tests/test_promise_list.py,sha256=aqZT-Nm4qc_vPxWiUZXIpY-Zp2SecQLjpZihiWHbE20,1645 +wandb/vendor/promise-2.3.0/tests/test_spec.py,sha256=uRzXFn6lmPhs8ti9Zj2hRoK2LX2z2lTqDozyGmIEXrA,13441 +wandb/vendor/promise-2.3.0/tests/test_thread_safety.py,sha256=b5HZX5yHFShzG19Pm1qR-cbJUiqfrQhJZCKmPOeOShA,3457 +wandb/vendor/promise-2.3.0/tests/utils.py,sha256=_u7VFe-6rDWwj8xrQQnI_hnQNgYo5OqusSx7LPkImCE,178 +wandb/vendor/promise-2.3.0/wandb_promise/__init__.py,sha256=3IRTDwg63JE0VfdxcJyLIrstgU85Ya8HIkkHN1XWCUY,873 +wandb/vendor/promise-2.3.0/wandb_promise/__pycache__/__init__.cpython-312.pyc,, +wandb/vendor/promise-2.3.0/wandb_promise/__pycache__/async_.cpython-312.pyc,, +wandb/vendor/promise-2.3.0/wandb_promise/__pycache__/compat.cpython-312.pyc,, +wandb/vendor/promise-2.3.0/wandb_promise/__pycache__/dataloader.cpython-312.pyc,, +wandb/vendor/promise-2.3.0/wandb_promise/__pycache__/iterate_promise.cpython-312.pyc,, +wandb/vendor/promise-2.3.0/wandb_promise/__pycache__/promise.cpython-312.pyc,, +wandb/vendor/promise-2.3.0/wandb_promise/__pycache__/promise_list.cpython-312.pyc,, +wandb/vendor/promise-2.3.0/wandb_promise/__pycache__/utils.cpython-312.pyc,, +wandb/vendor/promise-2.3.0/wandb_promise/async_.py,sha256=7L041olXPGPURDMFMgIxec_BWptaZ0ArFh_APTJ8I7Y,3959 +wandb/vendor/promise-2.3.0/wandb_promise/compat.py,sha256=IvY3E6_FyJZDkOahxPTX0or-86V0MFe5YnW3ve90a8Y,875 +wandb/vendor/promise-2.3.0/wandb_promise/dataloader.py,sha256=D_wZCiqu6CTOulhOGttyku6G31ravLt0nV_vXR3PQKQ,10853 +wandb/vendor/promise-2.3.0/wandb_promise/iterate_promise.py,sha256=1HGjWRD8KJkhvgx0hQYhipi-O6Hq1xMRrtajMZrgXA8,296 +wandb/vendor/promise-2.3.0/wandb_promise/promise.py,sha256=_hNgnM_uSrQwQDXCJCxD7tvfQCVQ9gA0TJo0NCSGyro,28218 +wandb/vendor/promise-2.3.0/wandb_promise/promise_list.py,sha256=aODoTWMTTAWRXa1VXZx-9i2R4VNyPkVHvoVwiRPnFdk,4646 +wandb/vendor/promise-2.3.0/wandb_promise/pyutils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +wandb/vendor/promise-2.3.0/wandb_promise/pyutils/__pycache__/__init__.cpython-312.pyc,, +wandb/vendor/promise-2.3.0/wandb_promise/pyutils/__pycache__/version.cpython-312.pyc,, +wandb/vendor/promise-2.3.0/wandb_promise/pyutils/version.py,sha256=crKfIm8N8Ysy1DEuoZFOgnPZCnntpmZtNbS3ZeP00gY,2507 +wandb/vendor/promise-2.3.0/wandb_promise/schedulers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +wandb/vendor/promise-2.3.0/wandb_promise/schedulers/__pycache__/__init__.cpython-312.pyc,, +wandb/vendor/promise-2.3.0/wandb_promise/schedulers/__pycache__/asyncio.cpython-312.pyc,, +wandb/vendor/promise-2.3.0/wandb_promise/schedulers/__pycache__/gevent.cpython-312.pyc,, +wandb/vendor/promise-2.3.0/wandb_promise/schedulers/__pycache__/immediate.cpython-312.pyc,, +wandb/vendor/promise-2.3.0/wandb_promise/schedulers/__pycache__/thread.cpython-312.pyc,, +wandb/vendor/promise-2.3.0/wandb_promise/schedulers/asyncio.py,sha256=Z94PwkAXd8PDybJUM7_tLlDh_AUw5JbI4CFRg6J3_NI,512 +wandb/vendor/promise-2.3.0/wandb_promise/schedulers/gevent.py,sha256=PnB1LI2OXnbK64qvIcXnoV98VbF6kPah5zqsh8v6QmA,502 +wandb/vendor/promise-2.3.0/wandb_promise/schedulers/immediate.py,sha256=4addDLBFlXwiOBXU2i2wGced_zotfEoYEm-_sdeKy1U,663 +wandb/vendor/promise-2.3.0/wandb_promise/schedulers/thread.py,sha256=pK8zhnJWhvM3iiAc8ryoo8-bK2ny2hE4JoSsISBBU9s,435 +wandb/vendor/promise-2.3.0/wandb_promise/utils.py,sha256=v7Ssd2lm9_gLEvy64Q7oXv5VhOt4rPMHOGhIlr9oJew,1624 +wandb/vendor/pygments/__init__.py,sha256=IkWLwTf8uusJPx4c3f3gpHwVJVi0UqeD6mo5wWHHdWs,3145 +wandb/vendor/pygments/__pycache__/__init__.cpython-312.pyc,, +wandb/vendor/pygments/__pycache__/cmdline.cpython-312.pyc,, +wandb/vendor/pygments/__pycache__/console.cpython-312.pyc,, +wandb/vendor/pygments/__pycache__/filter.cpython-312.pyc,, +wandb/vendor/pygments/__pycache__/formatter.cpython-312.pyc,, +wandb/vendor/pygments/__pycache__/lexer.cpython-312.pyc,, +wandb/vendor/pygments/__pycache__/modeline.cpython-312.pyc,, +wandb/vendor/pygments/__pycache__/plugin.cpython-312.pyc,, +wandb/vendor/pygments/__pycache__/regexopt.cpython-312.pyc,, +wandb/vendor/pygments/__pycache__/scanner.cpython-312.pyc,, +wandb/vendor/pygments/__pycache__/sphinxext.cpython-312.pyc,, +wandb/vendor/pygments/__pycache__/style.cpython-312.pyc,, +wandb/vendor/pygments/__pycache__/token.cpython-312.pyc,, +wandb/vendor/pygments/__pycache__/unistring.cpython-312.pyc,, +wandb/vendor/pygments/__pycache__/util.cpython-312.pyc,, +wandb/vendor/pygments/cmdline.py,sha256=_UA78VWUx--QdlHM0OuTu0W3zjDPhoVz8ipmjomf2Ac,19326 +wandb/vendor/pygments/console.py,sha256=AgkV5lDp2ghozb_J8V_UPZ0uudTWTz3isSK9oUvo750,1809 +wandb/vendor/pygments/filter.py,sha256=IY_c2IryClkgeVQDEQeEXoauZryHx9cvTOiedX3jaHc,2036 +wandb/vendor/pygments/filters/__init__.py,sha256=IlSO7Mm0meA1rfssNwR9u7626sscMnASJlZ94yEy9lA,11573 +wandb/vendor/pygments/filters/__pycache__/__init__.cpython-312.pyc,, +wandb/vendor/pygments/formatter.py,sha256=RaPGA3oLywAbvSkzrj61U5Y8xzYai32bbajg8L3xreE,2948 +wandb/vendor/pygments/formatters/__init__.py,sha256=g5hpFvO_jy4-OV-pJr0jRP-vktKi6pXJKZ1z_XDnLIE,5099 +wandb/vendor/pygments/formatters/__pycache__/__init__.cpython-312.pyc,, +wandb/vendor/pygments/formatters/__pycache__/_mapping.cpython-312.pyc,, +wandb/vendor/pygments/formatters/__pycache__/bbcode.cpython-312.pyc,, +wandb/vendor/pygments/formatters/__pycache__/html.cpython-312.pyc,, +wandb/vendor/pygments/formatters/__pycache__/img.cpython-312.pyc,, +wandb/vendor/pygments/formatters/__pycache__/irc.cpython-312.pyc,, +wandb/vendor/pygments/formatters/__pycache__/latex.cpython-312.pyc,, +wandb/vendor/pygments/formatters/__pycache__/other.cpython-312.pyc,, +wandb/vendor/pygments/formatters/__pycache__/rtf.cpython-312.pyc,, +wandb/vendor/pygments/formatters/__pycache__/svg.cpython-312.pyc,, +wandb/vendor/pygments/formatters/__pycache__/terminal.cpython-312.pyc,, +wandb/vendor/pygments/formatters/__pycache__/terminal256.cpython-312.pyc,, +wandb/vendor/pygments/formatters/_mapping.py,sha256=E2DsoS8TZDCv_jJ1mn48rb3Qs4RIr8SJwILEVhYpGk4,6214 +wandb/vendor/pygments/formatters/bbcode.py,sha256=LYa2w-Ep7475be0GSH4MbuYiwH3gWIqpG4dQFCZLbGk,3314 +wandb/vendor/pygments/formatters/html.py,sha256=gvCUGAsxerTWRKnXa3a5ezmJg70KLt7wDb57JGjZhug,31759 +wandb/vendor/pygments/formatters/img.py,sha256=yWhrS8vgisj9XGOWjUrwtd8VZNuAffnBF8IAWl6p44g,19780 +wandb/vendor/pygments/formatters/irc.py,sha256=ApSLVBfjK78gkzXnMC8UrgnBLQulOvb-fza2e-D_RCI,5775 +wandb/vendor/pygments/formatters/latex.py,sha256=izNn5NjCTgu0gq8cyvvwNlRwc52CyAwvprN6DwlbUvU,17758 +wandb/vendor/pygments/formatters/other.py,sha256=p14Jboe9qeJ4xy9Xcb4f90szuQvQ0RI0q9DctZZmXDY,5162 +wandb/vendor/pygments/formatters/rtf.py,sha256=8HK5CpvqLchEWlbYptQKQ2RxQmayNLYyPOovCYBw4l4,5049 +wandb/vendor/pygments/formatters/svg.py,sha256=FT-DWvkC7bJ34-szEmh14PoqyqQkUE2jDPPVwOelqYQ,5840 +wandb/vendor/pygments/formatters/terminal.py,sha256=KkBzLxYMDvfbJXOecTgM1rAIVkYWYkE1a9pNIqtT0AA,4919 +wandb/vendor/pygments/formatters/terminal256.py,sha256=UKFNPANdnt2eGvYw_fRkyW2gKKXVpL9A5jVgEpGxd3g,10776 +wandb/vendor/pygments/lexer.py,sha256=CrUoLYlQbxO5W0YLH_a1lI8Dkw2l4nRZ5ciy9-R-n0I,31054 +wandb/vendor/pygments/lexers/__init__.py,sha256=77oWKOFsKWByzG5aMNDsWBJl0lQYSNgIC8XUUV2pCW4,10906 +wandb/vendor/pygments/lexers/__pycache__/__init__.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/_asy_builtins.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/_cl_builtins.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/_cocoa_builtins.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/_csound_builtins.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/_lasso_builtins.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/_lua_builtins.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/_mapping.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/_mql_builtins.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/_openedge_builtins.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/_php_builtins.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/_postgres_builtins.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/_scilab_builtins.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/_sourcemod_builtins.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/_stan_builtins.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/_stata_builtins.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/_tsql_builtins.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/_vim_builtins.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/actionscript.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/agile.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/algebra.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/ambient.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/ampl.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/apl.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/archetype.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/asm.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/automation.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/basic.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/bibtex.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/business.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/c_cpp.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/c_like.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/capnproto.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/chapel.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/clean.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/compiled.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/configs.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/console.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/crystal.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/csound.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/css.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/d.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/dalvik.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/data.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/diff.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/dotnet.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/dsls.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/dylan.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/ecl.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/eiffel.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/elm.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/erlang.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/esoteric.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/ezhil.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/factor.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/fantom.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/felix.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/forth.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/fortran.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/foxpro.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/functional.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/go.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/grammar_notation.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/graph.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/graphics.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/haskell.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/haxe.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/hdl.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/hexdump.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/html.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/idl.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/igor.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/inferno.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/installers.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/int_fiction.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/iolang.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/j.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/javascript.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/julia.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/jvm.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/lisp.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/make.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/markup.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/math.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/matlab.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/ml.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/modeling.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/modula2.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/monte.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/ncl.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/nimrod.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/nit.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/nix.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/oberon.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/objective.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/ooc.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/other.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/parasail.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/parsers.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/pascal.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/pawn.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/perl.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/php.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/praat.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/prolog.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/python.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/qvt.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/r.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/rdf.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/rebol.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/resource.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/rnc.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/roboconf.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/robotframework.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/ruby.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/rust.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/sas.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/scripting.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/shell.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/smalltalk.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/smv.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/snobol.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/special.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/sql.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/stata.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/supercollider.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/tcl.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/templates.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/testing.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/text.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/textedit.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/textfmts.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/theorem.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/trafficscript.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/typoscript.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/urbi.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/varnish.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/verification.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/web.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/webmisc.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/whiley.cpython-312.pyc,, +wandb/vendor/pygments/lexers/__pycache__/x10.cpython-312.pyc,, +wandb/vendor/pygments/lexers/_asy_builtins.py,sha256=zph3J1PBBtWjrvc_hUrmY-vk2WkN4zwT3OICH6nnyN0,27321 +wandb/vendor/pygments/lexers/_cl_builtins.py,sha256=1KrMgXg50ZsI02_WlDFuHugJzA-1LygeeUmHGBHBIgw,14053 +wandb/vendor/pygments/lexers/_cocoa_builtins.py,sha256=8b6As01z9rEa14hp7DXSXKHQXnRVI13eWEZ5rcmn5Bk,39982 +wandb/vendor/pygments/lexers/_csound_builtins.py,sha256=JkAZhrG-lXndYAsxWU2VqPce7MfwDknl7u8cYi3tAjs,21643 +wandb/vendor/pygments/lexers/_lasso_builtins.py,sha256=5PNX3gtW3f0X8gzoZUR6JW3mYzck3RcO1J6XtkUhY6Q,134534 +wandb/vendor/pygments/lexers/_lua_builtins.py,sha256=q1bCBDWwe7g-FwonM_xrGibEGdEYJvcdWRVGpYgBPpo,8340 +wandb/vendor/pygments/lexers/_mapping.py,sha256=_P3TsdkuN1NptMfEQkplLCf5TklMRNDi6Rtl_oc4XR4,54715 +wandb/vendor/pygments/lexers/_mql_builtins.py,sha256=qa9s_tUqXl16pAKzRDtWsJKzDPoU-bGaGdgrmHx7XOk,24736 +wandb/vendor/pygments/lexers/_openedge_builtins.py,sha256=0ADwH8PqzC6rJ_SZ8b3j0TgNut1kvLZL8RxpbC3J_nk,48362 +wandb/vendor/pygments/lexers/_php_builtins.py,sha256=cpkFCfHjPG1zExNaMI1JQY1at54pf5RMu-yCBmtwl78,154368 +wandb/vendor/pygments/lexers/_postgres_builtins.py,sha256=me5pfqtfUMpXYSvuTYXscyLCYUY9TcmBX8pGwimHG1U,11210 +wandb/vendor/pygments/lexers/_scilab_builtins.py,sha256=yXpa-XsMiNRgsPpDENWvZFZZJndUGFgv8uioKcfnejI,52405 +wandb/vendor/pygments/lexers/_sourcemod_builtins.py,sha256=DPFvfIi76GawQ603QG_EAFzl_6mmK5xZxfGWl4qlKFM,27113 +wandb/vendor/pygments/lexers/_stan_builtins.py,sha256=y6S6OymabXXmgrF3tMVkTxMHzkdyOi-Q_s0M2qdh-Xk,10121 +wandb/vendor/pygments/lexers/_stata_builtins.py,sha256=Hods-_4P3Ixov_hf9z6oeq-J_W_a8XOo8p--bECWJKo,25139 +wandb/vendor/pygments/lexers/_tsql_builtins.py,sha256=opXLcAQOoAgcizztFXepEHBABOrGjSvDWU3TxVvJS3M,15484 +wandb/vendor/pygments/lexers/_vim_builtins.py,sha256=mIYAlwzf687UR8oPcY6y48H-BjTyPNDx1oHiRc5wByw,57090 +wandb/vendor/pygments/lexers/actionscript.py,sha256=HWGTyjPGho_kZVVTxemN0_5iyhK5wFgFQQ0MYVS0as8,11179 +wandb/vendor/pygments/lexers/agile.py,sha256=zB0BGCISgQB2b-3ch3QNRgV2O7jq7QPD5nvBbXA_K5U,900 +wandb/vendor/pygments/lexers/algebra.py,sha256=fhvIdLDS3oW0iMsDSBAzg8l9DuBXxfLRFC53xRIzvHU,7201 +wandb/vendor/pygments/lexers/ambient.py,sha256=M77HDk4dzs3Amlgwi_ogj1PV1Ch77PyEW6SU5AFtL4w,2557 +wandb/vendor/pygments/lexers/ampl.py,sha256=6AQASY--hmYXtgkzsthZymRM4bzQ_RQZZC5Wu4RJG-A,4120 +wandb/vendor/pygments/lexers/apl.py,sha256=Lpv2nI1bSC_VpmckdbpMiuxWx-WVb6FgFWoJ31q002w,3167 +wandb/vendor/pygments/lexers/archetype.py,sha256=IwyDTh-U673WHQQThuf2dBz0Fc-XlcAP-xAhtnR2DH4,11136 +wandb/vendor/pygments/lexers/asm.py,sha256=YysaSPQr0Ir79aM5C0eOB7g8-vJ6m2gWdbghsEElGBM,25261 +wandb/vendor/pygments/lexers/automation.py,sha256=g_laLS9LstvXvrvVQI01fAf0fyZ4-ZHFewdVLtXPXf0,19648 +wandb/vendor/pygments/lexers/basic.py,sha256=XfeI7Tk78lN7YMqS6bYdRB6CRPa2vxcm5PzA2EbILnc,20306 +wandb/vendor/pygments/lexers/bibtex.py,sha256=CcIdWMtCUtpHoqXU9JtGYKOmQJscO7AwofABCnEx_lk,4724 +wandb/vendor/pygments/lexers/business.py,sha256=iJbZjsF_CwJvkWmuDEAUgRhIPN3Vus_sp2m4V9AsKuo,27665 +wandb/vendor/pygments/lexers/c_cpp.py,sha256=Ty6LTWNG_ZR8eLNmcdBmJfUIJlkAyd033JqIH3Mfric,10523 +wandb/vendor/pygments/lexers/c_like.py,sha256=AoPSFV_TFPudAnvkV0wLlM00A3_JrddoTd5GRMyeHcY,24124 +wandb/vendor/pygments/lexers/capnproto.py,sha256=8pl0G3q7k5AJeoe6Yfr2eMs81V8KW1IlduzkRPaNb7A,2188 +wandb/vendor/pygments/lexers/chapel.py,sha256=dMPHVlkPsEhqOHQmuX8QlxJ48c1Pml8Q7RpOhc9lYUk,3511 +wandb/vendor/pygments/lexers/clean.py,sha256=IukUXRAQigyPLlD4K1tfZhQ8qH2l6gVn4hGFuHsz_vc,10403 +wandb/vendor/pygments/lexers/compiled.py,sha256=9d_XDV75Fi_EnrsVPAexfs8LRAysfixpZDNqVEhjGUU,1385 +wandb/vendor/pygments/lexers/configs.py,sha256=W1OdBJEwZWp7imQE1bC6a4sGIGoKw5LIbmYwau6u6Ds,28266 +wandb/vendor/pygments/lexers/console.py,sha256=7rwV7Jsci0nC74JDVzNlD5-PlRsfzZspHfYFSC8OKtM,4120 +wandb/vendor/pygments/lexers/crystal.py,sha256=h6M1BX-vWjCUtPQNXH1KqgqoxuB6geR3kCKp74sIb48,16845 +wandb/vendor/pygments/lexers/csound.py,sha256=t4bVgLEkNXEFZdfdfB43yWGXjJhT3aiKN9uLHNrTtZA,12544 +wandb/vendor/pygments/lexers/css.py,sha256=QZadHT6mYr14tMhZKDVRP3uu_AWSmGNIkn7KUr5H_0k,31513 +wandb/vendor/pygments/lexers/d.py,sha256=G-RV1UPAI8Q6mstQCMa4vNhwop0pG2NO1APHkOLdayA,9530 +wandb/vendor/pygments/lexers/dalvik.py,sha256=RDuGFuTqCG1PxhBn-I80iJxegrJpUDi_knxCKwN1cKQ,4420 +wandb/vendor/pygments/lexers/data.py,sha256=HOBr6Xw4QOYI6sD3vvtuSoYRdMaQYBnT0IcgpWUwTx0,18771 +wandb/vendor/pygments/lexers/diff.py,sha256=n7dxgD0_z0W2LH_zf55E1erBs5iBHFZPZ0bItXSeiLI,4873 +wandb/vendor/pygments/lexers/dotnet.py,sha256=IxNL30wmyw-Z_QRSUf9G9kbhz017BP5Pjqn2LEcfE9A,27668 +wandb/vendor/pygments/lexers/dsls.py,sha256=6v76UwDB7PngLM0Ye79mz_cXpg075RBgTzS9VXIsMQw,33336 +wandb/vendor/pygments/lexers/dylan.py,sha256=YJyoYcXD622vwYxqCNtyoHqi-L67CABzNfcg9ERt1Ic,10421 +wandb/vendor/pygments/lexers/ecl.py,sha256=bRD_m3B8npOLIyHjxhcWUCXeD9YCw7I6u5WsCUb7Kpc,5875 +wandb/vendor/pygments/lexers/eiffel.py,sha256=1-7weE5oflU_dzDVhaQFx5ildMbBuCZ3OFXJpJ-U78c,2482 +wandb/vendor/pygments/lexers/elm.py,sha256=3qhDIU0GFJ4YzuVDyvbHZ39dOyY60QFVpRvDdpDeYUw,2996 +wandb/vendor/pygments/lexers/erlang.py,sha256=Ja1SxnF-f48ort3oRb4R9aaHXbLJZIp0ItsgI8ITDJM,18936 +wandb/vendor/pygments/lexers/esoteric.py,sha256=wdtih2rpCV-N79Rf2laxzlqSBMYwzQgeCtBcutTbt1E,9490 +wandb/vendor/pygments/lexers/ezhil.py,sha256=o3qj60N-fyLGjcho1lrVW4x-CZ0Fu-rDe7tuqInD5oQ,3020 +wandb/vendor/pygments/lexers/factor.py,sha256=Trq7bM5thNo6BFZ2Tnit82FnWuUK70TL-atOKkLdHng,17864 +wandb/vendor/pygments/lexers/fantom.py,sha256=AGk3ewVsJ8gA9dU6N7iWGIlJLt5p61vRiJmVhyCj7Zg,9982 +wandb/vendor/pygments/lexers/felix.py,sha256=94Ffv8uhADGlom_cjKKvlE1QYpDnxRo0EdPGYhlxNTA,9408 +wandb/vendor/pygments/lexers/forth.py,sha256=uN-Sr5fi4SHnTluGzwmUsPgMFt470gSM212e7M5bH9Q,7144 +wandb/vendor/pygments/lexers/fortran.py,sha256=QRpUhXg0xnUu8EqsbEG6S33Sn8AWU326RiC8J-r2ZVw,9768 +wandb/vendor/pygments/lexers/foxpro.py,sha256=AWnHAryB1dUQkU4I48zoJFI8M_DsoIlEmvemDs1O4nM,26236 +wandb/vendor/pygments/lexers/functional.py,sha256=PPhynqxQZ602rCV-TxNldHRwhjMPfyHkGIOPx0BoVZo,698 +wandb/vendor/pygments/lexers/go.py,sha256=6IS3PKkqGG18OIlYqDGUp46S1jcfAfjhixNJe8Dd3gQ,3701 +wandb/vendor/pygments/lexers/grammar_notation.py,sha256=xyJi8t0X8SFElc3HTsmzF4_2mZs-qHW-ur9kZKt48D0,6328 +wandb/vendor/pygments/lexers/graph.py,sha256=-71ZtKUTq4LX4uUyRWFruA57Z_8lyOas1z1bWdq8eMs,2370 +wandb/vendor/pygments/lexers/graphics.py,sha256=6AoxbU5ybgg0_Mm48dZlspishe7PuK0pa_8bsPsDVfM,25836 +wandb/vendor/pygments/lexers/haskell.py,sha256=uOzfXPsn9mBs26GzEm-3qNNNJy6Oxc66lt0NVDVRR-M,31218 +wandb/vendor/pygments/lexers/haxe.py,sha256=QWR5lBwbdCMrJbFcUAs4SnP66zVV8O-DiT4c4x6XtBA,30953 +wandb/vendor/pygments/lexers/hdl.py,sha256=h3CYE2ShUOejE7w0d1eSHkGgCS4EXJodOVgjfACWYz8,18699 +wandb/vendor/pygments/lexers/hexdump.py,sha256=-_u6qAw7yH7b8_25tHNLiybD3r5-OaYYwtf9RsSxfeE,3507 +wandb/vendor/pygments/lexers/html.py,sha256=1f0HI3wZoGZL9PY6dLdmG8AytfT3oEosKHQp3DuDZmY,19269 +wandb/vendor/pygments/lexers/idl.py,sha256=gNT6hIlEMD-ZjLZ3ru6RH7Z-X5u7TKQ7lRP_9Sz1SSg,14984 +wandb/vendor/pygments/lexers/igor.py,sha256=PsDRDxMkwslMjd4GdZmAOXLrblsc2FANBMlNfv-XbVg,19994 +wandb/vendor/pygments/lexers/inferno.py,sha256=G4uU8YQD9EGvDNCc6Av6LWvyRB8unp5qv47PfLUek_8,3116 +wandb/vendor/pygments/lexers/installers.py,sha256=QEPP1YcZ38DvErs7xwpChvKQFh1I6fIp0V6MXxIwzeY,12866 +wandb/vendor/pygments/lexers/int_fiction.py,sha256=m8rYr5egxBSxZ9FKunV_Yl_EtpoRBz1j55J_dtKG9oo,55778 +wandb/vendor/pygments/lexers/iolang.py,sha256=1kvzEPcJZ2eyF7mu58NT9yyqZobOvx1MlbUxA98bLJs,1904 +wandb/vendor/pygments/lexers/j.py,sha256=e6oqJQslgSl6q3hfEuTl0mtFnqCj4G29SwcMnTeBDBc,4525 +wandb/vendor/pygments/lexers/javascript.py,sha256=79c9e2wn7HiJ9S4WvRQ0qymMqj-YV7CS308_pMRNirk,60134 +wandb/vendor/pygments/lexers/julia.py,sha256=vXU5r_p6ko-I_fKITqiFmMn0rpw0NWujKVGGrndkfOI,14093 +wandb/vendor/pygments/lexers/jvm.py,sha256=9fjCUGFGApGNMDsrCWzaEiDA_CcoZPDaYAvBHFAh524,66792 +wandb/vendor/pygments/lexers/lisp.py,sha256=xeF_wQGdm-vkJ2j1JQd9mipAAtjwY3giOEH2cW2j0jk,140673 +wandb/vendor/pygments/lexers/make.py,sha256=jGkYUD5PD4vG7gC6qExOAp8ZE4KoB0jLMcTF5NzZGQs,7332 +wandb/vendor/pygments/lexers/markup.py,sha256=KQsXc5K_rn7G7bATKt81yURJjHHi5kCLokJXXom997I,20452 +wandb/vendor/pygments/lexers/math.py,sha256=TaE1dzOfu6ukxMFAInZI_Ua105LDnxx86Ufk4YdnvfA,700 +wandb/vendor/pygments/lexers/matlab.py,sha256=GUys_wezfz7n_F9U5l2HZauxlsSxrRh0bkgIjfhZ7ro,29146 +wandb/vendor/pygments/lexers/ml.py,sha256=GDreW4Pmgqt8BlfbeRG43e3wS3wSm_A7cHPKGeGY9hQ,27891 +wandb/vendor/pygments/lexers/modeling.py,sha256=4O9hB4wAhjD2HFYa74HsLf9QK4E8kq7k8c5M7WuM1f4,12833 +wandb/vendor/pygments/lexers/modula2.py,sha256=mNbhlG9lNZRXP9kzx9diJj7l6hiPQVqmOzrfJ53GarU,52561 +wandb/vendor/pygments/lexers/monte.py,sha256=MNswWqletPzSIg6TcECb-Dcq1bv-eSPhYLsbc-vnJzM,6307 +wandb/vendor/pygments/lexers/ncl.py,sha256=cvnCcYpC0jpHBrwtNXZhY5HheY3UMThsYbgscHGvZLM,63986 +wandb/vendor/pygments/lexers/nimrod.py,sha256=OizSj9kHvtFEu0OPXuBrXZCf_ZBMnR4hm3nMbjw50hQ,5174 +wandb/vendor/pygments/lexers/nit.py,sha256=1SJ45GOd9zQKuWhPuVy-KhLkXQn6V-7ESvjJJ7U9Vpo,2743 +wandb/vendor/pygments/lexers/nix.py,sha256=dWzLp5QxzLmskDflyMUGidGNau9Vtk8ViK5c6B2O4kI,4031 +wandb/vendor/pygments/lexers/oberon.py,sha256=CbqkEOdqxvWXfez5FiGeCE-f-Vlt6tu9kqPFEVVXAQc,3733 +wandb/vendor/pygments/lexers/objective.py,sha256=qCPLLfU3hl-CIOJWAZdQYjeIl1Ox1igZaPRGKowKYbs,22764 +wandb/vendor/pygments/lexers/ooc.py,sha256=_lnOynAR0vHli7OKWJ4yZs9-hyPZE5DGKwkdkP6SCuM,2999 +wandb/vendor/pygments/lexers/other.py,sha256=Utlo5esm3DetK9PSOueHu5mEjR25dIN3T_g2-u9cmeA,1768 +wandb/vendor/pygments/lexers/parasail.py,sha256=Egm3PcuCBjDgwUvvI0-t3oXMz4PPRY0dER3orrrlnfc,2737 +wandb/vendor/pygments/lexers/parsers.py,sha256=S93llPIzcqL0VU2C_SzFa-pykNcFE37Kvy9_7fNmdg4,27582 +wandb/vendor/pygments/lexers/pascal.py,sha256=tA4Na6dzTz8nd9-Q_tcBFVDo161qfG9bR4xIIIB8FY0,32646 +wandb/vendor/pygments/lexers/pawn.py,sha256=eJJfXLHPYEPflh3fKgyq4PD5b52pcqjBnAGDicqHK9w,8094 +wandb/vendor/pygments/lexers/perl.py,sha256=-k_lftMhedsEIQwmvEZyy8Xbtlgj28_fic6HhN_ZYGI,32012 +wandb/vendor/pygments/lexers/php.py,sha256=7tgZQvYAnprFRQfAUxOlXgNkeUyOYsvIkM5oW0NSzOU,10730 +wandb/vendor/pygments/lexers/praat.py,sha256=GpHWS1IyqpvFCbZ7JWXSyxgBl8KAQED8IonkJM-Ml28,12556 +wandb/vendor/pygments/lexers/prolog.py,sha256=GWAUHvP3eyROfr3ry8g_7OJSNpD3vwfAFTJsrqIL7cQ,12066 +wandb/vendor/pygments/lexers/python.py,sha256=pn_V-1XyAqoYD4x8Pclk4eP8nkYvacpObY06xwDYSq8,42384 +wandb/vendor/pygments/lexers/qvt.py,sha256=LnLMM2jTrc5k4kInraQmmui1mgf76Wx5Ln2CfBFqj4I,6111 +wandb/vendor/pygments/lexers/r.py,sha256=6aUQ8T4qn6qIWuR-D9P_r05CEcP5SJ8wMadzUVrgJ4k,23755 +wandb/vendor/pygments/lexers/rdf.py,sha256=qbH7suOIdGY435x721iWhJ9QXT3MYPo874Jss8f2WCY,9398 +wandb/vendor/pygments/lexers/rebol.py,sha256=91kF9ueomN_2-Za8u1nIsuYN6uTQ3T1UbZk3IfRoiD8,18617 +wandb/vendor/pygments/lexers/resource.py,sha256=uS23PmW5COZfyyCte9s6xLhqZS2uhfH5P3G41QGp5U0,2933 +wandb/vendor/pygments/lexers/rnc.py,sha256=QvwLWh7IG9LYp9hmD7dI2MM4ikNaeqSQf26LmCBPVLA,1990 +wandb/vendor/pygments/lexers/roboconf.py,sha256=2__rRqffgFjrqyFFHHjibSg1qHCm2_lIT7lOGu63DNI,2070 +wandb/vendor/pygments/lexers/robotframework.py,sha256=qKKxIoTAMDnr_iDEnFsF9sjH63uhr1hDQUMStJydMYo,18744 +wandb/vendor/pygments/lexers/ruby.py,sha256=pukJJddNWR7jC4Uxc_qnOrcFXI5am3d0A8ApiZfeAnQ,22141 +wandb/vendor/pygments/lexers/rust.py,sha256=q18g2pHP_srVa8ANoyiIoMmXB4XkYI6Xp57rC-V9xmU,7695 +wandb/vendor/pygments/lexers/sas.py,sha256=oKP_7bIyKUnFS8kDGKsWxHqKhkRBV4emle28pX3MUzE,9449 +wandb/vendor/pygments/lexers/scripting.py,sha256=1_gD_-cQHrDF-uDEmBlelrUSWV5cQoz79EZ_3RpAh48,67761 +wandb/vendor/pygments/lexers/shell.py,sha256=H1byqbwQefCUaSDra6EabmI2o15zfpeusc73p1mBDQw,31426 +wandb/vendor/pygments/lexers/smalltalk.py,sha256=QJHVLNsCWr8zWHoF9C9Lev7LwefFYgI7L4mtY-LWJRU,7215 +wandb/vendor/pygments/lexers/smv.py,sha256=HnLzDk-zFDXhaHXxFI-ZINv6pW6stkk0IfxVHgStOLY,2802 +wandb/vendor/pygments/lexers/snobol.py,sha256=glC_g_14iKbHWaYCdkMibhGBNdPbzOgl7MVlJbpZMUI,2756 +wandb/vendor/pygments/lexers/special.py,sha256=Q1qXU0E8ecPXL_rMnzksLNbcisjOexxjXmo9j5ODBmM,3151 +wandb/vendor/pygments/lexers/sql.py,sha256=eMnkUuSpfII72c_lCcxOSWkuAuZH7qN6GkwM1xllMpA,29445 +wandb/vendor/pygments/lexers/stata.py,sha256=XI46JTQw-9YH5TkDB35FfFy8lJVaxr7qbdnOWbFhG3s,3627 +wandb/vendor/pygments/lexers/supercollider.py,sha256=t5LHZNcKwtgxnnCJnHCSYGjHBGXZzNR_TLF_pPOMrh4,3516 +wandb/vendor/pygments/lexers/tcl.py,sha256=ulsFqa6OwCKUoJHDvqBLdVHZL31EA5BDI8bf3iB703E,5398 +wandb/vendor/pygments/lexers/templates.py,sha256=V4ColLZh2NTkxI_zr4J7JnpRAafVNEezy3GWjq8knXs,73457 +wandb/vendor/pygments/lexers/testing.py,sha256=lup3FuiDthufXo3ujm6HSV4QKBscYoTpNe9K5iHCZ2g,10751 +wandb/vendor/pygments/lexers/text.py,sha256=7nKWCivruly7wyquaug3-IF8v2fUdXUVSYXHMVUlkdY,977 +wandb/vendor/pygments/lexers/textedit.py,sha256=1kH4uCnq4j80c0KGSMRJgzRgglm_5ckoiQVZX21qXvc,6057 +wandb/vendor/pygments/lexers/textfmts.py,sha256=sOQ4vDo5P1SpY_obS7N5oObolY501Tk2va69iDQyWWM,10852 +wandb/vendor/pygments/lexers/theorem.py,sha256=HmW981GDEA0TM8H7siEv2lszH-U9S7hcExRyom2eX2w,19034 +wandb/vendor/pygments/lexers/trafficscript.py,sha256=Xyfa407k2_rzvlKuExUcB5h6bC89WN6eQx6K3o3uV3o,1546 +wandb/vendor/pygments/lexers/typoscript.py,sha256=c6gOzNkvqgixbRKeQO7vXSrEPf6K4pnrFLFQ9SzusA8,8392 +wandb/vendor/pygments/lexers/urbi.py,sha256=p4gxSltIKKMFL8wJuLQ_cC40zSAC8bqc7aXZT0s5M7Y,5750 +wandb/vendor/pygments/lexers/varnish.py,sha256=5aSrhCfYFRbZsvKtQuKzJjHGCosabDGua3_LCG-JLlA,7265 +wandb/vendor/pygments/lexers/verification.py,sha256=Pb3upMUI03UFFsYAmqEzB2VK3N-ppMs1KYExE_tS1yE,3705 +wandb/vendor/pygments/lexers/web.py,sha256=5RB4JP962BUzuMIHon_H3tRgO458FAROJ91S8uk-gno,918 +wandb/vendor/pygments/lexers/webmisc.py,sha256=-6FzwUll5VU4oN6rSutfQmqPqD_OvWZ7kZWO1H3WMXo,39891 +wandb/vendor/pygments/lexers/whiley.py,sha256=YNCb-hXy8rPPVH9ea4q8QAXqncXNPHtgqAqAKPLfHfM,4012 +wandb/vendor/pygments/lexers/x10.py,sha256=FyCneMc5r_PRL7a0iaAsvgfyrxk2dYSzE9WJa1O4ZBw,1965 +wandb/vendor/pygments/modeline.py,sha256=83v6_3Zo9RHEc0K8aepm1Sc8Iou7mRcwogl9MLUciiI,1010 +wandb/vendor/pygments/plugin.py,sha256=NFKzfoPXMA8x6yXqMVbM0k1YKHHeQIwnDEvVlxd-MEQ,1721 +wandb/vendor/pygments/regexopt.py,sha256=t8y9hRPYQKJysZQhWd_t15aqRAGJSk0ABynKyjmogIQ,3094 +wandb/vendor/pygments/scanner.py,sha256=Mf-ya9riFJ85N3AiGKvBUsAsjSEfTd0Bqw8KMxhj2ew,3123 +wandb/vendor/pygments/sphinxext.py,sha256=1nig8VbRlfIDZd1fhOKQmX2KcxyQoexwsOdX3DSGE1I,4655 +wandb/vendor/pygments/style.py,sha256=R-iSqMPqnMtciPTgPMvqNjUkWtg7CCQTpyyCBSAOv_g,4807 +wandb/vendor/pygments/styles/__init__.py,sha256=bMJA5A-As-KqVlgOVa1ryoivG-fI20nE5mlEvneFqT0,2553 +wandb/vendor/pygments/styles/__pycache__/__init__.cpython-312.pyc,, +wandb/vendor/pygments/styles/__pycache__/abap.cpython-312.pyc,, +wandb/vendor/pygments/styles/__pycache__/algol.cpython-312.pyc,, +wandb/vendor/pygments/styles/__pycache__/algol_nu.cpython-312.pyc,, +wandb/vendor/pygments/styles/__pycache__/arduino.cpython-312.pyc,, +wandb/vendor/pygments/styles/__pycache__/autumn.cpython-312.pyc,, +wandb/vendor/pygments/styles/__pycache__/borland.cpython-312.pyc,, +wandb/vendor/pygments/styles/__pycache__/bw.cpython-312.pyc,, +wandb/vendor/pygments/styles/__pycache__/colorful.cpython-312.pyc,, +wandb/vendor/pygments/styles/__pycache__/default.cpython-312.pyc,, +wandb/vendor/pygments/styles/__pycache__/emacs.cpython-312.pyc,, +wandb/vendor/pygments/styles/__pycache__/friendly.cpython-312.pyc,, +wandb/vendor/pygments/styles/__pycache__/fruity.cpython-312.pyc,, +wandb/vendor/pygments/styles/__pycache__/igor.cpython-312.pyc,, +wandb/vendor/pygments/styles/__pycache__/lovelace.cpython-312.pyc,, +wandb/vendor/pygments/styles/__pycache__/manni.cpython-312.pyc,, +wandb/vendor/pygments/styles/__pycache__/monokai.cpython-312.pyc,, +wandb/vendor/pygments/styles/__pycache__/murphy.cpython-312.pyc,, +wandb/vendor/pygments/styles/__pycache__/native.cpython-312.pyc,, +wandb/vendor/pygments/styles/__pycache__/paraiso_dark.cpython-312.pyc,, +wandb/vendor/pygments/styles/__pycache__/paraiso_light.cpython-312.pyc,, +wandb/vendor/pygments/styles/__pycache__/pastie.cpython-312.pyc,, +wandb/vendor/pygments/styles/__pycache__/perldoc.cpython-312.pyc,, +wandb/vendor/pygments/styles/__pycache__/rainbow_dash.cpython-312.pyc,, +wandb/vendor/pygments/styles/__pycache__/rrt.cpython-312.pyc,, +wandb/vendor/pygments/styles/__pycache__/sas.cpython-312.pyc,, +wandb/vendor/pygments/styles/__pycache__/stata.cpython-312.pyc,, +wandb/vendor/pygments/styles/__pycache__/tango.cpython-312.pyc,, +wandb/vendor/pygments/styles/__pycache__/trac.cpython-312.pyc,, +wandb/vendor/pygments/styles/__pycache__/vim.cpython-312.pyc,, +wandb/vendor/pygments/styles/__pycache__/vs.cpython-312.pyc,, +wandb/vendor/pygments/styles/__pycache__/xcode.cpython-312.pyc,, +wandb/vendor/pygments/styles/abap.py,sha256=GYW80_C20vlhROQCE9RIn8oOy0uFO5VeJJMm7FXCEz8,751 +wandb/vendor/pygments/styles/algol.py,sha256=mE09x_hUp-ferskH8OLAWO115u9GQQYMR70Y-2zS6Y0,2263 +wandb/vendor/pygments/styles/algol_nu.py,sha256=psY0F47Bl5LThIeih15ghZvkalijyq6jrUnx84n_TFg,2278 +wandb/vendor/pygments/styles/arduino.py,sha256=UTcdXehOhcXWda9NlYeW3piKZUbEpQQkx0ARZCC7Ih4,4492 +wandb/vendor/pygments/styles/autumn.py,sha256=FpFEPsPBnGugtBp4M-3FqKPbKlGomYAbq9HSNiYh3DU,2144 +wandb/vendor/pygments/styles/borland.py,sha256=QhOMFrDL3PAwEJZkuEt9qzPN8T8cVooRG5vtLROgkRc,1562 +wandb/vendor/pygments/styles/bw.py,sha256=vBQMjQhou4csJMHTIE5AJCeLESFaE5UqgSPN2ZAli6o,1355 +wandb/vendor/pygments/styles/colorful.py,sha256=SWzWtEmeEoZ7DNIh6XQeZxDz6bIOlgBuwGFePB2PUmc,2778 +wandb/vendor/pygments/styles/default.py,sha256=UUN6VGAOB12b_R2ky-6cHfdaXE34xJaNtaHwsBzl1I8,2532 +wandb/vendor/pygments/styles/emacs.py,sha256=CndsC1mEd6GGVCFA1uKmb5rMqjMiMCqJ1uBE2fgKCQA,2486 +wandb/vendor/pygments/styles/friendly.py,sha256=0c5ibD9ldewtsKzgjHSV2-FN_iRdDa_bUkVWi8ZnfdE,2515 +wandb/vendor/pygments/styles/fruity.py,sha256=cSYED092upFc4kekb2m-f34Wh4BWxXyEb8N6rYLZOas,1298 +wandb/vendor/pygments/styles/igor.py,sha256=MZNAVwgWh5FU2bRbKaXo5uV9_h2IH3gh4Cm3MspnFIc,739 +wandb/vendor/pygments/styles/lovelace.py,sha256=u0fQW4OUZ37w9Z1A0pzsMYfJX68kxMrp0CbjWJg46pE,3173 +wandb/vendor/pygments/styles/manni.py,sha256=2CC4G2o6hUYfCceP4O9bpNBgNONW7HCJ--L3khD7jhc,2374 +wandb/vendor/pygments/styles/monokai.py,sha256=QgSUuhv6DDz7LhyfL9lW5VMIRJIj0ID_GqTJupunWgs,5080 +wandb/vendor/pygments/styles/murphy.py,sha256=m2bWPIFW8gnR2miA6FF2kYDwXT2sltSJ9MMcA1AEnqg,2751 +wandb/vendor/pygments/styles/native.py,sha256=V_mDvPG5eUm8V2XSCYsKsqkp0XfxK8gn80wryiUmmIU,1938 +wandb/vendor/pygments/styles/paraiso_dark.py,sha256=YxdADs3KBND4ZXfYqkQBXGxIs2y4VxjaiKw8f3AdoFo,5641 +wandb/vendor/pygments/styles/paraiso_light.py,sha256=-HHuYHnJBX7Yehza875DjU4ly95ATC1sh6o_RuqbeuI,5645 +wandb/vendor/pygments/styles/pastie.py,sha256=6ku_vX2aFP7N9iAsT8a-1lzf9L1DR_j0SE37HVbFoSw,2473 +wandb/vendor/pygments/styles/perldoc.py,sha256=CJq6FzNG22C3aru3QO2_l6ebksqnAQhSBLeiYYoJjhw,2175 +wandb/vendor/pygments/styles/rainbow_dash.py,sha256=mPI5Yfl-sRW9Aig_xvs63i3sjWqO5fpihBbiaLozyYM,2480 +wandb/vendor/pygments/styles/rrt.py,sha256=-UUYhzna_sPcmwUXEtnDoAaUD8cnomk8grWfKOsmJ-M,852 +wandb/vendor/pygments/styles/sas.py,sha256=yKgZ8AiADLXtVZLZ0JtxlB6BGJAVkcX0DyG8g-R8nSE,1441 +wandb/vendor/pygments/styles/stata.py,sha256=PH8ckY6Q68QQXjv8wDK_Z-DVbyiWfy5vRLd4HUYd02k,1249 +wandb/vendor/pygments/styles/tango.py,sha256=Bsn6unVhwiOJ8dc1-csQYHanRjIZ7JOxQndq6Dc-BxE,7096 +wandb/vendor/pygments/styles/trac.py,sha256=XlcVcvSqIfVeqSsQo34V5B0VLi_FQwlpfaE0Zv7LE0M,1933 +wandb/vendor/pygments/styles/vim.py,sha256=hgv2HvW3kriTmj0HE7TdzeJhJhxvblqEG-S3ELiZEX4,1976 +wandb/vendor/pygments/styles/vs.py,sha256=X7jUKNoKNnNE6ewe9vsGgTeSxK4a7x8oBbaA6LNzpGQ,1073 +wandb/vendor/pygments/styles/xcode.py,sha256=gWl7xboxgvDzARO8-VmBfUX0GOnWWbGU9Su_TAIyEFQ,1501 +wandb/vendor/pygments/token.py,sha256=qowb6oBuyzaRfTyUe7F-LeMcNwRNLEiwjZl9o3ggsxc,6167 +wandb/vendor/pygments/unistring.py,sha256=rkFlgo6QzdUFWQ-uiOaz6MFfQg1f0-hH_B5F3PFXwXA,51150 +wandb/vendor/pygments/util.py,sha256=xO8RGLd_-7DoXCL799lWYgyub4whP2pSmnIsx1-wMyA,11900 +wandb/vendor/pynvml/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +wandb/vendor/pynvml/__pycache__/__init__.cpython-312.pyc,, +wandb/vendor/pynvml/__pycache__/pynvml.cpython-312.pyc,, +wandb/vendor/pynvml/pynvml.py,sha256=YSAbTlVy3mb7akj3AmXnndaPxKLMLgvu0bwCLwKg9G8,148741 +wandb/vendor/watchdog_0_9_0/wandb_watchdog/__init__.py,sha256=-eu2NcfsKwZHudYM1DwZob-gagx9DhVVvJOvmIGWo8o,684 +wandb/vendor/watchdog_0_9_0/wandb_watchdog/__pycache__/__init__.cpython-312.pyc,, +wandb/vendor/watchdog_0_9_0/wandb_watchdog/__pycache__/events.cpython-312.pyc,, +wandb/vendor/watchdog_0_9_0/wandb_watchdog/__pycache__/patterns.cpython-312.pyc,, +wandb/vendor/watchdog_0_9_0/wandb_watchdog/__pycache__/version.cpython-312.pyc,, +wandb/vendor/watchdog_0_9_0/wandb_watchdog/__pycache__/watchmedo.cpython-312.pyc,, +wandb/vendor/watchdog_0_9_0/wandb_watchdog/events.py,sha256=1ASc8KEcDJr9zL47lLmV2oz8qgepk6NvaZgYKyRLUaE,18623 +wandb/vendor/watchdog_0_9_0/wandb_watchdog/observers/__init__.py,sha256=tu15U0Qqv_306QJNVbjkxDuiTXJ0qV11uVboBBwiDFM,3864 +wandb/vendor/watchdog_0_9_0/wandb_watchdog/observers/__pycache__/__init__.cpython-312.pyc,, +wandb/vendor/watchdog_0_9_0/wandb_watchdog/observers/__pycache__/api.cpython-312.pyc,, +wandb/vendor/watchdog_0_9_0/wandb_watchdog/observers/__pycache__/fsevents.cpython-312.pyc,, +wandb/vendor/watchdog_0_9_0/wandb_watchdog/observers/__pycache__/fsevents2.cpython-312.pyc,, +wandb/vendor/watchdog_0_9_0/wandb_watchdog/observers/__pycache__/inotify.cpython-312.pyc,, +wandb/vendor/watchdog_0_9_0/wandb_watchdog/observers/__pycache__/inotify_buffer.cpython-312.pyc,, +wandb/vendor/watchdog_0_9_0/wandb_watchdog/observers/__pycache__/inotify_c.cpython-312.pyc,, +wandb/vendor/watchdog_0_9_0/wandb_watchdog/observers/__pycache__/kqueue.cpython-312.pyc,, +wandb/vendor/watchdog_0_9_0/wandb_watchdog/observers/__pycache__/polling.cpython-312.pyc,, +wandb/vendor/watchdog_0_9_0/wandb_watchdog/observers/__pycache__/read_directory_changes.cpython-312.pyc,, +wandb/vendor/watchdog_0_9_0/wandb_watchdog/observers/__pycache__/winapi.cpython-312.pyc,, +wandb/vendor/watchdog_0_9_0/wandb_watchdog/observers/api.py,sha256=cS0sFG4bwV6ZgdpDasBIqLjvure7herE5TsiBP4sMAo,11738 +wandb/vendor/watchdog_0_9_0/wandb_watchdog/observers/fsevents.py,sha256=EbY5I7F7jCkHovbVq2w2kUtHBVeUIL4t4dZPzZFevFI,6546 +wandb/vendor/watchdog_0_9_0/wandb_watchdog/observers/fsevents2.py,sha256=yumICK41X4-r7AeSHF3MzzT9BXnGRkRhLzOT53oM9fY,9043 +wandb/vendor/watchdog_0_9_0/wandb_watchdog/observers/inotify.py,sha256=n8kgJ1zC_96SLEw8v0ZqHvOMRUg558zShwvIgdgLdJQ,8546 +wandb/vendor/watchdog_0_9_0/wandb_watchdog/observers/inotify_buffer.py,sha256=KT-1Unpru9UOMrKVgBt-KcI67dffMZNQpBmU27-uNgg,3055 +wandb/vendor/watchdog_0_9_0/wandb_watchdog/observers/inotify_c.py,sha256=IVH9UuEyLnYYiMXcLzpF0udT8jxAGSNbdCM38ttmf7M,18911 +wandb/vendor/watchdog_0_9_0/wandb_watchdog/observers/kqueue.py,sha256=vND2sY0FHxbliFacyaaKAoFg0XIfOPW4azk0UshVBVs,25419 +wandb/vendor/watchdog_0_9_0/wandb_watchdog/observers/polling.py,sha256=qoWOKJ4g_FFbrz_kzMEHAU5F7piWsQr-TsJzHA2tk0g,4875 +wandb/vendor/watchdog_0_9_0/wandb_watchdog/observers/read_directory_changes.py,sha256=qDppFQyKrxC9eZy8DRWVbalIBLjYAN10fwp1OSrzugY,5262 +wandb/vendor/watchdog_0_9_0/wandb_watchdog/observers/winapi.py,sha256=dsnl8btBrosGICw-EW_aHr-B0c5hgsS0P7O6JAjAVOw,11685 +wandb/vendor/watchdog_0_9_0/wandb_watchdog/patterns.py,sha256=xWatHsYukVTIwVOw8O4BB0-_-ajx2z2vgGCA_NUfyss,10698 +wandb/vendor/watchdog_0_9_0/wandb_watchdog/tricks/__init__.py,sha256=b9I8ob_xvIQXqAVOx6Ujvhac2Es5mj4Kcp9m5gB1sd8,5198 +wandb/vendor/watchdog_0_9_0/wandb_watchdog/tricks/__pycache__/__init__.cpython-312.pyc,, +wandb/vendor/watchdog_0_9_0/wandb_watchdog/utils/__init__.py,sha256=GK7wGeS6z8UkG5BDUB-sHuLu8lFt7h77UdHFe5QBZmY,4472 +wandb/vendor/watchdog_0_9_0/wandb_watchdog/utils/__pycache__/__init__.cpython-312.pyc,, +wandb/vendor/watchdog_0_9_0/wandb_watchdog/utils/__pycache__/bricks.cpython-312.pyc,, +wandb/vendor/watchdog_0_9_0/wandb_watchdog/utils/__pycache__/compat.cpython-312.pyc,, +wandb/vendor/watchdog_0_9_0/wandb_watchdog/utils/__pycache__/decorators.cpython-312.pyc,, +wandb/vendor/watchdog_0_9_0/wandb_watchdog/utils/__pycache__/delayed_queue.cpython-312.pyc,, +wandb/vendor/watchdog_0_9_0/wandb_watchdog/utils/__pycache__/dirsnapshot.cpython-312.pyc,, +wandb/vendor/watchdog_0_9_0/wandb_watchdog/utils/__pycache__/echo.cpython-312.pyc,, +wandb/vendor/watchdog_0_9_0/wandb_watchdog/utils/__pycache__/event_backport.cpython-312.pyc,, +wandb/vendor/watchdog_0_9_0/wandb_watchdog/utils/__pycache__/importlib2.cpython-312.pyc,, +wandb/vendor/watchdog_0_9_0/wandb_watchdog/utils/__pycache__/platform.cpython-312.pyc,, +wandb/vendor/watchdog_0_9_0/wandb_watchdog/utils/__pycache__/unicode_paths.cpython-312.pyc,, +wandb/vendor/watchdog_0_9_0/wandb_watchdog/utils/__pycache__/win32stat.cpython-312.pyc,, +wandb/vendor/watchdog_0_9_0/wandb_watchdog/utils/bricks.py,sha256=0iMa_IT_lX2-aY_GR0Yf2d925kFCajvnz-kXdV5d1vc,7548 +wandb/vendor/watchdog_0_9_0/wandb_watchdog/utils/compat.py,sha256=ezeJrD0LTvg2arGGWhQ0oq4CB31Hqi2FvJoJbDgX7No,860 +wandb/vendor/watchdog_0_9_0/wandb_watchdog/utils/decorators.py,sha256=MkJQIlK9L3FD62_mzr-zlgJMQG6bey8C06xUxWkKucQ,4451 +wandb/vendor/watchdog_0_9_0/wandb_watchdog/utils/delayed_queue.py,sha256=Q0Eylpvc-9wuKmvVcgk1dvm8GKJvif7zdLdk58P17aI,2926 +wandb/vendor/watchdog_0_9_0/wandb_watchdog/utils/dirsnapshot.py,sha256=l4I52zaCbXS3wt1dxYHT2JhaH8UUuQtrcyvULlBFP3o,9319 +wandb/vendor/watchdog_0_9_0/wandb_watchdog/utils/echo.py,sha256=frPR2B1ZOvNue66V1WfzDjjX-fnv5_xYw36hQT6tuU4,5305 +wandb/vendor/watchdog_0_9_0/wandb_watchdog/utils/event_backport.py,sha256=vnOWu6nNdSJJo69VSxeCfnfsXOo4CwTQDlMr6jAa6eI,902 +wandb/vendor/watchdog_0_9_0/wandb_watchdog/utils/importlib2.py,sha256=cJIaJ2EQsoA8eWZ3d8hvgXq3OUxoRDdD5jo9XbUMRMI,1840 +wandb/vendor/watchdog_0_9_0/wandb_watchdog/utils/platform.py,sha256=UORYTNVcUSE2NpFcq9UVLIS-tsS0TS_Qw8akhKxn2eY,1506 +wandb/vendor/watchdog_0_9_0/wandb_watchdog/utils/unicode_paths.py,sha256=UWX8DB97ygkEeSxWQUYCHR4MahNilux7vl5TCTQtPPk,2190 +wandb/vendor/watchdog_0_9_0/wandb_watchdog/utils/win32stat.py,sha256=ZOevOTbSo8NRiIxkuBVGaG4yigWnPoO0goxAi-jsBkM,3828 +wandb/vendor/watchdog_0_9_0/wandb_watchdog/version.py,sha256=GAUJcx7KVSbKa25fjKipygYc9zPtEPDDDcwlUpKfgmI,974 +wandb/vendor/watchdog_0_9_0/wandb_watchdog/watchmedo.py,sha256=wiAGdrwO3F3bOxExzkzve0cSPEUskuPo4VR1u41qRU8,17458 +wandb/wandb_agent.py,sha256=kdlK_NZRZRNkjXRUha7Q-1fDOARf7v0TyIr_a-aRXKk,20868 +wandb/wandb_controller.py,sha256=SksJdgwn14PpnUoIaBjJ9Ki4Nksl9BpQGGn42hT0xZg,24936 +wandb/wandb_run.py,sha256=CNh9S6uubFk8FphQjzkbvedyyGCN9aBEsRBKjy8tqqs,155 diff --git a/lib/python3.12/site-packages/wandb-0.21.0.dist-info/REQUESTED b/lib/python3.12/site-packages/wandb-0.21.0.dist-info/REQUESTED new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/lib/python3.12/site-packages/wandb-0.21.0.dist-info/WHEEL b/lib/python3.12/site-packages/wandb-0.21.0.dist-info/WHEEL new file mode 100644 index 0000000000000000000000000000000000000000..3bb071302aa652134e6a1a3f3fbe6beaa2a1690f --- /dev/null +++ b/lib/python3.12/site-packages/wandb-0.21.0.dist-info/WHEEL @@ -0,0 +1,6 @@ +Wheel-Version: 1.0 +Generator: hatchling 1.27.0 +Root-Is-Purelib: true +Tag: py3-none-manylinux_2_17_x86_64 +Tag: py3-none-manylinux2014_x86_64 + diff --git a/lib/python3.12/site-packages/wandb-0.21.0.dist-info/entry_points.txt b/lib/python3.12/site-packages/wandb-0.21.0.dist-info/entry_points.txt new file mode 100644 index 0000000000000000000000000000000000000000..bd9806f6b8b58b8ad6081627328a817c45942064 --- /dev/null +++ b/lib/python3.12/site-packages/wandb-0.21.0.dist-info/entry_points.txt @@ -0,0 +1,3 @@ +[console_scripts] +wandb = wandb.cli.cli:cli +wb = wandb.cli.cli:cli diff --git a/lib/python3.12/site-packages/wandb-0.21.0.dist-info/licenses/LICENSE b/lib/python3.12/site-packages/wandb-0.21.0.dist-info/licenses/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..1f4e645404cd4ae9f131e45091c1cf9db97af225 --- /dev/null +++ b/lib/python3.12/site-packages/wandb-0.21.0.dist-info/licenses/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2021 Weights and Biases, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/lib/python3.12/site-packages/xformers/__init__.py b/lib/python3.12/site-packages/xformers/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..bfcae56b950074f3cb74b67cad270b1b49730f26 --- /dev/null +++ b/lib/python3.12/site-packages/xformers/__init__.py @@ -0,0 +1,73 @@ +# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved. +# +# This source code is licensed under the BSD license found in the +# LICENSE file in the root directory of this source tree. + +import logging +import os + +import torch + +from . import _cpp_lib +from .checkpoint import ( # noqa: E402, F401 + checkpoint, + get_optimal_checkpoint_policy, + list_operators, + selective_checkpoint_wrapper, +) + +try: + from .version import __version__ # noqa: F401 +except ImportError: + __version__ = "0.0.0" + + +logger = logging.getLogger("xformers") + +_has_cpp_library: bool = _cpp_lib._cpp_library_load_exception is None + +_is_opensource: bool = True + + +def compute_once(func): + value = None + + def func_wrapper(): + nonlocal value + if value is None: + value = func() + return value + + return func_wrapper + + +@compute_once +def _is_triton_available(): + if os.environ.get("XFORMERS_ENABLE_TRITON", "0") == "1": + return True + if not torch.cuda.is_available(): + return False + if os.environ.get("XFORMERS_FORCE_DISABLE_TRITON", "0") == "1": + return False + # We have many errors on V100 with recent triton versions + # Let's just drop support for triton kernels below A100 + if torch.cuda.get_device_capability("cuda") < (8, 0): + return False + try: + import triton # noqa + + return True + except (ImportError, AttributeError): + logger.warning( + "A matching Triton is not available, some optimizations will not be enabled", + exc_info=True, + ) + return False + + +@compute_once +def get_python_lib(): + return torch.library.Library("xformers_python", "DEF") + + +# end of file diff --git a/lib/python3.12/site-packages/xformers/_cpp_lib.py b/lib/python3.12/site-packages/xformers/_cpp_lib.py new file mode 100644 index 0000000000000000000000000000000000000000..b9686b4adb76046f5bac41694173e406836f1ee1 --- /dev/null +++ b/lib/python3.12/site-packages/xformers/_cpp_lib.py @@ -0,0 +1,155 @@ +# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved. +# +# This source code is licensed under the BSD license found in the +# LICENSE file in the root directory of this source tree. + +import dataclasses +import json +import logging +import os +import platform +from typing import Any, Dict, Optional + +import torch + +logger = logging.getLogger("xformers") + +UNAVAILABLE_FEATURES_MSG = ( + " Memory-efficient attention, SwiGLU, sparse and more won't be available." +) + + +@dataclasses.dataclass +class _BuildInfo: + metadata: Dict[str, Any] + + @property + def cuda_version(self) -> Optional[int]: + return self.metadata["version"]["cuda"] + + @property + def hip_version(self) -> Optional[int]: + return self.metadata["version"]["hip"] + + @property + def torch_version(self) -> str: + return self.metadata["version"]["torch"] + + @property + def python_version(self) -> str: + return self.metadata["version"]["python"] + + @property + def flash_version(self) -> str: + return self.metadata["version"].get("flash", "0.0.0") + + @property + def use_torch_flash(self) -> bool: + return self.metadata["version"].get("use_torch_flash", False) + + @property + def build_env(self) -> Dict[str, Any]: + return self.metadata["env"] + + +class xFormersWasNotBuiltException(Exception): + def __str__(self) -> str: + return ( + "Need to compile C++ extensions to use all xFormers features.\n" + " Please install xformers properly " + "(see https://github.com/facebookresearch/xformers#installing-xformers)\n" + + UNAVAILABLE_FEATURES_MSG + ) + + +class xFormersInvalidLibException(Exception): + def __init__(self, build_info: Optional[_BuildInfo]) -> None: + self.build_info = build_info + + def __str__(self) -> str: + if self.build_info is None: + msg = "xFormers was built for a different version of PyTorch or Python." + else: + msg = f"""xFormers was built for: + PyTorch {self.build_info.torch_version} with CUDA {self.build_info.cuda_version} (you have {torch.__version__}) + Python {self.build_info.python_version} (you have {platform.python_version()})""" + return ( + "xFormers can't load C++/CUDA extensions. " + + msg + + "\n Please reinstall xformers " + "(see https://github.com/facebookresearch/xformers#installing-xformers)\n" + + UNAVAILABLE_FEATURES_MSG + ) + + +def _register_extensions(): + import importlib + import os + + import torch + + # load the custom_op_library and register the custom ops + lib_dir = os.path.dirname(__file__) + if os.name == "nt": + # Register the main torchvision library location on the default DLL path + import ctypes + import sys + + kernel32 = ctypes.WinDLL("kernel32.dll", use_last_error=True) + with_load_library_flags = hasattr(kernel32, "AddDllDirectory") + prev_error_mode = kernel32.SetErrorMode(0x0001) + + if with_load_library_flags: + kernel32.AddDllDirectory.restype = ctypes.c_void_p + + if sys.version_info >= (3, 8): + os.add_dll_directory(lib_dir) + elif with_load_library_flags: + res = kernel32.AddDllDirectory(lib_dir) + if res is None: + err = ctypes.WinError(ctypes.get_last_error()) + err.strerror += f' Error adding "{lib_dir}" to the DLL directories.' + raise err + + kernel32.SetErrorMode(prev_error_mode) + + loader_details = ( + importlib.machinery.ExtensionFileLoader, + importlib.machinery.EXTENSION_SUFFIXES, + ) + + extfinder = importlib.machinery.FileFinder(lib_dir, loader_details) + if torch.version.hip and not hasattr(torch.version, "git_version"): + ext_specs = extfinder.find_spec("_C_hip") + else: + ext_specs = extfinder.find_spec("_C") + if ext_specs is None: + raise xFormersWasNotBuiltException() + cpp_lib_json = os.path.join(lib_dir, "cpp_lib.json") + with open(cpp_lib_json, "r") as fp: + build_metadata = _BuildInfo(json.load(fp)) + try: + torch.ops.load_library(ext_specs.origin) + except OSError as exc: + raise xFormersInvalidLibException(build_metadata) from exc + return build_metadata + + +_cpp_library_load_exception = None +_build_metadata: Optional[_BuildInfo] = None + +try: + _build_metadata = _register_extensions() +except (xFormersInvalidLibException, xFormersWasNotBuiltException) as e: + ENV_VAR_FOR_DETAILS = "XFORMERS_MORE_DETAILS" + if os.environ.get(ENV_VAR_FOR_DETAILS, False): + logger.warning(f"WARNING[XFORMERS]: {e}", exc_info=e) + else: + logger.warning( + f"WARNING[XFORMERS]: {e}\n Set {ENV_VAR_FOR_DETAILS}=1 for more details" + ) + _cpp_library_load_exception = e + +_built_with_cuda = ( + _build_metadata is not None and _build_metadata.cuda_version is not None +) diff --git a/lib/python3.12/site-packages/xformers/_deprecation_warning.py b/lib/python3.12/site-packages/xformers/_deprecation_warning.py new file mode 100644 index 0000000000000000000000000000000000000000..505ef15e65b7638dc6332f4204793c708e7c5ae3 --- /dev/null +++ b/lib/python3.12/site-packages/xformers/_deprecation_warning.py @@ -0,0 +1,12 @@ +# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved. +# +# This source code is licensed under the BSD license found in the +# LICENSE file in the root directory of this source tree. + +import warnings + + +def deprecated_function(self): + name = repr(self) # self.__name__ + msg = f"{name} is deprecated and is not maintained anymore. It might be removed in a future version of xFormers" + warnings.warn(msg, FutureWarning, stacklevel=2) diff --git a/lib/python3.12/site-packages/xformers/attn_bias_utils.py b/lib/python3.12/site-packages/xformers/attn_bias_utils.py new file mode 100644 index 0000000000000000000000000000000000000000..02114c39a42f1a1d9fd78b839073fc93c5d6f52d --- /dev/null +++ b/lib/python3.12/site-packages/xformers/attn_bias_utils.py @@ -0,0 +1,501 @@ +# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved. +# +# This source code is licensed under the BSD license found in the +# LICENSE file in the root directory of this source tree. + +import math +import random +from typing import List, Optional, Sequence, Tuple, Type + +import torch + +from xformers.ops import AttentionBias, fmha +from xformers.ops.fmha.attn_bias import AttentionBiasSubTensor +from xformers.ops.fmha.common import AttentionOpBase + + +def _create_aligned_bias(*shape: int, **kwargs) -> torch.Tensor: + align_to = 8 + return ( + torch.randn( + ( + *shape[:-1], + align_to * ((shape[-1] + align_to - 1) // align_to), + ), + **kwargs, + ) + * 3 + ).narrow(-1, 0, shape[-1]) + + +def create_attn_bias( + bias_type, + batch_size: int, + num_heads: int, + num_heads_groups: int, + q_len: int, + kv_len: int, + device, + dtype, + requires_grad: bool, + fmt: str, + op: Optional[Type[AttentionOpBase]] = None, + page_size: Optional[int] = None, +): + if bias_type is None or isinstance(None, bias_type): + return None + r = random.Random("-".join(map(str, [batch_size, q_len, kv_len, dtype, fmt]))) + window_size = {0: 3, 1: 128, 2: 300}[r.randint(0, 2)] + if bias_type is torch.Tensor: + if fmt == "BMK": + batch_size *= num_heads + num_heads = 1 + if op is not None and issubclass(op, fmha.triton_splitk.FwOp): + attn_bias = ( + torch.randn( + (batch_size, num_heads_groups, num_heads, q_len, kv_len), + device=device, + dtype=dtype, + ) + * 3 + ) + if fmt in ["BMK", "BMHK"]: + attn_bias = attn_bias[:, 0] + else: + attn_bias = _create_aligned_bias( + batch_size, + num_heads_groups, + num_heads, + q_len, + kv_len, + device=device, + dtype=dtype, + ) + + # make sure it also works if the first columns/rows are partially masked out + attn_bias[0, 0, 0, : q_len - 1, : kv_len - 1] = -math.inf + if fmt in ["BMK", "BMHK"]: + attn_bias = attn_bias[:, 0] + + if requires_grad: + attn_bias.requires_grad_(True) + if fmt == "BMK": + attn_bias = attn_bias[:, 0] + return attn_bias + if bias_type is fmha.attn_bias.LowerTriangularMask: + return bias_type() + if bias_type is fmha.attn_bias.LowerTriangularFromBottomRightMask: + return bias_type() + if bias_type is fmha.attn_bias.LowerTriangularFromBottomRightLocalAttentionMask: + return bias_type(window_size) + if bias_type is fmha.attn_bias.LowerTriangularMaskWithTensorBias: + attn_bias = _create_aligned_bias( + batch_size, + num_heads_groups, + num_heads, + q_len, + kv_len, + device=device, + dtype=dtype, + ) + if fmt in ["BMK", "BMHK"]: + attn_bias = attn_bias[:, 0] + if fmt == "BMK": + attn_bias = attn_bias[:, 0] + if requires_grad: + attn_bias.requires_grad_(True) + return fmha.attn_bias.LowerTriangularMaskWithTensorBias(attn_bias) + if bias_type in [ + fmha.attn_bias.BlockDiagonalMask, + fmha.attn_bias.BlockDiagonalCausalMask, + fmha.attn_bias.BlockDiagonalCausalFromBottomRightMask, + fmha.attn_bias.BlockDiagonalCausalLocalAttentionMask, + fmha.attn_bias.BlockDiagonalCausalLocalAttentionFromBottomRightMask, + ]: + # These bias types are not supported in BMK format + assert fmt in ["BMGHK", "BMHK"] + max_q_minus_k = None + if bias_type in { + fmha.attn_bias.BlockDiagonalCausalFromBottomRightMask, + fmha.attn_bias.BlockDiagonalCausalLocalAttentionFromBottomRightMask, + }: + max_q_minus_k = 0 + elif bias_type == fmha.attn_bias.BlockDiagonalCausalLocalAttentionMask: + assert window_size is not None + max_q_minus_k = window_size - 1 + + block_diag = fmha.attn_bias.BlockDiagonalMask.from_seqlens( + *_rand_seqlens( + r, + batch_size, + q_len, + kv_len, + max_q_minus_k=max_q_minus_k, + ) + ) + if bias_type is fmha.attn_bias.BlockDiagonalCausalMask: + block_diag = block_diag.make_causal() + if bias_type in { + fmha.attn_bias.BlockDiagonalCausalLocalAttentionMask, + fmha.attn_bias.BlockDiagonalCausalLocalAttentionFromBottomRightMask, + }: + block_diag = fmha.attn_bias.BlockDiagonalMask( + q_seqinfo=block_diag.q_seqinfo, + k_seqinfo=block_diag.k_seqinfo, + _batch_sizes=block_diag._batch_sizes, + ) + assert window_size is not None + if bias_type is fmha.attn_bias.BlockDiagonalCausalLocalAttentionMask: + block_diag = block_diag.make_local_attention(window_size) + else: + block_diag = block_diag.make_local_attention_from_bottomright( + window_size + ) + if bias_type is fmha.attn_bias.BlockDiagonalCausalFromBottomRightMask: + block_diag = block_diag.make_causal_from_bottomright() + return block_diag + if bias_type in [ + fmha.attn_bias.BlockDiagonalPaddedKeysMask, + fmha.attn_bias.BlockDiagonalCausalLocalAttentionPaddedKeysMask, + fmha.attn_bias.BlockDiagonalCausalWithOffsetPaddedKeysMask, + fmha.attn_bias.PagedBlockDiagonalPaddedKeysMask, + fmha.attn_bias.PagedBlockDiagonalCausalWithOffsetPaddedKeysMask, + ]: + assert fmt in ["BMHK", "BMGHK"] + q, k = _rand_seqlens_padded_k(r, batch_size, q_len, kv_len) + block_diag_type = ( + bias_type._UNPAGED_TYPE + if issubclass(bias_type, fmha.attn_bias.PagedBlockDiagonalPaddedKeysMask) + else bias_type + ) + if bias_type is fmha.attn_bias.BlockDiagonalCausalLocalAttentionPaddedKeysMask: + g_block_diag = block_diag_type.from_seqlens_local( + q_seqlen=q, + kv_padding=kv_len, + kv_seqlen=k, + window_size=min(window_size, min(k)), + ) + else: + g_block_diag = block_diag_type.from_seqlens( + q_seqlen=q, + kv_padding=kv_len, + kv_seqlen=k, + ) + if issubclass(bias_type, fmha.attn_bias.PagedBlockDiagonalPaddedKeysMask): + assert page_size is not None + pages_per_row = (kv_len + page_size - 1) // page_size + block_tables = torch.tensor( + r.sample(range(batch_size * pages_per_row), batch_size * pages_per_row), + device=device, + dtype=torch.int32, + ).reshape(batch_size, pages_per_row) + return g_block_diag.make_paged( + block_tables=block_tables, page_size=page_size, paged_type=bias_type + ) + return g_block_diag + if bias_type in [ + fmha.attn_bias.BlockDiagonalCausalWithOffsetGappyKeysMask, + fmha.attn_bias.BlockDiagonalGappyKeysMask, + ]: + assert fmt in ["BMHK", "BMGHK"] + max_q_minus_k = ( + None if bias_type is fmha.attn_bias.BlockDiagonalGappyKeysMask else 0 + ) + q, k = _rand_seqlens(r, batch_size, q_len, kv_len, max_q_minus_k) + total_kv_len = kv_len * batch_size + starts = [r.randint(0, total_kv_len - ki) for ki in k] + [total_kv_len] + return fmha.attn_bias.BlockDiagonalGappyKeysMask.from_seqlens( + q_seqlen=q, + kv_seqstarts=starts, + kv_seqlen=k, + ) + if bias_type in [ + fmha.attn_bias.PagedBlockDiagonalGappyKeysMask, + ]: + assert fmt in ["BMHK", "BMGHK"] + assert page_size is not None + pages_per_row = (kv_len + page_size - 1) // page_size + total_queries = q_len * batch_size + q = _rand_maxed_partition(r, total_queries, batch_size, total_queries, False) + k = [r.randint(1, kv_len) for _ in range(batch_size)] + row_size = pages_per_row * page_size + starts = [row_size * i + r.randint(0, row_size - ki) for i, ki in enumerate(k)] + starts.append(pages_per_row * batch_size * page_size) + block_diag_type = bias_type._UNPAGED_TYPE # type: ignore + g_block_diag = block_diag_type.from_seqlens( + q_seqlen=q, + kv_seqstarts=starts, + kv_seqlen=k, + ) + block_tables = torch.tensor( + r.sample(range(batch_size * pages_per_row), batch_size * pages_per_row), + device=device, + dtype=torch.int32, + ).reshape(batch_size, pages_per_row) + return g_block_diag.make_paged( + block_tables=block_tables, + page_size=page_size, + paged_type=bias_type, + notional_padding=page_size * pages_per_row, + ) + if bias_type == fmha.attn_bias.LocalAttentionFromBottomRightMask: + return bias_type( + window_left=r.randint(0, 5), + window_right=r.randint(0, 5), + ) + + assert False, f"Unsupported bias type: {bias_type}" + + +def _rand_seqlens( + r: random.Random, + bs: int, + q_len: int, + kv_len: int, + max_q_minus_k: Optional[int], +) -> Tuple[Sequence[int], Sequence[int]]: + """ + Generates lists of lengths of query blocks and corresponding key blocks. + The total number of queries will be bs * q_len and the + total number of keys will be bs * kv_len. + max_q_minus_k: maximum allowed num_queries - num_keys. + For "bottom-right" masks it's 0, we need to have more keys than + queries, otherwise some queries have no keys to attend to. + For BlockDiagonalCausalMask it's None, there is no constraint + on num_queries - num_keys. + For BlockDiagonalCausalLocalAttentionMask it's equal + to the window size. + """ + if max_q_minus_k == 0: + # In case max_q_minus_k > 0 the exact condition is + # kv_len >= q_len - max_q_minus_k * batch_size, + # but we can't check it without knowing the actual batch size, + # which is determined in the loop below. + assert kv_len >= q_len + q_len *= bs + kv_len *= bs + seqlens_q: List[int] = [] + seqlens_k: List[int] = [] + + step_q = [max(1, q_len // 10), max(2, q_len // 2)] + step_k = [max(1, kv_len // 10), max(2, kv_len // 2)] + while sum(seqlens_q) < q_len and sum(seqlens_k) < kv_len: + if max_q_minus_k is None: + # Simple case - no constraint on the number of queries and keys. + num_queries = r.randrange(*step_q) + seqlens_q.append(num_queries) + seqlens_k.append(r.randrange(*step_k)) + else: + # In this case we need to make sure num_queries - num_keys < max_q_minus_k holds for every batch element. + # To do this, when choosing num_queries and num_keys at a given step, + # we ensure two conditions are satisfied: + # 1) num_queries <= num_keys + max_q_minus_k for the current batch element + # 2) Same holds for the remaining keys and queries, i.e. + # queries_left - num_queries <= keys_left - num_keys + max_q_minus_k + keys_left = kv_len - sum(seqlens_k, 0) + queries_left = q_len - sum(seqlens_q, 0) + + assert ( + keys_left >= queries_left - max_q_minus_k + ), f"{keys_left=} {queries_left=} {max_q_minus_k=} {kv_len=} {q_len=} {seqlens_k=} {seqlens_q=}" + # Limit num_queries from above: if num_queries > keys_left + max_q_minus_k, + # condition num_queries <= num_keys + max_q_minus_k can't be satisfied even if we take + # all the remaining keys + max_queries_to_take = min(queries_left, keys_left + max_q_minus_k) + num_queries = r.randrange(1, max_queries_to_take + 1) + seqlens_q.append(num_queries) + + # Now we know num_queries, let's select num_keys. + # How many keys can we use for the current batch element so that + # for the remaining keys and values the constraint + # num_queries - num_keys < max_q_minus_k holds on the next step? + extra_keys_available = keys_left - queries_left + max_q_minus_k + 1 + assert extra_keys_available >= 0 + if extra_keys_available > 0: + seqlens_k.append(num_queries + r.randrange(0, extra_keys_available)) + else: + seqlens_k.append(num_queries) + seqlens_q[-1] = q_len - sum(seqlens_q[:-1]) + seqlens_k[-1] = kv_len - sum(seqlens_k[:-1]) + return seqlens_q, seqlens_k + + +def _rand_maxed_partition( + r: random.Random, total: int, n: int, mx: int, positive: bool = True +) -> List[int]: + # returns list of n nonnegative integers less than mx summing to total + # NB: This is unfortunately biased towards evenly-split bins. + # If `positive`, outputs are positive + if positive: + total -= n + mx -= 1 + idxs = r.sample(range(n * mx), total) + y = torch.zeros(n, mx, dtype=torch.int32) + y.flatten()[idxs] = 1 + z = y.sum(1) + if positive: + z += 1 + return z.tolist() + + +def _rand_seqlens_padded_k( + r: random.Random, bs: int, q_len: int, kv_len: int +) -> Tuple[Sequence[int], Sequence[int]]: + # This is for BlockDiagonalCausalWithOffsetPaddedKeysMask. + # we need q_seqlens and k_seqlens to be of len bsz. + # For each "batch element" there must be more keys than queries + # because this bias type is "bottom right" and so any extra queries + # will attend to nothing and have undefined result. + # In addition every element of k_seqlens must be <= kv_len + if q_len > kv_len: + raise ValueError("need more keys than values") + if q_len == kv_len: + # all key slots are needed so we cannot have padding + q_seqlens = k_seqlens = [kv_len] * bs + else: + q_seqlens = _rand_maxed_partition(r, q_len * bs, bs, kv_len) + k_seqlens = [r.randint(i, kv_len) for i in q_seqlens] + return q_seqlens, k_seqlens + + +def ref_attention(q, k, v, attn_bias=None, drop_mask=None, p=0.0, scale=None): + if q.ndim == 5: + + def attn_bias_group(group: int): + if isinstance(attn_bias, fmha.attn_bias.AttentionBiasSubTensor): + if attn_bias.HOLDS_DENSE_TENSOR: + return attn_bias[:, group] + elif isinstance(attn_bias, torch.Tensor): + return attn_bias[:, group] + return attn_bias + + return torch.stack( + [ + ref_attention_bmhk( + q[:, :, g], + k[:, :, g], + v[:, :, g], + scale=scale, + attn_bias=attn_bias_group(g), + ) + for g in range(q.shape[2]) + ], + dim=2, + ) + if q.ndim == 4: + assert p == 0.0 + return ref_attention_bmhk(q, k, v, scale=scale, attn_bias=attn_bias) + q = q.float() + k = k.float() + v = v.float() + + scale = scale if scale is not None else (1 / q.shape[-1] ** 0.5) + q = q * scale + + attn = q @ k.transpose(-2, -1) + if attn_bias is not None: + if isinstance(attn_bias, (AttentionBias, AttentionBiasSubTensor)): + # Always create in B,H,Mq,Mk format + attn_bias_tensor = attn_bias.materialize( + (q.shape[0], 1, q.shape[1], k.shape[1]), + device=q.device, + dtype=torch.float32, + ) + else: + attn_bias_tensor = attn_bias + if attn_bias_tensor.ndim == 4: + assert q.shape[0] == attn_bias_tensor.shape[0] * attn_bias_tensor.shape[1] + attn_bias_tensor = attn_bias_tensor.reshape( + [-1, *attn_bias_tensor.shape[2:]] + ) + attn = attn + attn_bias_tensor.float() + attn = attn.softmax(-1) + if drop_mask is not None: + attn = attn * (drop_mask / (1 - p)) + return attn @ v + + +def ref_attention_bmhk(q, k, v, attn_bias, scale=None) -> torch.Tensor: + assert q.ndim == 4 + + def T(t): + return t.permute((0, 2, 1, 3)).reshape( + [t.shape[0] * t.shape[2], t.shape[1], t.shape[3]] + ) + + if isinstance(attn_bias, (AttentionBias, AttentionBiasSubTensor)): + attn_bias = attn_bias.materialize( + (q.shape[0], q.shape[2], q.shape[1], k.shape[1]), + device=q.device, + dtype=torch.float32, + ).reshape([q.shape[0] * q.shape[2], q.shape[1], k.shape[1]]) + out = ref_attention(T(q), T(k), T(v), attn_bias, scale=scale) + out = out.reshape([q.shape[0], q.shape[2], q.shape[1], v.shape[3]]) + return out.permute((0, 2, 1, 3)) + + +def pack_kv_cache( + cache_k: torch.Tensor, + cache_v: torch.Tensor, + kv_seqlens: List[int], + BLOCK_N: int, +) -> Tuple[torch.Tensor, torch.Tensor, torch.Tensor]: + """ + Create block tables and pages K/V cache for testing paged attention. + Args: + cache_k, cache_v: K/V caches, each of shape [B, MAX_T, H_kv, D]. + Note that these tensors are unexpanded, + i.e. for multiquery case cache_k.shape[2] = 1 + kv_seqlens: list of K/V sequence lengths + BLOCK_N: number of tokens per per paged attention block + B: batch size + Returns: + block_tables: [B, MAX_BLOCKS] + packed_cache_k: [1, total_len_rounded, H_kv, D] + packed_cache_v: [1, total_len_rounded, H_kv, D] + where total_len_rounded is a sum of K/V seqlens, each rounded up + to a multiple of BLOCK_N. + """ + + kv_seqlens_rounded = [(x + BLOCK_N - 1) // BLOCK_N * BLOCK_N for x in kv_seqlens] + + total_len_rounded = sum(kv_seqlens_rounded) + + B, MAX_T, H, D = cache_k.shape + + packed_cache_k = torch.empty( + total_len_rounded, H, D, device=cache_k.device, dtype=cache_k.dtype + ) + packed_cache_v = torch.empty( + total_len_rounded, H, D, device=cache_k.device, dtype=cache_k.dtype + ) + seqstart = 0 + for b in range(B): + packed_cache_k[seqstart : seqstart + kv_seqlens[b]] = cache_k[ + b, : kv_seqlens[b] + ].clone() + packed_cache_v[seqstart : seqstart + kv_seqlens[b]] = cache_v[ + b, : kv_seqlens[b] + ].clone() + seqstart += kv_seqlens_rounded[b] + + num_blocks_per_row = (MAX_T + BLOCK_N - 1) // BLOCK_N + block_tables = ( + torch.arange(num_blocks_per_row, device="cuda", dtype=torch.int32) + .unsqueeze(0) + .expand(B, num_blocks_per_row) + ) + seqstarts = ( + ( + torch.tensor(kv_seqlens_rounded).cumsum(dim=0) + - torch.tensor(kv_seqlens_rounded) + ) + .to(device="cuda") + .unsqueeze(1) + ) // BLOCK_N + block_tables = (block_tables + seqstarts).contiguous().to(dtype=torch.int32) + return ( + block_tables, + packed_cache_k.unsqueeze(0), + packed_cache_v.unsqueeze(0), + ) diff --git a/lib/python3.12/site-packages/xformers/checkpoint.py b/lib/python3.12/site-packages/xformers/checkpoint.py new file mode 100644 index 0000000000000000000000000000000000000000..c2f323ffa11274b09211b8051f60fda584d278a4 --- /dev/null +++ b/lib/python3.12/site-packages/xformers/checkpoint.py @@ -0,0 +1,546 @@ +# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved. +# +# This source code is licensed under the BSD license found in the +# LICENSE file in the root directory of this source tree. + + +import functools +import time +from collections import defaultdict +from copy import deepcopy +from dataclasses import astuple, dataclass +from typing import Any, Callable, ContextManager, Dict, List, Optional, Tuple + +import torch +from torch.testing._internal.composite_compliance import ( + is_inplace, + is_inplace_view_fn, + is_view_fn, +) +from torch.utils._python_dispatch import TorchDispatchMode +from torch.utils._pytree import tree_map + +_scipy_is_available = False +try: + from scipy.optimize import Bounds, LinearConstraint, milp + + _scipy_is_available = True +except ImportError: + _scipy_is_available = False + + +try: + # let's keep BC for older PyTorch for now + from torch.distributed.algorithms._checkpoint.checkpoint_wrapper import ( + ActivationWrapper, + ) + from torch.utils.checkpoint import ( # type: ignore + _CachedTorchDispatchMode, + _CachingTorchDispatchMode, + ) +except ImportError: + ActivationWrapper = torch.nn.Module # type: ignore + + class _NotAvailable: + def __init__(self, *args, **kwargs): + raise RuntimeError("Need PyTorch >= 2.2") + + _CachedTorchDispatchMode = _NotAvailable # type: ignore + _CachingTorchDispatchMode = _NotAvailable # type: ignore + + +try: + from torch.utils.checkpoint import SAC_IGNORED_OPS as _ignored_ops # type: ignore + + _PT_HAS_NEW_IMPL = True +except ImportError: + from torch.utils.checkpoint import _ignored_ops # type: ignore + + _PT_HAS_NEW_IMPL = False + + +_additional_ignored_ops = { + torch.ops.aten.lift_fresh.default, + torch.ops.profiler._record_function_exit._RecordFunction, + torch.ops.aten.clone.default, # seems needed for torch.compile +} +OPS_TO_ALWAYS_SKIP = _ignored_ops | _additional_ignored_ops + + +@dataclass +class ProfileMetadata: + name: str + time_taken: float + memory_used: float + curr_idx: int + output_ids: Any + inplace_info: Tuple[int, int] + is_view_like: bool + is_rand_op: bool + + +def _get_default_policy(allow_list=None): + _default_allow_list = [ + "xformers.efficient_attention_forward_cutlass.default", + "xformers_flash.flash_fwd.default", + "aten.addmm.default", + "aten.mm.default", + ] + if allow_list is None: + allow_list = _default_allow_list + + def _default_policy(ctx, func, *args, **kwargs): + return str(func) in allow_list + + return _default_policy + + +class VerboseTorchDispatchMode(TorchDispatchMode): + def __init__(self): + self.operators = [] + + def __torch_dispatch__(self, func, types, args=(), kwargs=None): + if kwargs is None: + kwargs = {} + self.operators.append(func) + return func(*args, **kwargs) + + +def list_operators(function, *args, **kwargs): + """ + Returns the list of operators used inside `function` with + *args and **kwargs + """ + verbose_mode = VerboseTorchDispatchMode() + with verbose_mode: + function(*args, **kwargs) + return verbose_mode.operators + + +class CachedTorchDispatchMode(_CachedTorchDispatchMode): + def __init__(self, policy_fn, storage, allow_cache_entry_mutation): + global _PT_HAS_NEW_IMPL + if _PT_HAS_NEW_IMPL: + super().__init__(policy_fn, storage, allow_cache_entry_mutation) + else: + super().__init__(policy_fn, storage) + + # this is here for the old implementations + def pop_from_storage(self, func, args, kwargs): + # the autograd engine might add spurious views. This is a basic + # guard and should be improved + if self.storage[func]: + return self.storage[func].pop(0) + return func(*args, **kwargs) + + +class NullTorchDispatchMode(TorchDispatchMode): + def __torch_dispatch__(self, func, types, args=(), kwargs=None): + if kwargs is None: + kwargs = {} + return func(*args, **kwargs) + + +def selective_checkpoint_context_fn(policy_fn=None): + """An activation checkpoint context_fn for selectively deciding what to + store and what to recompute. Accepts a custom policy. + Args: + policy_fn(Union[List[Op], callable]): policy for deciding what to + store (instead of recompute). If it's a function, it should + be of form (func, *args, **kwargs) -> bool which indicates + if func outputs with *args and **kwargs should be stored or not. + Additionally, a list[Op] is also supported for easier cases. + The op should be in the format `torch.ops.***`, where the `***` + names of operators can be obtained with `list_operators`. + """ + if policy_fn is None: + policy_fn = _get_default_policy() + elif isinstance(policy_fn, list): + policy_fn = _get_default_policy(policy_fn) + else: + assert callable(policy_fn), "policy_fn should be None, list or a callable" + + temp_storage: Dict[Any, List[Any]] = defaultdict(list) + # assumption: grad_mode doesn't change inside function + caching_mode: ContextManager[None] + if torch.is_grad_enabled(): + caching_mode = _CachingTorchDispatchMode(deepcopy(policy_fn), temp_storage) + else: + caching_mode = NullTorchDispatchMode() + cached_mode = CachedTorchDispatchMode(deepcopy(policy_fn), temp_storage, True) + + return caching_mode, cached_mode + + +def checkpoint( + function, *args, preserve_rng_state=True, policy_fn=None, **kwargs +) -> Any: + """Wrapper around torch.utils.checkpoint that accepts a custom policy + function for selectively deciding what to store and what to recompute + Args: + function: describes what to run in the forward pass of the model or + part of the model. It should also know how to handle the inputs + passed as the tuple. For example, in LSTM, if user passes + ``(activation, hidden)``, :attr:`function` should correctly use the + first input as ``activation`` and the second input as ``hidden`` + preserve_rng_state(bool, optional): Omit stashing and restoring + the RNG state during each checkpoint. + Default: ``True`` + policy_fn(Union[List[Op], callable]): policy for deciding what to + store (instead of recompute). If it's a function, it should + be of form (func, *args, **kwargs) -> bool which indicates + if func outputs with *args and **kwargs should be stored or not. + Additionally, a list[Op] is also supported for easier cases. + The op should be in the format `torch.ops.***`, where the `***` + names of operators can be obtained with `list_operators`. + *args: Arguments to pass in to the given ``function``. + **kwargs: Keyword arguments to pass into the given ``function``. + """ + return torch.utils.checkpoint.checkpoint( + function, + *args, + use_reentrant=False, + preserve_rng_state=preserve_rng_state, + context_fn=functools.partial(selective_checkpoint_context_fn, policy_fn), + **kwargs, + ) + + +class ProfileOperatorsTorchDispatchMode(TorchDispatchMode): + def __init__(self, num_runs: int = 10) -> None: + self.data: List[ProfileMetadata] = [] + self.num_runs: int = num_runs + + def _get_inplace_metadata(self, func, out) -> Tuple[int, int, Tuple[int, ...]]: + curr_idx = len(self.data) + + def get_tensor_id(e): + return ( + e.untyped_storage().data_ptr() if isinstance(e, torch.Tensor) else None + ) + + output_ids = tree_map(get_tensor_id, out) + if not is_inplace(func): + return curr_idx, output_ids, () + + op_id = curr_idx + op_parent_id = -1 + for i, d in enumerate(self.data): + # find the first occurence of a tensor that + # shares the same storage as the current tensor + past_output_ids = d.output_ids + past_output_ids = ( + [past_output_ids] + if not isinstance(past_output_ids, (list, tuple, dict)) + else past_output_ids + ) + if output_ids in past_output_ids: + op_parent_id = i + break + if op_parent_id < 0: + op_parent_id = op_id + inplace_info = (op_id, op_parent_id) + return curr_idx, output_ids, inplace_info + + def __torch_dispatch__(self, func, types, args=(), kwargs=None): + if kwargs is None: + kwargs = {} + out = func(*args, **kwargs) + + curr_idx, output_ids, inplace_info = self._get_inplace_metadata(func, out) + is_view_like = is_view_fn(func) or is_inplace_view_fn(func) + is_rand_op = torch.Tag.nondeterministic_seeded in func.tags + # sdpa has non-deterministic seed, but might be deterministic + # if no dropout is applied + if func.overloadpacket.__name__ == "_scaled_dot_product_flash_attention": + is_rand_op = kwargs.get("dropout_p", 0) != 0 + + # get runtime info of func + torch.cuda.synchronize() + t = time.time() + for i in range(self.num_runs): + func(*args, **kwargs) + torch.cuda.synchronize() + time_taken = (time.time() - t) / self.num_runs + + # get memory usage of func + torch.cuda.reset_peak_memory_stats() + mem1 = torch.cuda.max_memory_allocated() / 2**20 + func(*args, **kwargs) + mem2 = torch.cuda.max_memory_allocated() / 2**20 + + self.data.append( + ProfileMetadata( + func, + time_taken, + mem2 - mem1, + curr_idx, + output_ids, + inplace_info, + is_view_like, + is_rand_op, + ) + ) + return out + + +def _analyze_operators(function, *args) -> List[ProfileMetadata]: + """ + Use ProfileOperatorsTorchDispatchMode to get runtime and memory info. + + Args: + function: The function to optimize which will be selectively checkpointed. Usually the forward pass + of the model. + *args: Arguments to pass in to the given ``function``. + + Returns: + A list of tuples, where each tuples contains the name of the operator, the runtime of the operator, + and the memory usage of the operator. + + """ + profile_ops = ProfileOperatorsTorchDispatchMode() + with profile_ops: + function(*args) + + data = profile_ops.data + return data + + +def get_optimal_checkpoint_policy(function, *args, memory_budget: float) -> Callable: + """ + Given a function, its arguments, and the maximum amount of memory available, + find the subset of operators that can be optimized to reduce runtime while still fitting within the memory budget. + + Args: + function: The function to optimize which will be selectively checkpointed. Usually the forward pass + of the model. + *args: Arguments to pass in to the given ``function``. + memory_budget (float): A float between 0 and 1 which describes what percentage of the total memory to use. + + Returns: + A callable policy which can be passed to xformers.checkpoint() + + Raises: + RuntimeError: If `scipy` is not available. + ValueError: If `memory_budget` is not a float between 0 and 1. + + """ + if not _scipy_is_available: + raise RuntimeError( + "Please install scipy 1.9.0+ to use `get_optimal_checkpoint_policy`. You can do so using " + "`pip install scipy`." + ) + if memory_budget < 0 or memory_budget > 1: + raise ValueError( + f"`memory_budget` must be a float between 0 and 1. Got {memory_budget}." + ) + + data = _analyze_operators(function, *args) + # remove aten.detach.default from the list of ops because autograd + # inserts those during backward and it breaks the fwd-bwd alignment + data = [x for x in data if x.name not in OPS_TO_ALWAYS_SKIP] + + ops, runtimes_, memory_, new_ids, _, inplace_ops_, view_like_ops_, rand_ops_ = zip( + *[astuple(x) for x in data] + ) + runtimes = torch.tensor(runtimes_, dtype=torch.float64) + memory = torch.tensor(memory_, dtype=torch.float64) + view_like_ops = [i for i, x in enumerate(view_like_ops_) if x] + rand_ops = [i for i, x in enumerate(rand_ops_) if x] + + # remap the inplace indices as we have removed OPS_TO_ALWAYS_SKIP + inplace_ops = [tuple(map(new_ids.index, x)) for x in inplace_ops_ if x] + + # the last operation is always stored as the output of the checkpoint + # block, so we can avoid recomputing it. We set the memory to zero + # instead of adding a new constraint because we want both the 0 and 1 + # endpoints for memory_budget to be valid + # FIXME: this heuristic for finding the last non-view non-inplace op + # might not always be correct, which would yield suboptimal policies + last_op = len(ops) - 1 + skip_ops_ = set(view_like_ops) | set([x[0] for x in inplace_ops]) + skip_ops = sorted(list(skip_ops_)) + for op in reversed(skip_ops): + if op == last_op: + last_op -= 1 + + memory[last_op] = 0 + + max_memory = memory_budget * memory.sum().item() + + # workaround to fix https://github.com/pytorch/pytorch/issues/121212 + force_store_random = all([not isinstance(x, torch.Tensor) for x in args]) + + optim_output = _optimize_runtime_with_given_memory( + memory=memory, + runtimes=runtimes, + max_memory=max_memory, + view_like_ops=view_like_ops, + inplace_ops=inplace_ops, + random_ops=rand_ops, + force_store_random=force_store_random, + ) + return _OptimalPolicy(optim_output=optim_output) + + +def _optimize_runtime_with_given_memory( + memory: torch.Tensor, + runtimes: torch.Tensor, + max_memory: float, + view_like_ops: List[int], + inplace_ops: List[Tuple[int, ...]], + random_ops: List[int], + force_store_random: bool, +) -> torch.Tensor: + """ + Given a list of operator names, their corresponding runtimes, and the maximum amount of memory available, + find the subset of operators that can be optimized to reduce runtime while still fitting within the memory budget. + Uses https://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.milp.html + + Args: + memory (torch.Tensor): Tensor containing the memory usage of each operator. + runtimes (torch.Tensor): Tensor containing the runtime of each operator. + max_memory (float): Maximum amount of memory to use. + view_like_ops ([List[int]): Indices of the view-like ops. + inplace_ops (List[Tuple[int, int]]): Tuple with the pair of inplace op -> parent of inplace op. + This will be used to add the constraint that in-place ops need to either be + stored in memory with the previous op, or recomputed with the previous op. + random_ops ([List[int]): Indices of the random ops, which will always be recomputed. + force_store_random (bool): force random ops to always be stored (instead of recomputed) + """ + c = -runtimes # type: ignore[operator] + + memory_constraint = LinearConstraint(A=memory, ub=max_memory) + constraints = [memory_constraint] + + # view-like ops should always be recomputed + for i in view_like_ops: + A = torch.zeros_like(c) + A[i] = 1 + constraints.append(LinearConstraint(A=A, lb=0, ub=0)) + + # inplace ops should always be done in conjunction with its parent op + # i.e., if we recompute the parent op the inplace should also be + # recomputed, and vice versa + for op, op_parent in inplace_ops: + A = torch.zeros_like(c) + if op != op_parent: + A[op_parent] = 1 + A[op] = -1 + constraints.append(LinearConstraint(A=A, lb=0, ub=0)) + else: + # if op == op_parent, it's because it's the first op + # that is inplace. Thus never recompute it + A[op] = 1 + constraints.append(LinearConstraint(A=A, lb=1, ub=1)) + + # ideally, always recompute random ops + # in practice, due to a bug in https://github.com/pytorch/pytorch/issues/121212 + # sometimes we need to store them to avoid correctness issues + for i in random_ops: + A = torch.zeros_like(c) + A[i] = 1 + val = int(force_store_random) + constraints.append(LinearConstraint(A=A, lb=val, ub=val)) + + integrality = torch.ones_like(c) + res = milp( + c=c, constraints=constraints, integrality=integrality, bounds=Bounds(0, 1) + ) + if not res.success: + raise ValueError( + "The problem is infeasible, and probably due to a change in xformers " + "that makes random ops always be stored. Try passing a larger memory_budget. " + "This will be fixed once https://github.com/pytorch/pytorch/issues/121212 " + "is solved" + ) + x = torch.from_numpy(res.x) + return x + + +class _OptimalPolicy: + def __init__(self, optim_output: torch.Tensor): + self.counter = 0 + self.optim_output = optim_output.tolist() + + def __call__(self, ctx, func, *args, **kwargs) -> bool: + # returning False means recompute, True means store in memory + if func in OPS_TO_ALWAYS_SKIP: + return False + count = self.counter + self.counter += 1 + return self.optim_output[count] == 1 + + +class SelectiveCheckpointWrapper(ActivationWrapper): + def __init__(self, mod, memory_budget=None, policy_fn=None): + super().__init__(mod) + if not ((memory_budget is None) ^ (policy_fn is None)): + raise ValueError("Need to specify either policy_fn or memory_budget") + self.memory_budget = memory_budget + self.policy_fn = policy_fn + + try: + # for backward-compatibility as this doesn't exist in PT anymore + torch._dynamo.config._experimental_support_context_fn_in_torch_utils_checkpoint = ( + True + ) + except AttributeError: + pass + + @torch.compiler.disable + def _get_policy_fn(self, *args, **kwargs): + if not torch.is_grad_enabled(): + # no need to compute a policy as it won't be used + return [] + # if policy is not specified, initialize policy for a given memory budget + with torch.random.fork_rng(): + policy_fn = get_optimal_checkpoint_policy( + self._checkpoint_wrapped_module, + *args, + **kwargs, + memory_budget=self.memory_budget, + ) + if ( + torch.distributed.is_available() + and torch.distributed.is_initialized() + and torch.distributed.get_world_size() > 1 + ): + # use the same policy across different GPUs + objects = [policy_fn] + torch.distributed.broadcast_object_list(objects, src=0) + policy_fn = objects[0] + return policy_fn + + def get_policy_fn(self, *args, **kwargs): + if self.policy_fn is None: + self.policy_fn = self._get_policy_fn(*args, **kwargs) + return self.policy_fn + + def forward(self, *args, **kwargs): + policy_fn = self.get_policy_fn(*args, **kwargs) + return checkpoint( + self._checkpoint_wrapped_module, *args, **kwargs, policy_fn=policy_fn + ) + + +def selective_checkpoint_wrapper( + module: torch.nn.Module, + memory_budget: Optional[float] = None, + policy_fn: Optional[Callable] = None, +): + """ + Wrap a module with selective activation checkpointing. + + It behaves similarly to PyTorch's checkpoint_wrapper, but gives the possibility + to the user to either specify a handcrafted policy_fn, or to let an optimization + algorithm to select the policy given a user-specified memory_budget. + + The user should either specify the memory_budget argument or the policy_fn. + + The memory_budget is a float value between 0 (recompute everything in the backward) or 1 + (store everything for backward). Using a value of 0 should be similar to PyTorch's + activation checkpoint, while 1 should be similar to the behavior of not using any + activation checkpointing. + """ + return SelectiveCheckpointWrapper(module, memory_budget, policy_fn) diff --git a/lib/python3.12/site-packages/xformers/cpp_lib.json b/lib/python3.12/site-packages/xformers/cpp_lib.json new file mode 100644 index 0000000000000000000000000000000000000000..ca513fd0aa2cf252ef8f9eba1a544161efc8f501 --- /dev/null +++ b/lib/python3.12/site-packages/xformers/cpp_lib.json @@ -0,0 +1 @@ +{"version": {"cuda": 1204, "hip": null, "torch": "2.6.0+cu124", "python": "3.12.8", "flash": "v2.7.2.post1", "use_torch_flash": true}, "env": {"TORCH_CUDA_ARCH_LIST": "6.0+PTX 7.0 7.5 8.0+PTX 9.0a", "PYTORCH_ROCM_ARCH": null, "XFORMERS_BUILD_TYPE": "Release", "XFORMERS_ENABLE_DEBUG_ASSERTIONS": null, "NVCC_FLAGS": "-allow-unsupported-compiler", "XFORMERS_PACKAGE_FROM": "wheel-v0.0.29.post2"}} \ No newline at end of file diff --git a/lib/python3.12/site-packages/xformers/info.py b/lib/python3.12/site-packages/xformers/info.py new file mode 100644 index 0000000000000000000000000000000000000000..af0fa5b2f4051b98559e8995c22c6b0c363ed4d7 --- /dev/null +++ b/lib/python3.12/site-packages/xformers/info.py @@ -0,0 +1,77 @@ +# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved. +# +# This source code is licensed under the BSD license found in the +# LICENSE file in the root directory of this source tree. + + +from typing import Dict + +import torch + +from . import __version__, _cpp_lib, _is_opensource, _is_triton_available, ops +from .ops.common import OPERATORS_REGISTRY +from .profiler.profiler_dcgm import DCGM_PROFILER_AVAILABLE + + +def get_features_status() -> Dict[str, str]: + features = {} + for op in OPERATORS_REGISTRY: + status_str = "available" if op.is_available() else "unavailable" + features[f"{op.OPERATOR_CATEGORY}.{op.NAME}"] = status_str + for k, v in ops.swiglu_op._info().items(): + features[f"swiglu.{k}"] = v + features["is_triton_available"] = str(_is_triton_available()) + return features + + +def print_info(): + features = get_features_status() + print(f"xFormers {__version__}") + features["pytorch.version"] = torch.__version__ + if torch.cuda.is_available(): + features["pytorch.cuda"] = "available" + device = torch.cuda.current_device() + cap = torch.cuda.get_device_capability(device) + features["gpu.compute_capability"] = ".".join(str(ver) for ver in cap) + features["gpu.name"] = torch.cuda.get_device_name(device) + else: + features["pytorch.cuda"] = "not available" + + features["dcgm_profiler"] = ( + "available" if DCGM_PROFILER_AVAILABLE else "unavailable" + ) + + build_info = _cpp_lib._build_metadata + if build_info is None and isinstance( + _cpp_lib._cpp_library_load_exception, _cpp_lib.xFormersInvalidLibException + ): + build_info = _cpp_lib._cpp_library_load_exception.build_info + if build_info is not None: + features["build.info"] = "available" + features["build.cuda_version"] = build_info.cuda_version + features["build.hip_version"] = build_info.hip_version + features["build.python_version"] = build_info.python_version + features["build.torch_version"] = build_info.torch_version + for k, v in build_info.build_env.items(): + features[f"build.env.{k}"] = v + else: + features["build.info"] = "none" + + try: + features["build.nvcc_version"] = ".".join( + str(v) for v in torch.ops.xformers._nvcc_build_version() + ) + except (RuntimeError, AttributeError): + pass + + if _is_opensource: + features["source.privacy"] = "open source" + else: + features["source.privacy"] = "fairinternal" + + for name, status in features.items(): + print("{:<50} {}".format(f"{name}:", status)) + + +if __name__ == "__main__": + print_info() diff --git a/lib/python3.12/site-packages/xformers/ops/__init__.py b/lib/python3.12/site-packages/xformers/ops/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8f15bcc61740174721da223a47f9861d133df9bc --- /dev/null +++ b/lib/python3.12/site-packages/xformers/ops/__init__.py @@ -0,0 +1,131 @@ +# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved. +# +# This source code is licensed under the BSD license found in the +# LICENSE file in the root directory of this source tree. + + +import torch + +from .fmha import ( + AttentionBias, + AttentionOp, + AttentionOpBase, + LowerTriangularMask, + MemoryEfficientAttentionCkOp, + MemoryEfficientAttentionCutlassFwdFlashBwOp, + MemoryEfficientAttentionCutlassOp, + MemoryEfficientAttentionFlashAttentionOp, + MemoryEfficientAttentionSplitKCkOp, + memory_efficient_attention, + memory_efficient_attention_backward, + memory_efficient_attention_forward, + memory_efficient_attention_forward_requires_grad, +) +from .indexing import index_select_cat, scaled_index_add +from .ipc import init_ipc +from .modpar_layers import ColumnParallelLinear, RowParallelLinear +from .rmsnorm import RMSNorm +from .rope_padded import rope_padded +from .seqpar import sequence_parallel_leading_matmul, sequence_parallel_trailing_matmul +from .sequence_parallel_fused_ops import ( + fused_allgather_and_anything, + fused_allgather_and_linear, + fused_anything_and_reducescatter, + fused_linear_and_reducescatter, +) +from .sp24 import Sparse24Tensor, sparsify24, sparsify24_like +from .swiglu_op import ( + SwiGLU, + SwiGLUEagerOp, + SwiGLUFusedOp, + SwiGLUOp, + SwiGLUOpDispatch, + SwiGLUPackedFusedOp, + swiglu, +) +from .tiled_matmul import tiled_matmul +from .unbind import get_stack_strides, stack_or_none, unbind + +# BW compatibility +AttentionMask = AttentionBias + + +def masked_matmul(a, b, mask=None): + if torch.overrides.has_torch_function((a, b, mask)): + return torch.overrides.handle_torch_function( + masked_matmul, (a, b, mask), a, b, mask + ) + + att = a @ b + + if mask is None: + return att + + if mask.dtype == torch.bool: + if mask.ndim == 2: + mask = mask.unsqueeze(0).expand(att.shape[0], -1, -1) + # mask is presumed false == ignore + att[~mask] = float("-inf") + else: + # mask is presumed additive + att += mask + return att + + +__all__ = [ + # fmha + "AttentionBias", + "AttentionMask", + "AttentionOp", + "AttentionOpBase", + "LowerTriangularMask", + "MemoryEfficientAttentionCutlassFwdFlashBwOp", + "MemoryEfficientAttentionCutlassOp", + "MemoryEfficientAttentionFlashAttentionOp", + "MemoryEfficientAttentionCkOp", + "MemoryEfficientAttentionSplitKCkOp", + "memory_efficient_attention", + "memory_efficient_attention_backward", + "memory_efficient_attention_forward", + "memory_efficient_attention_forward_requires_grad", + # indexing + "index_select_cat", + "scaled_index_add", + # ipc + "init_ipc", + # modpar_layers + "ColumnParallelLinear", + "RowParallelLinear", + # rmsnorm + "RMSNorm", + # rope_padded + "rope_padded", + # seqpar + "sequence_parallel_leading_matmul", + "sequence_parallel_trailing_matmul", + # sequence_parallel_fused_ops + "fused_allgather_and_anything", + "fused_allgather_and_linear", + "fused_anything_and_reducescatter", + "fused_linear_and_reducescatter", + # swiglu_op + "SwiGLU", + "SwiGLUEagerOp", + "SwiGLUFusedOp", + "SwiGLUOp", + "SwiGLUOpDispatch", + "SwiGLUPackedFusedOp", + "swiglu", + # tiled_matmul + "tiled_matmul", + # unbind + "get_stack_strides", + "stack_or_none", + "unbind", + # sp24 + "sparsify24", + "sparsify24_like", + "Sparse24Tensor", + # . + "masked_matmul", +] diff --git a/lib/python3.12/site-packages/xformers/ops/ipc.py b/lib/python3.12/site-packages/xformers/ops/ipc.py new file mode 100644 index 0000000000000000000000000000000000000000..e39dd0ff0c171566f9473c03e87417b0518817ae --- /dev/null +++ b/lib/python3.12/site-packages/xformers/ops/ipc.py @@ -0,0 +1,164 @@ +# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved. +# +# This source code is licensed under the BSD license found in the +# LICENSE file in the root directory of this source tree. + + +import concurrent.futures +import json +import multiprocessing.connection +from typing import Any, List, Optional, Union + +import torch +import torch.distributed as dist +import torch.multiprocessing.reductions + +# We could just send tensors directly on mp.Connections, since PyTorch installs +# the necessary reductions to make it work. However, in the receiving process, +# PyTorch "mounts" the tensor in the CUDA context for the GPU with the **SAME +# INDEX** as on the sender. This works if all processes use CUDA_VISIBLE_DEVICES +# to limit themselves to a single GPU (which thus has index 0 everywhere) but in +# all other cases it's a mess. Hence we use our own reductions (which wrap the +# ones from PyTorch) to use the right devices. + + +def _serialize_cuda_tensor(tensor: torch.Tensor): + assert tensor.device.type == "cuda" + func, args = torch.multiprocessing.reductions.reduce_tensor(tensor) + assert func is torch.multiprocessing.reductions.rebuild_cuda_tensor + assert args[6] == tensor.device.index + return args + + +def _deserialize_cuda_tensor(args, device: torch.device) -> torch.Tensor: + args = list(args) + args[6] = device.index + return torch.multiprocessing.reductions.rebuild_cuda_tensor(*args) + + +# We need all processes to exchange a few strings with their addresses (in order +# to be able to connect to each other). The solution for this kind of things in +# PyTorch is a Store (TCPStore or FileStore) but we cannot create one ourselves +# (we don't know which addr/port/file to use, since the default one is already +# being used by PyTorch's global store) nor can we extract one from the +# ProcessGroup (since there's no API to do so). We thus resort to using the PG +# itself to exchange data, which is overkill (we need to store the pickled data +# into tensors and send it to the GPU). On top of that, it introduces one more +# catch: it doesn't work in inference mode because of something about modifying +# tensors inplace. I couldn't find a way to temporarily disable inference mode +# (although it's supposed to be possible) however inference mode is thread-local +# so we can dodge it by offloading the collective call to another thread. I hate +# all this so much. + +# Use a sequence number to create unique store keys for different invocations. +_COUNTER = 0 + + +def _exchange_addresses( + listeners: List[multiprocessing.connection.Listener], + group: dist.ProcessGroup, + device: torch.device, +) -> List[List[str]]: + global _COUNTER + rank = group.rank() + world_size = group.size() + my_addresses: List[str] = [] + for listener in listeners: + addr = listener.address + # The address could be a tuple if the listener weren't a UNIX socket + if isinstance(addr, bytes): + # Shouldn't be bytes, according to docs and typeshed, but... + # https://github.com/python/typeshed/issues/10054 + addr = addr.decode("utf-8") + assert isinstance(addr, str) + my_addresses.append(addr) + if world_size == 1: + return [my_addresses] + # In fact, we can retrieve the store from the ProcessGroup, but only using + # a private API. Hence we catch whatever exception and fall back in case. + try: + _, store = torch.distributed.distributed_c10d._world.pg_map.get( + group, (None, None) + ) + assert store is not None + store.set( + f"xformers_exchange_addresses_{_COUNTER}_{rank}", + json.dumps(my_addresses), + ) + all_addresses = [ + json.loads(store.get(f"xformers_exchange_addresses_{_COUNTER}_{i}")) + for i in range(world_size) + ] + _COUNTER += 1 + except Exception: + all_addresses = [[""] * (world_size - 1)] * world_size + with concurrent.futures.ThreadPoolExecutor( + initializer=torch.cuda.set_device, initargs=(device,) + ) as e: + e.submit( + dist.all_gather_object, + object_list=all_addresses, + obj=my_addresses, + group=group, + ).result() + return all_addresses + + +class IPCPipe: + def __init__(self, connection, my_device) -> None: + self.connection = connection + self.my_device = my_device + + def send(self, tensor: torch.Tensor) -> None: + assert self.connection is not None, "Sending to myself!" + assert tensor.device == self.my_device, f"{tensor.device=} != {self.my_device=}" + self.connection.send(_serialize_cuda_tensor(tensor)) + + def recv(self) -> torch.Tensor: + assert self.connection is not None, "Receiving from myself!" + return _deserialize_cuda_tensor(self.connection.recv(), self.my_device) + + +def init_ipc( + group: dist.ProcessGroup, + device: Union[torch.device, str] = "cuda", +) -> List[Optional[IPCPipe]]: + """ + Initializes pipes between processes of a `ProcessGroup`, that can be used + to exchange `torch.Tensor` later + """ + if isinstance(device, str): + device = torch.device(device) + if device.index is None: + device = torch.device(device.type, index=torch.cuda.current_device()) + world_size = group.size() + my_rank = group.rank() + # Open connections to all other processes. We exchange addresses via + # NCCL since we don't have access to a Store. + listeners = [ + multiprocessing.connection.Listener(family="AF_UNIX", address="", backlog=1) + for _ in range(world_size) + ] + # If any process is late, all other ones will block here + all_addresses = _exchange_addresses(listeners, group, device) + connections: Any = [] + for other_rank in range(world_size): + # For p2p connection between ranks i<->j + # if `i Callable[[], torch.cuda.Stream]: + def result(): + stream = [current_stream, self.second_stream][self.next_stream_idx] + self.next_stream_idx += 1 + self.next_stream_idx %= 2 + return stream + + return result + + def allgather_and_linear( + self, + scattered_inputs: List[torch.Tensor], + my_matmul: Callable[ + [List[torch.Tensor], int, Callable[[], torch.cuda.Stream]], None + ], + timeout_s: int, + _wait: bool = True, + _memcpy: bool = True, + ): + """Perform a fused all-gather followed by a linear layer""" + + dtype = scattered_inputs[0].dtype + assert all(si.device == self.my_device for si in scattered_inputs) + assert all(si.dtype == dtype for si in scattered_inputs) + + scattered_input_numels = [si.numel() for si in scattered_inputs] + total_scattered_input_numel = sum(scattered_input_numels) + self._ensure_staging_is_large_enough( + total_scattered_input_numel, random_init=_memcpy is False, dtype=dtype + ) + + seq_num = self.next_seq_num % SEQ_NUM_WRAP_AROUND + prev_seq_num = (seq_num - 1) % SEQ_NUM_WRAP_AROUND + self.next_seq_num += 1 + + stagings = [ + s.view((self.world_size,) + si.shape) + for s, si in zip( + self.staging.view(dtype)[:, :total_scattered_input_numel].split( + scattered_input_numels, dim=-1 + ), + scattered_inputs, + ) + ] + buddys_stagings = [ + [bs] * len(scattered_inputs) + if bs.numel() == 0 + else [ + s.view(si.shape) + for s, si in zip( + bs.view(dtype)[:total_scattered_input_numel].split( + scattered_input_numels, dim=-1 + ), + scattered_inputs, + ) + ] + for bs in self.buddys_staging + ] + + current_stream = torch.cuda.current_stream() + self.second_stream.wait_stream(current_stream) + self.compute_wait_stream.wait_stream(current_stream) + self.memcpy_wait_stream.wait_stream(current_stream) + stream_factory = self.make_stream_factory(current_stream) + + for iter_ in range(1, self.world_size): + dst_rank = (self.my_rank + iter_) % self.world_size + + # Wait for buddy to signal that it read from the data before we + # overwrite it (this wait matches up with write [B] below). + if _wait: + WaitValues.OPERATOR( + [self.op_finished_consume[dst_rank]], + prev_seq_num, + self.memcpy_wait_stream, + timeout_s, + ) + + self.memcpy_stream.wait_stream(self.memcpy_wait_stream) + + if _memcpy: + with torch.cuda.stream(self.memcpy_stream): + for bs, si in zip(buddys_stagings[dst_rank], scattered_inputs): + bs.copy_(si) + + # Signal to buddy that we have written into the data so it can + # read from it (this write matches up with wait [A] below). + if _wait: + Memset32bAsync.OPERATOR( + self.comms_ready_produce[dst_rank], + seq_num, + self.memcpy_stream, + ) + + my_matmul(scattered_inputs, self.my_rank, stream_factory) + + for iter_ in range(1, self.world_size): + src_rank = (self.my_rank - iter_) % self.world_size + + # Wait for buddy to signal that it wrote into the data before we + # read from it (this wait matches up with write [A] above). + if _wait: + WaitValues.OPERATOR( + [self.comms_ready_consume[src_rank]], + seq_num, + self.compute_wait_stream, + timeout_s, + ) + + current_stream.wait_stream(self.compute_wait_stream) + self.second_stream.wait_stream(self.compute_wait_stream) + + my_matmul([s[src_rank] for s in stagings], src_rank, stream_factory) + + current_stream.wait_stream(self.second_stream) + current_stream.wait_stream(self.memcpy_stream) + + # Signal to buddy that we have read from the data so it can + # overwrite it (this write matches up with wait [B] above). + if _wait: + WriteValues.OPERATOR( + [self.op_finished_produce], + seq_num, + current_stream, + ) + + def linear_and_reducescatter( + self, + my_matmul: Callable[ + [List[torch.Tensor], int, Callable[[], torch.cuda.Stream]], None + ], + gathered_outputs: List[torch.Tensor], + scattered_outputs: List[torch.Tensor], + timeout_s: int, + _wait: bool = True, + _memcpy: bool = True, + ): + """Perform a fused linear layer followed by a reduce-scatter""" + + dtype = gathered_outputs[0].dtype + assert all(go.device == self.my_device for go in gathered_outputs) + assert all(go.dtype == dtype for go in gathered_outputs) + assert all(so.device == self.my_device for so in scattered_outputs) + assert all(so.dtype == dtype for so in scattered_outputs) + + scattered_output_numels = [so.numel() for so in scattered_outputs] + total_scattered_output_numel = sum(scattered_output_numels) + self._ensure_staging_is_large_enough( + total_scattered_output_numel, random_init=_memcpy is False, dtype=dtype + ) + + seq_num = self.next_seq_num % SEQ_NUM_WRAP_AROUND + prev_seq_num = (seq_num - 1) % SEQ_NUM_WRAP_AROUND + self.next_seq_num += 1 + + stagings = [ + s.view((self.world_size,) + so.shape) + for s, so in zip( + self.staging.view(dtype)[:, :total_scattered_output_numel].split( + scattered_output_numels, dim=-1 + ), + scattered_outputs, + ) + ] + buddys_stagings = [ + [bs] * len(scattered_outputs) + if bs.numel() == 0 + else [ + s.view(so.shape) + for s, so in zip( + bs.view(dtype)[:total_scattered_output_numel].split( + scattered_output_numels, dim=-1 + ), + scattered_outputs, + ) + ] + for bs in self.buddys_staging + ] + + current_stream = torch.cuda.current_stream() + self.second_stream.wait_stream(current_stream) + self.compute_wait_stream.wait_stream(current_stream) + self.memcpy_wait_stream.wait_stream(current_stream) + stream_factory = self.make_stream_factory(current_stream) + + for iter_ in range(1, self.world_size): + dst_rank = (self.my_rank + iter_) % self.world_size + + # Wait for buddy to signal that it read from the data before we + # overwrite it (this wait matches up with write [2] below). + if _wait: + WaitValues.OPERATOR( + [self.op_finished_consume[dst_rank]], + prev_seq_num, + self.compute_wait_stream, + timeout_s, + ) + + current_stream.wait_stream(self.compute_wait_stream) + self.second_stream.wait_stream(self.compute_wait_stream) + + my_matmul([s[dst_rank] for s in stagings], dst_rank, stream_factory) + + # Deduce which stream contains the last kernel launched. + final_stream = [current_stream, self.second_stream][ + (self.next_stream_idx - 1) % 2 + ] + final_stream.wait_stream(current_stream) + final_stream.wait_stream(self.second_stream) + + # Signal to buddy that we have written into the data so it can + # read from it (this write matches up with wait [1] below). + if _wait: + Memset32bAsync.OPERATOR( + self.comms_ready_produce[dst_rank], + seq_num, + final_stream, + ) + + my_matmul( + [o[self.my_rank] for o in gathered_outputs], + self.my_rank, + stream_factory, + ) + + for iter_ in range(1, self.world_size): + src_rank = (self.my_rank - iter_) % self.world_size + + # Wait for buddy to signal that it wrote into the data before we + # read from it (this wait matches up with write [1] above). + if _wait: + WaitValues.OPERATOR( + [self.comms_ready_consume[src_rank]], + seq_num, + self.memcpy_wait_stream, + timeout_s, + ) + + self.memcpy_stream.wait_stream(self.memcpy_wait_stream) + + if _memcpy: + with torch.cuda.stream(self.memcpy_stream): + for go, bs in zip(gathered_outputs, buddys_stagings[src_rank]): + go[src_rank].copy_(bs) + + current_stream.wait_stream(self.second_stream) + current_stream.wait_stream(self.memcpy_stream) + + for go, so in zip(gathered_outputs, scattered_outputs): + torch.sum(go, dim=0, out=so) + + # Signal to buddy that we have read from the data so it can + # overwrite it (this write matches up with wait [2] above). + if _wait: + WriteValues.OPERATOR( + [self.op_finished_produce], + seq_num, + current_stream, + ) + + +# We'd store this as an attribute on the PG object itself, but some PGs are +# pybind-bound classes and thus don't support it, so we simulate this as an +# external cache. +CACHE: Dict[int, Optional[_FusedSequenceParallel]] = {} + + +def _can_ranks_communicate_all_to_all_over_nvlink(group: dist.ProcessGroup) -> bool: + # FIXME This is currently overly simplistic, must be improved. The following + # should be enough: + # - ensure that all ranks are running on the same machine (by exchanging + # their /proc/sys/kernel/random/boot_id value) + # - ensure there's P2P between all pairs of ranks (can_device_access_peer + # could help here but it's unclear what happens if target devices aren't + # visible? maybe just trying to exchange IPC handles and catching errors + # would work? note that in any case some ranks might succeed while some + # might fail so we need a barrier to have them all make the same decision) + return group.size() <= 8 + + +def _lazy_init( + device: torch.device, group: dist.ProcessGroup +) -> Optional[_FusedSequenceParallel]: + world_size = group.size() + try: + obj = CACHE[id(group)] + except KeyError: + if int(os.environ.get("DISABLE_FUSED_SEQUENCE_PARALLEL", "0")): + obj = None + elif world_size == 1: + obj = None + elif not _can_ranks_communicate_all_to_all_over_nvlink(group): + obj = None + else: + obj = _FusedSequenceParallel(device, group) + CACHE[id(group)] = obj + return obj + + +def _default_stream_factory() -> torch.cuda.Stream: + return torch.cuda.current_stream() + + +@overload +def fused_allgather_and_linear( + scattered_input: torch.Tensor, + weight: torch.Tensor, + *, + group: dist.ProcessGroup, + out: Optional[torch.Tensor] = None, + timeout_s: int = 60 * 60, + scale_scattered_input: Optional[torch.Tensor] = None, + scale_weight: Optional[Union[torch.Tensor, List[torch.Tensor]]] = None, + out_dtype: Optional[torch.dtype] = None, + **private_args_DO_NOT_USE, +) -> torch.Tensor: + ... + + +@overload +def fused_allgather_and_linear( + scattered_input: torch.Tensor, + weight: List[torch.Tensor], + *, + group: dist.ProcessGroup, + out: Optional[List[torch.Tensor]] = None, + timeout_s: int = 60 * 60, + scale_scattered_input: Optional[torch.Tensor] = None, + scale_weight: Optional[Union[torch.Tensor, List[torch.Tensor]]] = None, + out_dtype: Optional[torch.dtype] = None, + **private_args_DO_NOT_USE, +) -> List[torch.Tensor]: + ... + + +def fused_allgather_and_linear( + scattered_input: torch.Tensor, + weight: Union[torch.Tensor, List[torch.Tensor]], + *, + group: dist.ProcessGroup, + out: Optional[Union[torch.Tensor, List[torch.Tensor]]] = None, + timeout_s: int = 60 * 60, + scale_scattered_input: Optional[torch.Tensor] = None, + scale_weight: Optional[Union[torch.Tensor, List[torch.Tensor]]] = None, + out_dtype: Optional[torch.dtype] = None, + **private_args_DO_NOT_USE, +) -> Union[torch.Tensor, List[torch.Tensor]]: + """Performs a fused all-gather followed by a linear op + + It is equivalent to the following plain PyTorch code: + + # like scattered_input but with first dim multiplied by group's world size + gathered_input = scattered_input.new_empty(...) + dist.all_gather_into_tensor(gathered_input, scattered_input, group=group) + return torch.nn.functional.linear(gathered_input, weight) + + It achieves this by breaking down the matmul into smaller partial ops (as + many as the world size), each needing as input a different "contribution" + to the all-gather (by a different rank), and writing to a different chunk of + the output. Then, on one stream, it sends the local contribution to all + other ranks (first one rank over, then two, ...) while, on another stream, + it launches the sub-matmuls in the order in which the remote contributions + (which are the sub-matmuls' inputs) are supposed to arrive, so that ideally + none of the sub-matmuls will ever have to wait. + + The idea comes from this paper: https://arxiv.org/abs/2302.05442 + + This method uses a staging buffer, which persists across calls, of the same + size as the all-gathered input tensor (i.e., the input's size times the + world size). If multiple inputs of multiple sizes are used, the staging + buffer will be the maximum needed by any of them. Each call, when it starts, + must first wait for the previous call to finish using the staging buffer. In + normal conditions, where there's some other operation between two calls, + this isn't an issue. + + Supports FP8 gemm for tensor-wise quantized weight and input tensors. + To enable FP8 gemm: + 1. pass scattered_input and weight as quantized FP8 datatype + 2. pass scale_scattered_input and scale_weight, the scales used to + quantize input and weight, respectively. + 3. set out_dtype, if not specified, will be inferred from scattered_input type. + + """ + world_size = group.size() + weights = weight if isinstance(weight, list) else [weight] + assert (scale_scattered_input is None) == (scale_weight is None) + if scale_weight is not None: + assert isinstance(weight, list) == isinstance(scale_weight, list) + scales_weights: Sequence[Optional[torch.Tensor]] = ( + scale_weight if isinstance(scale_weight, list) else [scale_weight] + ) + assert len(weights) == len(scales_weights) + assert _is_fp8_dtype(scattered_input.dtype) + assert all(_is_fp8_dtype(w.dtype) for w in weights) + assert out_dtype is not None, "output_dtype is required with FP8" + else: + scales_weights = [None] * len(weights) + assert all(w.ndim == 2 for w in weights) + assert scattered_input.ndim >= 2 + assert all(scattered_input.shape[-1] == w.shape[-1] for w in weights) + assert scattered_input.is_contiguous() + gathered_input_shape = (world_size,) + scattered_input.shape + gathered_output_shapes = [gathered_input_shape[:-1] + w.shape[:-1] for w in weights] + if out is not None: + assert isinstance(out, list) == isinstance(weight, list) + gathered_outputs = out if isinstance(out, list) else [out] + assert len(gathered_outputs) == len(gathered_output_shapes) + assert all( + go.shape == gos for go, gos in zip(gathered_outputs, gathered_output_shapes) + ) + assert all(go.is_contiguous() for go in gathered_outputs) + if out_dtype is not None: + if isinstance(out, list): + for o in out: + assert o.dtype == out_dtype + else: + assert out.dtype == out_dtype + else: + gathered_outputs = [ + scattered_input.new_empty( + gos, + dtype=out_dtype if out_dtype is not None else scattered_input.dtype, + ) + for gos in gathered_output_shapes + ] + + torch.ops.xformers_python._fused_allgather_and_linear_impl( + scattered_input, + weights, + group.group_name, + gathered_outputs, + timeout_s=timeout_s, + _wait=private_args_DO_NOT_USE.get("_wait", True), + _memcpy=private_args_DO_NOT_USE.get("_memcpy", True), + scale_scattered_input=scale_scattered_input, + scales_weights=scales_weights, + ) + + if isinstance(weight, list): + return [go.flatten(0, 1) for go in gathered_outputs] + else: + return gathered_outputs[0].flatten(0, 1) + + +@torch.library.custom_op( + "xformers_python::_fused_allgather_and_linear_impl", + mutates_args={"gathered_outputs"}, + device_types="cuda", +) +def _fused_allgather_and_linear_custom_op( + scattered_input: torch.Tensor, + weights: List[torch.Tensor], + process_group_name: str, + gathered_outputs: List[torch.Tensor], + timeout_s: int, + _wait: bool, + _memcpy: bool, + scale_scattered_input: torch.Tensor, + scales_weights: Sequence[Optional[torch.Tensor]], +) -> None: + process_group = dist.distributed_c10d._resolve_process_group(process_group_name) + + def my_matmul( + inputs: List[torch.Tensor], + src_rank: int, + stream_factory: Callable[[], torch.cuda.Stream], + ) -> None: + for w, scale_weight, go in zip(weights, scales_weights, gathered_outputs): + with torch.cuda.stream(stream_factory()): + if scale_scattered_input is not None and scale_weight is not None: + torch._scaled_mm( + inputs[0], + w.t(), + out_dtype=go[src_rank].dtype, + scale_a=scale_scattered_input, + scale_b=scale_weight, + out=go[src_rank], + ) + else: + torch.matmul(inputs[0], w.t(), out=go[src_rank]) + + fused_allgather_and_anything( + [scattered_input], + my_matmul, + group=process_group, + timeout_s=timeout_s, + _wait=_wait, + _memcpy=_memcpy, + ) + + +def fused_allgather_and_anything( + scattered_inputs: List[torch.Tensor], + my_matmul: Callable[ + [List[torch.Tensor], int, Callable[[], torch.cuda.Stream]], None + ], + *, + group: dist.ProcessGroup, + timeout_s: int = 60 * 60, + **private_args_DO_NOT_USE, +) -> None: + world_size = group.size() + + if len(scattered_inputs) == 0: + for src_rank in range(world_size): + my_matmul([], src_rank, _default_stream_factory) + return + + assert all(si.is_contiguous() for si in scattered_inputs) + assert all(si.device == scattered_inputs[0].device for si in scattered_inputs) + assert all(si.dtype == scattered_inputs[0].dtype for si in scattered_inputs) + + gathered_input_shapes = [(world_size,) + si.shape for si in scattered_inputs] + + obj = _lazy_init(scattered_inputs[0].device, group) + + if world_size == 1: + my_matmul(scattered_inputs, 0, _default_stream_factory) + + # Fallback + elif obj is None: + gathered_inputs = [ + si.new_empty(gis) + for si, gis in zip(scattered_inputs, gathered_input_shapes) + ] + for si, gi in zip(scattered_inputs, gathered_inputs): + dist.all_gather_into_tensor(output_tensor=gi, input_tensor=si, group=group) + for src_rank in range(world_size): + my_matmul( + [gi[src_rank] for gi in gathered_inputs], + src_rank, + _default_stream_factory, + ) + + # Fast path + else: + assert scattered_inputs[0].device == obj.my_device + obj.allgather_and_linear( + scattered_inputs, + my_matmul, + timeout_s=timeout_s, + _wait=private_args_DO_NOT_USE.get("_wait", True), + _memcpy=private_args_DO_NOT_USE.get("_memcpy", True), + ) + + +@overload +def fused_linear_and_reducescatter( + gathered_input: torch.Tensor, + weight: torch.Tensor, + *, + group: dist.ProcessGroup, + out: Optional[torch.Tensor] = None, + timeout_s: int = 60 * 60, + scale_gathered_input: Optional[torch.Tensor] = None, + scale_weight: Optional[Union[torch.Tensor, List[torch.Tensor]]] = None, + out_dtype: Optional[torch.dtype] = None, + **private_args_DO_NOT_USE, +) -> torch.Tensor: + ... + + +@overload +def fused_linear_and_reducescatter( + gathered_input: torch.Tensor, + weight: List[torch.Tensor], + *, + group: dist.ProcessGroup, + out: Optional[List[torch.Tensor]] = None, + timeout_s: int = 60 * 60, + scale_gathered_input: Optional[torch.Tensor] = None, + scale_weight: Optional[Union[torch.Tensor, List[torch.Tensor]]] = None, + out_dtype: Optional[torch.dtype] = None, + **private_args_DO_NOT_USE, +) -> List[torch.Tensor]: + ... + + +def fused_linear_and_reducescatter( + gathered_input: torch.Tensor, + weight: Union[torch.Tensor, List[torch.Tensor]], + *, + group: dist.ProcessGroup, + out: Optional[Union[torch.Tensor, List[torch.Tensor]]] = None, + timeout_s: int = 60 * 60, + scale_gathered_input: Optional[torch.Tensor] = None, + scale_weight: Optional[Union[torch.Tensor, List[torch.Tensor]]] = None, + out_dtype: Optional[torch.dtype] = None, + **private_args_DO_NOT_USE, +) -> Union[torch.Tensor, List[torch.Tensor]]: + """Performs a fused linear op followed by a reduce-scatter + + It is equivalent to the following plain PyTorch code: + + gathered_output = torch.nn.functional.linear(gathered_input, weight) + # like gathered_output but with first dim divided by group's world size + scattered_output = gathered_output.new_empty(...) + dist.reduce_scatter_tensor(scattered_output, gathered_output, group=group) + + Supports FP8 gemm with tensor-wise quantized weights. To enable FP8 gemm: + 1. pass weight and gathered_input as FP8 tensors + 2. Set `scale_gathered_input` and `scale_weight` to the scales used to quantize + inputs and weight, respectively. + 3. Set out_dtype to the desired output dtype. If not specified, it will be inferred from + gathered_input datatype. + """ + world_size = group.size() + weights = weight if isinstance(weight, list) else [weight] + assert (scale_gathered_input is None) == (scale_weight is None) + if scale_weight is not None: + assert isinstance(weight, list) == isinstance(scale_weight, list) + scales_weights: Sequence[Optional[torch.Tensor]] = ( + scale_weight if isinstance(scale_weight, list) else [scale_weight] + ) + assert len(weights) == len(scales_weights) + assert _is_fp8_dtype(gathered_input.dtype) + assert all(_is_fp8_dtype(w.dtype) for w in weights) + assert out_dtype is not None, "output_dtype is required with FP8" + else: + scales_weights = [None] * len(weights) + assert all(w.ndim == 2 for w in weights) + assert gathered_input.ndim >= 2 + assert all(gathered_input.shape[-1] == w.shape[-1] for w in weights) + assert gathered_input.is_contiguous() + assert gathered_input.shape[0] % world_size == 0 + gathered_input = gathered_input.view( + (world_size, gathered_input.shape[0] // world_size) + gathered_input.shape[1:] + ) + gathered_output_shapes = [gathered_input.shape[:-1] + w.shape[:-1] for w in weights] + scattered_output_shapes = [gos[1:] for gos in gathered_output_shapes] + if out is not None: + assert isinstance(out, list) == isinstance(weight, list) + scattered_outputs = out if isinstance(out, list) else [out] + assert len(scattered_outputs) == scattered_output_shapes + assert all(so.device == gathered_input.device for so in scattered_outputs) + assert all(so.dtype == gathered_input.dtype for so in scattered_outputs) + assert all( + so.shape == sos + for so, sos in zip(scattered_outputs, scattered_output_shapes) + ) + if out_dtype is not None: + if isinstance(out, list): + for o in out: + assert o.dtype == out_dtype + else: + assert out.dtype == out_dtype + else: + scattered_outputs = [ + gathered_input.new_empty( + sos, + dtype=out_dtype if out_dtype is not None else gathered_input.dtype, + ) + for sos in scattered_output_shapes + ] + + torch.ops.xformers_python._fused_linear_and_reducescatter_impl( + gathered_input, + weights, + group.group_name, + scattered_outputs, + timeout_s=timeout_s, + _wait=private_args_DO_NOT_USE.get("_wait", True), + _memcpy=private_args_DO_NOT_USE.get("_memcpy", True), + scale_gathered_input=scale_gathered_input, + scales_weights=scales_weights, + ) + + if isinstance(weight, list): + return scattered_outputs + else: + return scattered_outputs[0] + + +@torch.library.custom_op( + "xformers_python::_fused_linear_and_reducescatter_impl", + mutates_args={"scattered_outputs"}, + device_types="cuda", +) +def _fused_linear_and_reducescatter_custom_op( + gathered_input: torch.Tensor, + weights: List[torch.Tensor], + process_group_name: str, + scattered_outputs: List[torch.Tensor], + timeout_s: int, + _wait: bool, + _memcpy: bool, + scale_gathered_input: torch.Tensor, + scales_weights: Sequence[Optional[torch.Tensor]], +) -> None: + process_group = dist.distributed_c10d._resolve_process_group(process_group_name) + + def my_matmul( + outputs: List[torch.Tensor], + dst_rank: int, + stream_factory: Callable[[], torch.cuda.Stream], + ) -> None: + for w, scale_weight, o in zip(weights, scales_weights, outputs): + with torch.cuda.stream(stream_factory()): + if scale_gathered_input is not None and scale_weight is not None: + torch._scaled_mm( + gathered_input[dst_rank], + w.t(), + out_dtype=o.dtype, + scale_a=scale_gathered_input, + scale_b=scale_weight, + out=o, + ) + else: + torch.matmul(gathered_input[dst_rank], w.t(), out=o) + + fused_anything_and_reducescatter( + my_matmul, + scattered_outputs, + group=process_group, + timeout_s=timeout_s, + _wait=_wait, + _memcpy=_memcpy, + ) + + +def fused_anything_and_reducescatter( + my_matmul: Callable[ + [List[torch.Tensor], int, Callable[[], torch.cuda.Stream]], None + ], + scattered_outputs: List[torch.Tensor], + *, + group: dist.ProcessGroup, + timeout_s: int = 60 * 60, + **private_args_DO_NOT_USE, +) -> None: + world_size = group.size() + + if len(scattered_outputs) == 0: + for dst_rank in range(world_size): + my_matmul([], dst_rank, _default_stream_factory) + return + + assert all(so.is_contiguous() for so in scattered_outputs) + assert all(so.device == scattered_outputs[0].device for so in scattered_outputs) + assert all(so.dtype == scattered_outputs[0].dtype for so in scattered_outputs) + + gathered_output_shapes = [(world_size,) + so.shape for so in scattered_outputs] + + obj = _lazy_init(scattered_outputs[0].device, group) + + if world_size == 1: + my_matmul(scattered_outputs, 0, _default_stream_factory) + + # Fallback + elif obj is None: + gathered_outputs = [ + so.new_empty(gos) + for so, gos in zip(scattered_outputs, gathered_output_shapes) + ] + for dst_rank in range(world_size): + my_matmul( + [go[dst_rank] for go in gathered_outputs], + dst_rank, + _default_stream_factory, + ) + for go, so in zip(gathered_outputs, scattered_outputs): + dist.reduce_scatter_tensor(output=so, input=go, group=group) + + # Fast path + else: + assert scattered_outputs[0].device == obj.my_device + gathered_outputs = [ + scattered_outputs[0].new_empty(gos) for gos in gathered_output_shapes + ] + obj.linear_and_reducescatter( + my_matmul, + gathered_outputs, + scattered_outputs, + timeout_s=timeout_s, + _wait=private_args_DO_NOT_USE.get("_wait", True), + _memcpy=private_args_DO_NOT_USE.get("_memcpy", True), + ) diff --git a/lib/python3.12/site-packages/xformers/ops/sp24.py b/lib/python3.12/site-packages/xformers/ops/sp24.py new file mode 100644 index 0000000000000000000000000000000000000000..9fafdde207616817ba9f303e3101d929c265c5c0 --- /dev/null +++ b/lib/python3.12/site-packages/xformers/ops/sp24.py @@ -0,0 +1,820 @@ +# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved. +# +# This source code is licensed under the BSD license found in the +# LICENSE file in the root directory of this source tree. + +import contextlib +import os +import time +from functools import partial +from typing import Any, Callable, Dict, List, Optional, Tuple, TypeVar, cast + +import torch + +from .common import BaseOperator, get_operator, get_xformers_operator, register_operator + + +@register_operator +class SparsifyBothWays(BaseOperator): + OPERATOR = get_xformers_operator("sparse24_sparsify_both_ways") + OPERATOR_CATEGORY = "sp24" + NAME = "sparse24_sparsify_both_ways" + + +@register_operator +class SparsifyApply(BaseOperator): + OPERATOR = get_xformers_operator("sparse24_apply") + OPERATOR_CATEGORY = "sp24" + NAME = "sparse24_apply" + + +@register_operator +class SparsifyApplyDenseOutput(BaseOperator): + OPERATOR = get_xformers_operator("sparse24_apply_dense_output") + OPERATOR_CATEGORY = "sp24" + NAME = "sparse24_apply_dense_output" + + +@register_operator +class Sp24Gemm(BaseOperator): + OPERATOR = get_xformers_operator("_sparse24_gemm") + OPERATOR_CATEGORY = "sp24" + NAME = "_sparse24_gemm" + + +def _get_cusparselt_torch_version() -> Tuple[int, int, int]: + """ + Returns the version of the cusparselt.so library used by pytorch + """ + if not torch.backends.cusparselt.is_available(): + return (0, 0, 0) + version: Optional[int] = torch.backends.cusparselt.version() + if version is None: + return (0, 0, 0) + return ((version // 10000) % 100, (version // 100) % 100, version % 100) + + +_cusplt_version = _get_cusparselt_torch_version() +_cusplt_version_str = ".".join(str(v) for v in _cusplt_version) + + +@register_operator +class Sp24GemmCuspltSearch(BaseOperator): + OPERATOR = get_operator("aten", "_cslt_sparse_mm_search") + OPERATOR_CATEGORY = "sp24" + NAME = f"_cslt_sparse_mm_search@{_cusplt_version_str}" + + +@register_operator +class Sp24GemmCusplt(BaseOperator): + OPERATOR = get_operator("aten", "_cslt_sparse_mm") + OPERATOR_CATEGORY = "sp24" + NAME = f"_cslt_sparse_mm@{_cusplt_version_str}" + + +def _has_cusparseLt() -> bool: + available = _cusplt_version >= (0, 5, 0) + if not available: + return False + + # Sm90 added in 6.0 + compute_capability = (0, 0) + if torch.cuda.is_available(): + compute_capability = torch.cuda.get_device_capability("cuda") + if _cusplt_version < (6, 0, 0): + if compute_capability >= (9, 0): + return False + return available + + +def sparse24_pointwise_op( + func, types, args=(), kwargs=None, allow_sparsify_args_list=() +): + self = None + for tensor in args: + if isinstance(tensor, Sparse24Tensor): + self = tensor + assert self is not None + args_updated = [] + for i, tensor in enumerate(args): + if isinstance(tensor, torch.Tensor): + if not isinstance(tensor, Sparse24Tensor): + if i in allow_sparsify_args_list: + tensor = sparsify24_like(tensor, self) + else: + raise ValueError( + f"Operation {func.__module__}.{func.__name__} on Sparse24Tensor requires all operands to " + f"be Sparse24Tensors, but operand {i} is a {type(tensor)}" + ) + if ( + tensor.threads_masks is None + or self.threads_masks is None + or tensor.threads_masks.data_ptr() != self.threads_masks.data_ptr() + or tensor.threads_masks.stride() != self.threads_masks.stride() + ): + raise ValueError( + f"Operation {func.__module__}.{func.__name__} on Sparse24Tensor requires all operands to be " + "Sparse24Tensors with the same sparsity pattern" + ) + args_updated.append(tensor) + assert isinstance( + self, Sparse24TensorCutlass + ), "Only implemented for CUTLASS tensors" + return Sparse24TensorCutlass( + self.shape, + func( + *[(x.packed if isinstance(x, Sparse24Tensor) else x) for x in args_updated] + ), + self.meta, + func( + *[ + (x.packed_t if isinstance(x, Sparse24Tensor) else x) + for x in args_updated + ] + ), + self.meta_t, + self.threads_masks, + ) + + +def sparse24_mm(func, types, args=(), kwargs=None) -> torch.Tensor: + assert len(args) == 2 + A, B = args + if A.ndim != 2 or B.ndim != 2: + raise NotImplementedError( + "`Sparse24Tensor` matmul: Broadcasting is not implemented" + ) + if isinstance(A, Sparse24Tensor): + return A._mm(B) + else: + B_t = B.t() + assert isinstance(B_t, Sparse24Tensor) + return B_t._mm(A.t(), prefer_col_major_output=True).t() + + +def sparse24_addmm(func, types, args=(), kwargs=None) -> torch.Tensor: + assert len(args) == 3 + bias, A, B = args + if A.ndim != 2 or B.ndim != 2: + raise NotImplementedError( + "`Sparse24Tensor` matmul: Broadcasting is not implemented" + ) + if bias.ndim != 1: + raise NotImplementedError( + f"`Sparse24Tensor` matmul: only bias dim=1 supported. Shape={bias.shape}" + ) + if isinstance(A, Sparse24Tensor): + raise NotImplementedError( + "`Sparse24Tensor` matmul: only operand B of `addmm` can be sparse" + ) + B_t = B.t() + assert isinstance(B_t, Sparse24Tensor) + return B_t._mm(A.t(), bias=bias, prefer_col_major_output=True).t() + + +def sparse24_linear(func, types, args=(), kwargs=None) -> torch.Tensor: + assert len(args) in [2, 3] + A, B = args[:2] + bias = args[2] if len(args) == 3 else None + if bias is None: + return A @ B.t() + return sparse24_addmm( + func=None, + types=None, + args=[bias, A, B.t()], + ) + + +def sparse24_t(func, types, args=(), kwargs=None) -> torch.Tensor: + assert len(args) == 1 + self = args[0] + assert isinstance(self, Sparse24Tensor) + assert len(self.shape) == 2 + return self.__class__( + (self.shape[-1], self.shape[0]), + packed=self.packed_t, + meta=self.meta_t, + packed_t=self.packed, + meta_t=self.meta, + threads_masks=self.threads_masks.transpose(0, 1), + ) + + +def sparse24_view(func, types, args=(), kwargs=None) -> torch.Tensor: + assert len(args) == 2 + self, shape = args + if tuple(shape) != self.shape: + raise NotImplementedError( + f"`view` is not implemented for Sparse24Tensor, except for the dummy case (shape={shape})" + ) + return self + + +def sparse24_detach(func, types, args, kwargs) -> torch.Tensor: + assert len(args) == 1 + self = args[0] + return self.__class__( + shape=self.shape, + packed=self.packed, + meta=self.meta, + packed_t=self.packed_t, + meta_t=self.meta_t, + threads_masks=self.threads_masks, + requires_grad=False, + ) + + +@contextlib.contextmanager +def no_dispatch(): + guard = torch._C._DisableTorchDispatch() + try: + yield + finally: + del guard + + +def fallback_dispatcher(func, types, args, kwargs): + with no_dispatch(): + return func(*args) + + +SPARSE24_DISPATCH_CUTLASS = { + torch.ops.aten.is_same_size: fallback_dispatcher, + torch.ops.aten.detach_: fallback_dispatcher, + torch.ops.aten.detach: sparse24_detach, + torch.ops.aten.relu: sparse24_pointwise_op, + torch.ops.aten.gelu: sparse24_pointwise_op, + torch.ops.aten.silu: sparse24_pointwise_op, + torch.ops.aten.mul: partial( + # `mul` BW in swiglu + sparse24_pointwise_op, + allow_sparsify_args_list=( + 0, + 1, + ), + ), + torch.ops.aten.add: sparse24_pointwise_op, + # Note: for these ops, we allow the gradient to come in as a `torch.Tensor` + # and we will run the sparsification right before calling the BW aten func + torch.ops.aten.gelu_backward: partial( + sparse24_pointwise_op, allow_sparsify_args_list=(0,) + ), + torch.ops.aten.silu_backward: partial( + sparse24_pointwise_op, allow_sparsify_args_list=(0, 1) + ), + torch.ops.aten.threshold_backward: partial( # relu BW + sparse24_pointwise_op, + allow_sparsify_args_list=(0,), + ), + torch.ops.aten.mm: sparse24_mm, + torch.ops.aten.matmul: sparse24_mm, + torch.ops.aten.t: sparse24_t, + torch.ops.aten.view: sparse24_view, + torch.ops.aten.linear: sparse24_linear, +} + +SPARSE24_DISPATCH_CUSPARSELT = { + torch.ops.aten.is_same_size: fallback_dispatcher, + torch.ops.aten.detach_: fallback_dispatcher, + torch.ops.aten.detach: sparse24_detach, + torch.ops.aten.t: sparse24_t, + torch.ops.aten.view: sparse24_view, + torch.ops.aten.mm: sparse24_mm, + torch.ops.aten.matmul: sparse24_mm, + torch.ops.aten.addmm: sparse24_addmm, + torch.ops.aten.linear: sparse24_linear, +} + + +class Sparse24Tensor(torch.Tensor): + packed: torch.Tensor + meta: torch.Tensor + packed_t: torch.Tensor + meta_t: torch.Tensor + threads_masks: torch.Tensor + __slots__ = ["packed", "meta", "packed_t", "meta_t", "threads_masks"] + + # We need to update the new method here to tell PyTorch what should be + # the Tensor corresponding to the wrapper object + @staticmethod + def __new__( + cls, + shape, + packed: torch.Tensor, + meta: torch.Tensor, + packed_t: torch.Tensor, + meta_t: torch.Tensor, + threads_masks: torch.Tensor, + *, + requires_grad=False, + ): + assert isinstance(packed, torch.Tensor) + tensor = torch.Tensor._make_wrapper_subclass( # type: ignore[attr-defined] + cls, + shape, + device=packed.device, + dtype=packed.dtype, + requires_grad=requires_grad, + ) + tensor.packed = packed + tensor.meta = meta + tensor.packed_t = packed_t + tensor.meta_t = meta_t + tensor.threads_masks = threads_masks + return tensor + + def __repr__(self): + return f"{self.__class__.__name__}(shape={self.shape})" + + def _sp24_to_dense(self) -> torch.Tensor: + # Multiply by identity + # WARN: This is not efficient at all + e = torch.eye( + self.shape[1], self.shape[1], device=self.device, dtype=self.dtype + ) + return self @ e + + def _mm( + self, + B: torch.Tensor, + *, + prefer_col_major_output: bool = False, + bias: Optional[torch.Tensor] = None, + ) -> torch.Tensor: + raise NotImplementedError() + + __torch_function__ = torch._C._disabled_torch_function_impl + + def __tensor_flatten__(self): + return self.__slots__, (self.shape, self.requires_grad) + + @classmethod + def __tensor_unflatten__( + cls, inner_tensors, flatten_spec, outer_size, outer_stride + ): + shape, requires_grad = flatten_spec + return cls( + shape, + **inner_tensors, + requires_grad=requires_grad, + ) + + +class Sparse24TensorCutlass(Sparse24Tensor): + def _mm( + self, + B: torch.Tensor, + *, + bias: Optional[torch.Tensor] = None, + prefer_col_major_output: bool = False, + ) -> torch.Tensor: + if isinstance(B, Sparse24Tensor): + raise ValueError( + "`Sparse24Tensor @ Sparse24Tensor` is not supported by the hardware" + ) + if bias is not None: + raise NotImplementedError( + f"`Sparse24Tensor` with backend='{BACKEND_CUTLASS}' does not support matmul with bias. " + f"Remove the bias, or use backend='{BACKEND_CUSPARSELT}'" + ) + if self.ndim != 2 or B.ndim != 2: + raise NotImplementedError( + f"`{self.__class__.__name__}` matmul: Broadcasting is not implemented" + ) + if self.shape[1] != B.shape[0]: + raise NotImplementedError( + f"`{self.__class__.__name__}` matmul: invalid shapes \ + ({self.shape[0]}, {self.shape[1]}) @ ({B.shape[0]}, {B.shape[1]})" + ) + return Sp24Gemm.OPERATOR(self.packed, B, self.meta)[: self.shape[0]] + + @classmethod + def __torch_dispatch__(cls, func, types, args=(), kwargs=None): + if func._overloadpacket not in SPARSE24_DISPATCH_CUTLASS: + raise NotImplementedError( + f"{cls.__name__} only supports a specific set of operations, " + f"can't perform requested op ({func.__name__})" + ) + return SPARSE24_DISPATCH_CUTLASS[func._overloadpacket]( + func, types, args, kwargs + ) + + +_CUSPLT_ALG_CACHE: Dict[Tuple[int, int, int, str, torch.dtype, bool], int] = {} +_CUSPLT_TUNE = os.environ.get("XFORMERS_CUSPARSELT_TUNE", "1") == "1" + + +def _cusplt_find_alg( + shape: List[int], + packed: torch.Tensor, + B: torch.Tensor, + bias: Optional[torch.Tensor], + transpose_result: bool, +) -> int: + """ + cuSPARSELt has multiple algorithms (that correspond to different kernels) + to run a given GEMM, because the optimal kernel depends on the GEMM dimensions. + This function attempts to find the most efficient one by benchmarking all + of them. + NOTE: cuSPARSELt also provides a function to search the best algorithm + (exposed via `aten:_cslt_sparse_mm_search`) but it often fails to find the best + algorithm, so we need this workaround. + """ + if not _CUSPLT_TUNE: + return 0 + M, K = shape + N = B.shape[1] + fmt = "r" + fmt += "r" if B.stride(-1) <= 1 else "c" + fmt += "c" if transpose_result else "r" + h = (M, N, K, fmt, B.dtype, bias is not None) + if h in _CUSPLT_ALG_CACHE: + return _CUSPLT_ALG_CACHE[h] + + REPEAT = 10 + TIME_ALGO = [] + for algo in range(70): + has_error = False + for i in range(REPEAT): + try: + Sp24GemmCusplt.OPERATOR( + packed, B, bias=bias, transpose_result=transpose_result, alg_id=algo + ) + except RuntimeError: + has_error = True + break + if i == 1: # 1 iteration of warmup + torch.cuda.synchronize() + t = time.monotonic() + if has_error: + break + torch.cuda.synchronize() + dt = time.monotonic() - t + TIME_ALGO.append((dt, algo)) + TIME_ALGO.sort() + _CUSPLT_ALG_CACHE[h] = TIME_ALGO[0][1] + return _CUSPLT_ALG_CACHE[h] + + +@torch.library.custom_op("xformers::_cusplt_mm", mutates_args=(), device_types=["cuda"]) +def _cusplt_mm( + shape: List[int], + packed: torch.Tensor, + B: torch.Tensor, + bias: Optional[torch.Tensor], + transpose_result: bool, +) -> torch.Tensor: + """ + This operator wraps find_algo + gemm. This is because we don't want find_algo + to be visible by torch compile, otherwise it will remove it from the graph. + """ + alg_id = _cusplt_find_alg( + shape, packed, B, bias=bias, transpose_result=transpose_result + ) + return Sp24GemmCusplt.OPERATOR( + packed, B, bias=bias, transpose_result=transpose_result, alg_id=alg_id + ) + + +@torch.library.register_fake("xformers::_cusplt_mm") +def _cusplt_mm_meta( + shape: List[int], + packed: torch.Tensor, + B: torch.Tensor, + bias: Optional[torch.Tensor], + transpose_result: bool, +) -> torch.Tensor: + M, K = shape + N = B.shape[1] + if transpose_result: + return torch.empty([N, M], dtype=B.dtype, device=B.device) + return torch.empty([M, N], dtype=B.dtype, device=B.device) + + +class Sparse24TensorCuSparseLt(Sparse24Tensor): + def _mm( + self, + B: torch.Tensor, + *, + prefer_col_major_output: bool = False, + bias: Optional[torch.Tensor] = None, + ) -> torch.Tensor: + if isinstance(B, Sparse24Tensor): + raise ValueError( + "`Sparse24Tensor @ Sparse24Tensor` is not supported by the hardware" + ) + if self.ndim != 2 or B.ndim != 2: + raise NotImplementedError( + f"`{self.__class__.__name__}` matmul: Broadcasting is not implemented" + ) + if self.shape[1] != B.shape[0]: + raise NotImplementedError( + f"`{self.__class__.__name__}` matmul: invalid shapes \ + ({self.shape[0]}, {self.shape[1]}) @ ({B.shape[0]}, {B.shape[1]})" + ) + if B.shape[1] % 8 != 0: + raise NotImplementedError( + f"`{self.__class__.__name__}` matmul: trying to do `A={tuple(self.shape)} @ B={tuple(B.shape)}`. " + "The dense matrix B should have the second dimension aligned to 8." + ) + if B.dtype != self.dtype: + raise NotImplementedError( + f"`{self.__class__.__name__}` matmul: trying to do `A={tuple(self.shape)} @ B={tuple(B.shape)}`, " + f"with A.dtype={self.dtype} and B.dtype={B.dtype}. " + "This operation is only supported when A and B have the same data type." + ) + if bias is not None and bias.dtype != self.dtype: + raise NotImplementedError( + f"`{self.__class__.__name__}` matmul: trying to do `A={tuple(self.shape)} @ B={tuple(B.shape)} + C`, " + "with A.dtype=B.dtype={self.dtype} and C.dtype={B.dtype}. " + "This operation is only supported when A, B and C have the same data type." + ) + assert _has_cusparseLt() + out = torch.ops.xformers._cusplt_mm( + self.shape, + self.packed, + B, + bias=bias, + transpose_result=prefer_col_major_output, + ) + if prefer_col_major_output: + out = out.t() + return out[: self.shape[0]] + + @classmethod + def __torch_dispatch__(cls, func, types, args=(), kwargs=None): + if func._overloadpacket not in SPARSE24_DISPATCH_CUSPARSELT: + raise NotImplementedError( + f"{cls.__name__} only supports a specific set of operations, " + f"can't perform requested op ({func.__name__})" + ) + return SPARSE24_DISPATCH_CUSPARSELT[func._overloadpacket]( + func, types, args, kwargs + ) + + +torch._dynamo.allow_in_graph(Sparse24TensorCuSparseLt) +torch._dynamo.allow_in_graph(Sparse24TensorCutlass) + +GRADIENT_SP24 = "24sparse" +GRADIENT_DENSE = "24dense" +GRADIENT_STE = "ste" # Straight-Through Estimator + +BACKEND_CUTLASS = "cutlass" +BACKEND_CUSPARSELT = "cusparselt" +BACKEND_DENSE = "dense" + + +def _sparsify24_forward(x: torch.Tensor, *, algo: str, backend: str) -> Sparse24Tensor: + assert backend in [ + BACKEND_CUTLASS, + BACKEND_CUSPARSELT, + ], f"Invalid backend: {backend}" + if isinstance(x, Sparse24Tensor): + if x.threads_masks is None: + raise ValueError("Input to `sparsify24` is already sparse") + return x + + (packed, meta, packed_t, meta_t, threads_masks) = SparsifyBothWays.OPERATOR( + x, algorithm=algo, backend=backend + ) + cls = ( + Sparse24TensorCutlass + if backend == BACKEND_CUTLASS + else Sparse24TensorCuSparseLt + ) + return cls( + x.shape, + packed=packed, + meta=meta, + packed_t=packed_t, + meta_t=meta_t, + threads_masks=threads_masks, + requires_grad=False, + ) + + +class _Sparsify24Func(torch.autograd.Function): + @staticmethod + def forward(ctx, x: torch.Tensor, algo: str, gradient: str, backend: str): # type: ignore[override] + if gradient not in [GRADIENT_SP24, GRADIENT_DENSE, GRADIENT_STE]: + raise ValueError( + f"Invalid gradient type: '{gradient}'. " + f"Expected '{GRADIENT_SP24}' or '{GRADIENT_DENSE}' or '{GRADIENT_STE}" + ) + out = _sparsify24_forward(x, algo=algo, backend=backend) + ctx.threads_masks = out.threads_masks + ctx.meta = out.meta + ctx.meta_t = out.meta_t + ctx.dtype = out.dtype + ctx.gradient = gradient + return out + + @staticmethod + def backward(ctx, grad_out: torch.Tensor): # type: ignore[override] + if isinstance(grad_out, Sparse24Tensor) or ctx.gradient == GRADIENT_STE: + return grad_out, None, None, None + assert not isinstance(grad_out, Sparse24Tensor) + assert grad_out.dtype == ctx.dtype + if ctx.gradient == GRADIENT_SP24: + packed, _, packed_t, _ = SparsifyApply.OPERATOR(grad_out, ctx.threads_masks) + grad_in: torch.Tensor = Sparse24TensorCutlass( + grad_out.shape, + packed, + ctx.meta, + packed_t, + ctx.meta_t, + ctx.threads_masks, + requires_grad=grad_out.requires_grad, + ) + elif ctx.gradient == GRADIENT_DENSE: + assert ctx.threads_masks.is_contiguous() + grad_in = SparsifyApplyDenseOutput.OPERATOR(grad_out, ctx.threads_masks) + else: + assert False, f"Unsupported gradient type: {ctx.gradient}" + return ( + grad_in, + None, + None, + None, + ) + + +class _Sparsify24STEFunc(torch.autograd.Function): + @staticmethod + def forward( + ctx, + x: torch.Tensor, + algo: str, + backend: str, + bw_mul0: float, + bw_mul1: float, + ): # type: ignore[override] + out = _sparsify24_forward(x, algo=algo, backend=backend) + ctx.threads_masks = out.threads_masks + ctx.bw_mul0 = bw_mul0 + ctx.bw_mul1 = bw_mul1 + return out + + @staticmethod + def backward(ctx, grad_out: torch.Tensor): # type: ignore[override] + assert not isinstance(grad_out, Sparse24Tensor) + if ctx.bw_mul0 == 1.0 and ctx.bw_mul1 == 1.0: + grad_in = grad_out + else: + grad_in = SparsifyApplyDenseOutput.OPERATOR( + grad_out, ctx.threads_masks, mul0=ctx.bw_mul0, mul1=ctx.bw_mul1 + ) + return ( + grad_in, + None, # algo + None, # backend + None, # bw_mul0 + None, # bw_mul1 + ) + + +class _Sparsify24LikeFunc(torch.autograd.Function): + @staticmethod + def forward(ctx, x: torch.Tensor, pattern: Sparse24Tensor, gradient: str, backend: str): # type: ignore[override] + if not isinstance(pattern, Sparse24Tensor): + raise NotImplementedError( + "`sparsify24_like`: `pattern` must be a sparse tensor" + ) + if not pattern.threads_masks.is_contiguous(): + raise NotImplementedError( + "`sparsify24_like` is not implemented when `pattern` is transposed" + ) + if gradient not in [GRADIENT_DENSE, GRADIENT_SP24, GRADIENT_STE]: + raise ValueError(f'`sparsify24_like`: invalid gradient type "{gradient}"') + ctx.threads_masks = pattern.threads_masks + ctx.meta = pattern.meta + ctx.meta_t = pattern.meta_t + ctx.dtype = pattern.dtype + ctx.gradient = gradient + if backend == BACKEND_DENSE: + assert ctx.threads_masks.is_contiguous() + return SparsifyApplyDenseOutput.OPERATOR(x, ctx.threads_masks) + packed, meta, packed_t, meta_t = SparsifyApply.OPERATOR( + x, ctx.threads_masks, backend=backend + ) + if backend == BACKEND_CUTLASS: + return Sparse24TensorCutlass( + x.shape, + packed, + ctx.meta, + packed_t, + ctx.meta_t, + ctx.threads_masks, + requires_grad=x.requires_grad, + ) + assert backend == BACKEND_CUSPARSELT, f"Invalid backend: {backend}" + meta.copy_(pattern.meta) + meta_t.copy_(pattern.meta_t) + return Sparse24TensorCuSparseLt( + x.shape, + packed, + meta, + packed_t, + meta_t, + ctx.threads_masks, + requires_grad=x.requires_grad, + ) + + @staticmethod + def backward(ctx, grad_out: torch.Tensor): # type: ignore[override] + if ctx.gradient == GRADIENT_STE or isinstance(grad_out, Sparse24Tensor): + return grad_out, None, None, None + assert not isinstance(grad_out, Sparse24Tensor) + assert grad_out.dtype == ctx.dtype + + if ctx.gradient == GRADIENT_DENSE: + assert ctx.threads_masks.is_contiguous() + return ( + SparsifyApplyDenseOutput.OPERATOR(grad_out, ctx.threads_masks), + None, + None, + None, + ) + assert ctx.gradient == GRADIENT_SP24 + + packed, _, packed_t, _ = SparsifyApply.OPERATOR( + grad_out, ctx.threads_masks, backend=BACKEND_CUTLASS + ) + return ( + Sparse24TensorCutlass( + grad_out.shape, + packed, + ctx.meta, + packed_t, + ctx.meta_t, + ctx.threads_masks, + requires_grad=grad_out.requires_grad, + ), + None, + None, + None, + ) + + +# We want to use `torch._dynamo.allow_in_graph` as a decorator +# (see https://fburl.com/workplace/uimiz0mf) but it breaks mypy. +# This is a hack to work around this +F = TypeVar("F", bound=Callable[..., Any]) + + +def allow_in_graph(func: F) -> F: + return cast(F, torch._dynamo.allow_in_graph(func)) + + +@allow_in_graph +def sparsify24( + x: torch.Tensor, + algo: str = "", + gradient: str = GRADIENT_SP24, + backend: str = BACKEND_CUTLASS, +) -> Sparse24Tensor: + return _Sparsify24Func.apply(x, algo, gradient, backend) + + +@allow_in_graph +def sparsify24_ste( + x: torch.Tensor, + algo: str = "", + backend: str = BACKEND_CUTLASS, + bw_mul0: float = 1.0, + bw_mul1: float = 1.0, +) -> Sparse24Tensor: + """ + 2:4 sparsification, with Straight Through Estimator for the + backward pass (eg the gradient is *not* sparsified). + Optionally, `bw_mul[0-1]` provide the option to rescale the gradient + differently for pruned (`bw_mul0`) and kept values (`bw_mul1`). + """ + return _Sparsify24STEFunc.apply(x, algo, backend, bw_mul0, bw_mul1) + + +@allow_in_graph +def sparsify24_like( + x: torch.Tensor, + pattern: torch.Tensor, + gradient: str = GRADIENT_SP24, + backend: str = "", + out_dense: Optional[bool] = None, # <-- TODO: Deprecate this in favor of "gradient" +) -> Sparse24Tensor: + if out_dense is not None and out_dense: + backend = BACKEND_DENSE + if backend == "": + backend = ( + BACKEND_CUSPARSELT + if isinstance(pattern, Sparse24TensorCuSparseLt) + else BACKEND_CUTLASS + ) + if not isinstance(pattern, Sparse24Tensor): + raise ValueError( + f"`pattern` must be a `Sparse24Tensor` but got a {type(pattern)}" + ) + # Handle transposed case + if not pattern.threads_masks.is_contiguous(): + return _Sparsify24LikeFunc.apply(x.t(), pattern.t(), gradient, backend).t() + return _Sparsify24LikeFunc.apply(x, pattern, gradient, backend) diff --git a/lib/python3.12/site-packages/xformers/ops/swiglu_op.py b/lib/python3.12/site-packages/xformers/ops/swiglu_op.py new file mode 100644 index 0000000000000000000000000000000000000000..5df2967e1aa7e4c72ed36a205a6c55b879034296 --- /dev/null +++ b/lib/python3.12/site-packages/xformers/ops/swiglu_op.py @@ -0,0 +1,552 @@ +# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved. +# +# This source code is licensed under the BSD license found in the +# LICENSE file in the root directory of this source tree. + +from dataclasses import dataclass +from typing import Dict, Optional, Sequence, Tuple, Union + +import torch +import torch.nn.functional as F +from torch import nn +from torch.amp import custom_bwd, custom_fwd + +from .common import BaseOperator, get_xformers_operator, register_operator +from .unbind import stack_or_none, unbind + +if torch.version.hip: + + @torch.library.register_kernel("xformers::dual_gemm_silu_identity_mul", "cuda") # type: ignore + def dual_gemm_silu_identity_mul_cuda( + x: torch.Tensor, + w1: torch.Tensor, + b1: Optional[torch.Tensor], + w2: torch.Tensor, + b2: Optional[torch.Tensor], + ) -> Tuple[torch.Tensor, torch.Tensor, torch.Tensor]: + x1 = x @ w1.T + if b1 is not None: + x1 += b1 + + x2 = x @ w2.T + if b2 is not None: + x2 += b2 + + x4 = F.silu(x1) * x2 + return x1, x2, x4 + + +@register_operator +class DualGemmSiluOp(BaseOperator): + OPERATOR = get_xformers_operator("dual_gemm_silu_identity_mul") + OPERATOR_CATEGORY = "swiglu" + NAME = "dual_gemm_silu" + + +@register_operator +class GemmFusedSumOp(BaseOperator): + OPERATOR = get_xformers_operator("gemm_fused_operand_sum") + OPERATOR_CATEGORY = "swiglu" + NAME = "gemm_fused_operand_sum" + + +class _SwiGLUDecomposedFunc(torch.autograd.Function): + """ + This is just an example implementation with all + operations explicited. This implementation is worse + than pytorch, because pytorch is able to fuse some operations + (eg the linear forward ...) that are decomposed here. + + The time measurements were made on the ViT-Giant setting: + - A100/f16 + - input: [4440, 1536] + - hidden: [4440, 4096] + """ + + NAME = "decomposed" + FORCE_BW_F32 = False + + def _silu_backward(dy, x): + # https://github.com/pytorch/pytorch/blob/563b065f5a4b4055fa6b025c2514b566d5fd9439/aten/src/ATen/native/Activation.cpp#L483 + sigm = 1 / (1 + torch.exp(-x.float())) + return (dy.float() * sigm * (1 + x.float() * (1 - sigm))).to(x.dtype) + + # 952us + @classmethod + def forward(cls, ctx, x, w1, b1, w2, b2, w3, b3): + x1 = x @ w1.transpose(-2, -1) + b1 # 275us + x2 = x @ w2.transpose(-2, -1) + b2 # 275us + x3 = F.silu(x1) # 62us + x4 = x3 * x2 # 90us + x5 = x4 @ w3.transpose(-2, -1) + b3 # 250us + + ctx.save_for_backward(x, w1, b1, w2, b2, w3, b3, x1, x2, x3, x4, x5) + return x5 + + # 1900us + @classmethod + def backward(cls, ctx, dx5): + saved_tensors = ctx.saved_tensors + if cls.FORCE_BW_F32: + dx5 = dx5.float() + saved_tensors = [t.float() for t in ctx.saved_tensors] + x, w1, b1, w2, b2, w3, b3, x1, x2, x3, x4, x5 = saved_tensors + dx4 = dx5 @ w3 # 255us (nn) + dw3 = dx5.transpose(-2, -1) @ x4 # 247us (nt) + db3 = dx5.sum(0) # 25us + dx3 = dx4 * x2 # 88us + dx2 = dx4 * x3 # 88us + dx1 = cls._silu_backward(dx3, x1) # 90us + dx = dx2 @ w2 # 260us (nn) + dw2 = dx2.transpose(-2, -1) @ x # 245us (nt) + db2 = dx2.sum(0) # 50us + dx += dx1 @ w1 # 260us (nn) + dw1 = dx1.transpose(-2, -1) @ x # 245us (nt) + db1 = dx1.sum(0) # 50us + return (dx, dw1, db1, dw2, db2, dw3, db3) + + +class _SwiGLUFusedFunc(torch.autograd.Function): + NAME = "fused.py" + + @classmethod + @custom_fwd(device_type="cuda") + def forward(cls, ctx, x, w1, b1, w2, b2, w3, b3): + x1, x2, x4 = DualGemmSiluOp.OPERATOR(x, w1, b1, w2, b2) + + x5 = F.linear(x4, w3, b3) + ctx.save_for_backward(x, w1, w2, w3, x1, x2) + ctx.bias = [b1 is not None, b2 is not None, b3 is not None] + return x5 + + @staticmethod + def _linear_bw( + dy: torch.Tensor, x: torch.Tensor, bias: bool + ) -> Tuple[torch.Tensor, Optional[torch.Tensor]]: + if not bias: + return (dy.transpose(-2, -1) @ x), None + dw, db = GemmFusedSumOp.OPERATOR(dy.transpose(-2, -1), x) + return dw, db + + @classmethod + @custom_bwd(device_type="cuda") + def backward(cls, ctx, dx5): + x, w1, w2, w3, x1, x2 = ctx.saved_tensors + w1w2 = stack_or_none([w1, w2], dim=0) + + dx4 = dx5 @ w3 # 255us (nn) + dx1dx2, x4 = torch.ops.xformers.silu_bw_fused(x1, x2, dx4) + dx1, dx2 = dx1dx2.unbind(1) + del x1, x2, dx4 + + dw3, db3 = cls._linear_bw(dx5, x4, bias=ctx.bias[2]) + del x4, dx5 + if w1w2 is not None: + assert dx1dx2.is_contiguous() + assert w1w2.is_contiguous() + w1w2 = w1w2.view([w1.shape[0] * 2, w1.shape[1]]) + dx = dx1dx2.view([dx1.shape[0], 2 * dx1.shape[1]]) @ w1w2 + + # backward of linear1 + linear2 - packed + dw1dw2 = dx1dx2.view([dx1.shape[0], 2 * dx1.shape[1]]).transpose(-2, -1) @ x + dw1dw2, db1db2 = cls._linear_bw( + dx1dx2.view([dx1.shape[0], 2 * dx1.shape[1]]), x, bias=ctx.bias[0] + ) + dw1, dw2 = dw1dw2.view([2, *w1.shape]).unbind(0) + if ctx.bias[0]: + db1db2 = db1db2.view([2, dx1.shape[1]]) + db1, db2 = torch.unbind(db1db2, dim=0) + else: + db1 = db2 = None + else: + dx = dx2 @ w2 # 260us (nn) + torch.addmm( + dx, dx1, w1.to(dx1.dtype), beta=1, alpha=1, out=dx + ) # dx += dx1 @ w1 + dw2, db2 = cls._linear_bw(dx2, x, bias=ctx.bias[1]) + dw1, db1 = cls._linear_bw(dx1, x, bias=ctx.bias[0]) + return (dx, dw1, db1, dw2, db2, dw3, db3) + + +class SwiGLUOp: + """Base class for any swiglu operator in :attr:`xformers.ops.swiglu`""" + + def __init__(self, op, packed_weights: bool, name: str, constraints): + self.NAME = name + self.PACKED_WEIGHTS = packed_weights + self.op = op + self.constraints = constraints + + def supports(self, op: "SwiGLUOpDispatch") -> bool: + if self.PACKED_WEIGHTS and not op.packed_weights: + return False + return all(c(op) for c in self.constraints) + + def __call__(self, *args: Optional[torch.Tensor]) -> torch.Tensor: + raise NotImplementedError() + + def __str__(self) -> str: + return f"SwiGLUOp:{self.NAME}" + + +class _ForwardToPythonAutogradFunc(SwiGLUOp): + def supports(self, op: "SwiGLUOpDispatch") -> bool: + return super().supports(op) + + def __call__(self, *args, **kwargs): + return self.op.apply(*args, **kwargs) + + +class _ForwardToFunc(SwiGLUOp): + def __call__(self, *args, **kwargs): + return self.op(*args, **kwargs) + + def info(self): + if self.op.__name__ == "no_such_operator": + return "not built" + return "available" + + +def _eager_functional_swiglu( + x: torch.Tensor, + w1: torch.Tensor, + b1: Optional[torch.Tensor], + w2: torch.Tensor, + b2: Optional[torch.Tensor], + w3: torch.Tensor, + b3: Optional[torch.Tensor], +) -> torch.Tensor: + x1 = F.linear(x, w1, b1) + x2 = F.linear(x, w2, b2) + hidden = F.silu(x1) * x2 + return F.linear(hidden, w3, b3) + + +@dataclass +class SwiGLUOpDispatch: + """Dispatcher to automatically select + the best operator in :attr:`xformers.ops.swiglu` + """ + + device: Union[torch.device, str] + dtype: torch.dtype + dtype_autocast_gpu: Optional[torch.dtype] + packed_weights: bool + bias_enabled: bool + + @property + def op(self) -> SwiGLUOp: + """Computes the best operator + + Returns: + SwiGLUOp: The best operator for the configuration + """ + priorities: Sequence[SwiGLUOp] = [ + SwiGLUPackedFusedOp, + SwiGLUFusedOp, + ] + for op in priorities: + if op.supports(self): + return op + return SwiGLUEagerOp + + @staticmethod + def from_arguments( + x: torch.Tensor, + w1: torch.Tensor, + b1: Optional[torch.Tensor], + w2: torch.Tensor, + b2: Optional[torch.Tensor], + w3: torch.Tensor, + b3: Optional[torch.Tensor], + ) -> "SwiGLUOpDispatch": + return SwiGLUOpDispatch( + device=x.device, + dtype=x.dtype, + packed_weights=stack_or_none((w1, w2), dim=0) is not None, + dtype_autocast_gpu=torch.get_autocast_gpu_dtype() + if torch.is_autocast_enabled() + else w1.dtype, + bias_enabled=b1 is not None and b2 is not None and b3 is not None, + ) + + +def _only_sm80(op: SwiGLUOpDispatch) -> bool: + device_type = op.device if isinstance(op.device, str) else op.device.type + return device_type == "cuda" and torch.cuda.get_device_capability(op.device)[0] >= 8 + + +def _only_half_or_autocast(op: SwiGLUOpDispatch) -> bool: + HALF_DTYPES = [torch.half, torch.bfloat16] + return op.dtype in HALF_DTYPES or ( + op.dtype_autocast_gpu is not None and op.dtype_autocast_gpu in HALF_DTYPES + ) + + +def _bias_enabled(op: SwiGLUOpDispatch) -> bool: + return op.bias_enabled + + +_SwiGLUDecomposedOp = _ForwardToPythonAutogradFunc( + _SwiGLUDecomposedFunc, False, "decomposed", constraints=[_bias_enabled] +) +SwiGLUFusedOp = _ForwardToPythonAutogradFunc( + _SwiGLUFusedFunc, False, "fused", constraints=[_only_sm80, _only_half_or_autocast] +) +SwiGLUPackedFusedOp = _ForwardToFunc( + get_xformers_operator("swiglu_packedw"), + True, + "fused.p.cpp", + constraints=[_only_sm80, _only_half_or_autocast], +) +SwiGLUEagerOp = _ForwardToFunc( + _eager_functional_swiglu, + False, + "eager", + constraints=[], +) + + +def _info() -> Dict[str, str]: + return {op.NAME: op.info() for op in [SwiGLUPackedFusedOp]} + + +def swiglu( + x: torch.Tensor, + w1: torch.Tensor, + b1: Optional[torch.Tensor], + w2: torch.Tensor, + b2: Optional[torch.Tensor], + w3: torch.Tensor, + b3: Optional[torch.Tensor], + *, + op: Optional[SwiGLUOp] = None, +) -> torch.Tensor: + """ + Computes a SwiGLU block given the weights/bias of the 3 + linear layers. + + - It is recommended to keep ``op=None`` so the best implementation \ + available for the inputs will be used. + + + :Equivalent pytorch code: + + .. code-block:: python + + x1 = F.linear(x, w1, b1) + x2 = F.linear(x, w2, b2) + hidden = F.silu(x1) * x2 + return F.linear(hidden, w3, b3) + + :Packing weights: + + To allow faster implementations, it's recommended to have w1/w2 come from the same storage, as in: + .. code-block:: python + + w1, w2 = xformers.ops.unbind(w12, 0) + + :Supported hardware: + + This operator is only optimized on A100+ on ``torch.half`` or ``torch.bfloat16`` \ + (autocast is supported), and will fallback to a functional pytorch \ + implementation otherwise. + """ + + batch_shape = x.shape[:-1] + x = x.reshape([-1, x.shape[-1]]) + if w1.ndim != 2 or w1.shape != w2.shape: + raise ValueError(f"Invalid shapes for w1: {w1.shape} / w2: {w2.shape}") + if b1 is not None: + if b1.ndim != 1 or b1.shape[0] != w1.shape[0]: + raise ValueError(f"Invalid shapes for b1: {b1.shape}") + if b2 is not None: + if b2.ndim != 1 or b2.shape[0] != w2.shape[0]: + raise ValueError(f"Invalid shapes for b2: {b2.shape}") + if w3.ndim != 2 or w3.shape[1] != w2.shape[0]: + raise ValueError(f"Invalid shape for w3: {w3.shape}") + if b3 is not None: + if b3.ndim != 1 or b3.shape[0] != w3.shape[0]: + raise ValueError(f"Invalid shapes for w3: {w3.shape} / b3: {b3.shape}") + + if op is None: + op = SwiGLUOpDispatch.from_arguments(x, w1, b1, w2, b2, w3, b3).op + + if not op.PACKED_WEIGHTS: + return op(x, w1, b1, w2, b2, w3, b3).reshape([*batch_shape, -1]) + w1w2 = stack_or_none((w1, w2), dim=0) + if b1 is not None and b2 is not None: + b1b2: Optional[torch.Tensor] = stack_or_none((b1, b2), dim=0) + if b1b2 is None: + raise NotImplementedError("b1/b2 needs to be properly packed") + else: + b1b2 = None + assert b1 is None and b2 is None + + if w1w2 is None: + raise NotImplementedError("w1/w2 needs to be properly packed") + return op(x, w1w2, b1b2, w3, b3).reshape([*batch_shape, -1]) + + +def swiglu_packed( + x: torch.Tensor, + w1w2: torch.Tensor, + b1b2: Optional[torch.Tensor], + w3: torch.Tensor, + b3: Optional[torch.Tensor], + *, + op: SwiGLUOp, +) -> torch.Tensor: + """ + Computes a SwiGLU block given the weights/bias of the 3 + linear layers. + + :Equivalent pytorch code: + + .. code-block:: python + + x1 = F.linear(x, w1, b1) + x2 = F.linear(x, w2, b2) + hidden = F.silu(x1) * x2 + return F.linear(hidden, w3, b3) + + :Supported hardware: + + This operator is only optimized on A100+ on ``torch.half`` or ``torch.bfloat16`` \ + (autocast is supported), and will fallback to a functional pytorch \ + implementation otherwise. + """ + batch_shape = x.shape[:-1] + x = x.reshape([-1, x.shape[-1]]) + + if b3 is not None: + if b3.ndim != 1 or b3.shape[0] != w3.shape[0]: + raise ValueError(f"Invalid shapes for w3: {w3.shape} / b3: {b3.shape}") + + assert op.PACKED_WEIGHTS, "Not implemented PACKED_WEIGHTS" + + return op(x, w1w2, b1b2, w3, b3).reshape([*batch_shape, -1]) + + +class SwiGLU(nn.Module): + """ + A Module that encapsulates the call to :attr:`xformers.ops.swiglu`, + and holds the weights for the 3 linear layers + """ + + def __init__( + self, + in_features: int, + hidden_features: int, + out_features: Optional[int] = None, + bias: bool = True, + *, + _pack_weights: bool = True, + ) -> None: + """Create a SwiGLU module + + Args: + in_features (int): Number of features of the input + hidden_features (int): Number of hidden features + out_features (Optional[int], optional): Number of features of the input. Defaults to None. + bias (bool, optional): Whether linear layers also include a bias. Defaults to True. + """ + super().__init__() + out_features = out_features or in_features + hidden_features = hidden_features or in_features + + self.w12: Optional[nn.Linear] + if _pack_weights: + self.w12 = nn.Linear(in_features, 2 * hidden_features, bias=bias) + else: + self.w12 = None + self.w1 = nn.Linear(in_features, hidden_features, bias=bias) + self.w2 = nn.Linear(in_features, hidden_features, bias=bias) + self.w3 = nn.Linear(hidden_features, out_features, bias=bias) + + self.hidden_features = hidden_features + self.out_features = out_features + self.in_features = in_features + self.op: Optional[SwiGLUOp] = None + + def forward(self, x: torch.Tensor) -> torch.Tensor: + """Computes :attr:`swiglu` with the module's weights + + Args: + x (torch.Tensor): A Tensor of shape ``[..., in_features]`` + + Returns: + torch.Tensor: A Tensor of shape ``[..., out_features]`` + """ + if self.w12 is not None: + if self.op is not None: + assert ( + self.op.PACKED_WEIGHTS + ), "_pack_weights and self.op.PACKED_WEIGHTS should match" + return swiglu_packed(x, *self._packed_ordered_params(), op=self.op) + + return swiglu(x, *self._ordered_params(), op=self.op) + + def _ordered_params( + self, + ) -> Tuple[ + torch.Tensor, + Optional[torch.Tensor], + torch.Tensor, + Optional[torch.Tensor], + torch.Tensor, + Optional[torch.Tensor], + ]: + """Used for testing - returns ordered arguments for operators""" + b1: Optional[torch.Tensor] + b2: Optional[torch.Tensor] + if self.w12 is not None: + w1w2 = self.w12.weight + b1b2 = self.w12.bias + w1, w2 = unbind( + w1w2.view([2, w1w2.shape[0] // 2, w1w2.shape[1]]), + dim=0, + ) + if b1b2 is not None: + b1, b2 = unbind(b1b2.view([2, b1b2.shape[0] // 2]), dim=0) + else: + b1, b2 = None, None + else: + w1, w2 = self.w1.weight, self.w2.weight + b1, b2 = self.w1.bias, self.w2.bias + + return ( + w1, + b1, + w2, + b2, + self.w3.weight, + self.w3.bias, + ) + + def _packed_ordered_params( + self, + ) -> Tuple[ + torch.Tensor, + Optional[torch.Tensor], + torch.Tensor, + Optional[torch.Tensor], + ]: + assert self.w12 is not None, "Packed weights are only available when using w12" + + """Used for testing - returns ordered arguments for packed operators""" + w1w2 = self.w12.weight + b1b2_param = self.w12.bias + + w1w2 = w1w2.view([2, w1w2.shape[0] // 2, w1w2.shape[1]]) + + b1b2: Optional[torch.Tensor] = None + if b1b2_param is not None: + b1b2 = b1b2_param.view([2, b1b2_param.shape[0] // 2]) + + return ( + w1w2, + b1b2, + self.w3.weight, + self.w3.bias, + ) diff --git a/lib/python3.12/site-packages/xformers/ops/unbind.py b/lib/python3.12/site-packages/xformers/ops/unbind.py new file mode 100644 index 0000000000000000000000000000000000000000..4e22ae0574c7d785c9137677181a249fdaa489aa --- /dev/null +++ b/lib/python3.12/site-packages/xformers/ops/unbind.py @@ -0,0 +1,129 @@ +# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved. +# +# This source code is licensed under the BSD license found in the +# LICENSE file in the root directory of this source tree. + +from typing import List, Optional, Sequence, Tuple, Union + +import torch + +from .common import _get_storage_base + + +def get_stack_strides( + tensors: Sequence[torch.Tensor], dim: int +) -> Optional[Tuple[Union[int, torch.SymInt], ...]]: + """ + If the tensors are already stacked on dimension :code:`dim`, \ + returns the strides of the stacked tensors. \ + Otherwise returns :code:`None`. + """ + if len(tensors) <= 1 or dim > tensors[0].ndim: + return None + + final_stride = [] + for i in range(tensors[0].ndim + 1): + if i == dim: + # PyTorch 2.5 messed up the type annotations for SymInt, but 2.6 will fix it + # https://github.com/pytorch/pytorch/issues/138478 + final_stride.append( + tensors[1].storage_offset() - tensors[0].storage_offset() # type: ignore[operator] + ) + continue + if i > dim: + i -= 1 + final_stride.append(tensors[0].stride(i)) + + storage_data_ptr: Optional[int] = None + for i, x in enumerate(tensors[1:]): + # Sanity checks + if x.shape != tensors[0].shape: + return None + if x.stride() != tensors[0].stride(): + return None + # PyTorch 2.5 messed up the type annotations for SymInt, but 2.6 will fix it + # https://github.com/pytorch/pytorch/issues/138478 + if ( + x.storage_offset() + != tensors[0].storage_offset() + (i + 1) * final_stride[dim] # type: ignore[operator] + ): + return None + if storage_data_ptr is None: + storage_data_ptr = _get_storage_base(tensors[0]) + # Actual storage check + if _get_storage_base(x) != storage_data_ptr: + return None + return tuple(final_stride) + + +def _stack_or_none_fw( + tensors: Union[Tuple[torch.Tensor, ...], List[torch.Tensor]], + dim: int, +) -> Optional[torch.Tensor]: + strides = get_stack_strides(tensors, dim) + if strides is not None: + input_shape = list(tensors[0].shape) + input_shape.insert(dim, len(tensors)) + return tensors[0].as_strided(input_shape, strides) + return None + + +def _stack_fw( + tensors: Union[Tuple[torch.Tensor, ...], List[torch.Tensor]], + dim: int, +) -> torch.Tensor: + out = _stack_or_none_fw(tensors, dim) + if out is None: + out = torch.stack(tensors, dim=dim) + return out + + +class _Unbind(torch.autograd.Function): + """ + See function `unbind` + """ + + @staticmethod + # type: ignore + def forward(ctx, x: torch.Tensor, dim: int): + ctx.dim = dim + return x.unbind(dim) + + @classmethod + # type: ignore + def backward(cls, ctx, *tensors: torch.Tensor): + return _stack_fw(tensors, ctx.dim), None + + +class _StackOrNone(torch.autograd.Function): + """ + See function `stack_or_none` + """ + + @staticmethod + # type: ignore + def forward(ctx, dim: int, *tensors: torch.Tensor): + ctx.dim = dim + return _stack_or_none_fw(tensors, dim=dim) + + @classmethod + # type: ignore + def backward(cls, ctx, grad: torch.Tensor): + return (None, *grad.unbind(dim=ctx.dim)) + + +def unbind(x: torch.Tensor, dim: int) -> Tuple[torch.Tensor, ...]: + """ + Does exactly the same as :attr:`torch.unbind` for the forward. + In backward, avoids a :attr:`torch.cat` if the gradients + are already multiple views of the same storage + """ + return _Unbind.apply(x, dim) + + +def stack_or_none(tensors: Sequence[torch.Tensor], dim: int) -> torch.Tensor: + """ + Does exactly the same as :attr:`torch.stack` if the tensors can be concatenated + without any memory operation. Otherwise returns None. + """ + return _StackOrNone.apply(dim, *tensors) diff --git a/lib/python3.12/site-packages/xformers/profiler/__init__.py b/lib/python3.12/site-packages/xformers/profiler/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..fe9d0a492624968258c8d5b9180658e3b2fb113b --- /dev/null +++ b/lib/python3.12/site-packages/xformers/profiler/__init__.py @@ -0,0 +1,15 @@ +# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved. +# +# This source code is licensed under the BSD license found in the +# LICENSE file in the root directory of this source tree. + +from .api import profile, step +from .profiler import MemSnapshotsProfiler, NsightProfiler, PyTorchProfiler + +__all__ = [ + "profile", + "step", + "MemSnapshotsProfiler", + "PyTorchProfiler", + "NsightProfiler", +] diff --git a/lib/python3.12/site-packages/xformers/profiler/__pycache__/__init__.cpython-312.pyc b/lib/python3.12/site-packages/xformers/profiler/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..89c444d54a2ff227f1b56c05bb019584c09c652b Binary files /dev/null and b/lib/python3.12/site-packages/xformers/profiler/__pycache__/__init__.cpython-312.pyc differ diff --git a/lib/python3.12/site-packages/xformers/profiler/__pycache__/api.cpython-312.pyc b/lib/python3.12/site-packages/xformers/profiler/__pycache__/api.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b45c5dbfc47d84a665071fd6fcd7b1fabed59d03 Binary files /dev/null and b/lib/python3.12/site-packages/xformers/profiler/__pycache__/api.cpython-312.pyc differ diff --git a/lib/python3.12/site-packages/xformers/profiler/__pycache__/device_limits.cpython-312.pyc b/lib/python3.12/site-packages/xformers/profiler/__pycache__/device_limits.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f3f93a903d6889d2fecf59a0e43c907b672e5c40 Binary files /dev/null and b/lib/python3.12/site-packages/xformers/profiler/__pycache__/device_limits.cpython-312.pyc differ diff --git a/lib/python3.12/site-packages/xformers/profiler/__pycache__/find_slowest.cpython-312.pyc b/lib/python3.12/site-packages/xformers/profiler/__pycache__/find_slowest.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..fc97bd0aa7d22d15fba528309e1f4fd3b6fc6b4a Binary files /dev/null and b/lib/python3.12/site-packages/xformers/profiler/__pycache__/find_slowest.cpython-312.pyc differ diff --git a/lib/python3.12/site-packages/xformers/profiler/__pycache__/profile_analyzer.cpython-312.pyc b/lib/python3.12/site-packages/xformers/profiler/__pycache__/profile_analyzer.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c20e661f52e506ad267eb47c9c34b20a725cc264 Binary files /dev/null and b/lib/python3.12/site-packages/xformers/profiler/__pycache__/profile_analyzer.cpython-312.pyc differ diff --git a/lib/python3.12/site-packages/xformers/profiler/__pycache__/profiler.cpython-312.pyc b/lib/python3.12/site-packages/xformers/profiler/__pycache__/profiler.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d4e5b6cd5fbb8835782751f84b37fd30a320690d Binary files /dev/null and b/lib/python3.12/site-packages/xformers/profiler/__pycache__/profiler.cpython-312.pyc differ diff --git a/lib/python3.12/site-packages/xformers/profiler/__pycache__/profiler_dcgm.cpython-312.pyc b/lib/python3.12/site-packages/xformers/profiler/__pycache__/profiler_dcgm.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..fda7123d8dd4fa3144920380f6a00c88845f8288 Binary files /dev/null and b/lib/python3.12/site-packages/xformers/profiler/__pycache__/profiler_dcgm.cpython-312.pyc differ diff --git a/lib/python3.12/site-packages/xformers/profiler/__pycache__/profiler_dcgm_impl.cpython-312.pyc b/lib/python3.12/site-packages/xformers/profiler/__pycache__/profiler_dcgm_impl.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..0e43ba7bd3bff8380ec27c264090c84fed8c656d Binary files /dev/null and b/lib/python3.12/site-packages/xformers/profiler/__pycache__/profiler_dcgm_impl.cpython-312.pyc differ diff --git a/lib/python3.12/site-packages/xformers/profiler/api.py b/lib/python3.12/site-packages/xformers/profiler/api.py new file mode 100644 index 0000000000000000000000000000000000000000..02722dc4ac6f6d1db1121e0334a664881b9c70a2 --- /dev/null +++ b/lib/python3.12/site-packages/xformers/profiler/api.py @@ -0,0 +1,92 @@ +# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved. +# +# This source code is licensed under the BSD license found in the +# LICENSE file in the root directory of this source tree. + +from typing import Any, Optional, Sequence, Tuple + +import torch.nn as nn + +from .profiler import ( + MemSnapshotsProfiler, + NsightProfiler, + PyTorchProfiler, + PyTorchProfiler_CUDAOnly, + _Profiler, +) +from .profiler_dcgm import DCGMProfiler # noqa: F401 + +DEFAULT_SCHEDULE = ( + (MemSnapshotsProfiler, 0, 2), + (NsightProfiler, 4, 6), + (PyTorchProfiler, 6, 7), + (PyTorchProfiler_CUDAOnly, 7, 8), + # TODO: Found issues where this can take minutes to + # start, as it flushes previous values + # (DCGMProfiler, 9, 11), +) + + +def profile( + output_dir: str, + module: Optional[nn.Module] = None, + schedule: Sequence[Tuple[Any, int, int]] = DEFAULT_SCHEDULE, +): + """ + A pre-configured profiler that will run on the first ~20 steps of the training + It will provide multiple traces that can be exploited later. + Use it in a context manager around your training loop, and call `xformers.profiler.step` + before starting the next iteration. + + :Examples: + + .. code-block:: python + + import torch + import timm.models + import xformers.profiler + + dtype = torch.bfloat16 + device = "cuda" + model = timm.models.vit_large_patch16_224().to(device).to(dtype) + inp = torch.zeros([64, 3, 224, 224], device=device, dtype=dtype) + optim = torch.optim.Adam(model.parameters()) + + with xformers.profiler.profile( + output_dir="profile_data", + module=model, + schedule=[ + (MemSnapshotsProfiler, 0, 2), + (NsightProfiler, 4, 6), + (PyTorchProfiler, 6, 20), + ] + ): + for i in range(20): + model(inp).sum().backward() + optim.step() + optim.zero_grad() + xformers.profiler.step() + + # alternatively, use the profiler without context and with ``.start()`` / `.stop()` + # calls. + + xprofiler = xformers.profiler.profile(...) + xprofiler.start() + + for i in range(20): + model(inp).sum().backward() + optim.step() + optim.zero_grad() + xprofiler.step() + + xprofiler.stop() + """ + return _Profiler(output_dir=output_dir, schedule=schedule, module=module) + + +def step() -> None: + """See `xformers.profiler.profile`""" + # Silently return if no profiler is enabled + if _Profiler._CURRENT_PROFILER is None: + return + _Profiler._CURRENT_PROFILER.step() diff --git a/lib/python3.12/site-packages/xformers/profiler/device_limits.py b/lib/python3.12/site-packages/xformers/profiler/device_limits.py new file mode 100644 index 0000000000000000000000000000000000000000..7d35022303733889fb4280cfae1f2f493559d5a2 --- /dev/null +++ b/lib/python3.12/site-packages/xformers/profiler/device_limits.py @@ -0,0 +1,113 @@ +# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved. +# +# This source code is licensed under the BSD license found in the +# LICENSE file in the root directory of this source tree. + +import math +from dataclasses import dataclass, field +from typing import Mapping, Optional, Tuple + +import torch + + +@dataclass +class DeviceLimit: + name: str = "default" # pattern to match from `torch.cuda.get_device_name()` + source: str = "" + sm: Tuple[int, int] = (0, 0) + # bytes/s + gmem_bandwidth: float = math.inf + # dtype -> TFlop/s + gemm_tflops: Mapping[torch.dtype, float] = field(default_factory=dict) + + +# For f32, we assume we can use tf32 +DEVICE_LIMITS: Tuple[DeviceLimit, ...] = ( + DeviceLimit( + "H100", + "https://resources.nvidia.com/en-us-tensor-core/nvidia-tensor-core-gpu-datasheet", # noqa: E501 + sm=(9, 0), + gmem_bandwidth=3.35 * (1024**4), # NOTE: PCIe is 2 TB/s + gemm_tflops={ + torch.float64: 67, + # NOTE: NVIDIA gives all numbers "with 2:4 sparsity" + # but we want the full GEMM numbers + torch.float32: 989 // 2, + torch.float16: 1979 // 2, + torch.bfloat16: 1979 // 2, + torch.int8: 3958 // 2, + }, + ), + DeviceLimit( + "A100", + "https://www.nvidia.com/content/dam/en-zz/Solutions/Data-Center/a100/pdf/nvidia-a100-datasheet-us-nvidia-1758950-r4-web.pdf", # noqa: E501 + sm=(8, 0), + gmem_bandwidth=2 * (1024**4), # NOTE: PCIe is 1.5 TB/s + gemm_tflops={ + torch.float64: 19.5, + torch.float32: 156, + torch.float16: 312, + torch.bfloat16: 312, + torch.int8: 624, + }, + ), + DeviceLimit( + "A30", + "https://www.nvidia.com/content/dam/en-zz/Solutions/data-center/products/a30-gpu/pdf/a30-datasheet.pdf", + sm=(8, 0), + gmem_bandwidth=933 * (1024**3), + gemm_tflops={ + torch.float64: 10.3, + torch.float32: 82, + torch.float16: 165, + torch.bfloat16: 165, + torch.int8: 330, + }, + ), + DeviceLimit( + "T4", + "https://www.nvidia.com/content/dam/en-zz/Solutions/Data-Center/tesla-t4/t4-tensor-core-datasheet-951643.pdf", + sm=(7, 5), + gmem_bandwidth=300 * (1024**3), + gemm_tflops={ + torch.float32: 8.1, + torch.float16: 65, + torch.int8: 130, + }, + ), + # Assuming SXM2 + DeviceLimit( + "V100", + "https://images.nvidia.com/content/technologies/volta/pdf/tesla-volta-v100-datasheet-letter-fnl-web.pdf", + sm=(7, 0), + gmem_bandwidth=900 * (1024**3), + gemm_tflops={ + torch.float64: 7.8, + torch.float32: 15.7, + torch.float16: 125, + }, + ), + DeviceLimit( + "P100", + "https://images.nvidia.com/content/tesla/pdf/nvidia-tesla-p100-datasheet.pdf", + sm=(6, 0), + gmem_bandwidth=732 * (1024**3), + gemm_tflops={ + torch.float64: 5.3, + torch.float32: 10.6, + torch.float16: 21.2, + }, + ), +) + + +def get_device_limits(device) -> Optional[DeviceLimit]: + """Currently only implemented for GPUs""" + if device is not None and device.type == "cuda": + device_sm = torch.cuda.get_device_capability(device) + device_name = torch.cuda.get_device_name(device) + for lim in DEVICE_LIMITS: + if lim.sm == device_sm: + if lim.name in device_name: + return lim + return None diff --git a/lib/python3.12/site-packages/xformers/profiler/find_slowest.py b/lib/python3.12/site-packages/xformers/profiler/find_slowest.py new file mode 100644 index 0000000000000000000000000000000000000000..423e29c8a4bead81220b18a10fb0ba6c8ffa5ac6 --- /dev/null +++ b/lib/python3.12/site-packages/xformers/profiler/find_slowest.py @@ -0,0 +1,157 @@ +# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved. +# +# This source code is licensed under the BSD license found in the +# LICENSE file in the root directory of this source tree. + +import argparse +import concurrent.futures +import glob +import os +import subprocess +from shlex import quote +from typing import Dict, List + +import pandas as pd + + +def print_json_as_dataframe(json_list): + if not json_list: + print("Empty list") + return + + # Extract the headers from the keys of the first dictionary + headers = list(json_list[0].keys()) + + # Determine the width of each column + col_widths = {header: max(len(header), 10) for header in headers} + for row in json_list: + for header in headers: + col_widths[header] = max(col_widths[header], len(str(row[header]))) + + # Create the header row + header_row = " ".join(f"{header:<{col_widths[header]}}" for header in headers) + print(header_row) + print("-" * len(header_row)) + + # Create each data row + for row in json_list: + data_row = " ".join( + f"{str(row[header]):<{col_widths[header]}}" for header in headers + ) + print(data_row) + + +def compute_std_dev_of_event_durations_over_ranks(events, top=5): + grouped_sorted_events = list( + events.filter(items=["name", "log_name", "dur"]) + .groupby(["name", "log_name"]) + .sum() + .groupby(["name"]) + .std() + .sort_values(["dur"], ascending=False) + .iterrows() + ) + + return [ + {"name": idx, "std_dev": f"{row.dur / 1000:.2f} ms"} + for idx, row in grouped_sorted_events[:top] + ] + + +def sort_nccl_events( + nccl_events, top_k: int = 3, last_k: int = 3 +) -> List[Dict[str, str]]: + grouped_sorted_events = list( + nccl_events.filter(items=["log_name", "dur"]) + .groupby(["log_name"]) + .sum() + .sort_values(["dur"]) + .iterrows() + ) + + return [ + {"log_name": idx, "nccl_ms": f"{row.dur / 1000:.2f} ms"} + for idx, row in ( + grouped_sorted_events[:top_k] + grouped_sorted_events[-last_k:] + ) + ] + + +def parse_one_file(profile_trace_path): + jq_pipe = '.traceEvents[] | select(.cat == "kernel") | [.name, .dur] | @csv' + if profile_trace_path.endswith(".gz"): + cmd = ( + f"gunzip -c {quote(profile_trace_path)} | jq --raw-output {quote(jq_pipe)}" + ) + else: + cmd = f"jq --raw-output {quote(jq_pipe)} {quote(profile_trace_path)}" + + subp = subprocess.Popen( + cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.DEVNULL + ) + try: + kernel_events = pd.read_csv(subp.stdout, names=["name", "dur"]) + except Exception: + subp.terminate() + raise + finally: + assert subp.wait() == 0 + + kernel_events["log_name"] = os.path.basename(profile_trace_path) + + communication_kernels = kernel_events[kernel_events.name.str.startswith("nccl")] + computation_kernels = kernel_events[~(kernel_events.name.str.startswith("nccl"))] + + return communication_kernels, computation_kernels + + +def print_profiling_info(cuda_profile_dir: str): + cuda_profile_path_name = f"{cuda_profile_dir}/*trace.json.gz" + profile_files = glob.glob(cuda_profile_path_name) + + if len(profile_files) == 0: + cuda_profile_path_name = f"{cuda_profile_dir}/*.json" + profile_files = glob.glob(cuda_profile_path_name) + + if len(profile_files) == 0: + raise Exception( + f"Couldnt find any profiling trace in the specified directory: {cuda_profile_dir}" + ) + + # Extract detailed NCCL event durations for all logs + communication_kernels = [] + computation_kernels = [] + with concurrent.futures.ThreadPoolExecutor(max_workers=32) as executor: + for index, (comm_ks, comp_ks) in enumerate( + executor.map(parse_one_file, profile_files) + ): + print( + f"Processed file {index + 1}/{len(profile_files)}", end="\r", flush=True + ) + communication_kernels.append(comm_ks) + computation_kernels.append(comp_ks) + communication_kernels = pd.concat(communication_kernels) + computation_kernels = pd.concat(computation_kernels) + print() + + print("The longest and shortest communication_kernels:") + print_json_as_dataframe(sort_nccl_events(communication_kernels)) + print("\n\n") + + std_df = compute_std_dev_of_event_durations_over_ranks(communication_kernels) + print("The standard deviation of nccl kernels durations across ranks:") + print_json_as_dataframe(std_df) + print("\n\n") + + std_df = compute_std_dev_of_event_durations_over_ranks(computation_kernels) + print("The standard deviation of computation kernels durations across ranks:") + print_json_as_dataframe(std_df) + + +if __name__ == "__main__": + parser = argparse.ArgumentParser(description="Process CUDA profile directory.") + parser.add_argument("cuda_profile_dir", type=str, help="The CUDA profile directory") + + args = parser.parse_args() + + print_profiling_info(args.cuda_profile_dir) diff --git a/lib/python3.12/site-packages/xformers/profiler/profile_analyzer.py b/lib/python3.12/site-packages/xformers/profiler/profile_analyzer.py new file mode 100644 index 0000000000000000000000000000000000000000..baf4e5f4580402cedec70118f6988c7ac169f6d5 --- /dev/null +++ b/lib/python3.12/site-packages/xformers/profiler/profile_analyzer.py @@ -0,0 +1,235 @@ +# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved. +# +# This source code is licensed under the BSD license found in the +# LICENSE file in the root directory of this source tree. + +import math +from collections import defaultdict +from dataclasses import dataclass +from typing import Any, Dict, List, Optional, Sequence, cast + +import torch + + +class FakeKinetoEvent: + def __init__(self, e: torch._C._autograd._KinetoEvent) -> None: + for attr in dir(e): + if attr.startswith("_"): + continue + setattr(self, attr, getattr(e, attr)) + self._kineto_event = e + + +def _attention_flops(queries, values, causal: bool, fmt: str = "BHMK") -> int: + assert isinstance(causal, bool) + assert fmt in ["BMHK", "BHMK"] + if fmt == "BMHK": + queries, values = [[x[0], x[2], x[1], x[3]] for x in [queries, values]] + *B, N, K = queries + *B, Nv, Kv = values + if causal: # NOTE: Causal from bottom right + # non-causal part + flops = 2 * N * max(Nv - N, 0) * K + 2 * max(Nv - N, 0) * max(Nv - N, 0) * Kv + # causal part + flops += ( + 2 * min(N, Nv) * min(N, Nv) * K + 2 * min(N, Nv) * min(N, Nv) * Kv + ) // 2 + else: + flops = 2 * N * Nv * K + 2 * N * Nv * Kv + for b in B: + flops *= b + return int(flops) + + +def _get_arg_idx(op, *arg_names: str) -> int: + for i, arg in enumerate(op.default._schema.arguments): + if arg.name in arg_names: + return i + raise ValueError(f"No such argument {arg_names} found in {op.default._schema}") + + +def _replace_if_needed( + e: torch._C._autograd._KinetoEvent, +) -> torch._C._autograd._KinetoEvent: + """ + Adds a flops amount for operators that don't have this information in Kineto already + This mostly applies for the attention for now, as GEMMs are already calculated by Kineto + and other operations are negligible. + """ + if e.device_type().name != "CPU": + return e + op_name = e.name() + flops = None + + FMT_BMHK = dict(fmt="BMHK") + ATTN_OPS = { + getattr(lib, op).default.name(): (getattr(lib, op), is_bwd, kwargs) + for lib, op, is_bwd, kwargs in [ + (torch.ops.aten, "scaled_dot_product_attention", False, {}), + (torch.ops.xformers_flash, "flash_fwd", False, FMT_BMHK), + ( + torch.ops.xformers, + "efficient_attention_forward_cutlass", + False, + FMT_BMHK, + ), + (torch.ops.aten, "_efficient_attention_forward", False, FMT_BMHK), + (torch.ops.aten, "_scaled_dot_product_flash_attention_backward", True, {}), + ( + torch.ops.aten, + "_scaled_dot_product_efficient_attention_backward", + True, + {}, + ), + (torch.ops.xformers_flash, "flash_bwd", True, FMT_BMHK), + ( + torch.ops.xformers, + "efficient_attention_backward_cutlass", + True, + FMT_BMHK, + ), + (torch.ops.aten, "_efficient_attention_backward", True, FMT_BMHK), + (torch.ops.aten, "_scaled_dot_product_cudnn_attention_backward", True, {}), + ] + if hasattr(lib, op) + } + if op_name in ATTN_OPS.keys(): + op, is_bwd, kwargs = ATTN_OPS[op_name] + shapes = e.shapes() + concrete_inputs = e.concrete_inputs() + try: + is_causal = concrete_inputs[_get_arg_idx(op, "causal", "is_causal")] + except ValueError: + is_causal = concrete_inputs[_get_arg_idx(op, "custom_mask_type")] != 0 + flops = _attention_flops( + shapes[_get_arg_idx(op, "query")], + shapes[_get_arg_idx(op, "value")], + is_causal, + **kwargs, + ) + if is_bwd: + flops = flops * 5 // 2 + if flops is not None: + new_e = FakeKinetoEvent(e) + new_e.flops = lambda: flops # type: ignore + e = cast(torch._C._autograd._KinetoEvent, new_e) + return e + + +@dataclass +class AnalyzedTrace: + operations_per_dtype_fw: Dict[torch.dtype, float] + operations_per_dtype_bw: Dict[torch.dtype, float] + total_time_s: float + + def compute_num_ops( + self, dtype: torch.dtype, fw: bool = True, bw: bool = True + ) -> float: + ops = 0.0 + if fw: + ops += self.operations_per_dtype_fw.get(dtype, 0.0) + if bw: + ops += self.operations_per_dtype_bw.get(dtype, 0.0) + return ops + + def compute_hfu(self, hardware_flops: Dict[torch.dtype, float]) -> float: + hfu_seconds = 0.0 + for dtype, hw_flops in hardware_flops.items(): + hfu_seconds += self.compute_num_ops(dtype) / hw_flops + return hfu_seconds / self.total_time_s + + def compute_mfu(self, hardware_flops: Dict[torch.dtype, float]) -> float: + # Estimated by considering the bw flops should be exactly 2x the fw flops + # The reason MFU!=HFU is because of recomputation in the BW pass + hfu_seconds = 0.0 + for dtype, hw_flops in hardware_flops.items(): + hfu_seconds += ( + min( + 3 * self.compute_num_ops(dtype, bw=False), + self.compute_num_ops(dtype), + ) + / hw_flops + ) + return hfu_seconds / self.total_time_s + + @staticmethod + def _find_all_root_events_with_flops( + all_events: Sequence[torch._C._autograd._KinetoEvent], + ) -> Sequence[torch._C._autograd._KinetoEvent]: + # Filters-out non-dispatch ops + # Or operations without flop counted + all_ops_with_flops = [ + e + for e in all_events + if ( + e.device_type().name == "CPU" + and (e.dtypes() or e.shapes()) + and e.flops() > 0 + ) + ] + events_per_group: Dict[ + Any, List[torch._C._autograd._KinetoEvent] + ] = defaultdict(list) + for e in all_ops_with_flops: + events_per_group[(e.start_thread_id(), e.device_type())].append(e) + root_events: List[torch._C._autograd._KinetoEvent] = [] + for events in events_per_group.values(): + # We assume that 2 events are either non-overlapping, + # or one is contained entirely within the other + events.sort(key=lambda e: (e.start_ns(), -e.duration_ns())) + current_root: Optional[torch._C._autograd._KinetoEvent] = None + for e in events: + if ( + current_root is None + or e.start_ns() + > current_root.start_ns() + current_root.duration_ns() + ): + current_root = e + root_events.append(e) + return root_events + + @staticmethod + def from_profile( + events: Sequence[torch._C._autograd._KinetoEvent], + ) -> "AnalyzedTrace": + events = [_replace_if_needed(e) for e in events] + root_ops = AnalyzedTrace._find_all_root_events_with_flops(events) + + operations_per_dtype_fw: Dict[torch.dtype, float] = defaultdict(float) + operations_per_dtype_bw: Dict[torch.dtype, float] = defaultdict(float) + # We detect BW pass ops based on their thread id + all_bw_threads = {e.start_thread_id() for e in events if e.fwd_thread_id() > 0} + # Find total dt + ATEN_DTYPES = [ + # NOTE: A single torch.dtype per number of bits + # (eg so we map bf16 --> b16) + ("double", torch.float64), + ("float", torch.float), + ("c10::Half", torch.float16), + ("c10::BFloat16", torch.float16), + ("c10::Int8", torch.int8), + ] + begin_ns, end_ns = math.inf, 0 + for op in root_ops: + dtype = None + for aten_dtype, torch_dtype in ATEN_DTYPES: + if aten_dtype in op.dtypes(): + dtype = torch_dtype + break + if dtype is None: # ??? + continue + if op.start_thread_id() in all_bw_threads: + operations_per_dtype_bw[dtype] += op.flops() + else: + operations_per_dtype_fw[dtype] += op.flops() + for op in events: + if op.device_type().name != "CUDA": + continue + begin_ns = min(begin_ns, op.start_ns()) + end_ns = max(end_ns, op.start_ns() + op.duration_ns()) + + return AnalyzedTrace( + operations_per_dtype_fw=operations_per_dtype_fw, + operations_per_dtype_bw=operations_per_dtype_bw, + total_time_s=(end_ns - begin_ns) / (10**9), + ) diff --git a/lib/python3.12/site-packages/xformers/profiler/profiler.py b/lib/python3.12/site-packages/xformers/profiler/profiler.py new file mode 100644 index 0000000000000000000000000000000000000000..e50ab9284da1e7678109ac087e12e26118e40e20 --- /dev/null +++ b/lib/python3.12/site-packages/xformers/profiler/profiler.py @@ -0,0 +1,350 @@ +# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved. +# +# This source code is licensed under the BSD license found in the +# LICENSE file in the root directory of this source tree. + + +import logging +import os +import queue +import socket +import time +import weakref +from dataclasses import dataclass +from pathlib import Path +from typing import Any, Dict, List, Optional, Sequence, Tuple + +import torch.cuda.memory +import torch.cuda.nvtx +import torch.nn as nn +import torch.profiler + +from .device_limits import get_device_limits +from .profile_analyzer import AnalyzedTrace + +logger = logging.getLogger(__name__) + + +class NsightProfiler: + """Profiler that triggers start of NSight profiler. + + NOTE: you need to ensure that the script running this code actually is running with + ``nsys profile`` and also has a flag ``--capture-range=cudaProfilerApi`` so the + capturing is performed by this profiler during certain steps. + """ + + def __init__(self, main_profiler: "_Profiler") -> None: + self.main_profiler = main_profiler + # TODO figure out if there is a way to know if nsys is launched at this point + + def __enter__(self): + torch.cuda.profiler.start() + + def __exit__(self, exc_type, exc_val, exc_tb): + torch.cuda.profiler.stop() + + def step(self) -> None: + pass + + +class PyTorchProfiler: + """Profiler which relies on native Pytorch profiling. Current setting of the profiler + captures traces, memory footprint and other info that could be read via TensorBoard. + """ + + ACTIVITIES = [ + torch.profiler.ProfilerActivity.CPU, + torch.profiler.ProfilerActivity.CUDA, + ] + + def __init__(self, main_profiler: "_Profiler") -> None: + self.main_profiler = main_profiler + self.num_steps = 0 + self.pytorch_profiler = torch.profiler.profile( + on_trace_ready=self._on_trace, + profile_memory=True, + record_shapes=True, + with_stack=True, + with_flops=True, + activities=self.ACTIVITIES, + ) + + def _on_trace(self, prof: torch.profiler.profiler.profile) -> None: + activities_str = "_".join(a.name for a in self.ACTIVITIES) + dir_name = str( + self.main_profiler.output_dir + / f"profile_{activities_str}_{self.main_profiler.done_steps:06}" + ) + worker_name = self.main_profiler.worker_name + if worker_name == "": + worker_name = f"{socket.gethostname()}_{os.getpid()}" + os.makedirs(dir_name, exist_ok=True) + file_name = f"{worker_name}.{time.time_ns()}.pt.trace.json.gz" + prof.export_chrome_trace(os.path.join(dir_name, file_name)) + try: + self._analyze_trace(prof) + except Exception as exc: + self.main_profiler.summary.append(("TraceAnalysis", "Error")) + logger.warn("Exception analyzing kineto trace", exc_info=exc) + + def _analyze_trace(self, prof: torch.profiler.profiler.profile) -> None: + if prof.profiler is None or prof.profiler.kineto_results is None: + return + results = AnalyzedTrace.from_profile(prof.profiler.kineto_results.events()) + limits = get_device_limits(torch.device("cuda")) + hw_flops: Dict[torch.dtype, float] = {} + if limits is not None: + for dtype, tflops in limits.gemm_tflops.items(): + hw_flops[dtype] = tflops * (1000**4) + total_hfu = results.compute_hfu(hw_flops) + total_mfu = results.compute_mfu(hw_flops) + total_flop = sum( + results.compute_num_ops(dtype) + for dtype in results.operations_per_dtype_fw.keys() + ) + s = self.main_profiler.summary + s.append( + ("Step time (ms)", f"{int(results.total_time_s * 1000 / self.num_steps)}") + ) + s.append(("TFlop/step", f"{total_flop / (self.num_steps * 1000**4):0.1f}")) + s.append(("TFlops", f"{total_flop / (results.total_time_s * 1000**4):0.1f}")) + s.append(("HFU", f"{total_hfu:0.3f}")) + s.append(("MFU", f"{total_mfu:0.3f}")) + + def __enter__(self): + torch.cuda.synchronize() + self.pytorch_profiler.__enter__() + + def __exit__(self, exc_type, exc_val, exc_tb): + torch.cuda.synchronize() + self.pytorch_profiler.__exit__(exc_type, exc_val, exc_tb) + + def step(self) -> None: + self.pytorch_profiler.step() + self.num_steps += 1 + + +class PyTorchProfiler_CUDAOnly(PyTorchProfiler): + # This profiler does not profile the CPU-side of things + # so we expect it to have almost no overhead + ACTIVITIES = [torch.profiler.ProfilerActivity.CUDA] + + def _analyze_trace(self, prof: torch.profiler.profiler.profile) -> None: + # Can't analyze trace without CPU trace for operator shapes etc... + pass + + +class MemSnapshotsProfiler: + """Profiler that captures memory traces for allocation and deallocation of memory for + tensors. + """ + + def __init__(self, main_profiler: "_Profiler") -> None: + self.main_profiler = main_profiler + self.enabled = False + + @property + def _has_trace_plot(self) -> bool: + return hasattr(torch.cuda._memory_viz, "trace_plot") + + def __enter__(self): + if not self._has_trace_plot: + return + self.enabled = True + # TODO: This does not show the previous memory allocations + # We could at least have a placeholder with how much + # memory was allocated before + torch.cuda.memory._record_memory_history( + True, + # keep 100,000 alloc/free events from before the snapshot + trace_alloc_max_entries=100000, + # record stack information for the trace events + trace_alloc_record_context=True, + ) + + def __exit__(self, exc_type, exc_val, exc_tb): + if not self._has_trace_plot: + self.main_profiler.summary.append( + ("MemTrace", "(not available with your Pytorch version)") + ) + return + assert self.enabled + snapshot = torch.cuda.memory._snapshot() + torch.cuda.memory._record_memory_history(False) + # No data was recorded - avoids a `ValueError` in `trace_plot` + if all(len(t) == 0 for t in snapshot["device_traces"]): + self.main_profiler.summary.append(("MemTrace", "(no allocation recorded)")) + return + # Dump to disk + filename = self.main_profiler._create_output_filename("memory_trace_plot.html") + self.main_profiler.summary.append(("MemTrace", filename)) + with open(filename, "w+") as fd: + fd.write( + torch.cuda._memory_viz.trace_plot( + snapshot, device=None, plot_segments=False + ) + ) + + def step(self) -> None: + pass + + +@dataclass +class _ProfilerState: + cls: Any + iter_begin: int + iter_end: int + object: Any = None + + +class _Profiler: + _CURRENT_PROFILER = None + + def __init__( + self, + output_dir: str, + schedule: Sequence[Tuple[Any, int, int]], + module: Optional[nn.Module], + ) -> None: + self.check_schedule(schedule) + self.schedule = schedule + self.done_steps = 0 + self.output_dir = Path(output_dir).absolute() + self.output_dir.mkdir(exist_ok=True, parents=True) + self.worker_name = "" + if torch.distributed.is_initialized(): + self.worker_name = "{}_{}".format(socket.gethostname(), str(os.getpid())) + + self.module = weakref.ref(module if module is not None else nn.Module()) + self.init_schedule() + + def init_schedule(self, offset: int = 0) -> None: + self.profilers: List[_ProfilerState] = sorted( + [ + _ProfilerState(cls, begin + offset, end + offset) + for cls, begin, end in self.schedule + ], + key=lambda x: x.iter_begin, + ) + self.last_step = self.profilers[-1].iter_end if self.profilers else 0 + self.summary: List[Tuple[str, str]] = [] + + def check_schedule(self, schedule: Sequence[Tuple[Any, int, int]]) -> None: + if len(schedule) == 0: + logger.warning( + "You specified empty schedule for profiling. No data will be captured." + ) + + pq: Any = queue.PriorityQueue() + for cls, begin, end in schedule: + assert ( + begin >= 0 + ), f"Begin step of profiler must be non-negative, found: {begin}" + assert end > 0, f"End step of profiler must be positive, found: {end}" + assert ( + begin < end + ), f"Start must be before the end, found: begin={begin} and end={end}" + + pq.put((begin, end)) + + prev_end = -1 + for begin, end in pq.queue: + assert begin >= prev_end, ( + "There is some overlapping in profiler scheduling. Please do not" + + " overlap profilers by step as they may affect each other. Schedule:" + + f" {schedule}" + ) + prev_end = end + + def update_profilers_on_step(self) -> None: + for p in self.profilers: + if p.iter_begin <= self.done_steps and self.done_steps < p.iter_end: + if p.object is None: + o = p.cls(self) + logging.info(f"Starting {p.cls.__name__} profiler...") + o.__enter__() + p.object = o + else: + p.object.step() + else: + if p.object is not None: + o = p.object + p.object = None + logging.info(f"Shutting down {p.cls.__name__} profiler...") + # Make sure the profiler's `step` function is called + # $N times when we do $N steps with this profiler. + o.step() + o.__exit__(None, None, None) + + def _create_output_filename(self, filename: str) -> Path: + """ + Returns where to write a file with desired filename. + Handles the case where we are in distributed settings, or when + we need to output the same file multiple times (eg if a profiler + runs for several steps) + """ + if self.worker_name != "": + file = Path(filename) + folder = self.output_dir / file.stem + folder.mkdir(parents=True, exist_ok=True) + return folder / f"{self.done_steps:06}_{self.worker_name}{file.suffix}" + return self.output_dir / f"{self.done_steps:06}_{filename}" + + def start(self): + self.__enter__() + + def stop(self, exc_type=None, exc_val=None, exc_tb=None): + self.__exit__(exc_type, exc_val, exc_tb) + + def __enter__(self): + if _Profiler._CURRENT_PROFILER is not None: + raise ValueError("Only one xformers profiler can be active at a time") + _Profiler._CURRENT_PROFILER = self + self.update_profilers_on_step() + + return self + + def __exit__(self, exc_type, exc_val, exc_tb): + _Profiler._CURRENT_PROFILER = None + + for p in self.profilers: + if p.object is not None: + p.object.__exit__(exc_type, exc_val, exc_tb) + + def step(self) -> None: + """Signals the profiler that the next profiling step has started.""" + self.done_steps += 1 + + if self.done_steps <= self.last_step: + self.update_profilers_on_step() + if self.done_steps == self.last_step: + logger.info("xFormers profiler done. %s", self.format_summary()) + + # Check if we triggered a manual profile step + CHECK_TRIGGER_EVERY = 10 + if ( + self.done_steps > self.last_step + and (self.done_steps % CHECK_TRIGGER_EVERY) == 0 + ): + try: + (self.output_dir / "trigger").unlink() + ( + self.output_dir + / f"trigger.{self.done_steps + CHECK_TRIGGER_EVERY:09}" + ).write_text(self.worker_name) + except FileNotFoundError: + pass + step_trigger = self.output_dir / f"trigger.{self.done_steps:09}" + if step_trigger.exists(): + logger.info( + "xFormers profiler manually triggered at step %d", self.done_steps + ) + self.init_schedule(offset=self.done_steps + 1) + + def format_summary(self) -> str: + if len(self.summary) == 0: + return "" + pad_titles = max(len(title) for title, value in self.summary) + return "summary:\n" + "\n".join( + [f" {title.ljust(pad_titles)}: {value}" for title, value in self.summary] + ) diff --git a/lib/python3.12/site-packages/xformers/profiler/profiler_dcgm.py b/lib/python3.12/site-packages/xformers/profiler/profiler_dcgm.py new file mode 100644 index 0000000000000000000000000000000000000000..389cadd2ca13b8f102b22d35310bdfbebd64dbe5 --- /dev/null +++ b/lib/python3.12/site-packages/xformers/profiler/profiler_dcgm.py @@ -0,0 +1,45 @@ +# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved. +# +# This source code is licensed under the BSD license found in the +# LICENSE file in the root directory of this source tree. + + +import sys + +from .profiler import _Profiler, logger + +DCGM_PROFILER_AVAILABLE = False +try: + DCGM_PYTHON_PATH: str = "/usr/local/dcgm/bindings/python3" + sys.path.insert(0, DCGM_PYTHON_PATH) + from .profiler_dcgm_impl import DCGMProfiler + + DCGM_PROFILER_AVAILABLE = True +except ModuleNotFoundError: + + class DCGMProfiler: # type: ignore + """The dummy DCGM Profiler.""" + + def __init__( + self, + main_profiler: "_Profiler", + gpus_to_profile=None, + field_ids_to_profile=None, + updateFreq=None, + ) -> None: + pass + + def __enter__(self) -> None: + logger.warning( + f"Unable to find python bindings at {DCGM_PYTHON_PATH}. " + "No data will be captured." + ) + + def __exit__(self, exc_type, exc_val, exc_tb) -> None: + pass + + def step(self) -> None: + pass + + +del sys.path[0] diff --git a/lib/python3.12/site-packages/xformers/profiler/profiler_dcgm_impl.py b/lib/python3.12/site-packages/xformers/profiler/profiler_dcgm_impl.py new file mode 100644 index 0000000000000000000000000000000000000000..41bb32767dedef9975ff5b1826bd25f1aacb708e --- /dev/null +++ b/lib/python3.12/site-packages/xformers/profiler/profiler_dcgm_impl.py @@ -0,0 +1,216 @@ +# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved. +# +# This source code is licensed under the BSD license found in the +# LICENSE file in the root directory of this source tree. + + +from typing import List, Optional, Set, Tuple, Union + +import dcgm_fields +import torch +from dcgm_fields import DcgmFieldGetById +from dcgm_structs import DCGM_GROUP_EMPTY, DCGM_OPERATION_MODE_AUTO +from pydcgm import DcgmFieldGroup, DcgmGroup, DcgmHandle + +from .profiler import _Profiler, logger + + +class DCGMProfiler: + """Profiler that triggers start of DCGM profiler.""" + + def __init__( + self, + main_profiler: "_Profiler", + gpus_to_profile: Optional[Tuple[int, ...]] = None, + field_ids_to_profile=( + dcgm_fields.DCGM_FI_PROF_SM_ACTIVE, + dcgm_fields.DCGM_FI_PROF_SM_OCCUPANCY, + dcgm_fields.DCGM_FI_PROF_PIPE_TENSOR_ACTIVE, + dcgm_fields.DCGM_FI_PROF_DRAM_ACTIVE, + dcgm_fields.DCGM_FI_PROF_PCIE_TX_BYTES, + dcgm_fields.DCGM_FI_PROF_PCIE_RX_BYTES, + dcgm_fields.DCGM_FI_PROF_NVLINK_TX_BYTES, + dcgm_fields.DCGM_FI_PROF_NVLINK_RX_BYTES, + ), + updateFreq: int = 5000, # in microseconds + ) -> None: + """ + Args: + main_profiler: The main profiler object. + gpus_to_profile: A tuple of integers representing the GPUs to profile. If `None`, + then the "default" GPU is used. + field_ids_to_profile: + See https://github.com/NVIDIA/DCGM/blob/master/testing/python3/dcgm_fields.py#L436 + for a full list of available fields. Note that not all fields are profilable. + updateFreq: The interval of two consecutive updates of each field. Defaults to 5000 microseconds. + This is a good tradeoff between performance and accuracy. + An even smaller updateFreq is not supported well by A100. + If the step to profile takes more than 5000 microseconds, then a larger updateFreq could also be used. + """ + self.main_profiler = main_profiler + self.updateFreq = updateFreq + + self.dcgmHandle = DcgmHandle( + ipAddress="127.0.0.1", opMode=DCGM_OPERATION_MODE_AUTO + ) + + if gpus_to_profile is None: + default_gpu: int = torch.empty([], device="cuda").device.index + self.dcgmGroup = self.create_dcgm_group((default_gpu,)) + else: + self.dcgmGroup = self.create_dcgm_group(gpus_to_profile) + + self.dcgmFieldGroup = self.create_profiling_field_group(field_ids_to_profile) + + def create_dcgm_group( + self, gpus_to_profile: Union[Tuple[int], Tuple[int, ...]] + ) -> Optional[DcgmGroup]: + if self.dcgmHandle is None: + return None + + dcgmSystem = self.dcgmHandle.GetSystem() + supportedGPUs = dcgmSystem.discovery.GetAllSupportedGpuIds() + + valid_gpus_to_profile: List[int] = [ + gpu for gpu in gpus_to_profile if gpu in supportedGPUs + ] + if len(valid_gpus_to_profile) < 1: + logger.warning( + f"The provided GPUs are not supported on this system: " + f"provided {gpus_to_profile}, supported {supportedGPUs}. " + f"No data will be captured." + ) + return None + + dcgmGroup = DcgmGroup( + self.dcgmHandle, + groupName="DCGMProfiler", + groupType=DCGM_GROUP_EMPTY, + ) + + for gpu in valid_gpus_to_profile: + dcgmGroup.AddGpu(gpu) + + return dcgmGroup + + def get_profilable_fields(self) -> Set[int]: + assert self.dcgmGroup is not None + + dcgmMetricGroups = self.dcgmGroup.profiling.GetSupportedMetricGroups() + profilableFieldIds = set() + for group_idx in range(dcgmMetricGroups.numMetricGroups): + metric_group = dcgmMetricGroups.metricGroups[group_idx] + for field_id in metric_group.fieldIds[: metric_group.numFieldIds]: + profilableFieldIds.add(field_id) + return profilableFieldIds + + def create_profiling_field_group( + self, + fieldIdsToProfile: Optional[Tuple[int, ...]], + ) -> Optional[DcgmFieldGroup]: + if self.dcgmGroup is None: + return None + + # Get all field ids that can be profiled. + profilableFieldIds = self.get_profilable_fields() + + # Check which of the provided field ids are valid and invalid. + if fieldIdsToProfile is None: + validFieldIds = list(profilableFieldIds) + invalidFieldIds = [] + else: + validFieldIds = [ + field_id + for field_id in fieldIdsToProfile + if field_id in profilableFieldIds + ] + invalidFieldIds = [ + field_id + for field_id in fieldIdsToProfile + if field_id not in profilableFieldIds + ] + + if not validFieldIds: + logger.warning( + "None of the provided field ids could be profiled.\n" + f" Provided: {fieldIdsToProfile}\n" + f" Supported: {profilableFieldIds}\n" + "No data will be captured." + ) + return None + + if invalidFieldIds: + logger.warning( + f"The following field ids cannot be profiled: {invalidFieldIds}. " + f"Profiling {validFieldIds} only." + ) + dcgmFieldGroup = DcgmFieldGroup( + self.dcgmHandle, name="Profiling", fieldIds=validFieldIds + ) + return dcgmFieldGroup + + def __enter__(self) -> None: + if self.dcgmGroup is not None and self.dcgmFieldGroup is not None: + self.dcgmGroup.samples.WatchFields( + self.dcgmFieldGroup, self.updateFreq, 3600, 0 + ) + + # Start collecting the profiling results run in background. + self.profiling_results = self.dcgmGroup.samples.GetAllSinceLastCall( + None, self.dcgmFieldGroup + ) + + # It is necessary to call GetAllSinceLastCall and EmptyValues twice + # to clear old data from previous profilings + # (otherwise the new profiling data is appended to the old data from previous profiling). + self.dcgmGroup.samples.GetAllSinceLastCall( + self.profiling_results, self.dcgmFieldGroup + ) + self.profiling_results.EmptyValues() + + self.dcgmGroup.samples.GetAllSinceLastCall( + self.profiling_results, self.dcgmFieldGroup + ) + self.profiling_results.EmptyValues() + + def __exit__(self, exc_type, exc_val, exc_tb) -> None: + if self.dcgmGroup is not None and self.dcgmFieldGroup is not None: + self.dcgmGroup.samples.UnwatchFields(self.dcgmFieldGroup) + + # Delete the group. + self.dcgmGroup.Delete() + del self.dcgmGroup + self.dcgmGroup = None + + # Disconnect from the hostengine by deleting the DcgmHandle object. + del self.dcgmHandle + self.dcgmHandle = None + + def step(self) -> None: + if self.dcgmGroup is not None and self.dcgmFieldGroup is not None: + # Collect the profiling results. + self.dcgmGroup.samples.GetAllSinceLastCall( + self.profiling_results, self.dcgmFieldGroup + ) + + # Save profiling results to log. + for gpu_id in self.profiling_results.values.keys(): + for field_id in self.profiling_results.values[gpu_id].keys(): + field_name = DcgmFieldGetById(field_id).tag + + field_avg_val = 0.0 + num_vals = 0 + for gpu_field_time in self.profiling_results.values[gpu_id][ + field_id + ]: + if gpu_field_time.value is not None: + field_avg_val = ( + field_avg_val * num_vals + gpu_field_time.value + ) / (num_vals + 1) + num_vals += 1 + self.main_profiler.summary.append( + (f"GPU {gpu_id}, {field_name}({field_id})", f"{field_avg_val}") + ) + + # Clear the profiling results to get ready for the next collection. + self.profiling_results.EmptyValues() diff --git a/lib/python3.12/site-packages/xformers/test.py b/lib/python3.12/site-packages/xformers/test.py new file mode 100644 index 0000000000000000000000000000000000000000..6677db08c0dcd87f7570a3249f61cc3eabe0532a --- /dev/null +++ b/lib/python3.12/site-packages/xformers/test.py @@ -0,0 +1,4 @@ +# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved. +# +# This source code is licensed under the BSD license found in the +# LICENSE file in the root directory of this source tree. diff --git a/lib/python3.12/site-packages/xformers/utils.py b/lib/python3.12/site-packages/xformers/utils.py new file mode 100644 index 0000000000000000000000000000000000000000..69515ece8f9cebeb02868156ab7c3e0abdb80489 --- /dev/null +++ b/lib/python3.12/site-packages/xformers/utils.py @@ -0,0 +1,145 @@ +# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved. +# +# This source code is licensed under the BSD license found in the +# LICENSE file in the root directory of this source tree. + + +import importlib +import os +import sys +from collections import namedtuple +from dataclasses import fields +from typing import Any, Callable, Dict, List, Optional + +import torch + +Item = namedtuple("Item", ["constructor", "config"]) + + +# credit: snippet used in ClassyVision (and probably other places) +def import_all_modules(root: str, base_module: str) -> List[str]: + modules: List[str] = [] + for file in os.listdir(root): + if file.endswith((".py", ".pyc")) and not file.startswith("_"): + module = file[: file.find(".py")] + if module not in sys.modules: + module_name = ".".join([base_module, module]) + importlib.import_module(module_name) + modules.append(module_name) + + return modules + + +def get_registry_decorator( + class_registry, name_registry, reference_class, default_config +) -> Callable[[str, Any], Callable[[Any], Any]]: + def register_item(name: str, config: Any = default_config): + """Registers a subclass. + + This decorator allows xFormers to instantiate a given subclass + from a configuration file, even if the class itself is not part of the + xFormers library.""" + + def register_cls(cls): + if name in class_registry: + raise ValueError("Cannot register duplicate item ({})".format(name)) + if not issubclass(cls, reference_class): + raise ValueError( + "Item ({}: {}) must extend the base class: {}".format( + name, cls.__name__, reference_class.__name__ + ) + ) + if cls.__name__ in name_registry: + raise ValueError( + "Cannot register item with duplicate class name ({})".format( + cls.__name__ + ) + ) + + class_registry[name] = Item(constructor=cls, config=config) + name_registry.add(cls.__name__) + return cls + + return register_cls + + return register_item + + +def generate_matching_config(superset: Dict[str, Any], config_class: Any) -> Any: + """Given a superset of the inputs and a reference config class, + return exactly the needed config""" + + # Extract the required fields + field_names = list(map(lambda x: x.name, fields(config_class))) + subset = {k: v for k, v in superset.items() if k in field_names} + + # The missing fields get Noned + for k in field_names: + if k not in subset.keys(): + subset[k] = None + + return config_class(**subset) + + +# from https://github.com/openai/triton/blob/95d9b7f4ae21710dc899e1de6a579b2136ea4f3d/python/triton/testing.py#L19 +def do_bench_cudagraph( + fn: Callable, rep: int = 20, grad_to_none: Optional[List[torch.Tensor]] = None +) -> float: + """ + Benchmark the runtime of the provided function. + Args: + fn: Function to benchmark + rep: Repetition time (in ms) + grad_to_none: Reset the gradient of the provided tensor to None + Returns: + Benchmarked runtime in ms + """ + if torch.cuda.current_stream() == torch.cuda.default_stream(): + raise RuntimeError( + "Cannot capture graph in default stream. " + "Please use side stream in benchmark code." + ) + # warmup + fn() + # step 1 - we estimate the amount of time the kernel call takes + # NOTE: this estimate isn't super accurate because the GPU isn't warmed up at this point + # but it is probably good enough + if grad_to_none is not None: + for x in grad_to_none: + x.detach_() + x.requires_grad_(True) + x.grad = None + g = torch.cuda.CUDAGraph() + with torch.cuda.graph(g): + fn() + torch.cuda.synchronize() + start_event = torch.cuda.Event(enable_timing=True) + end_event = torch.cuda.Event(enable_timing=True) + start_event.record() + g.replay() + end_event.record() + torch.cuda.synchronize() + estimate_ms = start_event.elapsed_time(end_event) + n_repeat = max(1, int(rep / estimate_ms)) + # step 2 - construct a cuda graph with `n_repeat` unrolled function calls to minimize + # host overhead + g = torch.cuda.CUDAGraph() + with torch.cuda.graph(g): + for i in range(n_repeat): + if grad_to_none is not None: + for x in grad_to_none: + x.grad = None + fn() + torch.cuda.synchronize() + # measure time and return + ret = [] + n_retries = 10 + for i in range(n_retries): + start_event = torch.cuda.Event(enable_timing=True) + end_event = torch.cuda.Event(enable_timing=True) + start_event.record() + g.replay() + end_event.record() + torch.cuda.synchronize() + ret += [start_event.elapsed_time(end_event) / n_repeat] + return torch.mean(torch.tensor(ret)).item() diff --git a/lib/python3.12/site-packages/xformers/version.py b/lib/python3.12/site-packages/xformers/version.py new file mode 100644 index 0000000000000000000000000000000000000000..0684a4d505b7f0a3b757da47b96bf7f7d8c7e70f --- /dev/null +++ b/lib/python3.12/site-packages/xformers/version.py @@ -0,0 +1,2 @@ +# noqa: C801 +__version__ = "0.0.29.post2"