mirror of
https://github.com/ml-explore/mlx.git
synced 2025-09-05 07:34:42 +08:00
Implements divide for integer types and adds floor_divide op (#228)
* Add floor_divide * Add floor_divide to the tests * Add floor_divide to the docs
This commit is contained in:

committed by
GitHub

parent
de892cb66c
commit
2807c6aff0
@@ -709,6 +709,9 @@ array operator/(const array& a, const array& b);
|
||||
array operator/(double a, const array& b);
|
||||
array operator/(const array& a, double b);
|
||||
|
||||
/** Compute integer division. Equivalent to doing floor(a / x). */
|
||||
array floor_divide(const array& a, const array& b, StreamOrDevice s = {});
|
||||
|
||||
/** Compute the element-wise remainder of division */
|
||||
array remainder(const array& a, const array& b, StreamOrDevice s = {});
|
||||
array operator%(const array& a, const array& b);
|
||||
|
Reference in New Issue
Block a user