Update tutorials (#463)
--------- Co-authored-by: Dario Coscia <93731561+dario-coscia@users.noreply.github.com>
This commit is contained in:
committed by
FilippoOlivo
parent
8b797d589a
commit
bd9b49530a
9
tutorials/tutorial6/tutorial.py
vendored
9
tutorials/tutorial6/tutorial.py
vendored
@@ -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]:
|
||||
|
||||
Reference in New Issue
Block a user