You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "sgilmore10 (via GitHub)" <gi...@apache.org> on 2023/10/09 18:36:09 UTC
[I] [MATLAB] Rename `arrow.array.Array` `Length` property to `NumElements` [arrow]
sgilmore10 opened a new issue, #38164:
URL: https://github.com/apache/arrow/issues/38164
### Describe the enhancement requested
We would like to rename the `Length` property of `arrow.array.Array` to `NumElements` because MATLAB has a function called `length(A)`, which returns the length of the largest array dimension in `A`.
Because `arrow.array.Array` inherits from `matlab.mixin.Scalar`, it's size is always `1x1`, so the `length()` function always returns `1`. This may confuse users because the `Length` property of `arrow.array.Array` returns the number of elements within the array, which is most likely greater than `1`.
```matlab
>> array = arrow.array([1 2 3 4 5]);
% The length property returns the number of elements in the array
>> array.Length
ans =
int64
5
% The length method returns the length of the largest dimension
>> length(array)
ans =
1
```
I suspect this inconsistency will confuse users, so we should rename the `Length` property to `NumElements`.
### Component(s)
MATLAB
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@arrow.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [MATLAB] Rename `arrow.array.Array` `Length` property to `NumElements` [arrow]
Posted by "sgilmore10 (via GitHub)" <gi...@apache.org>.
sgilmore10 commented on issue #38164:
URL: https://github.com/apache/arrow/issues/38164#issuecomment-1753474208
take
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [MATLAB] Rename `Length` property on `arrow.array.Array` and `arrow.array.ChunkedArray` to `NumElements` [arrow]
Posted by "kevingurney (via GitHub)" <gi...@apache.org>.
kevingurney closed issue #38164: [MATLAB] Rename `Length` property on `arrow.array.Array` and `arrow.array.ChunkedArray` to `NumElements`
URL: https://github.com/apache/arrow/issues/38164
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org