Module Import alias Import alias identifier Import alias identifier ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr keyword Num decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Num Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Num Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore BinOpAdd NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Assign NameStore Call AttributeLoad BinOpPow BinOpSub Call AttributeLoad NameLoad attr NameLoad Num attr Expr Call AttributeLoad NameLoad attr NameLoad Num decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Num Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Num Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr TupleLoad SubscriptLoad AttributeLoad NameLoad attr Index Num SubscriptLoad AttributeLoad NameLoad attr Index Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad keyword NameLoad Assign NameStore Call AttributeLoad BinOpPow BinOpSub Call AttributeLoad NameLoad attr NameLoad Num attr Expr Call AttributeLoad NameLoad attr NameLoad Num keyword Num decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Num Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Num Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr TupleLoad SubscriptLoad AttributeLoad NameLoad attr Index Num SubscriptLoad AttributeLoad NameLoad attr Index Num Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr keyword NameLoad Assign NameStore Call AttributeLoad BinOpPow BinOpSub Call AttributeLoad NameLoad attr NameLoad Num attr Expr Call AttributeLoad NameLoad attr NameLoad Num keyword Num decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore BinOpAdd Num Call AttributeLoad AttributeLoad NameLoad attr attr Num Num Assign NameStore Call AttributeLoad NameLoad attr TupleLoad Num Num Assign NameStore Call AttributeLoad NameLoad attr TupleLoad Num Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr keyword Num keyword NameLoad Expr Call AttributeLoad NameLoad attr keyword Num keyword NameLoad Assign NameStore Call AttributeLoad BinOpPow BinOpSub Call AttributeLoad NameLoad attr Call AttributeLoad Call AttributeLoad NameLoad attr keyword Num attr Num Num Num attr Expr Call AttributeLoad NameLoad attr NameLoad Num keyword Num Assign NameStore Call AttributeLoad BinOpPow BinOpSub Call AttributeLoad NameLoad attr Call AttributeLoad Call AttributeLoad NameLoad attr keyword Num attr Num Num Num attr Expr Call AttributeLoad NameLoad attr NameLoad Num keyword Num decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Num Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr TupleLoad Num Num Expr Call AttributeLoad NameLoad attr keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr BinOpSub NameLoad Call AttributeLoad NameLoad attr keyword Num AugAssignDiv NameStore Call AttributeLoad NameLoad attr keyword Num Assign NameStore Call AttributeLoad BinOpPow BinOpSub Call AttributeLoad NameLoad attr NameLoad Num attr Expr Call AttributeLoad NameLoad attr NameLoad Num keyword Num decorator_list decorator_list If CompareEq NameLoad Str body Expr Call AttributeLoad NameLoad attr
N/A N/A unittest N/A eigenmat mat N/A numpy np TestEigenMat N/A N/A unittest TestCase N/A setUp N/A N/A self N/A N/A N/A N/A N/A N/A mat EigenMatrix init_random seed 1 N/A test_add N/A N/A self N/A N/A N/A x N/A N/A N/A np random randn 10 10 N/A y N/A N/A N/A np random randn 10 10 N/A eig_x N/A N/A mat EigenMatrix x N/A eig_y N/A N/A mat EigenMatrix y N/A eig_z N/A N/A mat empty N/A x shape N/A z N/A x y N/A N/A N/A eig_x add eig_y target eig_z N/A diff N/A N/A N/A N/A N/A N/A eig_z asarray z 2 sum N/A N/A N/A self assertAlmostEqual diff 0 N/A test_dot N/A N/A self N/A N/A N/A x N/A N/A N/A np random randn 500 1000 N/A y N/A N/A N/A np random randn 1000 600 N/A eig_x N/A N/A mat EigenMatrix x N/A eig_y N/A N/A mat EigenMatrix y N/A eig_z N/A N/A mat empty N/A N/A N/A x shape N/A 0 N/A N/A y shape N/A 1 N/A z N/A N/A x dot y N/A N/A N/A mat dot eig_x eig_y target eig_z N/A diff N/A N/A N/A N/A N/A N/A eig_z asarray z 2 sum N/A N/A N/A self assertAlmostEqual diff 0 places 5 N/A test_dot_transposed N/A N/A self N/A N/A N/A x N/A N/A N/A np random randn 500 1000 N/A y N/A N/A N/A np random randn 600 1000 N/A eig_x N/A N/A mat EigenMatrix x N/A eig_y N/A N/A mat EigenMatrix y N/A eig_z N/A N/A mat empty N/A N/A N/A x shape N/A 0 N/A N/A y shape N/A 0 N/A z N/A N/A x dot N/A y T N/A N/A N/A mat dot eig_x N/A eig_y T target eig_z N/A diff N/A N/A N/A N/A N/A N/A eig_z asarray z 2 sum N/A N/A N/A self assertAlmostEqual diff 0 places 5 N/A test_sum_by_axis N/A N/A self N/A N/A N/A x N/A 1.1 N/A N/A N/A np random randn 10 1000 N/A y N/A N/A np zeros N/A 1 1000 N/A z N/A N/A np zeros N/A 10 1 N/A eig_x N/A N/A mat EigenMatrix x N/A eig_y N/A N/A mat EigenMatrix y N/A eig_z N/A N/A mat EigenMatrix z N/A N/A N/A eig_x sum axis 0 target eig_y N/A N/A N/A eig_x sum axis 1 target eig_z N/A diff N/A N/A N/A N/A N/A N/A eig_y asarray N/A N/A N/A N/A x sum axis 0 reshape 1 -1 2 sum N/A N/A N/A self assertAlmostEqual diff 0 places 5 N/A diff N/A N/A N/A N/A N/A N/A eig_z asarray N/A N/A N/A N/A x sum axis 1 reshape -1 1 2 sum N/A N/A N/A self assertAlmostEqual diff 0 places 5 N/A test_apply_softmax N/A N/A self N/A N/A N/A x N/A N/A N/A np random randn 100 10 N/A eig_x N/A N/A mat EigenMatrix x N/A eig_y N/A N/A mat empty N/A 100 10 N/A N/A N/A eig_x apply_softmax target eig_y N/A y N/A N/A np exp N/A x N/A N/A x max axis 0 N/A y N/A N/A y sum axis 0 N/A diff N/A N/A N/A N/A N/A N/A eig_y asarray y 2 sum N/A N/A N/A self assertAlmostEqual diff 0 places 5 N/A N/A N/A N/A __name__ __main__ N/A N/A N/A N/A unittest main