Check if a value exists in an array in Cython
You pretty much have to iterate through the array and check each element.
#include <stdbool.h>
bool isvalueinarray(int val, int *arr, int size){
int i;
for (i=0; i < size; i++) {
if (arr[i] == val)
return true;
}
return false;
}