[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] PyOpenGL



On 8/9/06, Bob Ippolito <bob@xxxxxxxxxx> wrote:
Eh? What does scipy or numarray have to do with it? Totally different
packages. Especially scipy.

They all provide facilities for array manipulation.

import Numeric
import numarray
import scipy
n = 1500
a_numeric = Numeric.arange(1., n)
a_numarray = numarray.arange(1., n)
a_scipy = scipy.arange(1., n)

I think the confusion results from people using the word 'numpy'  to
refer to the Numeric package, and he numarray package. I actually
cannot find a package which lets me 'import numpy'...

[...5 minutes later with google...]

It seems array stuff has been moved out of scipy core, and into a
numpy package.
From http://numeric.scipy.org/ :

For about 6 months, the new package was called SciPy Core (not to be
confused with the full SciPy package which remains a separate
package), and so you will occasionally see references to SciPy Core
floating around.    It was decided in January 2006 to go with the
historical name of NumPy for the new package.  Realize that NumPy
(module name numpy) is the new name.   Do not be confused by
references to scipy_core. These should all be replaced by numpy.
Also, because of the name-change, there were a lot of dicussions that
took place on scipy-dev@xxxxxxxxx and scipy-user@xxxxxxxxxx



On a different node, I've attached CSV file with results from this
benchmark program, with a third test for scipy.

http://arbutus.mcmaster.ca/dmc/numpy/numcomp.py

Interestingly numarray consistently beats numeric and scipy with
arrays of length greater than 1500. With arrays smaller than 1500,
SciPy and Numeric are often on par with each other.

