Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

threshold in at compere is broken #161

Open
skuam opened this issue Aug 18, 2021 · 0 comments
Open

threshold in at compere is broken #161

skuam opened this issue Aug 18, 2021 · 0 comments

Comments

@skuam
Copy link

skuam commented Aug 18, 2021

I am referring to this code as NumPy array no longer have method where, and you get error

   c = c.where((c < self.threshold) | (pandas.isnull(c)), other=1.0)
AttributeError: 'numpy.ndarray' object has no attribute "where"
   
if self.threshold is not None:
         c = c.where((c < self.threshold) | (pandas.isnull(c)), other=1.0)
         c = c.where((c >= self.threshold) | (pandas.isnull(c)), other=0.0)

in https://github.com/J535D165/recordlinkage/blob/5b3230f5cff92ef58968eedc451735e972035793/recordlinkage/compare.py#L152

much cleaner solution would to just use this instead this

if self.threshold is not None:
         c = c >= self.threshold
         c= c.astype(float)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant