@@ -507,12 +507,14 @@ def __init__(
507
507
self .k_posdef = k_posdef
508
508
self .measurement_error = measurement_error
509
509
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 []
516
518
517
519
self .needs_exog_data = len (self .exog_names ) > 0
518
520
self .coords = {}
@@ -741,13 +743,15 @@ def make_slice(name, x, o_x):
741
743
742
744
def _combine_property (self , other , name , allow_duplicates = True ):
743
745
self_prop = getattr (self , name )
746
+ other_prop = getattr (other , name )
747
+
744
748
if isinstance (self_prop , list ) and allow_duplicates :
745
- return self_prop + getattr ( other , name )
749
+ return self_prop + other_prop
746
750
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 ]
748
752
elif isinstance (self_prop , dict ):
749
753
new_prop = self_prop .copy ()
750
- new_prop .update (getattr ( other , name ) )
754
+ new_prop .update (other_prop )
751
755
return new_prop
752
756
753
757
def _combine_component_info (self , other ):
0 commit comments