Re: assigning a sequence to an array

2006-11-08 Thread Robert Kern
s We will need some more information from you when you come to the numpy list. Please reduce your problematic code to the smallest, self-contained script that demonstrates the problem, and post it and the exact output that you get. -- Robert Kern "I have come to believe that the whole worl

Re: Py3K idea: why not drop the colon?

2006-11-09 Thread Robert Kern
nately, my Google-fu has not located an actual paper. It might be in here somewhere: http://homepages.cwi.nl/~steven/abc/publications.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 i

Re: Simple question to split

2006-11-09 Thread Robert Kern
single call to .split() if you preprocess the string first: a.replace(',', ' ').split() -- 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: Printing to file, how do I do it efficiently?

2006-11-09 Thread Robert Kern
gt; I'm guessing that the slow part is the fact that I am converting the > data to character format and writing it one character at a time. What > is a better way of doing this, or where should I look to find a better way? data.tostring() -- Robert Kern "I have come

Re: Py3K idea: why not drop the colon?

2006-11-10 Thread Robert Kern
[EMAIL PROTECTED] wrote: > P.S. I felt I just had to tie this into the thread on profanity somehow. > But notice that I didn't mention nazis or Hitler. ;-) You did it just now! -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that

Re: numpy/scipy: correlation

2006-11-11 Thread Robert Kern
robert wrote: > Is there a ready made function in numpy/scipy to compute the correlation > y=mx+o of an X and Y fast: > m, m-err, o, o-err, r-coef,r-coef-err ? numpy and scipy questions are best asked on their lists, not here. There are a number of people who know the capabilities of

Re: numpy/scipy: correlation

2006-11-11 Thread Robert Kern
Robert Kern wrote: > robert wrote: >> Is there a ready made function in numpy/scipy to compute the correlation >> y=mx+o of an X and Y fast: >> m, m-err, o, o-err, r-coef,r-coef-err ? > scipy.optimize.leastsq() can be told to return the covariance matrix of the > es

Re: numpy/scipy: correlation

2006-11-11 Thread Robert Kern
robert wrote: > Is there a ready made function in numpy/scipy to compute the correlation > y=mx+o of an X and Y fast: > m, m-err, o, o-err, r-coef,r-coef-err ? And of course, those three parameters are not particularly meaningful together. If your model is truly "y is a linear re

Re: reduce to be removed?

2006-11-11 Thread Robert Kern
it's not possible > to treat a for-loop as an expression (which is what a list > comprehension requires). As with all such things, you stick the implementation in a well-named function and simply call the function everywhere. The implementation never needs to be a one-liner expression.

Re: reduce to be removed?

2006-11-11 Thread Robert Kern
Dustan wrote: > Robert Kern wrote: >> Dustan wrote: >>> Fredrik Lundh wrote: >>>> if you care about writing robust code, why not just use a for-loop, >>>> and the list extend method? >>> Because I'm embedding this expression in a list compr

Re: numpy/scipy: correlation

2006-11-12 Thread Robert Kern
sturlamolden wrote: > Robert Kern wrote: > >> The difference between the two models is that the first places no >> restrictions >> on the distribution of x. The second does; both the x and y marginal >> distributions need to be normal. Under the first model, the cor

Re: numpy/scipy: correlation

2006-11-12 Thread Robert Kern
robert wrote: > I remember once I saw somewhere a formula for an error range of the corrcoef. > but cannot find it anymore. There is no such thing as "a formula for an error range" in a vacuum like that. Each formula has a model attached to it. If your data does not follow that

Re: Py3K idea: why not drop the colon?

2006-11-13 Thread Robert Kern
onal preference is that having the colon is more readable. Yours isn't. That's fine. Debating on that basis, however, is pretty pointless. -- 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 att

Re: Py3K idea: why not drop the colon?

2006-11-13 Thread Robert Kern
that the colon was missing if the compiler > didn't point it out, is it really that readable? For me, I tend to get > annoyed at language "features" that I'm constantly tripping over. Never. -- Robert Kern "I have come to believe that the whole world is an enigm

