fix: make sure weights is an ndarray before checking dtype
fix: make sure weights is an ndarray before checking dtype

mdhaber/scipy,anntzer/scipy,rgommers/scipy,zerothi/scipy,zerothi/scipy,matthew-brett/scipy,Stefan-Endres/scipy,andyfaff/scipy,e-q/scipy,andyfaff/scipy,WarrenWeckesser/scipy,mdhaber/scipy,Eric89GXL/scipy,WarrenWeckesser/scipy,vigna/scipy,ilayn/scipy,Stefan-Endres/scipy,matthew-brett/scipy,mdhaber/scipy,grlee77/scipy,e-q/scipy,ilayn/scipy,rgommers/scipy,perimosocordiae/scipy,ilayn/scipy,perimosocordiae/scipy,Eric89GXL/scipy,Stefan-Endres/scipy,tylerjereddy/scipy,vigna/scipy,tylerjereddy/scipy,rgommers/scipy,vigna/scipy,e-q/scipy,anntzer/scipy,endolith/scipy,matthew-brett/scipy,endolith/scipy,vigna/scipy,vigna/scipy,scipy/scipy,andyfaff/scipy,matthew-brett/scipy,tylerjereddy/scipy,WarrenWeckesser/scipy,ilayn/scipy,Stefan-Endres/scipy,anntzer/scipy,mdhaber/scipy,scipy/scipy,scipy/scipy,perimosocordiae/scipy,Stefan-Endres/scipy,e-q/scipy,zerothi/scipy,perimosocordiae/scipy,WarrenWeckesser/scipy,mdhaber/scipy,tylerjereddy/scipy,perimosocordiae/scipy,anntzer/scipy,anntzer/scipy,Eric89GXL/scipy,ilayn/scipy,tylerjereddy/scipy,Eric89GXL/scipy,endolith/scipy,scipy/scipy,WarrenWeckesser/scipy,endolith/scipy,Eric89GXL/scipy,Stefan-Endres/scipy,e-q/scipy,scipy/scipy,andyfaff/scipy,rgommers/scipy,andyfaff/scipy,Eric89GXL/scipy,grlee77/scipy,mdhaber/scipy,endolith/scipy,WarrenWeckesser/scipy,endolith/scipy,andyfaff/scipy,grlee77/scipy,grlee77/scipy,zerothi/scipy,ilayn/scipy,zerothi/scipy,perimosocordiae/scipy,zerothi/scipy,anntzer/scipy,rgommers/scipy,scipy/scipy,matthew-brett/scipy,grlee77/scipy