y iterate over it and yield its values. E.g.
In [2]: def test_gen(x):
...: yield x
...: x -= 1
...: if x != 0:
...: for y in test_gen(x):
...: yield y
...:
...:
In [3]: list(test_gen(3))
Out[3]: [3, 2, 1]
--
Robert Kern
"I have come to
x27;s.
I find that most of my Apache problems stem from incorrect permissions. Make
sure that the user running the Apache process has "read" and "execute"
permissions for the .so's.
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harm
want it to - any ideas?
Did you follow the recommendations given to you the last time you asked this
question? What did you try? What results do you want to get?
--
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
e on mine.
Changing the last line to "currSum += row" gets a 3x speedup. Dropping the
"row[:] = 1" line as it's a really just a time-consuming no-op in the example
and probably not an accurate reflection of what's going on in the real code gets
you another 2x spe
y questions on the numpy list:
http://www.scipy.org/Mailing_Lists
Use numpy.set_printoptions(threshold=sys.maxint) to disable all summarization.
--
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
Grant Edwards wrote:
> On 2006-12-01, Robert Kern <[EMAIL PROTECTED]> wrote:
>> Grant Edwards wrote:
>>> How do you print a numpy array?
>
>> You might want to ask numpy questions on the numpy list:
>>
>> http://www.scipy.org/Mailing_Lists
>
nce the interactive prompt prints things out
without the user explicitly asking for it, it's not enough simply to have two
functions available.
numarray set the default to summarize, and numpy kept numarray's choice.
--
Robert Kern
"I have come to believe that the whole world is an
Grant Edwards wrote:
> On 2006-12-02, Robert Kern <[EMAIL PROTECTED]> wrote:
>> Grant Edwards wrote:
>>> On 2006-12-01, Robert Kern <[EMAIL PROTECTED]> wrote:
>>>> Grant Edwards wrote:
>>>>> How do you print a numpy array?
>
ing
> to go to defend this omission. It promises to be entertaining.
I'm not sure that anybody is going to defend it as a deliberate omission.
Rather, they (like I) will encourage to OP to submit a patch that fixes the
problem.
--
Robert Kern
"I have come to believe that the w
on than posting a patch. They listen to patch submissions
much more than comp.lang.python. At the very least, you should submit a bug
report even if you don't want to take the opportunity to learn how to fix it
yourself.
--
Robert Kern
"I have come to believe that the whole world is an
#x27;s website:
http://www.manning.com/rappin/
If their Yahoo store is not accessible via your web reader (I have no
experience, so I won't depend on it), you can email the publisher's customer
service at [EMAIL PROTECTED] and I'm sure they will get the book to you in a
form you can re
mention it?
No one is castigating the OP for bringing up the issue. His suggestion that his
time is worth more than that of anyone else, though, is drawing some ire.
Fortunately, he seems to have backed off this position and seems amenable to
doing something more productive than posting here.
--
Robert
;ve been pointed to the productive
things you can do to resolve the issue that you have:
1. Submit a bug report.
2. Submit a patch.
Nothing is going to happen until you do one of these two things. Being more rude
(and yes, you are being incredibly rude and insulting) won't move things alo
Russ wrote:
> Robert Kern wrote:
>
>> Nothing is going to happen until you do one of these two things. Being more
>> rude
>> (and yes, you are being incredibly rude and insulting) won't move things
>> along.
>
> I re-read the thread, and I don't s
hon 2.4 from the Debian (Sid) packages.
>
> Is it a bug, or am I doing something wrong?
You're doing something wrong. PIL.Image is a module, not a class.
--
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
if anyone
construed my comments as insults. However, facts are facts, and I stated them as
I believe them. If you can pick out the precise comments that you felt were
insulting, I will be happy to attempt clarifying them in a way that you do not
find insulting.
--
Robert Kern
"I have come to be
[EMAIL PROTECTED] wrote:
> Robert Kern wrote:
>> [EMAIL PROTECTED] wrote:
>>> I saw no posts where there OP insulted anybody without being
>>> insulted first. It is ironic the Mr. Kern was the most consistent
>>> insulter while at the same time accusing the OP
g/Documentation
And please join us on numpy-discussion if you have any more questions.
http://www.scipy.org/Mailing_Lists
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as thou
[EMAIL PROTECTED] wrote:
> Will old Python releases, like 1.5.x, work with newer Numpy and Scipy?
No. numpy and scipy require 2.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 a
://sourcesup.cru.fr/projects/scientific-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
e __add__(). I'm almost certain that the implementation of
datetime.date.__add__ creates a new datetime.date object explicitly rather than
using self.__class__ to figure out what it should construct.
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigm
johnny wrote:
> What is the purpose of
> if __name__ == "__main__":
>
> If you have a module, does it get called automatically?
http://docs.python.org/lib/module-main.html
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
t
15]: from numpy import *
In [16]: a = array([[5, 2], [1, 3], [1, 2]])
In [17]: a[lexsort(keys=a.transpose()[::-1])]
Out[17]:
array([[1, 2],
[1, 3],
[5, 2]])
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by o
uot;, line 1, in ?
> NameError: name 'ones' is not defined
Use the code that Filip wrote:
from numpy import ones, arange, reshape, int32
--
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
ormance than other
> scripting languages. but I'm just surprised that matlab does a great
> job compared to python/perl, since matlab is also a interpreted
> language, I'm expecting it has silimar performance with python.
Matlab uses a JIT compiler along the lines of psyco for sim
matlab?
>
> If you want functionality similar to Matlab in Python, you should use
> Numpy, which has the "take" function to do what you want.
Actually, in numpy, we also have "fancy indexing" similar to Matlab's:
In [1]: from numpy import *
In [2]: ind = arra
most of the other free Tracs that I could scrounge
up through Google. Jason's not just being paranoid. While it may be temporary
and he will get hosting back in a few months(!), it's still down, and apparently
without warning (I'm not a party to any of this, so I'm simply
le
quote and keeps interpreting the rest of the line as a string. Since the line
ends before another, unescaped " comes along, it raises the exception that you
see.
http://docs.python.org/ref/strings.html
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmles
s escape all of the backslashes (or use raw strings to avoid
the
escaping altogether). E.g.
"C:\\Documents and Settings\\Amit\\Desktop\\glpk-4.9\\glpk-4.9\\examples\\"
or
r"C:\Documents and Settings\Amit\Desktop\glpk-4.9\gplk-4.9\examples\"
--
Robert Kern
&
MRAB wrote:
> Robert Kern wrote:
>> The last character in that string is a double quote. You don't want that.
>> What
>> you want to do is escape all of the backslashes (or use raw strings to avoid
>> the
>> escaping altogether). E.g.
>>
>>
m
However, none of us know who built your system or any specifics as to what they
installed Python for. You should ask them, instead.
--
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
e doesn't really change anything. However, if type inferencing tools like
psyco are taught about numpy arrays like they are already taught about ints,
then one could do make it avoid temporaries.
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
tha
bscribe". Follow the instructions in the email that is sent to you.
--
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
irst time.
He misunderstood you (as I nearly did, too). The way you phrased "decided that
there was no futher interest on the page for me" is somewhat ambiguous: it can
seem like it refers to the second time, not the first.
--
Robert Kern
"I have come to believe that the whole
_ wrote:
> How do you check to see if a variable is a set? I would like to use
>
> if type(var) is types.SetType:
>blah
>
> but that is not available in types module. I am using 2.4
In [1627]: type(set()) is set
Out[1627]: True
--
Robert Kern
"I have come to
jeremito wrote:
> I am writing a class that is intended to be subclassed. What is the
> proper way to indicate that a sub class must override a method?
raise NotImplementedError
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
that is ma
.python.org/lib/module-exceptions.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
ly name.
>
> Where can I get the wx package (for win32 XP)?
It's the same project (from the people at www.wxpython.org), they just renamed
the package. You already have it installed.
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
t
ase try to come up with the smallest self-contained snippet of code
that demonstrates the bug so that the rest of us can try to replicate 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 it
lasses, but not in all.
> Now apparently it's not allowed to overload a method with an empty
> statement.
> I could write a nonsense dummy statement, like "A= 3", but isn't there
> another way ?
pass
--
Robert Kern
"I have come to believe that the whole worl
ython.org distribution of Python with a bunch of packages; it knows nothing
about C#. I know little about Python for .NET beyond its README, but it does
seem to be able to embed CPython into a C# application and with some elbow
grease, that might work for you.
--
Robert Kern
"I have come to
e fits what the OP is asking for. SVG defines some non-XML
structure for some of its contents. For example:
The OP is asking for a module that would parse the "points" attribute into a
list:
[(100.0, 200.0), (100.0, 100.0)]
--
Robert Kern
"I have come to believe that the
Tim Roberts wrote:
> Robert Kern <[EMAIL PROTECTED]> wrote:
>
>> Martin v. Löwis wrote:
>>> [EMAIL PROTECTED] schrieb:
>>>> Does anyone know if there's an actual free implementation of this?
>>> For the dom module in it, xml.dom.minidom shou
Bjoern Schliessmann wrote:
> Nick Maclaren wrote:
>
>> No, don't. That is about another matter entirely,
>
> It isn't.
Actually it really is. That thread is about the difference between
str(some_float) and repr(some_float) and why str(some_tuple) uses the repr()
ist.gov/oof/oof2/source/oof2-2.0.1.tar.gz
The code is in the shlib/ subdirectory.
--
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."
--
Robert Kern wrote:
> [EMAIL PROTECTED] wrote:
>
>> So finally, my question is, is there a way to get distutils to simply
>> build a shared library on windows so that I can use ctypes with them???
>
> Not out-of-box, no. The OOF2 project has added a bdist_shlib command w
om_csv(filename, skip_header=True):
f = open(filename)
try:
reader = csv.reader(f)
floats = []
if skip_header:
reader.next()
for row in reader:
floats.append(map(float, row))
finally:
f.close()
return numpy.array(floats)
--
Martin v. Löwis wrote:
> Not sure it's stupid, but I wonder why you want to use ctypes. What's
> wrong with extension modules?
What's wrong with ctypes? They're both valid, useful approaches to connect to C
libraries.
--
Robert Kern
"I have come to believe that
Martin v. Löwis wrote:
> Robert Kern schrieb:
>>> Not sure it's stupid, but I wonder why you want to use ctypes. What's
>>> wrong with extension modules?
>> What's wrong with ctypes? They're both valid, useful approaches to connect
>> to C
&
th you on this bug over on the
numpy-discussion list.
--
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
Sébastien Boisgérault wrote:
> Robert Kern wrote:
>
>>Sébastien Boisgérault wrote:
>>
>>>By the way, I tried numpy 0.9.4 10 minutes ago and guess
>>>what ? 'eigenvalue' is broken too ... (hangs forever)
>>
>>On what platform?
>
>
se)
>
> If you want to use the phrase as a cryptography key, use 6 or so words
> instead of 2 words.
Indeed. I like to generate {64,128}-bit-strong passphrases using the RFC1751
module provided with pycrypto.
--
Robert Kern
[EMAIL PROTECTED]
"In the fields of hell where the grass
James Stroud wrote:
> I can't find "≤, ≥, or ≠" on my keyboard.
Get a better keyboard? or OS?
On OS X,
≤ is Alt-,
≥ is Alt-.
≠ is Alt-=
Fewer keystrokes than <= or >= or !=.
--
Robert Kern
[EMAIL PROTECTED]
"In the fields of hell where the grass grows high
Are
Rocco Moretti wrote:
[James Stroud wrote:]
>>>>I can't find "?, ?, or ?" on my keyboard.
>
> Posting code to newsgroups might get harder too. :-)
His post made it through fine. Your newsreader messed it up.
--
Robert Kern
[EMAIL PROTECTED]
"In the fie
t permitted by
applicable law.
Last login: Mon Jan 9 12:40:28 2006 from 192.168.1.141
[~]$ cat > utf-8.txt
x + y ≥ z
[~]$ cat utf-8.txt
x + y ≥ z
Luck isn't involved.
--
Robert Kern
[EMAIL PROTECTED]
"In the fields of hell where the grass grows high
Are the graves of
James Stroud wrote:
> Robert Kern wrote:
>
>>James Stroud wrote:
>>
>>>I can't find "≤, ≥, or ≠" on my keyboard.
>>
>>Get a better keyboard? or OS?
>
> Please talk to my boss. Tell him I want a Quad G5 with about 2 Giga ram.
> I&
, Pythonic way. ;-)
It doesn't exist, yet. Python 3000 isn't even in planning stages, yet. There are
just some loose ideas floating around about what will (and won't!) be in it.
You can't write Python 3000 compliant code right now because there is nothing to
comply with.
--
rbt wrote:
> Hmmm... when I copy the file to a different drive, it takes up
> 409,600,000 bytes. Also, an md5 checksum on the generated file and on
> copies placed on other drives are the same. It looks like a regular, big
> file... I don't get it.
google("sparse fi
lly cool but has some neg. points:
> - documentation is not really detailed and there are really few
> examples
> - not supported anymore (at least i've never found any place supporting
> it.. if anyone know bout any support tell me!!)
http://code.enthought.com/chaco/
You're pr
name, so that newer
> libraries weren't blown away by older ones.
>
> What is the Python solution? Enquiring minds want to know.
http://peak.telecommunity.com/DevCenter/PythonEggs
http://peak.telecommunity.com/DevCenter/PkgResources
--
Robert Kern
[EMAIL PROTECTED]
"In the
RayS wrote:
> Whatever happened to the astropy list?
http://www.scipy.net/mailman/listinfo/astropy
--
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
l need to know
things like your platform, your compiler, and the actual text of the errors that
you are seeing.
http://lists.sourceforge.net/lists/listinfo/numpy-discussion
But once you have it installed:
In [29]: A
Out[29]:
array([[0, 1],
[2, 3]])
In [30]: numpy.linalg.det(A)
Out[30]: -2
een that particular error, though. I'd be
happy to help you through this on [EMAIL PROTECTED] . We
will probably need to see the output of the numpy build.
--
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
etty ancient
version of scipy using the old Numeric, and not the new numpy.
--
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
module in perl to implement graph
> theory. Is there a graph theory module in python?
http://networkx.sourceforge.net
And several others if you google a bit.
--
Robert Kern
[EMAIL PROTECTED]
"In the fields of hell where the grass grows high
Are the graves of dreams allowed to die."
df
> on page 12.
It is different. We're not really sure why. The simplex method is not an
algorithm known for its robustness.
Sorry about the confusion with dtypechar. Our releases of numpy and scipy got
out of sync.
--
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
3.4, 3.5, 3.6, 3.7, 3.8, 3.9, 4. , 4.1, 4.2, 4.3, 4.4,
4.5, 4.6, 4.7, 4.8, 4.9, 5. ])
> % meshgrid...usually to go through all possibly values of a parameter
>
> [x,y]=meshgrid(1:10,-5:.1:5)
In [28]: x,y = mgrid[1:11, -5:5.1:0.1]
--
Robert Kern
[EMAI
mclaugb wrote:
> Is Scipy the same thing as ScientificPython?
> I am confused if SciPy is just the new version. they appear to be separate
> things.
They are separate projects.
--
Robert Kern
[EMAIL PROTECTED]
"In the fields of hell where the grass grows high
Are the gr
ipy 0.4+ is ported to numpy (I recommend using an SVN checkout rather than the
tarball).
--
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
walter kehowski wrote:
> Hello,
>
> Is there for a python program to call maple?
http://sage.sourceforge.net
--
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
ction would
> be illegal. Fonts aren't subject copyright, just the hints in most
> outline fonts, which are considered computer programs.
In the interest of adding some specifics:
http://www.faqs.org/faqs/fonts-faq/part2/
--
Robert Kern
[EMAIL PROTECTED]
"In the fields of he
setup.py install --install-scripts=/usr/local/bin
Note: the sudo in that last command is only necessary if your user account does
not have write access to /usr/local/bin
--
Robert Kern
[EMAIL PROTECTED]
"In the fields of hell where the grass grows high
Are the graves of dreams a
PROTECTED] if you will give us some more
information like what arguments you gave to the setup script and the exact error
messages that you are seeing.
--
Robert Kern
[EMAIL PROTECTED]
"In the fields of hell where the grass grows high
Are the graves of dreams allowed to die.&quo
. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. ,
0. , 0. , 0. , 0. , 0. , 0. , 0. , 0.1, 0.1, 0.1, 0.1,
0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1,
...
--
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
linspace(start, stop, num=50, endpoint=True, retstep=False)
Docstring:
Return evenly spaced numbers.
Return 'num' evenly spaced samples from 'start' to 'stop'. If
'endpoint' is True, the last sample is 'stop'. If 'retstep'
re also accepted for
convenience and correspond to the C types that underlie the respective Python
objects.
--
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
rt(arr, mask, vals)
Docstring:
Similar to putmask arr[mask] = vals but the 1D array vals has the
same number of elements as the non-zero values of mask. Inverse of
extract.
--
Robert Kern
[EMAIL PROTECTED]
"In the fields of hell where the grass grows high
Are the g
"G���" wrote:
> Hi,
> is there a version of Numpy (or Numarray) available
> that is compatible to PythonCE 2.3?
I haven't heard of anyone trying. Perhaps you could try compiling the latest SVN
of numpy and tell us how it goes on [EMAIL
xceptions do *exactly* what you want in a very clean and simple way. They are a
fundamental feature of Python. Do not fear them. They are your friends.
--
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
e wordings are mine. I am not sure if this is what he
> intended].
No, it isn't. He says, "Each time the statement executes, the right-hand side
expression is evaluated once." "[T]he statement" refers to the multiple
assignment as a whole.
--
Robert Kern
[EMAIL PROTECTE
help here. This is the appropriate list:
https://mail.enthought.com/mailman/listinfo/enthought-dev
--
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
is a reason.
http://www.python.org/2.2.3/descrintro.html#__new__
--
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
not subclass from floats since it tries to
be agnostic about the kind of value you can assign a unit to.
--
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
Casey Hawthorne wrote:
> I believe you are asking for a side effect from the "==" operator.
>
> Add print statements to the __eq__ method.
The things is, he wants to make those modifications to builtin types, which he
can't do.
--
Robert Kern
[EMAIL PROTECTED]
"In
ver grow the ability to modify methods on the builtin types. We've
discussed several times before, and you can search the archives of this list if
you want more information why this is so.
--
Robert Kern
[EMAIL PROTECTED]
"In the fields of hell where the grass grows high
Are the gra
rly good advice for Python.
> Then one is prepared to change objects at will and not rely on any
> special properties of the builtin types!
If you really want to do that, go ahead. I won't stop you. I won't use your
code, either.
--
Robert Kern
[EMAIL PROTECTED]
"In the fields
kanchy kang wrote:
> Is there any improvement version for standard unittest module?
> for example, output log information as files.
Several! Some build on the framework of unittest.py: nose, OOBTest,
testosterone. Some don't: py.test, Sancho.
--
Robert Kern
[EMAIL PROTECTED]
"
n you can use
pipes.
--
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
iggybacking.]
http://sage.sourceforge.net/
--
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
)
iprint -- controls the frequency of output: 0 (no output),1,2,3
maxfun -- maximum number of function evaluations.
Returns:
x -- the minimum
--
Robert Kern
[EMAIL PROTECTED]
"In the fields of hell where the grass grows high
Are the graves of dreams allowed to die.&quo
Laszlo Zsolt Nagy wrote:
> Robert Kern wrote:
>
>>In [7]: scipy.optimize.fmin_cobyla?
>>
>>Type: function
>>Base Class:
>>String Form:
>>Namespace: Interactive
>>File:
>>/Library/Frameworks/Python.framework/Versions/2.4
ts the features you want.
In [8]: class A(object):
...: def __init__(self, x):
...: self.x = x
...: def sqrt(self):
...: return 2*self.x
...:
...:
In [9]: a = A(10)
In [10]: import numpy
In [11]: numpy.sqrt(a)
Out[11]: 20
In [12]: numpy.sqrt(10)
Out[12]:
), that someone was Travis
Oliphant. For anything else you want, that someone is probably you.
--
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
d will continue.
I expect that we will be placing tarballs on PyPI soon.
--
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
ur code
should be unicode strings, and you shouldn't try to pass around encoded regular
strings if at all possible, although pure ASCII strings generally work because
it is the default encoding.
So double-check self.sect[1] and figure out why it isn't a unicode string.
--
Robert Kern
ected (it needed changing the semantics
> of "except:"). Also, PEP 348 was rejected and is a huge, complex
> reorganization of the whole exception system.
The relevant part of PEP 348 survived as PEP 352.
http://www.python.org/peps/pep-0352.html
--
Robert Kern
[EMAIL PROTECTED]
27;)
if newer(__file__, target):
# ... parse Python headers
contents = """
#include "Python.h"
/* ... */
""" % (stuff, more_stuff)
f = open(target, 'w')
f.write(contents)
f.close()
return target
ext = Exte
Is or APIs
> that look funny. We are used to seeing sin(x) in our calculus textbooks
> and because of that we don't find Math.Sin(x) particularly elegant --
> even though Math.Sin(x) is more OOP and sin(x) clutters the global
> namespace.
>
> Now please go ahead and tell me how Python can help me become a better
> scientist. And try to steer clear of the computer science buzzwords
> that don't mean anyting to me.
1. You will probably spend less time writing and running software.
2. If you play your cards right, more people will be able to use and improve
your software.
--
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
. Are you tried
using ipython in pylab mode?
--
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
Michael Tobis wrote:
>> $ rm `find . -name "*.pyc"`
>
> Ouch. Is that a true story?
Yup. Fortunately, it was a small, purely personal project, so it was no huge
loss. It was enough for me to start using CVS on my small, purely personal
projects, though!
--
Robert Kern
1201 - 1300 of 2667 matches
Mail list logo