Shared task
Implement Point.__rmul__
PR #17655 ↗ · sympy/sympy · · merged Sep 28, 2019 · +6 −2 · base f5e965947af2
what a new run launched now would send
Unexpected exception when multiplying geometry.Point and number
```python
from sympy import geometry as ge
import sympy
point1 = ge.Point(0,0)
point2 = ge.Point(1,1)
```
This line works fine
```python
point1 + point2 * sympy.sympify(2.0)
```
But when I write the same this way it raises an exception
```python
point1 + sympy.sympify(2.0) * point2
```
```
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
~/.virtualenvs/test/lib/python3.6/site-packages/sympy/geometry/point.py in __add__(self, other)
219 try:
--> 220 s, o = Point._normalize_dimension(self, Point(other, evaluate=False))
221 except TypeError:
~/.virtualenvs/test/lib/python3.6/site-packages/sympy/geometry/point.py in __new__(cls, *args, **kwargs)
128 Expecting sequence of coordinates, not `{}`'''
--> 129 .format(func_name(coords))))
130 # A point where only `dim` is specified is initialized
TypeError:
Expecting sequence of coordinates, not `Mul`
During handling of the above exception, another exception occurred:
GeometryError Traceback (most recent call last)
<ipython-input-20-6dcbddac1ee2> in <module>
----> 1 point1 + sympy.sympify(2.0)* point2
~/.virtualenvs/test/lib/python3.6/site-packages/sympy/geometry/point.py in __add__(self, other)
220 s, o = Point._normalize_dimension(self, Point(other, evaluate=False))
221 except TypeError:
--> 222 raise GeometryError("Don't know how to add {} and a Point object".format(other))
223
224 coords = [simplify(a + b) for a, b in zip(s, o)]
GeometryError: Don't know how to add 2.0*Point2D(1, 1) and a Point object
```
The expected behaviour is, that both lines give the same result
Work only inside this repository checkout. Make the code change the task
describes, keeping the diff focused — no drive-by refactors.
When you are done, leave your changes committed or in the working tree;
they are collected automatically.
Stay on this snapshot checkout (`task/ycb_sympy_pr17655`). Never checkout, pull, or rebase onto `main`. That branch is a README-only orphan.
Stay on this HEAD. Do not fetch another default branch. Push only on the Cursor-created `crazy-cursor/…` side branch from this HEAD.Some past runs of this task were launched with a different prompt (the prompt template changed since, or those runs predate this benchmark's stored prompt). Each run persists the exact prompt it sent at launch — that per-launch record is the audit trail; this page shows only the current one.
| Run | Model | Verdict |
|---|---|---|
| Aug 21, 12:31 UTC · completed | composer-2.5 | PASS |
| Aug 21, 12:31 UTC · completed | grok-4.6 | PASS |
| Aug 21, 12:31 UTC · completed | grok-4.6-low |
Powered by YourCodingBench — benchmark coding models on your own repo's commits. sign in
| Aug 21, 12:31 UTC · completed | grok-4.6-medium | PASS |
| Aug 21, 12:31 UTC · completed | grok-4.6-xhigh | PASS |
Binary verdicts from the pinned judge (D27). Full attempt detail — candidate diff, transcript, timings — lives on each run page's score matrix.