File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ build-backend = "setuptools.build_meta"
77
88[project ]
99name = " spotpython"
10- version = " 0.15.9 "
10+ version = " 0.15.10 "
1111authors = [
1212 { name =" T. Bartz-Beielstein" , email =" tbb@bartzundbartz.de" }
1313]
Original file line number Diff line number Diff line change @@ -2141,7 +2141,7 @@ def get_importance(self) -> list:
21412141
21422142 Returns:
21432143 output (list):
2144- list of results
2144+ list of results. If the surrogate has more than one theta values, the importance is calculated. Otherwise, a list of zeros is returned.
21452145
21462146 """
21472147 if self .surrogate .n_theta > 1 and self .var_name is not None :
@@ -2156,6 +2156,8 @@ def get_importance(self) -> list:
21562156 return output
21572157 else :
21582158 print ("Importance requires more than one theta values (n_theta>1)." )
2159+ # return a list of zeros of length len(all_var_name)
2160+ return [0 ] * len (self .all_var_name )
21592161
21602162 def print_importance (self , threshold = 0.1 , print_screen = True ) -> list :
21612163 """Print importance of each variable and return the results as a list.
You can’t perform that action at this time.
0 commit comments