@@ -173,9 +173,9 @@ def handleNewSignals(self):
173173 self .samedomain = samedomain
174174
175175 has_identifiers = all (source_attributes (input .table .domain )
176- for input in self .data .values ())
176+ for input in self .data .values ())
177177 has_any_identifiers = any (source_attributes (input .table .domain )
178- for input in self .data .values ())
178+ for input in self .data .values ())
179179 self .useequalityButton .setEnabled (samedomain )
180180 self .useidentifiersButton .setEnabled (
181181 has_any_identifiers or len (self .data ) == 0 )
@@ -715,7 +715,7 @@ def table_concat(tables):
715715
716716 domain = Orange .data .Domain (attributes , class_vars , metas )
717717
718- tables = list ( map ( lambda tab : tab .transform (domain ), tables ))
718+ tables = [ tab .transform (domain ) for tab in tables ]
719719 return tables [0 ].concatenate (tables , axis = 0 )
720720
721721
@@ -785,7 +785,7 @@ def inst_key(inst, vars):
785785 # each instance in this list belongs to one group (but not all
786786 # groups need to be present).
787787 inst_by_id = defaultdict (list )
788- id_by_inst = defaultdict (list ) # inverse mapping
788+ id_by_inst = defaultdict (list ) # inverse mapping
789789
790790 for i in range (len (table )):
791791 inst_id = instance_ids [i ]
@@ -836,8 +836,8 @@ def expanded(feat):
836836 if var in idvarlist or var in in_expanded :
837837 continue
838838 col , _ = newtable .get_column_view (var )
839- nan_indices = filter ( lambda j : isinstance ( col [ j ], str ) or numpy . isnan ( col [ j ]),
840- col . nonzero ()[ 0 ] )
839+ nan_indices = ( i for i in col . nonzero ()[ 0 ]
840+ if isinstance ( col [ i ]) or numpy . isnan ( col [ i ]) )
841841 for i in nan_indices :
842842 for ind in inst_by_id [ids [i ]]:
843843 if not numpy .isnan (table [ind , var ]):
@@ -936,8 +936,7 @@ def string_attributes(domain):
936936 """
937937 Return all string attributes from the domain.
938938 """
939- return [attr for attr in domain .variables + domain .metas
940- if attr .is_string ]
939+ return [attr for attr in domain .variables + domain .metas if attr .is_string ]
941940
942941
943942def discrete_attributes (domain ):
0 commit comments