BUG : fixes broadcast errors with np 1.9

 fixes some of the issues raised in #3186
BUG : fix the rest of the errors from np 1.9

 Addresses the remaining errors from #3186
BUG: improved fix for np 1.9 errors
Merge pull request #5 from ianthomas23/np_error_patch

BUG: improved fix for np 1.9 errors
Merge pull request #3188 from tacaswell/np_error_patch

Np error patch