Skip to content

Conversation

@ToveRumar
Copy link
Contributor

No description provided.

@ataffanel ataffanel requested review from ataffanel and Copilot June 18, 2025 08:30
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR upgrades the project’s NumPy dependency and adjusts related code to use updated NumPy APIs.

  • Bump NumPy from 1.x to 2.3.0 in pyproject.toml
  • Standardize NaN usage to lowercase np.nan in an example script
  • Tighten the ArrayFloat type alias to np.float64

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
pyproject.toml Updated the NumPy dependency to “~=2.3.0”
examples/radio/radio-test.py Replaced np.NaN with np.nan for consistency
cflib/localization/lighthouse_initial_estimator.py Changed ArrayFloat alias from np.float_ to np.float64
Comments suppressed due to low confidence (3)

examples/radio/radio-test.py:90

  • [nitpick] The variable name std is quite generic and could be confused with other standard deviation utilities; consider renaming to rssi_std for clarity.
        std = np.nan

examples/radio/radio-test.py:89

  • Add a unit test for the branch where temp is empty to validate that rssi_avg and rssi_std correctly become np.nan.
        rssi_avg = np.nan

cflib/localization/lighthouse_initial_estimator.py:36

  • [nitpick] Consider adding a brief comment explaining that ArrayFloat uses 64-bit floats for consistency in localization calculations.
ArrayFloat = npt.NDArray[np.float64]

@ToveRumar ToveRumar force-pushed the toverumar/numpy_upgrade branch from c381782 to b7df5ec Compare June 18, 2025 09:11
@ToveRumar ToveRumar force-pushed the toverumar/numpy_upgrade branch from b7df5ec to dc58596 Compare June 18, 2025 09:13
Copy link
Member

@ataffanel ataffanel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, Awesome progress to be finally on np 2!

@ToveRumar ToveRumar merged commit cfbc3d4 into master Jun 18, 2025
1 check passed
@ToveRumar ToveRumar deleted the toverumar/numpy_upgrade branch June 18, 2025 09:27
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.

3 participants