You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 8, 2022. It is now read-only.
Lindsey Kuper edited this page Feb 9, 2015
·
4 revisions
Description
flatten flattens an n-dimensional ParallelArray to n-1 dimensions. It takes no arguments and returns a new ParallelArray whose outermost two dimensions have been collapsed into one.
Synopsis
myParallelArray.flatten()
Arguments
None.
Returns
A freshly minted ParallelArray whose outermost two dimensions have been collapsed into one.
Examples
// `pa` has shape [2,2]varpa=newParallelArray([[1,2],[3,4]]);// `paFlat` has shape [4]varpaFlat=pa.flatten();// `pa1` has shape [2,2,2]varpa1=newParallelArray([[[1,1],[2,2]],[[3,3],[4,4]]]);// `pa1Flat` has shape [4,2]; its first element is [1, 1]varpa1Flat=pa1.flatten();