Skip to content
This repository has been archived by the owner on Oct 14, 2023. It is now read-only.

Commit

Permalink
Merge pull request #1553 from s-m-e/fix_pylint_E1133
Browse files Browse the repository at this point in the history
fix pylint#2910 via workaround: ignore not an iterable warning on numba.prange
  • Loading branch information
astrojuanlu committed Jul 23, 2022
2 parents c1def1f + 25a4219 commit ec8eac2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/poliastro/core/elements.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,12 +189,16 @@ def coe2rv(k, p, ecc, inc, raan, argp, nu):

@jit(parallel=sys.maxsize > 2**31)
def coe2rv_many(k, p, ecc, inc, raan, argp, nu):
"""
Parallel version of coe2rv
"""

n = nu.shape[0]
rr = np.zeros((n, 3))
vv = np.zeros((n, 3))

for i in prange(n):
# Disabling pylint warning, see https://github.com/PyCQA/pylint/issues/2910
for i in prange(n): # pylint: disable=not-an-iterable
rr[i, :], vv[i, :] = coe2rv(
k[i], p[i], ecc[i], inc[i], raan[i], argp[i], nu[i]
)
Expand Down

0 comments on commit ec8eac2

Please sign in to comment.