File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -300,6 +300,22 @@ def __lt__(self, other: Self | int | float) -> Self:
300300 ...
301301
302302
303+ class HasArrayLE (Protocol ):
304+ """Protocol for array classes that support the less-equal operator."""
305+
306+ def __lt__ (self , other : Self | int | float ) -> Self :
307+ """Computes the truth value of ``self_i <= other_i`` for each element of an array instance with the respective element of the array other.
308+
309+ Args:
310+ other: other array. Must be compatible with ``self`` (see Broadcasting). Should have a numeric data type.
311+
312+ Returns:
313+ an array containing the element-wise results. The returned array must have a data type of bool.
314+
315+ """ # noqa: E501
316+ ...
317+
318+
303319class Array (
304320 HasArrayNamespace [NS_co ],
305321 HasArrayPos ,
@@ -319,6 +335,7 @@ class Array(
319335 HasArrayLShift ,
320336 HasArrayRShift ,
321337 HasArrayLT ,
338+ HasArrayLE ,
322339 Protocol ,
323340):
324341 """Array API specification for array object attributes and methods."""
You can’t perform that action at this time.
0 commit comments