ruby-numo/numo-narray

Can't load 0-dimensional binary string

ankane opened this issue · 1 comments

Raises Numo::NArray::DimensionError: too long or empty shape (0)

require "numo/narray"

x = Numo::UInt8.from_binary("\x00", [1])
p x

x = Numo::UInt8.from_binary("\x00", [])
p x # fails

Just noticed this was added in 0.9.1.9. Thanks @masa16!