2e9cf89977676fcdac1206909e8999089d026780,scipy/linalg/special_matrices.py,,toeplitz,#Any#Any#,142
Before Change
// Form a 1D array of values to be used in the matrix, containing a reversed
// copy of r[1:], followed by c.
vals = np.concatenate((r[-1:0:-1], c))
a , b = np.ogrid[0:len(c), len(r) - 1:-1:-1]
indx = a + b
// `indx` is a 2D array of indices into the 1D array `vals`, arranged so
// that `vals[indx]` is the Toeplitz matrix.
return vals[indx]
def circulant(c):
After Change
// Form a 1D array containing a reversed c followed by r[1:] that could be
// strided to give us toeplitz matrix.
vals = np.concatenate((c[::-1], r[1:]))
out_shp = len(c), len(r)
n = vals.strides[0]
return as_strided(vals[len(c)-1:], shape=out_shp, strides=(-n, n)).copy()
def circulant(c):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 15
Instances Project Name: scipy/scipy
Commit Name: 2e9cf89977676fcdac1206909e8999089d026780
Time: 2018-01-28
Author: droyed@users.noreply.github.com
File Name: scipy/linalg/special_matrices.py
Class Name:
Method Name: toeplitz
Project Name: scipy/scipy
Commit Name: 2e9cf89977676fcdac1206909e8999089d026780
Time: 2018-01-28
Author: droyed@users.noreply.github.com
File Name: scipy/linalg/special_matrices.py
Class Name:
Method Name: circulant
Project Name: scipy/scipy
Commit Name: 2e9cf89977676fcdac1206909e8999089d026780
Time: 2018-01-28
Author: droyed@users.noreply.github.com
File Name: scipy/linalg/special_matrices.py
Class Name:
Method Name: toeplitz
Project Name: scipy/scipy
Commit Name: 2e9cf89977676fcdac1206909e8999089d026780
Time: 2018-01-28
Author: droyed@users.noreply.github.com
File Name: scipy/linalg/special_matrices.py
Class Name:
Method Name: hankel