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

Encoding - unicode

2006-01-10 Thread Robert Deskoski
Hi there, Currently I have a file with germanic names which are, unfortunately in this format: B\xf6genschutz As well as being mixed with those who actually have the correct character's in them. What I am trying to do is convert the characters in the above format to the correct format in a text f

Hiding input charachters

2006-01-12 Thread Robert Hilkene
Hi there Can any body help, I wanna to hide input characters from user (when he enters password)? I found that for Macintosh you implement 4.12 quietconsole -- non-visible stdout output Can I do it with Windows? -- * Robert Hilkene DMS

How to hide output characters on Windows

2006-01-12 Thread Robert Hilkene
-- * Robert Hilkene DMS Group Puskinova 9a 21000 Novi Sad Serbia & Montenegro Phone: +381 21 4746008 Mobile: +381 64 277 19 49 [EMAIL PROTECTED] http://www.dmsgroup.co.yu/ * --

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: The Python cross? Was New Python.org website

2006-01-19 Thread Robert Boyd
On 1/18/06, Paul McGuire <[EMAIL PROTECTED]> wrote: > Looks like a plus sign to me, evoking the idea of "incremental improvement". > A cross (as in Christian symbol) really has an elongated leg to the bottom. > But it most closely resembles two snakes (see the little eyes > at the top and bottom?)

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: activestate vs enpython

2006-07-14 Thread Robert Hicks
mclaugb wrote: > Um, i didnt see at the "more information" link whether "numpy, > numarray, matplotlib, scipy, and scientific python" was included . > There's your answer... :Robert -- http://mail.python.org/mailman/listinfo/python-list

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

Calling python functions from C

2006-07-16 Thread robert . differentone
Could anybody tell me how to call python modules from C. e.g. my Python module : def add(a,b) return(a+b) How can I call "add.py" from C? Please post any simple example. I have read Python embedding in Python Manual but I get "ImportError" all the time? Any help would be appreciated !

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: Python to use a non open source bug tracker?

2006-10-04 Thread Robert Hicks
alled JIRA - never heard before of course) > for Python itself. > > Does this smell "Bitkeeper fiasco" to anyone else than me? > -- > Giovanni Bajo No. Robert -- http://mail.python.org/mailman/listinfo/python-list

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: Python to use a non open source bug tracker?

2006-10-07 Thread Robert Hicks
anyone until this thread on c.l.p.! This is just a rediculous thing to be arguing over, really it is. Robert -- http://mail.python.org/mailman/listinfo/python-list

Re: Python to use a non open source bug tracker?

2006-10-07 Thread Robert Hicks
far easier than hard work towards a goal. > Hey, that is how this whole thread started! Good observation. Robert -- http://mail.python.org/mailman/listinfo/python-list

Re: Python to use a non open source bug tracker?

2006-10-07 Thread Robert Hicks
Giovanni Bajo wrote: > You might also be understimating how negative could be the reaction from the > open-source community to such a move. > -- > Giovanni Bajo That is simply rediculous. Step away from the kool-aid. Robert -- http://mail.python.org/mailman/listinfo/python-list

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

Re: switching to numpy and failing, a user story

2006-10-09 Thread Robert Kern
Apologies for the dupe. It looked like something went wrong with the first send (and the first post was partly incorrect to begin with). -- 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: Python component model

2006-10-09 Thread Robert Kern
the rest of the Enthought crew on the enthought-dev mailing list if you have any questions: https://mail.enthought.com/mailman/listinfo/enthought-dev -- 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: Python component model

2006-10-09 Thread Robert Kern
Edward Diener No Spam wrote: > Robert Kern wrote: >> Edward Diener No Spam wrote: >> >>> There's nothing wrong with Python's introspection. In fact Python's >>> facilities in this area and its support for metadata are stronger than >>>

Re: Python component model

2006-10-11 Thread Robert Kern
tive resources: >> >> http://dabodev.com >> http://case.lazaridis.com/wiki/DaboAudit > > Well, then, why not contribute? Or are you waiting for everyone else > to do it for you? No, he's just a troll that enjoys telling everyone what to do. Don't try to get him to contribu

Re: Python component model

2006-10-11 Thread Robert Kern
Ilias Lazaridis wrote: > Robert Kern wrote: >> No, he's just a troll that enjoys telling everyone what to do. Don't try to >> get >> him to contribute anything useful; it won't work. > > Mr. Kern! Seeing you working on such a seemingly excellent product

Re: Python component model

2006-10-11 Thread Robert Kern
Ilias Lazaridis wrote: > Robert Kern wrote: >> Ilias Lazaridis wrote: >>> Robert Kern wrote: >>>> No, he's just a troll that enjoys telling everyone what to do. Don't try >>>> to get >>>> him to contribute anything useful; it

Re: OT: What's up with the starship?

2006-10-15 Thread Robert Hicks
t. > > Does anyone know more? > > What about the integrity of the python packages hosted there? > When was the site compromised? > I just installed the python 2.5 pywin module last week. > Should I be concerned? > > Is this related to the Python security problem recently

Re: Max-plus library

2006-10-16 Thread Robert Kern
ntrol theory packages, but as I neither know what max-plus dioids are, nor have I any current interest in them, I can't give you any better pointers. -- 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: Plotting histograms

2006-10-16 Thread Robert Kern
pylab.hist(eig, 10) Or, if you're at the interactive prompt (but remember that it is inadvisable to do so in modules): from matplotlib.pylab import * [N,x] = hist(eig, 10) You will probably want to review the section of the tutorial on importing modules if you don't understand

Re: pylab package dependencies

2006-10-17 Thread Robert Kern
Lou Pecora wrote: > In article <[EMAIL PROTECTED]>, > Robert Kern <[EMAIL PROTECTED]> wrote: > >> I presume what you did was something like this: >> >>from matplotlib import pylab >>[N,x] = hist(eig, 10) >> >> What you actually wan

Re: pylab package dependencies

2006-10-17 Thread Robert Kern
uration file: http://docs.python.org/inst/config-syntax.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: why should dict not be callable?

2006-10-17 Thread Robert Kern
s there > some reason a subscriptable thing like a dict should *not* be callable? Because you can pass key_dict.get instead. Or even key_dict.__getitem__ if you don't want the default=None behavior of the .get() method. -- Robert Kern "I have come to believe that the whole world i

Re: pylab package dependencies

2006-10-17 Thread Robert Kern
Lou Pecora wrote: > In article <[EMAIL PROTECTED]>, > Robert Kern <[EMAIL PROTECTED]> wrote: > >> Lou Pecora wrote: >> >>> The only problem I'm having is getting ipython to run. Not installed in >>> /usr/local/bin (although all o

Re: Python wrapper for C++ core

2006-10-17 Thread Robert Heller
te the interface between C/C++ and Python/Tcl. > > Holly > > -- Robert Heller -- 978-544-6933 Deepwoods Software-- Linux Installation and Administration http://www.deepsoft.com/ -- Web Hosting, with CGI and D

Re: Python wrapper for C++ core

2006-10-17 Thread Robert Heller
on for me to use python (like I have in the past) for > games or sim apps. > > []s > Robert Heller wrote: > > At 17 Oct 2006 16:05:40 -0700 [EMAIL PROTECTED] wrote: > > > > > > > > Hi All > > > > > > Apologies in advance for the pretty basic

Re: Plotting histograms

2006-10-17 Thread Robert Kern
[EMAIL PROTECTED] wrote: > Thanks Robert, > > My previous problem is solved(I was using 'from matplotlib.pylab import > *') but now I am facing another problem. I want to plot the histogram > of eigenvalues calculated and I am

Re: Looking for assignement operator

2006-10-18 Thread Robert Kern
;> def __init__(self, val): >>> assert(isinstance(val, int)) >>> self._val = val >>> >>> a = MyInt(10) >>> >>> # Here i need to overwrite the assignement operator >>> a = 12 >>> > >> Could the "

Re: portable extensions options for external libraries

2006-10-18 Thread Robert Kern
th something like the following section (unindented): # Uncomment and modify the following section to configure the locations of the # Boost and GSL headers and libraries. #[build_ext] #include-dirs=/opt/local/include,/usr/local/include #library-dirs=/opt/local/lib,/usr/local/lib C

Re: Plotting histograms

2006-10-18 Thread Robert Kern
s on the matplotlib-users mailing list instead of here. -- 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: ZODB and Python 2.5

2006-10-20 Thread Robert Kern
all Python 2.5 alongside 2.4, install ZODB, run the test suite. -- 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: Inheriting property functions

2006-10-20 Thread Robert Kern
7;t recognizing its inheritence of A's methods get_a and set_a > during creation. Inheritance really doesn't work that way. The code in the class suite gets executed in its own namespace that doesn't know anything about inheritance. The inheritance rules operate in attribute acces

Re: pylint: What's wrong with the builtin map()

2006-10-22 Thread Robert Kern
t pylint is entirely configurable. If you don't want to be bothered with warnings about map() which you are going to ignore, a simple modification to the pylint configuration file will prevent it from doing that check. -- Robert Kern "I have come to believe that the who

Re: Set operations in Numeric

2006-10-23 Thread Robert Kern
used them though and browsing through > the docs didn't make clear if it is possible. You'll probably want to ask such questions on the numpy list: http://www.scipy.org/Mailing_Lists Robert Cimrman has implemented a number of set operations based on sorting. http://svn.sci

RE: Talks at PyCon that Teach How to Be Better Programmers

2006-10-24 Thread Robert Brewer
st reduce [len(dir(obj)) for obj in all_obj]. 2. Dynamic languages naturally more lang-maven oriented? See http://osteele.com/archives/2004/11/ides III. Programmable = 1. Config and other "declarative" modes: No "XML sit-ups" IV. Readable = Simple ===

Re: mean ans std dev of an array?

2006-10-24 Thread Robert Kern
in range(1000)) > # compute n, sum(x), and sum(x**2) with single pass through list > n,sumx,sumx2 = reduce(lambda a,b:(a[0]+b[0],a[1]+b[1],a[2]+b[2]), ((1,x,x*x) > for x in lst) ) > sd = sqrt( (sumx2 - (sumx*sumx/n))/(n-1) ) Don't do that. If you *must* restrict yourself to one pass, t

Re: numbers to string

2006-10-24 Thread Robert Kern
, something like the following: >>> from numpy import * >>> y = [116, 114, 121, 32, 116, 104, 105, 115] >>> a = array(y, dtype=uint8) >>> z = a.tostring() >>> z 'try this' -- Robert Kern "I have come to believe that the whole wo

Re: question about True values

2006-10-25 Thread Robert Kern
n the context of an if: statement, they mean that the truth value of the object (found using the special method .__nonzero__()) is True, not that it is equal to True. It's a bit of an abuse on the English language, but what isn't in software? -- Robert Kern "I have come to believe t

Re: question about True values

2006-10-25 Thread Robert Kern
marray import array >>>> bool(array([1,2])) > Traceback (most recent call last): > File "", line 1, in ? > RuntimeError: An array doesn't make sense as a truth value. Use any(a) > or all(a). numpy also has this behavior. Numeric yielded to the temptation to

Re: numpy numbers converted wrong

2006-10-26 Thread Robert Kern
robert wrote: > in Gnuplot (Gnuplot.utils) the input array will be converted to a Numeric > float array as shown below. When I insert a numpy array into Gnuplot like > that below, numbers 7.44 are cast to 7.0 > Why is this and what should I do ? Is this bug in numpy or in Numeric?

Re: Truth value of iterators [was: question about True values)

2006-10-26 Thread Robert Kern
ing) an iterator object to grow a > 'len' method is the simplest way. And indeed, they are already allowed to do so. Python 2.4.1 (#2, Mar 31 2005, 00:05:10) Type "copyright", "credits" or "license" for more information. In [1]: len(iter(())) Out[1]: 0 In [

Re: NumPy 1.0 release

2006-10-26 Thread Robert Kern
rceforge and gmane are just horrible to use. Sorry, I don't think that Google Groups does mirroring like GMane does. While we will be migrating the numpy-discussion list away from Sourceforge, it will be to the scipy.org server, not Google Groups. -- Robert Kern "I have come to belie

Re: NumPy 1.0 release

2006-10-26 Thread Robert Kern
Robert Kern wrote: > George Sakkis wrote: >> By the way, it would be great if numpy's mailing list was mirrored to a >> google group; sourceforge and gmane are just horrible to use. > > Sorry, I don't think that Google Groups does mirroring like GM

Re: latest numpy & scipy - incompatible ?

2006-10-28 Thread Robert Kern
robert wrote: > I'm using latest numpy & scipy. What is this problem ? : > >>>> import scipy.stats > RuntimeError: module compiled against version 102 of C-API but this > version of numpy is 109 The scipy binary available on sourceforge has not been re

Re: Integrating Python with Fortran

2006-10-31 Thread Robert Kern
e fairly standard ways. http://elmer.sourceforge.net/ -- 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: Computing FFT with Python NumPy 1.0

2006-11-01 Thread Robert Kern
, -1.15270364e+00-0.41954982j, -3.37938524e+00-2.83564091j, 5.e-01+0.8660254j , 3.2062e-02+0.18198512j, 3.2062e-02-0.18198512j, 5.e-01-0.8660254j , -3.37938524e+00+2.83564091j, -1.15270364e+00+0.41954982j]) -- Robert Kern "

Re: Python in sci/tech applications

2006-11-02 Thread Robert Kern
quot;Enthought Edition" Python distribution. http://code.enthought.com/enthon/ -- 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: Python in sci/tech applications

2006-11-02 Thread Robert Kern
[EMAIL PROTECTED] wrote: > Robert Kern: >> We distribute mingw set up to do this with our "Enthought >> Edition" Python distribution. >> http://code.enthought.com/enthon/ > > Sorry, maybe I'm blind but I don't see MinGW listed in that page... >

Re: problem with svd in numpy

2006-11-02 Thread Robert Kern
se, it looks as if numpy_u == -matlab_u. How do numpy_vt and matlab_vt compare? Do they also have flipped signs? If so, then there is no problem. (u, vt) can be replaced with (-u, -vt). The SVD is not unique. Which one you get depends on the precise operations of the implementation. -- Robert

Re: Python in sci/tech applications

2006-11-02 Thread Robert Kern
Steve Holden wrote: > Robert Kern wrote: >> [EMAIL PROTECTED] wrote: >> >>> Robert Kern: >>> >>>> We distribute mingw set up to do this with our "Enthought >>>> Edition" Python distribution. >>>> http://code.enthought.c

Re: Python in sci/tech applications

2006-11-02 Thread Robert Kern
t\mingw32\bin\ to your PATH environment variable, and gcc.exe should be executable. -- 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: Javascript is turning into Python?!

2006-11-03 Thread Robert Thorpe
Paul Rubin wrote: > I hadn't seem this before. New Javascript 1.7 features: > > - Generators > - Iterators > - Array comprehensions > - Destructuring assignment > > Sounds like another language we know. > > http://developer.mozilla.org/en/docs/New_in_JavaScript_1.7 Indeed, this is a consequence o

Re: Python in sci/tech applications

2006-11-03 Thread Robert Kern
Magnus Lycka wrote: > robert wrote: >> When one follows .. >> http://docs.python.org/inst/tweak-flags.html#SECTION000622000 >> http://www.zope.org/Members/als/tips/win32_mingw_modules >> >> ..this seems only to cover the immediate python dll issues. Wh

Re: Python in sci/tech applications

2006-11-03 Thread Robert Kern
robert wrote: > In past I asked for linking Python2.5 and next Pythons on Win against such > standard DLL (MSVCRT4 or MSVCRT.DLL)- yet Martin v. Löwis somehow explained > in > http://groups.google.de/group/comp.lang.python/msg/fcbe41f9df595c35 > somehow that MSVCRT.dll is n

Re: Python in sci/tech applications

2006-11-03 Thread Robert Kern
Thomas Nelson wrote: > How hard would it be to have numpy/ scipy part of the python standard > library? scipy will never, ever be part of the standard library. Some subset of numpy may eventually make it into the standard library, but not any time soon. -- Robert Kern "I have come

Re: numpy help

2006-11-03 Thread Robert Kern
unction which only knows about floats and complex floats, it refuses the temptation to guess what you meant and raises an error. -- 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 ha

Re: building python with utf-8 default encoding?

2006-11-06 Thread Robert Kern
)) should alway be 'ascii'. Otherwise, programs written on one machine will not run on other machines. -- 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: Unicode/ascii encoding nightmare

2006-11-06 Thread Robert Kern
ou would want .decode() (which converts a byte string into a Unicode string), not .encode() (which converts a Unicode string into a byte string). You get UnicodeDecodeErrors even though you are trying to .encode() because whenever Python is expecting a Unicode string but gets a byte string, it tries t

Re: Unicode/ascii encoding nightmare

2006-11-06 Thread Robert Kern
John Machin wrote: > Indeed yourself. Have you ever considered reading posts in > chronological order, or reading all posts in a thread? That presumes that messages arrive in chronological order and transmissions are instantaneous. Neither are true. -- Robert Kern "I have come to b

Re: C wrapper

2006-11-07 Thread Robert Kern
Sheldon wrote: > This function is there and is called init_mymodule() but I have other > functions that are not static. Is the module's name "_mymodule"? Or is it "mymodule"? -- Robert Kern "I have come to believe that the whole world is an enigma, a harml

Re: Finding Nonzero Elements in a Sparse Matrix

2006-11-07 Thread Robert Kern
that object. In [1]: from scipy.sparse import lil_matrix In [2]: A = lil_matrix((3,3)) In [3]: A[1,2] = 10 In [4]: A[2,0] = -10 In [5]: Acoo = A.tocoo() In [6]: Acoo.row Out[6]: array([2, 1]) In [7]: Acoo.col Out[7]: array([0, 2]) -- Robert Kern "I have come to believe that the whol

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