-Sw.
"Array Size",Numeric,Numarray,Scipy,Fastest
1,1.62123919964e-06,4.67061282635e-06,1.61885501385e-06,Scipy
2,1.64984942913e-06,6.57080890179e-06,1.61170245647e-06,Scipy
3,1.66892291546e-06,5.64097644329e-06,1.65938617229e-06,Scipy
4,1.65938617229e-06,5.55037738323e-06,1.63792850018e-06,Scipy
5,1.67130710125e-06,5.5599141264e-06,3.29970599651e-06,Numeric
6,1.68084384441e-06,5.63143970013e-06,1.68084384441e-06,Numeric
7,1.70945407391e-06,5.59090854168e-06,1.68084384441e-06,Scipy
8,1.69038058758e-06,5.63143970013e-06,1.68084384441e-06,Scipy
9,1.72137500286e-06,6.04867221355e-06,1.69991733074e-06,Scipy
10,1.90972568035e-06,5.72919131756e-06,1.90972568035e-06,Numeric
20,1.85012103558e-06,5.81979037762e-06,1.85965777874e-06,Numeric
30,2.04085589886e-06,5.86032153606e-06,6.92843677044e-06,Numeric
40,2.12907077312e-06,6.11066104412e-06,2.12907077312e-06,Numeric
50,2.17913867474e-06,6.02006198406e-06,2.15052844524e-06,Scipy
60,2.29119540691e-06,6.089203372e-06,2.31026889324e-06,Numeric
70,2.39133121014e-06,6.17980243206e-06,2.37941028118e-06,Scipy
80,2.64167071819e-06,6.21079684734e-06,2.61067630291e-06,Scipy
90,2.52007724285e-06,6.18933917522e-06,3.05175067425e-06,Numeric
100,2.6917386198e-06,6.33954288006e-06,2.69889117718e-06,Numeric
110,2.73942233562e-06,6.33954288006e-06,2.73942233562e-06,Numeric
120,2.83002139568e-06,6.48020984173e-06,2.83002139568e-06,Numeric
130,2.87055255413e-06,6.38961078167e-06,2.87055255413e-06,Numeric
140,2.93015719891e-06,6.45159961224e-06,2.87055255413e-06,Scipy
150,2.97068835735e-06,8.46146823406e-06,3.02075625896e-06,Numeric
160,3.08036090374e-06,6.65187121868e-06,3.03982974529e-06,Scipy
170,3.0898976469e-06,6.49928332806e-06,3.08036090374e-06,Scipy
180,3.3020901823e-06,6.83068515301e-06,3.28063251019e-06,Scipy
190,3.3307004118e-06,6.6995549345e-06,3.3307004118e-06,Numeric
200,3.32831622601e-06,7.67945529461e-06,3.30924273968e-06,Scipy
210,3.43083621502e-06,6.82114840984e-06,3.58103991985e-06,Numeric
220,3.46898318768e-06,6.8592953825e-06,3.44990970135e-06,Scipy
230,4.68968631268e-06,6.89028979778e-06,3.57865573406e-06,Scipy
240,3.65971805096e-06,6.84975863934e-06,3.71932269573e-06,Numeric
250,3.74078036785e-06,7.56978274822e-06,3.73839618206e-06,Scipy
260,3.82899524212e-06,6.95943118572e-06,3.82184268475e-06,Scipy
270,3.85045291424e-06,6.97135211468e-06,4.06979800701e-06,Numeric
280,3.96012546062e-06,7.18831302166e-06,3.9410519743e-06,Scipy
290,4.0197301054e-06,7.12155581951e-06,4.0197301054e-06,Numeric
300,4.95909930706e-06,7.25983859539e-06,4.10079242229e-06,Scipy
310,4.15801288128e-06,7.16923953533e-06,4.19139148235e-06,Numeric
320,4.24861194134e-06,7.94886828899e-06,4.27006961346e-06,Numeric
330,4.27006961346e-06,7.41957904339e-06,4.32967425823e-06,Numeric
340,4.42027331829e-06,8.25165988445e-06,4.32967425823e-06,Scipy
350,4.49179889202e-06,7.3909688139e-06,4.47987796307e-06,Scipy
360,4.60862399578e-06,7.64846087933e-06,4.58955050945e-06,Scipy
370,4.62054492474e-06,7.51017810345e-06,4.59908725262e-06,Scipy
380,4.65869189739e-06,7.47918368816e-06,5.1617550993e-06,Numeric
390,4.88995791912e-06,7.59124042034e-06,4.7898221159e-06,Scipy
400,4.87088443279e-06,7.59124042034e-06,5.74826480389e-06,Numeric
410,4.91141559124e-06,7.61031390667e-06,4.91141559124e-06,Numeric
420,4.99009372234e-06,7.74144412518e-06,5.53845645428e-06,Numeric
430,5.03062488079e-06,7.74859668255e-06,5.01870395184e-06,Scipy
440,5.24996997356e-06,7.76767016888e-06,5.23089648724e-06,Scipy
450,5.25950671673e-06,7.83919574261e-06,5.22851230145e-06,Scipy
460,5.24996997356e-06,8.31126452923e-06,5.22851230145e-06,Scipy
470,5.38825274944e-06,7.95125247478e-06,5.37871600628e-06,Scipy
480,5.46216250896e-06,8.80955935955e-06,5.52891971111e-06,Numeric
490,5.50030948162e-06,7.94886828899e-06,5.4788518095e-06,Scipy
500,5.60044528484e-06,8.62120868206e-06,5.76018573284e-06,Numeric
600,6.27993823528e-06,8.42093707561e-06,6.27040149212e-06,Scipy
700,7.65799762249e-06,8.80002261639e-06,7.17162372112e-06,Scipy
800,7.82012225628e-06,1.20997357512e-05,7.71998645306e-06,Scipy
900,8.52107287884e-06,9.80138064861e-06,8.62836123943e-06,Numeric
1000,9.26017047405e-06,1.02281499052e-05,9.22917605877e-06,Scipy
1100,1.06406140471e-05,1.11007619047e-05,9.98019458294e-06,Scipy
1200,1.08599591398e-05,1.11102986479e-05,1.07717442656e-05,Scipy
1300,1.14679265165e-05,1.26099515104e-05,1.15394520903e-05,Numeric
1400,1.22809338713e-05,1.20592045927e-05,1.21402669096e-05,Numarray
1500,1.29604268217e-05,1.33991170073e-05,1.29699635649e-05,Numeric
1600,1.46889615202e-05,1.30891728544e-05,1.36399197721e-05,Numarray
1700,1.8661015048e-05,1.3561241641e-05,1.44195485258e-05,Numarray
1800,1.52993130827e-05,1.42908024931e-05,1.62601399565e-05,Numarray
1900,1.605986835e-05,1.58405232573e-05,1.61099362516e-05,Numarray
2000,1.70111584806e-05,1.5649788394e-05,1.68895650053e-05,Numarray
2100,1.78193974638e-05,1.55901837492e-05,1.90901684904e-05,Numarray
2200,1.89208912992e-05,2.12001729155e-05,1.8558495059e-05,Scipy
2300,2.03585553312e-05,1.66296887541e-05,2.02298092985e-05,Numarray
2400,2.03990864897e-05,1.93095135832e-05,2.03800130033e-05,Numarray
2500,2.20394063139e-05,1.77311825895e-05,2.1479122653e-05,Numarray
2600,2.52604413176e-05,1.83296132231e-05,2.31289792204e-05,Numarray
2700,2.28214192533e-05,1.8980495944e-05,2.37798619413e-05,Numarray
2800,2.37798619413e-05,1.98197293425e-05,2.3670189395e-05,Numarray
2900,2.50601697111e-05,2.0430080905e-05,2.46906209135e-05,Numarray
3000,2.53605771208e-05,2.04110074186e-05,2.65502858305e-05,Numarray
3100,2.61998105192e-05,2.09808278227e-05,2.66599583769e-05,Numarray
3200,2.69913602018e-05,2.12502408171e-05,2.81000065947e-05,Numarray
3300,2.84504819059e-05,2.22182202482e-05,2.79903340483e-05,Numarray
3400,2.93612408781e-05,2.28905606413e-05,2.85005498075e-05,Numarray
3500,2.88700986052e-05,2.64501500273e-05,3.04388928556e-05,Numarray
3600,2.98595357084e-05,2.33292508268e-05,3.1609528079e-05,Numarray
3700,3.39698720121e-05,2.35605168486e-05,3.18598675871e-05,Numarray
3800,3.18407941008e-05,6.6919319644e-05,3.15785336637e-05,Scipy
3900,3.25298237944e-05,2.63309407377e-05,3.33595204496e-05,Numarray
4000,3.2989971652e-05,2.56609845304e-05,3.29685139799e-05,Numarray
4100,3.47208905363e-05,2.76589322233e-05,3.38888096952e-05,Numarray
4200,3.55100560331e-05,2.76207852507e-05,3.5021297946e-05,Numarray
4300,3.51190495634e-05,2.68697667265e-05,3.69310307646e-05,Numarray
4400,3.6869041934e-05,2.81715321684e-05,3.76295972013e-05,Numarray
4500,4.01496815825e-05,2.84099507475e-05,3.84998250151e-05,Numarray
4600,3.85999608183e-05,2.88319516325e-05,3.88812947416e-05,Numarray
4700,4.24289631987e-05,2.88295674467e-05,3.90791821623e-05,Numarray
4800,3.97109913969e-05,2.93421673918e-05,4.02402806425e-05,Numarray
4900,4.23502850676e-05,3.05104184294e-05,4.05216145658e-05,Numarray
5000,4.16302609587e-05,3.12685895109e-05,4.2390816226e-05,Numarray
6000,4.98008656645e-05,3.46517491484e-05,5.34081387663e-05,Numarray
7000,5.72395253325e-05,4.88209653044e-05,5.87296414518e-05,Numarray
8000,6.79492879057e-05,4.40001416349e-05,6.74199986601e-05,Numarray
9000,7.42292332792e-05,4.87399029875e-05,7.46703076506e-05,Numarray
10000,8.21685719633e-05,5.36799359465e-05,8.39090275908e-05,Numarray
10000,8.30101895475e-05,5.36489415312e-05,8.44907689238e-05,Numarray
20000,0.000262827866092,0.000199789993777,0.00022965192081,Numarray
30000,0.000301599495425,0.000230209820285,0.000299770824924,Numarray
40000,0.000401971333041,0.000295917980685,0.000400660030856,Numarray
50000,0.000495829575076,0.000374569885745,0.000500228397861,Numarray
60000,0.000599949352756,0.000460059635653,0.000592000477328,Numarray
70000,0.00070568084003,0.000525410168185,0.000743379585757,Numarray
80000,0.000812561504855,0.00132990836383,0.000803968899264,Scipy
90000,0.000932059280887,0.00083769797565,0.000924048416629,Numarray
100000,0.00107614993335,0.000878558151736,0.00105227946521,Numarray
200000,0.0030570197034,0.00288995980503,0.00260959862949,Scipy
300000,0.00491684197666,0.00495927094699,0.00489821194889,Scipy
400000,0.00748839139225,0.00756264924289,0.00748640059711,Scipy
500000,0.0102197813916,0.010348548882,0.0102205991674,Numeric
600000,0.0128804397512,0.0129480409551,0.0128908491063,Numeric
700000,0.0155293512273,0.0155201697278,0.0155446600843,Numarray
800000,0.0182230901647,0.0183111095357,0.0182252788472,Numeric
900000,0.0206525683332,0.0206726717878,0.020611219399,Scipy
1000000,0.0233515000272,0.0233360004354,0.0234895300794,Numarray