protected function doTransform(Matrix $mA, $extra = null)
    {
        if ($mA->is('empty')) {
            return new Matrix(array());
        }

        /** @noinspection PhpInternalEntityUsedInspection */
        $this->assertParameterIsArray($extra, 'Second operand is not an array');

        if (empty($extra)) {
            throw new MatrixException('Second operand does not contain row indicator');
        }
        $row = intval($extra[0]);
        $availableRows = $mA->rows();
        if ($row<1 || $row > $availableRows) {
            throw new MatrixException('Row indicator out of bounds');
        }

        $numRows = (isset($extra[1]) ? intval($extra[1]) : 1);
        if ($numRows < 1 || ($numRows+$row-1) > $availableRows) {
            throw new MatrixException('Numrows out of bounds');
        }
        $this->assertMatrixIsComplete($mA);

        return $this->doTransformation($mA, $row, $numRows);
    }