Skip to content

Instantly share code, notes, and snippets.

@vaiorabbit
Created November 6, 2016 10:39
Show Gist options
  • Save vaiorabbit/1534cbbbf204cceb35df961feb8460a7 to your computer and use it in GitHub Desktop.
Save vaiorabbit/1534cbbbf204cceb35df961feb8460a7 to your computer and use it in GitHub Desktop.
# coding: utf-8
# $ which gcc-6
# /usr/local/bin/gcc-6
# $ CXX=`which g++-6` CC=`which gcc-6` rvm install ruby-2.3.1
# $ rvm use --default ruby-2.3.1
# $ ruby --version
# ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin16]
# $ gem install nmatrix
# https://github.com/SciRuby/nmatrix
require 'nmatrix'
mtx = NMatrix.new([2, 3], [0, 1, 2, 3, 4, 5], dtype: :int64)
p mtx.shape # => [2, 3]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment