Skip to content

BUG: accept numpy integer parachute height triggers (#1106) - #1120

Closed
thatrandomasiandev wants to merge 1 commit into
RocketPy-Team:developfrom
thatrandomasiandev:bug/1106-parachute-numpy-int-trigger
Closed

BUG: accept numpy integer parachute height triggers (#1106)#1120
thatrandomasiandev wants to merge 1 commit into
RocketPy-Team:developfrom
thatrandomasiandev:bug/1106-parachute-numpy-int-trigger

Conversation

@thatrandomasiandev

Copy link
Copy Markdown

Pull request type

  • Code changes (bug fix, features)

Checklist

  • Tests for the changes have been added (if needed)
  • Docs have been reviewed and added / updated
  • Lint (black rocketpy/ tests/ / make lint) has passed locally
  • All tests (pytest tests -m slow --runslow) have passed locally
  • CHANGELOG.md — no action needed; an LLM workflow auto-updates it after merge

Current behavior

isinstance(trigger, (int, float)) rejects numpy.int32 / numpy.int64 height triggers while accepting numpy.float64 (which subclasses float).

Fixes #1106

New behavior

Numeric altitude triggers use numbers.Real excluding bool, so numpy integer/float scalars are accepted. Bools still raise ValueError.

Breaking change

  • No

Additional information

Focused unit tests added/extended; full slow suite not run in this contribution pass.

Use numbers.Real (excluding bool) so numpy.int* altitude triggers work
like python ints/floats.
@thatrandomasiandev
thatrandomasiandev requested a review from a team as a code owner August 11, 2026 01:22
@Gui-FernandesBR

Copy link
Copy Markdown
Member

duplicated #1116

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants