It seems that the mode specification for the collapse function has to be a np array. It would be useful if that were a bit more flexible. For instance:,` T.collapse(np.array([0]))` should be able to be written as ` T.collapse(0)`.