From 9bf057e2c6029d727b8152530e01b511eda7562b Mon Sep 17 00:00:00 2001 From: Giovanni_Canali <115086358+gc031298@users.noreply.github.com> Date: Wed, 15 Nov 2023 15:45:01 +0100 Subject: [PATCH] Plotter v0.1 update (#211) * Commented a line responsible for bugs. No labels attribute in torch.Tensor object * codacy --------- Co-authored-by: Dario Coscia <93731561+dario-coscia@users.noreply.github.com> --- pina/plotter.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pina/plotter.py b/pina/plotter.py index 440389e..cd3a0b7 100644 --- a/pina/plotter.py +++ b/pina/plotter.py @@ -88,7 +88,10 @@ class Plotter: truth_output = truth_solution(pts).float() ax.plot(pts, truth_output.detach(), label='True solution', **kwargs) - plt.ylabel(pred.labels[0]) + # TODO: pred is a torch.Tensor, so no labels is available + # extra variable for labels should be + # passed in the function arguments. + # plt.ylabel(pred.labels[0]) plt.legend() plt.show()