Repository navigation
fix: initializer keyword types - #570
Merged
Merged
Conversation
…y radius chebyshev_mapping threw a DomainError from acos for amplitude > 1; it now throws an ArgumentError for abs(amplitude) > 1, the range where the mapping is defined. Integer and Rational values were rejected for radius and the other numeric initializer keywords (TypeError, or a MethodError in scale_radius!). The keywords now take Real, and scale_radius! has a Real method that forwards float(radius); float radii take the same path as before. double_cycle and selfloop_backward_cycle accepted vector weights in their signatures but failed when assigning them. Vectors of length res_size are now placed per entry, and other lengths throw a DimensionMismatch. Scalar weights give the same matrices as before. permute_matrix! had no method without an rng; it now uses the default rng. low_connectivity with radius=nothing was still rescaled to spectral radius 1 by build_cycle's own default radius, and computed the eigenvalues twice. build_cycle no longer rescales: radius=nothing leaves the matrix unscaled and an explicit radius is applied once (outputs change only by rounding). The pseudo_svd docstring now describes sparsity as the threshold on the nonzero to zero ratio that the code uses. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merged
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.
chebyshev_mapping threw a DomainError from acos for amplitude > 1; it now throws an ArgumentError for abs(amplitude) > 1, the range where the mapping is defined.
Integer and Rational values were rejected for radius and the other numeric initializer keywords (TypeError, or a MethodError in scale_radius!). The keywords now take Real, and scale_radius! has a Real method that forwards float(radius); float radii take the same path as before.
double_cycle and selfloop_backward_cycle accepted vector weights in their signatures but failed when assigning them. Vectors of length res_size are now placed per entry, and other lengths throw a DimensionMismatch. Scalar weights give the same matrices as before.
permute_matrix! had no method without an rng; it now uses the default rng.
low_connectivity with radius=nothing was still rescaled to spectral radius 1 by build_cycle's own default radius, and computed the eigenvalues twice. build_cycle no longer rescales: radius=nothing leaves the matrix unscaled and an explicit radius is applied once (outputs change only by rounding).
The pseudo_svd docstring now describes sparsity as the threshold on the nonzero to zero ratio that the code uses.
Checklist
contributor guidelines, in particular the SciML Style Guide and
COLPRAC.
Additional context
Add any other context about the problem here.