celestialgod

numpy subtract left-top values

Aug 25th, 2018
419
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.12 KB | None | 0 0
  1. import numpy as np
  2. from scipy.ndimage.interpolation import shift
  3.  
  4. A = np.random.randn(5, 5)
  5. B  = A - shift(A, 1, cval=0.)
Advertisement
Add Comment
Please, Sign In to add comment