"""Init file for visualization package."""from__future__importdivision,print_function,absolute_importimportwarningsfromfury._versionimportget_versions__version__=get_versions()['version']__revision_id__=get_versions()['full-revisionid']delget_versions
[docs]defget_info(verbose=False):"""Return dict describing the context of this package. Parameters ------------ pkg_path : str path containing __init__.py for package Returns ---------- context : dict with named parameters of interest """fromfury.optpkgimportoptional_packagefromos.pathimportdirnameimportsysimportnumpyimportscipyimportvtkmpl,have_mpl,_=optional_package('matplotlib')dipy,have_dipy,_=optional_package('dipy')info=dict(fury_version=__version__,pkg_path=dirname(__file__),commit_hash=__revision_id__,sys_version=sys.version,sys_executable=sys.executable,sys_platform=sys.platform,numpy_version=numpy.__version__,scipy_version=scipy.__version__,vtk_version=vtk.vtkVersion.GetVTKVersion())d_mpl=dict(matplotlib_version=mpl.__version__)ifhave_mplelse{}d_dipy=dict(dipy_version=dipy.__version__)ifhave_dipyelse{}info.update(d_mpl)info.update(d_dipy)ifverbose:print('\n'.join(['{0}: {1}'.format(k,v)fork,vininfo.items()]))returninfo
# Ignore this specific warning below from vtk < 8.2.# FutureWarning: Conversion of the second argument of issubdtype from# `complex` to `np.complexfloating` is deprecated. In future, it will be# treated as `np.complex128 == np.dtype(complex).type`.# assert not numpy.issubdtype(z.dtype, complex), \warnings.filterwarnings("ignore",message="Conversion of the second argument of"" issubdtype from `complex` to"" `np.complexfloating` is deprecated.*",category=FutureWarning)