You can use strace on a specific pid to figure out what a specific process is doing, e.g.:
strace -fp <pid>
You might see something like:
select(9, [3 5 8], [], [], {0, 999999}) = 0 (Timeout)
import numpy as np | |
# the function | |
def f_of_x(X, w): | |
n,d = X.shape | |
X_dot_w = np.dot(X,w) | |
y = np.zeros(n) | |
# the inner product randomly goes through a sin | |
# or a cos | |
cos_flag = np.random.randn(n) < 0.0 |