pascanur/Theano — comment on commit 3f6b9b511aba269f7224d7fe5841e29e87f85e84
File: theano/scan_module/scan_op.py line 310
By nouiz:

Why this hasattr(.., dtype)? I think that you should use the .type.dtype here and remove this hasattr.

If you need to keep the hasattr, you must change the put the check like this(check parentheses change):

(hasattr(outer_shared, 'dtype') and (outer_shared.dtype != inner_shared_out.dtype) or outer_shared.ndim != inner_shared_out.ndim)