Closed ankane closed 2 years ago
Trying to reshape to a 0-dimensional array raises ArgumentError: No argrument (with a small typo)
ArgumentError: No argrument
require "numo/narray" x = Numo::NArray.cast([1]) p x.ndim x2 = x.reshape # fails p x2.ndim
numo-narray does not support creating 0-dimensional array. Why do you think you require 0-dimensional array?
It's possible to create a 0-dimensional array, so I thought Numo supported it.
x = Numo::NArray.cast(1) x.ndim # 0 x.shape # []
I ran into this while writing tests for Npy, which loads NumPy files.
Trying to reshape to a 0-dimensional array raises
ArgumentError: No argrument
(with a small typo)