Repository navigation
Conversation
githubnemo
reviewed
Oct 15, 2026
githubnemo
left a comment
Collaborator
There was a problem hiding this comment.
Thanks for the PR, this is indeed an issue with the numpy conversion. I have some comments to make the code more consistent with the current code base.
Author
|
Updated the guard to call resolve_conj only when is_conj is available and true. The conjugate case now uses a fixture and the existing list, tuple, and dict conversion tests; the fixture uses complex values so conj() actually sets the conjugate bit. The utils module passes 99 tests with 28 existing skips on CPU, including unavailable devices and pandas. |
githubnemo
approved these changes
Oct 20, 2026
githubnemo
left a comment
Collaborator
There was a problem hiding this comment.
Nice, the changes look good.
Let's see what the CI says, otherwise it's good to go.
Collaborator
|
@ktz03 can you resolve the conflicts? :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
to_numpyraisesRuntimeErrorfor a complex PyTorch tensor with its conjugate bit set, including otherwise-supported list, tuple and dictionary inputs. For example, convertingtorch.tensor([1 + 2j]).conj()fails instead of returning[1 - 2j].Resolve conjugate views after the existing CPU/detach handling and before NumPy conversion. Guard the optional method so older tensors without
resolve_conjretain their existing path. Add regressions covering complex64/complex128, gradients, non-contiguous views and supported containers, plus a changelog entry.Validation on Windows, Python 3.12.14, NumPy 2.3.5 and PyTorch 2.8.0 CPU:
test_utils.py: 114 passed, 28 skipped; the same final tests on unchanged production code produce 16 failures and 98 passes.pylint skorch: the same 1,246 baseline diagnostics, with no added diagnostics;git diff --checkpasses.The full project suite, GPU and the currently documented PyTorch version matrix were not run locally.