How to use the method loadtxt() of numpy neatly?

2013-12-19 Thread chao dong
HI, everybody. When I try to use numpy to deal with my dataset in the style of csv, I face a little problem. In my dataset of the csv file, some columns are string that can not convert to float easily. Some of them can ignore, but other columns I need to change the data to a enum st

where to find shared python script?

2011-05-17 Thread Yue Chao
earch function in the our mailing list archive http://mail.python.org/pipermail/python-list/. ? Best, Chao -- *** Chao YUE Laboratoire des Sciences du Climat et de l'Environnement (LSCE-IPSL) UMR 1572 CEA

How to use dbstore in google app engine

2010-05-30 Thread Ou Chao
Hi all: I have a question. How GEA save a file as simulates the App Engine datastore in local computer? where is the file? thank you -- http://mail.python.org/mailman/listinfo/python-list

Re: IDE for Python

2007-08-24 Thread Eric CHAO
I think many python developers don't need such an IDE actually. Just like Ruby guys, they use a powerful editor, for example, Textmate, instead of all-in-one IDE. It's quick and direct. On 8/21/07, Joel Andres Granados <[EMAIL PROTECTED]> wrote: > Hello list: > > I have tried various times to use

Re: way to define static method

2007-08-22 Thread Eric CHAO
Thanks a lot. Because I found a solution about static method from http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/52304 And that's a little bit difficult to understand. # direct, naive approach -- doesn't work...: class Class1: def static1(name): print "Hello",name # ...but no

way to define static method

2007-08-22 Thread Eric CHAO
I think Python uses a very strange way to define static method in a class. Why not make it like this? class MyClass: def my_static_method(self): # self should be None as it's a static method # just ignore self I'm a newcomer so maybe it's quite naive. But I just wonder why it

Plotting Images

2007-07-31 Thread Pei-Yu CHAO
Hi ALL: I have only been switched from matlab to python few months ago. I having trouble of plotting images from a matrix size of 8x1 (unfortunately that is the size of my data.) for example, x = rand(8,1) inshow(x) I have tried to use matplotlib function imshow(), but all i get is

Re: socket on cygwin python

2007-06-29 Thread bacon . chao
On Jun 26, 12:49 am, Jason Tishler <[EMAIL PROTECTED]> wrote: > On Mon, Jun 25, 2007 at 01:53:18PM +0100, Michael Hoffman wrote: > > [EMAIL PROTECTED] wrote: > > > I've installed cygwin with latest python 2.5.1, but it seems that the > > > socket lib file do NOT support IPv6(cygwin\lib\python2.5\li

Re: socket on cygwin python

2007-06-24 Thread bacon . chao
On Jun 25, 1:26 pm, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] schrieb: > > > I've installed cygwin with latest python 2.5.1, but it seems that the > > socket lib file do NOT support IPv6(cygwin\lib\python2.5\lib-dynload > > \_socket.dll), what can I do if I want to use IPv6?

socket on cygwin python

2007-06-24 Thread bacon . chao
I've installed cygwin with latest python 2.5.1, but it seems that the socket lib file do NOT support IPv6(cygwin\lib\python2.5\lib-dynload \_socket.dll), what can I do if I want to use IPv6? Thanks -- http://mail.python.org/mailman/listinfo/python-list

convert python scripts to exe file

2007-02-24 Thread Eric CHAO
I know py2exe can make an exe file. But python runtime dll is still there. How can I combine the dll file into the exe, just make one file? Thanks. -- http://mail.python.org/mailman/listinfo/python-list

connection pool in python?

2007-02-22 Thread Eric CHAO
Connection Pool is necessary in web applications with Java and JDBC. So does python have something like that? Thanks. -- http://mail.python.org/mailman/listinfo/python-list

when will python 2.5 take in mainstream?

2007-02-04 Thread Eric CHAO
A lot of application based on python claim that python 2.3 or 2.4 is needed not 2.5, ie. mysqldb. I've been using python for months. I don't care about 2.4 or 2.5. But I like the default icons of python in 2.5. So I just use that, but some scripts can't work on that. When will all these applicatio

Re: speed of python vs matlab.

2006-12-14 Thread Chao
s actually comparison between numpy(which is implemented in c) vs matlab. Chao. import psyco #psyco.bind(functest) psyco.full() import numpy import time,math def functest(a): array = xrange(1000) for i in array: for j in array: a = a + 1 tic = time.time() a = 1.0

Re: speed of python vs matlab.

2006-12-13 Thread Chao
t 04:07:20PM -0800, Chao wrote: > > I've been trying to develop some numerical codes with python, however > > got disappointed. > > > > A very simple test, > > > > a = 1.0 > > > > for i in range(1000): > > for j in range(1000): &

speed of python vs matlab.

2006-12-13 Thread Chao
I've been trying to develop some numerical codes with python, however got disappointed. A very simple test, a = 1.0 for i in range(1000): for j in range(1000): a = a+1 unfortunately, it took 4.5 seconds to finish(my machines is fine. P4 3.0G, 1G RAM, it varies according to machi