File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -204,6 +204,22 @@ def __invert__(self) -> Self:
204
204
...
205
205
206
206
207
+ class HasArrayAnd (Protocol ):
208
+ """Evaluates ``self_i & other_i`` for each element of an array instance with the respective element of the array other.""" # noqa: E501
209
+
210
+ def __and__ (self , other : Self | int | float , / ) -> Self :
211
+ """Calculates the bitwise AND for each element of an array instance with the respective element of the array other.
212
+
213
+ Args:
214
+ other: operand array. Must be compatible with self (see Broadcasting). Should have an integer data type.
215
+
216
+ Returns:
217
+ an array containing the element-wise bitwise ANDs. The returned array must have a data type determined by Type Promotion Rules.
218
+
219
+ """ # noqa: E501
220
+ ...
221
+
222
+
207
223
class Array (
208
224
HasArrayNamespace [NS_co ],
209
225
HasArrayPos ,
@@ -217,6 +233,7 @@ class Array(
217
233
HasArrayPow ,
218
234
HasArrayMatmul ,
219
235
HasArrayInvert ,
236
+ HasArrayAnd ,
220
237
Protocol ,
221
238
):
222
239
"""Array API specification for array object attributes and methods."""
You can’t perform that action at this time.
0 commit comments