Re: Test-driven development of random algorithms

2006-11-13 Thread Robert Kern
ility". In library code, never call the functions in the random module. Always take as an argument a random.Random instance. When testing, you can seed your own Random instance and all of your numbers will be the same for every test run. This kind of design is A Good Thing(TM) outside of unit tes

Re: Py3K idea: why not drop the colon?

2006-11-14 Thread Robert Kern
Hendrik van Rooyen wrote: > "Robert Kern" <[EMAIL PROTECTED]> wrote: > > >> Michael Hobbs wrote: >>> True enough. Although, I have to ask how many times you define a new >>> function only to have Python spit a syntax error out at you saying that

Re: reduce to be removed?

2006-11-14 Thread Robert Kern
f double, unsigned int, etc. -- 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: reduce to be removed?

2006-11-15 Thread Robert Kern
Antoon Pardon wrote: > On 2006-11-15, Robert Kern <[EMAIL PROTECTED]> wrote: >> Dustan wrote: >> >>> 2. While I haven't taken a good look at NumPy, my intuition tells me it >>> won't work with complex data types, which wouldn't work for me

Re: accessing fortran modules from python

2006-11-16 Thread Robert Kern
nd up installing numpy anyways. http://numpy.scipy.org All of the f2py documentation is currently in the source, so start here: http://projects.scipy.org/scipy/numpy/browser/trunk/numpy/f2py/docs/README.txt Using f2py to wrap Fortran subroutines is actually a fair bit simpler than wrapping C c

Re: About alternatives to Matlab

2006-11-16 Thread Robert Kern
e avoid Scilab but I'm not > sure why. If anybody knows the reason I'd be happy to hear it. I think you just stated 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

Re: using FFTW3 with Numeric on Windows

2006-05-28 Thread Robert Kern
? scipy can use FFTW3 as its FFT routines. http://www.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 -- htt

Re: dynamically loaded libraries

2006-05-28 Thread Robert Kern
ay() is supposed to be called in the initialization function of the other extension modules. That will make sure that multiarray is imported and the function pointers are available for dereferencing. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma t

Re: numpy bug

2006-06-01 Thread Robert Kern
cket. In the meantime, the .accumulate() method works correctly; you can use the last item to get the correct result for .reduce(). -- 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 i

Re: Conditional Expressions in Python 2.4

2006-06-01 Thread Robert Kern
A.M wrote: > Do we have the conditional expressions in Python 2.4? No. -- 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

Re: Sampling a population

2006-06-02 Thread Robert Kern
http://svn.scipy.org/svn/scipy/trunk/Lib/sandbox/montecarlo/ Ask on one of the scipy mailing lists if you need help building it. 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 ow

Re: reordering elements of a list

2006-06-03 Thread Robert Kern
map method. There is documentation on map() about halfway down this page: http://docs.python.org/lib/built-in-funcs.html Here's a tutorial which you should read: http://docs.python.org/tut/tut.html -- Robert Kern "I have come to believe that the whole world is an enigma, a harm

Re: Max function question: How do I return the index of the maximum value of a list?

2006-06-04 Thread Robert Kern
7;t it return the one with the highest index? -- 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: C# equivalent to range()

2006-06-05 Thread Robert Kern
Fuzzyman wrote: > Erik Max Francis wrote: >>Here were the "harsh" and "whining" responses to his question he's >>complaining about: > > Fair enough. Maybe they weren't "harsh" and "whining", just patronising > and abru

Re: Vectorization

2006-06-06 Thread Robert Kern
t do matrices, and numarray is deprecated. Please point new users to numpy, instead. http://numeric.scipy.org/ Since the OP seems to already be using one of Numeric/numarray/numpy, (given "a.shape"), I would suggest that he ask the question on the appropriate mailing list: https://lists.s

Re: fsolve() from scipy crashes python on windows

2006-06-06 Thread Robert Kern
ing with scipy, and the exact code that causes the crash. -- 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.p

Re: what are you using python language for?

