ARROW-17997: [Ruby] Add support for building Arrow::Tensor from raw nested Ruby array
https://issues.apache.org/jira/browse/ARROW-17997
:warning: Ticket has not been started in JIRA, please click 'Start Progress'.
For the record, the equivalent Python functions don't allow passing strides.
For the record, the equivalent Python functions don't allow passing
strides.
Thanks for the information.
It seems that PyArrow only accepts constructing a tensor from a NumPy array: https://arrow.apache.org/docs/python/generated/pyarrow.Tensor.html#pyarrow.Tensor.from_numpy
For Ruby, we're already providing a constructor from raw binary data and metadata. It's based on arrow::Tensor::Make() in C++. So we can't remove the constructor to keep backward compatibility.
FYI: We have an external library that converts a NumPy like multi-dimentional array in Ruby (Numo::NArray) to Arrow::Tensor: https://github.com/red-data-tools/red-arrow-numo-narray/
@mrkn What do you think about improved API?
@kou LGTM
Benchmark runs are scheduled for baseline = 0e80c4f66fb0db3a112db1827d7fba9323c3a27a and contender = fc01a9c3e11822fc3661ee440ca6f4a5e32a7f42. fc01a9c3e11822fc3661ee440ca6f4a5e32a7f42 is a master commit associated with this PR. Results will be available as each benchmark for each run completes.
Conbench compare runs links:
[Finished :arrow_down:0.0% :arrow_up:0.0%] ec2-t3-xlarge-us-east-2
[Failed :arrow_down:0.0% :arrow_up:0.0%] test-mac-arm
[Failed :arrow_down:0.27% :arrow_up:0.0%] ursa-i9-9960x
[Finished :arrow_down:0.21% :arrow_up:0.04%] ursa-thinkcentre-m75q
Buildkite builds:
[Finished] fc01a9c3 ec2-t3-xlarge-us-east-2
[Failed] fc01a9c3 test-mac-arm
[Failed] fc01a9c3 ursa-i9-9960x
[Finished] fc01a9c3 ursa-thinkcentre-m75q
[Finished] 0e80c4f6 ec2-t3-xlarge-us-east-2
[Failed] 0e80c4f6 test-mac-arm
[Failed] 0e80c4f6 ursa-i9-9960x
[Finished] 0e80c4f6 ursa-thinkcentre-m75q
Supported benchmarks:
ec2-t3-xlarge-us-east-2: Supported benchmark langs: Python, R. Runs only benchmarks with cloud = True
test-mac-arm: Supported benchmark langs: C++, Python, R
ursa-i9-9960x: Supported benchmark langs: Python, R, JavaScript
ursa-thinkcentre-m75q: Supported benchmark langs: C++, Java