Server IP : 192.64.118.117 / Your IP : 3.144.229.52 Web Server : LiteSpeed System : Linux premium56.web-hosting.com 4.18.0-513.24.1.lve.1.el8.x86_64 #1 SMP Thu May 9 15:10:09 UTC 2024 x86_64 User : thecgapy ( 1160) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /opt/cloudlinux/venv/lib64/python3.11/site-packages/numpy/typing/tests/data/pass/ |
Upload File : |
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)