Skip to content

Commit 2df7c55

Browse files
committed
FIX: fixed bug in function remove_inconsistent_sizes where the most common data shape was not being determined correctly.
1 parent 809b71b commit 2df7c55

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/pyxalign/io/loaders/xrf/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def remove_inconsistent_sizes(standard_data: StandardData):
7676
# Get the count per each shape
7777
n_arrays_per_shape = []
7878
for shape in set(shapes):
79-
n_arrays_per_shape += [shape == x for x in shapes]
79+
n_arrays_per_shape += [np.sum([shape == x for x in shapes])]
8080
idx = np.argmax(n_arrays_per_shape)
8181
# Remove data with sizes that don't match
8282
scan_numbers = np.array(list(standard_data.projections.keys()), dtype=int)

0 commit comments

Comments
 (0)