I have some data that Im reading from a h5 file as a numpy array and am doing some analysis with. For context, the data plots a spectral response curve. I am indexing the da
To suppress the warning you can:
add something like this to your .bashrc or whereever you set environmental variables to turn off visible deprecation warnings globally:
export PYTHONWARNINGS="ignore::DeprecationWarning:simplejson"
Turn of warnings when running a single script:
python -W ignore thisbetterworks.py
Run a block without warnings:
import warnings
with warnings.catch_warnings():
warnings.warn("Let this be your last warning")
warnings.simplefilter("ignore")
< your code >
Of course you do run the risk of this failing when deprecation turns to absence, so you may want to make sure it doesn't end up in long-term code.