Error Messages/40045

Error Text

Trying to combine two arrays with implicit indexes. An array can contain only one implicit index. One cure might be to define at least one of these as an explicit index.

Description

Each dimension of a multi-dimensional array in Analytica is associated with an index. The one exception to this rule is that an array can have one implicit dimension, but only one. This error message occurs when you perform an operation would result in two or more implicit dimensions.

The constraint of allowing at most one implicit dimension in an array ensures that we can always unambiguously specify which dimension we want to operate over whenever we perform an array operation. For example, if we want to find the maximum value along the I index, we can write Max(A,I). Since an implicit dimension has no name (because it is implicit), we can't name it in this fashion; however, in most cases, Analytica allows you to omit the index, such that if the array contains an implicit dimension, you want to operate over that dimension. If an array were to contain multiple implicit dimensions, it would be impossible to unambiguously identify the dimension of interest; hence, more than one implicit dimension results in this error.

An implicit dimension gets promoted to become a self-index if it still exists in the final result for a variable (after the promotion, the dimension is no longer implicit since at that point, it has a name). Again, if there were two implicit dimensions, it would be ambigous as to which one should be promoted.

Examples

[1,2,3] * [4,5,6] → Error: Trying to combine two arrays with implicit indexes.
SplitText( ["1,2,3","4,5","8","9,10,11,12"], ',' ) → Error: Trying to combine two arrays with implicit indexes.


Remedies

The remedy to this problem is to replace one of the implicit dimensions with an explicit dimension.

Index X1 := [1,2,3] Do X1 * [4,5,6] →
(implicit dimension)
X1 1 4 5 6
2 8 10 12
3 12 15 18
Comments


You are not allowed to post comments.