0

I have a python array b

>>> print b

[array([0]), array([47, 48, 49, 50]), array([97, 98, 99])]

I want to find the first element of all sub-arrays whose lenth is greater than 1

i.e. I want 47 and 97

How do I achieve this result using numpy.where or otherwise?

I tried numpy.where( numpy.array(b).shape > 1 ) but it gives wrong result.

user13107
  • 3,239
  • 4
  • 34
  • 54

0 Answers0