You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
df2 = pd.DataFrame({c: pd.Series([], dtype=t) for c, t in df.dtypes.items()})
bf.closest(df2, df)
~/anaconda3/lib/python3.8/site-packages/bioframe/ops.py in _closest_intidxs(df1, df2, k, ignore_overlaps, ignore_upstream, ignore_downstream, direction_col, tie_breaking_col, cols1, cols2)
1020
1021 if len(closest_intidxs) == 0:
-> 1022 return np.ndarray(shape=(0, 2), dtype=np.int)
1023 closest_intidxs = np.vstack(closest_intidxs)
1024
~/anaconda3/lib/python3.8/site-packages/numpy/__init__.py in __getattr__(attr)
282 return Tester
283
--> 284 raise AttributeError("module {!r} has no attribute "
285 "{!r}".format(__name__, attr))
286
AttributeError: module 'numpy' has no attribute 'int'
Suggested solution: return an empty dataframe with the columns from df2 added.
This isn't critical, but it would be nice if you could fix this eventually. Hypothesis ends the testing at the first error found so these bugs prevent me from doing proper testing.
I made the title general because I might update the issue with more bugs as I find them.
The text was updated successfully, but these errors were encountered:
I am using property testing in hypothesis to ensure that poranges and bioframe return the exact same results.
This has led me to discover many trifling but annoying bugs.
Suggested solution (this is how you handle the case where df2 has no overlapping chromosomes with df1):
Suggested solution: return an empty dataframe with the columns from df2 added.
This isn't critical, but it would be nice if you could fix this eventually. Hypothesis ends the testing at the first error found so these bugs prevent me from doing proper testing.
I made the title general because I might update the issue with more bugs as I find them.
The text was updated successfully, but these errors were encountered: