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

'sum' method for Numo::RObject returns wrong value #169

Open
himotoyoshi opened this issue Aug 1, 2020 · 1 comment
Open

'sum' method for Numo::RObject returns wrong value #169

himotoyoshi opened this issue Aug 1, 2020 · 1 comment

Comments

@himotoyoshi
Copy link

The "sum" method of "Numo::RObject", which contains the number, returns a strange value.

require "numo/narray"

p Numo::RObject.cast([1, 2, 3]).sum
#=> 13 (should be 6)

p Numo::RObject.cast([1.0, 2.0, 3.0]).sum
#=> 54043195528445954 (should be 6.0)

Is this behavior only occurring in my environment,

  • MacOS 10.14
  • Ruby 2.6.2p47 built with Apple clang version 11.0.0 (clang-1100.0.33.16)
  • numo-narray-0.9.1.8
@kojix2
Copy link
Contributor

kojix2 commented Aug 2, 2020

Hi
It happens in my environment, too.

  • Ubuntu 19.10 ( I have to update soon... )
  • Ruby 2.7.1
  • numo-narray 0.9.1.8

masa16 added a commit that referenced this issue Dec 13, 2020
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

2 participants