Skip to content

Commit

Permalink
Update the contiguous ragged example to match latest class
Browse files Browse the repository at this point in the history
  • Loading branch information
jerabaul29 committed Oct 31, 2024
1 parent 96628d8 commit e5235e9
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions examples/example_contiguous_ragged.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,17 @@

# %%

# this is because, under the hood, trajan is generating a Traj2D non ragged dataset that follows the usual trajan conventions
# it is possible to get a 2d-array dataset version using trajan:

xr_data.traj.ds
# compare:
print(f"{xr_data.traj.ds = }")

# with:
xr_data_as_2darray = xr_data.traj.to_2d()
print(f"{xr_data_as_2darray = }")

# naturally, the 2darray version can be dumped to disk if you want:
xr_data_as_2darray.to_netcdf("./xr_spotter_bulk_test_data_as_2darray.nc")

# %%

0 comments on commit e5235e9

Please sign in to comment.