spec/slice_set_spec.rb in nmatrix-0.2.3 vs spec/slice_set_spec.rb in nmatrix-0.2.4
- old
+ new
@@ -38,12 +38,16 @@
example "set and unset a range of entries with single values" do
if stype == :yale
step "verify correct arrangement of Yale IJA and A arrays" do
- @m.extend NMatrix::YaleFunctions
- expect(@m.yale_ija).to eq([4,6,8,10,1,2,0,2,0,1])
+ @m.extend NMatrix::YaleFunctions unless jruby?
+ if jruby?
+ pending("not yet implemented for NMatrix-JRuby")
+ else
+ expect(@m.yale_ija).to eq([4,6,8,10,1,2,0,2,0,1])
+ end
expect(@m.yale_a).to eq([0,4,8,0, 1,2,3,5,6,7])
end
end
step "set and reset a single entry" do
@@ -143,9 +147,10 @@
expect(m[0..1,1..2]).to eq(slice_result_b)
end
end
example "set a range of values to a matrix's contents" do
+ pending("not yet implemented for int dtype for NMatrix-JRuby") if jruby?
x = NMatrix.new(4, stype: :yale, dtype: :int16)
x.extend NMatrix::YaleFunctions if stype == :yale
x[1..3,1..3] = @m
expect(x.to_flat_array).to eq([0,0,0,0, 0,0,1,2, 0,3,4,5, 0,6,7,8])
end