Merged
Conversation
…local plan - create development-plan.md with phased future work (Now/Next/Later) - add /development-plan.md to .gitignore for local-only planning - add .devcontainer configuration for reproducible local development (Dockerfile, docker-compose.yml, and devcontainer.json)
…mpatibility - normalize shape/newshape in fxpmath.functions.reshape - switch internal np.reshape calls to positional shape for 1.26/2.x compatibility - add regression test for shape, newshape, and conflicting kwargs - document reshape usage in README and quick start - verified in both envs: NumPy 2.4.3 and 1.26.4
- add `fxpmath/helpers.py` with shared overflow/casting helpers for raw math paths - move casting decision logic out of `functions.py` and reuse it across kernels - fix extended-precision overflow paths in `_truediv_raw` and `_pow_raw` - apply safe object-casting guards to related raw operations and dispatch functions - add regression tests for operator overflow cases in `tests/test_operators.py` - add boundary-precision regression coverage for function dispatch in `tests/test_functions.py` - update `development-plan.md` checklist for completed P0 overflow tasks - record latest NumPy 2.x full test result (`96 passed` on NumPy `2.4.3`)
replace generic placeholder docstrings with behavior-accurate docs document parameters/returns for callable APIs and side effects for mutators improve NumPy-mapped function docs with fxpmath sizing/output semantics expand and refine Config class/property docstrings using project config behavior rewrite test docstrings to describe validated behavior (not just test names) run validation in venv (.venv/bin/python -m pytest -q, all tests passing)
Optional body: - add `.github/workflows/manual-windows-tests.yml` - enable `workflow_dispatch` with Python version input - run full test suite (`pytest -q`) on `windows-latest` without requiring a PR
Complex multiplication needs one extra output bit because each component is a sum/difference of two products. Without this guard bit, values like (-1-1j)*(-1-1j) overflow and saturate to 1j instead of 2j. - restore `is_complex` guard-bit logic in `functions.mul` output sizing - add regression test `test_issue_91_v0_4_9` in `tests/test_issues.py` Fixes #91
…rsions` - clarify that `trunc` is numeric round-toward-zero (`numpy.trunc`/`numpy.fix`) - explicitly distinguish it from arithmetic right-shift/floor for negative values - add concrete negative example (`-2046.3867 -> trunc -2046`, `floor -2047`) - apply the same wording in `README.md` and `docs/quick_start.md`
Apply the keep-mode left shift algorithm proposed in PR #92 discussion and add regression coverage for signed keep-left behavior and N-D arrays. Co-authored-by: Jonah Foley <jonah.foley@nu-quantum.com>
…s package discovery - add pyproject.toml with explicit build-system (setuptools, wheel) - move project metadata/dependencies from setup.py to [project] (PEP 621) - enable dynamic version from fxpmath.__version__ - switch package config to setuptools find discovery (include = ["fxpmath*"]) - simplify setup.py to compatibility shim (setup()) - remove obsolete setup.cfg This resolves legacy setup.py install deprecation paths and modernizes source builds to PEP 517.
Fix issue #102 (reported on v0.4.9) where complex values in uraw() were converted using a single complex comparison and produced incorrect unsigned raw output. Convert real/imag parts independently with two's-complement logic. Add regression coverage for test_issue_102_v0_4_9 and document the fix.
…ression Replace flatten-based int casting with utils.int_array in Fxp.astype() and object-cast set_val() branches, preserving existing array behavior while fixing scalar conversion crashes after repeated += growth (issue #98). Add strict regression coverage for issue #98 across both Linux-relevant sizing paths (n_word=32 and n_word=64), asserting int(Fxp) remains stable. Update changelog with #98 fix and regression entries. Update development plan status to mark #98 as solved and remove it from open P0 backlog.
…trix, and full tests Implement issue #86 by adding new rounding modes that preserve existing rounding execution paths while extending tie-breaking behavior and naming compatibility. What’s included: - Add new rounding modes: - `nearest_posinf` (ties toward +inf, SystemC `SC_RND`) - `nearest_neginf` (ties toward -inf, SystemC `SC_RND_MIN_INF`) - `nearest_zero` (ties toward zero, SystemC `SC_RND_ZERO`) - `nearest_away` (ties away from zero, SystemC `SC_RND_INF`) - `bit_trunc` (SystemC `SC_TRN` style truncation) - Keep legacy passthrough behavior for integer/object raw-domain paths in `_round` and add a warning when object dtype reaches rounding with `n_word < n_word_max`. - Extend rounding config with canonical modes + aliases from: - IEEE 754 names (`roundTiesToEven`, `roundTowardZero`, etc.) - IEEE 1666/SystemC names (`SC_RND*`, `SC_TRN*`) - canonical/descriptive alias names. - Update docs in README and quick start: - add new mode descriptions - add cross-reference table (fxpmath nominal name, aliases, NumPy/IEEE/SystemC/canonical mapping, support status). - Expand tests: - extend `test_rounding` in `tests/test_basic.py` for the new modes - add comprehensive `tests/test_rounding.py` coverage for: - aliases -> canonical mapping - issue #86 reproducer (`nearest_posinf`) - scalar/1D/2D array/complex behavior - >64-bit/object dtype behavior and passthrough - warning behavior on unexpected object dtype rounding path. - Update changelog for `0.5.0-dev0`. Files touched: - `fxpmath/objects.py` - `tests/test_basic.py` - `tests/test_rounding.py` - `README.md` - `docs/quick_start.md` - `changelog.txt`
… bitwise coverage` Body: - keep `test_issue_55_v0_4_5` minimal and focused on the core regression - move broader complex bitwise scenarios into a dedicated test in `tests/test_complex_numbers.py` - expand `tests/test_operators.py::test_arrays` with multidimensional bitwise checks (`&`, `|`, `^`, `~`) - validate behavior across scalar, array, mixed, and complex operands without changing implementation logic
…calar/array coverage` Body: - refactor bitwise helpers in `fxpmath/utils.py` to use broadcast-aware paths for `binary_and`, `binary_or`, `binary_xor`, and `binary_invert` - remove scalar-recursive bitwise dependency and preserve scalar behavior - add multidimensional array-vs-array and broadcasted bitwise assertions in `tests/test_operators.py` - extend complex bitwise coverage with array-vs-array checks in `tests/test_complex_numbers.py` - add dedicated `n_word > 64` regression (`n_word=80`) for all bitwise ops across scalar and array cases - full test suite passes (`111 passed`)
- make Fxp.reshape return a reshaped copy (non-mutating) - add Fxp.reshape_inplace(shape, order='C') for explicit in-place reshape - deprecate Fxp.shape assignment with DeprecationWarning and migration guidance - use positional ndarray reshape args for cross-version NumPy compatibility
…/master 1. Replace legacy duplicate workflows with unified `ci.yml` and `master-release-gate.yml` 2. Run strict lint/test matrix on PRs to `develop`/`master` and pushes to `develop` 3. Add multi-OS coverage: Ubuntu 22.04/24.04, macOS 14, Windows 4. Keep master push as release gate with test-before-build behavior 5. Remove `continue-on-error` behavior from old workflows
francof2a
commented
Mar 24, 2026
Owner
Author
francof2a
left a comment
There was a problem hiding this comment.
This PR is in good shape for release cut.
I reviewed the release branch intent (release-0.4.10 -> master) and verified that the previous merge conflict was resolved cleanly by preserving the modern packaging direction (pyproject.toml) and keeping legacy setup.cfg removed.
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.
Release 0.4.10
Base:
masterCompare:
release-0.4.10Overview
This PR promotes the current
developrelease candidate intomasterfor the0.4.10release.It includes the finalized package version (
0.4.10), changelog alignment, and CI/workflow hardening completed during this cycle.Release Intent
This release focuses on:
Primary Changes
1. Versioning and release metadata
0.4.10infxpmath/__init__.py.0.4.10,0.4.9).2. Packaging and installation modernization
pyproject.toml.fxpmath.__version__.3. Core fixes and behavior updates (0.4.10 scope)
urawconversion for independent unsigned two’s-complement handling of real/imag parts.reshapesemantics with NumPy behavior.reshape_inplace).Fxp.shape = ....4. Test and regression expansion
'int' object has no attribute 'flatten'after incrementing value repeated times #98 and Incorrect conversion of complex number from float back to integer #102).tomllib/tomli).5. CI/workflow improvements
3.9,3.10,3.11,3.12,3.13,3.14.actions/checkout@v5actions/setup-python@v6Why this release matters
Compatibility notes
0.4.10(non-dev).Fxp.shape = ...is deprecated; usereshape()orreshape_inplace().Validation performed
Risk assessment
reshape,bitwise, complex conversions).Out of scope
gh-pagesbranch/site design changes are not part of this release PR unless explicitly cherry-picked.Post-merge release steps
master.masterlocally.git tag v0.4.10git push origin v0.4.10changelog.txt(0.4.10section).developto the next-devversion.Checklist
masterrelease-0.4.100.4.10v0.4.10after merge