Theano/Theano — pull request #893 by pascanur (2012-08-28 17:40:19+00:00)
Title: fix destroy_map bug in scan

Scan op used to assume that the destroy map is always defined (and is empty if nothing is to be run inplace). Unfortunately several places where the Scan op is generated do not initialize the destroy_map.
I've fixed this for the scan function, grad method and R_op method, but another source of error is the ops generated by optimizations.

Instead of fixing it in all possible places, I opted for the easier version where I removed the assumption that the destroy_map should exist before we run the node (assumption that exist only for the python version of the code)