aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Epler <jepler@gmail.com>2020-04-22 09:04:12 -0500
committerJeff Epler <jepler@gmail.com>2020-04-22 09:04:12 -0500
commitb87af3b0719cfd1d75c3ddce6fd1352da510ed55 (patch)
treebbc9b1d70327fd6605777ba0a58691610bc2a998
parent51dbe9109fb6a474fe7f4cf4e3766e27ba0b34b5 (diff)
ulab: Update from upstream
Closes: #2787
-rw-r--r--shared-bindings/ulab/__init__.rst32
1 files changed, 32 insertions, 0 deletions
diff --git a/shared-bindings/ulab/__init__.rst b/shared-bindings/ulab/__init__.rst
index c9f2617ff..d2ff7eb80 100644
--- a/shared-bindings/ulab/__init__.rst
+++ b/shared-bindings/ulab/__init__.rst
@@ -191,6 +191,38 @@ Basic Array defining functions
Return a new 1-D array with ``num`` elements ranging from ``start`` to ``stop`` linearly.
+:mod:`ulab.compare` --- Comparison functions
+============================================
+
+.. module::ulab.compare
+
+.. method:: clip(x1, x2, x3)
+
+ Constrain the values from ``x1`` to be between ``x2`` and ``x3``.
+ ``x2`` is assumed to be less than or equal to ``x3``.
+
+ Arguments may be ulab arrays or numbers. All array arguments
+ must be the same size. If the inputs are all scalars, a 1-element
+ array is returned.
+
+ Shorthand for ``ulab.maximum(x2, ulab.minimum(x1, x3))``
+
+.. method:: maximum(x1, x2)
+
+ Compute the element by element maximum of the arguments.
+
+ Arguments may be ulab arrays or numbers. All array arguments
+ must be the same size. If the inputs are both scalars, a number is
+ returned
+
+.. method:: minimum(x1, x2)
+
+ Compute the element by element minimum of the arguments.
+
+ Arguments may be ulab arrays or numbers. All array arguments
+ must be the same size. If the inputs are both scalars, a number is
+ returned
+
:mod:`ulab.vector` --- Element-by-element functions
===================================================