Skip to content

Conversation

@NilsChudalla
Copy link
Member

@NilsChudalla NilsChudalla commented Nov 4, 2025

Description

When using Pytorch, Marching cubes algorithm was unable to resolve due to tensor object, where ndarrays should be. This issue occured for scalarfields and in some cases for masks, too. This PR contains the test for pytorch (copied after the existing MC test) and the fix.

Relates to

Checklist

  • My code uses type hinting for function and method arguments and return values.
  • I have created tests which cover my code.
  • The test code either 1. demonstrates at least one valuable use case (e.g. integration tests)
    or 2. verifies that outputs are as expected for given inputs (e.g. unit tests).
  • New tests pass locally with my changes.

@Leguark Leguark self-requested a review November 12, 2025 10:29
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
Copy link
Member

@Leguark Leguark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Nils. Sorry for the delay, I am changing the computer where we are running the tests and I had to update some paths

I just changed the line the AI suggested (I am pretty sure it was right).

Copy link
Member

Leguark commented Nov 12, 2025

@NilsChudalla this is ready to press the big green button

@NilsChudalla
Copy link
Member Author

But I am nervous, because it is my first PR to gempy 😜

no, I actually got this error for every merge option:
image

@Leguark Leguark merged commit d94b7ee into gempy-project:main Nov 13, 2025
2 checks passed
@NilsChudalla NilsChudalla deleted the marching-cubes-fix branch November 13, 2025 08:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants