Re: Does Python have equivalent to MATLAB "varargin", "varargout", "nargin", "nargout"?

2007-02-19 Thread Robert Kern
s objFunVal, firstDerive, and secondDerive as attributes (or a dictionary). Use keyword arguments to inform the function of which ancillary computations it needs to perform. If at all possible, don't change the number of return values. It's annoying to deal with such an API. -- Robert Ker

Re: pylab, integral of sinc function

2007-02-19 Thread Robert Kern
e.py Definition: numpy.sinc(x) Docstring: sinc(x) returns sin(pi*x)/(pi*x) at all points of array x. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco -- http://mail.python.org/mailman/listinfo/python-list

Re: finding out the precision of floats

2007-02-25 Thread Robert Kern
atforms use *IEEE-754* floating point types. The most notable and still relevant example that I know of is Cray. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an un

Re: finding out the precision of floats

2007-02-25 Thread Robert Kern
, that I recall -- single, double, double with extended > exponent range, and quad) I actually used Python on an Alpha running OpenVMS a few years ago. IIRC, the interpreter was built with IEEE floating point types rather than the other types. -- Robert Kern "I have come to belie

Re: Tuples from List

2007-02-27 Thread Robert Kern
t the correct syntax eludes my > inexperienced mind. What I want is a list [0.62424, 0.51133, ...] so that I > can normalize those values. > > What is the correct syntax, please? # Extract the real components (since the imaginary components are all 0): eigvals = eigvals.real # Normalize

Re: f2py and Fortran90 gfortran_filename error

2007-02-27 Thread Robert Kern
uch that f2py knows what compile/link flags to use. Only use the --f90exec option to inform f2py that the actual executable is named something odd or is in an unexpected place, like /opt/gfortran/bin/gfortran-4.3, for example. The correct option to use is --fcompiler=gnu95 -- Robert Kern "

Re: f2py and Fortran90 gfortran_filename error

2007-02-28 Thread Robert Kern
Beliavsky wrote: > On Feb 28, 12:40 am, Robert Kern <[EMAIL PROTECTED]> wrote: >> Tyler wrote: >>> Hello All: >>> Since my last post I have attempted to use the f2py program which >>> comes with numpy. >> It's better to ask these questions on

Re: f2py and Fortran90 gfortran_filename error

2007-02-28 Thread Robert Kern
Robert Kern wrote: > Beliavsky wrote: >> I wish the Google Groups interface to the list >> http://groups.google.com/group/Numpy-discussion >> worked. When I use it to post my messages bounce, but messages from >> the list do show up on Google Groups. The "bounces&

Re: Python on a mac: how to build pythonw?

2007-03-01 Thread Robert Kern
ourself. The default build does not allow you to communicate with the Apple GUI. You need a framework build. I highly recommend that you simply use the binary on www.python.org instead of building from source. If you do want to build from source, please read the file Mac/README for instructions. N

Re: Python on a mac: how to build pythonw?

2007-03-01 Thread Robert Kern
Ron Garret wrote: > In article <[EMAIL PROTECTED]>, > Robert Kern <[EMAIL PROTECTED]> wrote: >> Note that in recent versions of Python, I believe that the pythonw >> executable >> is no longer necessary as a workaround. > > How recent? I'm alrea

Re: Python on a mac: how to build pythonw?

2007-03-01 Thread Robert Kern
Ron Garret wrote: > In article <[EMAIL PROTECTED]>, > Robert Kern <[EMAIL PROTECTED]> wrote: > >> Ron Garret wrote: >>> In article <[EMAIL PROTECTED]>, >>> Robert Kern <[EMAIL PROTECTED]> wrote: >>>> Note that in recent versio

Re: (MAC) CoreGraphics module???

2007-11-03 Thread Robert Kern
David C. Ullrich wrote: > On Fri, 02 Nov 2007 14:09:25 -0500, Robert Kern > <[EMAIL PROTECTED]> wrote: > >> David C. Ullrich wrote: >>> [...] >>> >>> So CoreGraphics is a builtin in Apple-Python, >>> explaining why I didn't find t

Re: (MAC) CoreGraphics module???

2007-11-04 Thread Robert Kern
David C. Ullrich wrote: > On Fri, 02 Nov 2007 14:09:25 -0500, Robert Kern > <[EMAIL PROTECTED]> wrote: > >> David C. Ullrich wrote: >>> [???] >> Okay, which version of OS X do you have? In 10.3 and 10.4 it used to be here: >> /System/Library/Frameworks/P

Re: (MAC) CoreGraphics module???

2007-11-05 Thread Robert Kern
David C. Ullrich wrote: > On Sun, 04 Nov 2007 15:56:21 -0600, Robert Kern > <[EMAIL PROTECTED]> wrote: > >> David C. Ullrich wrote: >>> On Fri, 02 Nov 2007 14:09:25 -0500, Robert Kern >>> <[EMAIL PROTECTED]> wrote: >>> >>>> David

Re: Python good for data mining?

2007-11-05 Thread Robert Kern
arger codes will >> confirm. > > I guess I'll have to agree with that. Still, I would like to get some > kind of indication of if it's a good idea to use NumPy from the start > of the project - for example. Yes. -- Robert Kern "I have come to believe that t

Re: a simple tcp server sample

2007-11-07 Thread Robert Hicks
On Nov 7, 1:54 pm, Tzury Bar Yochay <[EMAIL PROTECTED]> wrote: > hi, the following sample (from docs.python.org) is a server that can > actually serve only single client at a time. > > In my case I need a simple server that can serve more than one client. > I couldn't find an example on how to do t

Re: NumPy Question - numpy.put in multi-dimensional array

2007-11-13 Thread Robert Kern
]) > > but, > > Traceback (most recent call last): > put(a,[i][39 - j],[1]) > IndexError: list index out of range In this case, you don't really want put(). Just use indexing: for i in range(2): for j in range(iy): a[i,39-j] = 1 -- Robert Kern "I have come to b

Re: Problem in Installing/using OpenOpt

2007-11-13 Thread Robert Kern
irst: http://pypi.python.org/pypi/numpy http://pypi.python.org/pypi/setuptools -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- U

Re: dependency algorithm

2007-11-14 Thread Robert Kern
ring has a loop (which in this > case, prevents a proper ordering), then it should return None. Google for "topological sort python". There are several implementations out there. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma

Re: Next float?

2007-11-21 Thread Robert Kern
/2001-August/099152.html > Bonus points if I can go in either direction (i.e. the "previous float" > as well as the next). Left as an exercise for the reader. :-) -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terri

Re: Next float?

2007-11-21 Thread Robert Kern
Steven D'Aprano wrote: > Is there a simple, elegant way in Python to get the next float from a > given one? By "next float", I mean given a float x, I want the smallest > float larger than x. Heh: http://mail.python.org/pipermail/python-list/2005-December/357771.h

Re: scipy-0.6.0.win32-py2.5.exe does not install

2007-11-22 Thread Robert Kern
e scipy-user mailing list: http://www.scipy.org/Mailing_Lists -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco -- http://mail.python.org/mailman/listinfo/python-list

Re: How to import xplt, pylab?

2007-11-23 Thread Robert Kern
se, xplt has been deprecated for a long time. It probably doesn't work. I don't recommend using it unless if you want to take on the responsibility of maintaining it. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco -- http://mail.python.org/mailman/listinfo/python-list

Re: Installing modules via setuptools in a script

2007-11-24 Thread Robert Kern
/peak.telecommunity.com/DevCenter/PkgResources#workingset-methods-and-attributes import pkg_resources pkg_resources.resolve('some_package >= 1.0') pkg_resources.resolve('another_package') import some_package import another_package But, please be sure that that

