mirror of
https://github.com/ml-explore/mlx.git
synced 2025-10-19 16:48:10 +08:00
Double for lapack (#1904)
* double for lapack ops * add double support for lapack ops
This commit is contained in:
@@ -44,6 +44,8 @@ std::string buffer_format(const mx::array& a) {
|
||||
return "f";
|
||||
case mx::bfloat16:
|
||||
return "B";
|
||||
case mx::float64:
|
||||
return "d";
|
||||
case mx::complex64:
|
||||
return "Zf\0";
|
||||
default: {
|
||||
|
@@ -152,6 +152,8 @@ nb::ndarray<NDParams...> mlx_to_nd_array(const mx::array& a) {
|
||||
throw nb::type_error("bfloat16 arrays cannot be converted to NumPy.");
|
||||
case mx::float32:
|
||||
return mlx_to_nd_array_impl<float, NDParams...>(a);
|
||||
case mx::float64:
|
||||
return mlx_to_nd_array_impl<double, NDParams...>(a);
|
||||
case mx::complex64:
|
||||
return mlx_to_nd_array_impl<std::complex<float>, NDParams...>(a);
|
||||
default:
|
||||
|
Reference in New Issue
Block a user