lanl / scico

Scientific Computational Imaging COde
BSD 3-Clause "New" or "Revised" License
90 stars 17 forks source link

Inappropriate contstruction of `BlockArray` by `scico.numpy.ones` #499

Closed bwohlberg closed 4 months ago

bwohlberg commented 4 months ago

There appears to be an error in the wrappers used to construct scico.numpy functions from corresponding jax.numpy functions. Note the following examples, comparing jax.numpy.ones

jnp.ones(())
> Array(1., dtype=float32)
jnp.ones(()).shape
> ()

with scico.numpy.ones

snp.ones(())
> BlockArray([])
snp.ones(()).shape
> IndexError ...