0

I checked out the latest version of Pybrain from github

Running sudo python setup.py install on my mac gives me:

Extracting PyBrain-0.3.1-py2.7.egg to /Library/Python/2.7/site-packages
  File "/Library/Python/2.7/site-packages/PyBrain-0.3.1-py2.7.egg/build/lib/build/lib/pybrain/optimization/distributionbased/fem.py", line 235
    updateSize = self._computeUpdateSize(self._computeDensities(sample), k)
             ^
SyntaxError: invalid syntax

  File "/Library/Python/2.7/site-packages/PyBrain-0.3.1-py2.7.egg/build/lib/pybrain/optimization/distributionbased/fem.py", line 235
    updateSize = self._computeUpdateSize(self._computeDensities(sample), k)
             ^
SyntaxError: invalid syntax

  File "/Library/Python/2.7/site-packages/PyBrain-0.3.1-py2.7.egg/pybrain/optimization/distributionbased/fem.py", line 235
    updateSize = self._computeUpdateSize(self._computeDensities(sample), k)
             ^
SyntaxError: invalid syntax

What is this; should I worry about it?

Tjorriemorrie
  • 16,818
  • 20
  • 89
  • 131

2 Answers2

0

It is a syntax error so you should at least raise a ticket on it and possibly resolve it and submit a patch. It looks like fem at least will not work but the error may be on line 234 as there is nothing obviously wrong with the reported line.

Steve Barnes
  • 27,618
  • 6
  • 63
  • 73
0

The problem is in line 233, which is:

print(len(self.allsamples), min(self.fitnesses), max(self.fitnesses)#, self.alphas)

it comments out the self.alphas part, but it is also commenting out the closing parenthesis of the print function, so the error occurs.

I'll submit a pull request, meanwhile, you can fix it yourself by fixing the parenthesis.

adrin
  • 4,511
  • 3
  • 34
  • 50