Skip to content

Instantly share code, notes, and snippets.

@bmcfee
Last active December 23, 2020 12:13
Show Gist options
  • Save bmcfee/a378bfe31a75769c583e to your computer and use it in GitHub Desktop.
Save bmcfee/a378bfe31a75769c583e to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
Sorry, this is too big to display.
@lseffer
Copy link

lseffer commented Jul 11, 2017

Thanks for this, great work! If you want to omit using scipy.weave you can replace the contents of __l1_prox with

Y = np.zeros_like(A)
Y[A-r>0] = A[A-r>0]-r
Y[A+r<=0] = A[A+r<=0]+r

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment