[Numpy-discussion] sum of array for masked area

2013-11-27 Thread questions anon
Hi All, I just posted this on the SciPy forum but realised it might be more appropriate here? I have a separate text file for daily rainfall data that covers the whole country. I would like to calculate the monthly mean, min, max and the mean of the sum for one state. The mean, max and min are jus

Re: [Numpy-discussion] (no subject)

2013-11-27 Thread Matthew Brett
Hi, Thanks both - very helpful, Matthew On 11/22/13, Robert Kern wrote: > On Fri, Nov 22, 2013 at 9:23 PM, Matthew Brett > wrote: >> >> Hi, >> >> I'm sorry if I missed something obvious - but is there a vectorized >> way to look for None in an array? >> >> In [3]: a = np.array([1, 1]) >> >> In

[Numpy-discussion] numpy datetime64 NaT string conversion bug & patch

2013-11-27 Thread Charles G. Waldman
If you convert an array of strings to datetime64s and 'NaT' (or one of its variants) appears in the string, all subsequent values are rendered as NaT: (this is in 1.7.1 but the problem is present in current dev version as well) >>> import numpy as np >>> a = np.array(['2010', 'nat', '2030']) >>>

Re: [Numpy-discussion] Silencing NumPy output

2013-11-27 Thread Frédéric Bastien
Hi, After more investigation, I found that there already exist a way to suppress those message on posix system. So I reused it in the PR. That way, it was faster, but prevent change in that area. So there is less change of breaking other syste: https://github.com/numpy/numpy/pull/4081 But it re

Re: [Numpy-discussion] xkcd on git commit messages.

2013-11-27 Thread alex
On Wed, Nov 27, 2013 at 11:56 AM, Charles R Harris wrote: > Here. And his later commit messages went straight to https://twitter.com/gitlost ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discus

[Numpy-discussion] xkcd on git commit messages.

2013-11-27 Thread Charles R Harris
Here . Chuck ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Getting masked array boundary indices

2013-11-27 Thread Sudheer Joseph
Thank you, Though it did not get what I expected it is a strong clue, let me explore it, With. Best regards Sudheer___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] PyArray_BASE equivalent in python

2013-11-27 Thread Robert Kern
On Wed, Nov 27, 2013 at 2:16 PM, Peter Rennert wrote: > As a solution I have done something similar as it was proposed earlier, > just that I derived from ndarray and kept the QImage reference it it: > > from PySide import QtGui as _qt > import numpy as _np > > class MemoryTie(np.ndarray): >

Re: [Numpy-discussion] PyArray_BASE equivalent in python

2013-11-27 Thread Peter Rennert
First, sorry for not responding to your other replies, there was a jam in Thunderbird and I did not receive your answers. The bits() seem to stay alive after deleting the image: from PySide import QtGui image = QtGui.QImage('/home/peter/code/pyTools/sandbox/images/faceDemo.jpg') a = image.bits()

Re: [Numpy-discussion] Getting masked array boundary indices

2013-11-27 Thread josef . pktd
On Wed, Nov 27, 2013 at 7:01 AM, Sudheer Joseph wrote: > Hi, >I have a numpy array which is masked ( bathymetry), as seen > below > > [ True] > [ True] > [ True] > [ True]], >fill_value = -.0) > > > In [10]: depth[:,1130:1131] > > I need to find the indices where l

[Numpy-discussion] Getting masked array boundary indices

2013-11-27 Thread Sudheer Joseph
Hi,    I have a numpy array which is masked ( bathymetry), as seen below  [ True]  [ True]  [ True]  [ True]],    fill_value = -.0) In [10]: depth[:,1130:1131] I need to find the indices where land(mask) is there along the boundaries and where water(value) is there along th