798d71d25f579604bda909cf2297727f1bf3a1df,recordlinkage/indexing.py,SortedNeighbourhoodIndex,_link_index,#SortedNeighbourhoodIndex#Any#Any#,813
Before Change
if not left_on or not right_on:
raise ValueError("no column labels given")
if len(left_on) != len(right_on):
raise ValueError(
"length of left and right keys needs to be the same"
)
window = self.window
// Check if window is an odd number
if not isinstance(window, int) or (window < 0) or not bool(window % 2):
After Change
def _link_index(self, df_a, df_b):
if self.on is not None:
if self.left_on is not None or self.right_on is not None:
raise IndexError("Can only pass argument "on" OR "left_on" "
"and "right_on", not a combination of both.")
left_on = right_on = listify(self.on)
else:
if self.left_on is None and self.right_on is None:
raise IndexError("pass argument "on" OR "left_on" and "
""right_on" at class initalization.")
elif self.left_on is None:
raise IndexError("Argument "left_on" is missing "
"at class initalization.")
elif self.right_on is None:
raise IndexError("Argument "right_on" is missing "
"at class initalization.")
else:
left_on = listify(self.left_on)
right_on = listify(self.right_on)
window = self.window
// Check if window is an odd number
if not isinstance(window, int) or (window < 0) or not bool(window % 2):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 9
Instances
Project Name: J535D165/recordlinkage
Commit Name: 798d71d25f579604bda909cf2297727f1bf3a1df
Time: 2017-11-12
Author: jonathandebruinhome@gmail.com
File Name: recordlinkage/indexing.py
Class Name: SortedNeighbourhoodIndex
Method Name: _link_index
Project Name: J535D165/recordlinkage
Commit Name: 798d71d25f579604bda909cf2297727f1bf3a1df
Time: 2017-11-12
Author: jonathandebruinhome@gmail.com
File Name: recordlinkage/indexing.py
Class Name: BlockIndex
Method Name: _link_index
Project Name: prody/ProDy
Commit Name: fa926b8278a3b635d929e0fe6c63ac2a8983a406
Time: 2012-12-15
Author: lordnapi@gmail.com
File Name: lib/prody/dynamics/nma.py
Class Name: NMA
Method Name: __getitem__