def rotate(pos, vel, matrix):
    '\n    Rotate.\n\n    Applies the rotation `matrix` to a set of particles positions `pos` and\n    velocities `vel`\n\n    Parameters\n    ----------\n    pos : `np.ndarray`, shape = (N_part, 3)\n        Positions of particles\n    vel : `np.ndarray`, shape = (N_part, 3)\n        Velocities of particles\n    matrix : `np.ndarray`\n        Rotation matrix, with shape (3, 3)\n\n    Returns\n    -------\n    pos_rot : `np.ndarray`, shape = (N_part, 3)\n        Rotated, positions of particles\n    vel_rot : `np.ndarray`, shape = (N_part, 3)\n        Rotated, velocities of particles\n    '
    pos_rot = (pos @ matrix)
    vel_rot = (vel @ matrix)
    return (pos_rot, vel_rot)
Rotate.

Applies the rotation `matrix` to a set of particles positions `pos` and
velocities `vel`

Parameters
----------
pos : `np.ndarray`, shape = (N_part, 3)
    Positions of particles
vel : `np.ndarray`, shape = (N_part, 3)
    Velocities of particles
matrix : `np.ndarray`
    Rotation matrix, with shape (3, 3)

Returns
-------
pos_rot : `np.ndarray`, shape = (N_part, 3)
    Rotated, positions of particles
vel_rot : `np.ndarray`, shape = (N_part, 3)
    Rotated, velocities of particles
def rotate(pos, vel, matrix):
    '\n    Rotate.\n\n    Applies the rotation `matrix` to a set of particles positions `pos` and\n    velocities `vel`\n\n    Parameters\n    ----------\n    pos : `np.ndarray`, shape = (N_part, 3)\n        Positions of particles\n    vel : `np.ndarray`, shape = (N_part, 3)\n        Velocities of particles\n    matrix : `np.ndarray`\n        Rotation matrix, with shape (3, 3)\n\n    Returns\n    -------\n    pos_rot : `np.ndarray`, shape = (N_part, 3)\n        Rotated, positions of particles\n    vel_rot : `np.ndarray`, shape = (N_part, 3)\n        Rotated, velocities of particles\n    '
    pos_rot = (pos @ matrix)
    vel_rot = (vel @ matrix)
    return (pos_rot, vel_rot)