def center_of_mass_array(
        vectors,
        primary_mass,
        secondary_mass,
        ):
    """
    Returns array of center_of_mass vectors, where primaries are considered to
    be at (0,0,0) and secondaries at 'vectors'.
    """
    total_mass = (primary_mass + secondary_mass).reshape(
            (len(primary_mass), 1)
            )
    center_of_mass_array = (
            (
                vectors
                * secondary_mass.reshape(
                    (len(secondary_mass), 1)
                    )
                )
            / total_mass
            )
    return center_of_mass_array