Re: Why does this launch an infinite loop of new processes?

2011-12-22 Thread Robert Kern
erate stub scripts that do not use a __main__ guard, so installing a multiprocessing-using application with setuptools can cause this problem. I believe newer versions of distribute has this problem fixed, but I'm not sure. -- Robert Kern "I have come to believe that the whole world is a

Re: Why does this launch an infinite loop of new processes?

2011-12-22 Thread Robert Kern
On 12/22/11 11:24 AM, Robert Kern wrote: Just as a further note on these lines, when older versions of setuptools and distribute install scripts, they generate stub scripts that do not use a __main__ guard, so installing a multiprocessing-using application with setuptools can cause this problem

Re: what does 'a=b=c=[]' do

2011-12-23 Thread Robert Kern
ated with extra care. "Bug" means, roughly, "something that should be fixed" not just any "thing that has some unwanted consequences". So yes, by calling it a bug you are asking and implying just that. If you don't mean that, don't use the word "bug"

Re: what does 'a=b=c=[]' do

2011-12-23 Thread Robert Kern
On 12/23/11 1:23 PM, rusi wrote: On Dec 23, 6:10 pm, Robert Kern wrote: On 12/23/11 10:22 AM, rusi wrote: On Dec 23, 2:39 pm, Steven D'Apranowrote: Some people might argue that it is a mistake, a minor feature which allegedly causes more difficulties than benefits. I do not hold

Re: Slices when extending python with C++

2011-12-28 Thread Robert Kern
e object in addition to integer indices. http://docs.python.org/c-api/slice.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." -- Umber

Re: Slices when extending python with C++

2011-12-28 Thread Robert Kern
__getitem__ registered in PyMethodDef? Or in another way? Sorry, PyMappingMethods.mp_subscript is the general function that you need to implement. -- 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 inte

Re: Help in rotate 13 program

2011-12-29 Thread Robert Kern
On 12/29/11 11:48 AM, Sayantan Datta wrote: cat sample.html | python rot13.py rot13.html cat sample.html | python rot13.py > rot13.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 interpr

Re: pickling instances of metaclass generated classes

2011-12-29 Thread Robert Kern
just explicitly register a reduction function for each type using copy_reg.pickle(): http://docs.python.org/library/copy_reg -- 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: .format vs. %

2011-12-31 Thread Robert Kern
on of this concept? I don't think the (%r)epr-formatting exist anymore, so if you want to do that you'll need to call repr manually. Yes, it does. formatter = '{!r} {!r} {!r} {!r}' print formatter.format(1,2,3,4) -- Robert Kern "I have come to believe that the w

Re: Spamming PyPI with stupid packages

2012-01-01 Thread Robert Kern
tell him that you don't appreciate his abuse of PyPI here if you like: http://feilong.me/2012/01/python-import-girlfriend -- 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 i

Re: Spamming PyPI with stupid packages

2012-01-02 Thread Robert Kern
, nor is it the logical conclusion of anything that anyone has expressed here. Please don't invent strawmen. -- 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: how to get id(function) for each function in stack?

2012-01-07 Thread Robert Kern
ly if you're only wrapping when debugging). His problem is that he wants to find out when someone is using the builtin sum() on his objects (which apparently don't react well to it) and give an informative warning. __builtin__.sum() is not under his control, fortunately. -- Rober

Re: python philosophical question - strong vs duck typing

2012-01-09 Thread Robert Kern
rmail/python-list/2011-February/1265760.html [2] http://mail.python.org/pipermail/python-list/2011-April/1269056.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 underl

Re: contextlib.contextmanager and try/finally

2012-01-11 Thread Robert Kern
osing code will be called if __exit__() gets called. That will exhaust your generator, so the .close() method will not really do anything helpful or hurtful in such a case. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terr

Re: NaN, Null, and Sorting

