This can involve both the nested for loop approach as well as some numpy magic to get the same goal :)