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

#167: Replaced np.int with int as the attribute is deprecated by numpy #192

Merged
merged 2 commits into from
Apr 6, 2024

Conversation

harshit148
Copy link
Contributor

Tried to reproduce the two errors specified here:#167
But looks like the first error is already fixed and the output is as expected and for the second error I simply needed to replace the deprecated numpy.int with int and the method now is returning an empty dataframe

>>> import bioframe
>>> import pandas as pd
>>> df = bioframe.from_any([['chr1', 100, 110]], name_col='chrom')
>>> bioframe.closest(df, df.copy(), ignore_overlaps=True)
  chrom  start  end chrom_  start_  end_  distance
0  chr1    100  110   <NA>    <NA>  <NA>      <NA>
>>> df2 = pd.DataFrame({c: pd.Series([], dtype=t) for c, t in df.dtypes.items()})
>>> bioframe.closest(df2, df)
Empty DataFrame
Columns: [chrom, start, end, chrom_, start_, end_, distance]
Index: []
>>> 

@nvictus nvictus merged commit 8ed276c into open2c:main Apr 6, 2024
6 checks passed
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

Successfully merging this pull request may close these issues.

2 participants