Update tutorials (#463)

---------

Co-authored-by: Dario Coscia <93731561+dario-coscia@users.noreply.github.com>
This commit is contained in:
Matteo Bertocchi
2025-02-26 16:21:12 +01:00
committed by FilippoOlivo
parent 8b797d589a
commit bd9b49530a
30 changed files with 3057 additions and 1453 deletions

File diff suppressed because one or more lines are too long

View File

@@ -26,7 +26,7 @@ if IN_COLAB:
get_ipython().system('pip install "pina-mathlab"')
import matplotlib.pyplot as plt
plt.style.use('tableau-colorblind10')
from pina.domain import EllipsoidDomain, Difference, CartesianDomain, Union, SimplexDomain, DomainInterface
from pina.label_tensor import LabelTensor
@@ -175,7 +175,6 @@ plot_scatter(ax, c_e_nb_d_points, 'Difference')
import torch
from pina import LabelTensor
import random
# Next, we will create the `Heart(DomainInterface)` class and initialize it.
@@ -191,12 +190,6 @@ class Heart(DomainInterface):
# In[ ]:
# Because the `DomainInterface` class we are inheriting from requires both a `sample` method and `is_inside` method, we will create them and just add in "pass" for the moment. We also observe that the methods `sample_modes` and `variables` of the `DomainInterface` class are initialized as `abstractmethod`, so we need to redefine them both in the subclass `Heart` .
# In[13]: