Skip to content

Commit 2cf6902

Browse files
Benjamin Greinerroryyorke
Benjamin Greiner
authored andcommitted
replace np.tile with np.repeat wihtout calling np.shape
this fixes a fail of the test on powerpc architecture
1 parent 1cc11a4 commit 2cf6902

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

slycot/tests/test_td04ad.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,15 +157,16 @@ def test_td04ad_static(self):
157157
if rc == 'R':
158158
num = np.reshape(np.arange(nout * nin), (nout, nin, 1))
159159
den = np.reshape(np.arange(1, 1 + nout), (nout, 1))
160+
index = np.repeat(0, nout)
160161
Dref = num[:nout, :nin, 0] / np.broadcast_to(den, (nout, nin))
161162
else:
162163
maxn = max(nout, nin)
163164
num = np.zeros((maxn, maxn, 1))
164165
num[:nout, :nin, 0] = np.reshape(
165166
np.arange(nout * nin), (nout, nin))
166167
den = np.reshape(np.arange(1, 1 + nin), (nin, 1))
168+
index = np.repeat(0, nin)
167169
Dref = num[:nout, :nin, 0] / np.broadcast_to(den.T, (nout, nin))
168-
index = np.tile([0], den.shape[0])
169170
nr, A, B, C, D = transform.td04ad(rc, nin, nout, index, den, num)
170171
np.testing.assert_equal(nr, 0)
171172
for M in [A, B, C]:

0 commit comments

Comments
 (0)