[SPARK-2091][MLLIB] use numpy.dot instead of ndarray.dot
[SPARK-2091][MLLIB] use numpy.dot instead of ndarray.dot

`ndarray.dot` is not available in numpy 1.4. This PR makes pyspark/mllib compatible with numpy 1.4.

Author: Xiangrui Meng <meng@databricks.com>

Closes #1035 from mengxr/numpy-1.4 and squashes the following commits:

7ad2f0c [Xiangrui Meng] use numpy.dot instead of ndarray.dot

1haodian/spark,ddna1021/spark,MLnick/spark,SnappyDataInc/spark,pronix/spark,tengpeng/spark,chuckchen/spark,akopich/spark,esi-mineset/spark,ibm-research-ireland/sparkoscope,wangyum/spark,maropu/spark,lxsmnv/spark,wangyum/spark,WindCanDie/spark,mdespriee/spark,holdenk/spark,UndeadBaneGitHub/spark,dbtsai/spark,rednaxelafx/apache-spark,holdenk/spark,kissmetrics/spark,ddna1021/spark,metamx/spark,SHASHANKB/spark,nchammas/spark,Panos-Bletsos/spark-cost-model-optimizer,WindCanDie/spark,saturday-shi/spark,BryanCutler/spark,setjet/spark,vinodkc/spark,patrick-nicholson/spark,tejasapatil/spark,bdrillard/spark,cloud-fan/spark,ibm-research-ireland/sparkoscope,ptkool/spark,SnappyDataInc/spark,pronix/spark,ddna1021/spark,jiangxb1987/spark,dongjoon-hyun/spark,apache-spark-on-k8s/spark,SHASHANKB/spark,sahilTakiar/spark,wzhfy/spark,guoxiaolongzte/spark,eyalfa/spark,bdrillard/spark,LantaoJin/spark,zuotingbing/spark,taroplus/spark,ptkool/spark,highfei2011/spark,aokolnychyi/spark,bdrillard/spark,highfei2011/spark,lvdongr/spark,srowen/spark,adrian-ionescu/apache-spark,JerryLead/spark,darionyaphet/spark,liyichao/spark,goldmedal/spark,andrewor14/iolap,apache-spark-on-k8s/spark,publicRoman/spark,JerryLead/spark,szhem/spark,sachintyagi22/spark,JoshRosen/spark,chuckchen/spark,wangmiao1981/spark,mzl9039/spark,milliman/spark,chuckchen/spark,ioana-delaney/spark,1haodian/spark,andrewor14/spark,pgandhi999/spark,huang1900/spark,kiszk/spark,mike0sv/spark,facaiy/spark,bravo-zhang/spark,patrick-nicholson/spark,witgo/spark,gioenn/xSpark,lxsmnv/spark,loneknightpy/spark,byakuinss/spark,aray/spark,apache-spark-on-k8s/spark,tejasapatil/spark,adrian-ionescu/apache-spark,sahilTakiar/spark,shubhamchopra/spark,gioenn/xSpark,xuanyuanking/spark,nlalevee/spark,ConeyLiu/spark,jiangxb1987/spark,mike0sv/spark,ibm-research-ireland/sparkoscope,esi-mineset/spark,markhamstra/spark,icexelloss/spark,sahilTakiar/spark,gengliangwang/spark,eyalfa/spark,spark-test/spark,HyukjinKwon/spark,dhruve/spark,wangyum/spark,ahnqirage/spark,wangmiao1981/spark,jrshust/spark,maropu/spark,michalsenkyr/spark,aray/spark,gengliangwang/spark,cloud-fan/spark,Aegeaner/spark,icexelloss/spark,saltstar/spark,ajaysaini725/spark,darionyaphet/spark,maropu/spark,Aegeaner/spark,jiangxb1987/spark,xuanyuanking/spark,ioana-delaney/spark,someorz/spark,narahari92/spark,chuckchen/spark,stanzhai/spark,dbtsai/spark,ron8hu/spark,aokolnychyi/spark,facaiy/spark,JoshRosen/spark,rikima/spark,brad-kaiser/spark,xflin/spark,stanzhai/spark,sachintyagi22/spark,setjet/spark,tejasapatil/spark,1haodian/spark,big-pegasus/spark,aokolnychyi/spark,loneknightpy/spark,someorz/spark,jkbradley/spark,bdrillard/spark,rezasafi/spark,bOOm-X/spark,ddna1021/spark,hhbyyh/spark,haowu80s/spark,map222/spark,HyukjinKwon/spark,highfei2011/spark,tejasapatil/spark,Panos-Bletsos/spark-cost-model-optimizer,nilsgrabbert/spark,someorz/spark,big-pegasus/spark,SnappyDataInc/spark,darionyaphet/spark,alunarbeach/spark,poffuomo/spark,ericvandenbergfb/spark,poffuomo/spark,BryanCutler/spark,publicRoman/spark,mike0sv/spark,tengpeng/spark,WindCanDie/spark,taroplus/spark,joseph-torres/spark,map222/spark,Aegeaner/spark,ptkool/spark,cin/spark,sachintyagi22/spark,bdrillard/spark,ahnqirage/spark,metamx/spark,map222/spark,ajaysaini725/spark,setjet/spark,darionyaphet/spark,sahilTakiar/spark,debugger87/spark,andrewor14/spark,HyukjinKwon/spark,mike0sv/spark,hhbyyh/spark,rednaxelafx/apache-spark,techaddict/spark,sahilTakiar/spark,patrick-nicholson/spark,bOOm-X/spark,alunarbeach/spark,andrewor14/iolap,metamx/spark,stanzhai/spark,WeichenXu123/spark,sureshthalamati/spark,eyalfa/spark,apache/spark,hhbyyh/spark,wzhfy/spark,cloud-fan/spark,goldmedal/spark,HyukjinKwon/spark,aokolnychyi/spark,rednaxelafx/apache-spark,wzhfy/spark,kimoonkim/spark,bravo-zhang/spark,cloud-fan/spark,ron8hu/spark,zero323/spark,kevinyu98/spark,minixalpha/spark,rezasafi/spark,zzcclp/spark,xuanyuanking/spark,ddna1021/spark,liyichao/spark,shuangshuangwang/spark,srowen/spark,zuotingbing/spark,huang1900/spark,Panos-Bletsos/spark-cost-model-optimizer,skonto/spark,bravo-zhang/spark,pronix/spark,jiangxb1987/spark,maropu/spark,kimoonkim/spark,apache-spark-on-k8s/spark,esi-mineset/spark,cin/spark,facaiy/spark,sachintyagi22/spark,tengpeng/spark,1haodian/spark,highfei2011/spark,liyichao/spark,ibm-research-ireland/sparkoscope,aosagie/spark,hhbyyh/spark,aosagie/spark,ddna1021/spark,hvanhovell/spark,rikima/spark,sachintyagi22/spark,rekhajoshm/spark,facaiy/spark,taroplus/spark,cloud-fan/spark,publicRoman/spark,jianran/spark,adrian-ionescu/apache-spark,saturday-shi/spark,brad-kaiser/spark,debugger87/spark,pronix/spark,caneGuy/spark,zero323/spark,mahak/spark,apache-spark-on-k8s/spark,shaneknapp/spark,loneknightpy/spark,chuckchen/spark,lvdongr/spark,sureshthalamati/spark,big-pegasus/spark,zero323/spark,ron8hu/spark,JerryLead/spark,byakuinss/spark,Aegeaner/spark,zzcclp/spark,szhem/spark,guoxiaolongzte/spark,milliman/spark,shaneknapp/spark,bOOm-X/spark,yanboliang/spark,aokolnychyi/spark,andrewor14/spark,guoxiaolongzte/spark,akopich/spark,xflin/spark,spark-test/spark,joseph-torres/spark,Panos-Bletsos/spark-cost-model-optimizer,zhouyejoe/spark,hvanhovell/spark,nlalevee/spark,metamx/spark,ron8hu/spark,byakuinss/spark,sachintyagi22/spark,jlopezmalla/spark,alunarbeach/spark,kevinyu98/spark,nilsgrabbert/spark,sureshthalamati/spark,nchammas/spark,milliman/spark,dongjoon-hyun/spark,narahari92/spark,kevinyu98/spark,UndeadBaneGitHub/spark,witgo/spark,mzl9039/spark,ibm-research-ireland/sparkoscope,witgo/spark,vinodkc/spark,ajaysaini725/spark,nilsgrabbert/spark,ptkool/spark,shubhamchopra/spark,SHASHANKB/spark,UndeadBaneGitHub/spark,techaddict/spark,HyukjinKwon/spark,kissmetrics/spark,techaddict/spark,minixalpha/spark,ddna1021/spark,esi-mineset/spark,akopich/spark,jrshust/spark,milliman/spark,aokolnychyi/spark,JerryLead/spark,actuaryzhang/spark,srowen/spark,michalsenkyr/spark,liyichao/spark,shaneknapp/spark,LantaoJin/spark,jlopezmalla/spark,UndeadBaneGitHub/spark,andrewor14/iolap,nlalevee/spark,lvdongr/spark,haowu80s/spark,panfengfeng/spark,dbtsai/spark,rednaxelafx/apache-spark,mzl9039/spark,zero323/spark,akopich/spark,taroplus/spark,kimoonkim/spark,minixalpha/spark,mahak/spark,dongjoon-hyun/spark,jkbradley/spark,lxsmnv/spark,minixalpha/spark,jianran/spark,JoshRosen/spark,maropu/spark,techaddict/spark,mzl9039/spark,sureshthalamati/spark,hvanhovell/spark,ajaysaini725/spark,eyalfa/spark,xuanyuanking/spark,liutang123/spark,ueshin/apache-spark,yanboliang/spark,narahari92/spark,guoxiaolongzte/spark,haowu80s/spark,narahari92/spark,saltstar/spark,kiszk/spark,BryanCutler/spark,jrshust/spark,spark-test/spark,1haodian/spark,publicRoman/spark,huang1900/spark,ibm-research-ireland/sparkoscope,gioenn/xSpark,apache/spark,xflin/spark,guoxiaolongzte/spark,nlalevee/spark,cloud-fan/spark,joseph-torres/spark,brad-kaiser/spark,dhruve/spark,ajaysaini725/spark,janewangfb/spark,zhouyejoe/spark,gioenn/xSpark,kiszk/spark,bdrillard/spark,goldmedal/spark,szhem/spark,spark-test/spark,SHASHANKB/spark,esi-mineset/spark,hhbyyh/spark,shuangshuangwang/spark,1haodian/spark,ahnqirage/spark,techaddict/spark,pgandhi999/spark,loneknightpy/spark,dongjoon-hyun/spark,kissmetrics/spark,mdespriee/spark,WeichenXu123/spark,panfengfeng/spark,ron8hu/spark,yanboliang/spark,someorz/spark,mike0sv/spark,JerryLead/spark,sureshthalamati/spark,ConeyLiu/spark,sureshthalamati/spark,skonto/spark,metamx/spark,ConeyLiu/spark,panfengfeng/spark,ericvandenbergfb/spark,mahak/spark,patrick-nicholson/spark,wangyum/spark,BryanCutler/spark,aosagie/spark,jlopezmalla/spark,skonto/spark,shuangshuangwang/spark,liutang123/spark,ioana-delaney/spark,liutang123/spark,guoxiaolongzte/spark,jiangxb1987/spark,WindCanDie/spark,nilsgrabbert/spark,shaneknapp/spark,map222/spark,liutang123/spark,nilsgrabbert/spark,shuangshuangwang/spark,rikima/spark,taroplus/spark,joseph-torres/spark,goldmedal/spark,loneknightpy/spark,huang1900/spark,pgandhi999/spark,wzhfy/spark,nchammas/spark,jkbradley/spark,SnappyDataInc/spark,zzcclp/spark,mzl9039/spark,nilsgrabbert/spark,janewangfb/spark,bravo-zhang/spark,gioenn/xSpark,highfei2011/spark,shubhamchopra/spark,BryanCutler/spark,WeichenXu123/spark,MLnick/spark,UndeadBaneGitHub/spark,shuangshuangwang/spark,mzl9039/spark,aray/spark,mahak/spark,haowu80s/spark,pgandhi999/spark,Panos-Bletsos/spark-cost-model-optimizer,witgo/spark,janewangfb/spark,yanboliang/spark,saltstar/spark,ptkool/spark,goldmedal/spark,haowu80s/spark,lxsmnv/spark,tejasapatil/spark,liyichao/spark,loneknightpy/spark,patrick-nicholson/spark,BryanCutler/spark,dongjoon-hyun/spark,rekhajoshm/spark,yanboliang/spark,wangmiao1981/spark,michalsenkyr/spark,mdespriee/spark,ericvandenbergfb/spark,pronix/spark,mahak/spark,dbtsai/spark,pgandhi999/spark,wzhfy/spark,sahilTakiar/spark,kissmetrics/spark,UndeadBaneGitHub/spark,ConeyLiu/spark,setjet/spark,big-pegasus/spark,dhruve/spark,SnappyDataInc/spark,maropu/spark,ueshin/apache-spark,actuaryzhang/spark,sahilTakiar/spark,andrewor14/spark,icexelloss/spark,huang1900/spark,holdenk/spark,narahari92/spark,rikima/spark,jlopezmalla/spark,JoshRosen/spark,ericvandenbergfb/spark,dbtsai/spark,jlopezmalla/spark,patrick-nicholson/spark,debugger87/spark,stanzhai/spark,skonto/spark,Aegeaner/spark,janewangfb/spark,kiszk/spark,liyichao/spark,chuckchen/spark,kimoonkim/spark,debugger87/spark,poffuomo/spark,LantaoJin/spark,kimoonkim/spark,ptkool/spark,kissmetrics/spark,michalsenkyr/spark,vinodkc/spark,ioana-delaney/spark,gengliangwang/spark,cin/spark,caneGuy/spark,actuaryzhang/spark,kiszk/spark,gengliangwang/spark,setjet/spark,setjet/spark,stanzhai/spark,nlalevee/spark,debugger87/spark,saturday-shi/spark,WindCanDie/spark,aokolnychyi/spark,xflin/spark,sachintyagi22/spark,BryanCutler/spark,minixalpha/spark,wzhfy/spark,rednaxelafx/apache-spark,kimoonkim/spark,WindCanDie/spark,kiszk/spark,MLnick/spark,zuotingbing/spark,saturday-shi/spark,janewangfb/spark,michalsenkyr/spark,ioana-delaney/spark,spark-test/spark,alunarbeach/spark,bdrillard/spark,bOOm-X/spark,tengpeng/spark,wangmiao1981/spark,dhruve/spark,kevinyu98/spark,dbtsai/spark,jianran/spark,ConeyLiu/spark,nchammas/spark,witgo/spark,hvanhovell/spark,rekhajoshm/spark,icexelloss/spark,joseph-torres/spark,MLnick/spark,skonto/spark,dbtsai/spark,wangmiao1981/spark,markhamstra/spark,cin/spark,ron8hu/spark,highfei2011/spark,LantaoJin/spark,Aegeaner/spark,debugger87/spark,dhruve/spark,alunarbeach/spark,eyalfa/spark,byakuinss/spark,jiangxb1987/spark,caneGuy/spark,stanzhai/spark,sureshthalamati/spark,minixalpha/spark,patrick-nicholson/spark,esi-mineset/spark,mahak/spark,jrshust/spark,LantaoJin/spark,JerryLead/spark,kevinyu98/spark,actuaryzhang/spark,holdenk/spark,pgandhi999/spark,adrian-ionescu/apache-spark,shubhamchopra/spark,taroplus/spark,dongjoon-hyun/spark,andrewor14/iolap,JoshRosen/spark,big-pegasus/spark,panfengfeng/spark,markhamstra/spark,facaiy/spark,kissmetrics/spark,holdenk/spark,metamx/spark,andrewor14/iolap,bOOm-X/spark,caneGuy/spark,akopich/spark,gengliangwang/spark,adrian-ionescu/apache-spark,poffuomo/spark,ajaysaini725/spark,wangyum/spark,gioenn/xSpark,apache/spark,xuanyuanking/spark,ahnqirage/spark,WeichenXu123/spark,metamx/spark,alunarbeach/spark,lxsmnv/spark,shaneknapp/spark,saltstar/spark,wangyum/spark,gengliangwang/spark,aray/spark,saltstar/spark,JoshRosen/spark,rezasafi/spark,eyalfa/spark,xuanyuanking/spark,brad-kaiser/spark,aray/spark,rekhajoshm/spark,markhamstra/spark,zero323/spark,ericvandenbergfb/spark,markhamstra/spark,MLnick/spark,vinodkc/spark,zzcclp/spark,apache/spark,tengpeng/spark,someorz/spark,shubhamchopra/spark,zuotingbing/spark,spark-test/spark,shubhamchopra/spark,cin/spark,SHASHANKB/spark,xflin/spark,jrshust/spark,taroplus/spark,debugger87/spark,tengpeng/spark,andrewor14/spark,publicRoman/spark,andrewor14/iolap,stanzhai/spark,byakuinss/spark,apache-spark-on-k8s/spark,yanboliang/spark,ron8hu/spark,MLnick/spark,actuaryzhang/spark,zero323/spark,mdespriee/spark,apache/spark,haowu80s/spark,mzl9039/spark,adrian-ionescu/apache-spark,dongjoon-hyun/spark,bOOm-X/spark,rednaxelafx/apache-spark,skonto/spark,andrewor14/iolap,poffuomo/spark,ericvandenbergfb/spark,saturday-shi/spark,hvanhovell/spark,techaddict/spark,nchammas/spark,gengliangwang/spark,panfengfeng/spark,michalsenkyr/spark,brad-kaiser/spark,big-pegasus/spark,bravo-zhang/spark,szhem/spark,michalsenkyr/spark,cin/spark,lxsmnv/spark,lvdongr/spark,kevinyu98/spark,zhouyejoe/spark,zzcclp/spark,srowen/spark,jkbradley/spark,Panos-Bletsos/spark-cost-model-optimizer,ahnqirage/spark,WeichenXu123/spark,gioenn/xSpark,facaiy/spark,rezasafi/spark,UndeadBaneGitHub/spark,janewangfb/spark,pronix/spark,rikima/spark,xuanyuanking/spark,ahnqirage/spark,nilsgrabbert/spark,lvdongr/spark,jianran/spark,szhem/spark,big-pegasus/spark,mahak/spark,szhem/spark,esi-mineset/spark,shuangshuangwang/spark,rezasafi/spark,zuotingbing/spark,map222/spark,witgo/spark,zhouyejoe/spark,publicRoman/spark,darionyaphet/spark,map222/spark,maropu/spark,mdespriee/spark,poffuomo/spark,cloud-fan/spark,jlopezmalla/spark,darionyaphet/spark,JerryLead/spark,eyalfa/spark,JoshRosen/spark,poffuomo/spark,SHASHANKB/spark,jrshust/spark,milliman/spark,nlalevee/spark,srowen/spark,mdespriee/spark,chuckchen/spark,zuotingbing/spark,ptkool/spark,WindCanDie/spark,zhouyejoe/spark,joseph-torres/spark,vinodkc/spark,icexelloss/spark,rezasafi/spark,someorz/spark,bravo-zhang/spark,vinodkc/spark,markhamstra/spark,kiszk/spark,tengpeng/spark,hhbyyh/spark,rezasafi/spark,caneGuy/spark,rednaxelafx/apache-spark,narahari92/spark,jianran/spark,aosagie/spark,akopich/spark,kevinyu98/spark,liutang123/spark,nchammas/spark,1haodian/spark,wangmiao1981/spark,holdenk/spark,spark-test/spark,zhouyejoe/spark,shaneknapp/spark,rikima/spark,andrewor14/spark,ioana-delaney/spark,techaddict/spark,ericvandenbergfb/spark,rekhajoshm/spark,WeichenXu123/spark,zzcclp/spark,Aegeaner/spark,brad-kaiser/spark,aosagie/spark,guoxiaolongzte/spark,byakuinss/spark,SnappyDataInc/spark,liyichao/spark,rikima/spark,darionyaphet/spark,jianran/spark,lvdongr/spark,akopich/spark,xflin/spark,liutang123/spark,aosagie/spark,ibm-research-ireland/sparkoscope,wangmiao1981/spark,liutang123/spark,HyukjinKwon/spark,srowen/spark,zzcclp/spark,jrshust/spark,rekhajoshm/spark,caneGuy/spark,panfengfeng/spark,aray/spark,goldmedal/spark,ueshin/apache-spark,tejasapatil/spark,actuaryzhang/spark,apache/spark,jiangxb1987/spark,jkbradley/spark,icexelloss/spark,SHASHANKB/spark,saltstar/spark,nchammas/spark,wzhfy/spark,highfei2011/spark,dhruve/spark,shuangshuangwang/spark,MLnick/spark,huang1900/spark,mike0sv/spark,tejasapatil/spark,zuotingbing/spark,srowen/spark,LantaoJin/spark,saltstar/spark,someorz/spark,milliman/spark,aray/spark,WeichenXu123/spark,jianran/spark,caneGuy/spark,hhbyyh/spark,jkbradley/spark,ajaysaini725/spark,mdespriee/spark,lxsmnv/spark,lvdongr/spark,icexelloss/spark,saturday-shi/spark,jlopezmalla/spark,ueshin/apache-spark,hvanhovell/spark,pgandhi999/spark,andrewor14/spark,mike0sv/spark,huang1900/spark,milliman/spark,aosagie/spark,HyukjinKwon/spark,shaneknapp/spark,bravo-zhang/spark,actuaryzhang/spark,yanboliang/spark,ueshin/apache-spark,bOOm-X/spark,skonto/spark,alunarbeach/spark,ConeyLiu/spark,zhouyejoe/spark,zero323/spark,kissmetrics/spark,ConeyLiu/spark,rekhajoshm/spark,cin/spark,narahari92/spark,ioana-delaney/spark,apache-spark-on-k8s/spark,loneknightpy/spark,apache/spark,witgo/spark,dhruve/spark,minixalpha/spark,facaiy/spark,wangyum/spark,panfengfeng/spark,janewangfb/spark,map222/spark,joseph-torres/spark,shubhamchopra/spark,markhamstra/spark,ueshin/apache-spark,jkbradley/spark,xflin/spark,kimoonkim/spark,ueshin/apache-spark,setjet/spark,szhem/spark,matthewfranglen/spark,LantaoJin/spark,goldmedal/spark,byakuinss/spark,publicRoman/spark,vinodkc/spark,adrian-ionescu/apache-spark,SnappyDataInc/spark,saturday-shi/spark,holdenk/spark,brad-kaiser/spark,ahnqirage/spark,nlalevee/spark,hvanhovell/spark,Panos-Bletsos/spark-cost-model-optimizer