Re: Installing modules via setuptools in a script

2007-11-26 Thread Robert Kern
Thorsten Kampe wrote: > * Robert Kern (Sat, 24 Nov 2007 16:33:37 -0600) >> Thorsten Kampe wrote: >>> can anyone give me a short code snippet how to install a missing >>> module via setuptools (assuming setuptools is already installed)?! >>> >>> Som

Re: Installing modules via setuptools in a script

2007-11-26 Thread Robert Kern
Thorsten Kampe wrote: > * Robert Kern (Mon, 26 Nov 2007 04:34:17 -0600) >> Thorsten Kampe wrote: >>> * Robert Kern (Sat, 24 Nov 2007 16:33:37 -0600) >>>> Thorsten Kampe wrote: >>>>> can anyone give me a short code snippet how to install a missing >

Re: Control mouse position and clicking

2007-11-29 Thread Robert Kern
ocumentation/Carbon/Reference/QuartzEventServicesRef/Reference/reference.html -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco -- http://mail.python.org/mailman/listinfo/python-list

Re: Control mouse position and clicking

2007-11-29 Thread Robert Kern
s too quickly. I start it using subprocess and feed it commands. On Ubuntu sudo apt-get install xautomation It uses the XTest extension for X11 to send mouse events to the system. One could probably easily wrap the xlib API for it using ctypes so you wouldn't have to bother with an exte

Re: How to suggest a new Python list? Was: Science list

2007-11-30 Thread Robert Kern
y, so sciences could be one more. > > There are mailing lists for numpy/scipy, f2py, VTK and the rest of it, > but nothing quite like what Francesco suggests, as far as I know. Such things are considered on-topic for scipy-user or even numpy-discussion. http://www.scipy.org/Mailing_Lists

Re: Sorting array

2007-11-30 Thread Robert Kern
Chris Hulan wrote: > the list.sort method seems to do exactly what you want? > > Unless your array() method is creating a custom array object with > different sort functionality than list? Presumably he is using numpy arrays. -- Robert Kern "I have come to believe that the

Re: Sorting array

2007-11-30 Thread Robert Kern
y-discussion mailing list since everyone there automatically knows that you are talking about numpy arrays and not just misnaming lists. ;-) http://www.scipy.org/Mailing_Lists -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrib

Re: Sorting array

2007-12-01 Thread Robert Kern
Tartifola wrote: > > Hi, > > On Fri, 30 Nov 2007 14:55:08 -0600 > Robert Kern <[EMAIL PROTECTED]> wrote: >> numpy questions are best asked on the numpy-discussion mailing list since >> everyone there automatically knows that you are talking about numpy arrays &

Re: Floats and NaNs

2007-12-03 Thread Robert Kern
eliably construct NaNs with float('nan'). That only works on some systems (usually UNIXy ones). Windows does not support that. The best way I've found to construct NaNs and infs follows: inf = 1e200 * 1e200 nan = inf / inf -- Robert Kern "I have come to believe that th

Re: "Python" is not a good name, should rename to "Athon"

2007-12-03 Thread Robert Kern
Tóth Csaba wrote: > back from jokes, im _really_ interested what is core developers, mainly > Guido's opinion about the name change. I'm pretty sure it's, "Not a chance." -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless

Re: "Python" is not a good name, should rename to "Athon"

2007-12-05 Thread Robert Boyd
On Dec 4, 2007 10:02 AM, George Sakkis <[EMAIL PROTECTED]> wrote: > On Dec 3, 12:50 pm, "Russ P." <[EMAIL PROTECTED]> wrote: > > > I know this because I've been through it myself. When I tell people > > that I use Python, I often qualify it by pointing out that it is used > > extensively at Google.

Re: Python Exponent Question

2007-12-10 Thread Robert Kern
ation is right-associative. I.e. 2**2**2**2 == 2**(2**(2**2)) The reason is that left-associativity is better written with multiplication. (x**y)**z == x**(y*z) -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our o

