def grad(self, inputs, gradients):
        x, new_length, nonconstants = inputs
        d_out = gradients[0]
        swap = list(range(self.ndim))
        swap.remove(self.axis)
        swap.insert(0, self.axis)
        return [d_out.dimshuffle(swap)[nonconstants].dimshuffle(swap),
                grad_not_implemented(self, 1, new_length),
                grad_not_implemented(self, 2, nonconstants)]
.. todo::
dataset/ETHPy150Open lisa-lab/pylearn2/pylearn2/utils/insert_along_axis.py/InsertAlongAxis.grad