No commit activity in last 3 years
No release in over 3 years
Red Datasets Numo::NArray adds `#to_narray` method to each dataset in Red Datasets. You can get dataset as Numo::NArray's numeric subclass object.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

 Project Readme

README

Name

Red Datasets Numo::NArray

Description

Red Datasets Numo::NArray adds 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

% 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:

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.