support python mlx.array creation from list of mlx.array's (#325)

* support python mlx.array creation from list of mlx.array's

* include bfloat16 in UT

* refactor so that sub array made of all python primitive types gets initialized by fill_vector

* address PR comment: arr.shape().size() -> arr.ndim()

* address PR comment: get back Dtype constness and let stack to handle type promotions automatically
This commit is contained in:
mutexuan
2024-01-05 10:53:33 +08:00
committed by GitHub
parent b9e415d19c
commit d8f41a5c0f
3 changed files with 180 additions and 63 deletions

View File

@@ -714,6 +714,7 @@ array stack(
}
return concatenate(new_arrays, axis, s);
}
array stack(const std::vector<array>& arrays, StreamOrDevice s /* = {} */) {
return stack(arrays, 0, s);
}