instance_id stringlengths 11 13 | repo stringlengths 9 25 | base_commit stringlengths 40 40 | problem_statement stringlengths 95 9.95k | image unknown | cohort stringclasses 3
values | patch stringlengths 432 1.06M | test_patch stringlengths 477 20.1k | FAIL_TO_PASS listlengths 1 42 | PASS_TO_PASS listlengths 1 130 |
|---|---|---|---|---|---|---|---|---|---|
clb-pyc-002 | scipy/scipy | ff177d92b79167eb5de593c9de41d3ceb97ab189 | interpolation.zoom incorrect output for certain cases
I found the behaviour of zoom to be incorrect when working with 3D arrays for nearest neighbour interpolation.
for example, try the following:
```
x = numpy.zeros(32, 32, 11)
x[12, 16, 8] = 1
y = interpolation.zoom(x, 4, order=0)
```
and when I check to see at `y... | {
"image_id": "sha256:a06dba0866df6cc6a1b517fb2516808a1afb412e1ced4adb6fec3518c33cc617",
"pull_reference": "yutu0814/pyc-case-002-scipy@sha256:a06dba0866df6cc6a1b517fb2516808a1afb412e1ced4adb6fec3518c33cc617"
} | python50 | diff --git a/scipy/ndimage/interpolation.py b/scipy/ndimage/interpolation.py
index 8f5f1bc..2e85cdf 100644
--- a/scipy/ndimage/interpolation.py
+++ b/scipy/ndimage/interpolation.py
@@ -597,7 +597,7 @@ def affine_transform(input, matrix, offset=0.0, output_shape=None,
"SciPy 0.18.0."
)
_nd... | diff --git a/scipy/ndimage/tests/test_interpolation.py b/scipy/ndimage/tests/test_interpolation.py
index 6563210..389c0ad 100644
--- a/scipy/ndimage/tests/test_interpolation.py
+++ b/scipy/ndimage/tests/test_interpolation.py
@@ -1107,19 +1107,45 @@ class TestNdimageInterpolation:
out = ndimage.zoom(arr, zoom)
... | [
"scipy/ndimage/tests/test_interpolation.py::TestNdimageInterpolation::test_zoom_grid_by_int_order0[nearest-zoom0-shape0]",
"scipy/ndimage/tests/test_interpolation.py::TestNdimageInterpolation::test_zoom_grid_by_int_order0[nearest-zoom0-shape1]",
"scipy/ndimage/tests/test_interpolation.py::TestNdimageInterpolati... | [
"scipy/ndimage/tests/test_interpolation.py::TestNdimageInterpolation::test_boundaries[nearest-expected_value0]",
"scipy/ndimage/tests/test_interpolation.py::TestNdimageInterpolation::test_boundaries2[grid-wrap-expected_value2]",
"scipy/ndimage/tests/test_interpolation.py::TestNdimageInterpolation::test_boundary... |
clb-pyc-007 | numpy/numpy | fc2518ba6b11fc52b0ff477b9e83576be90562d8 | NumPy's array-allocation failure path raises _ArrayMemoryError and returns immediately, bypassing the common failure cleanup and leaking dtype references on every failed allocation. Route this path through the shared cleanup while preserving the formatted allocation error. | {
"image_id": "sha256:ddbe5866e7eec2a3e12f4ebf75adf5c83c154c8ac15f049f3039395c37a8c617",
"pull_reference": "yutu0814/pyc-case-007-numpy@sha256:ddbe5866e7eec2a3e12f4ebf75adf5c83c154c8ac15f049f3039395c37a8c617"
} | python50 | diff --git a/numpy/core/src/multiarray/ctors.c b/numpy/core/src/multiarray/ctors.c
index 502ab0e..beee985 100644
--- a/numpy/core/src/multiarray/ctors.c
+++ b/numpy/core/src/multiarray/ctors.c
@@ -869,7 +869,7 @@ discover_dimensions(PyObject *obj, int *maxndim, npy_intp *d, int check_it,
return 0;
}
-static PyO... | diff --git a/numpy/core/tests/test_multiarray.py b/numpy/core/tests/test_multiarray.py
index 2edcc68..86a8cff 100644
--- a/numpy/core/tests/test_multiarray.py
+++ b/numpy/core/tests/test_multiarray.py
@@ -845,6 +845,13 @@ class TestCreation:
assert_raises(ValueError, np.zeros, shape, dtype=np.int8)
as... | [
"numpy/core/tests/test_multiarray.py::TestCreation::test_malloc_fails"
] | [
"numpy/core/tests/test_multiarray.py::TestCreation::test_zeros"
] |
clb-pyc-010 | numpy/numpy | 5e8ad11b75245caf2d158eacf369b011ef262795 | Several ndarray methods return a newly converted Python/NumPy scalar when a caller supplies a zero-dimensional out array. They must return the exact out object by identity, consistently with higher-dimensional outputs. | {
"image_id": "sha256:9c6264f39867c2376935e2c989a26c328eadb1b0f813d66291a224c84971e790",
"pull_reference": "yutu0814/pyc-case-010-numpy@sha256:9c6264f39867c2376935e2c989a26c328eadb1b0f813d66291a224c84971e790"
} | python50 | diff --git a/numpy/core/src/multiarray/methods.c b/numpy/core/src/multiarray/methods.c
index 8a659fa..262514e 100644
--- a/numpy/core/src/multiarray/methods.c
+++ b/numpy/core/src/multiarray/methods.c
@@ -117,8 +117,15 @@ array_take(PyArrayObject *self, PyObject *args, PyObject *kwds)
... | diff --git a/numpy/core/tests/test_multiarray.py b/numpy/core/tests/test_multiarray.py
index f36c27c..a698370 100644
--- a/numpy/core/tests/test_multiarray.py
+++ b/numpy/core/tests/test_multiarray.py
@@ -1582,6 +1582,11 @@ class TestMethods:
# gh-12031, caused SEGFAULT
assert_raises(TypeError, oned.c... | [
"numpy/core/tests/test_multiarray.py::TestMethods::test_choose",
"numpy/core/tests/test_multiarray.py::TestMethods::test_round",
"numpy/core/tests/test_multiarray.py::TestMethods::test_trace",
"numpy/core/tests/test_multiarray.py::TestArgmax::test_ret_is_out[0]",
"numpy/core/tests/test_multiarray.py::TestAr... | [
"numpy/core/tests/test_multiarray.py::TestTake::test_clip",
"numpy/core/tests/test_multiarray.py::TestArgmax::test_output_shape",
"numpy/core/tests/test_multiarray.py::TestMethods::test_trace_subclass"
] |
clb-pyc-011 | numpy/numpy | 2acfd9851b6a5246e5e5e3faa97c9e728e88f8a9 | ndarray.searchsorted documents its required value argument as v, but the C method parser exposes the keyword as keys. Calling searchsorted(v=...) therefore raises a TypeError instead of accepting the documented keyword. | {
"image_id": "sha256:08f623a56a982260b08f7c3f5bfedf171de71ab39d2022e893e403887fd93873",
"pull_reference": "yutu0814/pyc-case-011-numpy@sha256:08f623a56a982260b08f7c3f5bfedf171de71ab39d2022e893e403887fd93873"
} | python50 | diff --git a/numpy/core/src/multiarray/methods.c b/numpy/core/src/multiarray/methods.c
index e5845f2..ae26bbd 100644
--- a/numpy/core/src/multiarray/methods.c
+++ b/numpy/core/src/multiarray/methods.c
@@ -1469,7 +1469,7 @@ array_argpartition(PyArrayObject *self, PyObject *args, PyObject *kwds)
static PyObject *
array... | diff --git a/numpy/core/tests/test_multiarray.py b/numpy/core/tests/test_multiarray.py
index c4f1368..bf1fcc7 100644
--- a/numpy/core/tests/test_multiarray.py
+++ b/numpy/core/tests/test_multiarray.py
@@ -2161,6 +2161,8 @@ class TestMethods:
msg = "Test real searchsorted with nans, side='r'"
b = a.sea... | [
"numpy/core/tests/test_multiarray.py::TestMethods::test_searchsorted"
] | [
"numpy/core/tests/test_multiarray.py::TestMethods::test_searchsorted_unicode",
"numpy/core/tests/test_multiarray.py::TestMethods::test_searchsorted_with_sorter"
] |
clb-pyc-013 | numpy/numpy | 663b161074580a340201da1765e3618c086ff8dc | numpy.ravel_multi_index does not reject non-empty indices when one dimension is zero. Depending on mode, Base returns without the required ValueError or performs division by zero and terminates with SIGFPE. Empty index arrays must remain valid. | {
"image_id": "sha256:19d9e4c60528969fa655ade3622e48b0c85c508ccd6249e801d6781bef11f508",
"pull_reference": "yutu0814/pyc-case-013-numpy@sha256:19d9e4c60528969fa655ade3622e48b0c85c508ccd6249e801d6781bef11f508"
} | python50 | diff --git a/numpy/core/src/multiarray/compiled_base.c b/numpy/core/src/multiarray/compiled_base.c
index c380676..055d3e6 100644
--- a/numpy/core/src/multiarray/compiled_base.c
+++ b/numpy/core/src/multiarray/compiled_base.c
@@ -942,6 +942,20 @@ ravel_multi_index_loop(int ravel_ndim, npy_intp *ravel_dims,
char inv... | diff --git a/numpy/lib/tests/test_index_tricks.py b/numpy/lib/tests/test_index_tricks.py
index a5cdda0..dbe445c 100644
--- a/numpy/lib/tests/test_index_tricks.py
+++ b/numpy/lib/tests/test_index_tricks.py
@@ -175,6 +175,24 @@ class TestRavelUnravelIndex(object):
assert_raises_regex(
ValueError, "o... | [
"numpy/lib/tests/test_index_tricks.py::TestRavelUnravelIndex::test_empty_array_ravel[clip]",
"numpy/lib/tests/test_index_tricks.py::TestRavelUnravelIndex::test_empty_array_ravel[wrap]"
] | [
"numpy/lib/tests/test_index_tricks.py::TestRavelUnravelIndex::test_big_indices",
"numpy/lib/tests/test_index_tricks.py::TestRavelUnravelIndex::test_dtypes"
] |
clb-pyc-014 | numpy/numpy | 495d352bf325f44d78001f059d625123e49f027e | viewing an array with a fieldless structured dtype does not update the dtype:
As discovered in #14310 , viewing an array with a fieldless structured dtype does not update the dtype/itemsize:
```python
>>> a = np.zeros(2, dtype={'names':[], 'formats':[], 'offsets':[], 'itemsize':8})
>>> b = a.view(np.dtype([]))
>>... | {
"image_id": "sha256:8ec3a832740cfffca716ebf9a7a1b9b324d57ca877843e324a74f53f49942c4d",
"pull_reference": "yutu0814/pyc-case-014-numpy@sha256:8ec3a832740cfffca716ebf9a7a1b9b324d57ca877843e324a74f53f49942c4d"
} | python50 | diff --git a/doc/release/upcoming_changes/14393.c_api.rst b/doc/release/upcoming_changes/14393.c_api.rst
new file mode 100644
index 0000000..0afd275
--- /dev/null
+++ b/doc/release/upcoming_changes/14393.c_api.rst
@@ -0,0 +1,5 @@
+PyDataType_ISUNSIZED(descr) now returns False for structured datatypes
+-----------------... | diff --git a/numpy/core/tests/test_dtype.py b/numpy/core/tests/test_dtype.py
index f60eab6..f5ca775 100644
--- a/numpy/core/tests/test_dtype.py
+++ b/numpy/core/tests/test_dtype.py
@@ -419,6 +419,31 @@ class TestRecord(object):
assert_raises(ValueError, np.dtype,
{'formats': ['i4', 'i4'], 'f0'... | [
"numpy/core/tests/test_dtype.py::TestRecord::test_fieldless_views"
] | [
"numpy/core/tests/test_dtype.py::TestRecord::test_partial_dict",
"numpy/core/tests/test_dtype.py::TestSubarray::test_single_subarray"
] |
clb-pyc-015 | numpy/numpy | 965ea2ff417bcb285beca5c36cd02a8790a3d8f6 | BUG: np.lexsort MemoryError on empty array with non-standard strides
Numpy 1.17.0 raises MemoryError when using `lexsort` on an empty array with non-standard `strides`. If `strides` is the natural one, or if there is >= 1 element in the input, then it works as expected.
### Reproducing code example:
```python
im... | {
"image_id": "sha256:f2da0afcaca3b41ce053ae0355187005b364e3490eda7dbeecac6561e03d5967",
"pull_reference": "yutu0814/pyc-case-015-numpy@sha256:f2da0afcaca3b41ce053ae0355187005b364e3490eda7dbeecac6561e03d5967"
} | python50 | diff --git a/numpy/core/src/multiarray/item_selection.c b/numpy/core/src/multiarray/item_selection.c
index 762563e..19de04a 100644
--- a/numpy/core/src/multiarray/item_selection.c
+++ b/numpy/core/src/multiarray/item_selection.c
@@ -1456,8 +1456,8 @@ PyArray_LexSort(PyObject *sort_keys, int axis)
/* Now we can c... | diff --git a/numpy/core/tests/test_regression.py b/numpy/core/tests/test_regression.py
index 944d053..c5289f6 100644
--- a/numpy/core/tests/test_regression.py
+++ b/numpy/core/tests/test_regression.py
@@ -436,6 +436,32 @@ class TestRegression(object):
assert_raises(KeyError, np.lexsort, BuggySequence())
+ ... | [
"numpy/core/tests/test_regression.py::TestRegression::test_lexsort_zerolen_custom_strides",
"numpy/core/tests/test_regression.py::TestRegression::test_lexsort_zerolen_custom_strides_2d"
] | [
"numpy/core/tests/test_regression.py::TestRegression::test_lexsort",
"numpy/core/tests/test_regression.py::TestRegression::test_lexsort_invalid_sequence"
] |
clb-pyc-022 | numpy/numpy | 99953e494aa3be5ae8385d8461b9e4dfbeec43ec | Creating an array from an object with an invalid __array_interface__ can corrupt the reference count of the cached dtype object on failure paths. Invalid shape or strides metadata should raise the expected exception without decreasing the global dtype reference count or triggering CPython reference-count errors. | {
"image_id": "sha256:7e54bbcd8594c941e1ee9e41ea15905787d0bca6fb8085b4523d5069737d6de8",
"pull_reference": "yutu0814/pyc-case-022-numpy@sha256:7e54bbcd8594c941e1ee9e41ea15905787d0bca6fb8085b4523d5069737d6de8"
} | python50 | diff --git a/numpy/core/src/multiarray/ctors.c b/numpy/core/src/multiarray/ctors.c
index 63bf537..b2e329d 100644
--- a/numpy/core/src/multiarray/ctors.c
+++ b/numpy/core/src/multiarray/ctors.c
@@ -2500,6 +2500,11 @@ PyArray_FromInterface(PyObject *origin)
&PyArray_Type, dtype,
n, dims, N... | diff --git a/numpy/core/tests/test_multiarray.py b/numpy/core/tests/test_multiarray.py
index a67a291..77534c1 100644
--- a/numpy/core/tests/test_multiarray.py
+++ b/numpy/core/tests/test_multiarray.py
@@ -7009,12 +7009,11 @@ class TestArrayAttributeDeletion(object):
assert_raises(AttributeError, delat... | [
"numpy/core/tests/test_multiarray.py::TestArrayInterface::test_scalar_interface[val6-iface6-ValueError]",
"numpy/core/tests/test_multiarray.py::TestArrayInterface::test_scalar_interface[val8-iface8-ValueError]",
"numpy/core/tests/test_multiarray.py::TestArrayInterface::test_scalar_interface[val9-iface9-TypeErro... | [
"numpy/core/tests/test_multiarray.py::test_interface_no_shape",
"numpy/core/tests/test_multiarray.py::test_array_interface_itemsize"
] |
clb-pyc-023 | numpy/numpy | 70b773e4015b4fbb61bc1f7bdffc9cc789d58e94 | np.place warning: WRITEBACKIFCOPY detected in array_dealloc
Hello there,
I'm having a problem with getting a runtime warning:
/.../.virtualenv/python_3_env/lib/python3.6/site-packages/numpy/lib/function_base.py:1725: RuntimeWarning: WRITEBACKIFCOPY detected in array_dealloc. Required call to PyArray_ResolveWrite... | {
"image_id": "sha256:8b841335373b60b3e3aa4c1cb856876881e173ce982971adaf302df454690fdf",
"pull_reference": "yutu0814/pyc-case-023-numpy@sha256:8b841335373b60b3e3aa4c1cb856876881e173ce982971adaf302df454690fdf"
} | python50 | diff --git a/numpy/core/src/multiarray/compiled_base.c b/numpy/core/src/multiarray/compiled_base.c
index 88924a8..625028b 100644
--- a/numpy/core/src/multiarray/compiled_base.c
+++ b/numpy/core/src/multiarray/compiled_base.c
@@ -328,6 +328,7 @@ arr_insert(PyObject *NPY_UNUSED(self), PyObject *args, PyObject *kwdict... | diff --git a/numpy/core/tests/test_multiarray.py b/numpy/core/tests/test_multiarray.py
index 77534c1..241f8e4 100644
--- a/numpy/core/tests/test_multiarray.py
+++ b/numpy/core/tests/test_multiarray.py
@@ -7729,6 +7729,8 @@ class TestWritebackIfCopy(object):
# uses arr_insert
np.place(a, a>2, [44... | [
"numpy/core/tests/test_multiarray.py::TestWritebackIfCopy::test_insert_noncontiguous"
] | [
"numpy/core/tests/test_multiarray.py::TestWritebackIfCopy::test_put_noncontiguous",
"numpy/core/tests/test_multiarray.py::TestWritebackIfCopy::test_putmask_noncontiguous"
] |
clb-pyc-027 | numpy/numpy | 0fd5f2506bf2f41b023392c945312e5a1a3eb819 | np.unravel_index() does not accept empty inputs
I would expect a tuple of empty outputs back. I get the following:
```
>>> np.unravel_index([], (10, 12))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: Iterator operand 0 dtype could not be cast from dtype('float64') to dtype('int64'... | {
"image_id": "sha256:71d2efe092c6ee64b8a0a6ef40ee58ca656c90a6a43fbd8fd3aa2f35833dfc02",
"pull_reference": "yutu0814/pyc-case-027-numpy@sha256:71d2efe092c6ee64b8a0a6ef40ee58ca656c90a6a43fbd8fd3aa2f35833dfc02"
} | python50 | diff --git a/numpy/core/src/multiarray/compiled_base.c b/numpy/core/src/multiarray/compiled_base.c
index 1e0c1eb..d80d165 100644
--- a/numpy/core/src/multiarray/compiled_base.c
+++ b/numpy/core/src/multiarray/compiled_base.c
@@ -832,17 +832,63 @@ fail:
return NULL;
}
+static const char *EMPTY_SEQUENCE_E... | diff --git a/numpy/lib/tests/test_index_tricks.py b/numpy/lib/tests/test_index_tricks.py
index 3246f68..028bba3 100644
--- a/numpy/lib/tests/test_index_tricks.py
+++ b/numpy/lib/tests/test_index_tricks.py
@@ -77,6 +77,26 @@ class TestRavelUnravelIndex(object):
[[3, 6, 6], [4, 5, 1]])
assert_... | [
"numpy/lib/tests/test_index_tricks.py::TestRavelUnravelIndex::test_empty_indices"
] | [
"numpy/lib/tests/test_index_tricks.py::TestRavelUnravelIndex::test_big_indices",
"numpy/lib/tests/test_index_tricks.py::TestRavelUnravelIndex::test_dtypes"
] |
clb-pyc-031 | numpy/numpy | b65b21c397381351965bf3f590054d2bccdd03d2 | choose does not broadcast index array appropriately (Trac #925)
_Original ticket http://projects.scipy.org/numpy/ticket/925 on 2008-10-03 by @teoliphant, assigned to unknown._
The advertised behavior of choose(choices, sequence_of_arrays) is that the choices array and all the arrays in the sequence must be broadcastab... | {
"image_id": "sha256:d485b6f5f151ad2c42c3c32e32f97d01a66e10ed307a21112efd85cb523ef363",
"pull_reference": "yutu0814/pyc-case-031-numpy@sha256:d485b6f5f151ad2c42c3c32e32f97d01a66e10ed307a21112efd85cb523ef363"
} | python50 | diff --git a/numpy/core/code_generators/numpy_api_order.txt b/numpy/core/code_generators/numpy_api_order.txt
index bebc531..ff629d6 100644
--- a/numpy/core/code_generators/numpy_api_order.txt
+++ b/numpy/core/code_generators/numpy_api_order.txt
@@ -170,3 +170,4 @@ PyArray_SearchsideConverter
PyArray_CheckAxis
PyArray... | diff --git a/numpy/core/tests/test_multiarray.py b/numpy/core/tests/test_multiarray.py
index 50a0205..ccfbe35 100644
--- a/numpy/core/tests/test_multiarray.py
+++ b/numpy/core/tests/test_multiarray.py
@@ -946,6 +946,26 @@ class TestSummarization(TestCase):
assert repr(A) == reprA
+class TestChoose(TestCase... | [
"test_multiarray.TestChoose.test_broadcast1",
"test_multiarray.TestChoose.test_broadcast2"
] | [
"test_multiarray.TestChoose.test_basic"
] |
clb-pyc-034 | scipy/scipy | 9529e47630be8f2345fd3d54302f248ce309d8cd | BUG: odeint crashes via lsoda instead of giving an error for zero timestep
Reproducable problem, [reported in SO](https://stackoverflow.com/questions/47776535/no-error-message-scipy-odeint-spyder-kernel-died-restarting)
```
from scipy.integrate import odeint
import numpy as np
t = np.linspace(0,0,10)
def func(x)... | {
"image_id": "sha256:5d4300ef80a0fcbfd8e290284f0e291b61cd1fa1a585f7c8bdb059fd1eb4ad6d",
"pull_reference": "yutu0814/pyc-case-034-scipy@sha256:5d4300ef80a0fcbfd8e290284f0e291b61cd1fa1a585f7c8bdb059fd1eb4ad6d"
} | python50 | diff --git a/scipy/integrate/_odepackmodule.c b/scipy/integrate/_odepackmodule.c
index 80bfadb..b141a23 100644
--- a/scipy/integrate/_odepackmodule.c
+++ b/scipy/integrate/_odepackmodule.c
@@ -497,6 +497,7 @@ odepack_odeint(PyObject *dummy, PyObject *args, PyObject *kwdict)
npy_intp out_sz = 0, dims[2];
int k... | diff --git a/scipy/integrate/tests/test_integrate.py b/scipy/integrate/tests/test_integrate.py
index aa8620e..22d5bba 100644
--- a/scipy/integrate/tests/test_integrate.py
+++ b/scipy/integrate/tests/test_integrate.py
@@ -805,3 +805,31 @@ def test_odeint_bad_shapes():
# shape of array returned by badjac(x, t) is no... | [
"scipy/integrate/tests/test_integrate.py::test_repeated_t_values"
] | [
"scipy/integrate/tests/test_integrate.py::test_odeint_trivial_time",
"scipy/integrate/tests/test_integrate.py::test_odeint_bad_shapes"
] |
clb-pyc-037 | scipy/scipy | bf05e8d3412e2d96ab6735b6935e2a65f2620c30 | scipy.ndimage.label crash on 64-bit linux (Trac #742)
_Original ticket http://projects.scipy.org/scipy/ticket/742 on 2008-09-23 by trac user usovalx, assigned to unknown._
It appears that ndimage.label is bugged for 64-bit linux builds. So far I was able to trigger the bug by using reasonably large 3-d datasets. Samp... | {
"image_id": "sha256:04dff5e59cea830266f4137be5ca38e2333c9668c2880e6f6f542c7188cd8328",
"pull_reference": "yutu0814/pyc-case-037-scipy@sha256:04dff5e59cea830266f4137be5ca38e2333c9668c2880e6f6f542c7188cd8328"
} | python50 | diff --git a/scipy/ndimage/src/ni_measure.c b/scipy/ndimage/src/ni_measure.c
index cfd4d4d..1aa27d9 100644
--- a/scipy/ndimage/src/ni_measure.c
+++ b/scipy/ndimage/src/ni_measure.c
@@ -132,7 +132,7 @@ int NI_Label(PyArrayObject* input, PyArrayObject* strct,
Int32 neighbor = 0;
/* iterate over ... | diff --git a/scipy/ndimage/tests/test_regression.py b/scipy/ndimage/tests/test_regression.py
index a824679..28d7553 100644
--- a/scipy/ndimage/tests/test_regression.py
+++ b/scipy/ndimage/tests/test_regression.py
@@ -16,5 +16,19 @@ def test_zoom_output_shape():
x = np.arange(12).reshape((3,4))
ndimage.zoom(x,... | [
"scipy/ndimage/tests/test_regression.py::test_ticket_742"
] | [
"scipy/ndimage/tests/test_regression.py::test_byte_order_median",
"scipy/ndimage/tests/test_regression.py::test_zoom_output_shape"
] |
clb-pyc-041 | scipy/scipy | e13278e712ac33c6110b5d48a8da0acfa7768b71 | Crash of interpolate.splprep(task=-1)
Running the circle example but with task = -1 parameter for splprep
http://docs.scipy.org/doc/scipy/reference/tutorial/interpolate.html#spline-interpolation-in-1-d-procedural-interpolate-splxxx
I got a crash in firpack.py at
<code> t,c,o = _fitpack._parcur(ravel(transpose(x)),w,... | {
"image_id": "sha256:162ec26dfa62fdd3ffa1a0dc4976961257e6796f803eb39e11be871f1dc4faf9",
"pull_reference": "yutu0814/pyc-case-041-scipy@sha256:162ec26dfa62fdd3ffa1a0dc4976961257e6796f803eb39e11be871f1dc4faf9"
} | python50 | diff --git a/scipy/interpolate/src/_fitpackmodule.c b/scipy/interpolate/src/_fitpackmodule.c
index 52cd383..ba44a49 100644
--- a/scipy/interpolate/src/_fitpackmodule.c
+++ b/scipy/interpolate/src/_fitpackmodule.c
@@ -499,7 +499,7 @@ fitpack_parcur(PyObject *dummy, PyObject *args)
if (ap_t == NULL || ap_c == NULL) ... | diff --git a/scipy/interpolate/tests/test_fitpack.py b/scipy/interpolate/tests/test_fitpack.py
index 7b90c36..c2179a4 100644
--- a/scipy/interpolate/tests/test_fitpack.py
+++ b/scipy/interpolate/tests/test_fitpack.py
@@ -459,6 +459,19 @@ def test_splev_der_k():
assert_allclose(splev(x, (t, c, k), k), splev(x, tck2... | [
"scipy/interpolate/tests/test_fitpack.py::test_splprep_segfault"
] | [
"scipy/interpolate/tests/test_fitpack.py::test_dblint",
"scipy/interpolate/tests/test_fitpack.py::test_splev_der_k"
] |
clb-pyc-042 | scipy/scipy | 8c7973148c5dea4a28e0e082f8c1f182313b72c1 | scipy.signal.sepfir2d reads random memory when given even sized hrow or hcol
`scipy.signal.sepfir2d` reads random memory when given even sized `hrow` or `hcol`. Deep down in the source code for `sepfir2` there is a comment than only odd-lengths are acceptable:
https://github.com/scipy/scipy/blob/d06791710acae119e09982... | {
"image_id": "sha256:73a308a6d0431d6f5d682647daf0828549209bc26bf7e79d2bff7e205d7d2bcb",
"pull_reference": "yutu0814/pyc-case-042-scipy@sha256:73a308a6d0431d6f5d682647daf0828549209bc26bf7e79d2bff7e205d7d2bcb"
} | python50 | diff --git a/scipy/signal/splinemodule.c b/scipy/signal/splinemodule.c
index 58f1aa7..1c10218 100644
--- a/scipy/signal/splinemodule.c
+++ b/scipy/signal/splinemodule.c
@@ -214,11 +214,13 @@ static char doc_FIRsepsym2d[] = "out = sepfir2d(input, hrow, hcol)\n"
" Parameters\n"
" ----------\n"
" input : ndarr... | diff --git a/scipy/signal/tests/test_bsplines.py b/scipy/signal/tests/test_bsplines.py
index 57524eb..4d77918 100644
--- a/scipy/signal/tests/test_bsplines.py
+++ b/scipy/signal/tests/test_bsplines.py
@@ -4,9 +4,11 @@ from numpy import array
from numpy.testing import (assert_equal,
assert_a... | [
"scipy/signal/tests/test_bsplines.py::test_sepfir2d_invalid_filter"
] | [
"scipy/signal/tests/test_bsplines.py::TestBSplines::test_spline_filter",
"scipy/signal/tests/test_bsplines.py::TestBSplines::test_bspline"
] |
clb-pyc-044 | scipy/scipy | fc6b387bc0c51b5b252712584580b4f0975498fb | segfault from map_coordinates
I received segmentation faults when running `map_coordinates` with `order=1` on a large array when attempting to access data that was past the 4GB level if the input data array type was `float32`. I have verified that changing from `float32` -> `float64` or using `order=3` both avoid the ... | {
"image_id": "sha256:46e9a7fa9636a89717b530dbde3a6da3e2c67050a18b70847b78b4316e051831",
"pull_reference": "yutu0814/pyc-case-044-scipy@sha256:46e9a7fa9636a89717b530dbde3a6da3e2c67050a18b70847b78b4316e051831"
} | python50 | diff --git a/scipy/ndimage/src/ni_filters.c b/scipy/ndimage/src/ni_filters.c
index 96c2e799..c5e70562 100644
--- a/scipy/ndimage/src/ni_filters.c
+++ b/scipy/ndimage/src/ni_filters.c
@@ -639,9 +639,10 @@ exit:
return PyErr_Occurred() ? 0 : 1;
}
-static double NI_Select(double *buffer, int min, int max, int rank... | diff --git a/scipy/ndimage/tests/test_ndimage.py b/scipy/ndimage/tests/test_ndimage.py
index bfe9161d..9c505ae7 100644
--- a/scipy/ndimage/tests/test_ndimage.py
+++ b/scipy/ndimage/tests/test_ndimage.py
@@ -32,11 +32,12 @@ from __future__ import division, print_function, absolute_import
import warnings
import math
... | [
"scipy/ndimage/tests/test_ndimage.py::TestNdimage::test_map_coordinates_large_data"
] | [
"scipy/ndimage/tests/test_ndimage.py::TestNdimage::test_map_coordinates01",
"scipy/ndimage/tests/test_ndimage.py::TestNdimage::test_map_coordinates02"
] |
clb-pyc-046 | tskit-dev/tskit | eb8b4aebe42f39f7e536a603e8cd25d9cf104e22 | .newick() raises: LibraryError: Supplied buffer if too small
Hi all,
I'm getting a buffer size error when calling `.newick()` on a tree with large Ne. The problem seems to be derived from C code in `._ll_sparse_tree.get_newick()`. I see in the trees.py code that if you provide a `node_labels` argument to `.newick()... | {
"image_id": "sha256:94b0040be34ac50a0b340ee284e51a414a4d1efa8696791ae661d0cbeea80743",
"pull_reference": "yutu0814/pyc-case-046-tskit@sha256:94b0040be34ac50a0b340ee284e51a414a4d1efa8696791ae661d0cbeea80743"
} | python50 | diff --git a/python/CHANGELOG.rst b/python/CHANGELOG.rst
index 60500c9..55d36c7 100644
--- a/python/CHANGELOG.rst
+++ b/python/CHANGELOG.rst
@@ -83,6 +83,9 @@ In development
**Bugfixes**
+- :issue:`453` - Fix LibraryError when ``tree.newick()`` is called with large node time
+ values (:user:`jeromekelleher`, :pr:... | diff --git a/python/tests/test_highlevel.py b/python/tests/test_highlevel.py
index e76bb98..1014aa9 100644
--- a/python/tests/test_highlevel.py
+++ b/python/tests/test_highlevel.py
@@ -1887,6 +1887,18 @@ class TestTree(HighLevelTestCase):
for tree in ts.trees():
self.verify_newick(tree)
... | [
"python/tests/test_highlevel.py::TestTree::test_newick_large_times",
"python/tests/test_lowlevel.py::TestTree::test_newick_interface"
] | [
"python/tests/test_highlevel.py::TestTree::test_newick",
"python/tests/test_lowlevel.py::TestTree::test_newick_precision"
] |
clb-pyc-048 | scipy/scipy | 018986cb0260881827c6ef33cd2d804f54e39c85 | `scipy.signal.{medfilt,medfilt2d}` hit "Windows fatal exception: access violation" with SciPy 1.7.0 on Windows
Since yesterday with the new SciPy 1.7.0 release, CuPy's Windows CI is experiencing the following fatal error (cupy/cupy#5364) and the CI was interrupted.
#### Reproducing code example:
The failing tests c... | {
"image_id": "sha256:064bfb4045a30796b74a723138efe20e24f2be4e0aa19f4ef6a3a644cce2ce85",
"pull_reference": "yutu0814/pyc-case-048-scipy@sha256:064bfb4045a30796b74a723138efe20e24f2be4e0aa19f4ef6a3a644cce2ce85"
} | python50 | diff --git a/scipy/signal/sigtoolsmodule.c b/scipy/signal/sigtoolsmodule.c
index e39e0c15..2fd6fcf4 100644
--- a/scipy/signal/sigtoolsmodule.c
+++ b/scipy/signal/sigtoolsmodule.c
@@ -856,14 +856,14 @@ PyObject *PyArray_OrderFilterND(PyObject *op1, PyObject *op2, int order) {
int is1, os;
char *op, *ap1_ptr, *ap2_pt... | diff --git a/scipy/signal/tests/test_signaltools.py b/scipy/signal/tests/test_signaltools.py
index 2b5cc6a0..bd64fcff 100644
--- a/scipy/signal/tests/test_signaltools.py
+++ b/scipy/signal/tests/test_signaltools.py
@@ -1062,6 +1062,17 @@ class TestMedFilt:
assert_equal(signal.medfilt(in_typed).dtype, dtype)
... | [
"scipy/signal/tests/test_signaltools.py::TestMedFilt::test_invalid_dtypes[float16]"
] | [
"scipy/signal/tests/test_signaltools.py::TestMedFilt::test_basic",
"scipy/signal/tests/test_signaltools.py::TestMedFilt::test_none"
] |
clb-pyc-049 | CheetahTemplate3/cheetah3 | c86628cad04edc5167f9a9c8999abc62c6558e7b | Calling Template.getVar() with a string beginning with "$" crashes
The compiled C version of NameMapper does not handle names beginning with "$" correctly. Specifically on CentOS 6.10, this command results in a Segmentation fault:
`python -c "from Cheetah.Template import Template; print(Template(source='blah').getVar(... | {
"image_id": "sha256:9b8ca8cf610a15b88d144cab71608125a57d9fa61fd9d41664684b023d991629",
"pull_reference": "yutu0814/pyc-case-049-cheetah@sha256:9b8ca8cf610a15b88d144cab71608125a57d9fa61fd9d41664684b023d991629"
} | python50 | diff --git a/Cheetah/c/_namemapper.c b/Cheetah/c/_namemapper.c
index 6c472b9..15ab99a 100644
--- a/Cheetah/c/_namemapper.c
+++ b/Cheetah/c/_namemapper.c
@@ -268,11 +268,16 @@ static PyObject *namemapper_valueForName(PYARGS)
createNameCopyAndChunks();
- theValue = PyNamemapper_valueForName(obj, nameChunks, n... | diff --git a/Cheetah/Tests/SyntaxAndOutput.py b/Cheetah/Tests/SyntaxAndOutput.py
index c6fa39d..a2ee63c 100755
--- a/Cheetah/Tests/SyntaxAndOutput.py
+++ b/Cheetah/Tests/SyntaxAndOutput.py
@@ -3049,6 +3049,12 @@ class GetVar(OutputTest): # Template.getVar()
self.verify("$getVar('$bogus', 1234)",... | [
"Cheetah/Tests/SyntaxAndOutput.py::GetVar::test6"
] | [
"Cheetah/Tests/SyntaxAndOutput.py::GetVar::test1",
"Cheetah/Tests/SyntaxAndOutput.py::GetVar::test2"
] |
clb-pyc-053 | python-pillow/Pillow | 09605ff48e582fda6870a2c4c519650321f3f8de | ImageDraw only uses lower 8-bits of colors in I;16 images
### What did you do?
`ImageDraw` on an image with mode `I;16` fails to work correctly. When given a fill color (in the range 0...0xFFFF), it draws the shapes correctly, but uses a color with the lower 8-bits repeated twice.
### What did you expect to happe... | {
"image_id": "sha256:fa3a641ce23062b01e43021ba76fa77574047cb21422ef0daa18c642dd7c7ccc",
"pull_reference": "yutu0814/pyc-case-053-pillow@sha256:fa3a641ce23062b01e43021ba76fa77574047cb21422ef0daa18c642dd7c7ccc"
} | python50 | diff --git a/src/libImaging/Draw.c b/src/libImaging/Draw.c
index 82f290b..0ccf22d 100644
--- a/src/libImaging/Draw.c
+++ b/src/libImaging/Draw.c
@@ -41,6 +41,7 @@
#define FLOOR(v) ((v) >= 0.0 ? (int)(v) : (int)floor(v))
#define INK8(ink) (*(UINT8 *)ink)
+#define INK16(ink) (*(UINT16 *)ink)
/*
* Rounds around z... | diff --git a/Tests/images/imagedraw_rectangle_I.png b/Tests/images/imagedraw_rectangle_I.png
index 4e94f6943dd8eaac1d3be2b930b835358f1caaf9..a75f12c2e98f417e662f2661eab980b45b61cde1 100644
GIT binary patch
delta 102
zcmdnWxP@_oidD6zi(^Q|oVT}j@-`TVusS+?xo;%mkkXypn)XS5|Jl7d3_x%o{o2RL
zk9X7`yK1#D=Yq82<NO@|GZW)Y6@Q<(XkGsTq... | [
"Tests/test_imagedraw.py::test_point_I16",
"Tests/test_imagefont.py::test_I16[Layout.BASIC]"
] | [
"Tests/test_imagedraw.py::test_sanity",
"Tests/test_imagefont.py::test_font_properties[Layout.BASIC]"
] |
clb-pyc-054 | python-pillow/Pillow | c683f048eb117c572b8b4eee47a324aca165fea1 | Fatal Python error for negative radius in ImageFilter.BoxBlur()
Hi,
Python crashes without an exception when a negative radius is passed into ImageFilter.BoxBlur().
This is the error message using spyder.
```
Fatal Python error: Aborted
Main thread:
Current thread 0x00007fbab679b740 (most recent call first)... | {
"image_id": "sha256:418f1ca7c0fe0f3525592d3635a6e06f4e7b45060ad3b0a492f177230eba26fe",
"pull_reference": "yutu0814/pyc-case-054-pillow@sha256:418f1ca7c0fe0f3525592d3635a6e06f4e7b45060ad3b0a492f177230eba26fe"
} | python50 | diff --git a/src/PIL/ImageFilter.py b/src/PIL/ImageFilter.py
index 59e2c18..63d6dcf 100644
--- a/src/PIL/ImageFilter.py
+++ b/src/PIL/ImageFilter.py
@@ -183,6 +183,9 @@ class BoxBlur(MultibandFilter):
name = "BoxBlur"
def __init__(self, radius):
+ if radius < 0:
+ msg = "radius must be >= ... | diff --git a/Tests/test_image_filter.py b/Tests/test_image_filter.py
index cfe46b6..a2ef228 100644
--- a/Tests/test_image_filter.py
+++ b/Tests/test_image_filter.py
@@ -24,6 +24,7 @@ from .helper import assert_image_equal, hopper
ImageFilter.ModeFilter,
ImageFilter.GaussianBlur,
ImageFilter.G... | [
"Tests/test_image_filter.py::test_invalid_box_blur_filter"
] | [
"Tests/test_box_blur.py::test_radius_0",
"Tests/test_box_blur.py::test_radius_1"
] |
clb-pyc-056 | python-pillow/Pillow | 6798c87caf25cedf0cef19245e7db1656aed8602 | Saving an image with JPEG2000 format doesn't accept Path object
### What did you do?
Save a JPEG 2000 image using a `Path` argument:
```python
from pathlib import Path
from PIL import Image
img = Image.new('RGBA', (5, 5), '#00000000')
img.save(Path('image.jp2'), format='JPEG2000')
```
### What did you exp... | {
"image_id": "sha256:abeb4e9ddc951a5c0e9d63f1d5d0c23a8c0bcb668606cfab3e67adde60b76970",
"pull_reference": "yutu0814/pyc-case-056-pillow@sha256:abeb4e9ddc951a5c0e9d63f1d5d0c23a8c0bcb668606cfab3e67adde60b76970"
} | python50 | diff --git a/src/PIL/Image.py b/src/PIL/Image.py
index 34959cd..5d565f6 100644
--- a/src/PIL/Image.py
+++ b/src/PIL/Image.py
@@ -2180,12 +2180,12 @@ class Image:
filename = ""
open_fp = False
- if isPath(fp):
- filename = fp
- open_fp = True
- elif isinstance(fp, ... | diff --git a/Tests/test_image.py b/Tests/test_image.py
index c4e6f8a..2d661a9 100644
--- a/Tests/test_image.py
+++ b/Tests/test_image.py
@@ -149,10 +149,11 @@ class TestImage:
assert im.mode == "RGB"
assert im.size == (128, 128)
- temp_file = str(tmp_path / "temp.jpg")
- ... | [
"Tests/test_image.py::TestImage::test_pathlib"
] | [
"Tests/test_image.py::TestImage::test_fp_name",
"Tests/test_image.py::TestImage::test_tempfile"
] |
clb-pyc-057 | python-pillow/Pillow | f0679aff4d43dbd595b98501dc7a8420550bf4e8 | Pillow fails/hangs on PSD hidden background layer
Depending on file content, Pillow:
- fails with "cannot identify image file";
- fails with "Truncated File Read";
- just hangs inside the `PsdImagePlugin._layerinfo` function because it thinks there are 65534 layers.
See attachment: [pillow-psd-fail.zip](https:/... | {
"image_id": "sha256:9ab77c7426fba99462ea9c55a3a1139fbc455ab39d47d17023fe49a897d7b96a",
"pull_reference": "yutu0814/pyc-case-057-pillow@sha256:9ab77c7426fba99462ea9c55a3a1139fbc455ab39d47d17023fe49a897d7b96a"
} | python50 | diff --git a/src/PIL/PsdImagePlugin.py b/src/PIL/PsdImagePlugin.py
index e7b8846..04b21e3 100644
--- a/src/PIL/PsdImagePlugin.py
+++ b/src/PIL/PsdImagePlugin.py
@@ -22,6 +22,7 @@ from . import Image, ImageFile, ImagePalette
from ._binary import i8
from ._binary import i16be as i16
from ._binary import i32be as i32
+... | diff --git a/Tests/images/negative_layer_count.psd b/Tests/images/negative_layer_count.psd
new file mode 100644
index 0000000000000000000000000000000000000000..b111c2d5675ab2eec3bf2df52d2af603e006d2a3
GIT binary patch
literal 5492
zcmeHKO=uHA7=4?hq{hTl%%O;f98ym$h*rt5u0koK5Yh;(dT_Iwq@meO*iDdtN5N~U
z2Y(<~_29*`UOjjf1i>E=Z... | [
"Tests/test_file_psd.py::test_n_frames"
] | [
"Tests/test_file_psd.py::test_sanity",
"Tests/test_file_psd.py::test_eoferror"
] |
clb-pyc-058 | python-pillow/Pillow | b21508798ab548ed90eb4d6bf01db14b880c9c91 | JPEG Adobe APP14 color-transform metadata should use the twelfth payload byte. RGB and CMYK samples should report transforms 1 and 2; a shortened APP14 payload should retain Adobe metadata without inventing an absent transform value. Normal JPEG decoding and CMYK roundtripping should remain correct. | {
"image_id": "sha256:3fbe631ca2fb660e8850b0f3dedfdab10187317ad1520063edca003dbce331d5",
"pull_reference": "yutu0814/pyc-case-058-pillow@sha256:3fbe631ca2fb660e8850b0f3dedfdab10187317ad1520063edca003dbce331d5"
} | python50 | diff --git a/src/PIL/JpegImagePlugin.py b/src/PIL/JpegImagePlugin.py
index 48e0de5..f449a2d 100644
--- a/src/PIL/JpegImagePlugin.py
+++ b/src/PIL/JpegImagePlugin.py
@@ -140,8 +140,8 @@ def APP(self, marker):
self.info["adobe"] = i16(s, 5)
# extract Adobe custom properties
try:
- ad... | diff --git a/Tests/images/truncated_app14.jpg b/Tests/images/truncated_app14.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..232a4c35f8c5ac8cba5c873e698f7415165ccfb3
GIT binary patch
literal 29342
zcmeIb2Urx#(l9)`OU_v(Nshu2BubE+b4G%|F0h1M!V&}p#ekxcgMb*245A`Q5K#mH
zQIwojvLHz$2_oO@B8umpbM86s|Gf9T... | [
"Tests/test_file_jpeg.py::TestFileJpeg::test_adobe_transform"
] | [
"Tests/test_file_jpeg.py::TestFileJpeg::test_sanity",
"Tests/test_file_jpeg.py::TestFileJpeg::test_cmyk"
] |
clb-pyc-060 | python-pillow/Pillow | d0612030a0ba7aed533e1f9115bbf4bd1019f48e | Segmentation fault when creating gradient images with mode "F"
<!--
Thank you for reporting an issue.
Follow these guidelines to ensure your issue is handled properly.
If you have a ...
1. General question: consider asking the question on Stack Overflow
with the python-imaging-library tag:
* http... | {
"image_id": "sha256:e5558c76835739376be27654c041f0fc5743476226db4150d772cfa124ff1be8",
"pull_reference": "yutu0814/pyc-case-060-pillow@sha256:e5558c76835739376be27654c041f0fc5743476226db4150d772cfa124ff1be8"
} | python50 | diff --git a/src/libImaging/Fill.c b/src/libImaging/Fill.c
index e4e4b43..f720602 100644
--- a/src/libImaging/Fill.c
+++ b/src/libImaging/Fill.c
@@ -76,8 +76,21 @@ ImagingFillLinearGradient(const char *mode) {
return NULL;
}
- for (y = 0; y < 256; y++) {
- memset(im->image8[y], (unsigned char)... | diff --git a/Tests/test_image.py b/Tests/test_image.py
index 3fa071b..30d093e 100644
--- a/Tests/test_image.py
+++ b/Tests/test_image.py
@@ -524,7 +524,7 @@ class TestImage:
# Arrange
target_file = "Tests/images/linear_gradient.png"
- for mode in ["L", "P"]:
+ for mode in ["L", "P", "I... | [
"Tests/test_image.py::TestImage::test_linear_gradient",
"Tests/test_image.py::TestImage::test_radial_gradient"
] | [
"Tests/test_image.py::TestImage::test_linear_gradient_wrong_mode",
"Tests/test_image.py::TestImage::test_radial_gradient_wrong_mode"
] |
CLB SWE-bench
CLB SWE-bench measures software repair on 72 cross-language bugs. The test split contains 50 Python–C cases, 11 Java–C cases with upstream-derived tests, and 11 Java–C cases with tests written by the CLB authors.
Fields
| Field | Description |
|---|---|
instance_id |
Stable CLB identifier in the form clb-pyc-NNN or clb-javac-NNN. |
repo |
Upstream repository in owner/name format. |
base_commit |
Source revision at which the repair starts. |
problem_statement |
Bug description provided to the repair agent. |
image |
Object with the Docker pull_reference pinned by digest and its expected image_id. |
cohort |
One of python50, java_upstream11, and java_author11. |
patch |
Reference repair, stored as a Git diff. |
test_patch |
Git diff applied by the evaluator to add or modify tests. |
FAIL_TO_PASS |
Target tests that a successful repair must pass. |
PASS_TO_PASS |
Regression tests that must pass after applying the candidate. |
Evaluation protocol
For candidate generation, provide the selected problem_statement and an isolated checkout at base_commit. The evaluator starts from the pinned image, applies the candidate and test_patch, then checks both test lists. The patch field provides the reference repair for Gold controls.
To load the local data before publishing the dataset, run the following from this directory.
from datasets import load_dataset
tasks = load_dataset("json", data_files={"test": "test.jsonl"}, split="test")
The release exposes the reference and test patches for reproducibility. Use the generation input projection above when running a benchmark whose agent must work from the problem statement and Base.
- Downloads last month
- 23