next up previous

4.1 Array Operations     continued...

Note that, for example, a 3x2 array is not conformable with a 2x3 array-they have the same rank and total number of elements, but corresponding dimensions don't have the same size-and thus two such arrays cannot be the operands in the same array operation. The only exception to this basic conformability rule is in the event that one of the operands is a scalar. In this case the scalar is ``broadcast" into an array conformable with the other operand, the value of each element of this broadcast array being that of the scalar. For example, is a valid array operation and (assuming is as given above) the result of is

Common uses of (broadcast) scalars in array operations are to initialize and scale arrays: