Skip to content

Commit

Permalink
Fix code in docstring example
Browse files Browse the repository at this point in the history
  • Loading branch information
JoerivanEngelen committed Aug 2, 2024
1 parent c93ed2f commit 42d0d32
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions xugrid/ugrid/snapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,11 +361,11 @@ def create_snap_to_grid_dataframe(
Use the ``line_index`` column to assign values from ``lines`` to this new dataframe:
>>> snapping_df["my_variable"] = lines["my_variable"].iloc[snapping_df["line_index"]]
>>> snapping_df["my_variable"] = lines["my_variable"].iloc[snapping_df["line_index"]].to_numpy()
Run some reduction on the variable, to create an aggregated value per grid edge:
>>> aggregated = snapping_df.groupby("edge_index").sum()["my_variable"]
>>> aggregated = snapping_df.groupby("edge_index").sum()
Assign the aggregated values to a Ugrid2d topology:
Expand Down

0 comments on commit 42d0d32

Please sign in to comment.