0

Example:

import numpy as np

blah = np.array([['10.12.5.40', 0],
                 ['10.12.5.40', 1],
                 ['10.12.5.40', 2]])

print(['10.12.5.40', 2] in blah)

print(['10.12.5.40', 10] in blah)

The first usage of in works correctly, giving True for an existing element in the array. However, the second usage asks for a non-existing element but True is returned nevertheless.

juanpa.arrivillaga
  • 88,713
  • 10
  • 131
  • 172

0 Answers0