No commit activity in last 3 years
No release in over 3 years
`MemoryViewTestHelper::NDArray` provides simple multi-dimensional numeric array that can export MemoryView.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

 Project Readme

MemoryViewTestHelper

Description

MemoryViewTestHelper provides features that help to test libraries that include MemoryView support.

MemoryViewTestHelper::NDArray provides simple multi-dimensional numeric array that can export MemoryView.

Install

$ gem install memory-view-test-helper

Usage

First you need to require memory-view-test-helper library.

require "memory-view-test-helper"

You can create a multi-dimensional numeric array by MemoryViewTestHelper.new.

x = MemoryViewTestHelper::NDArray.new([[1, 2, 3], [4, 5, 6]], dtype: :float64)

By this expression, x refers a 2x3 matrix of 64-bit floating point numbers.

License

The MIT license. See LICENSE.txt for details.