I would like to calculate the max and min across many netcdf files.
I know how to create one big array and then concatenate and find the
numpy.max but when I run this on 1000's of arrays I have a memory error.
What I would prefer is to loop through the arrays and produce the maximum
without having
thank you, that makes sense.
I should have posted this on another list (which I have now). and the
change required is:
If your new array is x, you can use:
numpy.ma.masked_array(x, mask=mask.mask)
On Tue, Nov 22, 2011 at 11:48 AM, MRAB wrote:
> On 21/11/2011 21:42, questions anon wr
I am trying to mask one array using another array.
I have created a masked array using
mask=MA.masked_equal(myarray,0),
that looks something like:
[1 - - 1,
1 1 - 1,
1 1 1 1,
- 1 - 1]
I have an array of values that I want to mask whereever my mask has a a '-'.
how do I do this?
I
= plt.axes([l+w+0.025, b,
0.025, h], )
cbar=plt.colorbar(CS, cax=cax,
drawedges=True)
#save map as *.png and plot
netcdf file
plt.savefig((os.path.join(OutputFolder,
ncvariablename+date_string+'UTC.png'
Hello All,
I keep coming across a memory error when processing many netcdf files. I
assume it has something to do with how I loop things and maybe need to close
things off properly.
In the code below I am looping through a bunch of netcdf files (each file is
hourly data for one month) and within ea
add an entry to http://www.twentyquestions.org (please)
--
http://mail.python.org/mailman/listinfo/python-list
Are there any sprintf in Python?
I know you can print to files(or redefine sys.stout) and later open the
file content.
Are there similar function to sprintf in C?
Thanks
--
http://mail.python.org/mailman/listinfo/python-list
I am a little confused by an example in python book:
class wrapper:
def __init__(self,object):
self.wrapped=object
def __getattr__(self,attrname):
print "Trace:",attrname
print getattr(self.wrapped,attrname) (*)
return getattr(self.wrapped,attrname)
Fredrik Lundh wrote:
> "questions?" <[EMAIL PROTECTED]> wrote:
>
> > I use os.system to call a display program, e.g.
> >
> > os.system(displayblah blah) to call display. the program starts and
> > display things I wanted. When I kill display, somehow
I use os.system to call a display program, e.g.
os.system(displayblah blah) to call display. the program starts and
display things I wanted. When I kill display, somehow the python
program don't understand I want to move on, keep calling
os.system(displayblah blah) again and again.
I have to kill
I heard from my friend who used to program in JAVA, it is really easy
to do graph display in JAVA.
I wonder whether there are similiar packages in Python I can use. Since
I know a little bit Python syntax already, I can easily learn more in
Python.
I want to display connected graph(directed or u
I am calling system command in python by os.system()
I do, os.system("wget http://blah blah blah")
then I run the program by ./programname >redirected file
The things put to screen doesn't redirect to the file I want.
What's the trick in here?
Thanks
--
http://mail.python.org/mailman/listinfo
Thanks all you guys for the help.
--
http://mail.python.org/mailman/listinfo/python-list
I have a graph with different parameters along different parts of the
graph.
I want to have a program that can display the graph with coloring for
different part of the graph. Is this possible in Python? What should I
read?
Thanks for any comments
--
http://mail.python.org/mailman/listinfo/pyth
sorry, I realized the problem already. sorry for the confusion.
THanks for the answer!!!
--
http://mail.python.org/mailman/listinfo/python-list
I want to do list index function.
>>> y=['1','2','3','4']
>>> y
['1', '2', '3', '4']
>>> y.index['2']
Traceback (most recent call last):
File "", line 1, in ?
TypeError: unsubscriptable object
It works with y=[1,2,3,4]. Anyone has any hint, what's the reason
here?
thanks
--
http://mail.pytho
I want to make a 3d plot. x is a vector(discrete), y is also a
vector(discrete), for each pairwise x,y I have a value z(x,y)(it is not
a function, just discrete values for each pair of x,y)
I want to show them on a two dimensional plot by showing z(x,y) with
colors.
Thanks for any hint
--
http:
How to generate a random number in Python. Is there any build in
function I can call?
Thanks
--
http://mail.python.org/mailman/listinfo/python-list
Thanks guys for the reply.
This is very helpful
--
http://mail.python.org/mailman/listinfo/python-list
I need to stop the program in the middle and pause there.
Are there anyway I can stop the program in the middle and have
something like:
please press y to continue.
Thanks
--
http://mail.python.org/mailman/listinfo/python-list
20 matches
Mail list logo