Fixed a numpy broadcast issue