Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
emath.pyi55 linesDownload Raw Back to reveal
1from typing import Any, assert_type
2
3import numpy as np
4import numpy.typing as npt
5
6AR_f8: npt.NDArray[np.float64]
7AR_c16: npt.NDArray[np.complex128]
8f8: np.float64
9c16: np.complex128
10
11assert_type(np.emath.sqrt(f8), Any)
12assert_type(np.emath.sqrt(AR_f8), npt.NDArray[Any])
13assert_type(np.emath.sqrt(c16), np.complexfloating)
14assert_type(np.emath.sqrt(AR_c16), npt.NDArray[np.complexfloating])
15
16assert_type(np.emath.log(f8), Any)
17assert_type(np.emath.log(AR_f8), npt.NDArray[Any])
18assert_type(np.emath.log(c16), np.complexfloating)
19assert_type(np.emath.log(AR_c16), npt.NDArray[np.complexfloating])
20
21assert_type(np.emath.log10(f8), Any)
22assert_type(np.emath.log10(AR_f8), npt.NDArray[Any])
23assert_type(np.emath.log10(c16), np.complexfloating)
24assert_type(np.emath.log10(AR_c16), npt.NDArray[np.complexfloating])
25
26assert_type(np.emath.log2(f8), Any)
27assert_type(np.emath.log2(AR_f8), npt.NDArray[Any])
28assert_type(np.emath.log2(c16), np.complexfloating)
29assert_type(np.emath.log2(AR_c16), npt.NDArray[np.complexfloating])
30
31assert_type(np.emath.logn(f8, 2), Any)
32assert_type(np.emath.logn(AR_f8, 4), npt.NDArray[Any])
33assert_type(np.emath.logn(f8, 1j), np.complexfloating)
34assert_type(np.emath.logn(AR_c16, 1.5), npt.NDArray[np.complexfloating])
35
36assert_type(np.emath.power(f8, 2), Any)
37assert_type(np.emath.power(AR_f8, 4), npt.NDArray[Any])
38assert_type(np.emath.power(f8, 2j), np.complexfloating)
39assert_type(np.emath.power(AR_c16, 1.5), npt.NDArray[np.complexfloating])
40
41assert_type(np.emath.arccos(f8), Any)
42assert_type(np.emath.arccos(AR_f8), npt.NDArray[Any])
43assert_type(np.emath.arccos(c16), np.complexfloating)
44assert_type(np.emath.arccos(AR_c16), npt.NDArray[np.complexfloating])
45
46assert_type(np.emath.arcsin(f8), Any)
47assert_type(np.emath.arcsin(AR_f8), npt.NDArray[Any])
48assert_type(np.emath.arcsin(c16), np.complexfloating)
49assert_type(np.emath.arcsin(AR_c16), npt.NDArray[np.complexfloating])
50
51assert_type(np.emath.arctanh(f8), Any)
52assert_type(np.emath.arctanh(AR_f8), npt.NDArray[Any])
53assert_type(np.emath.arctanh(c16), np.complexfloating)
54assert_type(np.emath.arctanh(AR_c16), npt.NDArray[np.complexfloating])
55 
codekingpro/portable-devtools · Team Ai