prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Restructure Numbers provider
  # Feature request
  
  ## Thesis
  
  While I was implementing the ``matrix()`` function in the ``Numbers`` provider and I was thinking about some changes that we could make in this provider:
  
  - Add a function ``complex(start, end, length)`` that return a random array of complex numbers
  - Make the API uniform, so that every function in the ``Numbers`` provider has the arguments ``start, end, length`` (where possible). Maybe in the ``complex()`` function we can add ``start_real, end_real, start_imaginary, end_imaginary`` ?
  - Remove the function ``ranting()`` and add an argument ``decimal_digits`` in the function ``floats()`` to specify the number of decimal digits to keep.
  
  ## Reasoning
  
  I think these changes would make the provider more uniform and easy to use.
  
  
  </issue>
  <code>
  [start of mimesis/providers/numbers.py]
  1 # -*- coding: utf-8 -*-
  2 
  3 """Provides data related to numbers."""
  4 
  5 from typing import List, Union
  6 
  7 from mimesis.providers.base import BaseProvider
  8 
  9 __all__ = ['Numbers']
  10 
  11 
  12 class Numbers(BaseProvider):
  13     """Class for generating numbers."""
  14 
  15     class Meta:
  16         """Class for metadata."""
  17 
  18         name = 'numbers'
  19 
  20     def floats(self, n: int = 2) -> List[float]:
  21         """Generate a list of random float numbers.
  22 
  23         :param n: Raise 10 to the 'n' power.
  24         :return: The list of floating-point numbers.
  25         """
  26         nums = [self.random.random()
  27                 for _ in range(10 ** int(n))]
  28         return nums
  29 
  30     def integers(self, start: int = 0, end: int = 10,
  31                  length: int = 10) -> List[int]:
  32         """Generate a list of random integers.
  33 
  34         Integers can be negative or positive numbers.
  35         .. note: You can use both positive and negative numbers.
  36 
  37         :param start: Start.
  38         :param end: End.
  39         :param length: Length of list.
  40         :return: List of integers.
  41 
  42         :Example:
  43             [-20, -19, -18, -17]
  44         """
  45         return self.random.randints(
  46             length, start, end)
  47 
  48     @staticmethod
  49     def primes(start: int = 1, end: int = 999) -> List[int]:
  50         """Generate a list of prime numbers.
  51 
  52         :param start: First value of range.
  53         :param end: Last value of range.
  54         :return: A list of prime numbers from start to end.
  55         """
  56         # TODO: It should generate random primes with passed length.
  57         sieve_size = (end // 2 - 1) if end % 2 == 0 else (end // 2)
  58         sieve = [True] * sieve_size
  59 
  60         primes = []  # list of primes
  61         # add 2 to the list if it's in the given range
  62         if end >= 2:
  63             primes.append(2)
  64         for i in range(sieve_size):
  65             if sieve[i]:
  66                 value_at_i = i * 2 + 3
  67                 primes.append(value_at_i)
  68                 for j in range(i, sieve_size, value_at_i):
  69                     sieve[j] = False
  70 
  71         chop_index = 0
  72         for i in range(len(primes)):
  73             if primes[i] >= start:
  74                 chop_index = i
  75                 break
  76         return primes[chop_index:]
  77 
  78     def digit(self, to_bin: bool = False) -> Union[str, int]:
  79         """Get a random digit.
  80 
  81         :param to_bin: If True then convert to binary.
  82         :return: Digit.
  83 
  84         :Example:
  85             4.
  86         """
  87         digit = self.random.randint(0, 9)
  88 
  89         if to_bin:
  90             return bin(digit)
  91 
  92         return digit
  93 
  94     def between(self, minimum: int = 1, maximum: int = 1000) -> int:
  95         """Generate a random number between minimum and maximum.
  96 
  97         :param minimum: Minimum of range.
  98         :param maximum: Maximum of range.
  99         :return: Number.
  100         """
  101         return self.random.randint(minimum, maximum)
  102 
  103     def rating(self, maximum: float = 5.0) -> float:
  104         """Generate a random rating for something.
  105 
  106         :param maximum: Maximum value (default is 5.0).
  107         :return: Rating.
  108 
  109         :Example:
  110             4.7
  111         """
  112         return self.random.uniform(0, maximum, 1)
  113
  [end of mimesis/providers/numbers.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/mimesis/providers/numbers.py b/mimesis/providers/numbers.py
  --- a/mimesis/providers/numbers.py
  +++ b/mimesis/providers/numbers.py
  @@ -17,18 +17,20 @@
   
           name = 'numbers'
   
  -    def floats(self, n: int = 2) -> List[float]:
  +    def floats(self, start: float = 0, end: float = 1, n: int = 10,
  +               rounding: int = 15) -> List[float]:
           """Generate a list of random float numbers.
   
  -        :param n: Raise 10 to the 'n' power.
  +        :param start: Start range.
  +        :param end: End range.
  +        :param n: Length of the list.
  +        :param rounding: Max number of decimal digits.
           :return: The list of floating-point numbers.
           """
  -        nums = [self.random.random()
  -                for _ in range(10 ** int(n))]
  -        return nums
  +        return [self.random.uniform(start, end, rounding) for _ in range(n)]
   
       def integers(self, start: int = 0, end: int = 10,
  -                 length: int = 10) -> List[int]:
  +                 n: int = 10) -> List[int]:
           """Generate a list of random integers.
   
           Integers can be negative or positive numbers.
  @@ -36,14 +38,33 @@
   
           :param start: Start.
           :param end: End.
  -        :param length: Length of list.
  +        :param n: Length of list.
           :return: List of integers.
   
           :Example:
               [-20, -19, -18, -17]
           """
  -        return self.random.randints(
  -            length, start, end)
  +        return self.random.randints(n, start, end)
  +
  +    def complexes(self, start_real: float = 0, end_real: float = 1,
  +                  start_imag: float = 0, end_imag: float = 1,
  +                  rounding_real: int = 15, rounding_imag: int = 15,
  +                  n: int = 10) -> List[complex]:
  +        """Generate a list of random complex numbers.
  +
  +        :param start_real: Start real range.
  +        :param end_real: End real range.
  +        :param start_imag: Start imaginary range.
  +        :param end_imag: End imaginary range.
  +        :param rounding_real: Rounding real part.
  +        :param rounding_imag: Roungind imaginary part.
  +        :param n: Length of the list.
  +        :return: A list of random complex numbers.
  +        """
  +        return [
  +            complex(self.random.uniform(start_real, end_real, rounding_real),
  +                    self.random.uniform(start_imag, end_imag, rounding_imag))
  +            for _ in range(n)]
   
       @staticmethod
       def primes(start: int = 1, end: int = 999) -> List[int]:
  @@ -99,14 +120,3 @@
           :return: Number.
           """
           return self.random.randint(minimum, maximum)
  -
  -    def rating(self, maximum: float = 5.0) -> float:
  -        """Generate a random rating for something.
  -
  -        :param maximum: Maximum value (default is 5.0).
  -        :return: Rating.
  -
  -        :Example:
  -            4.7
  -        """
  -        return self.random.uniform(0, maximum, 1)
  
verification_info: {"golden_diff": "diff --git a/mimesis/providers/numbers.py b/mimesis/providers/numbers.py\n--- a/mimesis/providers/numbers.py\n+++ b/mimesis/providers/numbers.py\n@@ -17,18 +17,20 @@\n \n         name = 'numbers'\n \n-    def floats(self, n: int = 2) -> List[float]:\n+    def floats(self, start: float = 0, end: float = 1, n: int = 10,\n+               rounding: int = 15) -> List[float]:\n         \"\"\"Generate a list of random float numbers.\n \n-        :param n: Raise 10 to the 'n' power.\n+        :param start: Start range.\n+        :param end: End range.\n+        :param n: Length of the list.\n+        :param rounding: Max number of decimal digits.\n         :return: The list of floating-point numbers.\n         \"\"\"\n-        nums = [self.random.random()\n-                for _ in range(10 ** int(n))]\n-        return nums\n+        return [self.random.uniform(start, end, rounding) for _ in range(n)]\n \n     def integers(self, start: int = 0, end: int = 10,\n-                 length: int = 10) -> List[int]:\n+                 n: int = 10) -> List[int]:\n         \"\"\"Generate a list of random integers.\n \n         Integers can be negative or positive numbers.\n@@ -36,14 +38,33 @@\n \n         :param start: Start.\n         :param end: End.\n-        :param length: Length of list.\n+        :param n: Length of list.\n         :return: List of integers.\n \n         :Example:\n             [-20, -19, -18, -17]\n         \"\"\"\n-        return self.random.randints(\n-            length, start, end)\n+        return self.random.randints(n, start, end)\n+\n+    def complexes(self, start_real: float = 0, end_real: float = 1,\n+                  start_imag: float = 0, end_imag: float = 1,\n+                  rounding_real: int = 15, rounding_imag: int = 15,\n+                  n: int = 10) -> List[complex]:\n+        \"\"\"Generate a list of random complex numbers.\n+\n+        :param start_real: Start real range.\n+        :param end_real: End real range.\n+        :param start_imag: Start imaginary range.\n+        :param end_imag: End imaginary range.\n+        :param rounding_real: Rounding real part.\n+        :param rounding_imag: Roungind imaginary part.\n+        :param n: Length of the list.\n+        :return: A list of random complex numbers.\n+        \"\"\"\n+        return [\n+            complex(self.random.uniform(start_real, end_real, rounding_real),\n+                    self.random.uniform(start_imag, end_imag, rounding_imag))\n+            for _ in range(n)]\n \n     @staticmethod\n     def primes(start: int = 1, end: int = 999) -> List[int]:\n@@ -99,14 +120,3 @@\n         :return: Number.\n         \"\"\"\n         return self.random.randint(minimum, maximum)\n-\n-    def rating(self, maximum: float = 5.0) -> float:\n-        \"\"\"Generate a random rating for something.\n-\n-        :param maximum: Maximum value (default is 5.0).\n-        :return: Rating.\n-\n-        :Example:\n-            4.7\n-        \"\"\"\n-        return self.random.uniform(0, maximum, 1)\n", "issue": "Restructure Numbers provider\n# Feature request\r\n\r\n## Thesis\r\n\r\nWhile I was implementing the ``matrix()`` function in the ``Numbers`` provider and I was thinking about some changes that we could make in this provider:\r\n\r\n- Add a function ``complex(start, end, length)`` that return a random array of complex numbers\r\n- Make the API uniform, so that every function in the ``Numbers`` provider has the arguments ``start, end, length`` (where possible). Maybe in the ``complex()`` function we can add ``start_real, end_real, start_imaginary, end_imaginary`` ?\r\n- Remove the function ``ranting()`` and add an argument ``decimal_digits`` in the function ``floats()`` to specify the number of decimal digits to keep.\r\n\r\n## Reasoning\r\n\r\nI think these changes would make the provider more uniform and easy to use.\r\n\n", "before_files": [{"content": "# -*- coding: utf-8 -*-\n\n\"\"\"Provides data related to numbers.\"\"\"\n\nfrom typing import List, Union\n\nfrom mimesis.providers.base import BaseProvider\n\n__all__ = ['Numbers']\n\n\nclass Numbers(BaseProvider):\n    \"\"\"Class for generating numbers.\"\"\"\n\n    class Meta:\n        \"\"\"Class for metadata.\"\"\"\n\n        name = 'numbers'\n\n    def floats(self, n: int = 2) -> List[float]:\n        \"\"\"Generate a list of random float numbers.\n\n        :param n: Raise 10 to the 'n' power.\n        :return: The list of floating-point numbers.\n        \"\"\"\n        nums = [self.random.random()\n                for _ in range(10 ** int(n))]\n        return nums\n\n    def integers(self, start: int = 0, end: int = 10,\n                 length: int = 10) -> List[int]:\n        \"\"\"Generate a list of random integers.\n\n        Integers can be negative or positive numbers.\n        .. note: You can use both positive and negative numbers.\n\n        :param start: Start.\n        :param end: End.\n        :param length: Length of list.\n        :return: List of integers.\n\n        :Example:\n            [-20, -19, -18, -17]\n        \"\"\"\n        return self.random.randints(\n            length, start, end)\n\n    @staticmethod\n    def primes(start: int = 1, end: int = 999) -> List[int]:\n        \"\"\"Generate a list of prime numbers.\n\n        :param start: First value of range.\n        :param end: Last value of range.\n        :return: A list of prime numbers from start to end.\n        \"\"\"\n        # TODO: It should generate random primes with passed length.\n        sieve_size = (end // 2 - 1) if end % 2 == 0 else (end // 2)\n        sieve = [True] * sieve_size\n\n        primes = []  # list of primes\n        # add 2 to the list if it's in the given range\n        if end >= 2:\n            primes.append(2)\n        for i in range(sieve_size):\n            if sieve[i]:\n                value_at_i = i * 2 + 3\n                primes.append(value_at_i)\n                for j in range(i, sieve_size, value_at_i):\n                    sieve[j] = False\n\n        chop_index = 0\n        for i in range(len(primes)):\n            if primes[i] >= start:\n                chop_index = i\n                break\n        return primes[chop_index:]\n\n    def digit(self, to_bin: bool = False) -> Union[str, int]:\n        \"\"\"Get a random digit.\n\n        :param to_bin: If True then convert to binary.\n        :return: Digit.\n\n        :Example:\n            4.\n        \"\"\"\n        digit = self.random.randint(0, 9)\n\n        if to_bin:\n            return bin(digit)\n\n        return digit\n\n    def between(self, minimum: int = 1, maximum: int = 1000) -> int:\n        \"\"\"Generate a random number between minimum and maximum.\n\n        :param minimum: Minimum of range.\n        :param maximum: Maximum of range.\n        :return: Number.\n        \"\"\"\n        return self.random.randint(minimum, maximum)\n\n    def rating(self, maximum: float = 5.0) -> float:\n        \"\"\"Generate a random rating for something.\n\n        :param maximum: Maximum value (default is 5.0).\n        :return: Rating.\n\n        :Example:\n            4.7\n        \"\"\"\n        return self.random.uniform(0, maximum, 1)\n", "path": "mimesis/providers/numbers.py"}]}