[yt-svn] commit/yt: rthompson: adding scipy.spatial to the on demand imports.
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Thu Sep 3 10:25:48 PDT 2015
1 new commit in yt:
https://bitbucket.org/yt_analysis/yt/commits/7d5ab03e0df9/
Changeset: 7d5ab03e0df9
Branch: yt
User: rthompson
Date: 2015-09-01 19:37:10+00:00
Summary: adding scipy.spatial to the on demand imports.
Affected #: 1 file
diff -r 54a3381ac0b10b469eb10e3d63857a508448c8b5 -r 7d5ab03e0df9cb25e4b5deb94145e610270163f0 yt/utilities/on_demand_imports.py
--- a/yt/utilities/on_demand_imports.py
+++ b/yt/utilities/on_demand_imports.py
@@ -154,4 +154,15 @@
self._signal = signal
return self._signal
+ _spatial = None
+ @property
+ def spatial(self):
+ if self._spatial is None:
+ try:
+ import scipy.spatial as spatial
+ except ImportError:
+ spatial = NotAModule(self._name)
+ self._spatial = spatial
+ return self._spatial
+
_scipy = scipy_imports()
Repository URL: https://bitbucket.org/yt_analysis/yt/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
More information about the yt-svn
mailing list