mirror of
https://github.com/ml-explore/mlx.git
synced 2025-09-17 17:28:10 +08:00
Fix put_along_axis for empty arrays (#2181)
This commit is contained in:

committed by
GitHub

parent
8f3d208dce
commit
3aa9cf3f9e
@@ -3175,6 +3175,10 @@ array scatter_axis(
|
||||
throw std::invalid_argument(msg.str());
|
||||
}
|
||||
|
||||
if (a.size() == 0) {
|
||||
return a;
|
||||
}
|
||||
|
||||
auto upd = astype(values, a.dtype(), s);
|
||||
|
||||
// Squeeze leading singletons out of update
|
||||
|
Reference in New Issue
Block a user