Remove unneeded split
This commit is contained in:
parent
d54c95347f
commit
decedf5731
2 changed files with 2 additions and 4 deletions
|
@ -7,9 +7,7 @@ G = 6.674e-11
|
|||
def rotations(a: np.ndarray):
|
||||
a2 = np.concatenate((a, a))
|
||||
for i in range(1, len(a)):
|
||||
yield np.split(a2, [i, i + len(a)])[1]
|
||||
# TODO: Compare performance
|
||||
# yield np.roll(a, i)
|
||||
yield a2[i: i + len(a)]
|
||||
|
||||
|
||||
def n_body(pos: np.ndarray, vel: np.ndarray, mass: np.ndarray):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue