Skip to content

Commit

Permalink
DataFrame to numpy conversion fixed (#264)
Browse files Browse the repository at this point in the history
  • Loading branch information
owerbat authored Aug 12, 2020
1 parent 40d5b9a commit 77ff4f6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion generator/wrapper_gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,11 @@ def my_procid():
def get_data(x):
if isinstance(x, pdDataFrame):
x = x.to_numpy()
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):
Expand Down

0 comments on commit 77ff4f6

Please sign in to comment.