Skip to content
This repository has been archived by the owner on Jun 21, 2022. It is now read-only.

IndexError when masking empty jaggedArray made from offsets #239

Open
jrueb opened this issue Mar 13, 2020 · 1 comment
Open

IndexError when masking empty jaggedArray made from offsets #239

jrueb opened this issue Mar 13, 2020 · 1 comment

Comments

@jrueb
Copy link

jrueb commented Mar 13, 2020

I'm trying to apply a mask onto my JaggedArray. Unfortunately, in the corner case where the JaggedArray is empty, I can an IndexError.

a = awkward.JaggedArray.fromoffsets([1, 1], [1, 1])
mask = a > 10
a[mask]

In case of arrays created by fromcounts, this seems to work.

@jpivarski
Copy link
Member

Awkward 1 is so close to being ready that my recommendation is to use the work-around. (Leave this issue open so that anyone else who runs into this can find it.)

Thanks for reporting it, though!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants