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
2:34 PM To: Discussion of Numerical Python Subject: Re: [Numpy-discussion] Database with Nulls to Numpy Structure 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?

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