worc3131
Amaranths positions were sold to Citadel and JP to wind down gently. That's pretty different from forced liquidation at the exchange.
>>> 0.0+0.0
0.0
>>> 0.0+(-0.0)
0.0
>>> (-0.0)+0.0
0.0
>>> (-0.0)+(-0.0)
-0.0There is so much that you can't learn from books. Reading Mythical Man Month does not make you Fred Brooks, reading Shoe Dog does not make you Phil Knight, nor does reading a medium article on event driven systems make you ready to implement one.
Imagine that the college of surgery acted in the same way, a surgical trainee who has worked for a few years and reads a lot may feel comfortable taking the lead in a surgery, but will be out of their depth the moment things deviate from normal. I spoke to a surgeon about this once, and he described how he taught a particular procedure. At one point he has his student reach in to the body, with the explaination that 'it should feel like this'. No book can substitute that experience.
def life(M):
MP = np.pad(M,[(1,1),(1,1)])
N = sum(np.roll(MP,(i,j),(0,1))
for i in [1,0,-1]
for j in [1,0,-1])
return (3==N-MP*(4==N))[1:-1,1:-1]
Speedtest (presumably memory bound): 100 x 100 matrix, numpy 0.2ms, K 0.2ms
200 x 200 matrix, numpy 0.5ms, K 0.8ms
500 x 500 matrix, numpy 5.2ms, K 8.0ms
1000x1000 matrix, numpy 20.0ms, K 36.0ms
5000x5000 matrix, numpy 0.5s , K 1.2s
Interestingly the K code is designed to return a boolean matrix, but operates much more slowly for me on a boolean matrix compared to an integer matrix, with the result that: q)\t klife M
Takes 1.2 seconds whilst q)\t klife klife M
Takes 24 seconds. So whilst the idea seems to be that klife is used with scan/over to run a number of iterations, it's actually a bad idea to run it more than once. M = np.reshape(np.arange(16),(4,4))
np.array([np.roll(M,(i,j),(0,1))
for i in [1,0,-1]
for j in [1,0,-1]])