Conversation
…th ndim+2 monogenic channels - Replace RealUDCTCoefficients/ComplexUDCTCoefficients with single generic UDCTCoefficients[T] - Make UDCTWindows generic over floating types using UDCTWindows[F] - Update monogenic coefficients to use ndim+2 real channels instead of ndim+1 complex - Store complex scalar as 2 real channels (scalar.real, scalar.imag) for monogenic transform - Reconstruct complex scalar via .view(complex_dtype) on first 2 channels in backward transform - Update tests to verify ndim+2 channels and real dtype for monogenic coefficients
…ws type aliases consistently
- Change F, C, T TypeVars from constrained to bound per NumPy recommendation
- F = TypeVar("F", bound=np.floating)
- C = TypeVar("C", bound=np.complexfloating)
- T = TypeVar("T", bound=np.inexact)
- Add type parameters to all UDCTWindows usages (e.g., UDCTWindows[np.floating])
- Replace raw list[list[list[npt.NDArray[...]]]] with UDCTCoefficients[T] throughout
- Remove unused type: ignore comments that are no longer needed
- Fix unreachable code warnings by restructuring transform_kind dispatch logic
- Rename _typing.py to typing.py in numpy and torch modules - Add __all__ to export public types (UDCTCoefficients, UDCTWindows) - Make internal types private with underscore prefix (_F, _C, _T, _A, etc.) - Update all imports across source and test files - Fix mypy overload-cannot-match type ignore placement
… with numpy - Use generic TypeVar _T for circular_shift instead of np.generic - Remove explicit type annotation from MEYER_TRANSITION_POLYNOMIAL (use np.float64) - Add comments for matplotlib to_rgba accepting scalars (type stub limitation) - Fix torch.sqrt argument type by replacing sum() with explicit loop - Align torch _struct_monogenic with numpy: stack channels along last axis (reduces nesting from 4 to 3 levels, uses ndim+2 channels) - Add _vect_monogenic for channel-wise coefficient serialization - Fix _UDCTFunction.backward signature to use *grad_outputs (LSP compliance) - Add ty: ignore comments for dynamic FunctionCtx.udct attribute
- Add ty configuration to pyproject.toml with environment and rules - Configure ty to check src/ and tests/ with examples excluded - Set unused-ignore-comment to warn during migration period - Add ty ignore comments for matplotlib to_rgba scalar arguments - Update documentation to reference both ty and mypy as type checkers - Keep mypy configuration for compatibility during transition
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #57 +/- ##
==========================================
- Coverage 94.26% 93.90% -0.36%
==========================================
Files 27 27
Lines 1848 1855 +7
==========================================
Hits 1742 1742
- Misses 106 113 +7 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Note
Modernizes typing and monogenic UDCT internals, and wires up fast Rust-based type checking.
numpy._typing/torch._typingwith newnumpy.typingandtorch.typingmodules; propagate_F,_C, genericUDCTCoefficients/UDCTWindows, and_to_(real|complex)_dtype; update all imports/signatures across NumPy/Torch code[scalar.real, scalar.imag, riesz_1..riesz_ndim](real dtype); update forward/backward implementations,vect/struct, and tests; example adjusts by viewing first 2 channels as complexto_rgbaignores)tyconfiguration inpyproject.toml(env, src/includes, rules/overrides); docs mentiontyalongsidemypy; noxpre-commitinvocation simplifiedWritten by Cursor Bugbot for commit 291a671. This will update automatically on new commits. Configure here.