""" Aliases for functions which may be accelerated by Scipy.
Scipy_ can be built to use accelerated or otherwise improved libraries for FFTs, linear algebra, and special functions. This module allows developers to transparently support these accelerated functions when scipy is available but still support users who have only installed NumPy.
.. _Scipy : https://www.scipy.org
"""
# This module should be used for functions both in numpy and scipy if # you want to use the numpy version if available but the scipy version # otherwise. # Usage --- from numpy.dual import fft, inv
'norm', 'inv', 'svd', 'solve', 'det', 'eig', 'eigvals', 'eigh', 'eigvalsh', 'lstsq', 'pinv', 'cholesky', 'i0']
raise ValueError("%s not a dual function." % name)
if name not in __all__: raise ValueError("%s not a dual function." % name) try: val = _restore_dict[name] except KeyError: return else: sys._getframe(0).f_globals[name] = val
for name in _restore_dict.keys(): restore_func(name) |