Wednesday, September 29, 2010

Remove horizontal line from Word

Problem: There are horizontal lines in the word document that can't be selected, only moved.
Solution: Set the cursor above the line, go to Format->Borders and Shading and then remove the border.

Thursday, September 9, 2010

Multidimensional find in pylab/numpy/matplotlib

A = pylab.random((3,3))
print A
idx = pylab.find(A < .5) #Returns an unravelled index
A.flat[idx] = .5 #allows us to use this flat index directly
print(A) #and it works just fine