Skip to content

Commit

Permalink
[MOD] - set matplotlib as optional import
Browse files Browse the repository at this point in the history
  • Loading branch information
konstantinweise committed Mar 4, 2024
1 parent 45d4159 commit bc88705
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 9 deletions.
6 changes: 5 additions & 1 deletion pygpc/Basis.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,16 @@
import numpy as np
import multiprocessing
import multiprocessing.pool
import matplotlib.pyplot as plt
from _functools import partial
from .misc import get_multi_indices
# from mpl_toolkits.mplot3d import Axes3D
from .BasisFunction import *

try:
import matplotlib.pyplot as plt
except ImportError:
pass


class Basis:
"""
Expand Down
6 changes: 5 additions & 1 deletion pygpc/RandomParameter.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
import scipy.special
import scipy.stats
import numpy as np
import matplotlib.pyplot as plt
from .BasisFunction import *

try:
import matplotlib.pyplot as plt
except ImportError:
pass


class RandomParameter(object):
"""
Expand Down
6 changes: 5 additions & 1 deletion pygpc/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@

from scipy.spatial.distance import cdist
from .Visualization import plot_beta_pdf_fit
from mpl_toolkits.mplot3d.art3d import Poly3DCollection

try:
from mpl_toolkits.mplot3d.art3d import Poly3DCollection
except:
pass


def squared_exponential_kernel(x, y, lengthscale, variance):
Expand Down
21 changes: 15 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,23 @@
'tests.*',
'templates',
'templates.*']),
install_requires=['scipy>=1.8',
'numpy>=1.22.2',
'fastmat>=0.1.2.post1',
'scikit-learn>=1.0.2',
'h5py>=3.6.0',
# install_requires=['scipy>=1.8',
# 'numpy>=1.22.2',
# 'fastmat>=0.1.2.post1',
# 'scikit-learn>=1.0.2',
# 'h5py>=3.6.0',
# 'tqdm',
# 'pandas',
# 'julia'],
install_requires=['scipy',
'numpy',
'fastmat',
'scikit-learn',
'h5py',
'tqdm',
'pandas',
'julia'],
'julia',
'mpl_toolkits'],
ext_modules=extensions,
package_data={'pygpc': ['*.so', '*.dll', '*.dylib']},
project_urls={
Expand Down

0 comments on commit bc88705

Please sign in to comment.