Due to near[n,1] being forced to int, I think one of these terms will always be zero while the other always 1, so no interpolation will happen.
I was able to convert the near and nearp arrays to dtype=np.float64 and then perform int conversions lower down in the function for all those places where an int is expected for indexing.
In the transect function, the near and nearp arrays are initialized with dtype=int eg:
https://github.com/ESMG/pyroms/blob/32320b16d30132d7bf2a3be15f2c2358e20af0d1/pyroms/pyroms/tools.py#L770
This change was done in this commit: https://github.com/ESMG/pyroms/commit/76b9101a96999f870aa96c599ded97911da44ae0
Further down in the function, I believe floats are expected because this would allow for interpolation between two columns of data:
https://github.com/ESMG/pyroms/blob/32320b16d30132d7bf2a3be15f2c2358e20af0d1/pyroms/pyroms/tools.py#L853 https://github.com/ESMG/pyroms/blob/32320b16d30132d7bf2a3be15f2c2358e20af0d1/pyroms/pyroms/tools.py#L854
Due to near[n,1] being forced to int, I think one of these terms will always be zero while the other always 1, so no interpolation will happen.
I was able to convert the near and nearp arrays to dtype=np.float64 and then perform int conversions lower down in the function for all those places where an int is expected for indexing.