@@ -342,6 +342,8 @@ def grid2points(
342342 grid_values (np.ndarray): Grid values
343343 operator (str, optional): Interpolation operator. Defaults to "bilinear".
344344 elev_gradient (float, optional): Elevation gradient for downscaler
345+ max_distance (float, optional): Maximum distance from grid points.
346+ Defaults to 25000.0.
345347
346348 Raises:
347349 NotImplementedError: Operator not implemented
@@ -363,7 +365,7 @@ def grid2points(
363365 grid .grid , points .points , grid_values , elev_gradient , gridpp .Bilinear
364366 )
365367 in_grid = np .array (points .inside_grid (grid , distance = max_distance ))
366- values [in_grid == False ] = np .nan
368+ values [in_grid == False ] = np .nan # noqa: E712
367369 elif operator == "nearest" :
368370 if elev_gradient is None :
369371 values = gridpp .nearest (grid .grid , points .points , grid_values )
@@ -372,7 +374,7 @@ def grid2points(
372374 grid .grid , points .points , grid_values , elev_gradient , gridpp .Nearest
373375 )
374376 in_grid = np .array (points .inside_grid (grid , distance = max_distance ))
375- values [in_grid == False ] = np .nan
377+ values [in_grid == False ] = np .nan # noqa: E712
376378 else :
377379 raise NotImplementedError (f"Operator { operator } not implemented!" )
378380 return values
0 commit comments