Skip to content

Commit

Permalink
magenpy==0.1.0 release; Minor bug fixes in Cython scripts.
Browse files Browse the repository at this point in the history
  • Loading branch information
shz9 committed Apr 4, 2024
1 parent e998e4c commit 54755ff
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ The package provides tools for:

### Helpful links

- [Documentation](https://magenpy.github.io/magenpy/)
- [Documentation](https://shz9.github.io/magenpy/)
- [Citation / BibTeX records](./CITATION.md)
- [Report issues/bugs](https://github.com/shz9/magenpy/issues)
5 changes: 3 additions & 2 deletions magenpy/stats/ld/c_utils.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ cpdef expand_ranges(integral[::1] start, integral[::1] end, long output_size):
@cython.nonecheck(False)
@cython.cdivision(True)
@cython.exceptval(check=False)
cpdef find_ld_block_boundaries(long[:] pos, long[:, :] block_boundaries):
cpdef find_ld_block_boundaries(integral[:] pos, integral[:, :] block_boundaries):
"""
Find the LD boundaries for the blockwise estimator of LD, i.e., the
indices of the leftmost and rightmost neighbors for each SNP.
Expand All @@ -114,7 +114,8 @@ cpdef find_ld_block_boundaries(long[:] pos, long[:, :] block_boundaries):
"""

cdef:
int i, j, ldb_idx, block_start, block_end, B = block_boundaries.shape[0], M = pos.shape[0]
int i, j, ldb_idx, B = block_boundaries.shape[0], M = pos.shape[0]
integral block_start, block_end
int[:] v_min = np.zeros_like(pos, dtype=np.int32)
int[:] v_max = M*np.ones_like(pos, dtype=np.int32)

Expand Down

0 comments on commit 54755ff

Please sign in to comment.