How to set the input transforms for calibration

I collected a stack of transform data(np.array([matrix][matrix][matrix]…)) in different times and I tend to use spin calibration in 3d slicer to get the transform to calculate the spin axis.I have tried this code but seems not correct.
calibrationSuccess = slicer.modules.pivotcalibration.logic().ComputeSpinCalibration()
I donnot know how to set up the input datas, and I also tried ‘AddToolToReferenceMatrix(…)’ one by one, but the slicer was crashed.

You need to convert the numpy array to VTK matrix using slicer.util.vtkMatrixFromArray.