Skip to content

Commit

Permalink
#319 remove unsupported argument, let xarray throw an error
Browse files Browse the repository at this point in the history
  • Loading branch information
jdries committed Aug 9, 2023
1 parent e06c72d commit ff4b8ae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions openeogeotrellis/geopysparkdatacube.py
Original file line number Diff line number Diff line change
Expand Up @@ -560,12 +560,12 @@ def tile_function(metadata:Metadata,
result_array: xr.DataArray = cubes[0].array
_log.debug(f"[apply_tiles_spatiotemporal] UDF resulted in {result_array}!r")
if 't' in result_array.dims:
result_array = result_array.transpose(*('t' ,'bands','y', 'x'), missing_dims="warn")
result_array = result_array.transpose(*('t' ,'bands','y', 'x'))
return [(SpaceTimeKey(col=tiles[0].col, row=tiles[0].row, instant=pd.Timestamp(timestamp)),
Tile(array_slice.values, CellType.FLOAT32, tile_list[0][1].no_data_value))
for timestamp, array_slice in result_array.groupby('t')]
else:
result_array = result_array.transpose(*( 'bands', 'y', 'x'), missing_dims="warn")
result_array = result_array.transpose(*( 'bands', 'y', 'x'))
return [(SpaceTimeKey(col=tiles[0].col, row=tiles[0].row, instant=datetime.fromisoformat('2020-01-01T00:00:00')),
Tile(result_array.values, CellType.FLOAT32, tile_list[0][1].no_data_value))]

Expand Down

0 comments on commit ff4b8ae

Please sign in to comment.