0

I'm new to Python, but an experienced Matlab user. What I'm stuck with is comparing numpy arrays. I have one variable called station with size (8,). I have a second numpy array (s_id) of size (1736,8). I'm trying to find the index in s_id that station corresponds to i.e. there will be one row of s_id that matches station. Note that both numpy arrays are of type bytes8 as they have been read in as variables from a netcdf file.

How best to compare? I have looked at using np.array_equal(s_id,station) but I can't quite get my head around what that's doing. Any help is appreciated. I think the issue is that my head is wired up to think of Matlab arrays!

0 Answers0