In [1]:
from pyCodeLib import *
import warnings
import glob
import re
import numpy as np
warnings.filterwarnings('ignore')


# sys.path.insert(0, MYHOME)
%load_ext autoreload
%autoreload 2

In [11]:
pre = "/Users/weilu/Research/server/feb_2019/gammas_by_shuffle/"
A_name = "cath-dataset-nonredundant-S20Clean_phi_pairwise_contact_well4.5_6.5_5.0_10phi_density_mediated_contact_well6.5_9.5_5.0_10_2.6_7.0_A"
B_name = "cath-dataset-nonredundant-S20Clean_phi_pairwise_contact_well4.5_6.5_5.0_10phi_density_mediated_contact_well6.5_9.5_5.0_10_2.6_7.0_B"
B_filtered_name = "cath-dataset-nonredundant-S20Clean_phi_pairwise_contact_well4.5_6.5_5.0_10phi_density_mediated_contact_well6.5_9.5_5.0_10_2.6_7.0_B_filtered"
P_name = "cath-dataset-nonredundant-S20Clean_phi_pairwise_contact_well4.5_6.5_5.0_10phi_density_mediated_contact_well6.5_9.5_5.0_10_2.6_7.0_P"
Gamma_name = "cath-dataset-nonredundant-S20Clean_phi_pairwise_contact_well4.5_6.5_5.0_10phi_density_mediated_contact_well6.5_9.5_5.0_10_2.6_7.0_gamma"
Gamma_filtered_name = "cath-dataset-nonredundant-S20Clean_phi_pairwise_contact_well4.5_6.5_5.0_10phi_density_mediated_contact_well6.5_9.5_5.0_10_2.6_7.0_gamma_filtered"
Lamb_name = "cath-dataset-nonredundant-S20Clean_phi_pairwise_contact_well4.5_6.5_5.0_10phi_density_mediated_contact_well6.5_9.5_5.0_10_2.6_7.0_lamb"
Lamb_filtered_name = "cath-dataset-nonredundant-S20Clean_phi_pairwise_contact_well4.5_6.5_5.0_10phi_density_mediated_contact_well6.5_9.5_5.0_10_2.6_7.0_lamb_filtered"

A = np.loadtxt(pre+A_name)
B = np.loadtxt(pre+B_name)
B_filtered = np.loadtxt(pre+B_filtered_name, dtype=complex, converters={
                           0: lambda s: complex(s.decode().replace('+-', '-'))})
Gamma = np.loadtxt(pre+Gamma_name)
Gamma_filtered = np.loadtxt(pre+Gamma_filtered_name, dtype=complex, converters={
                           0: lambda s: complex(s.decode().replace('+-', '-'))})
Lamb = np.loadtxt(pre+Lamb_name, dtype=complex, converters={
                           0: lambda s: complex(s.decode().replace('+-', '-'))})
Lamb_filtered = np.loadtxt(pre+Lamb_filtered_name, dtype=complex, converters={
                           0: lambda s: complex(s.decode().replace('+-', '-'))})

In [52]:
def get_filtered_gamma_B_lamb_P_and_lamb(A, B, half_B, other_half_B, std_half_B, total_phis, num_decoys, noise_iterations=10, relative_error_threshold=0.5):
    lamb, P = np.linalg.eig(B)
    lamb, P = sort_eigenvalues_and_eigenvectors(lamb, P)

    cutoff_modes = []
    for i_noise in range(noise_iterations):
        noisy_B = np.zeros((total_phis, total_phis))
        for i in range(total_phis):
            for j in range(i, total_phis):
                random_B_ij = np.random.normal(
                    loc=half_B[i][j], scale=std_half_B[i][j] / float(num_decoys))
                noisy_B[i][j] = noisy_B[j][i] = random_B_ij - \
                    other_half_B[i][j]

        noisy_lamb, noisy_P = np.linalg.eig(noisy_B)
        noisy_lamb, noisy_P = sort_eigenvalues_and_eigenvectors(
            noisy_lamb, noisy_P)

        try:
            cutoff_mode = np.where(
                np.abs(lamb - noisy_lamb) / lamb > relative_error_threshold)[0][0]
        except IndexError:
            cutoff_mode = len(lamb)
        cutoff_modes.append(cutoff_mode)

    cutoff_mode = min(cutoff_modes)
    print(cutoff_mode)

    filtered_lamb = np.copy(lamb)
    filtered_B_inv, filtered_lamb, P = get_filtered_B_inv_lambda_and_P(
        filtered_lamb, cutoff_mode, P)

    filtered_gamma = np.dot(filtered_B_inv, A)
    filtered_B = np.linalg.inv(filtered_B_inv)
    return filtered_gamma, filtered_B, filtered_lamb, P, lamb
def get_filtered_B_inv_lambda_and_P(filtered_lamb, cutoff_mode, P, method='extend_all_after_first_noisy_mode'):
    if method == 'zero_all_after_first_noisy_mode':
        filtered_lamb_inv = 1 / filtered_lamb
        # for "zeroing unreliable eigenvalues"
        filtered_lamb_inv[cutoff_mode:] = 0.0
        filtered_B_inv = np.dot(
            P, np.dot(np.diag(filtered_lamb_inv), np.linalg.inv(P)))
        filtered_lamb = 1 / filtered_lamb_inv
    if method == 'extend_all_after_first_noisy_mode':
        # for "extending lowest reliable eigenvalue"
        filtered_lamb[cutoff_mode:] = filtered_lamb[cutoff_mode - 1]
        filtered_B_inv = np.dot(
            P, np.dot(np.diag(1 / filtered_lamb), np.linalg.inv(P)))

    return filtered_B_inv, filtered_lamb, P


def sort_eigenvalues_and_eigenvectors(eigenvalues, eigenvectors):
    idx = eigenvalues.argsort()[::-1]
    eigenvalues = eigenvalues[idx]
    eigenvectors = eigenvectors[:, idx]
    return eigenvalues, eigenvectors

In [34]:
plot_contact_well(Gamma[:210], inferBound=True)



In [35]:
plot_contact_well(Gamma_filtered[:210], inferBound=True)



In [70]:
Gamma_filtered[74]


Out[70]:
(-265.87613-0j)

In [25]:
plot_contact_well(A[:210], inferBound=True, invert_sign=False)



In [26]:
plot_contact_well(A[210:420], inferBound=True, invert_sign=False)



In [27]:
plot_contact_well(A[420:], inferBound=True, invert_sign=False)



In [3]:
os.chdir('/Users/weilu/opt/notebook/Optimization')

In [5]:
pre = "/Users/weilu/Research/server/feb_2019/jan_optimization/"
os.chdir(pre)
a_list = []
with open(pre+"database/cath-dataset-nonredundant-S20Clean.list") as f:
    for i, line in enumerate(f):
        a = line.strip()
        save = False
        decoy_pairwise = f"phis/phi_pairwise_contact_well_{a}_decoys_shuffle_4.5_6.5_5.0_10"
        decoy_mediated = f"phis/phi_density_mediated_contact_well_{a}_decoys_shuffle_6.5_9.5_5.0_10_2.6_7.0"
        native_pairwise = f"phis/phi_pairwise_contact_well_{a}_native_4.5_6.5_5.0_10"
        native_mediated = f"phis/phi_density_mediated_contact_well_{a}_native_6.5_9.5_5.0_10_2.6_7.0"
        if not os.path.exists(decoy_pairwise):
            print("decoy_pairwise", a)
            save = True
        if not os.path.exists(decoy_mediated):
            print("decoy_mediated", a)
            save = True
        if not os.path.exists(native_mediated):
            print("native_mediated", a)
            save = True
        if not os.path.exists(native_pairwise):
            print("native_pairwise", a)
            save = True
        if save:
            a_list.append(a)
#         break


decoy_pairwise 1s3jA02
decoy_pairwise 1twfC01
decoy_pairwise 1wpqA01
decoy_pairwise 2jn4A00
decoy_pairwise 2l7kA00
decoy_mediated 2o8bB01
decoy_pairwise 2ookA00
decoy_pairwise 2ortA03
decoy_pairwise 2r17C00
decoy_mediated 2r39A00
decoy_pairwise 2ri9A00
decoy_mediated 2rnoA00
decoy_pairwise 2wk1A00
decoy_pairwise 2xpiD00
decoy_pairwise 2yh6D00
decoy_pairwise 2yhcA00
decoy_pairwise 2yhgA02
decoy_pairwise 2yijA00
decoy_mediated 3ab8A00
decoy_pairwise 3abzA01
decoy_pairwise 3bzwA00
decoy_pairwise 3dkqA02
decoy_mediated 3grlA00
decoy_pairwise 3igrA00
decoy_pairwise 3jc6601
decoy_mediated 3jrvA00
decoy_pairwise 3jszA01
decoy_mediated 3k1tA02
decoy_mediated 3kboA02
decoy_mediated 3kbrA02
decoy_mediated 3kd4A02
decoy_pairwise 3kwlA03
decoy_pairwise 3lo7A01
decoy_pairwise 3nl6B01
decoy_pairwise 3nlcA01
decoy_pairwise 3nnkA02
decoy_pairwise 3oceA03
decoy_pairwise 3pxgA04
decoy_mediated 3rnvA00
decoy_pairwise 3thoA01
decoy_pairwise 3tnzA01
decoy_mediated 3vhlA02
decoy_pairwise 3w9fC00
decoy_mediated 3zh9B03
decoy_pairwise 4b0bB00
decoy_pairwise 4b28A02
decoy_mediated 4b28A02
decoy_pairwise 4b4cA02
decoy_pairwise 4b86B00
decoy_pairwise 4bkxA02
decoy_pairwise 4bllA01
decoy_pairwise 4gymA00
decoy_mediated 4ipuA00
decoy_pairwise 4jixB00
decoy_mediated 4jixB00
decoy_pairwise 4jn3A02
decoy_pairwise 4nqfA00
decoy_pairwise 4nutA00
decoy_pairwise 4nxtA01
decoy_pairwise 4nzcA02
decoy_pairwise 4ztkA00
decoy_mediated 5a0wD02
decoy_pairwise 5a2nA00

In [6]:
len(a_list)


Out[6]:
61

In [7]:
with open("fix_1.txt", "w") as out:
    for i in a_list:
        out.write(i+"\n")

In [6]:
pre = "/Users/weilu/Research/server/feb_2019/jan_optimization/"
os.chdir(pre)
with open(pre+"database/cath-dataset-nonredundant-S20Clean.list") as f:
    for line in f:
        a = line.strip()
        li = glob.glob(f"phis/*{a}*")
        if len(li) != 4:
            print(li)
#         break


['phis/phi_pairwise_contact_well_1914A00_decoys_shuffle_4.5_6.5_5.0_10', 'phis/phi_density_mediated_contact_well_1914A00_native_6.5_9.5_5.0_10_2.6_7.0', 'phis/phi_pairwise_contact_well_1914A00_native_4.5_6.5_5.0_10']
['phis/phi_density_mediated_contact_well_1c7tA03_native_6.5_9.5_5.0_10_2.6_7.0', 'phis/phi_density_mediated_contact_well_1c7tA03_decoys_shuffle_6.5_9.5_5.0_10_2.6_7.0', 'phis/phi_pairwise_contact_well_1c7tA03_native_4.5_6.5_5.0_10']
['phis/phi_pairwise_contact_well_1s3jA02_native_4.5_6.5_5.0_10', 'phis/phi_density_mediated_contact_well_1s3jA02_native_6.5_9.5_5.0_10_2.6_7.0', 'phis/phi_density_mediated_contact_well_1s3jA02_decoys_shuffle_6.5_9.5_5.0_10_2.6_7.0']
['phis/phi_density_mediated_contact_well_1twfC01_native_6.5_9.5_5.0_10_2.6_7.0', 'phis/phi_pairwise_contact_well_1twfC01_native_4.5_6.5_5.0_10', 'phis/phi_density_mediated_contact_well_1twfC01_decoys_shuffle_6.5_9.5_5.0_10_2.6_7.0']
['phis/phi_density_mediated_contact_well_1wpqA01_native_6.5_9.5_5.0_10_2.6_7.0', 'phis/phi_density_mediated_contact_well_1wpqA01_decoys_shuffle_6.5_9.5_5.0_10_2.6_7.0', 'phis/phi_pairwise_contact_well_1wpqA01_native_4.5_6.5_5.0_10']
---------------------------------------------------------------------------
KeyboardInterrupt                         Traceback (most recent call last)
<ipython-input-6-b205c678beb8> in <module>
      4     for line in f:
      5         a = line.strip()
----> 6         li = glob.glob(f"phis/*{a}*")
      7         if len(li) != 4:
      8             print(li)

~/anaconda3/envs/py36/lib/python3.6/glob.py in glob(pathname, recursive)
     18     zero or more directories and subdirectories.
     19     """
---> 20     return list(iglob(pathname, recursive=recursive))
     21 
     22 def iglob(pathname, *, recursive=False):

~/anaconda3/envs/py36/lib/python3.6/glob.py in _iglob(pathname, recursive, dironly)
     70         glob_in_dir = _glob0
     71     for dirname in dirs:
---> 72         for name in glob_in_dir(dirname, basename, dironly):
     73             yield os.path.join(dirname, name)
     74 

~/anaconda3/envs/py36/lib/python3.6/glob.py in _glob1(dirname, pattern, dironly)
     78 
     79 def _glob1(dirname, pattern, dironly):
---> 80     names = list(_iterdir(dirname, dironly))
     81     if not _ishidden(pattern):
     82         names = (x for x in names if not _ishidden(x))

~/anaconda3/envs/py36/lib/python3.6/glob.py in _iterdir(dirname, dironly)
    120     try:
    121         with os.scandir(dirname) as it:
--> 122             for entry in it:
    123                 try:
    124                     if not dironly or entry.is_dir():

KeyboardInterrupt: 

In [77]:
lamb, P = np.linalg.eig(B)

In [84]:
lamb, P = np.linalg.eig(B)
lamb, P = sort_eigenvalues_and_eigenvectors(lamb, P)

In [85]:
plt.plot(lamb[1:])


Out[85]:
[<matplotlib.lines.Line2D at 0x1a246e69e8>]

In [83]:
fig = plt.figure()
ax = fig.add_subplot(2, 1, 1)
line, = ax.plot(Lamb_filtered, color='blue', lw=2)
ax.set_yscale('log')



In [80]:
plt.plot(Lamb_filtered)


Out[80]:
[<matplotlib.lines.Line2D at 0x1a2431ec50>]

In [107]:
a = np.arange(8).reshape(2,4)

In [108]:
a


Out[108]:
array([[0, 1, 2, 3],
       [4, 5, 6, 7]])

In [109]:
a.reshape(2, 1, 4)


Out[109]:
array([[[0, 1, 2, 3]],

       [[4, 5, 6, 7]]])

In [113]:
b = a.reshape(2,4,1) * a.reshape(2, 1, 4)

In [114]:
b


Out[114]:
array([[[ 0,  0,  0,  0],
        [ 0,  1,  2,  3],
        [ 0,  2,  4,  6],
        [ 0,  3,  6,  9]],

       [[16, 20, 24, 28],
        [20, 25, 30, 35],
        [24, 30, 36, 42],
        [28, 35, 42, 49]]])

In [115]:
np.sum(b, axis=0)


Out[115]:
array([[16, 20, 24, 28],
       [20, 26, 32, 38],
       [24, 32, 40, 48],
       [28, 38, 48, 58]])

In [105]:
b.shape


Out[105]:
(3, 5, 5)

In [71]:
P.shape


Out[71]:
(630, 630)

In [78]:
plot_contact_well(P[0][:210], inferBound=True)



In [72]:
plt.imshow(P)


Out[72]:
<matplotlib.image.AxesImage at 0x1a21c0b940>

In [51]:
np.allclose(Lamb.astype(float), lamb, atol=1e-4)


Out[51]:
True

In [57]:
cys_cys = 4*20+4

In [59]:
np.argmax(B[:210,:210])


Out[59]:
2110

In [61]:
np.max(B[:210,:210])


Out[61]:
40.19161

In [90]:
a = np.ones((10,20,30))

In [92]:
np.sum(a, axis=0).shape


Out[92]:
(20, 30)

In [94]:
np.average(np.sum(a, axis=0), axis=0).shape


Out[94]:
(30,)

In [87]:
plt.rcParams['figure.figsize'] = [16.18033, 10]
plt.imshow(B[210:420,210:420])
plt.colorbar()


Out[87]:
<matplotlib.colorbar.Colorbar at 0x1a2598e198>

In [63]:
plt.rcParams['figure.figsize'] = [16.18033, 10]
plt.imshow(B[:210,:210], vmax=10)
plt.colorbar()


Out[63]:
<matplotlib.colorbar.Colorbar at 0x1a1885de48>

In [55]:
plt.rcParams['figure.figsize'] = [16.18033, 10]
plt.imshow(B)
plt.colorbar()


Out[55]:
<matplotlib.colorbar.Colorbar at 0x18169678d0>

In [ ]:
get_filtered_gamma_B_lamb_P_and_lamb(A, B, )

In [44]:
max(Lamb.astype(float) - lamb)


Out[44]:
4.1096429469145936e-05

In [32]:
Lamb.astype(float)


Out[32]:
array([ 6.8233289e+03,  3.4976580e+01,  3.0545410e+01,  2.9474000e+01,
        2.7681690e+01,  2.5600540e+01,  2.5077520e+01,  2.2942070e+01,
        2.2126370e+01,  1.7950930e+01,  1.7159250e+01,  1.6468140e+01,
        1.6367150e+01,  1.5478510e+01,  1.5060640e+01,  1.4637770e+01,
        1.3523500e+01,  1.3222230e+01,  1.3055410e+01,  1.2638740e+01,
        1.2212780e+01,  1.1867080e+01,  1.1615440e+01,  1.1167710e+01,
        1.0951160e+01,  1.0855430e+01,  1.0485550e+01,  1.0213200e+01,
        1.0050100e+01,  9.8768400e+00,  9.5519100e+00,  9.2639400e+00,
        9.1072700e+00,  8.9486500e+00,  8.8620100e+00,  8.6508500e+00,
        8.3652700e+00,  8.2896700e+00,  8.1540900e+00,  8.0927600e+00,
        7.9849700e+00,  7.8270700e+00,  7.6701500e+00,  7.5829100e+00,
        7.3511200e+00,  7.2843900e+00,  7.1640200e+00,  7.0996900e+00,
        7.0174500e+00,  6.8429800e+00,  6.7546700e+00,  6.6129700e+00,
        6.5849200e+00,  6.5260500e+00,  6.4126400e+00,  6.3589300e+00,
        6.3324400e+00,  6.1745200e+00,  6.0930000e+00,  5.9284700e+00,
        5.9125800e+00,  5.7694500e+00,  5.6785000e+00,  5.6251600e+00,
        5.5834700e+00,  5.4976500e+00,  5.4196100e+00,  5.4043600e+00,
        5.3229200e+00,  5.2979200e+00,  5.1913400e+00,  5.1466100e+00,
        5.0386500e+00,  4.9464500e+00,  4.9003400e+00,  4.8549500e+00,
        4.8113100e+00,  4.7561300e+00,  4.7003100e+00,  4.6624100e+00,
        4.6417800e+00,  4.5243300e+00,  4.4890700e+00,  4.4428700e+00,
        4.3962700e+00,  4.3283000e+00,  4.3184200e+00,  4.2571700e+00,
        4.2202100e+00,  4.1486700e+00,  4.0940500e+00,  4.0008600e+00,
        3.9783500e+00,  3.9270400e+00,  3.8557000e+00,  3.8479500e+00,
        3.8229800e+00,  3.7087800e+00,  3.6833700e+00,  3.6488900e+00,
        3.6073600e+00,  3.5708300e+00,  3.5434100e+00,  3.5123100e+00,
        3.4679900e+00,  3.4350700e+00,  3.4141500e+00,  3.3740400e+00,
        3.3320100e+00,  3.2730800e+00,  3.2551700e+00,  3.2307400e+00,
        3.1915000e+00,  3.1803800e+00,  3.1065700e+00,  3.1034200e+00,
        3.0629000e+00,  3.0128300e+00,  3.0057900e+00,  2.9590400e+00,
        2.9294100e+00,  2.8952500e+00,  2.8751100e+00,  2.8417200e+00,
        2.7943500e+00,  2.7556400e+00,  2.7425100e+00,  2.7271500e+00,
        2.7139700e+00,  2.6836100e+00,  2.6217500e+00,  2.6115200e+00,
        2.5763700e+00,  2.5459500e+00,  2.5381700e+00,  2.5115700e+00,
        2.4878100e+00,  2.4771500e+00,  2.4646800e+00,  2.4036500e+00,
        2.3845600e+00,  2.3797700e+00,  2.3388500e+00,  2.3226400e+00,
        2.3057800e+00,  2.2800300e+00,  2.2504700e+00,  2.2303800e+00,
        2.2187400e+00,  2.1793000e+00,  2.1635100e+00,  2.1588200e+00,
        2.1382500e+00,  2.1132200e+00,  2.1033100e+00,  2.0765800e+00,
        2.0526600e+00,  2.0320100e+00,  2.0036100e+00,  1.9782600e+00,
        1.9718100e+00,  1.9420000e+00,  1.9264600e+00,  1.9182600e+00,
        1.8834100e+00,  1.8750200e+00,  1.8617400e+00,  1.8501800e+00,
        1.8136300e+00,  1.8055600e+00,  1.7963200e+00,  1.7540000e+00,
        1.7403100e+00,  1.7359500e+00,  1.7078600e+00,  1.6907100e+00,
        1.6812500e+00,  1.6521100e+00,  1.6441000e+00,  1.6327800e+00,
        1.6113700e+00,  1.5938900e+00,  1.5837000e+00,  1.5782200e+00,
        1.5504200e+00,  1.5435900e+00,  1.5234200e+00,  1.5171900e+00,
        1.4950800e+00,  1.4860900e+00,  1.4694600e+00,  1.4647400e+00,
        1.4599000e+00,  1.4557700e+00,  1.4268900e+00,  1.4144000e+00,
        1.3953300e+00,  1.3882800e+00,  1.3772400e+00,  1.3713100e+00,
        1.3677700e+00,  1.3540500e+00,  1.3382200e+00,  1.3230000e+00,
        1.3159900e+00,  1.3004600e+00,  1.2954100e+00,  1.2924600e+00,
        1.2713900e+00,  1.2544900e+00,  1.2443400e+00,  1.2367600e+00,
        1.2258800e+00,  1.2173000e+00,  1.2070300e+00,  1.2007900e+00,
        1.1867200e+00,  1.1741800e+00,  1.1586200e+00,  1.1548100e+00,
        1.1483700e+00,  1.1305400e+00,  1.1275000e+00,  1.1171200e+00,
        1.1030200e+00,  1.0991600e+00,  1.0878000e+00,  1.0773100e+00,
        1.0658000e+00,  1.0536500e+00,  1.0483600e+00,  1.0353700e+00,
        1.0247000e+00,  1.0213800e+00,  1.0087300e+00,  1.0066500e+00,
        9.9210000e-01,  9.7685000e-01,  9.7275000e-01,  9.5502000e-01,
        9.4823000e-01,  9.3865000e-01,  9.3213000e-01,  9.2316000e-01,
        9.1787000e-01,  9.0663000e-01,  9.0116000e-01,  8.8779000e-01,
        8.7875000e-01,  8.6633000e-01,  8.6273000e-01,  8.5108000e-01,
        8.4978000e-01,  8.4231000e-01,  8.3399000e-01,  8.2689000e-01,
        8.1902000e-01,  8.1194000e-01,  8.0335000e-01,  7.9866000e-01,
        7.9110000e-01,  7.8460000e-01,  7.8066000e-01,  7.7458000e-01,
        7.6784000e-01,  7.5870000e-01,  7.5015000e-01,  7.4189000e-01,
        7.3471000e-01,  7.2896000e-01,  7.1563000e-01,  7.0959000e-01,
        7.0444000e-01,  7.0066000e-01,  6.9187000e-01,  6.8659000e-01,
        6.7632000e-01,  6.6895000e-01,  6.6630000e-01,  6.6102000e-01,
        6.5849000e-01,  6.5190000e-01,  6.4841000e-01,  6.4198000e-01,
        6.3491000e-01,  6.3249000e-01,  6.2665000e-01,  6.2600000e-01,
        6.2232000e-01,  6.1545000e-01,  6.0685000e-01,  6.0263000e-01,
        5.9587000e-01,  5.8638000e-01,  5.8424000e-01,  5.7939000e-01,
        5.7450000e-01,  5.7043000e-01,  5.5969000e-01,  5.5695000e-01,
        5.4932000e-01,  5.4812000e-01,  5.4367000e-01,  5.3879000e-01,
        5.3686000e-01,  5.2879000e-01,  5.2382000e-01,  5.1937000e-01,
        5.1186000e-01,  5.0677000e-01,  5.0225000e-01,  4.9454000e-01,
        4.9145000e-01,  4.8904000e-01,  4.8039000e-01,  4.7592000e-01,
        4.6927000e-01,  4.6786000e-01,  4.6612000e-01,  4.5630000e-01,
        4.5330000e-01,  4.4675000e-01,  4.4334000e-01,  4.3960000e-01,
        4.3498000e-01,  4.3198000e-01,  4.2996000e-01,  4.2571000e-01,
        4.2217000e-01,  4.1691000e-01,  4.1232000e-01,  4.0637000e-01,
        4.0498000e-01,  3.9972000e-01,  3.9665000e-01,  3.9526000e-01,
        3.8992000e-01,  3.8592000e-01,  3.8353000e-01,  3.7819000e-01,
        3.7562000e-01,  3.7012000e-01,  3.6667000e-01,  3.6449000e-01,
        3.6373000e-01,  3.6002000e-01,  3.5730000e-01,  3.4848000e-01,
        3.4569000e-01,  3.4490000e-01,  3.4128000e-01,  3.3940000e-01,
        3.3613000e-01,  3.3249000e-01,  3.2973000e-01,  3.2765000e-01,
        3.2381000e-01,  3.1977000e-01,  3.1729000e-01,  3.1322000e-01,
        3.1270000e-01,  3.0839000e-01,  3.0651000e-01,  3.0044000e-01,
        2.9930000e-01,  2.9620000e-01,  2.9310000e-01,  2.9106000e-01,
        2.8828000e-01,  2.8534000e-01,  2.8213000e-01,  2.8099000e-01,
        2.7622000e-01,  2.7458000e-01,  2.7121000e-01,  2.6574000e-01,
        2.6451000e-01,  2.6060000e-01,  2.5894000e-01,  2.5685000e-01,
        2.5616000e-01,  2.5399000e-01,  2.4877000e-01,  2.4819000e-01,
        2.4426000e-01,  2.4250000e-01,  2.3980000e-01,  2.3760000e-01,
        2.3326000e-01,  2.3218000e-01,  2.3085000e-01,  2.2616000e-01,
        2.2537000e-01,  2.2077000e-01,  2.1716000e-01,  2.1560000e-01,
        2.1364000e-01,  2.1291000e-01,  2.0978000e-01,  2.0699000e-01,
        2.0621000e-01,  2.0063000e-01,  1.9836000e-01,  1.9590000e-01,
        1.9374000e-01,  1.9142000e-01,  1.8968000e-01,  1.8794000e-01,
        1.8631000e-01,  1.8516000e-01,  1.8449000e-01,  1.8201000e-01,
        1.8090000e-01,  1.7891000e-01,  1.7795000e-01,  1.7381000e-01,
        1.7274000e-01,  1.7145000e-01,  1.7011000e-01,  1.6799000e-01,
        1.6567000e-01,  1.6308000e-01,  1.6256000e-01,  1.6174000e-01,
        1.5831000e-01,  1.5691000e-01,  1.5670000e-01,  1.5600000e-01,
        1.5263000e-01,  1.5044000e-01,  1.4839000e-01,  1.4730000e-01,
        1.4653000e-01,  1.4425000e-01,  1.4312000e-01,  1.4069000e-01,
        1.3928000e-01,  1.3620000e-01,  1.3583000e-01,  1.3389000e-01,
        1.3209000e-01,  1.3060000e-01,  1.2970000e-01,  1.2862000e-01,
        1.2638000e-01,  1.2432000e-01,  1.2242000e-01,  1.2144000e-01,
        1.1939000e-01,  1.1860000e-01,  1.1744000e-01,  1.1642000e-01,
        1.1516000e-01,  1.1317000e-01,  1.1229000e-01,  1.1175000e-01,
        1.0889000e-01,  1.0777000e-01,  1.0676000e-01,  1.0504000e-01,
        1.0425000e-01,  1.0269000e-01,  1.0086000e-01,  1.0022000e-01,
        9.9160000e-02,  9.6650000e-02,  9.6460000e-02,  9.4850000e-02,
        9.3730000e-02,  9.1600000e-02,  9.0870000e-02,  8.9740000e-02,
        8.9220000e-02,  8.7510000e-02,  8.5940000e-02,  8.5540000e-02,
        8.2910000e-02,  8.2400000e-02,  8.1290000e-02,  7.9800000e-02,
        7.8340000e-02,  7.7990000e-02,  7.6670000e-02,  7.5110000e-02,
        7.4570000e-02,  7.2920000e-02,  7.2240000e-02,  7.1680000e-02,
        7.0780000e-02,  6.9620000e-02,  6.9190000e-02,  6.7530000e-02,
        6.6550000e-02,  6.5100000e-02,  6.3840000e-02,  6.2950000e-02,
        6.1140000e-02,  6.0390000e-02,  5.9580000e-02,  5.8860000e-02,
        5.7650000e-02,  5.5900000e-02,  5.4950000e-02,  5.3290000e-02,
        5.3070000e-02,  5.1790000e-02,  5.1100000e-02,  5.0920000e-02,
        4.9890000e-02,  4.9330000e-02,  4.8760000e-02,  4.8000000e-02,
        4.7560000e-02,  4.6800000e-02,  4.4750000e-02,  4.4340000e-02,
        4.3540000e-02,  4.2540000e-02,  4.2110000e-02,  4.1670000e-02,
        4.1090000e-02,  4.1060000e-02,  3.9740000e-02,  3.9060000e-02,
        3.8180000e-02,  3.7290000e-02,  3.6730000e-02,  3.5450000e-02,
        3.4080000e-02,  3.3680000e-02,  3.3030000e-02,  3.2570000e-02,
        3.2110000e-02,  3.1790000e-02,  3.0570000e-02,  2.9530000e-02,
        2.9160000e-02,  2.8960000e-02,  2.7680000e-02,  2.7030000e-02,
        2.5880000e-02,  2.5310000e-02,  2.4840000e-02,  2.3760000e-02,
        2.3480000e-02,  2.2980000e-02,  2.2430000e-02,  2.1270000e-02,
        2.1010000e-02,  1.9560000e-02,  1.9080000e-02,  1.8360000e-02,
        1.8000000e-02,  1.7260000e-02,  1.6580000e-02,  1.6470000e-02,
        1.5730000e-02,  1.5040000e-02,  1.4060000e-02,  1.3340000e-02,
        1.2680000e-02,  1.1690000e-02,  9.4300000e-03,  8.8600000e-03,
        8.3800000e-03,  8.2400000e-03,  7.0800000e-03,  4.9000000e-03,
        4.3000000e-03,  4.4000000e-04,  0.0000000e+00,  0.0000000e+00,
        0.0000000e+00,  0.0000000e+00,  0.0000000e+00,  0.0000000e+00,
        0.0000000e+00,  0.0000000e+00,  0.0000000e+00,  0.0000000e+00,
        0.0000000e+00,  0.0000000e+00,  0.0000000e+00,  0.0000000e+00,
        0.0000000e+00,  0.0000000e+00,  0.0000000e+00,  0.0000000e+00,
        0.0000000e+00,  0.0000000e+00,  0.0000000e+00,  0.0000000e+00,
        0.0000000e+00,  0.0000000e+00,  0.0000000e+00,  0.0000000e+00,
        0.0000000e+00,  0.0000000e+00,  0.0000000e+00,  0.0000000e+00,
       -0.0000000e+00, -0.0000000e+00, -0.0000000e+00, -0.0000000e+00,
       -0.0000000e+00, -0.0000000e+00, -0.0000000e+00, -0.0000000e+00,
       -0.0000000e+00, -0.0000000e+00, -0.0000000e+00, -0.0000000e+00,
       -0.0000000e+00, -0.0000000e+00, -0.0000000e+00, -0.0000000e+00,
       -0.0000000e+00, -0.0000000e+00, -0.0000000e+00, -0.0000000e+00,
       -0.0000000e+00, -0.0000000e+00, -0.0000000e+00, -0.0000000e+00,
       -0.0000000e+00, -0.0000000e+00, -0.0000000e+00, -0.0000000e+00,
       -0.0000000e+00, -1.2942722e+02])

In [39]:
lamb


Out[39]:
array([ 6.82332889e+03,  3.49765773e+01,  3.05454052e+01,  2.94739973e+01,
        2.76816884e+01,  2.56005443e+01,  2.50775218e+01,  2.29420786e+01,
        2.21263831e+01,  1.79509266e+01,  1.71592610e+01,  1.64681422e+01,
        1.63671472e+01,  1.54784993e+01,  1.50606418e+01,  1.46377726e+01,
        1.35234948e+01,  1.32222298e+01,  1.30554228e+01,  1.26387470e+01,
        1.22127807e+01,  1.18670830e+01,  1.16154438e+01,  1.11677113e+01,
        1.09511531e+01,  1.08554288e+01,  1.04855571e+01,  1.02131959e+01,
        1.00500949e+01,  9.87683106e+00,  9.55190883e+00,  9.26393473e+00,
        9.10726331e+00,  8.94865005e+00,  8.86201213e+00,  8.65084745e+00,
        8.36526079e+00,  8.28965891e+00,  8.15408386e+00,  8.09275901e+00,
        7.98497434e+00,  7.82707312e+00,  7.67015090e+00,  7.58291047e+00,
        7.35112940e+00,  7.28438331e+00,  7.16402729e+00,  7.09968540e+00,
        7.01744496e+00,  6.84297705e+00,  6.75466702e+00,  6.61296201e+00,
        6.58492480e+00,  6.52603989e+00,  6.41265406e+00,  6.35893031e+00,
        6.33244182e+00,  6.17451934e+00,  6.09300463e+00,  5.92846565e+00,
        5.91258500e+00,  5.76944499e+00,  5.67849562e+00,  5.62515943e+00,
        5.58347496e+00,  5.49765385e+00,  5.41960802e+00,  5.40435988e+00,
        5.32291123e+00,  5.29791489e+00,  5.19134546e+00,  5.14660765e+00,
        5.03865478e+00,  4.94644872e+00,  4.90034049e+00,  4.85494584e+00,
        4.81130058e+00,  4.75612829e+00,  4.70030071e+00,  4.66240713e+00,
        4.64177721e+00,  4.52432885e+00,  4.48908283e+00,  4.44285946e+00,
        4.39626900e+00,  4.32829916e+00,  4.31841396e+00,  4.25717712e+00,
        4.22021501e+00,  4.14868136e+00,  4.09405301e+00,  4.00085585e+00,
        3.97835348e+00,  3.92704324e+00,  3.85570621e+00,  3.84795172e+00,
        3.82298258e+00,  3.70878378e+00,  3.68337716e+00,  3.64889792e+00,
        3.60735728e+00,  3.57082964e+00,  3.54340699e+00,  3.51232213e+00,
        3.46799594e+00,  3.43507593e+00,  3.41414856e+00,  3.37404030e+00,
        3.33201314e+00,  3.27308453e+00,  3.25517247e+00,  3.23073302e+00,
        3.19149796e+00,  3.18038571e+00,  3.10657298e+00,  3.10341595e+00,
        3.06289439e+00,  3.01282957e+00,  3.00579222e+00,  2.95903583e+00,
        2.92941540e+00,  2.89524641e+00,  2.87511552e+00,  2.84171409e+00,
        2.79435100e+00,  2.75563559e+00,  2.74251480e+00,  2.72715314e+00,
        2.71397643e+00,  2.68361031e+00,  2.62174189e+00,  2.61151288e+00,
        2.57637060e+00,  2.54596014e+00,  2.53816539e+00,  2.51157550e+00,
        2.48780835e+00,  2.47715276e+00,  2.46468096e+00,  2.40364454e+00,
        2.38455228e+00,  2.37977320e+00,  2.33884243e+00,  2.32264487e+00,
        2.30578080e+00,  2.28003614e+00,  2.25047833e+00,  2.23037927e+00,
        2.21874262e+00,  2.17930467e+00,  2.16350860e+00,  2.15880941e+00,
        2.13824047e+00,  2.11322901e+00,  2.10330560e+00,  2.07659040e+00,
        2.05266162e+00,  2.03201056e+00,  2.00361033e+00,  1.97826384e+00,
        1.97181538e+00,  1.94199961e+00,  1.92645496e+00,  1.91826448e+00,
        1.88340529e+00,  1.87502662e+00,  1.86173240e+00,  1.85017217e+00,
        1.81363970e+00,  1.80556396e+00,  1.79632349e+00,  1.75399868e+00,
        1.74030245e+00,  1.73595019e+00,  1.70785836e+00,  1.69071678e+00,
        1.68124338e+00,  1.65210744e+00,  1.64408708e+00,  1.63278521e+00,
        1.61137316e+00,  1.59389055e+00,  1.58370078e+00,  1.57822041e+00,
        1.55041640e+00,  1.54359431e+00,  1.52342343e+00,  1.51718991e+00,
        1.49507992e+00,  1.48608480e+00,  1.46945784e+00,  1.46473687e+00,
        1.45989210e+00,  1.45576799e+00,  1.42689122e+00,  1.41440420e+00,
        1.39533270e+00,  1.38827434e+00,  1.37724739e+00,  1.37131314e+00,
        1.36776711e+00,  1.35405824e+00,  1.33821997e+00,  1.32300071e+00,
        1.31599377e+00,  1.30046934e+00,  1.29540480e+00,  1.29245911e+00,
        1.27138701e+00,  1.25449539e+00,  1.24434012e+00,  1.23676692e+00,
        1.22587893e+00,  1.21729368e+00,  1.20701684e+00,  1.20079581e+00,
        1.18671565e+00,  1.17417642e+00,  1.15861961e+00,  1.15481754e+00,
        1.14836954e+00,  1.13054092e+00,  1.12750195e+00,  1.11712341e+00,
        1.10301908e+00,  1.09916497e+00,  1.08780224e+00,  1.07730549e+00,
        1.06580338e+00,  1.05365334e+00,  1.04836309e+00,  1.03537945e+00,
        1.02470427e+00,  1.02137895e+00,  1.00873241e+00,  1.00665538e+00,
        9.92094109e-01,  9.76841646e-01,  9.72763947e-01,  9.55020426e-01,
        9.48229980e-01,  9.38659446e-01,  9.32129820e-01,  9.23155939e-01,
        9.17868430e-01,  9.06627395e-01,  9.01162642e-01,  8.87793717e-01,
        8.78746422e-01,  8.66339394e-01,  8.62729466e-01,  8.51083849e-01,
        8.49782573e-01,  8.42301181e-01,  8.33984366e-01,  8.26888927e-01,
        8.19019593e-01,  8.11945546e-01,  8.03353443e-01,  7.98655398e-01,
        7.91099372e-01,  7.84601246e-01,  7.80653455e-01,  7.74576399e-01,
        7.67838639e-01,  7.58691218e-01,  7.50142268e-01,  7.41884545e-01,
        7.34709426e-01,  7.28961182e-01,  7.15631898e-01,  7.09589504e-01,
        7.04444381e-01,  7.00661330e-01,  6.91873689e-01,  6.86594010e-01,
        6.76327907e-01,  6.68952625e-01,  6.66303933e-01,  6.61032103e-01,
        6.58490829e-01,  6.51895510e-01,  6.48407275e-01,  6.41980873e-01,
        6.34908106e-01,  6.32495946e-01,  6.26654843e-01,  6.26000288e-01,
        6.22320342e-01,  6.15456872e-01,  6.06859435e-01,  6.02631195e-01,
        5.95872184e-01,  5.86373907e-01,  5.84244045e-01,  5.79387542e-01,
        5.74498889e-01,  5.70431560e-01,  5.59685816e-01,  5.56956968e-01,
        5.49313917e-01,  5.48116784e-01,  5.43666485e-01,  5.38794464e-01,
        5.36856860e-01,  5.28794309e-01,  5.23825298e-01,  5.19373878e-01,
        5.11859730e-01,  5.06770527e-01,  5.02248816e-01,  4.94541898e-01,
        4.91449757e-01,  4.89044596e-01,  4.80386963e-01,  4.75919567e-01,
        4.69271112e-01,  4.67865343e-01,  4.66116388e-01,  4.56295487e-01,
        4.53296291e-01,  4.46742371e-01,  4.43345502e-01,  4.39603898e-01,
        4.34978725e-01,  4.31979768e-01,  4.29970688e-01,  4.25715150e-01,
        4.22171680e-01,  4.16903602e-01,  4.12328656e-01,  4.06373847e-01,
        4.04974348e-01,  3.99721803e-01,  3.96654502e-01,  3.95252687e-01,
        3.89921286e-01,  3.85927874e-01,  3.83533125e-01,  3.78191132e-01,
        3.75616501e-01,  3.70119348e-01,  3.66670525e-01,  3.64498139e-01,
        3.63734789e-01,  3.60020169e-01,  3.57292838e-01,  3.48487646e-01,
        3.45692602e-01,  3.44894942e-01,  3.41277684e-01,  3.39400206e-01,
        3.36127433e-01,  3.32484348e-01,  3.29730222e-01,  3.27650198e-01,
        3.23807067e-01,  3.19770216e-01,  3.17278958e-01,  3.13211415e-01,
        3.12706168e-01,  3.08397343e-01,  3.06505046e-01,  3.00449238e-01,
        2.99301685e-01,  2.96198768e-01,  2.93101919e-01,  2.91055603e-01,
        2.88280548e-01,  2.85342044e-01,  2.82126680e-01,  2.80995048e-01,
        2.76215716e-01,  2.74588582e-01,  2.71216693e-01,  2.65735498e-01,
        2.64512580e-01,  2.60606679e-01,  2.58934001e-01,  2.56844634e-01,
        2.56158244e-01,  2.53996955e-01,  2.48761817e-01,  2.48189661e-01,
        2.44258382e-01,  2.42495407e-01,  2.39794193e-01,  2.37592661e-01,
        2.33261198e-01,  2.32169234e-01,  2.30851445e-01,  2.26165480e-01,
        2.25369815e-01,  2.20775595e-01,  2.17162753e-01,  2.15603004e-01,
        2.13635225e-01,  2.12902703e-01,  2.09769659e-01,  2.06989028e-01,
        2.06201741e-01,  2.00630716e-01,  1.98360317e-01,  1.95893104e-01,
        1.93745153e-01,  1.91421341e-01,  1.89671688e-01,  1.87934086e-01,
        1.86303797e-01,  1.85159606e-01,  1.84502498e-01,  1.82011859e-01,
        1.80904716e-01,  1.78905899e-01,  1.77948340e-01,  1.73802786e-01,
        1.72736335e-01,  1.71452985e-01,  1.70115172e-01,  1.67996255e-01,
        1.65675079e-01,  1.63084372e-01,  1.62562075e-01,  1.61748909e-01,
        1.58311264e-01,  1.56896248e-01,  1.56701215e-01,  1.55995690e-01,
        1.52632049e-01,  1.50441903e-01,  1.48394634e-01,  1.47301575e-01,
        1.46525513e-01,  1.44241699e-01,  1.43119491e-01,  1.40691941e-01,
        1.39290599e-01,  1.36200099e-01,  1.35829819e-01,  1.33883246e-01,
        1.32090337e-01,  1.30605743e-01,  1.29700970e-01,  1.28610833e-01,
        1.26385101e-01,  1.24320587e-01,  1.22415279e-01,  1.21447787e-01,
        1.19399047e-01,  1.18599560e-01,  1.17441968e-01,  1.16424651e-01,
        1.15166246e-01,  1.13166426e-01,  1.12287671e-01,  1.11745298e-01,
        1.08890230e-01,  1.07764177e-01,  1.06762011e-01,  1.05038026e-01,
        1.04250594e-01,  1.02691265e-01,  1.00858139e-01,  1.00212822e-01,
        9.91671615e-02,  9.66550044e-02,  9.64519902e-02,  9.48517096e-02,
        9.37296160e-02,  9.15998343e-02,  9.08617654e-02,  8.97409750e-02,
        8.92331558e-02,  8.75096814e-02,  8.59363266e-02,  8.55461661e-02,
        8.29006790e-02,  8.24031017e-02,  8.12921708e-02,  7.98045925e-02,
        7.83401789e-02,  7.79916813e-02,  7.66681456e-02,  7.51024215e-02,
        7.45678903e-02,  7.29132028e-02,  7.22349940e-02,  7.16699473e-02,
        7.07852334e-02,  6.96184592e-02,  6.91886973e-02,  6.75296312e-02,
        6.65563780e-02,  6.51000240e-02,  6.38377670e-02,  6.29433692e-02,
        6.11339081e-02,  6.03935557e-02,  5.95733165e-02,  5.88627469e-02,
        5.76483373e-02,  5.59096005e-02,  5.49533796e-02,  5.32876641e-02,
        5.30697334e-02,  5.17821481e-02,  5.11081053e-02,  5.09240525e-02,
        4.98995505e-02,  4.93252124e-02,  4.87586305e-02,  4.79965967e-02,
        4.75634827e-02,  4.67940591e-02,  4.47531737e-02,  4.43390761e-02,
        4.35462575e-02,  4.25425739e-02,  4.21208646e-02,  4.16642946e-02,
        4.10882048e-02,  4.10541727e-02,  3.97367475e-02,  3.90571876e-02,
        3.81872270e-02,  3.72944362e-02,  3.67244507e-02,  3.54495703e-02,
        3.40826188e-02,  3.36894697e-02,  3.30308407e-02,  3.25746564e-02,
        3.21164957e-02,  3.17931780e-02,  3.05679730e-02,  2.95307377e-02,
        2.91550633e-02,  2.89627896e-02,  2.76823773e-02,  2.70318891e-02,
        2.58864931e-02,  2.53061494e-02,  2.48339900e-02,  2.37689535e-02,
        2.34911054e-02,  2.29758237e-02,  2.24261697e-02,  2.12703232e-02,
        2.10143679e-02,  1.95601520e-02,  1.90830787e-02,  1.83628231e-02,
        1.79977581e-02,  1.72544582e-02,  1.65747395e-02,  1.64728995e-02,
        1.57327378e-02,  1.50346423e-02,  1.40661869e-02,  1.33452227e-02,
        1.26801415e-02,  1.16906371e-02,  9.42402425e-03,  8.86178823e-03,
        8.38603261e-03,  8.23326252e-03,  7.08020013e-03,  4.89603851e-03,
        4.29438870e-03,  4.45730088e-04,  4.16772038e-05,  4.05453133e-05,
        3.92790226e-05,  3.53707633e-05,  3.31102407e-05,  2.95750974e-05,
        2.92202782e-05,  2.75660271e-05,  2.66530674e-05,  2.44473304e-05,
        2.40326225e-05,  2.29104425e-05,  2.13196303e-05,  1.96168472e-05,
        1.90377512e-05,  1.70899301e-05,  1.60587454e-05,  1.52367866e-05,
        1.31105538e-05,  1.28314811e-05,  1.14746573e-05,  9.71289544e-06,
        8.33760549e-06,  7.77750601e-06,  5.38483705e-06,  4.25459364e-06,
        3.77084510e-06,  2.04178083e-06, -4.14181528e-07, -2.51624311e-06,
       -2.99152830e-06, -3.88292718e-06, -4.87964105e-06, -5.81593114e-06,
       -6.52770387e-06, -7.49750767e-06, -9.83438688e-06, -1.03433449e-05,
       -1.11889196e-05, -1.26767186e-05, -1.37656109e-05, -1.45437453e-05,
       -1.59201923e-05, -1.61692189e-05, -1.65320737e-05, -1.99711656e-05,
       -2.03740891e-05, -2.11371620e-05, -2.45358514e-05, -2.52036309e-05,
       -2.65580824e-05, -2.74628652e-05, -2.89940915e-05, -3.15943279e-05,
       -3.31336651e-05, -3.50442530e-05, -3.66019352e-05, -4.02890157e-05,
       -4.10964295e-05, -1.29427212e+02])

In [15]:
plt.hist(A, bins=50)


Out[15]:
(array([  1.,   1.,   0.,   0.,   0.,   0.,   0.,   0.,   0.,   0.,   2.,
          1.,   0.,   1.,   0.,   1.,   0.,   1.,   0.,   0.,   0.,   0.,
          0.,   1.,   2.,   1.,   0.,   0.,   2.,   1.,   1.,   0.,   4.,
          3.,   6.,   6.,  17., 305., 178.,  25.,  16.,  14.,  13.,  13.,
          4.,   3.,   2.,   0.,   2.,   3.]),
 array([-1.9499000e+00, -1.8985568e+00, -1.8472136e+00, -1.7958704e+00,
        -1.7445272e+00, -1.6931840e+00, -1.6418408e+00, -1.5904976e+00,
        -1.5391544e+00, -1.4878112e+00, -1.4364680e+00, -1.3851248e+00,
        -1.3337816e+00, -1.2824384e+00, -1.2310952e+00, -1.1797520e+00,
        -1.1284088e+00, -1.0770656e+00, -1.0257224e+00, -9.7437920e-01,
        -9.2303600e-01, -8.7169280e-01, -8.2034960e-01, -7.6900640e-01,
        -7.1766320e-01, -6.6632000e-01, -6.1497680e-01, -5.6363360e-01,
        -5.1229040e-01, -4.6094720e-01, -4.0960400e-01, -3.5826080e-01,
        -3.0691760e-01, -2.5557440e-01, -2.0423120e-01, -1.5288800e-01,
        -1.0154480e-01, -5.0201600e-02,  1.1416000e-03,  5.2484800e-02,
         1.0382800e-01,  1.5517120e-01,  2.0651440e-01,  2.5785760e-01,
         3.0920080e-01,  3.6054400e-01,  4.1188720e-01,  4.6323040e-01,
         5.1457360e-01,  5.6591680e-01,  6.1726000e-01]),
 <a list of 50 Patch objects>)

In [12]:
B.shape


Out[12]:
(630, 630)

In [18]:
import Bio.PDB as bio
one_to_index = bio.Polypeptide.one_to_index

In [5]:
A.shape


Out[5]:
(630,)

In [ ]: