nebius/SWE-bench-extra huggingface dataset:
Repository: openfoodfacts/openfoodfacts-python

Issue:
Problem with product search, something is certainly hardcoded
### What
The App always return the result for "eau mineral" (I guess it's for this because it's always starting with cristaline)
which is basically making the API useless

### Steps to reproduce the behavior:
import openfoodfacts
api = openfoodfacts.API(version="v2")
results = api.product.text_search("Tomate")

### Expected behavior
Return products data that are in link with Tomate and not "mineral water"

### Platform (Desktop, Mobile, Hunger Games)
 - OS: MACOS
 - Platform MacBook AIR


Comments:

Patch:
diff --git a/README.md b/README.md
index 0294826..181e6dc 100644
--- a/README.md
+++ b/README.md
@@ -112,4 +112,4 @@ Contributors:
 
     Copyright 2016-2022 Open Food Facts
 
-The Open Food Facts Python SDK is licensed under the [MIT License](https://github.com/openfoodfacts/openfoodfacts-python/blob/develop/LICENSE).
\ No newline at end of file
+The Open Food Facts Python SDK is licensed under the [MIT License](https://github.com/openfoodfacts/openfoodfacts-python/blob/develop/LICENSE).
diff --git a/docs/usage.md b/docs/usage.md
index 39dfaca..c268e00 100644
--- a/docs/usage.md
+++ b/docs/usage.md
@@ -41,7 +41,7 @@ api.product.get(code)
 *Perform text search*
 
 ```python
-results = api.product.text_search("mineral water")
+results = api.product.text_search("pizza")
 ```
 
 *Create a new product or update an existing one*
diff --git a/openfoodfacts/api.py b/openfoodfacts/api.py
index cfcac1a..01bb049 100644
--- a/openfoodfacts/api.py
+++ b/openfoodfacts/api.py
@@ -197,7 +197,7 @@ class ProductResource:
             params["sort_by"] = sort_by
 
         return send_get_request(
-            url=f"{self.base_url}/api/v2/search",
+            url=f"{self.base_url}/cgi/search.pl",
             api_config=self.api_config,
             params=params,
         )


Test patch:
diff --git a/tests/test_api.py b/tests/test_api.py
index 5bf4917..d0d7698 100644
--- a/tests/test_api.py
+++ b/tests/test_api.py
@@ -86,7 +86,7 @@ class TestProducts(unittest.TestCase):
         with requests_mock.mock() as mock:
             response_data = {"products": ["kinder bueno"], "count": 1}
             mock.get(
-                "https://world.openfoodfacts.org/api/v2/search?"
+                "https://world.openfoodfacts.org/cgi/search.pl?"
                 + "search_terms=kinder+bueno&json=1&page="
                 + "1&page_size=20",
                 text=json.dumps(response_data),
@@ -95,7 +95,7 @@ class TestProducts(unittest.TestCase):
             self.assertEqual(res["products"], ["kinder bueno"])
             response_data = {"products": ["banania", "banania big"], "count": 2}
             mock.get(
-                "https://world.openfoodfacts.org/api/v2/search?"
+                "https://world.openfoodfacts.org/cgi/search.pl?"
                 + "search_terms=banania&json=1&page="
                 + "2&page_size=10&sort_by=unique_scans",
                 text=json.dumps(response_data),
Repository: openmrslab/suspect

Issue:
BUG: denoising methods cast complex to real
Several of the methods in suspect.processing.denoising return real results from complex inputs.

Comments:

Patch:
diff --git a/suspect/processing/denoising.py b/suspect/processing/denoising.py
index fd49a14..f55b7ae 100644
--- a/suspect/processing/denoising.py
+++ b/suspect/processing/denoising.py
@@ -34,7 +34,7 @@ def sliding_window(input_signal, window_width):
     window /= numpy.sum(window)
     # pad the signal to cover half the window width on each side
     padded_input = _pad(input_signal, len(input_signal) + window_width - 1)
-    result = numpy.zeros(len(input_signal))
+    result = numpy.zeros_like(input_signal)
     for i in range(len(input_signal)):
         result[i] = numpy.dot(window, padded_input[i:(i + window_width)])
     return result
@@ -62,7 +62,7 @@ def sift(input_signal, threshold):
 def svd(input_signal, rank):
     matrix_width = int(len(input_signal) / 2)
     matrix_height = len(input_signal) - matrix_width + 1
-    hankel_matrix = numpy.zeros((matrix_width, matrix_height))
+    hankel_matrix = numpy.zeros((matrix_width, matrix_height), input_signal.dtype)
     for i in range(matrix_height):
         hankel_matrix[:, i] = input_signal[i:(i + matrix_width)]
     # perform the singular value decomposition


Test patch:
diff --git a/tests/test_mrs/test_processing.py b/tests/test_mrs/test_processing.py
index 40ea9c3..9bf35ef 100644
--- a/tests/test_mrs/test_processing.py
+++ b/tests/test_mrs/test_processing.py
@@ -1,6 +1,9 @@
 import suspect
 
 import numpy
+import warnings
+
+warnings.filterwarnings('error')
 
 
 def test_null_transform():
@@ -81,6 +84,24 @@ def test_gaussian_denoising():
     numpy.testing.assert_almost_equal(data, denoised_data)
 
 
+def test_svd_dtype():
+    data = numpy.ones(128, dtype=complex)
+    denoised_data = suspect.processing.denoising.svd(data, 8)
+    assert data.dtype == denoised_data.dtype
+
+
+def test_sliding_window_dtype():
+    data = numpy.ones(128, dtype=complex)
+    denoised_data = suspect.processing.denoising.sliding_window(data, 30)
+    assert data.dtype == denoised_data.dtype
+
+
+def test_sliding_gaussian_dtype():
+    data = numpy.ones(128, dtype=complex)
+    denoised_data = suspect.processing.denoising.sliding_gaussian(data, 30)
+    assert data.dtype == denoised_data.dtype
+
+
 def test_water_suppression():
     data = suspect.io.load_twix("tests/test_data/siemens/twix_vb.dat")
     channel_combined_data = data.inherit(numpy.average(data, axis=1))