Re: How to receive a FILE* from Python under MinGW?

2007-03-22 Thread Robert Kern
I can't make your GCC tools work until the MinGW > runtime is patched? Not with that particular extension module. -- 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: Fortran vs Python - Newbie Question

2007-03-26 Thread Robert Kern
t's the safest choice (but it's a HUGE download, as it comes > with a lot of stuff -- I don't think Apple offers a simple way to > install "just" gcc and minimal supporting tools). Here are some more instructions for building the usual suspects: numpy, scipy, VTK, PIL

Re: Does Numpy work on QNX 4.25 with Python 2.2?

2007-03-26 Thread Robert Kern
ly the for python > version 2.2). numpy requires Python 2.3+. I haven't heard of anyone trying QNX. -- 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: Numeric Soup

2007-03-27 Thread Robert Kern
iPy numpy is the current array package and supercedes Numeric and numarray. scipy provides a bunch of computational routines (linear algebra, optimization, statistics, signal processing, etc.) built on top of numpy. -- Robert Kern "I have come to believe that the whole world is an enigma, a harml

Re: Numeric Soup

2007-03-27 Thread Robert Kern
Ene wrote: > As it stands Matplotlib does not > support numpy (thus my suggestion to install two of the three - my > choice: numarray + numpy) matplotlib certainly supports numpy. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is

Re: Indentation for code readability

2007-03-30 Thread Robert Kern
ation of Python 2.5's "with" statement and its context managers. The indentation is meaningful and useful. > Some people > have a strange > idea of > "increase > readability". Please contain the snark. You didn't understand why some

Re: Finding a module's sub modules at runtime

2007-04-02 Thread Robert Kern
t what version of Python is that? > http://docs.python.org/lib/module-pkgutil.html only shows one function (and > that's 2.5) and my python 2.4 installation is similarly lacking an > iter_modules() function for the pkgutil module. Is this a 2.6 thing? No, 2.5. The documentation is

Re: Numeric compiling problem under QNX 4.25

2007-04-03 Thread Robert Kern
ut numpy. He is stuck with 2.2. -- 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: numpy performance and list comprehension

2007-04-03 Thread Robert Kern
p.newaxis] # VT.shape == (3, 1) W = np.array([[1,2,3], [4,5,6], [7,8,9]]) dWdt = alpha * VT*(V - W*VT) -- 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 compiling problem under QNX 4.25

2007-04-03 Thread Robert Kern
It looks like it can't find the command ld. Can you compile any other extension modules? -- 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 compiling problem under QNX 4.25

2007-04-03 Thread Robert Kern
party extension modules. Did you install Python from source? When building extension modules, Python uses whatever linker was used to build itself. -- 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: os.popen--which one to use?

2007-04-03 Thread Robert Kern
popen2, 3 etc. are: they seem a lot more complicated. Use the subprocess module, instead. It makes all of the popen functions more or less obsolete (it used to be called popen5 before it got moved into the standard library). -- Robert Kern "I have come to believe that the whole world is an eni

Re: Numeric compiling problem under QNX 4.25

2007-04-03 Thread Robert Kern
ZMY wrote: > On Apr 3, 10:51 am, Robert Kern <[EMAIL PROTECTED]> wrote: >> ZMY wrote: >>> Is "ld" part of make command? I am not familiar with compiling with >>> make in general. >> No, it's the linker. I takes the object files (.o) which are

Re: Calling Fortran from Python

2007-04-03 Thread Robert Kern
ing auto-logging. Current session state plus future input saved. Filename : /Users/rkern/.ipython/ipython.log Mode : backup Output logging : False Raw input log : False Timestamping : False State : active In [1]: import sample In [2]: sample.sample([1, 2, 3]) Out[2]: (0,

Re: os.popen--which one to use?

2007-04-04 Thread Robert Kern
zoo will disappear in favor of subprocess. -- 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: Calling Fortran from Python

2007-04-04 Thread Robert Kern
keys. Is there a way > to specify the C compiler path to f2py so that it does not rely on the > distutils? Or maybe I am totally off base here, I don't know. What C and Fortran compilers are you trying to use? You can look at f2py's help for flags that you can use to help cont

Re: BeautifulSoup vs. real-world HTML comments

2007-04-04 Thread Robert Kern
ess to duplicate that work in the Python > standard library; let HTMLParser be small and tight, and outsource the > handling of floozy input to a dedicated program. Well, BeautifulSoup is just such a dedicated library. However, it defers its handling of comments to HTMLParser. That's th

Re: BeautifulSoup vs. real-world HTML comments

2007-04-04 Thread Robert Kern
Carl Banks wrote: > On Apr 4, 2:43 pm, Robert Kern <[EMAIL PROTECTED]> wrote: >> Carl Banks wrote: >>> On Apr 4, 2:08 pm, John Nagle <[EMAIL PROTECTED]> wrote: >>>> BeautifulSoup can't parse this page usefully at all. >>>> It treats the

Re: Calling Fortran from Python

2007-04-04 Thread Robert Kern
use gfortran. http://www.develer.com/oss/GccWinBinaries -- 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.pyth

Re: Numeric compiling problem under QNX 4.25

2007-04-04 Thread Robert Kern
hat you need to use Numeric because you are on Python 2.2 to hold off the inevitable, "you should really migrate to numpy," spiel. 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 terribl

Re: BeautifulSoup vs. real-world HTML comments

2007-04-04 Thread Robert Kern
Carl Banks wrote: > On Apr 4, 4:55 pm, Robert Kern <[EMAIL PROTECTED]> wrote: >> Carl Banks wrote: >>> On Apr 4, 2:43 pm, Robert Kern <[EMAIL PROTECTED]> wrote: >>>> Carl Banks wrote: >>>>> On Apr 4, 2:08 pm, John Nagle <[EMAIL PROTECTED]

Re: Calling Fortran from Python

2007-04-04 Thread Robert Kern
Mangabasi wrote: > Would Python 2.5 work with Visual Studio 6.6? 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: Basic Serialization - a design decision question

2007-04-06 Thread Robert Kern
ull module devoted to it just in terms of being able to implement it. Trying to stuff all of it into a builtin is asking for trouble. Of course, you can always do this: from cPickle import dumps ... conn.send(dumps(myClass)) -- Robert Kern "I have come to believe that the whole world

Re: python, wxpython and Mac OS X

2007-04-08 Thread Robert Kern
ython 2.4. It's not that you need a newer version of wxPython; it's that you need to install one for Python 2.4 period. > Also, what wxPython download should I install? For 2.4: http://prdownloads.sourceforge.net/wxpython/wxPython2.8-osx-unicode-2.8.3.0-universal10.4-py2.4.dmg For 2.5: h

Re: python, wxpython and Mac OS X

2007-04-09 Thread Robert Kern
7stud wrote: > On Apr 8, 8:46 pm, Robert Kern <[EMAIL PROTECTED]> wrote: >> Why 2.4.4 instead of the official 2.5 binary fromwww.python.org? >> >> http://www.python.org/download/ > > 1) On some download page that listed both python 2.5 and 2.4, it said &g

Re: About Trolltech QT OpenSource license.

2007-04-11 Thread Robert Kern
m it, you don't need Trolltech's "commercial" license. Just be sure that you do obey the terms of the GPL; it's not entirely trivial to build a business model around it. Such a business will be somewhat different from one that uses proprietary licenses. -- Robert Kern

Re: About Trolltech QT OpenSource license.

2007-04-11 Thread Robert Kern
king kikapu wrote: > On Apr 11, 10:56 am, Robert Kern <[EMAIL PROTECTED]> wrote: >> Others have given good answers. I would only like to clarify what I think is >> the >> source of confusion here. While the FSF and many open source advocates make a >> distinct

Re: About Trolltech QT OpenSource license.

2007-04-11 Thread Robert Kern
Jorge Godoy wrote: > Robert Kern <[EMAIL PROTECTED]> writes: > >> I don't recommend it. You are talking to their salesman, not your lawyer. You >> are being given a sales pitch, not legal advice. > > On the other hand, he's stating Trolltech's

Re: About Trolltech QT OpenSource license.

2007-04-11 Thread Robert Kern
king kikapu wrote: > Ο/Η Robert Kern έγραψε: >> It's a bit more complicated than that. There are good resources for >> understanding the implications of the GPL on the FSF's site which other >> people >> have pointed out. > >>From what i can underst

Re: About Trolltech QT OpenSource license.

2007-04-12 Thread Robert Kern
king kikapu wrote: > On Apr 12, 1:02 am, Robert Kern <[EMAIL PROTECTED]> wrote: >> All parts of the software have to be licensed compatibly with the GPL. The >> FSF >> has a fairly comprehensive list of the licenses they believe are >> GPL-compatible. >>

Re: Portably generating infinity and NaN

2007-04-12 Thread Robert Kern
nf *= mul if inf == tmp: break tmp = inf nan = inf / inf -- 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: tuples, index method, Python's design

2007-04-12 Thread Robert Kern
ts a missing > method, does it not? Who has not done this? > Name yourself! I'm pretty sure I've never done this either. -- 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 interpre

Re: UnicodeDecodeError when importing random? (running with -U)

2007-04-12 Thread Robert Kern
s type to replace non-text strings like those read from /dev/urandom in that piece of code. os.urandom() and the random module will have to be modified to use it instead of a string. Looking at the Python 3.0 branch, I see that this hasn't quite happened, yet. -- Robert Kern "I have come t

Re: Problem with algorithm

2007-04-13 Thread Robert Kern
Paul McGuire wrote: > If I see farther, it is because I stand on the shoulders of an > infinite number of monkeys. If I ever get around to writing a book on numerical methods/computational science/whatever, this will be the chapter quote for my chapter on Monte Carlo algorithms. -- Rober

Re: Portably generating infinity and NaN

2007-04-15 Thread Robert Kern
Paul Rubin wrote: > I doubt any Crays are still running, or at least > running any numerical code written in Python. You are wrong. > Same for VMS. Also wrong. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible

Re: working of round()

2007-04-15 Thread Robert Kern
.6299 round(x, n) essentially does the following: math.floor(x * 10**n + 0.5) / 10**n Since (5.25/2)*100 == 262.5, adding 0.5 gives 263.0 and ultimately 2.63 as the rounded number. round() does not do anything more complicated like round-to-even. Use the decimal module if you

Re: working of round()

2007-04-15 Thread Robert Kern
Steven Bethard wrote: > I'm not sure why you would have expected 2.62 for the latter when:: > > >>> 5.25 / 2 > 2.625 Round-to-nearest-even is a valid, and oft-recommended rounding mode for numbers exactly halfway between two round numbers. -- Robert Ker

Re: The smallest and largest values of numeric types

2007-04-17 Thread Robert Kern
? Or what might replace it. It > is very useful. It used to be distributed with Numeric. http://numpy.cvs.sourceforge.net/numpy/kinds/ numpy exposes the same information for floating point types with its finfo class. Nothing particular for ints. -- Robert Kern "I have come to b

Re: Numpy problem: Arrays in a list of dictionaries

2007-04-17 Thread Robert Kern
; > So the strings can be assigned seperately but arrays can not. What is > the problem here? When you call dict.copy(), all it does is make a copy of the dictionary; each copy of the dictionary still refers to the same objects. list1[i][1] refers to the same array for all i, so when you mo

Re: scipy 0.52 det crashes python

2007-04-17 Thread Robert Kern
/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 join array of integers?

2007-09-15 Thread Robert Kern
ySequence_Fast() on the argument. Looking in Objects/abstract.c, we see that PySequence_Fast() short-circuits lists and tuples but builds a full list from the iterable otherwise. map() seems to reliably be the fastest option, and list comprehensions seem to slightly edge out generator comprehension

Re: how to join array of integers?

2007-09-15 Thread Robert Kern
Grant Edwards wrote: > On 2007-09-15, Robert Kern <[EMAIL PROTECTED]> wrote: >> Grant Edwards wrote: >>> On 2007-09-15, Erik Jones <[EMAIL PROTECTED]> wrote: >>> >>>>>> print ''.join([str(i) for i in [1,2,3]]) >>>>>

Re: Pseudo-Private Class Attributes

2007-09-18 Thread Robert Kern
s right? Multiple inheritance isn't *all* that common, and haphazard multiple inheritance is even less common. Don't use __attr unless if you have a *specific* need in front of you, not just an abstract fear of rogue subclassers. -- Robert Kern "I have come to believe that the whole world

Re: distutils, extensions, and missing headers

2007-09-20 Thread Robert Kern
es floating around to do so more nicely. http://docs.python.org/dist/node12.html For other things (and hopefully, you can live with package data), use "data_files": http://docs.python.org/dist/node13.html -- Robert Kern "I have come to believe that the whole world is an enigma

Re: distutils, extensions, and missing headers

2007-09-20 Thread Robert Kern
Gary Jefferson wrote: > On Sep 20, 1:22 am, Robert Kern <[EMAIL PROTECTED]> wrote: >> Use the "headers" keyword to setup() to list the header files you want >> installed. > > I've tried "headers=['header1.h', 'header2.h']&q

Re: Odd files; just left behind?

2007-09-21 Thread Robert Kern
ere's > the question of why this folder has to be obfuscated (name starts with .). > Even > if these files are "resources" why should they be assumed to belong to the > user? Because they are unpacked at runtime by the user that imported the module. Usually, they won

Re: Getting rid of bitwise operators in Python 3?

2007-09-22 Thread Robert Kern
e the "and"/"or"/"not" keywords since they can't be overloaded, but they bitwise operators fill the need fairly well. We've had logical_and()/logical_or()/logical_not() functions since forever, too, and they're a pain in the ass. -- Robert Kern "I ha

Re: Odd files; just left behind?

2007-09-22 Thread Robert Kern
Robin Becker wrote: > Robert Kern wrote: > ... >> They're a cache. > > they're actually the files that get used by the installed extension in > this case (MySQLdb). Yes. They are extracted from the zipfile at runtime and left there so they don't have

Re: List search

2007-09-28 Thread Robert Kern
ults in the following output: > > x11 > x11-wm > x11-system > > I'm looking to return the list item that just has 'x11'. How can I > structure my search term so that this output is returned? line == 'x11' -- Robert Kern "I have come to believe

Re: how to install numpy and scipy on debian?

2007-10-01 Thread Robert Kern
py. They are somewhat older than the current release, but that shouldn't be too bad. If you want to build numpy and scipy yourself and you need more specific help, please join us on scipy-user with your questions. http://www.scipy.org/Mailing_Lists -- Robert Kern "I have come to bel

Re: where is pkg_resources (setuptools) looking for entry_points.txt

2007-10-01 Thread Robert Kern
mailing list for setuptools questions is the Distutils-SIG: http://mail.python.org/mailman/listinfo/distutils-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

Re: gui toolkits: the real story? (Tkinter, PyGTK, etc.)

2007-10-01 Thread Robert Kern
e to the story. Yes, compatibility is broken, strictly speaking; however, the goal is that the majority of changes can be handled automatically using the 2to3 tool to convert the source code. You can't really do that if you remove Tkinter entirely. -- Robert Kern "I have come to

Re: module confusion

2007-10-01 Thread Robert Kern
ng. OP: logging is a package and logging.handlers is one module in the package. Not all of the modules in a package are imported by importing the top-level package. os.path is a particularly weird case because it is just an alias to the platform-specific path-handling module; os is not a package. -- Rob

Re: Using fractions instead of floats

2007-10-01 Thread Robert Kern
a relatively small amount of precision necessary, and float(str(x)) == x will tend to hold. That's why it does this. > Didn't you just > say it couldn't be represented exactly? Yup. > Which is correct, > >>>> str(a) > '0.6' > > or >

Re: module confusion

2007-10-02 Thread Robert Kern
Lawrence D'Oliveiro wrote: > In message <[EMAIL PROTECTED]>, Robert > Kern wrote: > >> Not all of the modules in a package are imported by importing the >> top-level package. > > You can't import packages, only modules. > >> os.path is a pa

Re: Using fractions instead of floats

2007-10-02 Thread Robert Kern
[EMAIL PROTECTED] wrote: > On Oct 2, 1:12 am, Robert Kern <[EMAIL PROTECTED]> wrote: >> [EMAIL PROTECTED] wrote: >>> How does gmpy make the conversion from float to rational? >> gmpy has a configurable transformation between floats and the internal >> repres

Re: module confusion

2007-10-03 Thread Robert Kern
Lawrence D'Oliveiro wrote: > In message <[EMAIL PROTECTED]>, Robert > Kern wrote: > >> Lawrence D'Oliveiro wrote: >> >>> In message <[EMAIL PROTECTED]>, Robert >>> Kern wrote: >>> >>>> Not all of the modules in a

Re: What does the syntax [::-1] really mean?

2007-10-04 Thread Robert Kern
e why isn't it defined as such in the > library? It's a shorthand for [None:None:-1]. I think you're misinterpreting the sentence, "If i or j are omitted or None, they become ``end'' values (which end depends on the sign of k)." The end values *aren't* 0 a

Re: What does the syntax [::-1] really mean?

2007-10-04 Thread Robert Kern
nd j. The default values for > i and j would become (0,len(x)), flopped for k < 0. > > There may be a good (or not-so-good) reason this representation > wouldn't have worked or would have caused problems. Or maybe it is > just personal preference. It would be inconsistent f

Re: module confusion

2007-10-04 Thread Robert Kern
quot;os.path" (assuming you've imported the standard library's os module) is another module and that os itself is a module, not a package like logging is. This is somewhat odd, because most modules aren't exposed that way. They are either in their own file and accessed by i

Re: numpy : efficient sum computations

2007-10-16 Thread Robert Kern
cts. > > Now I want to sum up on axis 2 and 3. If I do : >> (m[:,:] * d).sum(axis=3).sum(axis=2) > it seems like I get my result. > > I'm wondering : is this syntax leading to efficient computation, or is > there something better ? That's about it. There's no

Re: numpy : efficient sum computations

2007-10-16 Thread Robert Kern
ut[17]: array([[ 0, 6], [12, 18], [24, 30]]) In [18]: d * phi[1, 2] Out[18]: array([[ 0, 6], [12, 18], [24, 30]]) In [19]: for i in range(phi.shape[0]): : for j in range(phi.shape[1]): : assert (m[i,j] == d*phi[i,j]).all() : :

Re: how to get my own namespace ?

2007-10-16 Thread Robert Kern
t dictionary in some circumstances. -- 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 doesn't have this list a "reply-to" ?

2007-10-16 Thread Robert Kern
s list because I like my lists to act like USENET. http://gmane.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://mail.python.org/mailman/listinfo/python-list

Re: negative base raised to fractional exponent

2007-10-16 Thread Robert Kern
A couple of questions. > > 1. How do you approximate a complex number in the reals? That doesn't > make sense. > > 2. x ^ -4. = 1 / (x ^ 4.), so where do complex numbers enter > into this anyway? When *x* is negative and the exponent is fractional. -- Robert Ker

Re: why doesn't have this list a "reply-to" ?

2007-10-16 Thread Robert Kern
Grant Edwards wrote: > On 2007-10-16, Robert Kern <[EMAIL PROTECTED]> wrote: > >> It's not universal. Many people consider it harmful. Google "reply-to >> considered >> harmful" for a variety of opinions, for and against. >> >> I use GMane

Re: Appending a list's elements to another list using a list comprehension

2007-10-17 Thread Robert Kern
w I'm being a little finicky here, but how would someone know > that a+=b is not the same as a=a+b? > Any documentation or reference that mentions this? http://docs.python.org/ref/augassign.html -- Robert Kern "I have come to believe that the whole world is an enigma, a harm

Re: why doesn't have this list a "reply-to" ?

2007-10-17 Thread Robert Kern
27;m using Thunderbird 2.0.0.0: I use the right-click menu. And click what? I have Thunderbird 2.0.0.6 on OS X and only see "Reply to Sender Only" and "Reply to All". -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is ma

Re: parallel NumPy: PyMPI, myMPI or something else?

2007-10-21 Thread Robert Kern
s NumPy already > optimized for a MPI environment so that for example matrix > multiplication, iterative solvers etc. are automatically distributed? No. > Or do I have to split each problem myself to make use of the > parallelism? Pretty much. -- Robert Kern "I have come to

Re: parallel NumPy: PyMPI, myMPI or something else?

2007-10-22 Thread Robert Kern
n tried; if you are interested in trying others, we'd be more than happy to help you along on the numpy-discussion mailing list. http://svn.scipy.org/svn/numpy/branches/multicore/ http://www.scipy.org/Mailing_Lists -- Robert Kern "I have come to believe that the whole world is an e

Re: Using arrays in Python - problems.

2007-10-23 Thread Robert Kern
e quite inefficient. How about initialising it > with a required size? > > F = numpy.array([0]*shotcount) A more idiomatic version would be this: F = numpy.empty((shotcount,), dtype=float) attackwarningred, you might want to ask your numpy questions on the numpy-discussion mailing list:

Re: Pari Python

2007-10-28 Thread Robert Kern
break other Python modules. If you can't use other Python modules with your module, what's the point of using Python at all? -- 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: Pari Python

2007-10-28 Thread Robert Kern
to achieve what you want. You just need to parse your almost-Python code yourself before executing it. That's what SAGE does. You really should take a closer look at it. It is possible to take just part of SAGE and not install the whole thing. -- Robert Kern "I have come to believe that

Re: Function to resize global numpy array interactively in ipython

2007-10-29 Thread Robert Kern
space gets updated with the values in that namespace. The global statement refers to that initial namespace, not the one of the interactive prompt. Give "%run -i resize.py" a try, though. That should execute the code in the interactive prompt's namespace. -- Robert Kern "

Re: (MAC) CoreGraphics module???

2007-11-01 Thread Robert Kern
n.framework. The module was made by Apple, and they have not released the source code, so it cannot be made to work with the www.python.org distribution. -- 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 a

Re: (MAC) CoreGraphics module???

2007-11-02 Thread Robert Kern
David C. Ullrich wrote: > On Thu, 01 Nov 2007 19:39:20 -0500, Robert Kern > <[EMAIL PROTECTED]> wrote: > >> David C. Ullrich wrote: >>> [why doesn't CoreGraphics work?] >> That's different than the one that is referenced. The one those articles >

Re: Read CSV file into an array

2007-01-09 Thread Robert Kern
oyekomova wrote: > I would like to know how to read a CSV file with a header ( n columns > of float data) into an array without the header row. Did you read our responses from the last time you asked this question? -- Robert Kern "I have come to believe that the whole world is a

Re: Frequency spectrum with fft of a real valued array...?

2007-01-11 Thread Robert Kern
if n is even f = [0,1,...,(n-1)/2,-(n-1)/2,...,-1]/(d*n) if n is odd -- 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." --

Re: globals accros modules

2007-01-11 Thread Robert Kern
his slides from his talk at SciPy '06: http://www.third-bit.com/lectures/scipy06.pdf -- 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."

Re: Rational Numbers

2007-01-11 Thread Robert Kern
Noud Aldenhoven wrote: > I'm a mathematician (in learning, with a bad feeling for English) and > don't trust irrational numbers in programming languages. You may want to look at SAGE. It provides a ton of good mathematical code. http://sage.scipy.org/sage/ -- Robert Kern

Re: Intellectual Property Talk at PyCon

2007-01-11 Thread Robert Kern
ns all around. Of course, it would be nice if what you say agrees with my opinions on the subject, but I'll let you slide if you at least say something sensible. ;-) -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our

Re: Newbie - converting csv files to arrays in NumPy - Matlab vs. Numpy comparison

2007-01-11 Thread Robert Kern
id, sep=',').reshape(-1,6) > # for 6-column data. -- 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: The curious behavior of integer objects

2007-01-15 Thread Robert Kern
not modify the object at all or change the result of instantiating foo(). You need to override __new__ to get the behavior that you want. http://www.python.org/download/releases/2.2.3/descrintro/#__new__ -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless

Re: why scipy cause my program slow?

2007-01-16 Thread Robert Kern
does not have builtin types for. Unfortunately, the code paths that get executed when arithmetic is performed sith such scalars are still suboptimal; I believe they are still going through the full ufunc machinery. -- Robert Kern "I have come to believe that the whole world is an enigma, a

Re: Units of measurement

2007-01-17 Thread Robert Kern
up/comp.lang.python/browse_frm/thread/8ed89844218b92c7/0f05aea353c1563d And there was another one announced here sometime in the past year or so, IIRC, but I don't recall the name of it or that of the author. :-( -- Robert Kern "I have come to believe that the whole world is an enigma,

Re: Units of measurement

2007-01-17 Thread Robert Kern
Russ wrote: > Robert Kern wrote: >> And there was another one announced here sometime in the past year or so, >> IIRC, >> but I don't recall the name of it or that of the author. :-( > > Perhaps you are referring to the scalar class at > http://RussP

Re: Why this script can work?

2007-01-18 Thread Robert Kern
t in the same indent scope,why this can work? This else: clause goes with the try: and except: clauses, not the if: clause. It is executed if no exception was raised. http://docs.python.org/ref/try.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: scipy.optimize.lbfgsb help please!!!

2007-01-20 Thread Robert Kern
nswers on the scipy-user mailing list. http://www.scipy.org/Mailing_Lists > Permmin is a function that simply returns a vector array [xmin, ymin] This is your problem. The function to minimize must return a scalar, not a vector. This is not a multi-objective optimizer. -- Robert Kern &qu

Re: scipy.optimize.lbfgsb help please!!!

2007-01-20 Thread Robert Kern
to know what version of scipy you are using. -- 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: scipy.optimize.lbfgsb help please!!!

2007-01-20 Thread Robert Kern
failed to initialize intent(inout) array -- expected elsize=8 > but got 4 -- input 'l' not compatible to 'd'" And also tell us your platform. I suspect this is a 64-bit problem. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigm

Re: Reading Fortran Data

2007-01-21 Thread Robert Kern
[EMAIL PROTECTED] wrote: > I don't know if this is helpfull or not but (or for that matter > current). http://cens.ioc.ee/projects/f2py2e/ offers some suggestions > and it looks like you can use it with c code also. f2py has been folded into numpy. -- Robert Kern "I have c

Re: Reading Fortran Data

2007-01-21 Thread Robert Kern
sen has a module for reading this kind of file. http://dirac.cnrs-orleans.fr/ScientificPython/ Specifically, Scientific.IO.FortranFormat . -- 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: pylab, matplotlib ... roots function question

2007-01-21 Thread Robert Kern
> In [343]: roots([1,0,0]) > Out[343]: array([], dtype=float64) > > ok, as it should be No, that's actually wrong. What version of numpy are you using? With a recent SVN checkout of numpy, I get the correct answer: In [3]: roots([1,0,0]) Out[3]: array([ 0., 0.]) -- Robert Ker

Re: Program eating memory, but only on one machine? (Solved, sort of)

2007-01-22 Thread Robert Kern
range(100) In [17]: ar2 = arange(3, 7) In [18]: import itertools In [19]: for i in itertools.count(1): :if not i % 1000: :print i :x = setmember1d(ar1, ar2) -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma t

Re: arrow keys don't work

2007-01-22 Thread Robert Kern
> downgradinig to 2.4? Thanks. Your installation of 2.4 probably had the readline module installed while your installation of 2.5 doesn't. What platform are you on? -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terr

Re: best package for a physical simulation?

2007-01-23 Thread Robert Kern
[EMAIL PROTECTED] wrote: > Hello everyone, > i would like to use python to perform some simulation involving collisions > of colloidal particles. > which is the best package/engine to do that in python? What kind of numerical methods does such simulation require? -- Robert Kern &qu

Re: Simple Matrix class

2007-01-23 Thread Robert Kern
tion should be no more than O(n**3). -- 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: easy_install pylons failure - www.myghty.org unavailable

2007-01-23 Thread Robert Kern
on Distutils-SIG list will be more likely to get Phillip Eby's attention. It surprises me that setuptools didn't pick up the tarball on the CheeseShop. http://mail.python.org/mailman/listinfo/distutils-sig -- Robert Kern "I have come to believe that the whole world is an enigma,

Re: easy_install pylons failure - www.myghty.org unavailable

2007-01-23 Thread Robert Kern
Robert Kern wrote: > [EMAIL PROTECTED] wrote: > >> Is it not able to get past this point because there is only one source for >> Myghty or does it always need to go to a package's home page? I was able to >> work around this by manually downloading the Myghty-1.1.tar

Re: Simple Matrix class

2007-01-24 Thread Robert Kern
ll as efficiency. -- 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

<    11   12   13   14   15   16   17   18   19   20   >