prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Remove deprecated features
  This is a reminder issue to remove the features deprecated since 1.1 before the next release
  
  </issue>
  <code>
  [start of gammapy/utils/table.py]
  1 # Licensed under a 3-clause BSD style license - see LICENSE.rst
  2 """Table helper utilities."""
  3 import numpy as np
  4 from astropy.table import Table
  5 from astropy.units import Quantity
  6 from .deprecation import deprecated
  7 from .units import standardise_unit
  8 
  9 __all__ = [
  10     "hstack_columns",
  11     "table_from_row_data",
  12     "table_row_to_dict",
  13     "table_standardise_units_copy",
  14     "table_standardise_units_inplace",
  15 ]
  16 
  17 
  18 def hstack_columns(table, table_other):
  19     """Stack the column data horizontally.
  20 
  21     Parameters
  22     ----------
  23     table : `~astropy.table.Table`
  24         Input table.
  25     table_other : `~astropy.table.Table`
  26         Other input table.
  27 
  28     Returns
  29     -------
  30     stacked : `~astropy.table.Table`
  31         Stacked table.
  32     """
  33     stacked = Table()
  34 
  35     for column in table.colnames:
  36         data = np.hstack([table[column].data[0], table_other[column].data[0]])
  37         stacked[column] = data[np.newaxis, :]
  38     return stacked
  39 
  40 
  41 def table_standardise_units_copy(table):
  42     """Standardise units for all columns in a table in a copy.
  43 
  44     Calls `~gammapy.utils.units.standardise_unit`.
  45 
  46     Parameters
  47     ----------
  48     table : `~astropy.table.Table`
  49         Input table (won't be modified).
  50 
  51     Returns
  52     -------
  53     table : `~astropy.table.Table`
  54         Copy of the input table with standardised column units.
  55     """
  56     # Note: we could add an `inplace` option (or variant of this function)
  57     # See https://github.com/astropy/astropy/issues/6098
  58     table = Table(table)
  59     return table_standardise_units_inplace(table)
  60 
  61 
  62 def table_standardise_units_inplace(table):
  63     """Standardise units for all columns in a table in place."""
  64     for column in table.columns.values():
  65         if column.unit:
  66             column.unit = standardise_unit(column.unit)
  67 
  68     return table
  69 
  70 
  71 def table_row_to_dict(row, make_quantity=True):
  72     """Make one source data dictionary.
  73 
  74     Parameters
  75     ----------
  76     row : `~astropy.table.Row`
  77         Row.
  78     make_quantity : bool, optional
  79         Make quantity values for columns with units.
  80         Default is True.
  81 
  82     Returns
  83     -------
  84     data : dict
  85         Row data.
  86     """
  87     data = {}
  88     for name, col in row.columns.items():
  89         val = row[name]
  90 
  91         if make_quantity and col.unit:
  92             val = Quantity(val, unit=col.unit)
  93         data[name] = val
  94     return data
  95 
  96 
  97 @deprecated("v1.1", alternative="astropy.table.Table")
  98 def table_from_row_data(rows, **kwargs):
  99     """Helper function to create table objects from row data.
  100 
  101     Works with quantities.
  102 
  103     Parameters
  104     ----------
  105     rows : list
  106         List of row data (each row a dictionary).
  107     """
  108     table = Table(**kwargs)
  109 
  110     if len(rows) == 0:
  111         return table
  112 
  113     colnames = list(rows[0].keys())
  114 
  115     for name in colnames:
  116         coldata = [_[name] for _ in rows]
  117         if isinstance(rows[0][name], Quantity):
  118             coldata = Quantity(coldata, unit=rows[0][name].unit)
  119         table[name] = coldata
  120 
  121     return table
  122
  [end of gammapy/utils/table.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/gammapy/utils/table.py b/gammapy/utils/table.py
  --- a/gammapy/utils/table.py
  +++ b/gammapy/utils/table.py
  @@ -3,12 +3,10 @@
   import numpy as np
   from astropy.table import Table
   from astropy.units import Quantity
  -from .deprecation import deprecated
   from .units import standardise_unit
   
   __all__ = [
       "hstack_columns",
  -    "table_from_row_data",
       "table_row_to_dict",
       "table_standardise_units_copy",
       "table_standardise_units_inplace",
  @@ -92,30 +90,3 @@
               val = Quantity(val, unit=col.unit)
           data[name] = val
       return data
  -
  -
  -@deprecated("v1.1", alternative="astropy.table.Table")
  -def table_from_row_data(rows, **kwargs):
  -    """Helper function to create table objects from row data.
  -
  -    Works with quantities.
  -
  -    Parameters
  -    ----------
  -    rows : list
  -        List of row data (each row a dictionary).
  -    """
  -    table = Table(**kwargs)
  -
  -    if len(rows) == 0:
  -        return table
  -
  -    colnames = list(rows[0].keys())
  -
  -    for name in colnames:
  -        coldata = [_[name] for _ in rows]
  -        if isinstance(rows[0][name], Quantity):
  -            coldata = Quantity(coldata, unit=rows[0][name].unit)
  -        table[name] = coldata
  -
  -    return table
  
verification_info: {"golden_diff": "diff --git a/gammapy/utils/table.py b/gammapy/utils/table.py\n--- a/gammapy/utils/table.py\n+++ b/gammapy/utils/table.py\n@@ -3,12 +3,10 @@\n import numpy as np\n from astropy.table import Table\n from astropy.units import Quantity\n-from .deprecation import deprecated\n from .units import standardise_unit\n \n __all__ = [\n     \"hstack_columns\",\n-    \"table_from_row_data\",\n     \"table_row_to_dict\",\n     \"table_standardise_units_copy\",\n     \"table_standardise_units_inplace\",\n@@ -92,30 +90,3 @@\n             val = Quantity(val, unit=col.unit)\n         data[name] = val\n     return data\n-\n-\n-@deprecated(\"v1.1\", alternative=\"astropy.table.Table\")\n-def table_from_row_data(rows, **kwargs):\n-    \"\"\"Helper function to create table objects from row data.\n-\n-    Works with quantities.\n-\n-    Parameters\n-    ----------\n-    rows : list\n-        List of row data (each row a dictionary).\n-    \"\"\"\n-    table = Table(**kwargs)\n-\n-    if len(rows) == 0:\n-        return table\n-\n-    colnames = list(rows[0].keys())\n-\n-    for name in colnames:\n-        coldata = [_[name] for _ in rows]\n-        if isinstance(rows[0][name], Quantity):\n-            coldata = Quantity(coldata, unit=rows[0][name].unit)\n-        table[name] = coldata\n-\n-    return table\n", "issue": "Remove deprecated features\nThis is a reminder issue to remove the features deprecated since 1.1 before the next release\n", "before_files": [{"content": "# Licensed under a 3-clause BSD style license - see LICENSE.rst\n\"\"\"Table helper utilities.\"\"\"\nimport numpy as np\nfrom astropy.table import Table\nfrom astropy.units import Quantity\nfrom .deprecation import deprecated\nfrom .units import standardise_unit\n\n__all__ = [\n    \"hstack_columns\",\n    \"table_from_row_data\",\n    \"table_row_to_dict\",\n    \"table_standardise_units_copy\",\n    \"table_standardise_units_inplace\",\n]\n\n\ndef hstack_columns(table, table_other):\n    \"\"\"Stack the column data horizontally.\n\n    Parameters\n    ----------\n    table : `~astropy.table.Table`\n        Input table.\n    table_other : `~astropy.table.Table`\n        Other input table.\n\n    Returns\n    -------\n    stacked : `~astropy.table.Table`\n        Stacked table.\n    \"\"\"\n    stacked = Table()\n\n    for column in table.colnames:\n        data = np.hstack([table[column].data[0], table_other[column].data[0]])\n        stacked[column] = data[np.newaxis, :]\n    return stacked\n\n\ndef table_standardise_units_copy(table):\n    \"\"\"Standardise units for all columns in a table in a copy.\n\n    Calls `~gammapy.utils.units.standardise_unit`.\n\n    Parameters\n    ----------\n    table : `~astropy.table.Table`\n        Input table (won't be modified).\n\n    Returns\n    -------\n    table : `~astropy.table.Table`\n        Copy of the input table with standardised column units.\n    \"\"\"\n    # Note: we could add an `inplace` option (or variant of this function)\n    # See https://github.com/astropy/astropy/issues/6098\n    table = Table(table)\n    return table_standardise_units_inplace(table)\n\n\ndef table_standardise_units_inplace(table):\n    \"\"\"Standardise units for all columns in a table in place.\"\"\"\n    for column in table.columns.values():\n        if column.unit:\n            column.unit = standardise_unit(column.unit)\n\n    return table\n\n\ndef table_row_to_dict(row, make_quantity=True):\n    \"\"\"Make one source data dictionary.\n\n    Parameters\n    ----------\n    row : `~astropy.table.Row`\n        Row.\n    make_quantity : bool, optional\n        Make quantity values for columns with units.\n        Default is True.\n\n    Returns\n    -------\n    data : dict\n        Row data.\n    \"\"\"\n    data = {}\n    for name, col in row.columns.items():\n        val = row[name]\n\n        if make_quantity and col.unit:\n            val = Quantity(val, unit=col.unit)\n        data[name] = val\n    return data\n\n\n@deprecated(\"v1.1\", alternative=\"astropy.table.Table\")\ndef table_from_row_data(rows, **kwargs):\n    \"\"\"Helper function to create table objects from row data.\n\n    Works with quantities.\n\n    Parameters\n    ----------\n    rows : list\n        List of row data (each row a dictionary).\n    \"\"\"\n    table = Table(**kwargs)\n\n    if len(rows) == 0:\n        return table\n\n    colnames = list(rows[0].keys())\n\n    for name in colnames:\n        coldata = [_[name] for _ in rows]\n        if isinstance(rows[0][name], Quantity):\n            coldata = Quantity(coldata, unit=rows[0][name].unit)\n        table[name] = coldata\n\n    return table\n", "path": "gammapy/utils/table.py"}]}