array - Maple Help

convert/array

convert to array

 Calling Sequence convert(object, array)

Parameters

 object - list, table, or array

Description

 • The convert/array function converts a list, a table, or an array to an array.
 • When the input object is an array, convert/array will return the object in a dense representation.
 • Note: The command array has been superseded by Array.

Examples

 > $\mathrm{convert}\left(\left[\left[1,2\right],\left[3,4\right]\right],\mathrm{array}\right)$
 $\left[\begin{array}{cc}{1}& {2}\\ {3}& {4}\end{array}\right]$ (1)
 > $A≔\mathrm{linalg}\left[\mathrm{randmatrix}\right]\left(3,3,\mathrm{symmetric}\right)$
 ${A}{≔}\left[\begin{array}{ccc}{-7}& {22}& {-94}\\ {22}& {-55}& {87}\\ {-94}& {87}& {-56}\end{array}\right]$ (2)
 > $\mathrm{lprint}\left(\right)$
 array(symmetric,1 .. 3, 1 .. 3,[(3, 3)=-56,(1, 2)=22,(1, 3)=-94,(1, 1)=-7,(2, 3)=87,(2, 2)=-55])
 > $\mathrm{convert}\left(A,\mathrm{array}\right)$
 $\left[\begin{array}{ccc}{-7}& {22}& {-94}\\ {22}& {-55}& {87}\\ {-94}& {87}& {-56}\end{array}\right]$ (3)
 > $\mathrm{lprint}\left(\right)$
 array(1 .. 3, 1 .. 3,[(2, 3)=87,(3, 2)=87,(2, 1)=22,(3, 3)=-56,(2, 2)=-55,(3, 1)=-94,(1, 3)=-94,(1, 2)=22,(1, 1)=-7])