You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
…8Array`, `Int16Array`, `Int32Array`, `Int64Array`) (#35561)
### Rationale for this change
Followup to #35495 in which we added the MATLAB class `Float32Array`.
This pull request adds support for round tripping signed integer between `arrow.array.<Array>` classes and associated MATLAB types (e.g. `int8`, `int16`, `int32`, `int64`).
| Arrow Array Type | MATLAB Type |
| ------------------------- | -------------------- |
| `Int8Array` | `int8` |
| `Int16Array` | `int16` |
| `Int32Array` | `int32` |
| `Int64Array` | `int64` |
Example of round-tripping `int8` data:
```matlab
>> int8MatlabArray = int8([1, 2, 3]')
int8MatlabArray =
3x1 int8 column vector
1
2
3
>> int8ArrowArray = arrow.array.Int8Array(int8MatlabArray)
int8ArrowArray =
[
1,
2,
3
]
>> int8MatlabArrayRoundTripped = toMATLAB(int8ArrowArray)
int8MatlabArrayRoundTripped =
3x1 int8 column vector
1
2
3
>> all(int8MatlabArray == int8MatlabArrayRoundTripped)
ans =
logical
1
```
### What changes are included in this PR?
Added four new signed integer type `arrow.array.<Array>` concrete subclasses.
1. `arrow.array.Int8Array`
3. `arrow.array.Int16Array`
4. `arrow.array.Int32Array`
5. `arrow.array.Int64Array`
### Are these changes tested?
Yes, we added the following four test classes:
1. `tInt8Array.m`
2. `tInt16Array.m`
3. `tInt32Array.m`
4. `tInt64Array.m`
### Are there any user-facing changes?
Yes. This change introduces 4 new publicly documented classes:
1. `arrow.array.Int8Array`
3. `arrow.array.Int16Array`
4. `arrow.array.Int32Array`
5. `arrow.array.Int64Array`
### Future Directions
1. Add support for null values (i.e. validity bitmap) for the signed integer array types.
### Notes
!. Thank you to @ sgilmore10 for her help with this pull request!
* Closes: #35558
Lead-authored-by: Kevin Gurney <[email protected]>
Co-authored-by: Sarah Gilmore <[email protected]>
Signed-off-by: Sutou Kouhei <[email protected]>
Describe the enhancement requested
Followup to #35495 in which we added the MATLAB class
Float32Array
.Int8Array
int8
Int16Array
int16
Int32Array
int32
Int64Array
int64
Component(s)
MATLAB
The text was updated successfully, but these errors were encountered: