Skip to content

Commit

Permalink
convert alleles to bytes
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremymcrae committed Oct 12, 2020
1 parent 4842740 commit ff7bbee
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ld_estimator/pairwise.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ cdef extern from 'utils.h' namespace 'ld_estimator':
bool is_monomorphic(char **a1, char **a2, int size) except +

def _is_monomorphic(var):
if not isinstance(var[0][0], bytes):
var = to_bytes(var)
cdef char **a1 = <char **>malloc(len(var) * sizeof(char *))
cdef char **a2 = <char **>malloc(len(var) * sizeof(char *))
to_cstring_array(var, a1, a2, 0, -1)
Expand Down

0 comments on commit ff7bbee

Please sign in to comment.