Skip to content

Commit c13acb1

Browse files
timothymillarmergify[bot]
authored andcommitted
Remove redundant return statements in pedigree.py
1 parent b911235 commit c13acb1

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

sgkit/stats/pedigree.py

-6
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,6 @@ def _raise_on_half_founder(
200200
raise ValueError("Pedigree contains half-founders")
201201
elif (q < 0 and p >= 0) and tau_q > 0:
202202
raise ValueError("Pedigree contains half-founders")
203-
return
204203

205204

206205
@njit(cache=True)
@@ -213,7 +212,6 @@ def _diploid_self_kinship(
213212
kinship[i, i] = 0.5
214213
else: # non-founder
215214
kinship[i, i] = (1 + kinship[p, q]) / 2
216-
return
217215

218216

219217
@njit(cache=True)
@@ -227,7 +225,6 @@ def _diploid_pair_kinship(
227225
kinship_ij = (kinship_pj + kinship_qj) / 2
228226
kinship[i, j] = kinship_ij
229227
kinship[j, i] = kinship_ij
230-
return
231228

232229

233230
@njit(cache=True)
@@ -422,7 +419,6 @@ def _hamilton_kerr_self_kinship(
422419
kinship_pq=kinship[p, q] if (p >= 0 and q >= 0) else 0,
423420
)
424421
kinship[i, i] = _inbreeding_as_self_kinship(inbreeding_i, ploidy_i)
425-
return
426422

427423

428424
@njit(cache=True)
@@ -437,7 +433,6 @@ def _hamilton_kerr_pair_kinship(
437433
kinship_ij = (tau_p / ploidy_i) * kinship_pj + (tau_q / ploidy_i) * kinship_qj
438434
kinship[i, j] = kinship_ij
439435
kinship[j, i] = kinship_ij
440-
return
441436

442437

443438
@njit(cache=True)
@@ -841,7 +836,6 @@ def _update_inverse_additive_relationships(
841836
mtx[p, q] += frac
842837
mtx[q, p] += frac
843838
mtx[i, i] += scalar / ploidy_i
844-
return
845839

846840

847841
@njit(cache=True)

0 commit comments

Comments
 (0)