Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closes #1783 - SegArray.__getitem__ to Server #1790

Merged
merged 6 commits into from
Sep 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions arkouda/dataframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,7 @@ def _get_head_tail_server(self):
elif t == "SegArray":
# split creates for segments and values
eles = msg[2].split("+")
df_dict[msg[1]] = SegArray(create_pdarray(eles[0]), create_pdarray(eles[1]))
df_dict[msg[1]] = SegArray.from_parts(create_pdarray(eles[0]), create_pdarray(eles[1]))
else:
df_dict[msg[1]] = create_pdarray(msg[2])

Expand Down Expand Up @@ -1475,7 +1475,7 @@ def load(cls, prefix_path, file_format="INFER"):
# update dict to contain segarrays where applicable if any exist
if len(seg_cols) > 0:
df_dict = {
col: SegArray(df_dict[col + "_segments"], df_dict[col + "_values"])
col: SegArray.from_parts(df_dict[col + "_segments"], df_dict[col + "_values"])
if col in seg_cols
else df_dict[col]
for col in df_dict_keys
Expand Down
4 changes: 2 additions & 2 deletions arkouda/groupbyclass.py
Original file line number Diff line number Diff line change
Expand Up @@ -1173,11 +1173,11 @@ def unique(self, values: groupable): # type: ignore
# Values are the unique elements of the values arg
if len(unique_values) == 1:
# Squeeze singleton results
ret = SegArray(g2.segments, unique_values[0])
ret = SegArray.from_parts(g2.segments, unique_values[0])
if reorder:
ret = ret[perm]
else:
ret = [SegArray(g2.segments, uv) for uv in unique_values] # type: ignore
ret = [SegArray.from_parts(g2.segments, uv) for uv in unique_values] # type: ignore
if reorder:
ret = [r[perm] for r in ret] # type: ignore
return self.unique_keys, ret # type: ignore
Expand Down
Loading