# Path: cxroots/contours/Circle.py
# class Circle(Contour):
#     """
# 	A positively oriented circle in the complex plane.
# 
# 	Parameters
# 	----------
# 	center : complex
# 		The center of the circle.
# 	radius : float
# 		The radius of the circle.
# 
# 	Examples
# 	--------
# 	.. plot::
# 		:include-source:
# 
# 		from cxroots import Circle
# 		circle = Circle(center=1, radius=0.5)
# 		circle.show()
# 	"""
# 
#     def __init__(self, center, radius):
#         self.center = center
#         self.radius = radius
#         self.axisName = "r"
# 
#         segments = [ComplexArc(center, radius, 0, 2 * pi)]
#         super(Circle, self).__init__(segments)
# 
#     def __str__(self):
#         return "Circle: center={center.real:.3f}{center.imag:+.3f}i, radius={radius:.3f}".format(
#             center=self.center, radius=self.radius
#         )
# 
#     def contains(self, z):
#         """ Returns True if the point z lies within the contour, False if otherwise """
#         return abs(z - self.center) < self.radius
# 
#     @property
#     def centralPoint(self):
#         return self.center
# 
#     @property
#     def area(self):
#         return pi * self.radius ** 2
# 
#     def subdivide(self, axis="r", divisionFactor=0.5):
#         """
# 		Subdivide the contour
# 
# 		Parameters
# 		----------
# 		axis : str, can only be 'r' (argument kept for consistency with 'subdivisions' method in parent Contour class)
# 			The axis along which the line subdividing the contour is a constant.
# 		divisionFactor : float in range (0,1), optional
# 			Determines the point along 'axis' at which the line dividing the box is placed
# 
# 		Returns
# 		-------
# 		box1 : Annulus
# 			With inner radius determined by the divisionFactor and outer radius equal to that of the original circle
# 		box2 : Circle
# 			With radius equal to the inner radius of box1
# 		"""
#         if axis == "r" or self.axisName[axis] == "r":
#             box1 = Annulus(self.center, [self.radius * divisionFactor, self.radius])
#             box2 = Circle(self.center, self.radius * divisionFactor)
#             box1.segments[0] = self.segments[0]
#             box1.segments[1]._reversePath = box2.segments[0]
#             box2.segments[0]._reversePath = box1.segments[1]
# 
#         for box in [box1, box2]:
#             box._createdBySubdivisionAxis = axis
#             box._parentBox = self
#             self._childBoxes = [box1, box2]
# 
#         return box1, box2
# 
#     def randomPoint(self):
#         """ Returns a random point inside the Circle """
#         r = np.random.uniform(0, self.radius)
#         phi = np.random.uniform(0, 2 * pi)
#         return r * exp(1j * phi) + self.center
# 
# Path: cxroots/tests/ApproxEqual.py
# def roots_approx_equal(a, b, decimal=10):
#     a_roots, a_multiplicities = a
#     b_roots, b_multiplicities = b
# 
#     a_roots, b_roots = np.array(a_roots), np.array(b_roots)
#     a_multiplicities, b_multiplicities = (
#         np.array(a_multiplicities),
#         np.array(b_multiplicities),
#     )
# 
#     for ai, a_element in np.ndenumerate(a_roots):
#         bi = np.argmin(np.abs(b_roots - a_element))
#         b_roots[ai], b_roots[bi] = b_roots[bi], b_roots[ai]
#         b_multiplicities[ai], b_multiplicities[bi] = (
#             b_multiplicities[bi],
#             b_multiplicities[ai],
#         )
# 
#     np.testing.assert_almost_equal(a_roots, b_roots, decimal)
#     np.testing.assert_almost_equal(a_multiplicities, b_multiplicities, decimal)


import pytest
import numpy as np
from numpy import exp, sin, cos
from cxroots import Circle
from cxroots.tests.ApproxEqual import roots_approx_equal
        -0.920332541459108,
        1.05026721944263,
        -0.983563736801535 - 0.382365167035741j,
        -0.983563736801535 + 0.382365167035741j,
        -0.792214346729517 - 0.520708613101932j,
        -0.792214346729517 + 0.520708613101932j,
        -0.732229626596468 - 0.757345327222341j,
        -0.732229626596468 + 0.757345327222341j,
        -0.40289002582335 - 0.825650446354661j,
        -0.40289002582335 + 0.825650446354661j,
        -0.383382611408318 - 0.967939747947639j,
        -0.383382611408318 + 0.967939747947639j,
        -0.02594227096144 - 1.05524415820652j,
        -0.02594227096144 + 1.05524415820652j,
        0.160356899544475 - 0.927983420797727j,
        0.160356899544475 + 0.927983420797727j,
        0.41133738621461 - 0.967444751898913j,
        0.41133738621461 + 0.967444751898913j,
        0.576737152896681 - 0.719511178392941j,
        0.576737152896681 + 0.719511178392941j,
        0.758074415348703 - 0.724716122470435j,
        0.758074415348703 + 0.724716122470435j,
        0.903278407433416 - 0.22751872334709j,
        0.903278407433416 + 0.22751872334709j,
        0.963018623787179 - 0.427294816877434j,
        0.963018623787179 + 0.427294816877434j,
    ]

    multiplicities = np.ones_like(roots)


