Re: [Numpy-discussion] Database with Nulls to Numpy Structure

2009-10-02 Thread Christopher Barker
Mark Janikas wrote: > Thanks for the input! I wonder if I can resize my own record array? I.e. > one call to truncate... Ill give it a go. you should be able too, yes. Be careful though, you can't call resize() if there are any other references to the array. > But the resize works great as i

Re: [Numpy-discussion] Database with Nulls to Numpy Structure

2009-10-02 Thread Mark Janikas
Thanks for the input! I wonder if I can resize my own record array? I.e. one call to truncate... Ill give it a go. But the resize works great as it doesn't make a copy: In [12]: a = NUM.arange(10) In [13]: id(a) Out[13]: 190182896 In [14]: a.resize(5,) In [15]: a Out[15]: array([0, 1, 2, 3

Re: [Numpy-discussion] poly class question

2009-10-02 Thread josef . pktd
On Fri, Oct 2, 2009 at 3:38 PM, Charles R Harris wrote: > > > On Fri, Oct 2, 2009 at 12:30 PM, wrote: >> >> On Fri, Oct 2, 2009 at 2:09 PM, Charles R Harris >> wrote: >> > >> > >> > On Fri, Oct 2, 2009 at 11:35 AM, Charles R Harris >> > wrote: >> >> >> >> >> >> On Fri, Oct 2, 2009 at 11:33 AM,

Re: [Numpy-discussion] merging docs from wiki

2009-10-02 Thread David Goldsmith
Is there any way to move the existing parts of this thread (i.e., not just future posts, which of course is as simple as posting them there instead) over to scipy-dev, where it really belongs? DG On Fri, Oct 2, 2009 at 12:56 PM, Pauli Virtanen wrote: > to, 2009-10-01 kello 12:19 -0400, Ralf Gom

Re: [Numpy-discussion] merging docs from wiki

2009-10-02 Thread Pauli Virtanen
to, 2009-10-01 kello 12:19 -0400, Ralf Gommers kirjoitti: > Sorry to ask again, but it would really be very useful to get those > docstrings merged for both scipy and numpy. [clip] Numpy's new docstrings is are now in SVN too, for the most part. An amazing amount of work was done during the summe

Re: [Numpy-discussion] poly class question

2009-10-02 Thread Charles R Harris
On Fri, Oct 2, 2009 at 12:30 PM, wrote: > On Fri, Oct 2, 2009 at 2:09 PM, Charles R Harris > wrote: > > > > > > On Fri, Oct 2, 2009 at 11:35 AM, Charles R Harris > > wrote: > >> > >> > >> On Fri, Oct 2, 2009 at 11:33 AM, Charles R Harris > >> wrote: > >>> > >>> > >>> On Fri, Oct 2, 2009 at 11:

Re: [Numpy-discussion] Database with Nulls to Numpy Structure

2009-10-02 Thread Christopher Barker
Mark Janikas wrote: > So, do I use lists and > append then create the arrays… Or do I fill up the pre-allocated “empty” > arrays and slice off the ends? Thoughts? Thanks much… Either will work. I think the decision would be based on how many Null records you expect -- if it's a small fraction

[Numpy-discussion] Database with Nulls to Numpy Structure

2009-10-02 Thread Mark Janikas
Hello All, I was hoping you could help me out with a simple little problem I am having: I am reading data from a database that contains NULL values. There is more than one field being read in with equal length, but if any of them are NULL in a row, then I do NOT want to include it in my numpy

Re: [Numpy-discussion] poly class question

2009-10-02 Thread josef . pktd
On Fri, Oct 2, 2009 at 2:09 PM, Charles R Harris wrote: > > > On Fri, Oct 2, 2009 at 11:35 AM, Charles R Harris > wrote: >> >> >> On Fri, Oct 2, 2009 at 11:33 AM, Charles R Harris >> wrote: >>> >>> >>> On Fri, Oct 2, 2009 at 11:30 AM, Charles R Harris >>> wrote: On Fri, Oct 2, 20

Re: [Numpy-discussion] poly class question

2009-10-02 Thread Charles R Harris
On Fri, Oct 2, 2009 at 11:35 AM, Charles R Harris wrote: > > > On Fri, Oct 2, 2009 at 11:33 AM, Charles R Harris < > charlesr.har...@gmail.com> wrote: > >> >> >> On Fri, Oct 2, 2009 at 11:30 AM, Charles R Harris < >> charlesr.har...@gmail.com> wrote: >> >>> >>> >>> On Fri, Oct 2, 2009 at 11:08 AM

Re: [Numpy-discussion] poly class question

2009-10-02 Thread Charles R Harris
On Fri, Oct 2, 2009 at 11:33 AM, Charles R Harris wrote: > > > On Fri, Oct 2, 2009 at 11:30 AM, Charles R Harris < > charlesr.har...@gmail.com> wrote: > >> >> >> On Fri, Oct 2, 2009 at 11:08 AM, wrote: >> >>> Is there a way in numpy (or scipy) to get an infinite expansion for >>> the inverse of

Re: [Numpy-discussion] poly class question

2009-10-02 Thread Charles R Harris
On Fri, Oct 2, 2009 at 11:30 AM, Charles R Harris wrote: > > > On Fri, Oct 2, 2009 at 11:08 AM, wrote: > >> Is there a way in numpy (or scipy) to get an infinite expansion for >> the inverse of a polynomial (for a finite number of terms) >> >> np.poly1d([ -0.8, 1])**(-1) >> >> application for ex

Re: [Numpy-discussion] poly class question

2009-10-02 Thread Charles R Harris
On Fri, Oct 2, 2009 at 11:08 AM, wrote: > Is there a way in numpy (or scipy) to get an infinite expansion for > the inverse of a polynomial (for a finite number of terms) > > np.poly1d([ -0.8, 1])**(-1) > > application for example the MA representation of an AR(1) > > Hmm, I've been working on a

[Numpy-discussion] poly class question

2009-10-02 Thread josef . pktd
Is there a way in numpy (or scipy) to get an infinite expansion for the inverse of a polynomial (for a finite number of terms) np.poly1d([ -0.8, 1])**(-1) application for example the MA representation of an AR(1) and fractional powers np.poly1d([ -1, 1])**0.5 this is useful for fractionally i

Re: [Numpy-discussion] Question about improving genfromtxt errors

2009-10-02 Thread Bruce Southey
On 09/30/2009 12:44 PM, Skipper Seabold wrote: > On Wed, Sep 30, 2009 at 12:56 PM, Bruce Southey wrote: > >> On 09/30/2009 10:22 AM, Skipper Seabold wrote: >> >>> On Tue, Sep 29, 2009 at 4:36 PM, Bruce Southeywrote: >>> >>> >>> Hi, The first case just has to handle