@@ -213,7 +212,7 @@ The full documentation can be found in the library: :ref:`Scan <lib_scan>`.
print compute_jac_t(w, x)[0]
# compare with numpy
print ((1 - np.tanh(x.dot(w))**2)*w).T
print ((1 - np.tanh(x.dot(w)) ** 2) * w).T
Note that we need to iterate over the indices of ``y`` and not over the elements of ``y``. The reason is that scan create a placeholder variable for its internal function and this placeholder variable does not have the same dependencies than the variables that will replace it.
...
...
@@ -228,14 +227,14 @@ Note that we need to iterate over the indices of ``y`` and not over the elements