fix undefined function and add integer divisions
Merge pull request #3168 from juliantaylor/numarray-fixes

fix undefined function and add integer divisions