mirror of
https://github.com/ml-explore/mlx.git
synced 2025-12-16 01:49:05 +08:00
* initial attempt, working with wrong types * not compiling; mx.float16 and mx.bfloat16 tests added * fix nan to num * nit --------- Co-authored-by: Awni Hannun <awni@apple.com>
This commit is contained in:
@@ -406,6 +406,14 @@ array where(
|
||||
const array& y,
|
||||
StreamOrDevice s = {});
|
||||
|
||||
/** Replace NaN and infinities with finite numbers. */
|
||||
array nan_to_num(
|
||||
const array& a,
|
||||
float nan = 0.0f,
|
||||
const std::optional<float>& posinf = std::nullopt,
|
||||
const std::optional<float>& neginf = std::nullopt,
|
||||
StreamOrDevice s = {});
|
||||
|
||||
/** True if all elements in the array are true (or non-zero). **/
|
||||
array all(const array& a, bool keepdims, StreamOrDevice s = {});
|
||||
inline array all(const array& a, StreamOrDevice s = {}) {
|
||||
|
||||
Reference in New Issue
Block a user