= 0.0
for offset in range(0,2):
for i in range(1, nx-1):
for j in range(1 + (i + offset) % 2, ny-1, 2):
tmp = u[j,i]
u[j,i] = ((u[j-1, i] + u[j+1, i])*dx2 +
(u[j, i-1] + u[j, i+1])*dy2)*dnr_inv
ve got pretty good performance as well as
a handle on using weave.blitz in the future.
-jsnyder
--
James Snyder
Biomedical Engineering
Northwestern University
[EMAIL PROTECTED]
PGP: http://fanplastic.org/key.txt
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion
ons that can be put through weave.
I know this is the numpy list, so I can take things over to the scipy
list if that's more appropriate.
On Mon, May 19, 2008 at 7:36 PM, Robert Kern <[EMAIL PROTECTED]> wrote:
> On Mon, May 19, 2008 at 6:55 PM, James Snyder <[EMAIL PROTECTED]> w
not asking to match MATLAB performance. It'd be nice,
but again I'm just trying to put together decent, fairly efficient
numpy code.
On Mon, May 19, 2008 at 3:53 PM, Christopher Barker
<[EMAIL PROTECTED]> wrote:
> Anne Archibald wrote:
>> 2008/5/19 James Snyder <[EMAIL PROT
t; wrote:
> Anne Archibald wrote:
>> 2008/5/19 James Snyder <[EMAIL PROTECTED]>:
>>> I can provide the rest of the code if needed, but it's basically just
>>> filling some vectors with random and empty data and initializing a few
>>> things.
>>
spk = np.where(self.v>=self.theta)
self.S[n,idx_spk] = 1
self.theta[idx_spk] = self.theta[idx_spk] + self.b
self.prev_u = self.u
self.prev_theta = self.theta
--
James Snyder
Biomedical Engineering
Northwestern University
[EMAIL PROTECTED]
_
1004 tests in 1.342s
OK
Out[2]:
On Sun, May 18, 2008 at 9:47 PM, Jarrod Millman <[EMAIL PROTECTED]> wrote:
> On Sun, May 18, 2008 at 12:56 PM, James Snyder <[E
-
Ran 996 tests in 1.784s
OK
Out[2]:
--
James Snyder
Biomedical Engineering
Northwestern University
[EMAIL PROTECTED]
___
Numpy-discussion mailing list
Numpy-dis
numpy/core/tests/test_numeric.py",
line 230, in test_values
a = fromiter(self.makegen(), int)
MemoryError: cannot allocate array memory
------
Ran 991 tests in 1.603s
FAILED (errors=3)
--
James Snyder