# Path: cxroots/contours/Circle.py
# class Circle(Contour):
#     """
# 	A positively oriented circle in the complex plane.
# 
# 	Parameters
# 	----------
# 	center : complex
# 		The center of the circle.
# 	radius : float
# 		The radius of the circle.
# 
# 	Examples
# 	--------
# 	.. plot::
# 		:include-source:
# 
# 		from cxroots import Circle
# 		circle = Circle(center=1, radius=0.5)
# 		circle.show()
# 	"""
# 
#     def __init__(self, center, radius):
#         self.center = center
#         self.radius = radius
#         self.axisName = "r"
# 
#         segments = [ComplexArc(center, radius, 0, 2 * pi)]
#         super(Circle, self).__init__(segments)
# 
#     def __str__(self):
#         return "Circle: center={center.real:.3f}{center.imag:+.3f}i, radius={radius:.3f}".format(
#             center=self.center, radius=self.radius
#         )
# 
#     def contains(self, z):
#         """ Returns True if the point z lies within the contour, False if otherwise """
#         return abs(z - self.center) < self.radius
# 
#     @property
#     def centralPoint(self):
#         return self.center
# 
#     @property
#     def area(self):
#         return pi * self.radius ** 2
# 
#     def subdivide(self, axis="r", divisionFactor=0.5):
#         """
# 		Subdivide the contour
# 
# 		Parameters
# 		----------
# 		axis : str, can only be 'r' (argument kept for consistency with 'subdivisions' method in parent Contour class)
# 			The axis along which the line subdividing the contour is a constant.
# 		divisionFactor : float in range (0,1), optional
# 			Determines the point along 'axis' at which the line dividing the box is placed
# 
# 		Returns
# 		-------
# 		box1 : Annulus
# 			With inner radius determined by the divisionFactor and outer radius equal to that of the original circle
# 		box2 : Circle
# 			With radius equal to the inner radius of box1
# 		"""
#         if axis == "r" or self.axisName[axis] == "r":
#             box1 = Annulus(self.center, [self.radius * divisionFactor, self.radius])
#             box2 = Circle(self.center, self.radius * divisionFactor)
#             box1.segments[0] = self.segments[0]
#             box1.segments[1]._reversePath = box2.segments[0]
#             box2.segments[0]._reversePath = box1.segments[1]
# 
#         for box in [box1, box2]:
#             box._createdBySubdivisionAxis = axis
#             box._parentBox = self
#             self._childBoxes = [box1, box2]
# 
#         return box1, box2
# 
#     def randomPoint(self):
#         """ Returns a random point inside the Circle """
#         r = np.random.uniform(0, self.radius)
#         phi = np.random.uniform(0, 2 * pi)
#         return r * exp(1j * phi) + self.center
# 
# Path: cxroots/tests/ApproxEqual.py
# def roots_approx_equal(a, b, decimal=10):
#     a_roots, a_multiplicities = a
#     b_roots, b_multiplicities = b
# 
#     a_roots, b_roots = np.array(a_roots), np.array(b_roots)
#     a_multiplicities, b_multiplicities = (
#         np.array(a_multiplicities),
#         np.array(b_multiplicities),
#     )
# 
#     for ai, a_element in np.ndenumerate(a_roots):
#         bi = np.argmin(np.abs(b_roots - a_element))
#         b_roots[ai], b_roots[bi] = b_roots[bi], b_roots[ai]
#         b_multiplicities[ai], b_multiplicities[bi] = (
#             b_multiplicities[bi],
#             b_multiplicities[ai],
#         )
# 
#     np.testing.assert_almost_equal(a_roots, b_roots, decimal)
#     np.testing.assert_almost_equal(a_multiplicities, b_multiplicities, decimal)


# Path: cxroots/tests/test_guess.py
import pytest
import numpy as np
from numpy import exp, sin, cos
from cxroots import Circle
from cxroots.tests.ApproxEqual import roots_approx_equal

        -0.920332541459108,
        1.05026721944263,
        -0.983563736801535 - 0.382365167035741j,
        -0.983563736801535 + 0.382365167035741j,
        -0.792214346729517 - 0.520708613101932j,
        -0.792214346729517 + 0.520708613101932j,
        -0.732229626596468 - 0.757345327222341j,
        -0.732229626596468 + 0.757345327222341j,
        -0.40289002582335 - 0.825650446354661j,
        -0.40289002582335 + 0.825650446354661j,
        -0.383382611408318 - 0.967939747947639j,
        -0.383382611408318 + 0.967939747947639j,
        -0.02594227096144 - 1.05524415820652j,
        -0.02594227096144 + 1.05524415820652j,
        0.160356899544475 - 0.927983420797727j,
        0.160356899544475 + 0.927983420797727j,
        0.41133738621461 - 0.967444751898913j,
        0.41133738621461 + 0.967444751898913j,
        0.576737152896681 - 0.719511178392941j,
        0.576737152896681 + 0.719511178392941j,
        0.758074415348703 - 0.724716122470435j,
        0.758074415348703 + 0.724716122470435j,
        0.903278407433416 - 0.22751872334709j,
        0.903278407433416 + 0.22751872334709j,
        0.963018623787179 - 0.427294816877434j,
        0.963018623787179 + 0.427294816877434j,
    ]

    multiplicities = np.ones_like(roots)


    roots_approx_equal(