MachineLearningLifeScience / stochman

Algorithms for computations on random manifolds made easier
Apache License 2.0
85 stars 11 forks source link

Added 'indexing' kwarg to torch.meshgrid #25

Closed pnkraemer closed 1 year ago

pnkraemer commented 1 year ago

While executing the `computing_geodesics' example notebook With torch version 1.13.1 I received a

UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at ../aten/src/ATen/native/TensorShape.cpp:3190.)
  return _VF.meshgrid(tensors, **kwargs)  # type: ignore[attr-defined]

which was easy to fix:

gridX, gridY = torch.meshgrid([ran, ran])

becomes

gridX, gridY = torch.meshgrid([ran, ran], indexing="ij")

and the output remains the same.

In case you want this change in the main repo, here we go. If not, no hard feelings if you delete this PR.

codecov-commenter commented 1 year ago

Codecov Report

Patch and project coverage have no change.

Comparison is base (ec4169b) 52.57% compared to head (6704ea6) 52.57%.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #25 +/- ## ======================================= Coverage 52.57% 52.57% ======================================= Files 9 9 Lines 1533 1533 ======================================= Hits 806 806 Misses 727 727 ``` | Flag | Coverage Δ | | |---|---|---| | Linux | `52.57% <ø> (ø)` | | | Windows | `?` | | | cpu | `52.57% <ø> (ø)` | | | macOS | `52.57% <ø> (ø)` | | | pytest | `52.57% <ø> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=MachineLearningLifeScience#carryforward-flags-in-the-pull-request-comment) to find out more. Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=MachineLearningLifeScience). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=MachineLearningLifeScience)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.