Skip to content

Commit

Permalink
Fix FlowGraph.basins() runtime warning (python) (#147)
Browse files Browse the repository at this point in the history
* fix flow_graph.basins runtime warning (python)

* update release notes
  • Loading branch information
benbovy committed Oct 19, 2023
1 parent e909637 commit 052ae70
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions doc/source/release_notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

- Fixed ``pflood_sink_resolver`` that was "flooding too much" ({issue}`145`,
{pull}`146`).
- Fixed ``RuntimeWarning`` (invalid value in cast) issued when calling
``FlowGraph.basins()`` in Python ({pull}`147`).

## v0.2.0 (9 October 2023)

Expand Down
2 changes: 1 addition & 1 deletion include/fastscapelib/flow/flow_graph.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ namespace fastscapelib
*/
data_array_size_type basins()
{
data_array_size_type basins = data_array_type::from_shape(m_grid.shape());
data_array_size_type basins = data_array_size_type::from_shape(m_grid.shape());
auto basins_flat = xt::flatten(basins);

m_impl.compute_basins();
Expand Down

0 comments on commit 052ae70

Please sign in to comment.