No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
i have two files containing lists and I would like to perform some manipulations with the numbers. file 1: [list] A 1 B 2 C 3 [/list] and file 2: [list] A 4 B 5 C 6 [/list] I have written the following code to read in the files and … |
|
Hi, I have a list of positive digits in a file. All I want to do is to add the negative sign (-) to each digit. Is there a code for this. eg list of digits 1 correspond -1 2 correspond-2 3 correspond -3 etc |
|
Hi, I'll try and explain my problem as simple as possible. I have written a module to perform a generalised operation (as shown below). [code] from math import sqrt from math import pow from math import log10 from Numeric import * import numpy as np def Entropy(parameters, temperature): t=float(temperature/1000.0) return … |
|
Hi, I'm trying to loop through vaules less than 1 eg say from 0.1-0.9. I tried the code below and I get the error "ValueError: xrange() arg 3 must not be zero". My question is, is it possible to loop through decimal values. [code] for x in xrange(0.1,0.9,0.1): print x … |
|
Hi, I have written this code to generate the maximun number from a number of coloumns (say 4 coloumns) in a list. The code is not handling negative number well and so keep generating the negaive number to be greater eg -8 > 5 which is wrong. Why is this … |