Working with Cursors

2012-04-17 Thread timlash
Searched the web and this forum without satisfaction. Using Python 2.7 and pyODBC on Windows XP I can get the code below to run and generate two cursors from two different databases without problems. Ideally, I'd then like to join these result cursors thusly: SELECT a.state, sum(b.Sales) FROM

Re: Numpy Performance

2009-04-24 Thread timlash
Thanks for your replies. @Peter - My arrays are not sparse at all, but I'll take a quick look as scipy. I also should have mentioned that my numpy arrays are of Object type as each data point (row) has one or more text labels for categorization. @Robert - Thanks for the comments about how numpy

Numpy Performance

2009-04-23 Thread timlash
Still fairly new to Python. I wrote a program that used a class called RectangularArray as described here: class RectangularArray: def __init__(self, rows, cols, value=0): self.arr = [None]*rows self.row = [value]*cols def __getitem__(self, (i, j)): return (self.arr[i] or