Last argument as keyword parameters is deprecated in Ruby 2.7
wtaysom opened this issue · 0 comments
wtaysom commented
I ran across it in these two spots:
/.rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/nmatrix-0.2.4/lib/nmatrix/shortcuts.rb:203: warning: Using the last argument as keyword parameters is deprecated
/.rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/nmatrix-0.2.4/lib/nmatrix/shortcuts.rb:233: warning: Using the last argument as keyword parameters is deprecated
Those are the methods NMatrix::[]
and NMatrix.zeros
. The fixes are trivial. For example, NMatrix.zeros
could be changed to:
def zeros(shape, **opts)
NMatrix.new(shape, 0, **{:dtype => :float64}.merge(opts))
end