---------------------------------------------------------------------------
MemoryError Traceback (most recent call last)
<ipython-input-2-a8d44d3f5129> in <module>
----> 1 F(10 ** 5, 0.3)
<ipython-input-1-f61f0188c547> in F(n, p)
6 import numpy as np
7 q = 1 - p
----> 8 A = np.eye(n+1)
9 A[np.arange(n+1), np.arange(n+1)[::-1]] -= q
10 A[np.arange(1,n+1), np.arange(1,n+1)[::-1]] -= p
C:\ProgramData\Anaconda3\lib\site-packages\numpy\lib\twodim_base.py in eye(N, M, k, dtype, order)
199 if M is None:
200 M = N
--> 201 m = zeros((N, M), dtype=dtype, order=order)
202 if k >= M:
203 return m
MemoryError: