In numpy one can use the 'newaxis' object in the slicing syntax to create an axis of length one, e.g.: import numpy as np print np.zeros((3,5))[:,np.newaxis ...
確定! 回上一頁