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
  • 77,035
  • 9
  • 115
  • 152

0 Answers0