Skip to content

Commit 074cb5e

Browse files
committed
✨: remove redundant in-place operations
1 parent 56e4814 commit 074cb5e

File tree

2 files changed

+0
-128
lines changed

2 files changed

+0
-128
lines changed

src/array_api_typing/_array.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,25 +57,19 @@ class Array(
5757
op.CanPosSelf,
5858
op.CanNegSelf,
5959
op.CanAddSame[T_contra],
60-
op.CanIAddSelf[T_contra],
6160
op.CanRAddSelf[T_contra],
6261
op.CanSubSame[T_contra],
63-
op.CanISubSelf[T_contra],
6462
op.CanRSubSelf[T_contra],
6563
op.CanMulSame[T_contra],
66-
op.CanIMulSelf[T_contra],
6764
op.CanRMulSelf[T_contra],
6865
op.CanTruedivSame[T_contra],
6966
op.CanITruedivSelf[T_contra],
7067
op.CanRTruedivSelf[T_contra],
7168
op.CanFloordivSame[T_contra],
72-
op.CanIFloordivSelf[T_contra],
7369
op.CanRFloordivSelf[T_contra],
7470
op.CanModSame[T_contra],
75-
op.CanIModSelf[T_contra],
7671
op.CanRModSelf[T_contra],
7772
op.CanPowSame[T_contra],
78-
op.CanIPowSelf[T_contra],
7973
op.CanRPowSelf[T_contra],
8074
Protocol[T_contra, NS_co],
8175
):

src/array_api_typing/_array_docstrings.toml

Lines changed: 0 additions & 122 deletions
Original file line numberDiff line numberDiff line change
@@ -42,23 +42,6 @@ See Also:
4242
4343
'''
4444

45-
__iadd__ = '''
46-
Calculates the in-place sum for each element of an array instance with the
47-
respective element of the array `other`.
48-
49-
Args:
50-
other: addend array. Must be compatible with `self` (see Broadcasting).
51-
Should have a numeric data type.
52-
53-
Returns:
54-
Self: `self`, after performing the in-place addition. The returned
55-
array must have a data type determined by Type Promotion Rules.
56-
57-
See Also:
58-
array_api_typing.Add
59-
60-
'''
61-
6245
__radd__ = '''
6346
Calculates the sum for each element of the array `other` with the respective
6447
element of an array instance.
@@ -97,23 +80,6 @@ See Also:
9780
9881
'''
9982

100-
__isub__ = '''
101-
Calculates the in-place difference for each element of an array instance
102-
with the respective element of the array `other`.
103-
104-
Args:
105-
other: subtrahend array. Must be compatible with `self` (see
106-
Broadcasting). Should have a numeric data type.
107-
108-
Returns:
109-
Self: `self`, after performing the in-place subtraction. The returned
110-
array must have a data type determined by Type Promotion Rules.
111-
112-
See Also:
113-
array_api_typing.Subtract
114-
115-
'''
116-
11783
__rsub__ = '''
11884
Calculates the difference for each element of the array `other` with the
11985
respective element of an array instance.
@@ -152,23 +118,6 @@ See Also:
152118
153119
'''
154120

155-
__imul__ = '''
156-
Calculates the in-place product for each element of an array instance with
157-
the respective element of the array `other`.
158-
159-
Args:
160-
other: multiplicand array. Must be compatible with `self` (see
161-
Broadcasting). Should have a numeric data type.
162-
163-
Returns:
164-
Self: `self`, after performing the in-place multiplication. The returned
165-
array must have a data type determined by Type Promotion Rules.
166-
167-
See Also:
168-
array_api_typing.Multiply
169-
170-
'''
171-
172121
__rmul__ = '''
173122
Calculates the product for each element of the array `other` with the
174123
respective element of an array instance.
@@ -204,23 +153,6 @@ See Also:
204153
205154
'''
206155

207-
__itruediv__ = '''
208-
Calculates the in-place quotient for each element of an array instance with
209-
the respective element of the array `other`.
210-
211-
Args:
212-
other: divisor array. Must be compatible with `self` (see Broadcasting).
213-
Should have a numeric data type.
214-
215-
Returns:
216-
Self: `self`, after performing the in-place true division. The returned
217-
array must have a data type determined by Type Promotion Rules.
218-
219-
See Also:
220-
array_api_typing.TrueDiv
221-
222-
'''
223-
224156
__rtruediv__ = '''
225157
Calculates the quotient for each element of the array `other` with the
226158
respective element of an array instance.
@@ -255,24 +187,6 @@ See Also:
255187
256188
'''
257189

258-
__ifloordiv__ = '''
259-
Calculates the in-place floor division for each element of an array instance
260-
with the respective element of the array `other`.
261-
262-
Args:
263-
other: divisor array. Must be compatible with `self` (see Broadcasting).
264-
Should have a numeric data type.
265-
266-
Returns:
267-
Self: `self`, after performing the in-place floor division. The
268-
returned array must have a data type determined by Type Promotion
269-
Rules.
270-
271-
See Also:
272-
array_api_typing.FloorDiv
273-
274-
'''
275-
276190
__rfloordiv__ = '''
277191
Calculates the floor division for each element of the array `other` with the
278192
respective element of an array instance.
@@ -291,24 +205,6 @@ See Also:
291205
292206
'''
293207

294-
__imod__ = '''
295-
Calculates the in-place remainder for each element of an array instance with
296-
the respective element of the array `other`.
297-
298-
Args:
299-
other: divisor array. Must be compatible with `self` (see Broadcasting).
300-
Should have a numeric data type.
301-
302-
Returns:
303-
Self: `self`, after performing the in-place modulo operation. The
304-
returned array must have a data type determined by Type Promotion
305-
Rules.
306-
307-
See Also:
308-
array_api_typing.Remainder
309-
310-
'''
311-
312208
__mod__ = '''
313209
Evaluates `self_i % other_i` for each element of an array instance with the
314210
respective element of the array `other`.
@@ -362,24 +258,6 @@ Returns:
362258
363259
'''
364260

365-
__ipow__ = '''
366-
Calculates the in-place power for each element of an array instance with the
367-
respective element of the array `other`.
368-
369-
Args:
370-
other: exponent array. Must be compatible with `self` (see Broadcasting).
371-
Should have a numeric data type.
372-
373-
Returns:
374-
Self: `self`, after performing the in-place power operation. The
375-
returned array must have a data type determined by Type Promotion
376-
Rules.
377-
378-
See Also:
379-
array_api_typing.Power
380-
381-
'''
382-
383261
__rpow__ = '''
384262
Calculates the power for each element of the array `other` raised to the
385263
respective element of an array instance.

0 commit comments

Comments
 (0)