-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy path_array_docstrings.toml
More file actions
151 lines (109 loc) · 4.05 KB
/
_array_docstrings.toml
File metadata and controls
151 lines (109 loc) · 4.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
[docstrings]
__pos__ = '''
Evaluates `+self_i` for each element of an array instance.
Returns:
Self: An array containing the evaluated result for each element.
The returned array must have the same data type as `self`.
See Also:
array_api_typing.Positive
'''
__neg__ = '''
Evaluates `-self_i` for each element of an array instance.
Returns:
Self: an array containing the evaluated result for each element in
`self`. The returned array must have a data type determined by Type
Promotion Rules.
See Also:
array_api_typing.Negative
'''
__add__ = '''
Calculates the sum for each element of an array instance with the respective
element of the array `other`.
Args:
other: addend array. Must be compatible with `self` (see
Broadcasting). Should have a numeric data type.
Returns:
Self: an array containing the element-wise sums. The returned array
must have a data type determined by Type Promotion Rules.
See Also:
array_api_typing.Add
'''
__sub__ = '''
Calculates the difference for each element of an array instance with the
respective element of the array other.
The result of `self_i - other_i` must be the same as `self_i +
(-other_i)` and must be governed by the same floating-point rules as
addition (see `CanArrayAdd`).
Args:
other: subtrahend array. Must be compatible with `self` (see
Broadcasting). Should have a numeric data type.
Returns:
Self: an array containing the element-wise differences. The returned
array must have a data type determined by Type Promotion Rules.
See Also:
array_api_typing.Subtract
'''
__mul__ = '''
Calculates the product for each element of an array instance with the
respective element of the array `other`.
Args:
other: multiplicand array. Must be compatible with `self` (see
Broadcasting). Should have a numeric data type.
Returns:
Self: an array containing the element-wise products. The returned
array must have a data type determined by Type Promotion Rules.
See Also:
array_api_typing.Multiply
'''
__truediv__ = '''
Evaluates `self_i / other_i` for each element of an array instance with the
respective element of the array `other`.
Args:
other: Must be compatible with `self` (see Broadcasting). Should have a
numeric data type.
Returns:
Self: an array containing the element-wise results. The returned array
should have a floating-point data type determined by Type Promotion
Rules.
See Also:
array_api_typing.TrueDiv
'''
__floordiv__ = '''
Evaluates `self_i // other_i` for each element of an array instance with the
respective element of the array `other`.
Args:
other: Must be compatible with `self` (see Broadcasting). Should have a
numeric data type.
Returns:
Self: an array containing the element-wise results. The returned array
must have a data type determined by Type Promotion Rules.
See Also:
array_api_typing.FloorDiv
'''
__mod__ = '''
Evaluates `self_i % other_i` for each element of an array instance with the
respective element of the array `other`.
Args:
other: Must be compatible with `self` (see Broadcasting). Should have a
numeric data type.
Returns:
Self: an array containing the element-wise results. Each element-wise
result must have the same sign as the respective element `other_i`.
The returned array must have a floating-point data type determined
by Type Promotion Rules.
See Also:
array_api_typing.Remainder
'''
__pow__ = '''
Calculates an implementation-dependent approximation of exponentiation by
raising each element (the base) of an array instance to the power of
`other_i` (the exponent), where `other_i` is the corresponding element of
the array `other`.
Args:
other: array whose elements correspond to the exponentiation exponent.
Must be compatible with `self` (see Broadcasting). Should have a
numeric data type.
Returns:
Self: an array containing the element-wise results. The returned array
must have a data type determined by Type Promotion Rules.
'''