opcode81 / ProbCog

A toolbox for statistical relational learning and reasoning.
GNU General Public License v3.0
101 stars 26 forks source link

Fixed bug #1

Closed flomey closed 11 years ago

flomey commented 11 years ago

Bug fixed that causes the bfgs optimizer to crash when a MPMath type is returned from the _f function in BPLL.py.

opcode81 commented 11 years ago

I added some code to the SciPyOpt class (optimize.py) that converts the returned values to the numpy data types, wrapping the original functions. Can you please check if that fixes the issue you identified?

Note that you can also optionally turn off (implicit) use of mpmath in util.py now.

Also, I recommend that you use the new 'stable' branch rather than 'master'. I am afraid the master branch is currently considered unstable; quite a bit of functionality is currently broken. (Yet I hope that danielnyge will fix the newly introduced issues soon.)