Skip to content

fix: handle properly np.cross() - 2d ops deprecated in Numpy 2.X#1419

Merged
RobPasMue merged 9 commits intomainfrom
fix/numpy-cross-warning
Sep 10, 2024
Merged

fix: handle properly np.cross() - 2d ops deprecated in Numpy 2.X#1419
RobPasMue merged 9 commits intomainfrom
fix/numpy-cross-warning

Conversation

@RobPasMue
Copy link
Member

Description

As title says - once Numpy 1.X is not used anymore we can remove this.

Issue linked

None

Checklist

  • I have tested my changes locally.
  • I have added necessary documentation or updated existing documentation.
  • I have followed the coding style guidelines of this project.
  • I have added appropriate unit tests.
  • I have reviewed my changes before submitting this pull request.
  • I have linked the issue or issues that are solved to the PR if any.
  • I have assigned this PR to myself.
  • I have added the minimum version decorator to any new backend method implemented.
  • I have made sure that the title of my PR follows Conventional commits style (e.g. feat: extrude circle to cylinder)

@RobPasMue RobPasMue self-assigned this Sep 10, 2024
@RobPasMue RobPasMue requested a review from a team as a code owner September 10, 2024 07:40
@RobPasMue RobPasMue changed the title fix: handle properly np.cross() warnings raised - 2d ops deprecated in Numpy 2.X fix: handle properly np.cross() - 2d ops deprecated in Numpy 2.X Sep 10, 2024
@github-actions github-actions bot added the bug Something isn't working label Sep 10, 2024
@RobPasMue RobPasMue marked this pull request as draft September 10, 2024 07:41
@RobPasMue RobPasMue marked this pull request as ready for review September 10, 2024 07:53
Copy link
Contributor

@AlejandroFernandezLuces AlejandroFernandezLuces left a comment

Choose a reason for hiding this comment

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

LGTM, it's wild that we need to do the cross operation that way. I see that they are going to implement a proper operation soon, can we add a TODO or some reminder to change this when np.linalg.cross2d is implemented?

@codecov
Copy link

codecov bot commented Sep 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.85%. Comparing base (e8017a6) to head (1023459).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1419   +/-   ##
=======================================
  Coverage   91.85%   91.85%           
=======================================
  Files          86       86           
  Lines        6875     6878    +3     
=======================================
+ Hits         6315     6318    +3     
  Misses        560      560           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@RobPasMue
Copy link
Member Author

LGTM, it's wild that we need to do the cross operation that way. I see that they are going to implement a proper operation soon, can we add a TODO or some reminder to change this when np.linalg.cross2d is implemented?

Sure - though I am not sure they will even implement it... they have preferred documenting it over implementing numpy/numpy#26692 and numpy/numpy#26620 (comment)

More importantly... see this numpy/numpy#26640 and especially numpy/numpy#26640 (comment) and numpy/numpy#26640 (comment)

I don't think it'll ever be implemented honestly...

@AlejandroFernandezLuces
Copy link
Contributor

LGTM, it's wild that we need to do the cross operation that way. I see that they are going to implement a proper operation soon, can we add a TODO or some reminder to change this when np.linalg.cross2d is implemented?

Sure - though I am not sure they will even implement it... they have preferred documenting it over implementing numpy/numpy#26692 and numpy/numpy#26620 (comment)

More importantly... see this numpy/numpy#26640 and especially numpy/numpy#26640 (comment) and numpy/numpy#26640 (comment)

I don't think it'll ever be implemented honestly...

Forget about the reminder then 😄

@RobPasMue
Copy link
Member Author

Forget about the reminder then 😄

Haha! 😄 good then - thanks for pointing it out though! It would've been the way to proceed (if they had decided to eventually implement it... but I think it's not the case - I'll keep an eye on NumPy though and the issues)

@RobPasMue
Copy link
Member Author

@AlejandroFernandezLuces - I just pushed @MaxJPRey's suggestion to typehint it as well. Can you approve?

@RobPasMue RobPasMue enabled auto-merge (squash) September 10, 2024 08:19
MaxJPRey
MaxJPRey previously approved these changes Sep 10, 2024
@MaxJPRey
Copy link
Contributor

@AlejandroFernandezLuces - I just pushed @MaxJPRey's suggestion to typehint it as well. Can you approve?

Done @RobPasMue

@RobPasMue RobPasMue disabled auto-merge September 10, 2024 08:59
@RobPasMue RobPasMue merged commit c98c14b into main Sep 10, 2024
@RobPasMue RobPasMue deleted the fix/numpy-cross-warning branch September 10, 2024 08:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants