DataFrame to numpy conversion fixed
@@ -185,7 +185,11 @@ def my_procid():
def get_data(x):
if isinstance(x, pdDataFrame):
+ x_dtypes = x.dtypes.values
+ if np.all(x_dtypes == x_dtypes[0]):
x = x.to_numpy()
+ else:
+ x = [xi.to_numpy() for _, xi in x.items()]
elif isinstance(x, mdDataFrame):
x = x.to_numpy()
elif isinstance(x, pdSeries):
