2

I have an awkward array (1) which I obtained post-processing.

An array look like:

>>> ak.Array([96., 99., 67., 13.,  3.,  None, 1.,  1.,None])

I want to remove the None elements from this array. I could remove them using loop, but I want to avoid it to save some computing time. Or writing a function and compiling using Numba is only option?

Thanks.

Raman Khurana
  • 125
  • 1
  • 7

1 Answers1

3

I just realised that is_none exist and works like charm,

a[~ak.is_none(a)]

Cedric H.
  • 7,980
  • 10
  • 55
  • 82
Raman Khurana
  • 125
  • 1
  • 7