0

I have an array looking like this:

[array([268.95504761,  -4.17598009, 404.12548828])
array([268.9979248 ,  -4.15205622, 404.09713745])
array([269.00808716,  -4.14346504, 404.07214355])
array([280.63632202,  -8.46781635, 398.50079346])
None 
None 
array([281.69018555,  -9.98347282, 390.9984436 ])]

How do I remove the None lines? All method I found assumed the regular case of a normal 2D array containing some None elements.

Sebastian E
  • 467
  • 1
  • 3
  • 15
  • What methods have you tries? Remember this is a 1d object dtype array (or a list], not a 2d numeric array. – hpaulj Aug 12 '19 at 14:33

1 Answers1

3
[elem for elem in my_list if elem is not None]

Simple list-comprehension? Correct me if I misunderstood you :-)

Bjarke Kingo
  • 400
  • 7
  • 14