From ac8f9cff26648dcc705249d3ed8ebfa706276c40 Mon Sep 17 00:00:00 2001 From: hahnec Date: Sun, 6 Sep 2020 17:40:15 +0200 Subject: [PATCH] fix(exc): use exception for matplotlib import error --- depthy/__init__.py | 2 +- depthy/misc/primal_dual.py | 7 ++++++- docs/build/html/.buildinfo | 2 +- docs/build/html/_static/documentation_options.js | 2 +- docs/build/html/apidoc.html | 6 +++--- docs/build/html/genindex.html | 6 +++--- docs/build/html/index.html | 6 +++--- docs/build/html/readme.html | 6 +++--- docs/build/html/search.html | 6 +++--- 9 files changed, 24 insertions(+), 19 deletions(-) diff --git a/depthy/__init__.py b/depthy/__init__.py index 28ddf13..a0ac244 100644 --- a/depthy/__init__.py +++ b/depthy/__init__.py @@ -20,7 +20,7 @@ from depthy import lightfield, misc -__version__ = '0.2.5' +__version__ = '0.2.6' METHODS = ['epi'] FILE_EXTS = ('png') diff --git a/depthy/misc/primal_dual.py b/depthy/misc/primal_dual.py index 2c9efab..90e9b9f 100644 --- a/depthy/misc/primal_dual.py +++ b/depthy/misc/primal_dual.py @@ -21,8 +21,13 @@ # inspired by version authored by Louise Naud import numpy as np -import matplotlib.pyplot as plt from scipy.misc import face +import warnings + +try: + import matplotlib.pyplot as plt +except ImportError: + warnings.warn('matplotlib import failed') norm1 = lambda x: np.abs(x).sum(-1) diff --git a/docs/build/html/.buildinfo b/docs/build/html/.buildinfo index eba3a49..2ce76a7 100644 --- a/docs/build/html/.buildinfo +++ b/docs/build/html/.buildinfo @@ -1,4 +1,4 @@ # Sphinx build info version 1 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: 7c3e3b3ffc267ef9892f83b347b7fe8d +config: d8fd5d030d6e7514d65ca05a8d0f9447 tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/docs/build/html/_static/documentation_options.js b/docs/build/html/_static/documentation_options.js index 2216f34..6b7d23e 100644 --- a/docs/build/html/_static/documentation_options.js +++ b/docs/build/html/_static/documentation_options.js @@ -1,6 +1,6 @@ var DOCUMENTATION_OPTIONS = { URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'), - VERSION: '0.2.5', + VERSION: '0.2.6', LANGUAGE: 'None', COLLAPSE_INDEX: false, BUILDER: 'html', diff --git a/docs/build/html/apidoc.html b/docs/build/html/apidoc.html index 58dafe1..89f96b1 100644 --- a/docs/build/html/apidoc.html +++ b/docs/build/html/apidoc.html @@ -5,7 +5,7 @@ - 2. API documentation — depthy 0.2.5 documentation + 2. API documentation — depthy 0.2.6 documentation @@ -27,7 +27,7 @@

Navigation

  • previous |
  • - + @@ -306,7 +306,7 @@

    Navigation

  • previous |
  • - + diff --git a/docs/build/html/genindex.html b/docs/build/html/genindex.html index 036cffb..0ff27f9 100644 --- a/docs/build/html/genindex.html +++ b/docs/build/html/genindex.html @@ -5,7 +5,7 @@ - Index — depthy 0.2.5 documentation + Index — depthy 0.2.6 documentation @@ -23,7 +23,7 @@

    Navigation

  • index
  • - + @@ -137,7 +137,7 @@

    Navigation

  • index
  • - + diff --git a/docs/build/html/index.html b/docs/build/html/index.html index 1e7e3c3..c88d695 100644 --- a/docs/build/html/index.html +++ b/docs/build/html/index.html @@ -5,7 +5,7 @@ - depthy’s Reference Document — depthy 0.2.5 documentation + depthy’s Reference Document — depthy 0.2.6 documentation @@ -27,7 +27,7 @@

    Navigation

  • next |
  • - + @@ -100,7 +100,7 @@

    Navigation

  • next |
  • - + diff --git a/docs/build/html/readme.html b/docs/build/html/readme.html index 63c124b..55f502f 100644 --- a/docs/build/html/readme.html +++ b/docs/build/html/readme.html @@ -5,7 +5,7 @@ - 1. depthy — depthy 0.2.5 documentation + 1. depthy — depthy 0.2.6 documentation @@ -31,7 +31,7 @@

    Navigation

  • previous |
  • - + @@ -177,7 +177,7 @@

    Navigation

  • previous |
  • - + diff --git a/docs/build/html/search.html b/docs/build/html/search.html index 122dae0..b5c7f2b 100644 --- a/docs/build/html/search.html +++ b/docs/build/html/search.html @@ -5,7 +5,7 @@ - Search — depthy 0.2.5 documentation + Search — depthy 0.2.6 documentation @@ -28,7 +28,7 @@

    Navigation

  • index
  • - + @@ -76,7 +76,7 @@

    Navigation

  • index
  • - +