Re: OpenOpt install

2007-12-17 Thread Robert Kern
rmtree(NewPath, True) # True means ignore errors copytree(os.path.join(os.path.curdir, new_name, 'openopt'), NewPath) NewPath = Path compileall.compile_dir(NewPath) os.rename(new_name, 'scikits') This just looks like a really bad idea. -- Robert Kern &qu

Re: arrays in lists

2007-12-17 Thread Robert Kern
numpy import array > a = array([1]) > b = array([2]) > c = [a,b] > d = c.index(a) You can't use .index() to do this. numpy arrays use rich comparisons such that (a == b) returns another array, not a boolean. -- Robert Kern "I have come to believe that the whole world is an

Re: arrays in lists

2007-12-17 Thread Robert Kern
Rafael Sachetto wrote: > No problem here too. > Using python 2.5 on Ubuntu Gutsy and the newest NumPy That's a bug, then. It should fail. It looks like we're not raising the exception when there is only one element. -- Robert Kern "I have come to believe that the whole

Re: arrays in lists

2007-12-17 Thread Robert Kern
ot use list.index() to find an array. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco -- http://mail.python.org/mailman

Re: OpenOpt install

2007-12-18 Thread Robert Kern
im scikits/openopt/oo.py # 1. Delete the sys.path munging. # 2. Change "from LP import LP as CLP" to "from Kernel.LP import LP as CLP" -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own

Re: Best way to protect my new commercial software.

2007-12-18 Thread Robert Kern
t I could prove authorship, I could get a court order for the thief to remove that code. I don't need to prove that he stole my laptop in order to do that. Actually, now that I think about it, I could issue a DMCA takedown notice, and I wouldn't need to prove anything at all unless if th

Re: NameError: name 'main' is not defined

2007-12-18 Thread Robert Kern
jolly wrote: > hey guys, > > When i try to run my code I get an error. NameError name 'main is not > defined' > > [code] > if __name__ == "__main__": > main() Put this at the end of the file. Currently, it is getting executed before the code th

Re: Why custom objects take so much memory?

2007-12-18 Thread Robert Kern
t;>>> 'a\0string'[1] > '\x00' It stores a length separate from the value. The 0-termination is a courtesy to C APIs that expect 0-terminated strings. It does not define the end of the Python string, though. -- Robert Kern "I have come to believe that the who

Re: How does setup.py work?

2007-12-19 Thread Robert Kern
sys_argv.py build_ext --inplace install ['sys_argv.py', 'build_ext', '--inplace', 'install'] http://docs.python.org/lib/module-sys.html Code inside setup() parses this list to determine what actions the user wants it to take. > and how > can I install it

Re: How does setup.py work?

2007-12-19 Thread Robert Kern
nds distutils. http://docs.python.org/dist/dist.html -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco -- http://mail.python.org/mailman/listinfo/python-list

Re: how to get string printed by PyErr_Print( )?

2007-12-19 Thread Robert Kern
ll import the sys module and try to use whatever file-like object is sys.stderr. Replace this with a StringIO or an open file object just like you would for output from the Python level. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made t

Re: pass 3D Matrix from matlab to C mex- file

2007-12-19 Thread Robert Kern
[EMAIL PROTECTED] wrote: > help please > > how can i pass 3d matrix from matlab to c > > using mex file This is a mailing list for the Python programming language. Please ask your question on the appropriate Matlab mailing list. -- Robert Kern "I have come to believe tha

Re: New+old-style multiple inheritance

2007-12-20 Thread Robert Kern
unching", which has a certain charm of its own. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco -- http://mail.python.org/mailman/listinfo/python-list

Question about email-handling modules

2007-12-20 Thread Robert Latest
om'] #to = message['to'] # this throws a "Key Error" to = message.get('to'); # ...but this works print frm, "writes about", subject, "to", to #print message.get_payload() # this doesn't work -- robert -- http://mail.python.org/mailman/listinfo/python-list

