Use standard time series convention for markov() input data (#508) · python-control/python-control@feb9fc9

@@ -44,13 +44,9 @@ def testMarkovSignature(self, matarrayout, matarrayin):

4444

H = markov(np.transpose(Y), np.transpose(U), m, transpose=True)

4545

np.testing.assert_array_almost_equal(H, np.transpose(Htrue))

464647-

# Default (in v0.8.4 and below) should be transpose=True (w/ warning)

48-

with pytest.warns(UserWarning, match="assumed to be in rows.*"

49-

"change in a future release"):

50-

# Generate Markov parameters without any arguments

51-

H = markov(np.transpose(Y), np.transpose(U), m)

52-

np.testing.assert_array_almost_equal(H, np.transpose(Htrue))

53-47+

# Generate Markov parameters without any arguments

48+

H = markov(Y, U, m)

49+

np.testing.assert_array_almost_equal(H, Htrue)

54505551

# Test example from docstring

5652

T = np.linspace(0, 10, 100)

@@ -65,9 +61,8 @@ def testMarkovSignature(self, matarrayout, matarrayin):

65616662

# Make sure MIMO generates an error

6763

U = np.ones((2, 100)) # 2 inputs (Y unchanged, with 1 output)

68-

with pytest.warns(UserWarning):

69-

with pytest.raises(ControlMIMONotImplemented):

70-

markov(Y, U, m)

64+

with pytest.raises(ControlMIMONotImplemented):

65+

markov(Y, U, m)

71667267

# Make sure markov() returns the right answer

7368

@pytest.mark.parametrize("k, m, n",

@@ -108,7 +103,7 @@ def testMarkovResults(self, k, m, n):

108103

T = np.array(range(n)) * Ts

109104

U = np.cos(T) + np.sin(T/np.pi)

110105

_, Y, _ = forced_response(Hd, T, U, squeeze=True)

111-

Mcomp = markov(Y, U, m, transpose=False)

106+

Mcomp = markov(Y, U, m)

112107113108

# Compare to results from markov()

114109

np.testing.assert_array_almost_equal(Mtrue, Mcomp)