Skip to content

Add note about NaN to int conversion#3007

Merged
j9ac9k merged 1 commit intopyqtgraph:masterfrom
j9ac9k:add-note-about-nanmask
Apr 28, 2024
Merged

Add note about NaN to int conversion#3007
j9ac9k merged 1 commit intopyqtgraph:masterfrom
j9ac9k:add-note-about-nanmask

Conversation

@j9ac9k
Copy link
Copy Markdown
Member

@j9ac9k j9ac9k commented Apr 28, 2024

Fixes #2969

Disable some assert checks due to variance across platforms
@j9ac9k
Copy link
Copy Markdown
Member Author

j9ac9k commented Apr 28, 2024

heh, did this PR resolve the segfault?

@j9ac9k j9ac9k merged commit 00bae71 into pyqtgraph:master Apr 28, 2024
@j9ac9k j9ac9k deleted the add-note-about-nanmask branch April 28, 2024 02:13
@pijyoi
Copy link
Copy Markdown
Contributor

pijyoi commented Apr 28, 2024

I don't think this PR is correct.
The lines you commented out have to do with the alpha value being set to either 0 or 255 depending on whether if any of the R,G,B values were nan. This alpha value 0 or 255 is set explicitly and is not the result of any float-to-int cast.

The nan-to-int casting has to do with the resultant R,G,B values.

e.g. assuming levels=(0, 1); if a particular input pixel had values [1.0, nan, 0.5],
the output on non-RISCV would be [255, 0, 128, 0]
and the output on RISCV would be [255, 255, 128, 0]

The failing tests had the assumption that nan would be casted to 0.

@j9ac9k
Copy link
Copy Markdown
Member Author

j9ac9k commented Apr 28, 2024

ahh, test suite doesn't check any of the RGB value here that have NaN's ... suppose I'll try a little bit more to try and see if I can figure out where the segfault in the maskNans=False case is occurring...

@j9ac9k j9ac9k mentioned this pull request Apr 28, 2024
j9ac9k added a commit to j9ac9k/pyqtgraph that referenced this pull request Apr 28, 2024
In some rare occasions in CI, try_fastpath_argb would trigger a segfault

Since this function pre-dates functions_qimage.try_make_qimage, we can
retire this function with minimal impact to end users.

Furthermore, uncomment out the tests that were commented out in pyqtgraph#3007
j9ac9k added a commit to j9ac9k/pyqtgraph that referenced this pull request Apr 28, 2024
In some rare occasions in CI, try_fastpath_argb would trigger a segfault

Since this function pre-dates functions_qimage.try_make_qimage, we can
retire this function with minimal impact to end users.

Furthermore, uncomment out the tests that were commented out in pyqtgraph#3007
j9ac9k added a commit to j9ac9k/pyqtgraph that referenced this pull request Apr 28, 2024
In some rare occasions in CI, try_fastpath_argb would trigger a segfault

Since this function pre-dates functions_qimage.try_make_qimage, we can
retire this function with minimal impact to end users.

Furthermore, uncomment out the tests that were commented out in pyqtgraph#3007
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.

Errors encountered when running tests on risc-v platform

2 participants