Skip to content

Commit abaa9ad

Browse files
committed
Fix UDF examples with wrong indendation #782
1 parent e43fdcf commit abaa9ad

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

docs/udf.rst

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ using the openEO Python Client library:
2929
3030
# Build a UDF object from an inline string with Python source code.
3131
udf = openeo.UDF(
32-
"""
33-
import xarray
32+
"""
33+
import xarray
3434
35-
def apply_datacube(cube: xarray.DataArray, context: dict) -> xarray.DataArray:
36-
cube.values = 0.0001 * cube.values
37-
return cube
38-
"""
35+
def apply_datacube(cube: xarray.DataArray, context: dict) -> xarray.DataArray:
36+
cube.values = 0.0001 * cube.values
37+
return cube
38+
"""
3939
)
4040
4141
# Or load the UDF code from a separate file.
@@ -252,13 +252,13 @@ The UDF-specific part is highlighted.
252252
253253
# Create a UDF object from inline source code.
254254
udf = openeo.UDF(
255-
"""
256-
import xarray
255+
"""
256+
import xarray
257257
258-
def apply_datacube(cube: xarray.DataArray, context: dict) -> xarray.DataArray:
259-
cube.values = 0.0001 * cube.values
260-
return cube
261-
"""
258+
def apply_datacube(cube: xarray.DataArray, context: dict) -> xarray.DataArray:
259+
cube.values = 0.0001 * cube.values
260+
return cube
261+
"""
262262
)
263263
264264
# Pass UDF object as child process to `apply`.

0 commit comments

Comments
 (0)