@@ -715,7 +715,7 @@ def cells(self, data=False):
715715 else :
716716 yield cell , self .cell_attributes (cell )
717717
718- def vertices_where (self , conditions , data = False ):
718+ def vertices_where (self , conditions , data = False , ** kwargs ):
719719 """Get vertices for which a certain condition or set of conditions is true.
720720
721721 Parameters
@@ -726,6 +726,8 @@ def vertices_where(self, conditions, data=False):
726726 values or ranges of attribute values in the form of min/max pairs.
727727 data : bool, optional
728728 If True, yield the vertex attributes in addition to the identifiers.
729+ **kwargs : dict[str, Any], optional
730+ Additional conditions provided as named function arguments.
729731
730732 Yields
731733 ------
@@ -734,6 +736,9 @@ def vertices_where(self, conditions, data=False):
734736 If `data` is True, the next vertex and its attributes.
735737
736738 """
739+ conditions = conditions or {}
740+ conditions .update (kwargs )
741+
737742 for key , attr in self .vertices (True ):
738743 is_match = True
739744
@@ -811,7 +816,7 @@ def vertices_where_predicate(self, predicate, data=False):
811816 else :
812817 yield key
813818
814- def edges_where (self , conditions , data = False ):
819+ def edges_where (self , conditions , data = False , ** kwargs ):
815820 """Get edges for which a certain condition or set of conditions is true.
816821
817822 Parameters
@@ -822,6 +827,8 @@ def edges_where(self, conditions, data=False):
822827 values or ranges of attribute values in the form of min/max pairs.
823828 data : bool, optional
824829 If True, yield the edge attributes in addition to the identifiers.
830+ **kwargs : dict[str, Any], optional
831+ Additional conditions provided as named function arguments.
825832
826833 Yields
827834 ------
@@ -830,6 +837,9 @@ def edges_where(self, conditions, data=False):
830837 If `data` is True, the next edge as a (u, v, data) tuple.
831838
832839 """
840+ conditions = conditions or {}
841+ conditions .update (kwargs )
842+
833843 for key in self .edges ():
834844 is_match = True
835845
@@ -891,7 +901,7 @@ def edges_where_predicate(self, predicate, data=False):
891901 else :
892902 yield key
893903
894- def faces_where (self , conditions , data = False ):
904+ def faces_where (self , conditions , data = False , ** kwargs ):
895905 """Get faces for which a certain condition or set of conditions is true.
896906
897907 Parameters
@@ -902,6 +912,8 @@ def faces_where(self, conditions, data=False):
902912 values or ranges of attribute values in the form of min/max pairs.
903913 data : bool, optional
904914 If True, yield the face attributes in addition to the identifiers.
915+ **kwargs : dict[str, Any], optional
916+ Additional conditions provided as named function arguments.
905917
906918 Yields
907919 ------
@@ -910,6 +922,9 @@ def faces_where(self, conditions, data=False):
910922 If `data` is True, the next face and its attributes.
911923
912924 """
925+ conditions = conditions or {}
926+ conditions .update (kwargs )
927+
913928 for fkey in self .faces ():
914929 is_match = True
915930
@@ -971,7 +986,7 @@ def faces_where_predicate(self, predicate, data=False):
971986 else :
972987 yield fkey
973988
974- def cells_where (self , conditions , data = False ):
989+ def cells_where (self , conditions , data = False , ** kwargs ):
975990 """Get cells for which a certain condition or set of conditions is true.
976991
977992 Parameters
@@ -982,6 +997,8 @@ def cells_where(self, conditions, data=False):
982997 values or ranges of attribute values in the form of min/max pairs.
983998 data : bool, optional
984999 If True, yield the cell attributes in addition to the identifiers.
1000+ **kwargs : dict[str, Any], optional
1001+ Additional conditions provided as named function arguments.
9851002
9861003 Yields
9871004 ------
@@ -990,6 +1007,9 @@ def cells_where(self, conditions, data=False):
9901007 If `data` is True, the next cell and its attributes.
9911008
9921009 """
1010+ conditions = conditions or {}
1011+ conditions .update (kwargs )
1012+
9931013 for ckey in self .cells ():
9941014 is_match = True
9951015
0 commit comments