Open
Description
Hi @willow-ahrens,
The pydata/sparse#865 is almost ready - we only have a few edge cases for jl.reshape
function missing.
ATM reshape
doesn't cover cases where input is a scalar and reshape
is meant to expand dims. Likewise, for one-element tensors when dropping dims (and hypothesis in Array API tests came across these cases).
Here's a script that reproduces it:
using Finch
T1 = swizzle(Tensor(Element(0, 0)))
T2 = swizzle(Tensor([0]), 1)
reshape(T1)
reshape(T1, 1) # fails
reshape(T1, 1, 1) # fails
reshape(T2, 1)
reshape(T2, 1, 1)
reshape(T2) # fails