Я хочу импортировать pydicom в скрипте Python. Таким образом, я использую следующую команду, чтобы сделать это без предупреждения:
import sys, warnings
if not sys.warnoptions:
warnings.simplefilter("ignore")
try:
import pydicom as dicom
except ImportError:
import dicom
Но я получаю следующее предупреждение !!!!
/Users/anaconda3/lib/python3.6/site-packages/dicom/__init__.py:53: UserWarning:
This code is using an older version of pydicom, which is no longer
maintained as of Jan 2017. You can access the new pydicom features and API
by installing `pydicom` from PyPI.
See 'Transitioning to pydicom 1.x' section at pydicom.readthedocs.org
for more information.
warnings.warn(msg)
/Users/anaconda3/lib/python3.6/site-packages/h5py/__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.
from ._conv import register_converters as _register_converters
Как я могу это скрыть?