Skip to content

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

@ghost

Description

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions