Skip to content

Commit e24e72e

Browse files
add default argument. fix constructor
1 parent f53ff30 commit e24e72e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

wkcuber/mag.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def __init__(self, mag):
1818
elif re.match(r"^\d+-\d+-\d+$", mag) is not None:
1919
self.mag = [int(m) for m in mag.split("-")]
2020

21-
if self.mag is None or len(mag) != 3:
21+
if self.mag is None or len(self.mag) != 3:
2222
raise ValueError(
2323
"magnification must be int or a vector3 of ints or a string shaped like e.g. 2-2-1"
2424
)

wkcuber/metadata.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def detect_dtype(dataset_path, layer, mag: Mag = Mag(1)):
9797
return str(np.dtype(voxel_type))
9898

9999

100-
def detect_cubeLength(dataset_path, layer, mag: Mag):
100+
def detect_cubeLength(dataset_path, layer, mag: Mag = Mag(1)):
101101
layer_path = path.join(dataset_path, layer, str(mag))
102102
if path.exists(layer_path):
103103
with wkw.Dataset.open(layer_path) as dataset:

0 commit comments

Comments
 (0)