Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Last argument as keyword parameters is deprecated in Ruby 2.7 #631

Open
wtaysom opened this issue Aug 18, 2021 · 0 comments
Open

Last argument as keyword parameters is deprecated in Ruby 2.7 #631

wtaysom opened this issue Aug 18, 2021 · 0 comments

Comments

@wtaysom
Copy link

wtaysom commented Aug 18, 2021

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant