-
Notifications
You must be signed in to change notification settings - Fork 93
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
Closes #1783 - SegArray.__getitem__
to Server
#1790
Conversation
…to use JSON return for SegArrays. Adds from parts function to build segarray. Adds ak.segarray to build SegArray
23cad27
to
c9506d8
Compare
arkouda/segarray.py
Outdated
if len(d) != 1: | ||
raise ValueError("All columns must have same dtype") | ||
dtype = d.pop() | ||
newsegs = arange(size) * n |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for the pdarray case is every element of the pdarray its own segment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No the pdarray
indicates when segments to access. For example, ak.array([1,3])
would return a SegArray
containing segments 1 and 3 of the original.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems good to me!
Closes #1783
Closes #1708
SegArray
indexing to the server and updates__getitem__
to use server messages for indexing. The majority of the indexing logic was modeled fromSegString
.OutOfBoundsError
toServerErrors.chpl
because 2 modules are not utilizing thisSegArray
creation response messages to be formatted as JSON. These messages also now return thecreate
statements for thevalues
,segments
, andlengths
pdarray components so that subsequent server calls are not required for access.ak.SegArray.from_parts
. This operates as the__init__
previously did. The__init__
method has been updated to buildSegArray
from the response message components. This was modeled afterSegmentedStrings
client side code.ak.segarray
method to ease the transition to this update for users. This is an alias toak.SegArray.from_parts
but the syntax resembles the creation of pdarrays viaak.array
and only requires case changes in existing code.