Re: Question about email-handling modules

2007-12-20 Thread Robert Latest
t_payload() will return either a string (for > single part emails) or a list of Messages (for multi-part messages). Yes, I did note that. Thanks for the tips (also to the others who have answered). Python looks like fun though. Maybe I should try to tackle some other problem first. robert -- http://mail.python.org/mailman/listinfo/python-list

Re: Slicing matrix

2006-04-17 Thread Robert Kern
t; or [2,7,12] In [10]: p[:3, 2] Out[10]: array([ 2, 7, 12]) > or [7,12,17] and put it in a list? In [11]: p[1:4, 2] Out[11]: array([ 7, 12, 17]) -- Robert Kern [EMAIL PROTECTED] "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our o

Re: semi-[OT]: adding a reply-to line to these mails?

2006-04-18 Thread Robert Kern
in this case, gmane.comp.python.general . Now, python-list does have a gateway to the regular USENET through comp.lang.python, but I can't access my home ISP's news server at work, so I use GMane instead. -- Robert Kern [EMAIL PROTECTED] "I have come to believe that the whole world

Re: Problem calling math.cos()

2006-04-22 Thread Robert Kern
; what does abs stand for? why is that not absolute value? hmmm. > Hmm, complex numbers, cool I don't even have any idea where C > stands on this. Change math.abs() to abs(). It's a builtin function. Yes, it does compute the absolute value. Fixing that: >>> import electr

Re: Problem calling math.cos()

2006-04-22 Thread Robert Kern
Tim Peters wrote: > [Robert Kern] > >>... >>ph3 = math.atan( ac3.imag / ac3.real ) >>... > > Don't do that: atan2 is the correct way to compute the angle, because > the signs of both inputs are needed to determine the correct quadrant. > So do: >

Re: Custom data type in a matrix.

2006-04-22 Thread Robert Kern
e is another example of using record arrays on the SciPy wiki (although it is less focused on combining different data types than it is named column access): http://www.scipy.org/RecordArrays Here is an example: In [18]: from numpy import * In [19]: rec.fromrecords([['Robert', 2

Re: Generate a sequence of random numbers that sum up to 1?

2006-04-23 Thread Robert Kern
drawing numbers from a multivariate normal of whatever mean and covariance you like will give you "nice" simplicial data and quite possibly even realistic data, too, depending on your model. I like using the isometric log-ratio transform ("ilr" transform) for this. Good Googl

Re: MS VC++ Toolkit 2003, where?

2006-04-23 Thread Robert Kern
ound for it certainly use gcc. -- Robert Kern [EMAIL PROTECTED] "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco -- http://mail.python.org/ma

Re: MS VC++ Toolkit 2003, where?

2006-04-24 Thread Robert Kern
vcr71". Its filename is lib/mingw32/3.4.2/specs . After that, use the --compiler=mingw32 option on build_ext when using distutils. -- Robert Kern [EMAIL PROTECTED] "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad atte

Re: MS VC++ Toolkit 2003, where?

2006-04-24 Thread Robert Kern
d_import_library() here: http://svn.scipy.org/svn/numpy/trunk/numpy/distutils/mingw32ccompiler.py This uses the following module: http://svn.scipy.org/svn/numpy/trunk/numpy/distutils/lib2def.py -- Robert Kern [EMAIL PROTECTED] "I have come to believe that the whole world is an en

Re: MinGW and Python

2006-04-24 Thread Robert Kern
r" than gdb. - gcc does not optimize particularly well. -- Robert Kern [EMAIL PROTECTED] "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco -- http://mail.python.org/mailman/listinfo/python-list

Re: MinGW and Python

2006-04-24 Thread Robert Kern
Brian Elmegaard wrote: > Robert Kern <[EMAIL PROTECTED]> writes: > >>- gcc does not optimize particularly well. > > But well enough for other platforms. Well, it tends to optimize just as poorly for other platforms, too. It's just frequently the only compiler widely

