da1ce369bffb6c2313f7e41089f0e2ce6b83be98,pymc3/gp/cov.py,Combination,merge_factors,#Combination#Any#Any#Any#,100
Before Change
for factor in self.factor_list:
if isinstance(factor, Covariance):
factor_list.append(factor(X, Z, diag))
elif hasattr(factor, "ndim") :
if diag:
factor_list.append(tt.diag(factor))
else:
After Change
// if factor is a numpy array
if isinstance(factor, np.ndarray):
if np.ndim(factor) == 2:
if diag:
factor_list.append(np.diag(factor))
continue
// if factor is a theano variable with ndim attribute
if isinstance(factor, (tt.TensorConstant,
tt.TensorVariable,
tt.sharedvar.TensorSharedVariable)):
if factor.ndim == 2:
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances Project Name: pymc-devs/pymc3
Commit Name: da1ce369bffb6c2313f7e41089f0e2ce6b83be98
Time: 2017-07-25
Author: w.j.engels@gmail.com
File Name: pymc3/gp/cov.py
Class Name: Combination
Method Name: merge_factors
Project Name: elbayadm/attn2d
Commit Name: cf1c64a5f7cffe7a362cc772752f8f226fb04f22
Time: 2018-06-15
Author: myleott@fb.com
File Name: train.py
Class Name:
Method Name: validate