Skip to content

Commit e79b171

Browse files
committed
numpy.concatenate fallback to data_vstack added
1 parent e5530b8 commit e79b171

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

modAL/utils/data.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,7 @@ def data_vstack(blocks: Container) -> modALinput:
2525
elif sp.issparse(blocks[0]):
2626
return sp.vstack(blocks)
2727
else:
28-
raise TypeError('%s datatype is not supported' % type(blocks[0]))
28+
try:
29+
return np.concatenate(blocks)
30+
except:
31+
raise TypeError('%s datatype is not supported' % type(blocks[0]))

0 commit comments

Comments
 (0)