@@ -507,12 +507,14 @@ def __init__(
507507 self .k_posdef = k_posdef
508508 self .measurement_error = measurement_error
509509
510- self .state_names = state_names if state_names is not None else []
511- self .observed_state_names = observed_state_names if observed_state_names is not None else []
512- self .data_names = data_names if data_names is not None else []
513- self .shock_names = shock_names if shock_names is not None else []
514- self .param_names = param_names if param_names is not None else []
515- self .exog_names = exog_names if exog_names is not None else []
510+ self .state_names = list (state_names ) if state_names is not None else []
511+ self .observed_state_names = (
512+ list (observed_state_names ) if observed_state_names is not None else []
513+ )
514+ self .data_names = list (data_names ) if data_names is not None else []
515+ self .shock_names = list (shock_names ) if shock_names is not None else []
516+ self .param_names = list (param_names ) if param_names is not None else []
517+ self .exog_names = list (exog_names ) if exog_names is not None else []
516518
517519 self .needs_exog_data = len (self .exog_names ) > 0
518520 self .coords = {}
@@ -741,13 +743,15 @@ def make_slice(name, x, o_x):
741743
742744 def _combine_property (self , other , name , allow_duplicates = True ):
743745 self_prop = getattr (self , name )
746+ other_prop = getattr (other , name )
747+
744748 if isinstance (self_prop , list ) and allow_duplicates :
745- return self_prop + getattr ( other , name )
749+ return self_prop + other_prop
746750 elif isinstance (self_prop , list ) and not allow_duplicates :
747- return self_prop + [x for x in getattr ( other , name ) if x not in self_prop ]
751+ return self_prop + [x for x in other_prop if x not in self_prop ]
748752 elif isinstance (self_prop , dict ):
749753 new_prop = self_prop .copy ()
750- new_prop .update (getattr ( other , name ) )
754+ new_prop .update (other_prop )
751755 return new_prop
752756
753757 def _combine_component_info (self , other ):
0 commit comments