red-data-tools/numpy.rb

`np.mean([0.0]) != 0.0` returns Python's False

Closed this issue · 0 comments

mame commented
irb(main):001:0> require "pycall/import"
=> true
irb(main):002:0> include PyCall::Import
=> Object
irb(main):003:0> pyimport "numpy", as: "np"
=> :np
irb(main):004:0> np.mean([0.0]) != 0.0
=> False
irb(main):005:0> p :foo if np.mean([0.0]) != 0.0
:foo
=> :foo

I expect Line 4 to return Ruby's false, not Python's False.