Skip to content
Snippets Groups Projects
Commit 6565d783 authored by Dennis Noll's avatar Dennis Noll
Browse files

numpy: init set_thresh

parent eadb47bf
No related branches found
No related tags found
No related merge requests found
......@@ -3,6 +3,12 @@
import numpy as np
def set_thresh(values, thresh=1e-5):
val = values.copy()
val[val < thresh] = 0
return val
def one_hot(a, n=None):
if n is None:
n = a.max() + 1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment