@@ -330,7 +330,7 @@ def copy(self, **kwargs: Any) -> "MeshElementGroup":
330
330
331
331
def __eq__ (self , other ):
332
332
return (
333
- type (self ) == type (other )
333
+ type (self ) is type (other )
334
334
and self .order == other .order
335
335
and np .array_equal (self .vertex_indices , other .vertex_indices )
336
336
and np .array_equal (self .nodes , other .nodes )
@@ -556,7 +556,7 @@ def copy(self, **kwargs: Any) -> "NodalAdjacency":
556
556
557
557
def __eq__ (self , other ):
558
558
return (
559
- type (self ) == type (other )
559
+ type (self ) is type (other )
560
560
and np .array_equal (self .neighbors_starts , other .neighbors_starts )
561
561
and np .array_equal (self .neighbors , other .neighbors ))
562
562
@@ -612,7 +612,7 @@ def copy(self, **kwargs: Any) -> "FacialAdjacencyGroup":
612
612
613
613
def __eq__ (self , other ):
614
614
return (
615
- type (self ) == type (other )
615
+ type (self ) is type (other )
616
616
and self .igroup == other .igroup )
617
617
618
618
def __ne__ (self , other ):
@@ -629,7 +629,7 @@ def as_python(self) -> str:
629
629
:returns: a string that can be evaluated to reconstruct the class.
630
630
"""
631
631
632
- if type (self ) != FacialAdjacencyGroup :
632
+ if type (self ) is not FacialAdjacencyGroup :
633
633
raise NotImplementedError (
634
634
f"Not implemented for '{ type (self ).__name__ } '." )
635
635
@@ -703,7 +703,7 @@ def __eq__(self, other):
703
703
and self .aff_map == other .aff_map )
704
704
705
705
def as_python (self ):
706
- if type (self ) != InteriorAdjacencyGroup :
706
+ if type (self ) is not InteriorAdjacencyGroup :
707
707
raise NotImplementedError (f"Not implemented for { type (self )} ." )
708
708
709
709
return self ._as_python (
@@ -755,7 +755,7 @@ def __eq__(self, other):
755
755
and np .array_equal (self .element_faces , other .element_faces ))
756
756
757
757
def as_python (self ):
758
- if type (self ) != BoundaryAdjacencyGroup :
758
+ if type (self ) is not BoundaryAdjacencyGroup :
759
759
raise NotImplementedError (f"Not implemented for { type (self )} ." )
760
760
761
761
return self ._as_python (
@@ -837,7 +837,7 @@ def __eq__(self, other):
837
837
and self .aff_map == other .aff_map )
838
838
839
839
def as_python (self ):
840
- if type (self ) != InterPartAdjacencyGroup :
840
+ if type (self ) is not InterPartAdjacencyGroup :
841
841
raise NotImplementedError (f"Not implemented for { type (self )} ." )
842
842
843
843
return self ._as_python (
@@ -1177,7 +1177,7 @@ def facial_adjacency_groups(self) -> Sequence[Sequence[FacialAdjacencyGroup]]:
1177
1177
1178
1178
def __eq__ (self , other ):
1179
1179
return (
1180
- type (self ) == type (other )
1180
+ type (self ) is type (other )
1181
1181
and np .array_equal (self .vertices , other .vertices )
1182
1182
and self .groups == other .groups
1183
1183
and self .vertex_id_dtype == other .vertex_id_dtype
0 commit comments