Skip to content

Commit

Permalink
[util] Cherry pick 37ac94f (master -> ndv2_dev)
Browse files Browse the repository at this point in the history
  • Loading branch information
SepandKashani committed Mar 27, 2024
1 parent 03b5f51 commit c42d77d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/pyxu/util/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

import pyxu.info.deps as pxd
import pyxu.info.ptype as pxt
import pyxu.util.array_module as pxam

__all__ = [
"save_zarr",
Expand Down Expand Up @@ -35,7 +36,7 @@ def save_zarr(filedir: pxt.Path, kw_in: dict[str, pxt.NDArray]) -> None:
compute=True,
)
else:
zarr.save(filedir / filename, array)
zarr.save(filedir / filename, pxam.to_NUMPY(array))
except Exception as e:
print(f"Failed to save {filename}: {e}")

Expand Down

0 comments on commit c42d77d

Please sign in to comment.