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 @@ -300,6 +300,22 @@ def __lt__(self, other: Self | int | float) -> Self:
300
300
...
301
301
302
302
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
+
303
319
class Array (
304
320
HasArrayNamespace [NS_co ],
305
321
HasArrayPos ,
@@ -319,6 +335,7 @@ class Array(
319
335
HasArrayLShift ,
320
336
HasArrayRShift ,
321
337
HasArrayLT ,
338
+ HasArrayLE ,
322
339
Protocol ,
323
340
):
324
341
"""Array API specification for array object attributes and methods."""
You can’t perform that action at this time.
0 commit comments