Skip to content
This repository was archived by the owner on Nov 8, 2022. It is now read-only.

flatten

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

var pa = new ParallelArray([ [1,2], [3,4] ]); // `pa` has shape [2,2]
var paFlat = pa.flatten(); // `paFlat` has shape [4]
Clone this wiki locally