mirror of
https://github.com/ml-explore/mlx.git
synced 2025-09-18 10:26:56 +08:00
fix clip (#1415)
This commit is contained in:
@@ -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);
|
||||
},
|
||||
|
Reference in New Issue
Block a user