Skip to content

Commit

Permalink
Fix inconsistent value types in dataframe_resolver. (#1931)
Browse files Browse the repository at this point in the history
Fixes #1930

Signed-off-by: Ye Cao <caoye.cao@alibaba-inc.com>
  • Loading branch information
dashanji authored Jul 1, 2024
1 parent e936885 commit 5aaac91
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions python/vineyard/data/dataframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,8 @@ def pandas_dataframe_resolver(obj, resolver):
elif len(np_value.shape) == 1:
values = np.expand_dims(np_value, 0).view(ndarray)
setattr(values, '__vineyard_ref', getattr(np_value, '__vineyard_ref', None))
if isinstance(np_value, ndarray):
values = np.asarray(values)
block = Block(values, placement, ndim=2)
else:
values = NDArrayArray(np.expand_dims(np_value, 0).view(ndarray), dim=2)
Expand Down

0 comments on commit 5aaac91

Please sign in to comment.