@@ -723,26 +723,26 @@ def test_time_series_data_convention_2D(self, siso_ss1):
723723 assert y .ndim == 1 # SISO returns "scalar" output
724724 assert t .shape == y .shape # Allows direct plotting of output
725725
726- @pytest .mark .usefixtures ("editsdefaults" )
727726 @pytest .mark .parametrize ("fcn" , [ct .ss , ct .tf , ct .ss2io ])
728727 @pytest .mark .parametrize ("nstate, nout, ninp, squeeze, shape" , [
729728 [1 , 1 , 1 , None , (8 ,)],
730729 [2 , 1 , 1 , True , (8 ,)],
731730 [3 , 1 , 1 , False , (1 , 8 )],
732731# [4, 1, 1, 'siso', (8,)], # Use for later 'siso' implementation
733- [1 , 2 , 1 , None , (2 , 8 )],
734- [2 , 2 , 1 , True , (2 , 8 )],
735- [3 , 2 , 1 , False , (2 , 8 )],
736- # [4 , 2, 1, 'siso', (2, 8)], # Use for later 'siso' implementation
737- [1 , 1 , 2 , None , (8 ,)],
738- [2 , 1 , 2 , True , (8 ,)],
739- [3 , 1 , 2 , False , (1 , 8 )],
740- # [4 , 1, 2, 'siso', (1, 8)], # Use for later 'siso' implementation
741- [1 , 2 , 2 , None , (2 , 8 )],
742- [2 , 2 , 2 , True , (2 , 8 )],
743- [3 , 2 , 2 , False , (2 , 8 )],
744- # [4 , 2, 2, 'siso', (2, 8)], # Use for later 'siso' implementation
732+ [3 , 2 , 1 , None , (2 , 8 )],
733+ [4 , 2 , 1 , True , (2 , 8 )],
734+ [5 , 2 , 1 , False , (2 , 8 )],
735+ # [6 , 2, 1, 'siso', (2, 8)], # Use for later 'siso' implementation
736+ [3 , 1 , 2 , None , (8 ,)],
737+ [4 , 1 , 2 , True , (8 ,)],
738+ [5 , 1 , 2 , False , (1 , 8 )],
739+ # [6 , 1, 2, 'siso', (1, 8)], # Use for later 'siso' implementation
740+ [4 , 2 , 2 , None , (2 , 8 )],
741+ [5 , 2 , 2 , True , (2 , 8 )],
742+ [6 , 2 , 2 , False , (2 , 8 )],
743+ # [7 , 2, 2, 'siso', (2, 8)], # Use for later 'siso' implementation
745744 ])
745+ @pytest .mark .usefixtures ("editsdefaults" )
746746 def test_squeeze (self , fcn , nstate , nout , ninp , squeeze , shape ):
747747 # Figure out if we have SciPy 1+
748748 scipy0 = StrictVersion (sp .__version__ ) < '1.0'
@@ -818,13 +818,13 @@ def test_squeeze(self, fcn, nstate, nout, ninp, squeeze, shape):
818818 _ , yvec = ct .step_response (sys , tvec )
819819 assert yvec .shape == (sys .outputs , 8 )
820820
821- _ , yvec , xvec = ct .forced_response (
822- sys , tvec , uvec , 0 , return_x = True )
823- assert yvec .shape == (sys .outputs , 8 )
824821 if isinstance (sys , ct .StateSpace ):
822+ _ , yvec , xvec = ct .forced_response (
823+ sys , tvec , uvec , 0 , return_x = True )
825824 assert xvec .shape == (sys .states , 8 )
826825 else :
827- assert xvec .shape [1 ] == 8
826+ _ , yvec = ct .forced_response (sys , tvec , uvec , 0 )
827+ assert yvec .shape == (sys .outputs , 8 )
828828
829829 # For InputOutputSystems, also test input_output_response
830830 if isinstance (sys , ct .InputOutputSystem ) and not scipy0 :
0 commit comments