I've deleted the code b/c it was absurdly slow. It was pretty brute-force.
-Looped through each row (r) of y
-check to see where y[r,0] - x[:,0] < eps (call that row r_hit)
-set y[r,1] = x[r_hit,1]
There was kind of a short fuse on this, and I was already reading the data from
a text file. So I j
John,
Thanks for the quick reply. Unfortunately, no, they're not indexed like that.
The first columns are actually floating-point date numbers from
matplotlib.dates.date2num. Looks like this is just going to be painful...
Thanks for the tip though. That'll definitely be useful elsewhere.
-paul
Hey folks,
I've one array, x, that you could define as follows:
[[1, 2.25],
[2, 2.50],
[3, 2.25],
[4, 0.00],
[8, 0.00],
[9, 2.75]]
Then my second array, y, is:
[[1, 0.00],
[2, 0.00],
[3, 0.00],
[4, 0.00],
[5, 0.00],
[6, 0.00],
[7, 0.00],
[8, 0.00],
[9, 0.00],
[10,0.00]]
Is there a
Wayne,
Matrices are two dimensional arrays so you need two indices to access an
individual element:
In [1]: from numpy import matrix
In [2]: m = matrix([[1.2],[2.3]])
In [3]: m[0,0]
Out[3]: 1.2
-paul
-Original Message-
From: numpy-discussion-boun...@scipy.org
[mailto:numpy-discussio
If your on windows, you can probably get rid of it through the Add/Remove
Programs portion of the Conrol Panel.
--
Paul Hobson
Senior Staff Engineer
Geosyntec Consultants
Portland, OR
On Mar 26, 2010, at 8:09 PM, "Wayne Watson"
mailto:sierra_mtnv...@sbcglobal.net>> wrote:
Thanks. How do I swit
Wayne,
The current release of Scipy doesn't work perfectly well with Numpy 1.4.
On my systems (Mac OS 10.6, WinXP, and Ubuntu), I'm running Numpy 1.4 with the
current Scipy on Python 2.6.4. I get the same error you describe below on the
first attempt. For some reason unknown to me, it works on