MAINT: Remove `np.in1d` function calls
Hi!
This PR changes `np.in1d` calls to `np.isin` as `np.in1d` is being made private in https://github.com/numpy/numpy/pull/24445.

I wasn't sure if arrays passed to it are surely 1d, therefore I called `.ravel()` to fully reproduce `in1d` behavior. If any of these lines actually operate on 1d arrays, then `isin` and `in1d` can be used interchangeably. 
Thanks @mtsokol 