added checks for numpy.ndarray before accessing shape attribute
added checks for numpy.ndarray before accessing shape attribute

summanlp/gensim,bhargavvader/gensim,bhargavvader/gensim,gojomo/gensim,macks22/gensim,macks22/gensim,mattilyra/gensim,RaRe-Technologies/gensim,markroxor/gensim,ELind77/gensim,RaRe-Technologies/gensim,robotcator/gensim,markroxor/gensim,summanlp/gensim,piskvorky/gensim,mattilyra/gensim,quole/gensim,piskvorky/gensim,gojomo/gensim,piskvorky/gensim,RaRe-Technologies/gensim,markroxor/gensim,gojomo/gensim,quole/gensim,gojomo/gensim,ELind77/gensim,summanlp/gensim,macks22/gensim,bhargavvader/gensim,robotcator/gensim,RaRe-Technologies/gensim,mattilyra/gensim,ELind77/gensim,robotcator/gensim,quole/gensim