ruby-numo / numo-narray

Ruby/Numo::NArray - New NArray class library
http://ruby-numo.github.io/narray/
BSD 3-Clause "New" or "Revised" License
418 stars 42 forks source link

more RObject issues #52

Closed lisleadam closed 7 years ago

lisleadam commented 7 years ago

thanks for your recent fixes to RObject issues. unfortunately other issues arise (perhaps previous fixes were not enough?)

1) the following assignment raises exception

na=Numo::RObject.new(3).fill("a")
na[0..-1]="b"
=>Numo::NArray::CastError: unknown conversion from NilClass to Numo::RObject

this happens no matter what type of values you try to put, only exception being Numeric

2) Numo::RObject#eq (or ne) raises exception

na=Numo::RObject.new(3).fill("a")
na.eq "a"
=>NoMethodError: undefined method `cast' for nil:NilClass
na.eq :a
=>NoMethodError: undefined method `cast' for nil:NilClass

na2=Numo::RObject.new(3).fill(0)
na2.eq 0
=>NoMethodError: undefined method `eq' for 0:Integer
masa16 commented 7 years ago

Recent commits will fix these problems. thx