Re: [Numpy-discussion] Can't assign sequence to PyObject array
![](https://secure.gravatar.com/avatar/72656d7c9d5a8a9e1587c1a8ce7fa3b5.jpg?s=120&d=mm&r=g)
Actually your example works for me too. Looks like only it only works for 1D arrays,
a1 = array([range(5), range(5)]).astype('O') a1 array([[0 , 1 , 2 , 3 , 4 ], [0 , 1 , 2 , 3 , 4 ]],'O') a2 = arange(6) a2 array([0, 1, 2, 3, 4, 5]) a1[1,1] = a2 Traceback (most recent call last): File "<stdin>", line 1, in ? ValueError: array too large for destination a1 = arange(5).astype('O') a1[1] = a2 a1 array([0 , [0 1 2 3 4 5] , 2 , 3 , 4 ],'O')
Hmm. This looks like a bug then. I'll submit a bug report. Cheers, Stuart On Thu, 19 Apr 2001, Pete Shinners wrote:
shoot, sorry then, i just tested it and it seemed happy, let me try again here...
a1 = arange(5).astype('O') a2 = arange(5,9) a1 array([0 , 1 , 2 , 3 , 4 ],'O') a2 array([5, 6, 7, 8])
![](https://secure.gravatar.com/avatar/9567eaa720c05c4f4a2dbf7d831f1ef8.jpg?s=120&d=mm&r=g)
Does anyone have any experience running Numpy under Linux on a Pentium 4 (P4) system? P4 boxes appear to have some attractions: a 1.7 GHz model is now available, they reputedly have a 400 MHz CPU-to-RAM bus, the Intel 850 chipset used with them supports ECC and the cost of ECC RDRAM needed has fallen to the point that 1 Gbyte of RAM is now quite affordable. It's the high CPU-to-RAM bandwidth which suggests that P4 systems might offer a gain in performance when used with Numpy to manipulate large arrays which is disproprtionate to their higher clock speeds, compared to Pentium 3 systems, which are limited to a 133 MHz CPU-to-RAM bus. Is this born out in practice? Ideally we would like an Alpha box, but they just cost too much from Compaq and I don't think Microway or other alternative Alpha box manufacturers are represented here in Australia. Our problem domain involves a mix of manipulating very large integer arrays and then floating point calculations on smaller arrays, so FP speed is probably not of paramount importance, but memory bandwidth and clock speed probably is (perhaps, maybe, possibly). Tim C Sydney, Australia
![](https://secure.gravatar.com/avatar/4ed0f075372d6f3fb6eb8a50990aa1c3.jpg?s=120&d=mm&r=g)
Hi, this might not be what you asked for, but... There is a benchmark report comparing 1.7GHz P4 and 1.3 GHz Athlon on http://www.tech-report.com/reviews/2001q2/pentium4-1.7/index.x?pg=1 Mostly gaming and windows stuff, but also a scientific benchmark included (implementing the Hartree-Fock algorithm for those with knowlegde in quantum physics). The Athlon still has an egde even on the scientific benchmark. On the other hand, the stream benchmark numbers for the P4 is some of the most impressive I've seen. http://www.cs.virginia.edu/stream/ So if your application is like an old vector code you might be better off with a P4, but the memory price is insane... Regards, r. -- The Computer Center, University of Tromsø, N-9037 TROMSØ, Norway. phone:+47 77 64 41 07, fax:+47 77 64 41 00 Roy Dragseth, High Perfomance Computing System Administrator Direct call: +47 77 64 62 56. email: royd@cc.uit.no
![](https://secure.gravatar.com/avatar/9567eaa720c05c4f4a2dbf7d831f1ef8.jpg?s=120&d=mm&r=g)
Roy.Dragseth@cc.uit.no wrote:
Hi, this might not be what you asked for, but...
There is a benchmark report comparing 1.7GHz P4 and 1.3 GHz Athlon on
http://www.tech-report.com/reviews/2001q2/pentium4-1.7/index.x?pg=1
Mostly gaming and windows stuff, but also a scientific benchmark included (implementing the Hartree-Fock algorithm for those with knowlegde in quantum physics). The Athlon still has an egde even on the scientific benchmark.
On the other hand, the stream benchmark numbers for the P4 is some of the most impressive I've seen.
http://www.cs.virginia.edu/stream/
So if your application is like an old vector code you might be better off with a P4, but the memory price is insane...
Many thanks. I suspect that the stream benchmarks are quite relevant to our code. Maybe there is no cause for Alpha-envy after all... The costs of RDRAM for the P4 seems to have fallen dramatically in the last few months. And Intel just cut the cost of the P4 itself. Cheers, Tim C
![](https://secure.gravatar.com/avatar/328514e1cdb47dbc83ee934b9a62a0c1.jpg?s=120&d=mm&r=g)
Tim Churches wrote:
Our problem domain involves a mix of manipulating very large integer arrays and then floating point calculations on smaller arrays, so FP speed is probably not of paramount importance, but memory bandwidth and clock speed probably is (perhaps, maybe, possibly).
Have you checked out the PPC G4 option? Apple certainly like to advertise how fast it can be, which is ussually deceptive, but, in fact the one place iot does shine is large integer manipulations (in the Apple literature: "some photoshop applications"). I havn't done any speed comparisons, but we have found it to pretty fast when using the optimised BLAS from Absoft. Mac OS is pretty patthetic for this kind of application but PPC linux or OS-X should do the trick for you. IT might be worth a little investigating. By the way, just how much does that 400 Mhz memory cost now? -Chris -- Christopher Barker, Ph.D. ChrisHBarker@home.net --- --- --- http://members.home.net/barkerlohmann ---@@ -----@@ -----@@ ------@@@ ------@@@ ------@@@ Oil Spill Modeling ------ @ ------ @ ------ @ Water Resources Engineering ------- --------- -------- Coastal and Fluvial Hydrodynamics -------------------------------------- ------------------------------------------------------------------------
![](https://secure.gravatar.com/avatar/9567eaa720c05c4f4a2dbf7d831f1ef8.jpg?s=120&d=mm&r=g)
Chris Barker wrote:
Tim Churches wrote:
Our problem domain involves a mix of manipulating very large integer arrays and then floating point calculations on smaller arrays, so FP speed is probably not of paramount importance, but memory bandwidth and clock speed probably is (perhaps, maybe, possibly).
Have you checked out the PPC G4 option? Apple certainly like to advertise how fast it can be, which is ussually deceptive, but, in fact the one place iot does shine is large integer manipulations (in the Apple literature: "some photoshop applications"). I havn't done any speed comparisons, but we have found it to pretty fast when using the optimised BLAS from Absoft.
Mac OS is pretty patthetic for this kind of application but PPC linux or OS-X should do the trick for you. IT might be worth a little investigating.
Yes, I had the same thought but it appears that the speed of the CPU-to-main-RAM bus in the G4s leaves a lot to be desired, but the CPUs do have a largish local cache which enables lots of speed on problems with high locality. The other problem is that they don't come standard with SCSI discs and our local Apple dealer seemed unsure what to do when it came to SCSI. He had never heard of PPC Linux. Also, our local IT support people just about tolerate us running Linux on Intel hardware connected to "their" network, but the thought of throwing Apple OSs into the mix would give them conniptions, I suspect.
By the way, just how much does that 400 Mhz memory cost now?
I think the memory is only 100MHz but it is "quad-clocked" and "double ported" or somesuch. Anyway, Dell Australia are quoting about AUD$2800 for "4 x 256MB PC800 ECC RAMBUS RIMM" - that's about US$1400. Seems cheap to me, for somewhat specialised memory. Compaq were quoting nearly three times as much for the same memory modules for their equivalent workstation. Cheers, Tim C Sydney, Australia
participants (4)
-
Chris Barker
-
Roy.Dragseth@cc.uit.no
-
Stuart I Reynolds
-
Tim Churches