@@ -1350,7 +1350,7 @@ def get_all_maximal_simplices(self) -> Generator[Simplex[ElementType], None, Non
13501350 yield simplex
13511351
13521352 @classmethod
1353- def from_spharpy (cls , mesh ) -> Self :
1353+ def from_spharapy (cls , mesh ) -> Self :
13541354 """Import from sharpy.
13551355
13561356 Parameters
@@ -1372,7 +1372,7 @@ def from_spharpy(cls, mesh) -> Self:
13721372 ... [[0, 1, 2]], [[1.0, 0.0, 0.0], [0.0, 2.0, 0.0], [0.0, 0.0, 3.0]]
13731373 ... )
13741374
1375- >>> SC = tnx.SimplicialComplex.from_spharpy (mesh)
1375+ >>> SC = tnx.SimplicialComplex.from_spharapy (mesh)
13761376 """
13771377 vertices = np .array (mesh .vertlist )
13781378 SC = cls (mesh .trilist )
@@ -1389,6 +1389,23 @@ def from_spharpy(cls, mesh) -> Self:
13891389
13901390 return SC
13911391
1392+ @classmethod
1393+ @deprecated ("`SimplicialComplex.from_spharpy` is deprecated and will be removed in the future, use `SimplicialComplex.from_spharapy` instead." )
1394+ def from_spharpy (cls , mesh ) -> Self :
1395+ """Import from sharpy.
1396+
1397+ Parameters
1398+ ----------
1399+ mesh : spharapy.trimesh.TriMesh
1400+ The input spharapy object.
1401+
1402+ Returns
1403+ -------
1404+ SimplicialComplex
1405+ The resulting SimplicialComplex.
1406+ """
1407+ return cls .from_spharapy (mesh )
1408+
13921409 def to_hasse_graph (self ) -> nx .DiGraph :
13931410 """Create the hasse graph corresponding to this simplicial complex.
13941411
@@ -1560,7 +1577,7 @@ def to_trimesh(self, vertex_position_name: str = "position"):
15601577 return trimesh .Trimesh (faces = faces , vertices = vertices , process = False )
15611578
15621579 def to_spharapy (self , vertex_position_name : str = "position" ):
1563- """Convert to sharapy .
1580+ """Convert to spharapy .
15641581
15651582 Parameters
15661583 ----------
@@ -1583,7 +1600,7 @@ def to_spharapy(self, vertex_position_name: str = "position"):
15831600 >>> import spharapy.spharabasis as sb
15841601 >>> import spharapy.datasets as sd
15851602 >>> mesh = tm.TriMesh([[0, 1, 2]], [[0, 0, 0], [0, 0, 1], [0, 1, 0]])
1586- >>> SC = tnx.SimplicialComplex.from_spharpy (mesh)
1603+ >>> SC = tnx.SimplicialComplex.from_spharapy (mesh)
15871604 >>> mesh2 = SC.to_spharapy()
15881605 >>> mesh2.vertlist == mesh.vertlist
15891606 >>> mesh2.trilist == mesh.trilist
0 commit comments