ruby-numo / numo-narray

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

Multiplying by BigDecimal #208

Open dvisockas opened 1 year ago

dvisockas commented 1 year ago

Hey,

I ran into an issue that Numo::SFloat.cast([1]) * BigDecimal(1) raises an NoMethodError: in '*': undefined method 'cast' for nil:NilClass (NoMethodError)

Is this expected or is a PR welcome to support multiplication by types that implement #to_f method (which in the end solves the problem)?