Re: How to increase the speed of this program?



John Machin wrote:

I'm extremely agnostic about the spelling :-) IOW I'd be very glad of
any way [pure Python; e.g. maintaining my own version of the array
module doesn't qualify] to simply and rapidly create an array.array
instance with typecode t and number of elements n with each element
initialised to value v (default to be the zero appropriate to the
typecode).

array(t, [v])*n

</F>

.



Relevant Pages

  • Re: How to increase the speed of this program?
    ... e.g. maintaining my own version of the array ... module doesn't qualify] to simply and rapidly create an array.array ... instance with typecode t and number of elements n with each element ... 100 loops, best of 3: ...
    (comp.lang.python)
  • Re: [Numeric] why is Float32 incorrect for ufuncs?
    ... At some point, Curzio Basso wrote: ... > I am a beginner with Numerical Python, and there is a thing I do not ... return array has incorrect type ... > If I use Numeric.Float64 as typecode everything works fine, ...
    (comp.lang.python)
  • Re: Efficiency of using long integers to hold bitmaps
    ... numarray has a 'bit' typecode, though I'm not sure how such an array is ... Jeff ...
    (comp.lang.python)
  • Re: Inherit from array
    ... array.array doesn't respect the usual rules. ... it says the typecode is 'c' - I thought such an information was ... from array import array ...
    (comp.lang.python)
  • Re: Inherit from array
    ... there is something I didn't catch in python's inheritance. ... from array import array ... it says the typecode is 'c' - I thought such an information was ... But here i'm getting lost. ...
    (comp.lang.python)