ArrayOptions - Maple Help

ArrayOptions

display or set Array options

 Calling Sequence ArrayOptions(A, opt1, opt2, ...)

Parameters

 A - Array object opt1, opt2, ... - (optional) option name or equation of the form option = value

Description

 • The ArrayOptions(A) function returns an expression sequence of equations consisting of the option names and their values for Array A.
 The expression sequence that is returned does not include the subtype option since it is implicitly Array.
 • The ArrayOptions(A, opt1, opt2, ...) function, where each opti is an option name, returns an expression sequence of equations indicating only the values of each opti specified in the calling sequence.
 The subtype option cannot be queried since it is implicitly Array.
 • The ArrayOptions(A, opt1, opt2, ...) function, where each opti is an equation of the form option = value, assigns each specified option opti of A the indicated value (if possible). Options that are not specified are not changed.
 Not all Array options can be modified. In particular, only the following options can be changed.
 – order=C_order can be changed to order=Fortran_order, and vice-versa, but this implicitly transposes the Array because the actual elements are not moved.
 – readonly can be set, but not unset.
 – attributes can be changed. This is equivalent to using setattribute, which also works in-place (on rtables and names).
 • This operation works in-place; Array A is modified.

 • The ArrayOptions command is thread-safe as of Maple 15.

Examples

 > $\mathrm{with}\left(\mathrm{LinearAlgebra}\right):$
 > $A≔\mathrm{Array}\left(\left[\left[1,2,3\right],\left[4,5,6\right],\left[7,8,9\right],\left[10,11,12\right]\right]\right)$
 ${A}{≔}\left[\begin{array}{ccc}{1}& {2}& {3}\\ {4}& {5}& {6}\\ {7}& {8}& {9}\\ {10}& {11}& {12}\end{array}\right]$ (1)
 > $\mathrm{ArrayOptions}\left(A\right)$
 ${\mathrm{datatype}}{=}{\mathrm{anything}}{,}{\mathrm{storage}}{=}{\mathrm{rectangular}}{,}{\mathrm{order}}{=}{\mathrm{Fortran_order}}$ (2)
 > $\mathrm{ArrayOptions}\left(A,\mathrm{storage},\mathrm{datatype}\right)$
 ${\mathrm{rectangular}}{,}{\mathrm{anything}}$ (3)
 > $\mathrm{ArrayOptions}\left(A,\mathrm{readonly}=\mathrm{true},\mathrm{order}=\mathrm{C_order}\right)$
 > $\mathrm{ArrayOptions}\left(A\right)$
 ${\mathrm{datatype}}{=}{\mathrm{anything}}{,}{\mathrm{storage}}{=}{\mathrm{rectangular}}{,}{\mathrm{order}}{=}{\mathrm{C_order}}{,}{\mathrm{readonly}}$ (4)