Skip to content

Conversation

@carlosal1015
Copy link

I wonder why with Python 3.13 I have the error when run the example.
I took this example.

do not works fine

import numpy as np
from matplotlib.patches import Ellipse

delta = 45.0
angles = np.arange(0, 360 + delta, delta)
ells = [Ellipse((1, 1), 4, 2, a) for a in angles]

works fine

import numpy as np
from matplotlib.patches import Ellipse

delta = 45.0
angles = np.arange(0, 360 + delta, delta)
ells = [Ellipse(xy=(1, 1), width=4, height=2, angle=b) for b in angles]
Traceback (most recent call last):
  File "/tmp/main.py", line 6, in <module>
    ells = [Ellipse((1, 1), 4, 2, a) for a in angles]
            ~~~~~~~^^^^^^^^^^^^^^^^^
TypeError: Ellipse.__init__() takes 4 positional arguments but 5 were given

In this PR, I am adding keywords args to Ellipse class.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant