Skip to content

Behavioral Consistency and NumPy Dispatch Compatibility Hardening #108

@francof2a

Description

@francof2a

Title

v0.5.0: Behavioral Consistency and NumPy Dispatch Compatibility Hardening

Problem Statement

We completed most v0.5.0 stability work, but key behavioral-consistency items are still open. We need to close remaining correctness and compatibility gaps before moving deeper into feature/performance work.

Why This Matters

  • Reduces risk of subtle regressions in equality checks and dispatch behavior.
  • Aligns runtime behavior, tests, and docs for op_input_size defaults.
  • Closes the remaining warning-path gap in NumPy casting compatibility.

Scope

  • Confirm and fix potential Fxp.equal index handling bug (index is None semantics).
  • Add tests for Fxp.equal with index=None, scalar index, and slice index.
  • Reconcile op_input_size default behavior between runtime and documentation.
  • Add explicit tests that lock expected default op_input_size behavior.
  • Review all dispatch-implemented functions for NumPy 2.x argument compatibility.
  • Add compatibility tests for each currently implemented dispatch decorator target.
  • Resolve ComplexWarning in fxpmath/utils/numeric.py cast path, or document+test the expected warning behavior.

Acceptance Criteria

  • Full relevant test suite passes on NumPy 1.26.4 and latest 2.x.
  • Fxp.equal index behavior is explicit, correct, and test-covered.
  • op_input_size default behavior is consistent in code, tests, and docs.
  • Dispatch kwargs behavior is consistent across implemented targets on supported NumPy versions.
  • ComplexWarning path is fixed or intentionally documented with regression tests.

Deliverables

  • Runtime/code changes for behavioral fixes.
  • New/updated regression tests.
  • Documentation updates for any user-visible behavior clarifications.

Out of Scope

  • New dispatch features (vecdot, matvec, vecmat, norms).
  • Performance optimization work not required to satisfy correctness/compatibility.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions