Use existing method with additional checks
Detect potential cycles in shape optimization
Avoid instroducing the cycle itself
allow ones/zeros to accept single integer shapes (plus tests)
need to also exclude tensorvariable arguments (and tests)
Merge pull request #1551 from jlowin/alloc_shape_fix

Minor change: tensor.ones and tensor.zeros can accept single integer arguments
Split and move comment following code review
Merge pull request #1549 from lamblin/fix_shape_cycle

[WIP] Fix shape cycle
Merge pull request #24 from lamblin/nouiz_mixed2

Use logger instead of printing. Update error message.
Fix test in float32
Fix test when pygpu isn't installed.
Merge pull request #1553 from nouiz/fix_tests

Fix tests
Merge pull request #1552 from nouiz/mixed2

Mixed2
Fix for python3 following gh-1550
Merge pull request #1555 from lamblin/fix_stringio_py3k

Fix for python3 following gh-1550
Make inplace opt for cger and cgemv faster.
Remove the optional reason argument to on_change_input.

This was slowing down python.
Move assert to outside the loop as the input to the check don't change.
Better optimizer profiling
Re-add the max iteration for equilibrium optimizer