Re: [Tutor] Problem understanding the asarray function of numpy

2014-09-11 Thread Emile van Sebille
On 9/11/2014 6:34 AM, Radhika Gaonkar wrote: I have an implementation of lsa, that I need to modify. I am having some trouble understanding the code. This is the line where I am stuck: DocsPerWord = sum(asarray(self.A > 0, 'i'), axis=1) Python doesn't provide an axis parameter for the sum buil

Re: [Tutor] Problem understanding the asarray function of numpy

2014-09-11 Thread Peter Otten
Radhika Gaonkar wrote: > I have an implementation of lsa, that I need to modify. I am having some > trouble understanding the code. This is the line where I am stuck: > > DocsPerWord = sum(asarray(self.A > 0, 'i'), axis=1) > > The link for this implementation is : > http://www.puffinwarellc.com/

[Tutor] Problem understanding the asarray function of numpy

2014-09-11 Thread Radhika Gaonkar
I have an implementation of lsa, that I need to modify. I am having some trouble understanding the code. This is the line where I am stuck: DocsPerWord = sum(asarray(self.A > 0, 'i'), axis=1) The link for this implementation is : http://www.puffinwarellc.com/index.php/news-and-articles/articles/3