2006-06-08 Thread Andrew Robert
I use python and the pymqi module to work with IBM WebSphere MQSeries and IBM WebSphere Message broker. -- http://mail.python.org/mailman/listinfo/python-list

Re: Exeucte a system command in python script

2006-06-08 Thread Robert Kern
ss.html It also works in Pythons as old as 2.2, but you'll have to install it separately. The website for the separate release is down at the moment, but when it comes back up: http://www.lysator.liu.se/~astrand/popen5/ -- Robert Kern "I have come to believe that the whole world is

Re: Exeucte a system command in python script

2006-06-08 Thread Robert Kern
ess call(['something', 'or', 'other']) You need to learn how imports work in Python. Please read the tutorial: http://docs.python.org/tut/tut.html -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terri

Re: __getattr__ question

2006-06-09 Thread Andrew Robert
If I remember correctly, this behavior depends on how the class is created (classic mode versus modern). Modern class foo(object): pass Classic ( pre python 2.2 I believe ) class foo(): pass The modern method of specifying object in the class def

Re: Xah Lee network abuse

2006-06-11 Thread Robert Hicks
have whipped cream and strawberries on that tort? :Robert -- http://mail.python.org/mailman/listinfo/python-list

Re: numeric/numpy/numarray

2006-06-13 Thread Robert Kern
here: http://www.scipy.org/History_of_SciPy -- 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: "groupby" is brilliant!

2006-06-13 Thread Robert Kern
>is :-( > > Not at all! A python list *knows* its length at all times. len() is a > constant time lookup of an internal attribute. The point is that you had to create the list in the first place. g is an iterator. -- Robert Kern "I have come to believe that the whole world is

Re: memory leak problem with arrays

2006-06-14 Thread Robert Kern
to be a bug that sounds like this, but it was fixed some time ago. Also, please try to narrow your program down to the smallest piece of code that runs and still displays the memory leak. Thank you. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma t

Re: comparing two arrays

2006-06-19 Thread Robert Kern
are best handled on numpy-discussion rather than comp.lang.python . https://lists.sourceforge.net/lists/listinfo/numpy-discussion -- 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

Re: Newbie Question

2006-06-19 Thread Andrew Robert
Saint Malo wrote: > I am new to programming, and I've chosen python to start with. I wrote > a simple program that asks several questions and assings each one of > them a variable via raw_input command. I then combined all the > variables into one like this a = b + c + d. After this I wrote these

Re: OS specific command in Python

2006-06-19 Thread Robert Kern
the ssh feature like > one does on the command line > > ssh [EMAIL PROTECTED] .etc > > How can I do this easily ? http://www.python.org/doc/current/lib/module-subprocess.html -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless e

Re: Initializing a set from a list

2006-06-20 Thread Robert Kern
09, 0.91966, -0.13550388182991072, 0), (0.874239991, 0.7001, -0.2123048713754, 0)]) >>> Please copy-and-paste the exact code that you wrote and the exact output. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigm

Re: Initializing a set from a list

2006-06-21 Thread Robert Kern
t;[1, 2, 3, 3] >>> >>>set([1, 2, 3]) >> >>Pylab shadows the built-in set name, which is one of the reasons you >>should generally use "import XXX" instead of "from XXX import *". > > Ahh. Understood. Thank you very much. It should be n

Re: Update on Memory problem with NumPy arrays

2006-06-21 Thread Robert Kern
ill usable, but aren't being actively developed. There's a pure-Python array package somewhere, but I forget the name. -- 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

Question regarding commit/backout of a message using the pymqi module

2006-06-21 Thread Andrew Robert
Hi everyone, Could someone help explain what I am doing wrong in this code block? This code block is an excerpt from a larger file that receives transmitted files via IBM WebSphere MQSeries an drops it to the local file system. Transmission of the file works as designed but it has a flaw. If th

Re: OverflowError: math range error...

2006-06-22 Thread Robert Kern
use arrays as truth values since the desired meaning (alltrue or sometrue) is ambiguous. -- 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: Numeric N-dimensional array initialization

