使用ILNumerics,我试图以最有效的方式采用ILArray <>的前n列。删除ILArray <>元素
using(ILScope.Enter(inframe)
{
ILArray<complex> frame = ILMath.check(inframe);
int[] dims = frame.Size.ToIntArray(); //frame is a 2d ILArray
frame.SetRange(complex.Zero, dims[0] -1 , (dims[1] * 2 - 1)); //doubles the size of the array with zeros.
//TODO- various computations.
frame.SetRange(null, dims[0], dims[1] - 1); //EXCEPTION: why doesn't this work?
}
在这个例子中,我想只取帧的前半部分,但是我无法将其大小恢复为原始大小。我尝试了各种基于http://ilnumerics.net/ArrayAlter.html的排列,但都没有成功。