Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue with numpy arrays. #1026

Merged
merged 2 commits into from
Feb 27, 2022
Merged

Conversation

Thrameos
Copy link
Contributor

Fixes #1020

Addresses an issue where the return code on calling len() on an numpy array with no diminsions was failing. To prevent fucture crashes it checks the error sets on exception toPython to make sure the missing error is not eaten which was causing the double throw failure.

@Thrameos Thrameos added the bug Unable to deliver desired behavior (crash, fail, untested) label Jan 17, 2022
@Thrameos Thrameos requested a review from marscher January 17, 2022 00:56
@Thrameos Thrameos self-assigned this Jan 17, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@marscher
Copy link
Member

Thanks for taking a shot at this. LGTM!

@codecov
Copy link

codecov bot commented Jan 17, 2022

Codecov Report

Merging #1026 (a09f008) into master (7e12ac6) will decrease coverage by 0.04%.
The diff coverage is 30.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1026      +/-   ##
==========================================
- Coverage   89.08%   89.03%   -0.05%     
==========================================
  Files         112      112              
  Lines       10041    10051      +10     
  Branches     3972     3979       +7     
==========================================
+ Hits         8945     8949       +4     
- Misses        659      663       +4     
- Partials      437      439       +2     
Impacted Files Coverage Δ
native/common/jp_classhints.cpp 81.28% <12.50%> (-1.13%) ⬇️
native/common/jp_exception.cpp 79.47% <100.00%> (-0.32%) ⬇️
native/common/jp_method.cpp 98.84% <0.00%> (+1.15%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7e12ac6...a09f008. Read the comment docs.

@Thrameos Thrameos merged commit df54340 into jpype-project:master Feb 27, 2022
@Thrameos Thrameos deleted the numpy_bug branch February 27, 2022 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Unable to deliver desired behavior (crash, fail, untested)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

JVM crashes when converting a single-element numpy array to a Java float[]
2 participants