2006-06-22 Thread Robert Kern
flat = arange(10) In [11]: a Out[11]: array([[0, 1, 2], [3, 4, 5]]) In [12]: for i in a.flat: : print i : : 0 1 2 3 4 5 -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by ou

Re: Numeric N-dimensional array initialization

2006-06-22 Thread Robert Kern
6, 0], [0, 9,10, 828202281, 0], [7, 0, 0, 0, 0], [0, 0, 0, 0, 0]]) If you have more complicated needs, we can talk about them on numpy-discussion.

Re: sum fonction in gadfly

2006-06-24 Thread Robert Hicks
I haven't been keeping up. Is Gadfly still in development? -- http://mail.python.org/mailman/listinfo/python-list

Re: Python taught in schools?

2006-06-25 Thread Robert Hicks
uate > Semantic Web courses. Why? Because basically there's nothing else with > the flexibility and as many web libraries," said Prof. James A. > Hendler. > > rd Well that Professor has shown his ignorance to the world but not for choosing Python. : ) Robert -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem with sets and Unicode strings

2006-06-27 Thread Robert Kern
regular byte string, not a Unicode string. The encoding declaration only controls how the file is parsed. The string literal that you use for FIELDS is a regular string literal, not a Unicode string literal, so the object it creates is an 8-bit byte string. The tuple containment test is attemptin

Re: Ascii Encoding Error with UTF-8 encoder

2006-06-27 Thread Robert Kern
Mike Currie wrote: > Can anyone explain why I'm getting an ascii encoding error when I'm trying > to write out using a UTF-8 encoder? Please read the Python Unicode HOWTO. http://www.amk.ca/python/howto/unicode -- Robert Kern "I have come to believe that the whole

Re: to py or not to py ?

2006-06-28 Thread Robert Kern
atter the size. http://www.scipy.org/NumPy -- 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: Immutability

2006-06-28 Thread Robert Kern
writing. class Foo(object): def __init__(self, bar): self._bar = bar @property def bar(self): return self._bar -- 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

Re: to py or not to py ?

2006-06-28 Thread Robert Kern
Threads/index.shtml A good event-driven framework for Python is Twisted. It's what I use for the program I mention above. http://twistedmatrix.com/trac/ -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own m

Re: ? on scipy.fftpack

2006-06-28 Thread Robert Kern
nts of x can be destroyed. Notes: y == rfft(irfft(y)) within numerical accuracy. -- 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.&quo

Re: Problem with sets and Unicode strings

2006-06-29 Thread Robert Kern
Fächer") and a unicode string later (u"Fächer"). But set objects can't know that that's the problem or even if it *is* a problem. -- 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: Problem with sets and Unicode strings

2006-06-29 Thread Robert Kern
Dennis Benzinger wrote: > Robert Kern wrote: >> Dennis Benzinger wrote: >>> Ok, I understand. >>> But isn't it a (minor) problem that using a set like this: >>> >>> # -*- coding: UTF-8 -*- >>> >>> FIELDS_SET = set(("Fächer&

Re: sum fonction in gadfly

2006-06-30 Thread Robert Hicks
[EMAIL PROTECTED] wrote: > Robert Hicks wrote: > > I haven't been keeping up. Is Gadfly still in development? > > I always find this question a little > irritating -- gadfly is perfect the > way it is :). If it ain't broke don't > fix it. At least u

Re: sum fonction in gadfly

2006-06-30 Thread Robert Hicks
[EMAIL PROTECTED] wrote: > Robert Hicks wrote: > > [EMAIL PROTECTED] wrote: > > > why are people so concerned > > > that it's not changing? > > > > > > > I didn't mean to be irritating and I wasn't concerned about it not >

Re: Concatenating strings

2006-06-30 Thread Robert Kern
..,"zzz"] > blist = "" > for x in alist: >blist += x > > But is there a cleaner and faster way of doing this? blist = ''.join(alist) -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terri

Re: property __doc__

