On Wed, 04 Jan 2012 12:29:36 +0100, Derek Homeier wrote:
On 04.01.2012, at 5:10AM, questions anon wrote:
Thanks for your responses but I am still having difficuties with this
problem. Using argmax gives me one very large value and I am not sure
what it is.
it is the index in the flattened
On 02/22/2012 10:45 PM, Chao YUE wrote:
Hi all,
Is anyone using some python geospatial package that can do jobs like
intersection, etc. the job is like you automatically extract a region
on a global map etc.
thanks and cheers,
Chao
Chao,
shapely would do this, though I found it had a
On 03/01/2012 12:35 PM, Pierre Barthelemy wrote:
Hello,
for a data analysis tool i am programming, i need to plot a cut through
a 2D graph. I then have a 2D array, and the indices
start=(start_x,start_y) and stop=(stop_x,stop_y) that are the position
of the starting point and stop point of
Hi, I'm running in this strange issue when using some pretty large
float32 arrays. In the following code I create a large array filled with
ones, and calculate mean and sum, first with a float64 version, then
with a float32 version. Note the difference between the two. NB the
float64 version
On 11/03/2010 12:31 PM, Warren Weckesser wrote:
On Wed, Nov 3, 2010 at 5:59 AM, Warren Weckesser
warren.weckes...@enthought.com mailto:warren.weckes...@enthought.com
wrote:
On Wed, Nov 3, 2010 at 3:54 AM, Vincent Schut sc...@sarvision.nl
mailto:sc...@sarvision.nl wrote
On 11/03/2010 03:04 PM, Bruce Southey wrote:
On 11/03/2010 06:52 AM, Pauli Virtanen wrote:
Wed, 03 Nov 2010 12:39:08 +0100, Vincent Schut wrote:
[clip]
Btw, should I file a bug on this?
One can argue that mean() and sum() should use a numerically stabler
algorithm, so yes, a bug can be filed
On 01/24/2011 02:53 PM, John wrote:
Hello,
I'm trying to cycle over some vectors (lat,lon,emissions) of
irregularly spaced lat/lon spots, and values. I need to sum the values
each contributing to grid on a regular lat lon grid.
This is what I have presently, but it is too slow. Is there a
On 05/31/2011 11:04 AM, Edoardo Pasca wrote:
Dear all,
sometimes I encounter the problem that calling many times a function
it happens that some local variables are not defined and the procedure
crashes.
For example I have a function defined as
def procedure(tt, Ctissue, WeinmannFit,
Hmm, it seems my original message did not come through? Not in gmane, at
least... Well, here's again:
Hi numpy and/or gdal guru's,
I'm suddenly getting into trouble compiling gdal's python extension,
when it includes ndarrayobject.h from numpy. First it complains about my
python not being
Hi all,
It appeared to be a gdal issue after all: the arrayobject header file
was being included before the python headers...
Glad it wasn't something like me having borked my numpy build :)
Cheers,
Vincent.
Vincent Schut wrote:
Hmm, it seems my original message did not come through
:-) It's really that simple nowadays. And most of our
processing is very parallel in nature.
Cheers,
Vincent Schut.
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion
the argsort result to work. Any hints?
Hard to explain. I hope someone understands it, otherwise please let me
know and I'll try to refrase :)
Cheers,
Vincent Schut.
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman
Matthew Perry wrote:
Hi all,
I'm not sure if my terminology is familiar but I'm trying to do a
moving window analysis (ie a spatial filter or kernel) on a 2-D
array representing elevation. For example, a 3x3 window centered on
each cell is used to calculate the derivate slope of that cell.
Hi mdekauwe,
as long as your data size is small enough to fit a 8x array in memory
and use it, why not just skip the running total and average 8 data
arrays each 8day period? And skip the x and y loops; these are real
performance killers. As a bonus, your code gets a lot smaller and more
mdekauwe wrote:
Thanks...I have adopted that and as you said it is a lot neater! Though I
need to keep the pixel count for a weighting in another piece of code so
have amended your logic slightly.
Alternatively, you could simply take the sum over axis=0 of the weight
array to get the pixel
mdekauwe wrote:
Vincent Schut-2 wrote:
Oh, and minor issue: creating a array of zeros and then multiplying with
-999 still makes an array of zeros... I'd incorporated an array of
*ones* multiplied with -999, because for the last chunk of days you
could end up with a 8day array only
Wayne Watson wrote:
I have a list that already has the frequencies from 0 to 255. However,
I'd like to make a histogram that has say 32 bins whose ranges are 0-7,
8-15, ... 248-255. Is it possible?
Wayne,
you might find the 'numpy example list with doc' webpage quite
informative...
On 03/05/2010 11:51 AM, Pierre GM wrote:
On Mar 5, 2010, at 4:38 AM, David Goldsmith wrote:
Hi! Sorry for the cross-post, but my own investigation has led me to
suspect that mine is actually a numpy problem, not a matplotlib problem.
I'm getting the following traceback from a call to
On 04/05/2010 06:06 PM, Keith Goodman wrote:
On Mon, Apr 5, 2010 at 8:44 AM, Ken Basyekbas...@jhu.edu wrote:
Hi Folks,
I have two arrays, A and B, with the same shape. I want to find the
highest values in A along some axis, then extract the corresponding
values from B. I can get the
On 04/06/2010 03:22 PM, Ken Basye wrote:
From: Vincent Schut sc...@sarvision.nl
On 04/05/2010 06:06 PM, Keith Goodman wrote:
On Mon, Apr 5, 2010 at 8:44 AM, Ken Basyekbas...@jhu.edu wrote:
snip
b[a.argmax(axis=0), range(3)]
array([0, 4, 5])
Which does not work anymore when your
On 06/02/2010 04:52 AM, josef.p...@gmail.com wrote:
On Tue, Jun 1, 2010 at 9:57 PM, Zachary Pincuszachary.pin...@yale.edu
wrote:
I guess it's as fast as I'm going to get. I don't really see any
other way. BTW, the lat/lons are integers)
You could (in c or cython) try a brain-dead hashtable
will get a pixel count for each bin combination.
see:
http://docs.scipy.org/doc/numpy/reference/generated/numpy.histogram2d.html
Regards,
Vincent Schut.
*From:* Friedrich Romstedt friedrichromst...@gmail.com
is long, try to find the relevant lines indicating where and what goes
wrong)
Good luck anyway!
Vincent Schut.
Thanks, Vincent. And I am more comfortable with pre-built packages.
Most of us are ;-) But sometimes you just need to bite the bullet...
Dick
On 07/19/2010 03:34 PM, Richard D. Moores wrote:
On Mon, Jul 19, 2010 at 06:15, Vincent Schutsc...@sarvision.nl wrote:
On 07/19/2010 02:56 PM, Richard D. Moores wrote:
On Mon, Jul 19, 2010 at 05:28, Vincent Schutsc...@sarvision.nlwrote:
Well, you might want to read up on some
On 07/19/2010 10:14 PM, Friedrich Romstedt wrote:
2010/7/19 sandric ionutsandricio...@yahoo.com:
For land-use a class would be for example forest, other would be orchard
etc. For Slope gradient I would have values which3 and between 3 and 7
etc. So, I will have 2 raster data with, let's say,
.
Good luck!
Vincent Schut.
The long version: I am trying to resample an image loaded with GDAL into an
NxN array. Note that this is for statistical purposes, so image quality
doesn't matter. For the curious, the image is derived from satellite imagery
and displays a map of hotspots of tropical
Hi, I'm trying to get into recarrays. Unfortunately documentation is a
bit on the short side...
Lets say I have a rgb image of arbitrary size, as a normal ndarray
(that's what my image reading lib gives me). Thus shape is
(3,ysize,xsize), dtype = int8. How would I convert/view this as a
Christopher Barker wrote:
Vincent Schut wrote:
Lets say I have a rgb image of arbitrary size, as a normal ndarray
(that's what my image reading lib gives me). Thus shape is
(3,ysize,xsize), dtype = int8. How would I convert/view this as a
recarray of shape (ysize, xsize) with the first
Robert Kern wrote:
On Wed, May 21, 2008 at 1:48 AM, Vincent Schut [EMAIL PROTECTED] wrote:
Christopher Barker wrote:
Also, if you image data is rgb, usually, that's a (width, height, 3)
array: rgbrgbrgbrgb... in memory. If you have a (3, width, height)
array, then that's rrr
Robert Kern wrote:
On Wed, May 21, 2008 at 2:03 AM, Vincent Schut [EMAIL PROTECTED] wrote:
Robert Kern wrote:
On Wed, May 21, 2008 at 1:48 AM, Vincent Schut [EMAIL PROTECTED] wrote:
Christopher Barker wrote:
Also, if you image data is rgb, usually, that's a (width, height, 3)
array
Anne Archibald wrote:
2008/5/21 Vincent Schut [EMAIL PROTECTED]:
Christopher Barker wrote:
Also, if you image data is rgb, usually, that's a (width, height, 3)
array: rgbrgbrgbrgb... in memory. If you have a (3, width, height)
array, then that's rrr... Some image
Emanuele Olivetti wrote:
snip
This solution is super-fast, stable and use little memory.
It is based on the fact that:
(x-y)^2*w = x*x*w - 2*x*y*w + y*y*w
For size1=size2=dimensions=1000 requires ~0.6sec. to compute
on my dual core duo. It is 2 order of magnitude faster than my
previous
Rob Hetland wrote:
On May 22, 2008, at 9:45 AM, Vincent Schut wrote:
snip
Really, though, the rbf toolbox will not be limited by the memory of
the distance matrix. Later on, you need to do a large linear algebra
'solve', like this:
r = norm(x, x) # The distances between all
David Huard wrote:
On Mon, Aug 4, 2008 at 1:45 PM, Jarrod Millman [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] wrote:
snip
Question: Should histogram raise a warning by default (new=True) to warn
users that the behaviour has changed ? Or warn only if new=False to
remind that
the old
Probably I'm just overlooking something obvious, but I'm having problems
with maskedarrays (numpy.ma from svn: '1.3.0.dev5861'), the mask by
default being a single bool value ('False') instead of a properly sized
bool array. If I then try to mask one value by assigning values to
certain mask
,
it seemed so simple...). Again, no offence meant, and your work on ma is
really appreciated. I hope this discussion will result in more
intuitiveness in a future (C?) implementation of ma.
Regards,
Vincent.
On Wednesday 24 September 2008 06:25:57 Vincent Schut wrote:
Probably I'm just
Pierre,
Thanks for your explanations. It still seems a little (too) complicated,
but from a backwards-compatibility pov combined with your 'nomask is not
False' implementation detail, I can understand mostly :-) I think the
idea that when a.mask returns False, that actually means nomask
Lisandro Dalcin wrote:
I believe xmlrpclib is currently the simpler approach. Some day I'll
have the time to implement something similar using MPI communication
with mpi4py. However, I believe it can be done even better: local,
client-side proxies should automatically provide access to all
Huang-Wen Chen wrote:
Robert Kern wrote:
from numpy import *
for i in range(1000):
a = random.randn(512**2)
b = a.argsort(kind='quick')
Can you try upgrading to numpy 1.2.0? On my machine with numpy 1.2.0
on OS X, the memory usage is stable.
I tried the code fragment on two
Hi list,
would it be possible to create a view on an array, such that this view
is twice as large (in some dimensions) and in fact does a nearest
neighbour 'zoom' on the original array? E.g. using some fancy
slicing/striding tricks?
an example:
a = [[1, 2],
[3, 4]]
then I'd like a
Gael Varoquaux wrote:
On Tue, Feb 17, 2009 at 10:18:11AM -0600, Robert Kern wrote:
On Tue, Feb 17, 2009 at 10:16, Gael Varoquaux
gael.varoqu...@normalesup.org wrote:
On Tue, Feb 17, 2009 at 09:09:38AM -0600, Robert Kern wrote:
np.repeat(np.repeat(x, 2, axis=0), 2, axis=1)
stride_tricks are
Travis E. Oliphant wrote:
shuwj5...@163.com wrote:
snipsnip
Travis, thanks for the excellent explanation! It clears something which
I think is related to this, I've been wanting to ask on the ml for some
time already.
Now here's the case.
I often have 4d arrays that are actually related sets
Hi,
I'm gonna have large (e.g. 2400x2400) arrays of 16 and 32 bit bitfields.
I've been searching in vain for an efficient and convenient way to
represent these array's individual bit's (or, even better, configureable
bitfields of 1-4 bits each).
Of course I know I can 'split' the array in
Keith Goodman wrote:
On Thu, Aug 6, 2009 at 9:58 AM, Charles R
Harrischarlesr.har...@gmail.com wrote:
On Thu, Aug 6, 2009 at 9:55 AM, josef.p...@gmail.com wrote:
What's the best way of getting back the correct shape to be able to
broadcast, mean, min,.. to the original array, that works for
the idea...
Oh and I know of course ndimage is scipy, and this list is numpy. But as
the image processing subject emerged here, well...
Cheers,
Vincent Schut.
Sorry,
Chris
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http
Stéfan van der Walt wrote:
Hi Vincent
2009/8/21 Vincent Schut sc...@sarvision.nl:
I know it probably will be a pretty involved task, as ndimage comes from
numarray and seems to be largely implemented in C. But I really wanted
to raise the issue now the image processing subject turns up once
Tim Michelsen wrote:
Hello,
I need some advice on histograms.
If I interpret the documentation [1, 2] for numpy.histogram correctly, the
result of the function is a count of the occurences sorted into each bin.
(n, bins) = numpy.histogram(v, bins=50, normed=1)
But how can I apply another
47 matches
Mail list logo