Argument to suppress Gimbal Lock Warning in rotations.

Matthias Bussonnier <[email protected]> Thu, 16 Nov 2023 11:26:35 +0100
Newsgroups gmane.comp.python.scientific.devel
Message-ID <CANJQusWbgM6R=inUkNcVxBhZ5fuhDh087Pfz8kjsOjNxR8990w@mail.gmail.com>
Hello SciPy Dev,

I recently sent a PR[1] to add a parameter to suppress the Gimbal Lock
Warning message when using SciPy's rotation, and I'm coming to the
mailing list for advice.

The problem I'm encountering is that the typical way of silencing a
specific warning would be to warnings.catch_warnings – unfortunately this
hits a bug in CPython[2] (that has been open for 5 years and does not seem
close to be fixed). And while I typically do not care about warnings being
printed in CLI, this creates issues in GUI applications where the messages
can get spammed when dragging a camera around – in my case in napari.

I don't see any other way to prevent this than to add a keyword only to
rotation's methods to not emit the warning.

Your thoughts are appreciated.

Thanks,
-- 
Matthias

1: https://github.com/scipy/scipy/pull/19512
2: https://github.com/python/cpython/issues/73858

_______________________________________________
SciPy-Dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/scipy-dev.python.org/
Member address: [email protected]