Simplifications for MLX C (#1396)

* simplifications for MLX C

* use vectors instead of map

* update examples
This commit is contained in:
Awni Hannun
2024-09-06 19:16:50 -07:00
committed by GitHub
parent 7cca1727af
commit ba3e913c7a
7 changed files with 334 additions and 331 deletions

View File

@@ -1425,8 +1425,8 @@ array where(
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 */,
const std::optional<float> posinf_ /* = std::nullopt */,
const std::optional<float> neginf_ /* = std::nullopt */,
StreamOrDevice s /* = {} */) {
Dtype dtype = a.dtype();
if (!issubdtype(dtype, inexact)) {