-
Notifications
You must be signed in to change notification settings - Fork 4k
GH-35550: [MATLAB] Add public toMATLAB method to arrow.array.Array for converting to MATLAB types
#35551
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
Conversation
|
Thanks for opening a pull request! If this is not a minor PR. Could you open an issue for this pull request on GitHub? https://github.com/apache/arrow/issues/new/choose Opening GitHub issues ahead of time contributes to the Openness of the Apache Arrow project. Then could you also rename the pull request title in the following format? or In the case of PARQUET issues on JIRA the title also supports: See also: |
toMATLAB method to arrow.array.Array for converting to MATLAB types
…oxy ToMatlab to toMATLAB. Co-authored-by: Sarah Gilmore <sgilmore@mathworks.com>
Co-authored-by: Kevin Gurney <kgurney@mathworks.com>
| REGISTER_METHOD(Array, ToString); | ||
| REGISTER_METHOD(Array, ToMatlab); | ||
| REGISTER_METHOD(Array, toMATLAB); |
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'm not familiar with MATLAB API but is it natural that ToString uses T and toMATLAB uses t?
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.
Hi @kou, That's a mistake on our part. ToString should be toString. Typically, we use lower camel case for MATLAB method names. Thanks for catching this!
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.
- Changed
ToString()totoString(). - Also renamed the c++ method
Length()tolength(). However, since thisLengthis a property on the MATLABarrow.array.Arrayclass, I left the property name alone. In MATLAB, property names are typically upper camel case.
Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
2. Rename Length() c++ method to length()
kou
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.
+1
|
Benchmark runs are scheduled for baseline = 505a2e4 and contender = 88339cd. 88339cd is a master commit associated with this PR. Results will be available as each benchmark for each run completes. |
|
['Python', 'R'] benchmarks have high level of regressions. |
Rationale for this change
In order to allow clients to write generic code for different concrete
arrow.array.Arraysubclasses in MATLAB, it would be helpful to have one generictoMATLABmethod.toMATLABwould convert thearrow.array.Arrayinto a corresponding MATLAB type.For example,
arrow.array.Float64Arraywould be converted to a MATLABdoublearray.What changes are included in this PR?
toMATLABmethod to thearrow.array.Arraysuperclass.Example of using
toMATLABon anarrow.array.Float64Array:Are these changes tested?
toMATLABtotFloat32Array.mandtFloat64Array.m.Future Directions
toMATLABtests to the shared test utility class (i.e. [MATLAB] Create shared test class utility for numeric arrays. #35537).Notes
toMATLABmethod toarrow.array.Arrayfor converting to MATLAB types #35550