2bae518e899657e536572fa59df6e1587795e397,librosa/feature.py,,line_features,#,332
Before Change
"""
N, K = np.shape(S)
freq = np.transpose(np.linspace(0, sr/2, N))
slope = np.zeros((1, K))
intercept = np.zeros((1, K))
for k in range(0, K):
p = np.polyfit(freq, S[:, k], order)
slope[:, k] = p[0]
intercept[:, k] = p[1]
return (slope, intercept)
// - End Features added by BWalburn
After Change
if freq.ndim == 1:
coefficients = np.polyfit(freq, S, order)
else:
coefficients = np.concatenate([[np.polyfit(freq_t, S_t, order)]
for (freq_t, S_t) in zip(freq.T, S.T)],
axis=0).T
return coefficients
// - End Features added by BWalburn
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances
Project Name: librosa/librosa
Commit Name: 2bae518e899657e536572fa59df6e1587795e397
Time: 2014-12-30
Author: brian.mcfee@nyu.edu
File Name: librosa/feature.py
Class Name:
Method Name: line_features
Project Name: matthewwithanm/django-imagekit
Commit Name: 68b8d46a2fef57d6ebed1af2f2457ec4b0244ca4
Time: 2009-07-19
Author: justin@driscolldev.com
File Name: imagekit/processors.py
Class Name: Transpose
Method Name: process
Project Name: ncullen93/torchsample
Commit Name: f4ca9b361adb382423c753f7f864a5dd0e454964
Time: 2017-05-12
Author: ncullen.th@dartmouth.edu
File Name: torchsample/transforms/tensor_transforms.py
Class Name: Transpose
Method Name: __call__