ncfunc 0.2.1__tar.gz → 0.2.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {ncfunc-0.2.1 → ncfunc-0.2.2}/PKG-INFO +1 -1
- {ncfunc-0.2.1 → ncfunc-0.2.2}/pyproject.toml +1 -1
- {ncfunc-0.2.1 → ncfunc-0.2.2}/pyproject.toml.orig +1 -1
- {ncfunc-0.2.1 → ncfunc-0.2.2}/src/ncfunc/core.py +8 -1
- {ncfunc-0.2.1 → ncfunc-0.2.2}/README.md +0 -0
- {ncfunc-0.2.1 → ncfunc-0.2.2}/src/ncfunc/__init__.py +0 -0
- {ncfunc-0.2.1 → ncfunc-0.2.2}/src/ncfunc/read_mf.py +0 -0
|
@@ -966,7 +966,7 @@ def save(
|
|
|
966
966
|
msg = f"cannot cast data of '{name}' to a numpy array"
|
|
967
967
|
raise ValueError(msg) from e
|
|
968
968
|
|
|
969
|
-
# ---- data check
|
|
969
|
+
# ---- data check
|
|
970
970
|
for i, (name, value) in enumerate(arrays.items()):
|
|
971
971
|
if (
|
|
972
972
|
(len(arrays) == 1 and i == 0) # the only entry (variable == dimension)
|
|
@@ -982,6 +982,13 @@ def save(
|
|
|
982
982
|
f"I'm not going to help you write an empty data of shape={value.shape} to {name=}"
|
|
983
983
|
)
|
|
984
984
|
|
|
985
|
+
if len(arrays) > 1:
|
|
986
|
+
shapes = tuple(v.shape for v in arrays.values())
|
|
987
|
+
var_shape = shapes[0]
|
|
988
|
+
dim_shape = tuple(s[0] for s in shapes[1:])
|
|
989
|
+
if var_shape != dim_shape:
|
|
990
|
+
raise ValueError(f"shapes differ: {var_shape=} {dim_shape=}")
|
|
991
|
+
|
|
985
992
|
# ---- assign parameters to create and write functions
|
|
986
993
|
names = tuple(data.keys())
|
|
987
994
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|