This commit is contained in:
Awni Hannun
2024-09-14 16:09:09 -07:00
committed by GitHub
parent b3f52c9fbe
commit d6492b0163
3 changed files with 19 additions and 3 deletions

View File

@@ -2827,10 +2827,10 @@ void init_ops(nb::module_& m) {
std::optional<array> min_ = std::nullopt;
std::optional<array> max_ = std::nullopt;
if (min) {
min_ = to_array(min.value());
min_ = to_arrays(a, min.value()).second;
}
if (max) {
max_ = to_array(max.value());
max_ = to_arrays(a, max.value()).second;
}
return clip(a, min_, max_, s);
},