Coverage for /home/martinb/.local/share/virtualenvs/camcops/lib/python3.6/site-packages/scipy/_lib/uarray.py : 57%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
1"""`uarray` provides functions for generating multimethods that dispatch to
2multiple different backends
4This should be imported, rather than `_uarray` so that an installed version could
5be used instead, if available. This means that users can call
6`uarray.set_backend` directly instead of going through SciPy.
8"""
11# Prefer an installed version of uarray, if available
12try:
13 import uarray as _uarray
14except ImportError:
15 _has_uarray = False
16else:
17 from scipy._lib._pep440 import Version as _Version
19 _has_uarray = _Version(_uarray.__version__) >= _Version("0.5")
20 del _uarray
21 del _Version
24if _has_uarray:
25 from uarray import *
26 from uarray import _Function
27else:
28 from ._uarray import *
29 from ._uarray import _Function
31del _has_uarray