hi,
i cannot find sum() built in fuction in 2.3 version.
i built from sources python from python.org.
it gives NameError.
please tell me where can i find Python Imaging Library libxml2 for python2.3
all the rpms/sources work for python 2.2 1 1703
mir nazim wrote: i cannot find sum() built in fuction in 2.3 version.
What is the output of dir(__builtins_ _)?
please tell me where can i find Python Imaging Library libxml2 for python2.3 all the rpms/sources work for python 2.2
I'm quite sure that lbxml2 is an XML library, not an imaging
library.
Assuming that you work on a UNIX type OS:
- Where was the python2.3 executable installed?
- Did you verify that python is really linked to
python2.3 and not to python2.2? AFAIK the sum()
builtin function was introduced with python2.3.
- Is libxml2 only in the python2.2 directory or
also in the python2.3 directory?
Mit freundlichen Gruessen,
Peter Maas
--
-------------------------------------------------------------------
Peter Maas, M+R Infosysteme, D-52070 Aachen, Hubert-Wienen-Str. 24
Tel +49-241-93878-0 Fax +49-241-93878-20 eMail pe********@mplu sr.de
------------------------------------------------------------------- This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Ben |
last post by:
Hi all,
I'm trying to figure out how how complex map, filter and reduce work
based on the following piece of code from
http://www-106.ibm.com/developerworks/linux/library/l-prog.html :
bigmuls = lambda xs,ys: filter(lambda (x,y):x*y > 25, combine(xs,ys))
combine = lambda xs,ys: map(None, xs*len(ys), dupelms(ys,len(xs)))
dupelms = lambda lst,n: reduce(lambda s,t:s+t, map(lambda l,n=n:
*n, lst))
|
by: simon place |
last post by:
while playing about with inheriting from list to be able to cache macro
properties i noticed this, the rate of summing a list seems to be over linear?
its nearly 3 times faster to sum the sums of smaller lists?
from time import clock
l=range(0,1000000)
|
by: Paddy |
last post by:
I was browsing the Voidspace blog item on "Flattening Lists", and
followed up on the use of sum to do the flattening.
A solution was:
I would not have thought of using sum in this way. When I did help(sum)
the docstring was very number-centric: It went further, and precluded
its use on strings:
|
by: Michael Press |
last post by:
I have not written python codes nor run any. I saw this
code posted and decided to try it. It fails. I read the
tutorial and the entry for the built in function sum,
but still do not see the problem. The code was cut and
paste. Please help. Thanks.
_________________________BEGIN_CODE_________________________
#!/usr/bin/python
ps =
|
by: Erik Max Francis |
last post by:
For a file hashing system (finding similar files, rather than identical
ones), I need to be able to efficiently and quickly sum the ordinals of
the bytes of a file and their squares. Because of the nature of the
application, it's a requirement that I do it in Python, or only with
standard library modules (if such facilities exist) that might assist.
So far the fastest way I've found is using the `sum` builtin and
generators::
...
| |
by: =?ISO-8859-1?Q?Szabolcs_Horv=E1t?= |
last post by:
I did the following calculation: Generated a list of a million random
numbers between 0 and 1, constructed a new list by subtracting the mean
value from each number, and then calculated the mean again.
The result should be 0, but of course it will differ from 0 slightly
because of rounding errors.
However, I noticed that the simple Python program below gives a result
of ~ 10^-14, while an equivalent Mathematica program (also using...
|
by: Marc Oldenhof |
last post by:
Hello all,
I'm pretty new to Python, but use it a lot lately. I'm getting a crazy
error trying to do operations on a string list after importing numpy.
Minimal example:
Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) on win32
Type "help", "copyright", "credits" or "license" for more information.
|
by: bearophileHUGS |
last post by:
Empty Python lists don't know the type of the items it will
contain, so this sounds strange:
0
Because that may be an empty sequence of someobject:
0
In a statically typed language in that situation you may answer the
|
by: cnb |
last post by:
This must be because of implementation right? Shouldn't reduce be
faster since it iterates once over the list?
doesnt sum first construct the list then sum it?
-----------------------
reduce with named function: 37.9864357062
reduce with nested, named function: 39.4710288598
reduce with lambda: 39.2463927678
sum comprehension: 25.9530121845
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |