https://github.com/red-data-tools/red-arrow-gsl
A library that provides conversion method between Apache Arrow and Ruby/GSL
https://github.com/red-data-tools/red-arrow-gsl
Last synced: 10 months ago
JSON representation
A library that provides conversion method between Apache Arrow and Ruby/GSL
- Host: GitHub
- URL: https://github.com/red-data-tools/red-arrow-gsl
- Owner: red-data-tools
- License: other
- Created: 2017-04-22T14:15:52.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2020-11-24T07:58:52.000Z (over 5 years ago)
- Last Synced: 2025-08-09T20:59:55.409Z (11 months ago)
- Language: Ruby
- Size: 27.3 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# README
## Name
Red Arrow GSL
## Description
Red Arrow GSL is a library that provides converters between Apache Arrow's array data (`Arrow::*Array`) / tensor data (`Arrow::Tensor`) and Ruby/GSL's vector data (`GSL::Vector` and `GSL::Vector::Int`) / matrix data (`GSL::Matrix::*`).
Red Arrow GSL adds `Arrow::*Array#to_gsl`/`Arrow::Tensor#to_gsl` for Apache Arrow to GSL conversion. Red Arrow GSL adds `GSL::Vector#to_arrow`/`GSL::Vector::Int#to_arrow`/`GSL::Matrix::*#to_arrow` for GSL to Apache Arrow conversion.
## Install
```text
% gem install red-arrow-gsl
```
## Usage
```ruby
require "arrow-gsl"
double_array.to_gsl # -> An object of GSL::Vector
int32_array.to_gsl # -> An object of GSL::Vector::Int
tensor.to_gsl # -> An object of GSL::Matrix or GSL::Matrix::Int
gsl_vector.to_arrow # -> An object of Arrow::DoubleArray
gsl_int_vector.to_arrow # -> An object of Arrow::Int32Array
gsl_matrix.to_arrow # -> An object of Arrow::Tensor
```
## Dependencies
* [Red Arrow](https://github.com/red-data-tools/red-arrow)
* [Ruby/GSL](https://github.com/SciRuby/rb-gsl)
## Authors
* Kouhei Sutou \
## License
Apache License 2.0. See doc/text/apache-2.0.txt for details.
(Kouhei Sutou has a right to change the license including contributed
patches.)