import numpy as np
from zhou_accv_2018 import e3q3
A = np.array([[ 1, 1, 1, 0, 0, 0, 0, 0, 0, -4],
[ 1, 1, 1, 0, 0, 0, -4, 0, 0, 3],
[ 1, 1, 1, 0, 0, 0, -3.5, 0, 0, 2.125]])
a_gt = 1.75
b_gt = np.sqrt(15)/4
c_gt = 0
v_gt = np.reshape(np.array([a_gt**2, b_gt**2, c_gt**2, a_gt*b_gt, a_gt*c_gt, b_gt*c_gt, a_gt, b_gt, c_gt, 1]), (-1, 1))
print(np.matmul(A, v_gt)) # should be 3 zero's
a, b, c = e3q3(A, True)
$ python test_e3q3.py
[[0.]
[0.]
[0.]]
Traceback (most recent call last):
File "test_e3q3.py", line 16, in <module>
a, b, c = e3q3(A, True)
File "/home/dkoppel/Downloads/zhou-accv-2018-master/dan2/lib/python3.6/site-packages/zhou_accv_2018-1.0.0-py3.6-linux-x86_64.egg/zhou_accv_2018/e3q3.py", line 60, in e3q3
A_r = (A.T)[perms[min_idx]]
TypeError: list indices must be integers or slices, not NoneType