Skip to content

Commit

Permalink
Function approximation made more compact
Browse files Browse the repository at this point in the history
  • Loading branch information
psibi committed Apr 6, 2012
1 parent 6a3ca63 commit 530e3eb
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions fapprox.py
Expand Up @@ -313,16 +313,16 @@ def test(self):
width=20
once=True
for ite in range(len(inputs)):
a=inputs.pop()
b=a.split(' ')
sample=b[1]
second=sample[:-1]
inpu=(int(b[0]),int(second))
calc_out=self.ann.run(inpu)
a=inputs.pop(0).split(' ')
finpu = []
for i in a:
if i!='\n':
finpu.append(float(i))
calc_out=self.ann.run(tuple(finpu))
i=""
header=""
for x in range(len(inpu)):
i=i+"\t"+str(inpu[x]).ljust(width)
for x in range(len(finpu)):
i=i+"\t"+str(finpu[x]).ljust(width)
header=header+"\t"+"Input #"+str(x)
header.rjust(width)
if once:
Expand Down

0 comments on commit 530e3eb

Please sign in to comment.