2006-06-30 Thread Robert Kern
David Isaac wrote: > To access the doc string of a property, > I have to use the class not an instance. > Why? Because getting the attribute from the instance gets the calculated value (the value returned from the getter function), not the actual property object. -- Robert Kern &qu

Re: Dictionary .keys() and .values() should return a set [with Python 3000 in mind]

2006-07-01 Thread Robert Kern
...: ...: In [3]: set(d.values()) --- exceptions.TypeError Traceback (most recent call last) /Users/kern/ TypeError: list objects are unhashable Also, I may need keys to map to different objects that happen to be equal. -- Robert Kern "I have come to believe that the w

Re: numarray

2006-07-04 Thread Robert Kern
org/NumPy > my goal is to somehow define multi-dimensional arrays of strengs... >>> from numpy import * >>> a = array([['some', 'strings'],['in an', 'array']], dtype=object) >>> a array([[some, strings], [in an, arr

Re: numarray

2006-07-04 Thread Robert Kern
bruce wrote: > robert > > i did an > python>>> import numpy > a = array([['q','a'],['w','e']]) > > and it didn't work... > > i used > >>from import numpy * > > and it seems to accept

Re: multinormal distribution

2006-07-07 Thread Robert Kern
Please join us on the numpy mailing list with this information; hopefully there is someone there with a similar platform who can replicate your bug or offer better advice than myself. http://www.scipy.org/Mailing_Lists In the meantime, you might try compiling a recent SVN checkout of nu

Re: Detecting 64bit vs. 32bit Linux

2006-07-08 Thread Robert Kern
re phase of building python No. Some 64-bit systems (notably Win64) leave C longs as 32-bit. This is known as the LLP64 data model. -- 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: concatenate Numeric

2006-07-09 Thread Robert Kern
1] < a[2] Out[16]: array([0, 1, 0, 0, 0]) In [17]: bool(_) Out[17]: True In [18]: a[2] < a[1] Out[18]: array([1, 0, 1, 1, 1]) In [19]: bool(_) Out[19]: True This makes min(a) incorrect when len(a.shape) > 1. Instead, use the minimum and maximum ufuncs provided with Numeric: In [21]: N.m

Re: concatenate Numeric

2006-07-10 Thread Robert Kern
axis=0) array([ 0.49892358, 0.11931907, 0.01711571, 0.07494308, 0.04111402]) >>> a.min(axis=1) array([ 0.07494308, 0.01711571, 0.04111402]) -- 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 in

Re: Detecting 64bit vs. 32bit Linux

2006-07-10 Thread Robert Kern
've said previously in this thread, not all systems work like that. Specifically, on Win64 sizeof(long) == 32. -- 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

Re: numeric/numpy/numarray

2006-07-10 Thread Robert Kern
eeks. Hopefully, we can get to 1.0b2 by the SciPy conference in mid-August. If you've been holding off on trying numpy, the 1.0 betas will be the perfect time to jump in. It will also be your last chance to get your 2 cents in. -- Robert Kern "I have come to believe that the whole w

Re: Concatenating arrays

2006-08-24 Thread Robert Kern
Sheldon wrote: > Good day everyone, > > I would like to know if anyone has a fast and concise way of > concatenating two 2D arrays of same dimensions? > Whenever I try: > > a = concatenate(b,c) That is not the correct signature. a = concatenate((b, c)) -- Robert

Re: Newbie question about numpy

2006-08-24 Thread Robert Kern
at you want. I prefer using dot() on regular arrays, myself. -- 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: Newbie question about numpy

2006-08-24 Thread Robert Kern
tiply() has been deprecated in favor of dot() for many, many years now even in Numeric, numpy's predecessor. It has finally been removed in recent versions of numpy. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our

Re: Matrice Multiplication Problem

2006-08-24 Thread Robert Kern
are not matrices. * performs elementwise multiplication. Use numpy.dot(z, m). -- 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: Best Practices for Python Script Development?

2006-08-24 Thread Robert Kern
"getopt modules." There's the (old) getopt module and the (preferred) optparse module in the standard library. optparse really does fill the niche quite thoroughly. However, if you like, there's the newcomer argparse that tries to improve upon optparse in several respects: http

Re: Pros/Cons of Turbogears/Rails?

2006-08-27 Thread Robert Kern
st developers' perception, it is (not necessarily in > the absolute sense, but perhaps relative to Django or Turbogears). > Mind, it doesn't even need to be true, we're talking of perception > here. You might be. No one else in the thread is. -- Robert Kern "I h

Re: Pros/Cons of Turbogears/Rails?

2006-08-28 Thread Robert Kern
Ray wrote: > Robert Kern wrote: >> You might be. No one else in the thread is. > > What are you saying? That my perception that RoR is mature is wrong? No, that the part of your message that I quoted was wrong. Specifically, "we're talking of perception here." No

Re: Middle matching - any Python library functions (besides re)?

2006-08-28 Thread Andrew Robert
Simon Forman wrote: > Paul Rubin wrote: >> "EP" <[EMAIL PROTECTED]> writes: >>> Given that I am looking for matches of all files against all other >>> files (of similar length) is there a better bet than using re.search? >>> The initial application concerns files in the 1,000's, and I could use >>>

Re: Middle matching - any Python library functions (besides re)?

2006-08-28 Thread Andrew Robert
Simon Forman wrote: > Andrew Robert wrote: >> Simon Forman wrote: >>> Paul Rubin wrote: >>>> "EP" <[EMAIL PROTECTED]> writes: >>>>> Given that I am looking for matches of all files against all other >>>>> files (of s

Re: Python editor

2006-08-29 Thread Andrew Robert
[EMAIL PROTECTED] wrote: > John Salerno wrote: >> Is it possible to get vim-python for Windows, or is that just a Linux build? > > > It builds for windows. > When installed, you may also want to consider the python add-on located at http://www.vim.org/scripts/script.php?script_id=790 Enhanced

Re: NumPy 1.0b4 now available

2006-08-29 Thread Robert Kern
uch module included in numpy. > Is alter_code1.py supposed to take its place? If so why hasn't > the Home Page been updated to reflect this? Are you volunteering to maintain the site? I'd be happy to set you up with access. >> NumPy Developers > > And you have the GALL to C

Re: M$ windows python libs installed in arbitrary directories forcustomized python distributions

2006-08-29 Thread Robert Kern
alf wrote: > Fredrik Lundh wrote: >> http://www.catb.org/~esr/faqs/smart-questions.html#writewell >> >> > > and means? It's his signature. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terribl

Re: Python style: to check or not to check args and data members

2006-08-31 Thread Robert Kern
alue ) enthought.traits.trait_errors.TraitError: The 'int_member' trait of a MyClass instance must be a value of type 'int', but a value of moo was specified. """ # and similar errors for # a.int_member = 'moo' # a.process_data('moo') The met

Re: C code in Python

2006-09-01 Thread Robert Kern
't work out for you, and the many choices leave you bewildered, describe your C code and what you want the Python interface to look like, and then we can help you find a better tool for your needs. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless

Re: Linear regression in 3 dimensions

2006-09-02 Thread Robert Kern
or greater than the number of rows, then residuals will be returned as an empty array otherwise resids = sum((b-dot(A,x)**2). Singular values less than s[0]*rcond are treated as zero. In [12]: abc, residuals, rank, s = np.linalg.lstsq(A, z) In [13]: abc Out[13]: array([ 0.93104714,

Re: OO on python real life tutorial?

2006-09-02 Thread Robert Hicks
release. > > Thanks for your explanation. > > Filippo Have a look at wxGlade if you want to do some windowing prototyping: wxglad.sf.net HTH Robert -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem loading true-type font with PIL - "solved"

2006-09-03 Thread Robert Kern
his if you > report it to them. https://svn.enthought.com/enthought/ticket/864 The person who builds the Enthought Edition releases is out on vacation this week, so a new release will probably wait until he comes back. In the meantime, installing Fredrik's binaries on top of ours sh

Re: OS X and Python - wxPython has forced a rehash of my approach

2006-09-04 Thread Robert Kern
[EMAIL PROTECTED] wrote: > One other thing: the mac os x built at python.org > (http://www.python.org/download/) > > does not state whether it is a Framework build or not. I'm guessing it > isn't. It is. -- Robert Kern "I have come to believe that the whole

Re: OS X and Python - wxPython has forced a rehash of my approach

2006-09-04 Thread Robert Kern
3 (and they already have a build for > 2.5rc1), so I'm not sure what you mean. The Mac OS X Universal binary build process has been improved since the 2.4.3 source release. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made te

Re: sci-py error

2006-09-06 Thread Robert Kern
a symbol that should be provided by libg2c, the FORTRAN runtime for g77. http://www.scipy.org/FAQ#head-26562f0a9e046b53eae17de300fc06408f9c91a8 Please ask again on the numpy mailing list and provide some more information, like your platform, the versions of your compilers, and some more details about how you went

Re: Scientific computing and data visualization.

2006-09-06 Thread Robert Kern
t is easy to > convert Numeric arrays into Numpy arrays: >>>> my_numpy_array=numpy.array(my_numeric_array) The NetCDF interface has been ported to numpy and currently resides in the scipy sandbox. http://svn.scipy.org/svn/scipy/trunk/Lib/sandbox/netcdf/ -- Robert Kern "I hav

Re: Are Python's reserved words reserved in places they dont need to be?

2006-09-12 Thread Robert Hicks
s that the above could be > considered correct if the rules of Python were that an assignment > statement takes > IDENTIFIER '=' LVALUE > > Also "class" IDENTIFIER COLON could also be considered correct. > Yes it could but it isn't and isn't likely to be. Simply do not use reserved words. That rule is hardly limited to Python. Robert -- http://mail.python.org/mailman/listinfo/python-list

Re: Random Drawing Simulation -- performance issue

2006-09-12 Thread Robert Kern
y's random module does not have one. If the number of samples is high enough, then one might be able to approximate the binomial distribution with a normal one, but you'd be better off just installing numpy. -- Robert Kern "I have come to believe that the whole world i

Re: Extra Unittest Information

2006-09-13 Thread Robert Kern
, so its near the relevent > test's results. Several test runners (py.test, testoob, nose) will trap stdout and stderr and only display them if that test fails. Then you can simply use print statements in your test methods. -- Robert Kern "I have come to believe that the whole

Re: How do I converted a null (0) terminated string to a Python string?

2006-09-14 Thread Robert Kern
e delimiter string. If maxsplit is given, at most maxsplit splits are done. If sep is not specified or is None, any whitespace string is a separator. Using the maxsplit argument saves split from having to do unnecessary work splitting the garbage portion if there are nulls there,

Re: How do I converted a null (0) terminated string to a Python string?

2006-09-14 Thread Robert Kern
Robert Kern wrote: > Michael wrote: >> I guess, I still don't see how this will work. I'm receiving a C >> zero-terminated string in my Python program as a 1K byte block (UDP >> datagram). If the string sent was "abc", then what I receive in Python >

Re: Finding dynamic libraries

2006-09-15 Thread Robert Kern
; environment variables, both by direct assignment of os.environ and by > calling os.putenv(), but neither results in python being able to find > my dynamic libraries. Those environment variables need to be set before the python executable starts. -- Robert Kern "I have come to believe th

Re: How do I converted a null (0) terminated string to a Python string?

2006-09-15 Thread Robert Kern
George Sakkis wrote: > Michael wrote: > >> Robert, >> >> Thanks to you and everyone else for the help. The "s.split('\x00', >> 1)[0] " solved the problem. > > And a probably faster version: s[:s.index('\x00')] Yup. About twice as

Re: Finding dynamic libraries

2006-09-16 Thread Robert Kern
No, his extensions link against other shared libraries which are not Python extensions. Those shared libraries are in nonstandard locations because he is running his tests before installing the libraries and his Python code. -- Robert Kern "I have come to believe that the whole world is an eni

<    14   15   16   17   18   19   20   21   22   23   >