numo-narray icon indicating copy to clipboard operation
numo-narray copied to clipboard

Bug in `Numo::DFloat#dot` after requiring `numo/linalg`

Open giuse opened this issue 6 years ago • 0 comments

Not sure whether this issue goes here or in numo-linalg.

require 'numo/narray'
# => true
a = Numo::DFloat.new(5).seq
# => Numo::DFloat#shape=[5]
# [0, 1, 2, 3, 4]
b = Numo::DFloat.new(3,5).seq
# => Numo::DFloat#shape=[3,5]
# [[0, 1, 2, 3, 4], 
#  [5, 6, 7, 8, 9], 
#  [10, 11, 12, 13, 14]]
b.dot a
# => Numo::DFloat#shape=[3]
# [30, 80, 130]
a.dot b.transpose
# => Numo::DFloat#shape=[3]
# [30, 80, 130]
require 'numo/linalg'
# => true
b.dot a
# => Numo::DFloat#shape=[3]
# [30, 80, 130]
a.dot b.transpose
#  ** On entry to DGEMV  parameter number  6 had an illegal value
# => Numo::DFloat#shape=[3]
# [0, 0, 0]

I am using the last published gems:

$ gem list numo

*** LOCAL GEMS ***

numo-gsl (0.1.2)
numo-linalg (0.1.2)
numo-narray (0.9.1.2)

giuse avatar Apr 30 '18 19:04 giuse