Commit 00d69c50 authored by mlocatelli's avatar mlocatelli 🍁
Browse files

Fix of shape mismatch

parent 3e0412b0
Pipeline #2515 passed with stages
in 11 minutes and 57 seconds
...@@ -81,7 +81,14 @@ class BaseTransform(object): ...@@ -81,7 +81,14 @@ class BaseTransform(object):
mappings = s1_ref.get_h5_dataset("mappings") mappings = s1_ref.get_h5_dataset("mappings")
keys = s1_full.keys keys = s1_full.keys
if not np.any(mappings[:, 0] != keys): temp_keys = keys
temp_map = mappings[:, 0]
if mappings[:, 0].shape[0] != keys.shape[0]:
if mappings[:, 0].shape[0] < keys.shape[0]:
temp_keys = keys[0:mappings[:, 0].shape[0]]
else:
temp_map = mappings[0:keys.shape[0], 0]
if not np.any(temp_map != temp_keys):
self.__log.debug("...mappings not necessary!") self.__log.debug("...mappings not necessary!")
mask = np.isin(list(mappings[:, 0]), list(keys)) mask = np.isin(list(mappings[:, 0]), list(keys))
mappings = mappings[mask] mappings = mappings[mask]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment