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
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
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
>>>
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
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
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
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
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
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
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
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
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
ne 15, in
> [N,x]=pylab.hist(eig, 10) # make a histogram
> ValueError: too many values to unpack
>
> Can anyone help me out with this??
pylab.hist() does not return two values, it returns three. Sorry I didn't catch
that earlier.
--
Robert Kern
"I have come to believe
;> 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 "
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
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
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
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
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
py.org/svn/scipy/trunk/Lib/sandbox/arraysetops/arraysetops.py
--
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
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
, 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
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
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
s, somewhat. You can forestall that by casting to Python floats or ints
if that is causing problems for you.
> should one better stay away from numpy in current stage of numpy development?
> I remember, with numarray there were no such problems.
Not really, no.
--
Robert Kern
"I hav
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 [
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
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
compiled for numpy
1.0.
All you need to do is recompile, though, and everything will work.
--
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
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
, -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
"
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
[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...
>
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
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
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."
-
ill
written for MSVCRT.dll and Microsoft changed some of the internal details that
they rely upon. For many (most?) extensions, this won't matter, either. C++
extensions using iostreams have a problem, IIRC. Unfortunately, neither
approach
works for all extensions. It may even be the ca
applications. It simply hasn't received enough attention recently to move to a
different runtime. If you would like to volunteer your time to do the necessary
work to allow it to link to modern runtimes, please do so. You will receive the
undying thanks of many, many Pythoneers.
--
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
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
)) 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
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
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
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
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
s
We will need some more information from you when you come to the numpy list.
Please reduce your problematic code to the smallest, self-contained script that
demonstrates the problem, and post it and the exact output that you get.
--
Robert Kern
"I have come to believe that the whole worl
nately, my Google-fu has not located an actual paper. It might be in here
somewhere:
http://homepages.cwi.nl/~steven/abc/publications.html
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret i
single call to .split() if you preprocess the string first:
a.replace(',', ' ').split()
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlyi
gt; I'm guessing that the slow part is the fact that I am converting the
> data to character format and writing it one character at a time. What
> is a better way of doing this, or where should I look to find a better way?
data.tostring()
--
Robert Kern
"I have come
[EMAIL PROTECTED] wrote:
> P.S. I felt I just had to tie this into the thread on profanity somehow.
> But notice that I didn't mention nazis or Hitler. ;-)
You did it just now!
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
that
numpy and scipy through and
through, but most of them don't hang out on comp.lang.python.
http://www.scipy.org/Mailing_Lists
scipy.optimize.leastsq() can be told to return the covariance matrix of the
estimated parameters (m and o in your example; I have no idea what you think
r-coeff is
Robert Kern wrote:
> robert wrote:
>> Is there a ready made function in numpy/scipy to compute the correlation
>> y=mx+o of an X and Y fast:
>> m, m-err, o, o-err, r-coef,r-coef-err ?
> scipy.optimize.leastsq() can be told to return the covariance matrix of the
> es
s.
The difference between the two models is that the first places no restrictions
on the distribution of x. The second does; both the x and y marginal
distributions need to be normal. Under the first model, the correlation
coefficient has no meaning.
--
Robert Kern
"I have come to believe that
it's not possible
> to treat a for-loop as an expression (which is what a list
> comprehension requires).
As with all such things, you stick the implementation in a well-named function
and simply call the function everywhere. The implementation never needs to be a
one-liner expression.
Dustan wrote:
> Robert Kern wrote:
>> Dustan wrote:
>>> Fredrik Lundh wrote:
>>>> if you care about writing robust code, why not just use a for-loop,
>>>> and the list extend method?
>>> Because I'm embedding this expression in a list compr
sturlamolden wrote:
> Robert Kern wrote:
>
>> The difference between the two models is that the first places no
>> restrictions
>> on the distribution of x. The second does; both the x and y marginal
>> distributions need to be normal. Under the first model, the cor
his was fixed in SVN.
> PPS:
>
> A compatible scipy binary (0.5.2?) for numpy 1.0 was announced some weeks
> back. Think currently many users suffer when trying to get started with
> incompatible most-recent libs of scipy and numpy.
Well, go ahead and poke the people that said they
onal preference is that having the colon is more
readable. Yours isn't. That's fine. Debating on that basis, however, is pretty
pointless.
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad att
that the colon was missing if the compiler
> didn't point it out, is it really that readable? For me, I tend to get
> annoyed at language "features" that I'm constantly tripping over.
Never.
--
Robert Kern
"I have come to believe that the whole world is an enigm
ility". In library code, never call the functions in the
random module. Always take as an argument a random.Random instance. When
testing, you can seed your own Random instance and all of your numbers will be
the same for every test run.
This kind of design is A Good Thing(TM) outside of unit tes
Hendrik van Rooyen wrote:
> "Robert Kern" <[EMAIL PROTECTED]> wrote:
>
>
>> Michael Hobbs wrote:
>>> True enough. Although, I have to ask how many times you define a new
>>> function only to have Python spit a syntax error out at you saying that
f double,
unsigned int, etc.
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco
--
http://mail.python.org/mailman/listinfo/python-list
Antoon Pardon wrote:
> On 2006-11-15, Robert Kern <[EMAIL PROTECTED]> wrote:
>> Dustan wrote:
>>
>>> 2. While I haven't taken a good look at NumPy, my intuition tells me it
>>> won't work with complex data types, which wouldn't work for me
nd up installing numpy
anyways.
http://numpy.scipy.org
All of the f2py documentation is currently in the source, so start here:
http://projects.scipy.org/scipy/numpy/browser/trunk/numpy/f2py/docs/README.txt
Using f2py to wrap Fortran subroutines is actually a fair bit simpler than
wrapping C c
e avoid Scilab but I'm not
> sure why. If anybody knows the reason I'd be happy to hear it.
I think you just stated it.
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret
?
scipy can use FFTW3 as its FFT routines.
http://www.scipy.org
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco
--
htt
ay() is
supposed to be called in the initialization function of the other extension
modules. That will make sure that multiarray is imported and the function
pointers are available for dereferencing.
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
t
cket. In the meantime, the .accumulate() method works
correctly; you can use the last item to get the correct result for .reduce().
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret i
A.M wrote:
> Do we have the conditional expressions in Python 2.4?
No.
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto
http://svn.scipy.org/svn/scipy/trunk/Lib/sandbox/montecarlo/
Ask on one of the scipy mailing lists if you need help building it.
http://www.scipy.org/Mailing_Lists
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our ow
map method.
There is documentation on map() about halfway down this page:
http://docs.python.org/lib/built-in-funcs.html
Here's a tutorial which you should read:
http://docs.python.org/tut/tut.html
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harm
7;t it return the one with the highest index?
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco
--
http://mail.python.org/mailman/listinfo/python-list
Fuzzyman wrote:
> Erik Max Francis wrote:
>>Here were the "harsh" and "whining" responses to his question he's
>>complaining about:
>
> Fair enough. Maybe they weren't "harsh" and "whining", just patronising
> and abru
t do matrices, and numarray is deprecated. Please point
new users to numpy, instead.
http://numeric.scipy.org/
Since the OP seems to already be using one of Numeric/numarray/numpy, (given
"a.shape"), I would suggest that he ask the question on the appropriate mailing
list:
https://lists.s
ing with scipy, and the
exact code that causes the crash.
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco
--
http://mail.p
ss.html
It also works in Pythons as old as 2.2, but you'll have to install it
separately. The website for the separate release is down at the moment, but when
it comes back up:
http://www.lysator.liu.se/~astrand/popen5/
--
Robert Kern
"I have come to believe that the whole world is
ess
call(['something', 'or', 'other'])
You need to learn how imports work in Python. Please read the tutorial:
http://docs.python.org/tut/tut.html
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terri
here:
http://www.scipy.org/History_of_SciPy
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco
--
http://mail.python.org/mailman/listinfo/python-list
>is :-(
>
> Not at all! A python list *knows* its length at all times. len() is a
> constant time lookup of an internal attribute.
The point is that you had to create the list in the first place. g is an
iterator.
--
Robert Kern
"I have come to believe that the whole world is
to be
a bug that sounds like this, but it was fixed some time ago. Also, please try to
narrow your program down to the smallest piece of code that runs and still
displays the memory leak.
Thank you.
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
t
are best handled on numpy-discussion
rather than comp.lang.python .
https://lists.sourceforge.net/lists/listinfo/numpy-discussion
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it
the ssh feature like
> one does on the command line
>
> ssh [EMAIL PROTECTED] .etc
>
> How can I do this easily ?
http://www.python.org/doc/current/lib/module-subprocess.html
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless e
09, 0.91966, -0.13550388182991072, 0),
(0.874239991, 0.7001, -0.2123048713754, 0)])
>>>
Please copy-and-paste the exact code that you wrote and the exact output.
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigm
t;[1, 2, 3, 3]
>>>
>>>set([1, 2, 3])
>>
>>Pylab shadows the built-in set name, which is one of the reasons you
>>should generally use "import XXX" instead of "from XXX import *".
>
> Ahh. Understood. Thank you very much.
It should be n
ill usable, but aren't
being actively developed. There's a pure-Python array package somewhere, but I
forget the name.
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though
use arrays as
truth values since the desired meaning (alltrue or sometrue) is ambiguous.
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco
--
http://mail.python.org/mailman/listinfo/python-list
flat = arange(10)
In [11]: a
Out[11]:
array([[0, 1, 2],
[3, 4, 5]])
In [12]: for i in a.flat:
: print i
:
:
0
1
2
3
4
5
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by ou
6, 0],
[0, 9,10, 828202281, 0],
[7, 0, 0, 0, 0],
[0, 0, 0, 0, 0]])
If you have more complicated needs, we can talk about them on numpy-discussion.
regular byte string, not a Unicode string. The encoding declaration only
controls how the file is parsed. The string literal that you use for FIELDS is
a
regular string literal, not a Unicode string literal, so the object it creates
is an 8-bit byte string. The tuple containment test is attemptin
Mike Currie wrote:
> Can anyone explain why I'm getting an ascii encoding error when I'm trying
> to write out using a UTF-8 encoder?
Please read the Python Unicode HOWTO.
http://www.amk.ca/python/howto/unicode
--
Robert Kern
"I have come to believe that the whole
atter the size.
http://www.scipy.org/NumPy
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco
--
http://mail.python.org/mailman/listinfo/python-list
writing.
class Foo(object):
def __init__(self, bar):
self._bar = bar
@property
def bar(self):
return self._bar
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to
Threads/index.shtml
A good event-driven framework for Python is Twisted. It's what I use for the
program I mention above.
http://twistedmatrix.com/trac/
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own m
nts of x can be destroyed.
Notes:
y == rfft(irfft(y)) within numerical accuracy.
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth.&quo
Fächer") and a unicode string later (u"Fächer"). But set objects
can't know that that's the problem or even if it *is* a problem.
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco
--
http://mail.python.org/mailman/listinfo/python-list
Dennis Benzinger wrote:
> Robert Kern wrote:
>> Dennis Benzinger wrote:
>>> Ok, I understand.
>>> But isn't it a (minor) problem that using a set like this:
>>>
>>> # -*- coding: UTF-8 -*-
>>>
>>> FIELDS_SET = set(("Fächer&
..,"zzz"]
> blist = ""
> for x in alist:
>blist += x
>
> But is there a cleaner and faster way of doing this?
blist = ''.join(alist)
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terri
David Isaac wrote:
> To access the doc string of a property,
> I have to use the class not an instance.
> Why?
Because getting the attribute from the instance gets the calculated value (the
value returned from the getter function), not the actual property object.
--
Robert Kern
&qu
...:
...:
In [3]: set(d.values())
---
exceptions.TypeError Traceback (most recent
call
last)
/Users/kern/
TypeError: list objects are unhashable
Also, I may need keys to map to different objects that happen to be equal.
--
Robert Kern
"I have come to believe that the w
org/NumPy
> my goal is to somehow define multi-dimensional arrays of strengs...
>>> from numpy import *
>>> a = array([['some', 'strings'],['in an', 'array']], dtype=object)
>>> a
array([[some, strings],
[in an, arr
1001 - 1100 of 2667 matches
Mail list logo