Re: numarray.array can be VERY slow

2005-04-13 Thread Robert Kern
Jim wrote: Edward C. Jones wrote: Steven Bethard wrote: > As mentioned, this has nothing to do with numarray, and everything to > do with your inexplicable use of lists. Why don't you just write this > as: > > arr = numarray.ones((8, 8, 256, 256), Float64) The code I posted was simplified fro

Re: numarray.array can be VERY slow

2005-04-13 Thread Jim
Edward C. Jones wrote: Steven Bethard wrote: > As mentioned, this has nothing to do with numarray, and everything to > do with your inexplicable use of lists. Why don't you just write this > as: > > arr = numarray.ones((8, 8, 256, 256), Float64) The code I posted was simplified from a larger

Re: numarray.array can be VERY slow

2005-04-10 Thread Robert Kern
Edward C. Jones wrote: Steven Bethard wrote: > As mentioned, this has nothing to do with numarray, and everything to > do with your inexplicable use of lists. Why don't you just write this > as: > > arr = numarray.ones((8, 8, 256, 256), Float64) The code I posted was simplified from a larger

Re: numarray.array can be VERY slow

2005-04-10 Thread Steven Bethard
Edward C. Jones wrote: Steven Bethard wrote: > As mentioned, this has nothing to do with numarray, and everything to > do with your inexplicable use of lists. Why don't you just write this > as: > > arr = numarray.ones((8, 8, 256, 256), Float64) The code I posted was simplified from a larger

Re: numarray.array can be VERY slow

2005-04-10 Thread Edward C. Jones
Steven Bethard wrote: > As mentioned, this has nothing to do with numarray, and everything to > do with your inexplicable use of lists. Why don't you just write this > as: > > arr = numarray.ones((8, 8, 256, 256), Float64) The code I posted was simplified from a larger program which I have now re

Re: numarray.array can be VERY slow

2005-04-10 Thread Steven Bethard
Edward C. Jones wrote: #! /usr/bin/env python """Should this program take 4.3 seconds to run? I have a Linux PC with an AMD Athlon XP 2000+ chip (1.7Gh). I use Python 2.4.1 and numarray 1.2.3, both compliled from source.""" import time, numarray from numarray.numerictypes import * nested = []

Re: numarray.array can be VERY slow

2005-04-10 Thread ChinStrap
Yes because that is a bad way to things. There is no reason to be working with a list when it could be done directly with numarray. -- http://mail.python.org/mailman/listinfo/python-list

numarray.array can be VERY slow

2005-04-10 Thread Edward C. Jones
#! /usr/bin/env python """Should this program take 4.3 seconds to run? I have a Linux PC with an AMD Athlon XP 2000+ chip (1.7Gh). I use Python 2.4.1 and numarray 1.2.3, both compliled from source.""" import time, numarray from numarray.numerictypes import * nested = [] for i in range(8):