Re: What am I doing wrong here

2006-04-24 Thread Robert Kern
'] > for ComputerName in Computerlist: > print ComputerName > s = "net send %s" % ComputerName > os.system('s "Message"') s = 'net send %s "Message"' % ComputerName os.system(s) -- Robert Kern [EMAIL PROTECTED] "

Re: MS VC++ Toolkit 2003, where?

2006-04-24 Thread Robert Kern
Martin v. Löwis wrote: > Robert Kern wrote: > >>Oh, that's right, you need an import library for Python24.dll . > > That shouldn't be a problem: that library is included with Python. For mingw, too? I.e. a .a not a .lib? -- Robert Kern [EMAIL PROTECTED] "I ha

Re: MS VC++ Toolkit 2003, where?

2006-04-24 Thread Robert Kern
Martin v. Löwis wrote: > Robert Kern wrote: > >>>>Oh, that's right, you need an import library for Python24.dll . >>> >>>That shouldn't be a problem: that library is included with Python. >> >>For mingw, too? I.e. a .a not a .lib? >

Re: MinGW and Python

2006-04-24 Thread Robert Kern
Brian Elmegaard wrote: > Robert Kern <[EMAIL PROTECTED]> writes: > >>the gcc project is to provide a portable compiler, not one that >>generates the best code for any given platform. And in that goal, it >>succeeds remarkably well. > > Will a python program b

Re: MinGW and Python

2006-04-25 Thread Robert Kern
es it comply with the ANSI C89 standard? I'm still not seeing why mingw > can't just link python to it. It can. -- Robert Kern [EMAIL PROTECTED] "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attemp

Re: How to efficiently read binary files?

2006-04-30 Thread Robert Kern
a >2GB file will be difficult to process even when using mmap. numpy removed this restriction on 64-bit platforms. 32-bit users will still have to split up the file into <2GB chunks, though. http://numeric.scipy.org/ https://lists.sourceforge.net/lists/listinfo/numpy-discussion -- Robert

Re: file open "no such file"

2006-04-30 Thread Robert Kern
t; File "python/my.py", line 1, in ? > f = open("~/m", "r") > IOError: [Errno 2] No such file or directory: '~/m' > > > but I have the "m" file in my home/username/ There is no automatic ~expansion. You will nee

Re: How to efficiently read binary files?

2006-05-01 Thread Robert Kern
Grant Edwards wrote: > On 2006-04-30, Robert Kern <[EMAIL PROTECTED]> wrote: > >>Grant Edwards wrote: >>>Perhaps the numarray module? >> >>numpy for new code, please. > > So numarray and numpy were both written to replace numeric? numpy was writte

Re: How to efficiently read binary files?

2006-05-01 Thread Robert Kern
Grant Edwards wrote: > On 2006-05-01, Robert Kern <[EMAIL PROTECTED]> wrote: > >>>>>Perhaps the numarray module? >>>> >>>>numpy for new code, please. >>> >>>So numarray and numpy were both written to replace numeric? >&

Re: How to efficiently read binary files?

2006-05-01 Thread Robert Kern
Grant Edwards wrote: > On 2006-05-01, Robert Kern <[EMAIL PROTECTED]> wrote: > >>Grant Edwards wrote: >> >>>On 2006-05-01, Robert Kern <[EMAIL PROTECTED]> wrote: >>> >>>>>>>Perhaps the numarray module? >>>>>>

Re: UPGMA algorithm ???

2006-05-02 Thread Robert Kern
jairodsl wrote: > Hello ! > > I have searching this algorithm (UPGMA) writting in python, i didnt > found, could anybody help me ??? Thanks a lot!!! Is Google broken today? http://www.google.com/search?q=UPGMA+python -- Robert Kern "I have come to believe that the whole w

Re: NaN handling

2006-05-03 Thread Robert Kern
> > I need a way of handling NaNs for example R has the 'na.omit' option. Does > anybody know if this exists? How do you want to handle them? But you will be better off asking on the numpy or scipy lists: http://scipy.org/Mailing_Lists -- Robert Kern &qu

Re: A python problem about int to long promotion just see the idle session

2006-05-03 Thread Robert Kern
gen_tricomi wrote: > from the above you can see what int to long promotion is causing > i dont need to say much please see for yourself. is this a bug or > a feature. This is expected behavior. Why is it problematic for you? -- Robert Kern "I have come to believe that the who

Re: pythonic way to sort

2006-05-03 Thread Robert Kern
(key=lambda x: x.split('~')[1]) In [6]: lines Out[6]: ['1SOME STRING ~ABC~12311232432D~20060401~', '3SOME STRING ~ACD~14353453554G~20060401~', '2SOME STRING ~DEF~13534534543C~20060401~'] -- Robert Kern "I have co

Re: Newbie question on code vetting

2006-05-03 Thread Robert Kern
ringe on other peoples' IP, why do you trust them to report infringement? -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco -- http://mail.python.org/mailman/listinfo/python-list

MQSeries based file transfers using the pymqi module

2006-05-05 Thread Andrew Robert
Hi everyone, Has anyone developed a pymqi module based file transfer method for use with WebSphere MQSeries v5.3? If so, would it be possible to point me towards examples of how this was done? Any help that can be provided would be greatly appreciated. Thanks -- http://mail.python.org/mailma

Re: NaN handling

2006-05-05 Thread Robert Kern
create a warning, raise an exception or call a function. It's not well documented at the moment, but the functions are seterr(), seterrcall(), seterrobj(), geterr(), geterrcall(), and geterrobj(). Pure Python has a similar, but somewhat less flexible method, on UNIX platforms. http://docs.pyt

Re: NaN handling

2006-05-05 Thread Robert Kern
Grant Edwards wrote: > On 2006-05-05, Robert Kern <[EMAIL PROTECTED]> wrote: >>Pure Python has a similar, but somewhat less flexible method, on UNIX >>platforms. >> >> http://docs.python.org/dev/lib/module-fpectl.html > > For which "Unix" pl

Re: NaN handling

2006-05-05 Thread Robert Kern
be to extract this functionality from it to add to > Python proper? Harder than just enabling fpectl. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlyi

Re: NaN handling

2006-05-06 Thread Robert Kern
nan = float('nan') Have you tried it on Windows? -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco -- http://mail.python.org/mailman/listinfo/python-list

Re: NaN handling

2006-05-06 Thread Robert Kern
Alexander Schmolck wrote: > Robert Kern <[EMAIL PROTECTED]> writes: >>Ivan Vinogradov wrote: >>>Since numpy seems to be working on a variety of platforms/hardware, >>>how hard would it be to extract this functionality from it to add to >>>Python pro

Re: NaN handling

2006-05-06 Thread Robert Kern
Grant Edwards wrote: > On 2006-05-06, Robert Kern <[EMAIL PROTECTED]> wrote: > >>>>>Since numpy seems to be working on a variety of platforms/hardware, >>>>>how hard would it be to extract this functionality from it to add to >>>>>

Re: A critic of Guido's blog on Python's lambda

2006-05-06 Thread Robert Kern
Grail, dude, Brooks's > long lost Silver Bullet. And you want to pass? Looking at the description, Cells looks a lot like one of our internal Python libraries at Enthought. It's quite useful. Not worldchanging, not a silver bullet, but useful. -- Robert Kern "I have

Re: Numerical Python Tutorial errors

2006-05-07 Thread Robert Kern
is numpy and is being actively developed: http://numeric.scipy.org -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco -- http:

Re: Image SIG ML Moderator does not respond

