Re: [Tutor] array and ndarray

2009-03-06 Thread Kent Johnson
On Thu, Mar 5, 2009 at 8:38 PM, Mr Gerard Kelly wrote: > I am trying to convert something using the old Numeric module to the numpy > module. > > This is the code so far:: > > from __future__ import division > > import pygame, time, random, pygame.sndarray > sample_rate = 44100 > > from numpy imp

[Tutor] array and ndarray

2009-03-05 Thread Mr Gerard Kelly
I am trying to convert something using the old Numeric module to the numpy module. This is the code so far:: from __future__ import division import pygame, time, random, pygame.sndarray sample_rate = 44100 from numpy import * def sine_array(hz,peak,n_samples=sample_rate): length=sample_rate