From 008171cd97e0b0bb194c792f990382879fdac76f Mon Sep 17 00:00:00 2001 From: Anton Volkov Date: Fri, 26 Jan 2024 13:29:18 +0100 Subject: [PATCH] Clipping with both min and max values as None --- dpnp/dpnp_iface_mathematical.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dpnp/dpnp_iface_mathematical.py b/dpnp/dpnp_iface_mathematical.py index 91a8a2569d56..7ec846f770c8 100644 --- a/dpnp/dpnp_iface_mathematical.py +++ b/dpnp/dpnp_iface_mathematical.py @@ -491,6 +491,8 @@ def clip(a, a_min, a_max, *, out=None, order="K", **kwargs): if kwargs: raise NotImplementedError(f"kwargs={kwargs} is currently not supported") + elif a_min is None and a_max is None: + raise ValueError("One of max or min must be given") if order is None: order = "K"