Replace decimals in floating point numbers
Someone on this platform has already helped me with generating the following code: col,row = (100,1000) a = np.random.uniform(0,10,size=col*row).round(6).reshape(row,col) mask = (a*1e6+1).astype(int)%10<2 a[mask] += 2e-6 This code ensures that the last decimal is not a 0 or a 9. However, I would like to have no 0’s nor 9’s in all the decimals that are… Read More Replace decimals in floating point numbers