Differentiating matrices for arbitrarily spaced grid points | Synapse