mirror of
https://github.com/ml-explore/mlx.git
synced 2025-10-20 17:38:09 +08:00
Export / import functions to / from a file (#1642)
* export and import functions * refactor + works for few primitives * nit * allow primitives with state * nit * nit * simplify serialize / deserialize * fix for constants * python bindings * maybe fix serialize failure case * add example * more primitives, training kind of works * same result for python and c++ * some fixes * fix export * template it up * some simplificatoin * rebase * allow kwargs and multiple functions * exporter * more primitives for exporting * deal with endianness * handle invalid stream * add docstring
This commit is contained in:
@@ -2898,7 +2898,7 @@ void init_ops(nb::module_& m) {
|
||||
Generate multidimensional coordinate grids from 1-D coordinate arrays
|
||||
|
||||
Args:
|
||||
arrays (array): Input arrays.
|
||||
*arrays (array): Input arrays.
|
||||
sparse (bool, optional): If ``True``, a sparse grid is returned in which each output
|
||||
array has a single non-zero element. If ``False``, a dense grid is returned.
|
||||
Defaults to ``False``.
|
||||
@@ -3840,8 +3840,8 @@ void init_ops(nb::module_& m) {
|
||||
|
||||
Args:
|
||||
file (file, str): Path to file to which the arrays are saved.
|
||||
args (arrays): Arrays to be saved.
|
||||
kwargs (arrays): Arrays to be saved. Each array will be saved
|
||||
*args (arrays): Arrays to be saved.
|
||||
**kwargs (arrays): Arrays to be saved. Each array will be saved
|
||||
with the associated keyword as the output file name.
|
||||
)pbdoc");
|
||||
m.def(
|
||||
|
Reference in New Issue
Block a user