2012-01-16 Thread Robert Kern
them. Sounds like the quicksort algorithm. Not at all. The "split it into two lists" steps are entirely different in what Eelco suggested and quicksort. It's misleading to attempt to describe both using the same words. -- Robert Kern "I have come to believe that the wh

Re: Looking under Python's hood: Will we find a high performance or clunky engine?

2012-01-22 Thread Robert Kern
object as an iterator: [line.strip('\n') for line in f] -- 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

Re: Is there a graphical GUI builder?

2013-02-21 Thread Robert Kern
evelopment without needing to allow end users to relink the application against user-supplied versions of Qt. The free license is the LGPL, which really is Free under all common understandings of that term. You can use the LGPL license for commercial and otherwise-proprietary applications. You

Re: Is there a graphical GUI builder?

2013-02-21 Thread Robert Kern
. Or the previous iteration under late-period TrollTech, for that matter. -- 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: JIT compilers for Python, what is the latest news?

2013-04-06 Thread Robert Kern
rts of the code that Psyco was optimizing to get you the 20% performance increase and port those to Cython. -- 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: classes and sub classes?

2013-04-09 Thread Robert Kern
I will even have to make some sort of sub-concepts, but lets postpone that game until I really have really seen the need! You probably want to use an off-the-shelf ORM (Object Relational Mapper) instead of writing your own ad hoc ORM. http://www.sqlalchemy.org/ -- Robert Kern "I have

Re: performance of script to write very long lines of random chars

2013-04-11 Thread Robert Kern
ptable. Just one important thing: os.urandom() does not block to wait for more entropy. Only os.random() does. http://en.wikipedia.org/wiki//dev/random -- 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 atte

Re: performance of script to write very long lines of random chars

2013-04-11 Thread Robert Kern
considers to be random bytes that it slowly builds up from noise that is made accessible to the OS from the hardware? Yes. -- 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: Python pdb bug, followed by bug in bugs.python.org

2013-04-11 Thread Robert Kern
-> pdb.set_trace() (Pdb) c second call --Return-- > /Users/rkern/scratch/pdbbug.py(4)foo()->None -> pdb.set_trace() (Pdb) where /Users/rkern/scratch/pdbbug.py(5)() -> foo('first call') > /Users/rkern/scratch/pdbbug.py(4)foo()->None -> pdb.set_trace() (Pdb) -- Ro

Re: IDE for GUI Designer

2013-04-13 Thread Robert Kern
. You don't have to use pyuic. You can load the .ui file directly from your program. Clumsy, tedious, static. Cocoa's Interface Builder shows how to do it even though Objective-C is a *compiled* language, unlike Python. The workflow is about the same, really. -- Robert Kern "

Re: Encoding NaN in JSON

2013-04-18 Thread Robert Kern
*string* 'N/A' for every NaN. You understand that this will result in a chunk of text that is not JSON? Other JSON readers won't be able to read it. I think he means something like this: >>> json.dumps([float('nan')]) '["N/A"]' Not '

Re: Using SciPy in application

2013-04-24 Thread Robert Kern
annot use the function from scipy if scipy is not installed. There are three ways round this problem: 1) Rewrite the interpolation function you need in your own code. Variant: 1.a) Copy the interpolation code from scipy into your own code. -- Robert Kern "I have come to believe that the whol

Re: Using SciPy in application

2013-04-24 Thread Robert Kern
s without 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: Shear image (numpy.ndarray)

2013-04-27 Thread Robert Kern
py mailing lists here: 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://mai

Re: How do I encode and decode this data to write to a file?

2013-04-29 Thread Robert Kern
th it? :-) I'm using a dedicated newsreader (tin) as I posted via the gmane/usenet interface. The posting looks perfectly OK to me when I read it back from usenet. FWIW, I see the same problem Dave sees. I'm using gmane via Thunderbird. -- Robert Kern "I have come to believe that t

Re: python process accounting

2013-04-30 Thread Robert Kern
ll time.sleep ? I think that was just a placeholder example, not the program he actually wants to measure. -- 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 underl

Re: python process accounting

2013-04-30 Thread Robert Kern
md) while p.poll() is None: check_stats(p.pid) # There are more accurate ways to do this, but this probably # suffices for you. time.sleep(PERIOD) if __name__ == '__main__': main() -- Robert Kern "I have come to believe that the whole world

Re: help..

2013-05-02 Thread Robert Kern
inner-P5YtY/1 http://help.codecademy.com/ -- 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: Proposal: Inline Import

2005-12-10 Thread Robert Kern
rwise > I don't know of any significant downsides to importing at various > points of need in the code. The actual import is only done the first time, > so it's effectively just a lookup in sys.modules from there on. > Am I missing something? Packages. -- Robert Kern [EMAIL PROTECT

Re: How does Scons compare to distutils?

2005-12-12 Thread Robert Kern
John J. Lee wrote: > I imagine scons has some support for > distutils. Not really, no. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: Test the system is despised.

2005-12-14 Thread Robert Kern
know the result... I use GMane to read python-list via its newsgroup gmane.comp.python.general . It's *slightly* different from the real comp.lang.python, but mostly just by the Mailman-generated block at the bottom of each message. I started using GMane so I could read c.l.py on campus an

Re: Which Python web framework is most like Ruby on Rails?

2005-12-15 Thread Robert Kern
ecause you want to do the project in Ruby makes sense. Picking Ruby because it only has one web framework is as silly as picking one Python web framework at random. Just because RoR is the only Ruby web framework around doesn't mean it's suitable for every project. -- Robert Kern [EMAIL PROTE

Re: Which Python web framework is most like Ruby on Rails?

2005-12-15 Thread Robert Kern
Alex Martelli wrote: > Robert Kern <[EMAIL PROTECTED]> wrote: >... > >>Picking RoR because you want to do the project in Ruby makes sense. >>Picking Ruby because it only has one web framework is as silly as picking >>one Python web framework at random. Just

Re: Next floating point number

2005-12-16 Thread Robert Kern
Steven D'Aprano wrote: > Unless I have missed something, Python doesn't appear to give an interface > to the C library's next float function. I assume that most C floating > point libraries will have such a function. http://www.mkssoftware.com/docs/man3/nextafter.3.asp

Re: unsubscrib

2005-12-17 Thread Robert Kern
YongYong Li wrote: > I would like to unsubsrib python list, how do I do it? http://mail.python.org/mailman/listinfo/python-list Scroll to the bottom to see where you can unsubscribe. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves o

Re: What random number generator is used for Numeric and SciPy?

2005-12-18 Thread Robert Kern
edu/HELP/ranlib-docs/ranlib-docs.html scipy_core (Numeric's and numarray's replacement) and, by extension, scipy 0.4 use the Mersenne Twister. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die.&

Re: debian and python--any potential pitfalls?

2005-12-18 Thread Robert Kern
probably also want to install python2.4-dev so you can build and install packages with distutils. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: Testing the availability of a module

2005-12-19 Thread Robert Kern
t of work to reimplement half the Python import > machinery just for checking for all kinds of files. If you're serious > about it, you also need to cope with modules loadable from ZIP files, > and with .pth files, etc. *Unless*, someone else has already done all of it for you: h

Re: numarray :: multiplying all the elements in 1d array

2005-12-20 Thread Robert Kern
a: > r = r*i > > Is there any faster, efficient way of doing this. r = multiply.reduce(a) -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: Which Python web framework is most like Ruby on Rails?

2005-12-21 Thread Robert Kern
e anything. Thus the whole debate is > pretty much moot if I am not much mistaken. Did you read anything Kent wrote? Specifically: "project that might possibly be distributed to business partners or become a porduct some day." -- Robert Kern [EMAIL PROTECTED] "In the fiel

Re: Which Python web framework is most like Ruby on Rails?

2005-12-21 Thread Robert Kern
ly BSD-licensed since BSD is compatible with the GPL. Dual licensing would only be necessary if the alternative licenses were incompatible, e.g. Artistic/GPL like Perl or MPL/GPL like Mozilla. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: Guido at Google

2005-12-22 Thread Robert Kern
hon"? I'm pretty sure he means "working on Python." No one hires Guido and expects him not to work *with* Python most of the time. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: Guido at Google

2005-12-22 Thread Robert Kern
nefits directly. http://www.cepr.net/publications/windows_2005_10.pdf -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: Which Python web framework is most like Ruby on Rails?

2005-12-22 Thread Robert Kern
er ruled on the issue, and some people, like Larry Rosen, think it's likely that a judge would not choose the FSF's interpretation. I think Rosen is probably correct. However, I always assume that the author intends the FSF's interpretation unless they make an explicit exception, and I r

Re: Which Python web framework is most like Ruby on Rails?

2005-12-22 Thread Robert Kern
e as Emacs. This is > the closest thing I can think of to the Karrigell situation. RMS has said precisely the opposite, in fact. http://lists.debian.org/debian-legal/2002/11/msg00217.html -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves

Re: Hypergeometric distribution

2005-12-26 Thread Robert Kern
ial.gammaln(n-k+1) return lgn1 - (lgnk1 + lgk1) def gauss_hypergeom(x, r, b, n): return exp(logchoose(r, x) + logchoose(b, n-x) - logchoose(r+b, n)) Or you could use gmpy if you need exact rational arithmetic rather than floating point. -- Robert Kern [

Re: - E04 - Leadership! Google, Guido van Rossum, PSF

2005-12-28 Thread Robert Kern
e that a selfhosting programming language > is something on the same level as a nano assembler or an artificial > intelligence. ??? What the hell are you smoking? We already have self-hosting programming languages. > Anton > > 'make my day, prove me wrong' Prove yourself

Re: - E04 - Leadership! Google, Guido van Rossum, PSF

2005-12-28 Thread Robert Kern
Anton Vredegoor wrote: > Robert Kern wrote: > >>I have a friend who works at Google. He has no backstabbing history at all. >>Stop >>insulting my friends. > > Your friends work for people who would never hire me. This is not a crime. > My resume sucks, > bu

Re: multidimensional array of objects in scipy core

2006-01-02 Thread Robert Kern
Stormslayer wrote: > Folks: How do you create a multidimesional array of objects w/ the size > of the array entered at runtime? So basically, for an arbitrary class, > create an array and then *.resize it to be of size NXM, and then > populate the elements of the objects. First, asking on the sci

Re: Numeric RandomArray seed problem

2006-01-02 Thread Robert Kern
[EMAIL PROTECTED] wrote: > Hello, > > I tried calling RandomArray.seed() > by calling RandomArray.get_seed() I get the seed number (x,y). > My problem is that x is always 113611 any advice? Well, RandomArray.seed() gets its seed from the computer's time. def seed(x=0,y=0): """seed(x, y), set

Re: why import, reload, import again?

2006-01-03 Thread Robert Kern
nows. You should ask on the scipy list as this is almost certainly a holdover from the older version of scipy. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: Calling GPL code from a Python application

2006-01-03 Thread Robert Kern
for is whether doing > an "os.system('GPLapp')" violates GPL if I ship > my Python code that does the os.system call and the GPLapp program ? No, using the OS to run a GPLed program in another process and possibly communicating with it through pipes or sockets does not trig

Re: Hypergeometric distribution

2006-01-05 Thread Robert Kern
e could even suggest an alternate algorithmic approach to your > actual end result. Does it matter? Implementing Stirling's approximation is pointless when scipy.special.gammaln() or scipy.special.gamma() does it for him. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell wher

Re: [OT] How can I change Debian's default Python version?

2006-01-05 Thread Robert Kern
ed against it asking for a Python 2.4 version. Perhaps the maintainer has explained why there is no such version yet. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: Translate this to python?

2006-01-06 Thread Robert Kern
rge, which > would of course mean obfuscation at other places... I believe range() will always return an iterator in Python 3000. See the first item in the section "Built-In Changes" on http://wiki.python.org/moin/Python3.0. xrange() will be going away because it will be utterly obsolet

Re: Translate this to python?

2006-01-07 Thread Robert Kern
to return a list. Except that we're talking about Python 3.0, which will break things anyways. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: Maximum List size (item number) limit?

2006-01-09 Thread Robert Kern
.org/~esr/faqs/smart-questions.html . It will help us help you. > The same problem with 'array' type. Is it a > result of a default setting maybe? No. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allow

Re: chi-squared tests in python?

2006-01-17 Thread Robert Kern
in python... I think Chi^2 tests fall distinctly in the "third-party library" category, myself. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: chi-squared tests in python?

2006-01-18 Thread Robert Kern
tats methods. Gary Strangman's stats.py has existed for many years. Of course, it's utility went up quite a bit when it got integrated into scipy so that it could use efficient arrays instead of lists and had access to our library of special functions. -- Robert Kern [EMAIL PROTECTED] "

Re: Duplicate entries in a matrix

2006-01-19 Thread Robert Kern
0. , 0.5], [ 0.5, 0. , 0.5], [ 1. , 0.5, 0. ]]) In [5]: C = repeat(B, [1,2,1], axis=-1) In [6]: C Out[6]: array([[ 0. , 0.5, 0.5, 1. ], [ 0.5, 0. , 0. , 0.5], [ 0.5, 0. , 0. , 0.5], [ 1. , 0.5, 0.5, 0. ]]) -- Robert Kern [EMAIL PROTECTED] &quo

Re: add pexpect to the standard library, standard "install" mechanism.

2006-01-19 Thread Robert Kern
e pexpect-current.tgz tarball is a standard Python Distutil distribution. 1. download pexpect-current.tgz 2. tar zxf pexpect-current.tgz 3. cd pexpect-current 4. python setup.py install """ -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass gr

Re: Duplicate entries in a matrix

2006-01-19 Thread Robert Kern
index of -1 returns the last value? > If that were true, I supposed the evaluation would be 1, and thus gives > the same result. That is correct. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." --

Re: distutils user questions

2006-01-19 Thread Robert Kern
boxy440 wrote: > Anyone? Can setup.py uninstall a package or module > that it installed? No. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman

Re: zipfile and file permissions

2006-01-20 Thread Robert Kern
Presumably I need to do > something with external_attr in ZipInfo, any pointers? C.f.: http://mail.python.org/pipermail/pythonmac-sig/2005-March/013491.html -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die.&

Re: saxutils.XMLGenerator and CDATA

2006-01-20 Thread Robert Kern
quot;characters"), so saxutils.XMLGenerator is treating it as such. sections are intended for human authoring, not computer authoring. If you want to keep your sanity, just don't do it. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: Numarray, numeric, NumPy, scpy_core ??!!

2006-01-20 Thread Robert Kern
pdated. Could we start a discussion about which package will or > may or should survive ? You missed the discussion. The answer is numpy. http://numeric.scipy.org/ The mailing list is [EMAIL PROTECTED] : http://sourceforge.net/mail/?group_id=1369 -- Robert Kern [EMAIL PROTECTED] "

Re: Numarray, numeric, NumPy, scpy_core ??!!

2006-01-20 Thread Robert Kern
g. And as incomplete as the old Numeric manual was *for Numeric*, it and the free documentation that is actually distributed with numpy and describes the differences between the two goes a long way. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the gr

Re: Numarray, numeric, NumPy, scpy_core ??!!

2006-01-21 Thread Robert Kern
has a new mechanism to try to alleviate this. You should look at the matrix subclass in numpy/core/defmatrix.py . -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: Numarray, numeric, NumPy, scpy_core ??!!

2006-01-21 Thread Robert Kern
J wrote: > I will just jump in an use NumPy. I hope this one will stick and evolve > into the mother of array packages. > How stable is it ? For now I really just need basic linear algebra. > i.e. matrix multiplication, dot, cross etc That stuff isn't going to change on you.

Re: Numarray, numeric, NumPy, scpy_core ??!!

2006-01-21 Thread Robert Kern
Tom Anderson wrote: > Pardon my failure to RTFM, but does NumPy pick up the vecLib BLAS on Macs? Yes. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mai

Re: scipy

2006-07-12 Thread Robert Kern
t an error messages. You can enter a bug ticket in our Trac after registering. We will need to know what version of scipy and numpy you are using and the exact error messages that you are seeing. http://projects.scipy.org/scipy/scipy -- Robert Kern "I have come to believe that the w

Re: statistical analysis tools in python?

2006-07-12 Thread Robert Kern
ats package and thus has nothing for statistical tests. However, scipy has plenty of stats functionality going well beyond what you've specify. -- 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 at

Re: InteractiveConsole History on Linux

2006-07-15 Thread Robert Kern
tory working with InteractiveConsole on > Linux? Be sure that the readline module is installed. -- 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

Re: InteractiveConsole History on Linux

2006-07-15 Thread Robert Kern
Chris Spencer wrote: > Robert Kern wrote: >> Chris Spencer wrote: >>> Why does code.InteractiveConsole support command history on Windows, >>> but not in a Gnome terminal (all I get is ^[[A^[[B)? Or does it not >>> support history at all, and the Windows conso

Re: General Hash Functions In Python

2006-07-17 Thread Robert Kern
feel free to prove me wrong :) You have it backwards. You are the one making the positive assertion. You get to prove yourself correct. -- 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: No need to close file?

2006-07-18 Thread Robert Kern
> How do I close the file in the above case? You rewrite the faulty code such that the above case isn't the above case anymore. f = open('foo', 'r') try: for line in f: print line finally: f.close() -- Robert Kern "I have come to believe that the

Re: How to generate geometric random numbers?

2006-07-23 Thread Robert Kern
, 1, 3, 1, 1, 3, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 3, 1, 4, 1, 1, 1, 2, 1, 2, 3, 2, 1, 1, 1, 1, 1, 3, 1, 1, 2, 6, 1, 1, 3, 2, 1, 1, 2, 1, 1, 7, 2, 1, 1, 2, 1, 1, 2, 4, 1, 2, 1, 4, 2, 1, 1, 2, 1, 4, 2, 1, 1, 3, 1, 3, 1]) -- Robert Kern "I have come to believe that the who

Re: How to generate geometric random numbers?

2006-07-23 Thread Robert Kern
# like 0. U = 1.0 - random.random() # Find the corresponding geometric variate by inverting the uniform variate. G = int(ceil(log(U) / log(1.0 - p))) return G -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terri

Re: How to generate geometric random numbers?

2006-07-23 Thread Robert Kern
Paul Rubin wrote: > Robert Kern <[EMAIL PROTECTED]> writes: >>G = int(ceil(log(U) / log(1.0 - p))) > > I usually owuld write that as int(ceil(log(U, 1.0 - p))). Knock yourself out. I was cribbing from my C implementation in numpy. -- Robert Kern "I have come

Re: installing numpy: problems with lapack, blas etc

2006-07-24 Thread Robert Kern
imized LAPACK library, and you will have to do some extra steps to get one that works. See this thread: http://projects.scipy.org/pipermail/scipy-user/2006-July/008681.html -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible

Re: pasting numpy array into bigger array

2006-07-26 Thread Robert Kern
Tim Heaney wrote: > I think it's a shame there isn't any free documentation for numpy. Tosh. http://www.scipy.org/Tentative_NumPy_Tutorial http://www.scipy.org/Numpy_Example_List http://www.scipy.org/doc/numpy_api_docs/numpy.html -- Robert Kern "I have come to believe that

Re: Math package

2006-07-29 Thread Robert Kern
d. Some networks parallelize better than others. Look at the "Performance" link on the site below. http://osl.iu.edu/research/pbgl/ -- 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: under naming

2006-07-31 Thread Robert Kern
another module. > > for example, > module A > > _myvar = 'a local var' > > module B > from A import * > > _myvar -- is not available. > > Is this in a pep somewhere ? No; this has been a feature since before the time of PEPs. However, it is documented

Re: realine not found error

2006-07-31 Thread Robert Kern
t; /lib64/libreadline.so.5.0 However, these are not the Python readline module. The Suse package for it is probably called python-readline or something like that. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our

Re: readline not found error

2006-07-31 Thread Robert Kern
dline? Oops. Sorry, I missed that part of what you said. Use $ ./configure --enable-readline -- 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 trut

Re: More int and float attributes

2006-08-06 Thread Robert Kern
minexp= -1022 tiny= 2.2250738585072014e-308 maxexp= 1024 max= 1.7976931348623157e+308 nexp =11 min= -max - -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigm

Re: How to reverse tuples in a list?

2006-08-08 Thread Robert Kern
Noah wrote: > I have a list of tuples > [('a', 1.0), ('b', 2.0), ('c', 3.0)] > I want to reverse the order of the elements inside the tuples. > [(1.0,'a'), (2.0, 'b'), (3.0, 'c')] Python 2.4+: y = [tuple(reversed(

Re: How to reverse tuples in a list?

2006-08-08 Thread Robert Kern
inside a >> list comprehension. > > Why would you want to do it with list comprehensions? Because he has a list of tuples and wants to reverse each individual tuple in the list. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma t

Re: couple more questions about sqlite

2006-08-18 Thread Robert Kern
the library; it doesn't need a separate executable. Or is that what you meant (since one generally never installs the library without also installing the executable, too)? -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terr

Re: how do you get the name of a dictionary?

2006-08-23 Thread Robert Kern
t is called in the > enclosing scope. After all, if the value of a is invalid, and the value of > a is set in the enclosing scope, it makes sense to refer to "the object > known locally as a" by the name it was known as when it was set. That's what tracebacks are for. You don

Re: how do you get the name of a dictionary?

2006-08-23 Thread Robert Kern
e in the language in favor of a new, vague strategy that is usually uninformative and frequently undefined. -- 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: Automatic import PEP

2006-10-06 Thread Robert Kern
Lawrence D'Oliveiro wrote: > In message <[EMAIL PROTECTED]>, Robert > Kern wrote: > >> Lawrence D'Oliveiro wrote: >>> In message <[EMAIL PROTECTED]>, >>> Connelly Barnes wrote: >>> >>>> The main point of autoimp is to m

Re: Need array help

2006-10-06 Thread Robert Kern
Larry Bates wrote: > If you want to > do vector math or matrix-type calculations look at the > array module. The array module in the standard library does not provide such capabilities. If you need them, look at numpy. http://numpy.scipy.org -- Robert Kern "I have come t

Re: missing has_column_major_storage

2006-10-08 Thread Robert Kern
torage function" function have been remove > from numpy/f2py ?? how can i change the array storage C to Fortran > type?? Possibly. Please ask on the numpy list, though. http://www.scipy.org/Mailing_Lists -- Robert Kern "I have come to believe that the whole world is an enigma, a har

Re: switching to numpy and failing, a user story

2006-10-09 Thread Robert Kern
, and that grudgingly. Selling consulting services in any significant amount is probably out of the question. -- 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 under

Re: switching to numpy and failing, a user story

2006-10-09 Thread Robert Kern
ling consulting services in any significant amount is probably out of the question. -- 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

<    5   6   7   8   9   10   11   12   13   14   >