-
Notifications
You must be signed in to change notification settings - Fork 97
Adds overloads to create_pdarray #5224
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
base: main
Are you sure you want to change the base?
Conversation
634f20c to
4c388cb
Compare
4c388cb to
16dfffe
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5224 +/- ##
========================================
Coverage ? 100.00%
========================================
Files ? 4
Lines ? 63
Branches ? 0
========================================
Hits ? 63
Misses ? 0
Partials ? 0 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
arkouda/numpy/pdarrayclass.py
Outdated
|
|
||
|
|
||
| @overload | ||
| def create_pdarray(repMsg: str, max_bits: None = ...) -> pdarray: ... |
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.
Please use rep_msg instead of repMsg to match pep8.
|
|
||
| @overload | ||
| def create_pdarray(repMsg: memoryview, max_bits: int) -> pdarray: ... | ||
|
|
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.
The overloads could be collapsed to 2 like this:
@overload
def create_pdarray(rep_msg: str, max_bits: int | None = ...) -> pdarray: ...
@overload
def create_pdarray(rep_msg: memoryview, max_bits: int | None = ...) -> pdarray: ...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.
Done.
arkouda/numpy/pdarrayclass.py
Outdated
| rep_msg : str | ||
| space-delimited string containing the pdarray name, datatype, size | ||
| dimension, shape,and itemsize | ||
| repMsg : str, memoryview |
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.
Again, this should be rep_msg.
arkouda/numpy/pdarrayclass.py
Outdated
| repMsg : str, memoryview | ||
| a space-delimited response from the arkouda server describing a newly | ||
| created array. The message encodes, in order, the array name, dtype, | ||
| total size, rank, shape, and itemsize. If provides as a memoryview, |
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.
Should say "provided" rather than "provides"
arkouda/numpy/pdarrayclass.py
Outdated
| total size, rank, shape, and itemsize. If provides as a memoryview, | ||
| it will be decoded to a UTF-8 string before parsing. | ||
| max_bits: int, otional |
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.
I think you mean "optional" rather than "otional".
arkouda/numpy/pdarrayclass.py
Outdated
| """ | ||
| Return a pdarray instance pointing to an array created by the arkouda server. | ||
| The user should not call this function directly. | ||
| This intended for internal use only. The user should not call this function |
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 is intended" instead of "This indended".
ajpotts
left a comment
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.
Thank you!
8ce08d1 to
d193506
Compare
d193506 to
56dba65
Compare
jaketrookman
left a comment
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.
Besides the small formatting and grammar changes, looks good
Closes #5171