Example #1
0
def __check_reportlab():
    import reportlab as rl
    versions['reportlab'] = SmartVersion(rl.Version)
Example #2
0
def __assign_matplotlib_version():
    """Check for matplotlib version and set backend if requested."""
    import matplotlib
    versions['matplotlib'] = SmartVersion(matplotlib.__version__)
    _set_matplotlib_backend()
Example #3
0
def __check_h5py():
    __check('h5py', 'version.version')
    import h5py
    versions['hdf5'] = SmartVersion(h5py.version.hdf5_version)
Example #4
0
    versions['mdp'] = SmartVersion(ver)

def __assign_nibabel_version():
    try:
        import nibabel
    except Exception, e:
        # FloatingError is defined in the same module which precludes
        # its specific except
        e_str = str(e)
        if "We had not expected long double type <type 'numpy.float128'>" in e_str:
            warning("Must be running under valgrind?  Available nibabel experiences "
                    "difficulty with float128 upon import and fails to work, thus is "
                    "report as N/A")
            raise ImportError("Fail to import nibabel due to %s" % e_str)
        raise
    versions['nibabel'] = SmartVersion(nibabel.__version__)

def __check_pywt(features=None):
    """Check for available functionality within pywt

    Parameters
    ----------
    features : list of str
      List of known features to check such as 'wp reconstruct',
      'wp reconstruct fixed'
    """
    import pywt
    import numpy as np
    data = np.array(
        [0.57316901,  0.65292526,  0.75266733,  0.67020084,  0.46505364,
         0.76478331,  0.33034164,  0.49165547,  0.32979941,  0.09696717,
Example #5
0
def __assign_numpy_version():
    """Check if numpy is present (it must be) an if it is -- store its version
    """
    import numpy as np
    versions['numpy'] = SmartVersion(np.__version__)