How can I check whether a numpy array is empty or not?

I used the following code, but this fails if the array contains a zero.

if not self.Definition.all():

Is this the solution?

if self.Definition == array([]):

4 Answers
4

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *