I have the following snippet:
a = np.array([1, 2, 3])
b = np.array([False, True])
print(a[b])
It triggers a VisibleDeprecationWarning
as expected.
Now when I import a certain module, that warning is no longer shown:
import questionable_module
a = np.array([1, 2, 3])
b = np.array([False, True])
print(a[b])
How do I need to modify my code in order to re-enable all warnings? I neither want nor can change the questionable_module
. I would prefer to do it in the code instead of command line arguments, if possible.
The questionable_module
is Glumpy
but I'm looking for a solution that works independently of what other modules do.
warnings
. The Python warning system is really complicated and to appropriatly answer the question it's necessary to find out how they altered (or should I say ... messed) with the warnings. It was actually possible to search their source code and I think I've found the offender.