I don’t get any errors with your code. I do, however, get a Max window error message from the outlet() call on line 11:
js: bad outlet index 1 [test]
This is because your outlet doesn’t yet exist. You should call it in one of your functions to be sure that the object is constructed properly. I believe the loadbang() function executes automatically if you define it. Outlet() calls are safe there.
No errors for your array assignement…
for your setting method of matrix, you declare variable "outmatrix" as a 2D BUT you call method setcell3D, try "outmatrix.setcell2d([i,0],p_array)" to set your datas