ruby-numo / numo-narray

Ruby/Numo::NArray - New NArray class library
http://ruby-numo.github.io/narray/
BSD 3-Clause "New" or "Revised" License
418 stars 42 forks source link

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

Open giuse opened 6 years ago

giuse commented 6 years ago

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)