diff options
| author | yum <yum.food.vr@gmail.com> | 2025-10-19 17:21:47 -0700 |
|---|---|---|
| committer | yum <yum.food.vr@gmail.com> | 2025-10-19 17:21:47 -0700 |
| commit | 22aab789e97a72ab88fc59bd979b67ba1ca5e5be (patch) | |
| tree | 2424edd00a5840387a0bf5a6b068ea8225ff1c08 | |
| parent | f65f4b6e07b47115911bf33deb90597e201c1066 (diff) | |
balls
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | Scripts/approximate.py | 2 |
2 files changed, 2 insertions, 1 deletions
@@ -1 +1,2 @@ *.meta +.*.sw[po] diff --git a/Scripts/approximate.py b/Scripts/approximate.py index 1bfe13f..fb39283 100644 --- a/Scripts/approximate.py +++ b/Scripts/approximate.py @@ -278,7 +278,7 @@ def main(argv: list[str] | None = None) -> int: ) theta = 2.0 * np.pi * (xs - args.start) / length - sorted_terms = sorted(terms, key=lambda term: term.amplitude, reverse=True) + sorted_terms = sorted(terms, key=lambda term: abs(term.amplitude), reverse=True) available_components = len(sorted_terms) if args.terms > available_components: |
