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

Numo::NArray.zeros() - allocator undefined for Numo::NArray (TypeError)

Open ghost opened this issue 5 months ago • 0 comments

In ruby I call: @vector_dimension=50 66: sum_vector = Numo::NArray.zeros(@vector_dimension)

i get this vector_model_loader.rb:66:in `zeros': allocator undefined for Numo::NArray (TypeError)

sum_vector = Numo::NArray.zeros(@vector_dimension)
                                ^^^^^^^^^^^^^^^^^
from lib/vector_model_loader.rb:66:in `average_vectors'
from scripts/index_book.rb:41:in `block in <main>'
from scripts/index_book.rb:38:in `each'
from scripts/index_book.rb:38:in `each_with_index'
from scripts/index_book.rb:38:in `<main>'

require 'numo/narray' => true irb(main):002:0> Numo::NArray.zeros(5) (irb):2:in `zeros': allocator undefined for Numo::NArray (TypeError)

Same with ruby 3.4.4 as 3.2.8. Tried downgrading to 0.9.2.0 doesnt compile. 0.9.1 is for ruby 2.1

lsb_release -a No LSB modules are available. Distributor ID: Debian Description: Debian GNU/Linux 12 (bookworm) Release: 12 Codename: bookworm

ghost avatar Jul 07 '25 12:07 ghost