2006-05-07 Thread Robert Kern
lman/listinfo/image-sig -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco -- http://mail.python.org/mailman/listinfo/python-list

Re: Why list.sort() don't return the list reference instead of None?

2006-05-07 Thread Robert Kern
[EMAIL PROTECTED] wrote: > L = [4,3,2,1] > L=L.sort() > L will refer to None, why L.sort() don't return the L? > I want to ask why the designer of Python do so? http://www.python.org/doc/faq/general/#why-doesn-t-list-sort-return-the-sorted-list -- Robert Kern "I have co

Re: ascii to latin1

2006-05-08 Thread Robert Kern
bility to transliterate strings via certain rulesets. One such ruleset would transliterate all of the above to 'televisao'. That transliteration could act as a normalization step akin to stemming. There are one or two Python bindings out there. Google for PyICU. I don't recall if i

Calling python functions from C

2006-05-09 Thread robert . differentone
I am a newbie to Python. I want to call python functions from C. I looked for examples but I couldn't get any simple one. Lets say my python code is : def add(a,b) return (a+b) I want to call add from C. Could anybody please help me? Thanks in advance. R. -- http://mail.python.org/mailman/

Re: installing numpy

2006-05-09 Thread Robert Kern
Christoph Haas wrote: > P.S.: Your mail client seems break the references. Your reply doesn't show > up as a proper followup to my posting. This probably has nothing to do with his mail/news client but rather the mail-news gateway that links python-list and comp.lang.python .

Re: installing numpy

2006-05-09 Thread Robert Kern
py.net/pipermail/scipy-user/2006-May/007847.html -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco -- http://mail.python.org/mailman/listinfo/python-list

Re: Econometrics in Panel data?

2006-05-09 Thread Robert Kern
antLib, which has a Python interface via SWIG. http://www.quantlib.org -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umber

Re: installing numpy

2006-05-09 Thread Robert Kern
e? No. refblas3 provides the reference (unoptimized) implementation of the BLAS. In Ubuntu (a Debian-based distribution) the package that you would want is atlas3-base-dev. It should have a similar name in your version of Debian (possibly atlas-dev or atlas3-dev or some other variant). If you n

Re: installing numpy

2006-05-09 Thread Robert Kern
e build directory as user root > (not a very safe thing to do). For small, pure Python packages, that may be fine. numpy's build is complicated enough that you really, *really* want to build as a regular user. -- Robert Kern "I have come to believe that the whole world is an enigma, a

Re: List of lists of lists of lists...

2006-05-09 Thread Robert Kern
empty((1,2,3), dtype=object) Out[2]: array([[[None, None, None], [None, None, None]]], dtype=object) http://numeric.scipy.org -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though

Re: SciPy - I need an example of use of linalg.lstsq()

2006-05-09 Thread Robert Kern
ave more scipy questions, you will probably want to ask on the scipy-user list: http://www.scipy.org/Mailing_Lists -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had

Re: A critic of Guido's blog on Python's lambda

2006-05-10 Thread Robert Uhl
Ken Tilton <[EMAIL PROTECTED]> writes: > > Set Kelvin, and make Celsius and Fahrneheit functions of that. Or Rankine:-) -- Robert Uhl <http://public.xdi.org/=ruhl> Brought to you by 'Ouchies', the sharp, prickly toy you bathe with... -- http://mail.python.org/mailman/listinfo/python-list

Re: Masked arrays

2006-05-10 Thread Robert Kern
h the size of a in the given axis. If returned, return a tuple: the result and the sum of the weights or count of values. Results will have the same shape. masked values in the weights will be set to 0.0 -- Robert Kern "I have come to believe that the whole world is an enigma,

Re: installing numpy

2006-05-10 Thread Robert Kern
tests for numpy.lib.index_tricks Found 46 tests for numpy.lib.shape_base Found 0 tests for __main__ ... ----

<    22   23   24   25   26   27   28   29   30   31   >