Re: [Tutor] An -1.#IND error

2008-01-27 Thread Dinesh B Vadhia
Luke: This is literally the core of the code: A = scipy.asmatrix(scipy.zeros((M, N), float)) q = scipy.asmatrix(scipy.zeros((N, 1)), float) b = scipy.asmatrix(scipy.zeros((1, N)), float) # populate A # x is a vector of valid floats (I've checked) # calculate b as: b = A * x After the matrix mu

Re: [Tutor] conditionals with slicing not seeming to work

2008-01-27 Thread Kent Johnson
Rob Stevenson wrote: > the intention of this snippet is to only print slices where character 1 > is lower case, 2-4 and 6-8 are upper. The logic here looks right to a > VB eye. > for i in h: > j=s[i:i+8] > if j[0].islower(): > if j[1:3].isupper(): > if j[5:7].isupper(

Re: [Tutor] conditionals with slicing not seeming to work

2008-01-27 Thread Jeff Younker
- Jeff Younker - [EMAIL PROTECTED] - On Jan 27, 2008, at 3:01 PM, Rob Stevenson wrote: I'm working at a certain website's puzzles using pythonin order to learn the language, but am stuck understanding what is going on in my code (ie why it doesn't do as expected) the intention of this sn

[Tutor] conditionals with slicing not seeming to work

2008-01-27 Thread Rob Stevenson
Hello, I'm working at a certain website's puzzles using pythonin order to learn the language, but am stuck understanding what is going on in my code (ie why it doesn't do as expected) the intention of this snippet is to only print slices where character 1 is lower case, 2-4 and 6-8 are upper. Th

Re: [Tutor] setstate trouble when unpickling

2008-01-27 Thread rspil
I load a "cellule" with self.cellule=pickle.load(prjfile) Within the class "cellule" I use this method to add an attribute "note" ,with success: def __setstate__(self, state): #20080127 ajoute note if 'note' not in state: self