if (ux < v->size1)
{
- msg (SE, _("Argument to GSCH with dimensions (%zu,%zu) contains only "
+ msg (SE, _("%zu×%zu argument to GSCH contains only "
"%zu linearly independent columns."),
v->size1, v->size2, ux);
gsl_matrix_free (u);
else
{
msg (SE, _("Operands to %s must have the same dimensions or one "
- "must be a scalar, not matrices with dimensions (%zu,%zu) "
- "and (%zu,%zu)."),
+ "must be a scalar, not %zu×%zu and %zu×%zu matrices."),
matrix_op_name (op), a->size1, a->size2, b->size1, b->size2);
return NULL;
}
if (a->size2 != b->size1)
{
- msg (SE, _("Matrices with dimensions (%zu,%zu) and (%zu,%zu) are "
+ msg (SE, _("Matrices with dimensions %zu×%zu and %zu×%zu are "
"not conformable for multiplication."),
a->size1, a->size2, b->size1, b->size2);
return NULL;
if (x->size1 != x->size2)
{
msg (SE, _("Matrix exponentation with ** requires a square matrix on "
- "the left-hand size, not one with dimensions (%zu,%zu)."),
+ "the left-hand size, not one with dimensions %zu×%zu."),
x->size1, x->size2);
return NULL;
}
if (!is_scalar (b))
{
msg (SE, _("Matrix exponentiation with ** requires a scalar on the "
- "right-hand side, not a matrix with dimensions (%zu,%zu)."),
+ "right-hand side, not a matrix with dimensions %zu×%zu."),
b->size1, b->size2);
return NULL;
}
{
case IV_VECTOR:
msg (SE, _("Vector index must be scalar or vector, not a "
- "matrix with dimensions (%zu,%zu)."),
+ "%zu×%zu matrix."),
m->size1, m->size2);
break;
case IV_ROW:
msg (SE, _("Matrix row index must be scalar or vector, not a "
- "matrix with dimensions (%zu,%zu)."),
+ "%zu×%zu matrix."),
m->size1, m->size2);
break;
case IV_COLUMN:
msg (SE, _("Matrix column index must be scalar or vector, not a "
- "matrix with dimensions (%zu,%zu)."),
+ "%zu×%zu matrix."),
m->size1, m->size2);
break;
}
break;
case IV_ROW:
- msg (SE, _("%g is not a valid row index for a matrix "
- "with dimensions (%zu,%zu)."),
+ msg (SE, _("%g is not a valid row index for "
+ "a %zu×%zu matrix."),
index, size, other_size);
break;
case IV_COLUMN:
- msg (SE, _("%g is not a valid column index for a matrix "
- "with dimensions (%zu,%zu)."),
+ msg (SE, _("%g is not a valid column index for "
+ "a %zu×%zu matrix."),
index, other_size, size);
break;
}
{
if (!is_vector (sm))
{
- msg (SE, _("Vector index operator must be applied to vector, "
- "not a matrix with dimensions (%zu,%zu)."),
+ msg (SE, _("Vector index operator may not be applied to "
+ "a %zu×%zu matrix."),
sm->size1, sm->size2);
return NULL;
}
if (!is_scalar (subs[index]))
{
msg (SE, _("Function %s argument %zu must be a scalar, "
- "but it has dimensions (%zu,%zu)."),
+ "not a %zu×%zu matrix."),
name, index + 1, subs[index]->size1, subs[index]->size2);
return false;
}
if (!is_vector (subs[index]))
{
msg (SE, _("Function %s argument %zu must be a vector, "
- "but it has dimensions (%zu,%zu)."),
+ "not a %zu×%zu matrix."),
name, index + 1, subs[index]->size1, subs[index]->size2);
return false;
}
if (!is_scalar (m))
{
msg (SE, _("Expression for %s must evaluate to scalar, "
- "not a matrix with dimensions (%zu,%zu)."),
+ "not a %zu×%zu matrix."),
context, m->size1, m->size2);
gsl_matrix_free (m);
return false;
/* Convert source matrix 'sm' to source vector 'sv'. */
if (!is_vector (sm))
{
- msg (SE, _("Can't assign matrix with dimensions (%zu,%zu) to subvector."),
+ msg (SE, _("Can't assign %zu×%zu matrix to subvector."),
sm->size1, sm->size2);
return false;
}
gsl_vector sv = to_vector (sm);
if (iv->n != sv.size)
{
- msg (SE, _("Can't assign vector with %zu elements "
- "to subvector with %zu."), sv.size, iv->n);
+ msg (SE, _("Can't assign %zu-element vector "
+ "to %zu-element subvector."), sv.size, iv->n);
return false;
}
}
else if (dm->size1 == 0 || dm->size2 == 0)
{
- msg (SE, _("Cannot index matrix with dimensions (%zu,%zu)."),
+ msg (SE, _("Cannot index %zu×%zu matrix."),
dm->size1, dm->size2);
return false;
}
{
if (!is_vector (dm))
{
- msg (SE, _("Can't use vector indexing on matrix %s with "
- "dimensions (%zu,%zu)."),
- lvalue->var->name, dm->size1, dm->size2);
+ msg (SE, _("Can't use vector indexing on %zu×%zu matrix %s."),
+ dm->size1, dm->size2, lvalue->var->name);
return false;
}
return matrix_lvalue_evaluate_vector (lvalue->indexes[0],
if (size[0] != submatrix_size[0] || size[1] != submatrix_size[1])
{
msg (SE, _("SIZE (%zu,%zu) differs from submatrix dimensions "
- "(%zu,%zu)."),
+ "%zu×%zu."),
size[0], size[1],
submatrix_size[0], submatrix_size[1]);
free (iv0.indexes);
if (read->symmetric && size[0] != size[1])
{
- msg (SE, _("Cannot read matrix with non-square dimensions (%zu,%zu) "
+ msg (SE, _("Cannot read non-square %zu×%zu matrix "
"using READ with MODE=SYMMETRIC."),
size[0], size[1]);
free (iv0.indexes);
if (write->triangular && m->size1 != m->size2)
{
msg (SE, _("WRITE with MODE=TRIANGULAR requires a square matrix but "
- "the matrix to be written has dimensions (%zu,%zu)."),
+ "the matrix to be written has dimensions %zu×%zu."),
m->size1, m->size2);
gsl_matrix_free (m);
return;
if (!is_vector (m))
{
- msg (SE, _("%s expression must evaluate to vector, not a matrix with "
- "dimensions (%zu,%zu)."),
+ msg (SE, _("%s expression must evaluate to vector, "
+ "not a %zu×%zu matrix."),
name, m->size1, m->size2);
gsl_matrix_free (m);
return NULL;
gsl_matrix_set (dst, i, i, gsl_vector_get (&v, i));
}
else
- msg (SE, _("SETDIAG argument 2 must be a scalar or a vector but it "
- "has dimensions (%zu,%zu)."),
+ msg (SE, _("SETDIAG argument 2 must be a scalar or a vector, "
+ "not a %zu×%zu matrix."),
src->size1, src->size2);
gsl_matrix_free (src);
}
4 5 6
7 8 9
-matrix.sps:24: error: MATRIX: 0 is not a valid row index for a matrix with
-dimensions (3,3).
+matrix.sps:24: error: MATRIX: 0 is not a valid row index for a 3×3 matrix.
-matrix.sps:25: error: MATRIX: 0 is not a valid column index for a matrix with
-dimensions (3,3).
+matrix.sps:25: error: MATRIX: 0 is not a valid column index for a 3×3 matrix.
-matrix.sps:26: error: MATRIX: 4 is not a valid row index for a matrix with
-dimensions (3,3).
+matrix.sps:26: error: MATRIX: 4 is not a valid row index for a 3×3 matrix.
-matrix.sps:27: error: MATRIX: 4 is not a valid column index for a matrix with
-dimensions (3,3).
+matrix.sps:27: error: MATRIX: 4 is not a valid column index for a 3×3 matrix.
{}(:,{})
{}({},{})
matrix.sps:33: error: MATRIX: Matrix row index must be scalar or vector, not a
-matrix with dimensions (2,2).
+2×2 matrix.
matrix.sps:34: error: MATRIX: Matrix column index must be scalar or vector, not
-a matrix with dimensions (2,2).
+a 2×2 matrix.
])
AT_CLEANUP
matrix.sps:10: error: MATRIX: Row index vector for assignment to x has 3
elements but source matrix has 1 rows.
-matrix.sps:11: error: MATRIX: Can't use vector indexing on matrix x with
-dimensions (3,3).
+matrix.sps:11: error: MATRIX: Can't use vector indexing on 3×3 matrix x.
-matrix.sps:12: error: MATRIX: 0 is not a valid row index for a matrix with
-dimensions (3,3).
+matrix.sps:12: error: MATRIX: 0 is not a valid row index for a 3×3 matrix.
-matrix.sps:13: error: MATRIX: 0 is not a valid column index for a matrix with
-dimensions (3,3).
+matrix.sps:13: error: MATRIX: 0 is not a valid column index for a 3×3 matrix.
-matrix.sps:14: error: MATRIX: 0 is not a valid row index for a matrix with
-dimensions (3,3).
+matrix.sps:14: error: MATRIX: 0 is not a valid row index for a 3×3 matrix.
-matrix.sps:15: error: MATRIX: 4 is not a valid row index for a matrix with
-dimensions (3,3).
+matrix.sps:15: error: MATRIX: 4 is not a valid row index for a 3×3 matrix.
-matrix.sps:16: error: MATRIX: 4 is not a valid column index for a matrix with
-dimensions (3,3).
+matrix.sps:16: error: MATRIX: 4 is not a valid column index for a 3×3 matrix.
matrix.sps:17: error: MATRIX: Matrix row index must be scalar or vector, not a
-matrix with dimensions (2,2).
+2×2 matrix.
matrix.sps:18: error: MATRIX: Matrix column index must be scalar or vector, not
-a matrix with dimensions (2,2).
+a 2×2 matrix.
x
1 2 3
{}({})
-matrix.sps:24: error: MATRIX: Vector index operator must be applied to vector,
-not a matrix with dimensions (2,2).
+matrix.sps:24: error: MATRIX: Vector index operator may not be applied to a 2×2
+matrix.
-matrix.sps:25: error: MATRIX: Vector index must be scalar or vector, not a
-matrix with dimensions (2,2).
+matrix.sps:25: error: MATRIX: Vector index must be scalar or vector, not a 2×2
+matrix.
matrix.sps:26: error: MATRIX: Index 0 is out of range for vector with 4
elements.
END MATRIX.
])
AT_CHECK([pspp matrix.sps], [1], [dnl
-matrix.sps:3: error: MATRIX: Can't assign matrix with dimensions (2,2) to
-subvector.
+matrix.sps:3: error: MATRIX: Can't assign 2×2 matrix to subvector.
-matrix.sps:4: error: MATRIX: Can't assign vector with 0 elements to subvector
-with 3.
+matrix.sps:4: error: MATRIX: Can't assign 0-element vector to 3-element
+subvector.
-matrix.sps:5: error: MATRIX: Can't assign vector with 1 elements to subvector
-with 3.
+matrix.sps:5: error: MATRIX: Can't assign 1-element vector to 3-element
+subvector.
-matrix.sps:6: error: MATRIX: Can't assign vector with 2 elements to subvector
-with 3.
+matrix.sps:6: error: MATRIX: Can't assign 2-element vector to 3-element
+subvector.
-matrix.sps:7: error: MATRIX: Can't assign vector with 4 elements to subvector
-with 3.
+matrix.sps:7: error: MATRIX: Can't assign 4-element vector to 3-element
+subvector.
-matrix.sps:8: error: MATRIX: Can't assign vector with 0 elements to subvector
-with 3.
+matrix.sps:8: error: MATRIX: Can't assign 0-element vector to 3-element
+subvector.
-matrix.sps:9: error: MATRIX: Can't assign vector with 1 elements to subvector
-with 3.
+matrix.sps:9: error: MATRIX: Can't assign 1-element vector to 3-element
+subvector.
-matrix.sps:10: error: MATRIX: Can't assign vector with 2 elements to subvector
-with 3.
+matrix.sps:10: error: MATRIX: Can't assign 2-element vector to 3-element
+subvector.
-matrix.sps:11: error: MATRIX: Can't assign vector with 4 elements to subvector
-with 3.
+matrix.sps:11: error: MATRIX: Can't assign 4-element vector to 3-element
+subvector.
-matrix.sps:12: error: MATRIX: Can't assign vector with 4 elements to subvector
-with 9.
+matrix.sps:12: error: MATRIX: Can't assign 4-element vector to 9-element
+subvector.
matrix.sps:13: error: MATRIX: Index 0 is out of range for vector with 9
elements.
matrix.sps:14: error: MATRIX: Index 10 is out of range for vector with 9
elements.
-matrix.sps:15: error: MATRIX: Vector index must be scalar or vector, not a
-matrix with dimensions (2,2).
+matrix.sps:15: error: MATRIX: Vector index must be scalar or vector, not a 2×2
+matrix.
-matrix.sps:18: error: MATRIX: Can't assign matrix with dimensions (2,2) to
-subvector.
+matrix.sps:18: error: MATRIX: Can't assign 2×2 matrix to subvector.
-matrix.sps:19: error: MATRIX: Can't assign vector with 0 elements to subvector
-with 3.
+matrix.sps:19: error: MATRIX: Can't assign 0-element vector to 3-element
+subvector.
-matrix.sps:20: error: MATRIX: Can't assign vector with 1 elements to subvector
-with 3.
+matrix.sps:20: error: MATRIX: Can't assign 1-element vector to 3-element
+subvector.
-matrix.sps:21: error: MATRIX: Can't assign vector with 2 elements to subvector
-with 3.
+matrix.sps:21: error: MATRIX: Can't assign 2-element vector to 3-element
+subvector.
-matrix.sps:22: error: MATRIX: Can't assign vector with 4 elements to subvector
-with 3.
+matrix.sps:22: error: MATRIX: Can't assign 4-element vector to 3-element
+subvector.
-matrix.sps:23: error: MATRIX: Can't assign vector with 0 elements to subvector
-with 3.
+matrix.sps:23: error: MATRIX: Can't assign 0-element vector to 3-element
+subvector.
-matrix.sps:24: error: MATRIX: Can't assign vector with 1 elements to subvector
-with 3.
+matrix.sps:24: error: MATRIX: Can't assign 1-element vector to 3-element
+subvector.
-matrix.sps:25: error: MATRIX: Can't assign vector with 2 elements to subvector
-with 3.
+matrix.sps:25: error: MATRIX: Can't assign 2-element vector to 3-element
+subvector.
-matrix.sps:26: error: MATRIX: Can't assign vector with 4 elements to subvector
-with 3.
+matrix.sps:26: error: MATRIX: Can't assign 4-element vector to 3-element
+subvector.
-matrix.sps:27: error: MATRIX: Can't assign vector with 4 elements to subvector
-with 9.
+matrix.sps:27: error: MATRIX: Can't assign 4-element vector to 9-element
+subvector.
matrix.sps:28: error: MATRIX: Index 0 is out of range for vector with 9
elements.
matrix.sps:29: error: MATRIX: Index 10 is out of range for vector with 9
elements.
-matrix.sps:30: error: MATRIX: Vector index must be scalar or vector, not a
-matrix with dimensions (2,2).
+matrix.sps:30: error: MATRIX: Vector index must be scalar or vector, not a 2×2
+matrix.
-matrix.sps:33: error: MATRIX: Can't use vector indexing on matrix m with
-dimensions (2,2).
+matrix.sps:33: error: MATRIX: Can't use vector indexing on 2×2 matrix m.
-matrix.sps:34: error: MATRIX: Can't use vector indexing on matrix m with
-dimensions (2,2).
+matrix.sps:34: error: MATRIX: Can't use vector indexing on 2×2 matrix m.
])
AT_CLEANUP
12 13
matrix.sps:8: error: MATRIX: Operands to + must have the same dimensions or one
-must be a scalar, not matrices with dimensions (2,2) and (1,2).
+must be a scalar, not 2×2 and 1×2 matrices.
({1,2;3,4} - {5,6;7,8})
-4 -4
-2 -3
matrix.sps:13: error: MATRIX: Operands to - must have the same dimensions or
-one must be a scalar, not matrices with dimensions (2,2) and (1,2).
+one must be a scalar, not 2×2 and 1×2 matrices.
({1,2;3,4} * 5)
5 10
35 40
matrix.sps:25: error: MATRIX: Operands to &* must have the same dimensions or
-one must be a scalar, not matrices with dimensions (2,2) and (1,2).
+one must be a scalar, not 2×2 and 1×2 matrices.
({2,4;6,8} &/ 2)
1 2
81 1024
matrix.sps:34: error: MATRIX: Operands to &** must have the same dimensions or
-one must be a scalar, not matrices with dimensions (2,2) and (1,2).
+one must be a scalar, not 2×2 and 1×2 matrices.
])
AT_CLEANUP
1 0
matrix.sps:5: error: MATRIX: Operands to > must have the same dimensions or one
-must be a scalar, not matrices with dimensions (1,2) and (2,1).
+must be a scalar, not 1×2 and 2×1 matrices.
({1, 1; 2, 2} < {1, 2; 1, 2})
0 1
0 1
matrix.sps:10: error: MATRIX: Operands to < must have the same dimensions or
-one must be a scalar, not matrices with dimensions (1,2) and (2,1).
+one must be a scalar, not 1×2 and 2×1 matrices.
({1, 1; 2, 2} <> {1, 2; 1, 2})
0 1
0 1
matrix.sps:15: error: MATRIX: Operands to <> must have the same dimensions or
-one must be a scalar, not matrices with dimensions (1,2) and (2,1).
+one must be a scalar, not 1×2 and 2×1 matrices.
({1, 1; 2, 2} >= {1, 2; 1, 2})
1 0
1 0
matrix.sps:20: error: MATRIX: Operands to >= must have the same dimensions or
-one must be a scalar, not matrices with dimensions (1,2) and (2,1).
+one must be a scalar, not 1×2 and 2×1 matrices.
({1, 1; 2, 2} <= {1, 2; 1, 2})
1 1
1 1
matrix.sps:25: error: MATRIX: Operands to <= must have the same dimensions or
-one must be a scalar, not matrices with dimensions (1,2) and (2,1).
+one must be a scalar, not 1×2 and 2×1 matrices.
({1, 1; 2, 2} = {1, 2; 1, 2})
1 0
1 0
matrix.sps:30: error: MATRIX: Operands to = must have the same dimensions or
-one must be a scalar, not matrices with dimensions (1,2) and (2,1).
+one must be a scalar, not 1×2 and 2×1 matrices.
])
AT_CLEANUP
0 0 1
matrix.sps:8: error: MATRIX: Operands to AND must have the same dimensions or
-one must be a scalar, not matrices with dimensions (1,2) and (2,1).
+one must be a scalar, not 1×2 and 2×1 matrices.
({-1, 0, 1; -1, 0, 1; -1, 0, 1} OR {-1, -1, -1; 0, 0, 0; 1, 1, 1})
0 0 1
1 1 1
matrix.sps:14: error: MATRIX: Operands to OR must have the same dimensions or
-one must be a scalar, not matrices with dimensions (1,2) and (2,1).
+one must be a scalar, not 1×2 and 2×1 matrices.
({-1, 0, 1; -1, 0, 1; -1, 0, 1} XOR {-1, -1, -1; 0, 0, 0; 1, 1, 1})
0 0 1
1 1 0
matrix.sps:20: error: MATRIX: Operands to XOR must have the same dimensions or
-one must be a scalar, not matrices with dimensions (1,2) and (2,1).
+one must be a scalar, not 1×2 and 2×1 matrices.
])
AT_CLEANUP
-9.00 8.75
8.00 -7.50
-matrix.sps:16: error: MATRIX: Matrices with dimensions (1,3) and (1,2) are not
+matrix.sps:16: error: MATRIX: Matrices with dimensions 1×3 and 1×2 are not
conformable for multiplication.
matrix.sps:17: error: MATRIX: Matrix exponentation with ** requires a square
-matrix on the left-hand size, not one with dimensions (1,3).
+matrix on the left-hand size, not one with dimensions 1×3.
matrix.sps:18: error: MATRIX: Matrix exponentiation with ** requires a scalar
-on the right-hand side, not a matrix with dimensions (1,2).
+on the right-hand side, not a matrix with dimensions 1×2.
matrix.sps:19: error: MATRIX: Exponent 1.5 in matrix multiplication is non-
integer or outside the valid range.
matrix.sps:22: error: MATRIX: GSCH requires its argument to have at least as
many columns as rows, but it has dimensions (2,1).
-matrix.sps:23: error: MATRIX: Argument to GSCH with dimensions (2,3) contains
-only 0 linearly independent columns.
+matrix.sps:23: error: MATRIX: 2×3 argument to GSCH contains only 0 linearly
+independent columns.
])
AT_CLEANUP
0 0 3 0
0 0 0 4
-matrix.sps:8: error: MATRIX: Function MDIAG argument 1 must be a vector, but it
-has dimensions (2,2).
+matrix.sps:8: error: MATRIX: Function MDIAG argument 1 must be a vector, not a
+2×2 matrix.
MMAX({55, 44; 66, 11})
66
4 11 6
7 8 12
-matrix.sps:21: error: MATRIX: SETDIAG argument 2 must be a scalar or a vector
-but it has dimensions (2,2).
+matrix.sps:21: error: MATRIX: SETDIAG argument 2 must be a scalar or a vector,
+not a 2×2 matrix.
x5
1 2 3
6
matrix.sps:21: error: MATRIX: Expression for DO IF must evaluate to scalar, not
-a matrix with dimensions (1,2).
+a 1×2 matrix.
matrix.sps:25: error: MATRIX: Expression for ELSE IF must evaluate to scalar,
-not a matrix with dimensions (0,0).
+not a 0×0 matrix.
])
AT_CLEANUP
10 1 0
matrix.sps:67: error: MATRIX: Expression for LOOP must evaluate to scalar, not
-a matrix with dimensions (0,0).
+a 0×0 matrix.
matrix.sps:70: error: MATRIX: Expression for TO must evaluate to scalar, not a
-matrix with dimensions (0,0).
+0×0 matrix.
matrix.sps:73: error: MATRIX: Expression for BY must evaluate to scalar, not a
-matrix with dimensions (0,0).
+0×0 matrix.
matrix.sps:76: error: MATRIX: Expression for LOOP IF must evaluate to scalar,
-not a matrix with dimensions (0,0).
+not a 0×0 matrix.
matrix.sps:79: error: MATRIX: Expression for END LOOP IF must evaluate to
-scalar, not a matrix with dimensions (0,0).
+scalar, not a 0×0 matrix.
matrix.sps:82: error: MATRIX: Expression for LOOP is outside the integer range.
])