danbaron
28-06-2010, 06:47
[font=courier new][size=8pt]I ran the following Python program.
On my computer, which is not very fast, it took 283.3473.. seconds, to fill a 6000 x 6000 matrix with random doubles,
and then to invert it. (When I try doing 7000 x 7000, I get a memory error.)
Python 2.6.5
NumPy 1.4.1
http://www.python.org/download/
You have to install "numpy", separately. It is not included in the Python distribution.
And, you have to use Python 2.6.x, for numpy to work.
http://numpy.scipy.org/
import time
import numpy
t = time.clock()
a = numpy.random.rand(6000, 6000)
a = numpy.linalg.inv(a)
t = time.clock() - t
print t
raw_input()
# Output = 283.3473.. (seconds)
[font=courier new][size=8pt]NumPy, in Python corresponds to, PDL, in Perl.
Look at the link below, to see the results of a similar program, written in Perl.
According to this test, NumPy, is amazingly fast, compared to, PDL.
(I'm sure we all agree, that, NumPy, is a great champion!)
:oops: :x :grrrr:
Dan
http://community.thinbasic.com/index.php?topic=3488.msg25792#msg25792
On my computer, which is not very fast, it took 283.3473.. seconds, to fill a 6000 x 6000 matrix with random doubles,
and then to invert it. (When I try doing 7000 x 7000, I get a memory error.)
Python 2.6.5
NumPy 1.4.1
http://www.python.org/download/
You have to install "numpy", separately. It is not included in the Python distribution.
And, you have to use Python 2.6.x, for numpy to work.
http://numpy.scipy.org/
import time
import numpy
t = time.clock()
a = numpy.random.rand(6000, 6000)
a = numpy.linalg.inv(a)
t = time.clock() - t
print t
raw_input()
# Output = 283.3473.. (seconds)
[font=courier new][size=8pt]NumPy, in Python corresponds to, PDL, in Perl.
Look at the link below, to see the results of a similar program, written in Perl.
According to this test, NumPy, is amazingly fast, compared to, PDL.
(I'm sure we all agree, that, NumPy, is a great champion!)
:oops: :x :grrrr:
Dan
http://community.thinbasic.com/index.php?topic=3488.msg25792#msg25792