ravel

x.ravel()で一次元配列(n-size,)を返す

x.flatten()でも同様.ただしravelのほうがmemoryのコピーを行わず,flattenよりも高速になる可能性があるらしい.

x.ravel() gives (n-size,) numpy array without copying the data to new memory space. x1

The same effect is done by flatten, but it is suggested that ravel can be faster than flatten.