make param serach a bit fuzzier
This commit is contained in:
parent
bb47bdb81f
commit
4d1ea92b19
1 changed files with 3 additions and 2 deletions
|
@ -3,6 +3,7 @@ import datalad.api as dl
|
|||
import os
|
||||
import json
|
||||
import pandas as pd
|
||||
import numpy as np
|
||||
# this will implement the search functionality
|
||||
|
||||
|
||||
|
@ -76,12 +77,12 @@ def filter_results(results, **kwargs):
|
|||
# careful, this is not save, when multiple contributions are present!
|
||||
if 'wf1' in kwargs:
|
||||
wf1 = kwargs['wf1']
|
||||
if (wf1[0][0] != param['wf1'][0][0]) or (wf1[0][1][0] != param['wf1'][0][1][0]) or (wf1[0][1][1] != param['wf1'][0][1][1]):
|
||||
if not (np.isclose(wf1[0][0], param['wf1'][0][0], 1e-8) and np.isclose(wf1[0][1][0], param['wf1'][0][1][0], 1e-8) and np.isclose(wf1[0][1][1], param['wf1'][0][1][1], 1e-8)):
|
||||
drops.append(ind)
|
||||
continue
|
||||
if 'wf2' in kwargs:
|
||||
wf2 = kwargs['wf2']
|
||||
if (wf2[0][0] != param['wf2'][0][0]) or (wf2[0][1][0] != param['wf2'][0][1][0]) or (wf2[0][1][1] != param['wf2'][0][1][1]):
|
||||
if not (np.isclose(wf2[0][0], param['wf2'][0][0], 1e-8) and np.isclose(wf2[0][1][0], param['wf2'][0][1][0], 1e-8) and np.isclose(wf2[0][1][1], param['wf2'][0][1][1], 1e-8)):
|
||||
drops.append(ind)
|
||||
continue
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue