嗨,我想恢复通过堆叠两个较小的数组而制成的两个复合numpy数组。我需要为每一个香料切片,我可以帮助我。
我有两个彼此堆叠的ndarrays
frame = np.hstack([thought1,pix])
pix和Thought1的形状等于(1080,1920,3)为他们两个
框架的堆叠形状为(1080,3840,3)我想通过切片从帧中恢复Thought1和pix它
frame = np.hstack([thought1,pix])
np.hstack的'inverse'为np.hsplit
thought1, pix = np.hsplit(np.hstack([thought1,pix]), [thought1.shape[1]])