https://github.com/red-data-tools/red-datasets-numo-narray
A Red Datasets plugin to export dataset as Numo::NArray object
https://github.com/red-data-tools/red-datasets-numo-narray
Last synced: 12 months ago
JSON representation
A Red Datasets plugin to export dataset as Numo::NArray object
- Host: GitHub
- URL: https://github.com/red-data-tools/red-datasets-numo-narray
- Owner: red-data-tools
- License: mit
- Created: 2019-03-24T03:07:01.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-03-24T03:59:43.000Z (over 7 years ago)
- Last Synced: 2025-05-14T07:21:53.910Z (about 1 year ago)
- Language: Ruby
- Size: 3.91 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# README
## Name
Red Datasets Numo::NArray
## Description
Red Datasets Numo::NArray adds [Numo::NArray](https://github.com/ruby-numo/numo-narray) object export feature to Red Datasets.
Red Datasets Numo::NArray adds `#to_narray` method to each dataset and its table in Red Datasets. You can get data as Numo::NArray's numeric subclass object.
## Install
```console
% gem install red-datasets-numo-narray
```
## Usage
Here is an example to export iris data as Numo::NArray's numeric subclass objects by `Datasets::Dataset#to_narray` and `Datasets::Table#to_narray`:
```ruby
require "datasets-numo-narray"
iris = Datasets::Iris.new
puts iris.to_narray(:sepal_length,
:sepal_width,
:petal_length,
:petal_width)
iris_table = iris.to_table
puts iris_table.to_narray(:sepal_length,
:sepal_width,
:petal_length,
:petal_width)
```
## License
The MIT license. See `LICENSE.txt` for details.