Skip to content

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

Open

Description

@himotoyoshi

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

Activity

  1. kojix2 commented on Aug 2, 2020

    @kojix2
    Contributor

    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
  2. added a commit that references this issue on Dec 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions