mirror of
https://github.com/ml-explore/mlx.git
synced 2025-06-26 02:33:21 +08:00
Move to nanobind v2 (#1316)
This commit is contained in:
parent
32668a7317
commit
9231617eb3
@ -1,4 +1,4 @@
|
|||||||
setuptools>=42
|
setuptools>=42
|
||||||
cmake>=3.24
|
cmake>=3.24
|
||||||
mlx>=0.9.0
|
mlx>=0.16.2
|
||||||
nanobind@git+https://github.com/wjakob/nanobind.git@2f04eac452a6d9142dedb957701bdb20125561e4
|
nanobind==2.0
|
||||||
|
@ -126,7 +126,7 @@ void init_array(nb::module_& m) {
|
|||||||
m.attr("float32") = nb::cast(float32);
|
m.attr("float32") = nb::cast(float32);
|
||||||
m.attr("bfloat16") = nb::cast(bfloat16);
|
m.attr("bfloat16") = nb::cast(bfloat16);
|
||||||
m.attr("complex64") = nb::cast(complex64);
|
m.attr("complex64") = nb::cast(complex64);
|
||||||
nb::class_<Dtype::Category>(
|
nb::enum_<Dtype::Category>(
|
||||||
m,
|
m,
|
||||||
"DtypeCategory",
|
"DtypeCategory",
|
||||||
R"pbdoc(
|
R"pbdoc(
|
||||||
@ -165,16 +165,16 @@ void init_array(nb::module_& m) {
|
|||||||
* :ref:`complex64 <data_types>`
|
* :ref:`complex64 <data_types>`
|
||||||
|
|
||||||
See also :func:`~mlx.core.issubdtype`.
|
See also :func:`~mlx.core.issubdtype`.
|
||||||
)pbdoc");
|
)pbdoc")
|
||||||
m.attr("complexfloating") = nb::cast(complexfloating);
|
.value("complexfloating", complexfloating)
|
||||||
m.attr("floating") = nb::cast(floating);
|
.value("floating", floating)
|
||||||
m.attr("inexact") = nb::cast(inexact);
|
.value("inexact", inexact)
|
||||||
m.attr("signedinteger") = nb::cast(signedinteger);
|
.value("signedinteger", signedinteger)
|
||||||
m.attr("unsignedinteger") = nb::cast(unsignedinteger);
|
.value("unsignedinteger", unsignedinteger)
|
||||||
m.attr("integer") = nb::cast(integer);
|
.value("integer", integer)
|
||||||
m.attr("number") = nb::cast(number);
|
.value("number", number)
|
||||||
m.attr("generic") = nb::cast(generic);
|
.value("generic", generic)
|
||||||
|
.export_values();
|
||||||
nb::class_<ArrayAt>(
|
nb::class_<ArrayAt>(
|
||||||
m,
|
m,
|
||||||
"_ArrayAt",
|
"_ArrayAt",
|
||||||
|
2
setup.py
2
setup.py
@ -176,7 +176,7 @@ if __name__ == "__main__":
|
|||||||
include_package_data=True,
|
include_package_data=True,
|
||||||
extras_require={
|
extras_require={
|
||||||
"dev": [
|
"dev": [
|
||||||
"nanobind@git+https://github.com/wjakob/nanobind.git@2f04eac452a6d9142dedb957701bdb20125561e4",
|
"nanobind==2.0",
|
||||||
"numpy",
|
"numpy",
|
||||||
"pre-commit",
|
"pre-commit",
|
||||||
"setuptools>=42",
|
"setuptools>=42",
|
||||||
|
Loading…
Reference in New Issue
Block a user