setXY method
Sets element value.
Implementation
void setXY(int x, int y, T value) {
final tensorShape = this.tensorShape;
if (tensorShape.numberOfDimensions != 2) {
throw ArgumentError('Shape of the tensor is: $tensorShape');
}
if (x < 0 || x >= tensorShape.x) {
throw ArgumentError.value(x, 'x');
}
if (y < 0 || y >= tensorShape.y) {
throw ArgumentError.value(y, 'y');
}
elements[x + tensorShape.x * y] = value;
}