File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -204,6 +204,22 @@ def __invert__(self) -> Self:
204204 ...
205205
206206
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+
207223class Array (
208224 HasArrayNamespace [NS_co ],
209225 HasArrayPos ,
@@ -217,6 +233,7 @@ class Array(
217233 HasArrayPow ,
218234 HasArrayMatmul ,
219235 HasArrayInvert ,
236+ HasArrayAnd ,
220237 Protocol ,
221238):
222239 """Array API specification for array object attributes and methods."""
You can’t perform that action at this time.
0 commit comments