From 21d1b52518086982e42ff0aca92020b524f43347 Mon Sep 17 00:00:00 2001 From: relf Date: Fri, 24 Nov 2023 11:28:49 +0100 Subject: [PATCH] Remove matplotlib in minimal test setting --- .github/workflows/tests_minimal.yml | 3 +-- smt/utils/neural_net/model.py | 3 ++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests_minimal.yml b/.github/workflows/tests_minimal.yml index 6721ba16b..a908bc53e 100644 --- a/.github/workflows/tests_minimal.yml +++ b/.github/workflows/tests_minimal.yml @@ -19,8 +19,7 @@ jobs: - name: Install dependencies run: | pip install --upgrade pip - pip install numpy cython - pip install matplotlib # required by GENN atm, to be fixed + pip install numpy cython pip install -e . - name: Test with pytest diff --git a/smt/utils/neural_net/model.py b/smt/utils/neural_net/model.py index b752046c5..23be809de 100644 --- a/smt/utils/neural_net/model.py +++ b/smt/utils/neural_net/model.py @@ -7,7 +7,7 @@ """ import numpy as np -import matplotlib.gridspec as gridspec + from smt.utils.neural_net.data import random_mini_batches from smt.utils.neural_net.optimizer import Adam from smt.utils.neural_net.activation import Tanh, Linear @@ -441,6 +441,7 @@ def gradient(self, X): def goodness_of_fit(self, X_test, Y_test, J_test=None, response=0, partial=0): import matplotlib.pyplot as plt + import matplotlib.gridspec as gridspec assert X_test.shape[1] == Y_test.shape[1] assert Y_test.shape[0] == Y_test.shape[0]