Skip to content

Commit

Permalink
[Fix] ConcatDataset raises error when metainfo is np.array (#1407)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonbakerfish authored Oct 31, 2023
1 parent e0cf958 commit 2a563f4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mmengine/dataset/dataset_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ def __init__(self,
if (isinstance(self._metainfo[key], np.ndarray)
and not np.array_equal(self._metainfo[key],
dataset.metainfo[key])
or self._metainfo[key] != dataset.metainfo[key]):
or (not isinstance(self._metainfo[key], np.ndarray)
and self._metainfo[key] != dataset.metainfo[key])):
raise ValueError(
f'The meta information of the {i}-th dataset does not '
'match meta information of the first dataset')
Expand Down

0 comments on commit 2a563f4

Please sign in to comment.