Sha256: cdf84faf2f91ddb175ef62e5ab678161a3355a6c5ce78470c80e0226e80f3dee

Contents?: true

Size: 1.22 KB

Versions: 5

Compression:

Stored size: 1.22 KB

Contents

# = NMatrix
#
# A linear algebra library for scientific computation in Ruby.
# NMatrix is part of SciRuby.
#
# NMatrix was originally inspired by and derived from NArray, by
# Masahiro Tanaka: http://narray.rubyforge.org
#
# == Copyright Information
#
# SciRuby is Copyright (c) 2010 - 2014, Ruby Science Foundation
# NMatrix is Copyright (c) 2012 - 2014, John Woods and the Ruby Science Foundation
#
# Please see LICENSE.txt for additional copyright notices.
#
# == Contributing
#
# By contributing source code to SciRuby, you agree to be bound by
# our Contributor Agreement:
#
# * https://github.com/SciRuby/sciruby/wiki/Contributor-Agreement
#
# == rspec_spec.rb
#
# A spec for testing monkey patches to RSpec for NMatrix.
#
require 'spec_helper'

describe "RSpec" do
  it "should permit #be_within to be used on a dense NMatrix" do
    pending("not yet implemented for NMatrix-JRuby") if jruby?
    expect(NMatrix.new([4,1], 1.0, dtype: :complex128, stype: :dense) / 10000.0).to be_within(0.00000001).of(NMatrix.new([4,1], 0.0001, dtype: :float64, stype: :dense))
    expect(NMatrix.new([4,1], 1.0, dtype: :complex128, stype: :dense) / 10000.0).not_to be_within(0.00000001).of(NMatrix.new([4,1], 1.0, dtype: :float64, stype: :dense))
  end
end

Version data entries

5 entries across 5 versions & 5 rubygems

Version Path
pnmatrix-1.2.4 spec/rspec_spec.rb
nmatrix-lapacke-0.2.4 spec/rspec_spec.rb
nmatrix-fftw-0.2.4 spec/rspec_spec.rb
nmatrix-atlas-0.2.4 spec/rspec_spec.rb
nmatrix-0.2.4 spec/rspec_spec.rb