instance_id
stringlengths
21
53
repo
stringclasses
188 values
language
stringclasses
1 value
pull_number
int64
20
148k
title
stringlengths
6
144
body
stringlengths
0
83.4k
created_at
stringdate
2015-09-25 03:17:17
2025-07-10 16:50:35
problem_statement
stringlengths
188
240k
hints_text
stringlengths
0
145k
resolved_issues
listlengths
1
6
base_commit
stringlengths
40
40
commit_to_review
dict
reference_review_comments
listlengths
1
62
merged_commit
stringlengths
40
40
merged_patch
stringlengths
297
9.87M
metadata
dict
scipy__scipy-18956@935a391
scipy/scipy
Python
18,956
BUG: trust-constr Bounds exclusive
<!-- Thanks for contributing a pull request! Please ensure that your PR satisfies the checklist before submitting: http://scipy.github.io/devdocs/dev/contributor/development_workflow.html#checklist-before-submitting-a-pr Also, please name and describe your PR as you would write a commit message: http://scipy.g...
2023-07-24T20:03:27Z
BUG: scipy.optimize's trust-constr algorithm hangs when keep-feasible constraint is active at x0 ### Describe your issue. Scipy.optimize's trust-region constrained algorithm fails to find an optimum when the initial solution x0 lies exactly on the constraint boundary, but only when that constraint is set to "keep-feas...
[ { "body": "### Describe your issue.\n\nScipy.optimize's trust-region constrained algorithm fails to find an optimum when the initial solution x0 lies exactly on the constraint boundary, but only when that constraint is set to \"keep-feasible\". Instead of converging, the solution is kept at x0.\r\n\r\nThe reaso...
c025587b9fbbabf7e6bbf10e2e7c76ae61d6395c
{ "head_commit": "935a391f877565f2e1dad66b8349b1fa3b5d34f3", "head_commit_message": "BUG: trust-constr Bounds exclusive\nCloses #15093\nThe scipy docs define Bounds as inclusive but trust-constr treats\nbounds as exclusive. According to Nocedal, Jorge, and Stephen J.\nWright. \"Numerical optimization\" Second Editi...
[ { "diff_hunk": "@@ -615,6 +615,32 @@ def callback(x, info):\n # compatibility\n assert_(result.get('niter', -1) == 1)\n \n+ def test_issue_15093(self):\n+ # scipy docs define bounds as inclusive, so it shouldn't be\n+ # an issue to set x0 on the bounds even if keep_feasible is\n...
176e4ebdf93da01fdb34f20fed5f742d0630f8f4
diff --git a/scipy/optimize/_trustregion_constr/minimize_trustregion_constr.py b/scipy/optimize/_trustregion_constr/minimize_trustregion_constr.py index 1c86dd869b78..2835ea5445c0 100644 --- a/scipy/optimize/_trustregion_constr/minimize_trustregion_constr.py +++ b/scipy/optimize/_trustregion_constr/minimize_trustregion...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "Bug Fixes" }
scipy__scipy-18913@faf06dc
scipy/scipy
Python
18,913
BUG: sparse.csgraph: Support int64 indices in traversal.pyx
#### Reference issue Fixes gh-18716. #### What does this implement/fix? I added fused type signatures for breadth-first + depth-first traversals, along with connected components. This allows the existing API to support sparse arrays/matrices with int64 index dtypes. After gh-18509, this situation is more likely to...
2023-07-19T04:38:06Z
Buffer dtype mismatch, expected 'ITYPE_t' but got 'long' I am trying to get connected components in an adjacency matrix which is quite big but sparse. However when I run the code, I get this error: ValueError: Buffer dtype mismatch, expected 'ITYPE_t' but got 'long' Exception ignored in: 'scipy.sparse.csgraph._trave...
Could you upload your matrix as a .npz file? Otherwise this will not be possible to debug. I don't think uploading the matrix will be necessary here, actually. Instead, could you print `adj_matrix.indices.dtype` and also `adj_matrix.indptr.dtype`? I suspect this is a fallout of #18509 (or something related); a simple r...
[ { "body": "I am trying to get connected components in an adjacency matrix which is quite big but sparse. However when I run the code, I get this error: \r\nValueError: Buffer dtype mismatch, expected 'ITYPE_t' but got 'long'\r\nException ignored in: 'scipy.sparse.csgraph._traversal._connected_components_undirec...
2c05d12f19f6de515b205671d95b7698ad45bcee
{ "head_commit": "faf06dca7327f9cde7424c30124631af5a0bff3a", "head_commit_message": "Fix tests on 32bit arch", "patch_to_review": "diff --git a/scipy/sparse/csgraph/_traversal.pyx b/scipy/sparse/csgraph/_traversal.pyx\nindex 06dc2e25f0f7..2c7ea86dd1ba 100644\n--- a/scipy/sparse/csgraph/_traversal.pyx\n+++ b/scipy...
[ { "diff_hunk": "@@ -97,3 +97,23 @@ def test_fully_connected_graph():\n g = np.ones((4, 4))\n n_components, labels = csgraph.connected_components(g)\n assert_equal(n_components, 1)\n+\n+\n+def test_int64_indices_undirected():\n+ # See https://github.com/scipy/scipy/issues/18716\n+ g = csr_array...
cb343513bca981c6221626c05015f467d5fb4b45
diff --git a/scipy/sparse/csgraph/_traversal.pyx b/scipy/sparse/csgraph/_traversal.pyx index 06dc2e25f0f7..2c7ea86dd1ba 100644 --- a/scipy/sparse/csgraph/_traversal.pyx +++ b/scipy/sparse/csgraph/_traversal.pyx @@ -352,12 +352,22 @@ cpdef breadth_first_order(csgraph, i_start, return node_list[:length] -cde...
{ "difficulty": "medium", "estimated_review_effort": 4, "problem_domain": "Bug Fixes" }
saleor__saleor-6124@f5d5d19
saleor/saleor
Python
6,124
Fix webhook serializer fields quantity and quantity_available
I want to merge this change because it resolves #6115 <!-- Please mention all relevant issue numbers. --> # Impact * [ ] New migrations * [ ] New/Updated API fields or mutations * [ ] Deprecated API fields or mutations * [ ] Removed API types, fields, or mutations * [ ] Documentation needs to be updated ...
2020-09-11T13:51:44Z
PayloadSerializer quantity and quantity_allocated not serialized properly ### What I'm trying to achieve Generate product webhook payload ### Steps to reproduce the problem Run `generate_product_payload` function ### What I expected to happen Payload contain proper `quantity` and `quantity_allocated` ### Wh...
[ { "body": "### What I'm trying to achieve\r\nGenerate product webhook payload\r\n\r\n### Steps to reproduce the problem\r\nRun `generate_product_payload` function\r\n\r\n### What I expected to happen\r\nPayload contain proper `quantity` and `quantity_allocated`\r\n\r\n### What is wrong\r\nFields have been moved...
e6135381e30cc377d165de7eaa78fef7ece9b270
{ "head_commit": "f5d5d1909b1be290d466f1095756e0ed454f5f41", "head_commit_message": "Fix webhook payload variant serializer fields quantity and quantity_allocated", "patch_to_review": "diff --git a/saleor/product/models.py b/saleor/product/models.py\nindex 95048858dd3..8ee6e11947c 100644\n--- a/saleor/product/mod...
[ { "diff_hunk": "@@ -8,16 +8,36 @@\n \n \n class PythonSerializer(PythonBaseSerializer):\n+ def __init__(self, extra_model_fields=None):\n+ \"\"\"Serialize a QuerySet to basic Python objects.\n+\n+ Param extra_model_fields can be provided to add fields to serialization process\n+ which ar...
026c3cafa6d222fe2299826ce6ed7e25e74edd25
diff --git a/saleor/product/models.py b/saleor/product/models.py index 95048858dd3..8ee6e11947c 100644 --- a/saleor/product/models.py +++ b/saleor/product/models.py @@ -6,7 +6,8 @@ from django.contrib.postgres.aggregates import StringAgg from django.db import models from django.db.models import JSONField # type: ig...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "Bug Fixes" }
scipy__scipy-18893@9feabef
scipy/scipy
Python
18,893
ENH: Geometric quality metrics for random sampling
<!-- Thanks for contributing a pull request! Please ensure that your PR satisfies the checklist before submitting: http://scipy.github.io/devdocs/dev/contributor/development_workflow.html#checklist-before-submitting-a-pr Also, please name and describe your PR as you would write a commit message: http://scipy.g...
2023-07-16T13:42:39Z
ENH: other quality metrics for random sampling The new `scipy.stats.qmc` sub-module provide `discrepancy` as a way to measure the quality of a random sample. This measure is a uniformity criterion. Other metrics can be used to measure the quality such as _mindist_ and _minimum spanning tree_. Here is a simple im...
@tupui Can I take this up too? Are there any discussions needed for deciding which measures are to be included? Related to https://github.com/scipy/scipy/issues/14510 > @tupui Can I take this up too? Are there any discussions needed for deciding which measures are to be included? Related to #14510 Hey @czgdp1807, th...
[ { "body": "The new `scipy.stats.qmc` sub-module provide `discrepancy` as a way to measure the quality of a random sample. This measure is a uniformity criterion.\r\n\r\nOther metrics can be used to measure the quality such as _mindist_ and _minimum spanning tree_. \r\n\r\nHere is a simple implementation of usef...
c025587b9fbbabf7e6bbf10e2e7c76ae61d6395c
{ "head_commit": "9feabefdf214cb78fbebc0493538b2648f97c982", "head_commit_message": "TST: Tests for geometric_discrepancy", "patch_to_review": "diff --git a/scipy/stats/_qmc.py b/scipy/stats/_qmc.py\nindex 647948c05e06..6f680b68b787 100644\n--- a/scipy/stats/_qmc.py\n+++ b/scipy/stats/_qmc.py\n@@ -26,6 +26,7 @@\n...
[ { "diff_hunk": "@@ -178,6 +178,56 @@ def test_discrepancy_parallel(self, monkeypatch):\n with pytest.raises(ValueError, match=\"Invalid number of workers...\"):\n qmc.discrepancy(sample, workers=-2)\n \n+ def test_geometric_discrepancy_errors(self):\n+ sample = np.array([[1, 3], [2...
5409e0de9554131c086fc49bf41259641ffd3f7d
diff --git a/scipy/stats/_qmc.py b/scipy/stats/_qmc.py index 647948c05e06..4a52bb7d9112 100644 --- a/scipy/stats/_qmc.py +++ b/scipy/stats/_qmc.py @@ -26,6 +26,7 @@ import scipy.stats as stats from scipy._lib._util import rng_integers, _rng_spawn +from scipy.sparse.csgraph import minimum_spanning_tree from scipy.s...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "New Feature Additions" }
redis__redis-py-3400@4ff8421
redis/redis-py
Python
3,400
Fix bug with partial Hiredis availability
### Pull Request check-list _Please make sure to review and check all of these items:_ - [x] Do tests and lints pass with this change? - [x] Do the CI tests pass with this change (enable it first in your forked repo and wait for the github action build to finish)? - [x] Is the new or changed code fully tested? ...
2024-10-02T14:01:50Z
Seeking guidance for `hiredis` dependency on `redis-py` I have a question regarding the `hiredis` dependency in `redis-py`. Is hiredis a required dependency for using the package, or is it optional? I have an implicit dependency on `redis-py` and I've encountered an issue with a locked version of `hiredis` in my...
I noticed that in the recent `redis-py` update (5.1.0), the author forgot to mention the hiredis dependency, although it is mentioned [here](https://github.com/redis/redis-py/pull/3324#issue-2419053541:~:text=Upgrade%20the%20required%20hiredis%2Dpy%20version%20to%20be%20at%20least%203.0.0): Including such a change ...
[ { "body": "I have a question regarding the `hiredis` dependency in `redis-py`. \r\nIs hiredis a required dependency for using the package, or is it optional? \r\n\r\nI have an implicit dependency on `redis-py` and I've encountered an issue with a locked version of `hiredis` in my `requirements.txt`\r\n\r\nSinc...
7215a525daac21ab4a91ad90902a7a4e584053a5
{ "head_commit": "4ff84211cdd2253ab80712a03a570bc1f0b8dcad", "head_commit_message": "Codestyl fixes", "patch_to_review": "diff --git a/.github/workflows/integration.yaml b/.github/workflows/integration.yaml\nindex b10edf2fb4..ed969d11f1 100644\n--- a/.github/workflows/integration.yaml\n+++ b/.github/workflows/int...
[ { "diff_hunk": "@@ -8,7 +8,13 @@\n \n # Only support Hiredis >= 3.0:\n HIREDIS_AVAILABLE = int(hiredis.__version__.split(\".\")[0]) >= 3\n+ if not HIREDIS_AVAILABLE:\n+ raise ImportError(\"hiredis package should be >= 3.0.0\")\n HIREDIS_PACK_AVAILABLE = hasattr(hiredis, \"pack_command\")",...
930fa2d6f2402e34672ac8aa69c6e47684a9a65c
diff --git a/.github/workflows/integration.yaml b/.github/workflows/integration.yaml index b10edf2fb4..ed969d11f1 100644 --- a/.github/workflows/integration.yaml +++ b/.github/workflows/integration.yaml @@ -90,6 +90,21 @@ jobs: invoke ${{matrix.test-type}}-tests ls -1 + - name: Run tests ag...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "Dependency Updates & Env Compatibility" }
scipy__scipy-18862@e86ed27
scipy/scipy
Python
18,862
ENH: sparse arrays for hstack, vstack, bmat, block_diag. New block.
This PR makes `hstack`, `vstack` and `block_diags` work with sparse arrays. The return value is a sparse matrix unless any of the block inputs is a sparse array, in which case the return value is a sparse array. It also makes `bmat` work with sparse arrays. But the name `bmat` is not very descriptive, **and** some i...
2023-07-12T03:02:15Z
ENH: concatenating sparse arrays should return sparse arrays ### Is your feature request related to a problem? Please describe. Concatenating sparse arrays (via `hstack`, `vstack`, `bmat`) returns a sparse matrix. ### Describe the solution you'd like. I would like them to maintain the input classes. ### Describe al...
The alternative you describe sounds like a good idea in any case. Moving towards supporting the Array API is something we might want to do in general. The specification would be around what the outcome would be if I supply CSR, CSC and DIA arrays. Also note that, `np.hstack([a, b])` is order of magnitude more readable ...
[ { "body": "### Is your feature request related to a problem? Please describe.\n\nConcatenating sparse arrays (via `hstack`, `vstack`, `bmat`) returns a sparse matrix.\n\n### Describe the solution you'd like.\n\nI would like them to maintain the input classes.\n\n### Describe alternatives you've considered.\n\n`...
042385d14c2d3844e181bb2b8fe2db65c49ae722
{ "head_commit": "e86ed27ecf3b96782a3eea957f46f656d93a1198", "head_commit_message": "clean up import and docs", "patch_to_review": "diff --git a/scipy/sparse/__init__.py b/scipy/sparse/__init__.py\nindex 875ce6dd8298..d27ccc4fd773 100644\n--- a/scipy/sparse/__init__.py\n+++ b/scipy/sparse/__init__.py\n@@ -95,7 +9...
[ { "diff_hunk": "@@ -681,7 +707,60 @@ def bmat(blocks, format=None, dtype=None):\n [0, 0, 7]])\n \n \"\"\"\n+ blocks = np.asarray(blocks, dtype='object')\n+ if any(isinstance(b, sparray) for b in blocks.flat):\n+ return _block_array(blocks, format, dtype, coo_array)\n+ else:\n+ ...
5d4d5c884760f661d26fd382253433d66e2fb4eb
diff --git a/scipy/sparse/__init__.py b/scipy/sparse/__init__.py index 875ce6dd8298..86f7c18f7152 100644 --- a/scipy/sparse/__init__.py +++ b/scipy/sparse/__init__.py @@ -95,7 +95,8 @@ block_diag - Build a block diagonal sparse matrix tril - Lower triangular portion of a matrix in sparse format triu - Upper...
{ "difficulty": "medium", "estimated_review_effort": 4, "problem_domain": "New Feature Additions" }
saleor__saleor-10578@3932987
saleor/saleor
Python
10,578
Add ability to filter by slug.
Adding possibility to filter by slug, to endpoints: - attributes - categories - collections - menus - pages - products - productTypes - warehouses Fixes #9476 # Impact * [ ] New migrations * [ ] New/Updated API fields or mutations * [ ] Deprecated API fields or mutations * [ ] Removed API types,...
2022-09-07T15:18:22Z
Filter by slugs ### What I'm trying to achieve Filter entities by slugs. ### Use case Working with external APIs that refer to products by slug, such as CMS, ERP etc. ### Describe a proposed solution Add property slugs ``` products(filter: { slugs: [String] } ) ``` ``` collections(filter: { slugs: [Strin...
[ { "body": "### What I'm trying to achieve\r\nFilter entities by slugs.\r\n\r\n### Use case\r\nWorking with external APIs that refer to products by slug, such as CMS, ERP etc. \r\n\r\n### Describe a proposed solution\r\nAdd property slugs\r\n\r\n``` products(filter: { slugs: [String] } ) ```\r\n``` collections(...
354c4a5b14d2be89393d5be8ca7a0b7cc8f73e28
{ "head_commit": "3932987af1f747b7516fe370df8a1824fe724c29", "head_commit_message": "Add filter by slug\n\nSlug filter was added to endpoints:\n- products\n- collections\n- categories\n- pages", "patch_to_review": "diff --git a/saleor/graphql/page/filters.py b/saleor/graphql/page/filters.py\nindex d6fd66c9424..cd...
[ { "diff_hunk": "@@ -32,10 +37,15 @@ def filter_page_type_search(qs, _, value):\n return qs.filter(Q(name__trigram_similar=value) | Q(slug__trigram_similar=value))\n \n \n+def filter_slug_list(qs, _, values):", "line": null, "original_line": 40, "original_start_line": null, "path": "saleor/gr...
bde0cd4484364ecb0cc5d1e25b71d976bcc6cfa2
diff --git a/CHANGELOG.md b/CHANGELOG.md index 0526edac2e9..4ab6a123e1b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,11 @@ All notable, unreleased changes to this project will be documented in this file. # 3.8.0 [Unreleased] +### GraphQL API +- Add ability to filter by slug. #10578 by @kadewu + - Affec...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "New Feature Additions" }
saleor__saleor-6098@9640fb8
saleor/saleor
Python
6,098
Update default decimal places
Changing currency caused errors when running Saleor. - Set `DEFAULT_DECIMAL_PLACES` to 3, which should be enough for all currencies (https://en.wikipedia.org/wiki/ISO_4217). - Create mutations for changing `decimal_places` in `DecimalFields` - Update `Money` ObjectType - return amount with the number of decimal plac...
2020-09-03T13:12:12Z
Products cannot be updated in currencies that do not use decimal ### What I'm trying to achieve If I set DEFAULT_CURRENCY as ISK (or another currencies that include "I" for ex: IDQ, IIR) I cannot update products. (When I set DEFAULT_CURRENCY as lowercase it works fine.) Error: `{"data": {"productUpdate": {"err...
I guess this could be moved to `saleor-dashboard`, the problem is that these currencies (and Japanese Yen for example) do not have any decimal places and the dashboard submits an amount with a precision of 1/100. We could also attempt to strip non-significant zeroes from amounts before validating their precision in ...
[ { "body": "### What I'm trying to achieve\r\nIf I set DEFAULT_CURRENCY as ISK (or another currencies that include \"I\" for ex: IDQ, IIR) I cannot update products. \r\n\r\n(When I set DEFAULT_CURRENCY as lowercase it works fine.)\r\n\r\nError:\r\n`{\"data\": {\"productUpdate\": {\"errors\": [{\"field\": \"minim...
efc27eb8ad4a59f80f8c676bed3907eba5cdd759
{ "head_commit": "9640fb86440e1a23c62abcd5dffe35a5e6ffc381", "head_commit_message": "Apply code review suggestions - update validate_price_amount validator", "patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex 5145e11ccb0..cc85c14dba1 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -48,6 +48,7 ...
[ { "diff_hunk": "@@ -168,22 +168,10 @@ def clean_variant_input(\n \n cost_price_amount = cleaned_input.pop(\"cost_price\", None)\n if cost_price_amount is not None:\n- if cost_price_amount < 0:\n- errors[\"costPrice\"] = ValidationError(\n- \"Product p...
6b5bf478ea0d5546bfc4894e4955cbdddad7ef3d
diff --git a/CHANGELOG.md b/CHANGELOG.md index 7f54fc6f5f7..6d2f9f320c0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -48,6 +48,7 @@ All notable, unreleased changes to this project will be documented in this file. - Do not allow negative product price - #6091 by @IKarbowiak - Handle None as attribute value - #6092 ...
{ "difficulty": "medium", "estimated_review_effort": 4, "problem_domain": "Bug Fixes" }
redis__redis-py-2966@5042bf7
redis/redis-py
Python
2,966
Fix objlen type hint
## Pull Request check-list _Please make sure to review and check all of these items:_ - [ ] Do tests and lints pass with this change? - [ ] Do the CI tests pass with this change (enable it first in your forked repo and wait for the github action build to finish)? - [ ] Is the new or changed code fully tested? ...
2023-09-27T13:47:53Z
Redis.json().objlen returns type list instead of int **Version**: redis-stack-server:7.2.0-v2 via docker; redis-py 5.0.0 **Platform**: macOS **Description**: Redis.json().objlen returns type list instead of int. The typing hint suggests it should return int instead of list. In redis-cli, it does return int though...
per the documentation, it returns an array. https://redis.io/commands/json.objlen/#examples > JSON.OBJLEN returns an array of integer replies for each path specified as the number of keys in the object or nil, if the matching JSON value is not an object. the type hint should probably be fixed. > per the docum...
[ { "body": "**Version**: redis-stack-server:7.2.0-v2 via docker; redis-py 5.0.0\r\n\r\n**Platform**: macOS\r\n\r\n**Description**: Redis.json().objlen returns type list instead of int. The typing hint suggests it should return int instead of list. In redis-cli, it does return int though.", "number": 2960, ...
f9b6a5e2a7a1cf29c0044be80fdc237768493282
{ "head_commit": "5042bf7ff4f0c6302d2d40e0e6104747c271d2b0", "head_commit_message": "Fix objlen type hint", "patch_to_review": "diff --git a/redis/commands/json/commands.py b/redis/commands/json/commands.py\nindex 0f92e0d6c9..6cfe5844c3 100644\n--- a/redis/commands/json/commands.py\n+++ b/redis/commands/json/comm...
[ { "diff_hunk": "@@ -121,7 +121,7 @@ def objkeys(\n \"\"\" # noqa\n return self.execute_command(\"JSON.OBJKEYS\", name, str(path))\n \n- def objlen(self, name: str, path: Optional[str] = Path.root_path()) -> int:\n+ def objlen(self, name: str, path: Optional[str] = Path.root_path()) -> Lis...
53d28178f13488081cca29b09f40a688d47f6393
diff --git a/redis/commands/json/commands.py b/redis/commands/json/commands.py index 4c2e58369c..b37dc37687 100644 --- a/redis/commands/json/commands.py +++ b/redis/commands/json/commands.py @@ -121,7 +121,9 @@ def objkeys( """ # noqa return self.execute_command("JSON.OBJKEYS", name, str(path), keys=...
{ "difficulty": "low", "estimated_review_effort": 1, "problem_domain": "Bug Fixes" }
saleor__saleor-6784@c4fea16
saleor/saleor
Python
6,784
Drop country middleware
This PR drops the country middleware (`saleor.core.middleware.country`), which was using GeoIP to determine the user's country. In the new approach, user location is provided as an argument in queries or mutations that need it for tax or stock calculations. Note: this PR removes `CheckoutPaymentCreate.billingAddress...
2021-01-25T12:00:52Z
Allow passing `country` and `currency` to `Product.pricing` and `ProductVariant.pricing` ### What I'm trying to achieve We need to allow people to explicitly switch countries and have the correct prices displayed. Current implementation relies on `request.country` but when using the GraphQL API it's always set to w...
Will it affect product filtering? How to filter products by price without knowing taxes? We've talked about this, ideally passing `country` and `currency` should be possible at `products` level if we ever want to allow products to be filtered or sorted with regard to local taxes or a non-standard currency. This issue h...
[ { "body": "### What I'm trying to achieve\r\nWe need to allow people to explicitly switch countries and have the correct prices displayed.\r\n\r\nCurrent implementation relies on `request.country` but when using the GraphQL API it's always set to whatever GeoIP returned.\r\n\r\n### Describe a proposed solution\...
8a33bfb220c728878bafdbace7cd18e9ef44148a
{ "head_commit": "c4fea16bd95488bad137cb651f92b164f05cea33", "head_commit_message": "Fix LGTM issues", "patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex ed08fca4ca4..edc40ed4088 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -12,6 +12,7 @@ All notable, unreleased changes to this project will...
[ { "diff_hunk": "@@ -131,3 +138,28 @@ def get_user_or_app_from_context(context):\n def requestor_is_superuser(requestor):\n \"\"\"Return True if requestor is superuser.\"\"\"\n return getattr(requestor, \"is_superuser\", False)\n+\n+\n+def get_user_country_context(\n+ destination_address: Optional[\n+...
dc77bec10e5a2d279425a93d899e9a72215b17a7
diff --git a/.isort.cfg b/.isort.cfg index 8b5a0f49ae6..cb4ef6b8ffc 100644 --- a/.isort.cfg +++ b/.isort.cfg @@ -1,2 +1,2 @@ [settings] -known_third_party = Adyen,PIL,authorizenet,babel,boto3,braintree,celery,dj_database_url,dj_email_url,django,django_cache_url,django_countries,django_filters,django_measurement,django...
{ "difficulty": "medium", "estimated_review_effort": 4, "problem_domain": "New Feature Additions" }
redis__redis-py-2611@7ca1d37
redis/redis-py
Python
2,611
update json().arrindex() default values
### Pull Request check-list _Please make sure to review and check all of these items:_ - [x] Does `$ tox` pass with this change (including linting)? - [x] Do the CI tests pass with this change (enable it first in your forked repo and wait for the github action build to finish)? - [x] Is the new or changed code ...
2023-03-13T22:23:24Z
arrindex returns -1 when finding the last value in the array (and when start and stop are not specified) Version: redis-py 4.1.4, redis 6.2.7 Platform: Python 3.10.5 on MacOS 12.6.1 Description: When using arrindex, the behavior for finding the last element of the array, and finding no element in the array is the...
Hi @chayim @uglide , do we have any PR for this? If not can I take this up and continue to analyze from my side.
[ { "body": "Version: redis-py 4.1.4, redis 6.2.7\r\n\r\nPlatform: Python 3.10.5 on MacOS 12.6.1\r\n\r\nDescription: When using arrindex, the behavior for finding the last element of the array, and finding no element in the array is the same when default start and stop are unspecified.\r\n\r\nFor example, I have ...
6c708c2e0511364c2c3f21fa1259de05e590632d
{ "head_commit": "7ca1d378d6f5691902ade1260b88ae3ae5ffbf5b", "head_commit_message": "add unit test", "patch_to_review": "diff --git a/redis/commands/json/commands.py b/redis/commands/json/commands.py\nindex 7fd4039203..fb4d68e14a 100644\n--- a/redis/commands/json/commands.py\n+++ b/redis/commands/json/commands.py...
[ { "diff_hunk": "@@ -166,6 +166,8 @@ def test_arrindex(client):\n client.json().set(\"arr\", Path.root_path(), [0, 1, 2, 3, 4])\n assert 1 == client.json().arrindex(\"arr\", Path.root_path(), 1)\n assert -1 == client.json().arrindex(\"arr\", Path.root_path(), 1, 2)\n+ assert 4 == client.json().arr...
69ea3da2e9d58750a5621e5a75416ee9d2ab00da
diff --git a/redis/commands/json/commands.py b/redis/commands/json/commands.py index 7fd4039203..c02c47ad86 100644 --- a/redis/commands/json/commands.py +++ b/redis/commands/json/commands.py @@ -31,8 +31,8 @@ def arrindex( name: str, path: str, scalar: int, - start: Optional[int] = 0, ...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "Bug Fixes" }
saleor__saleor-5839@bde1917
saleor/saleor
Python
5,839
Fix payment tracking in checkout
Cancel all existing checkout active payments before creating a new checkout payment. Fixes #4163 # Impact * [ ] New migrations * [x] New/Updated API fields or mutations * [ ] Deprecated API fields or mutations * [ ] Removed API types, fields, or mutations * [ ] Documentation needs to be updated # Pull Re...
2020-07-02T08:40:47Z
Payment tracking is inconsistent in checkout GraphQL API ### What I'm trying to achieve In certain cases completing an order will only capture partially. ### Steps to reproduce the problem 1. Create a checkout with one item 2. Call `checkoutPaymentCreate`, the checkout object will now have one active payment that...
[ { "body": "### What I'm trying to achieve\r\nIn certain cases completing an order will only capture partially.\r\n\r\n### Steps to reproduce the problem\r\n1. Create a checkout with one item\r\n2. Call `checkoutPaymentCreate`, the checkout object will now have one active payment that covers the entire total\r\n...
e4a3eccfa95fe084e3a4a6e588e73362052f772f
{ "head_commit": "bde19173b91a2407093a4d16f402bb095d75bbe2", "head_commit_message": "Drop unused import", "patch_to_review": "diff --git a/saleor/checkout/models.py b/saleor/checkout/models.py\nindex 2e96e47adc8..cc7e3561a7a 100644\n--- a/saleor/checkout/models.py\n+++ b/saleor/checkout/models.py\n@@ -1,5 +1,4 @@...
[ { "diff_hunk": "@@ -139,8 +138,7 @@ def get_line(self, variant: \"ProductVariant\") -> Optional[\"CheckoutLine\"]:\n return next(matching_lines, None)\n \n def get_last_active_payment(self) -> Optional[\"Payment\"]:\n- payments = [payment for payment in self.payments.all() if payment.is_activ...
b20b6fc9e2efa44c252415a4faaa6670d6f5afe8
diff --git a/saleor/checkout/tests/test_checkout.py b/saleor/checkout/tests/test_checkout.py index 1020a3c1fdf..b7fd562647d 100644 --- a/saleor/checkout/tests/test_checkout.py +++ b/saleor/checkout/tests/test_checkout.py @@ -18,6 +18,7 @@ from ...discount.models import NotApplicable, Voucher from ...order import Orde...
{ "difficulty": "medium", "estimated_review_effort": 4, "problem_domain": "Bug Fixes" }
scipy__scipy-18802@82b06f9
scipy/scipy
Python
18,802
MAINT: Use `sparse.diags` instead of `spdiags` internally.
Modifies `sparse.eye()` to use `sparse.diags` internally instead of `sparse.spdiags`. This modifies the behavior in the case where the diagonal offset(s) are greater than the maximum shape of the array. Previously, this would result in a sparse array with 0 stored elements and, in the case of the DIA format, negative v...
2023-07-01T11:25:31Z
BUG: `spdiags`, `eye`, `identity` corner case when offset greater than array shape ### Describe your issue. The `spdiags` creation function allows the diagonal offsets to be greater than the matrix shape, which results in an empty array in `dia` format with a negative number of non-zero values: ```python >>> m = n...
+1, this would be a nice improvement. Aside: It's unfortunate that the DIA `nnz` semantics don't really match the rest of the formats, where `nnz` reflects the number of stored entries (including duplicates). If you're using `nnz` to keep track of the storage cost of a sparse array/matrix, then the DIA result isn't ...
[ { "body": "### Describe your issue.\n\nThe `spdiags` creation function allows the diagonal offsets to be greater than the matrix shape, which results in an empty array in `dia` format with a negative number of non-zero values:\r\n\r\n```python\r\n>>> m = n = 3 # Square, 3x3\r\n>>> k = -5 # diagonal offset\r\n...
5353f121af03157207c62aa4dd8748888d855a2b
{ "head_commit": "82b06f970dcf0947e517820c7bdfbd652991901a", "head_commit_message": "ENH: Prefer sparse.diags over spdiags for eye().\n\nSwitches the implementation of sparse.eye to use sparse.diags\ninstead of spdiags. This eliminates a corner-case where spdiags\nwould result in dia arrays with negative diagonals ...
[ { "diff_hunk": "@@ -248,9 +248,27 @@ def test_eye(self):\n for m in [3, 5]:\n for n in [3, 5]:\n for k in range(-5,6):\n- assert_equal(construct.eye(m, n, k=k).toarray(), np.eye(m, n, k=k))\n- if m == n:\n- assert_e...
ead4a42ac40e7b0ee0d0378b1ded40fc3bd44020
diff --git a/scipy/sparse/_construct.py b/scipy/sparse/_construct.py index 95ac89cb1a01..c685c11c7741 100644 --- a/scipy/sparse/_construct.py +++ b/scipy/sparse/_construct.py @@ -348,8 +348,8 @@ def eye(m, n=None, k=0, dtype=float, format=None): data = np.ones(n, dtype=dtype) return coo_matrix...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "Bug Fixes" }
scipy__scipy-18825@3276a28
scipy/scipy
Python
18,825
BUG: make `L-BFGS-B` optimizer work with single precision gradient
#### Reference issue Closes #18730 #### What does this implement/fix? Casts the gradient array to double precision as Fortran expects a double precision array. I am not sure if this is the best place for it.
2023-07-04T20:32:54Z
BUG: `scipy.optimize.minimize` fails when `dtype=float32` Jacobian is passed ### Describe your issue. `scipy.optimize.minimize` only accept `dtype=float64` Jacobian (the called Fortran routine takes `float64/double`). If fed with `dtype=float32` Jacobian, the failing message doesn't help users debug too much. `dt...
Thank you for reporting @husisy. I can reproduce locally. Until we fix that (or not) on the fortran side, would you be interested in adding some input validations? I think we should do any casting lower down, rather than creating a high level wrapper in `minimize`. e.g. BFGS is pure python, so we probably don't want to...
[ { "body": "### Describe your issue.\r\n\r\n`scipy.optimize.minimize` only accept `dtype=float64` Jacobian (the called Fortran routine takes `float64/double`). If fed with `dtype=float32` Jacobian, the failing message doesn't help users debug too much.\r\n\r\n`dtype=float32` gradient is quite common for users fr...
31d8948250aaa3c67df77b237d4126592343a6e6
{ "head_commit": "3276a28662138cb58cd97de3f512a43595090a1c", "head_commit_message": "TST: strengthen test by making it 2 dimensional", "patch_to_review": "diff --git a/scipy/optimize/_lbfgsb_py.py b/scipy/optimize/_lbfgsb_py.py\nindex a4d06954178f..7def7605985a 100644\n--- a/scipy/optimize/_lbfgsb_py.py\n+++ b/sc...
[ { "diff_hunk": "@@ -196,8 +196,8 @@ def fmin_l_bfgs_b(func, x0, fprime=None, args=(),\n 'callback': callback,\n 'maxls': maxls}\n \n- res = _minimize_lbfgsb(fun, x0, args=args, jac=jac, bounds=bounds,\n- **opts)\n+ res = _minimize_lbfgsb(fun, x0, args=args...
5df3be2b84235653b8ffaf8da0e4e0aa1e406edf
diff --git a/scipy/optimize/_lbfgsb_py.py b/scipy/optimize/_lbfgsb_py.py index a4d06954178f..d42eda9d5e4b 100644 --- a/scipy/optimize/_lbfgsb_py.py +++ b/scipy/optimize/_lbfgsb_py.py @@ -348,6 +348,10 @@ def _minimize_lbfgsb(fun, x0, args=(), jac=None, bounds=None, n_iterations = 0 while 1: + # g may...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "Bug Fixes" }
saleor__saleor-5804@4b9f9fa
saleor/saleor
Python
5,804
Set checkout country to one from shipping address
This also checks if variants in checkouts are available in the shipping zone from shipping country I want to merge this change because... Fixes #5780 Fixes #5781 <!-- Please mention all relevant issue numbers. --> # Impact * [ ] New migrations * [ ] New/Updated API fields or mutations * [ ] Deprecated ...
2020-06-19T10:47:15Z
Can not buy product if product unavailable for the default country ### What I'm trying to achieve Buy product with is available in the shipping zone. ### Steps to reproduce the problem 1. Create a product with is unavailable in the shipping zone related to `DEFAULT_COUNTRY` and is available in another shipping zon...
[ { "body": "### What I'm trying to achieve\r\nBuy product with is available in the shipping zone.\r\n\r\n### Steps to reproduce the problem\r\n1. Create a product with is unavailable in the shipping zone related to `DEFAULT_COUNTRY` and is available in another shipping zone. \r\n2. Try to create a checkout with ...
eca34673abffdd0fa562e8a132ea6895d79a9686
{ "head_commit": "4b9f9fadb60a32fdbad3c0a49f7b4e964fc6d979", "head_commit_message": "Remove return tuple in process_checkout_lines", "patch_to_review": "diff --git a/saleor/graphql/checkout/mutations.py b/saleor/graphql/checkout/mutations.py\nindex 61f9a1e39d4..d5f3d172f1d 100644\n--- a/saleor/graphql/checkout/mu...
[ { "diff_hunk": "@@ -527,6 +527,68 @@ def test_checkout_create_check_lines_quantity_multiple_warehouse(\n assert data[\"errors\"][0][\"field\"] == \"quantity\"\n \n \n+def test_checkout_create_sets_country_from_shipping_address_country(\n+ user_api_client,\n+ variant_with_many_stocks_different_shipping...
152f888256532e80400929b73bd5a1edafe86dd4
diff --git a/saleor/graphql/checkout/mutations.py b/saleor/graphql/checkout/mutations.py index 61f9a1e39d4..d5f3d172f1d 100644 --- a/saleor/graphql/checkout/mutations.py +++ b/saleor/graphql/checkout/mutations.py @@ -225,6 +225,13 @@ def clean_input(cls, info, instance: models.Checkout, data, input_cls=None): ...
{ "difficulty": "medium", "estimated_review_effort": 4, "problem_domain": "Bug Fixes" }
saleor__saleor-5684@cd0c06c
saleor/saleor
Python
5,684
Add missing OrderEvents in checkout flow
I want to merge this change because... it adds missing OrderEvents in checkout flow. <!-- Please mention all relevant issue numbers. --> fixes #5535 # Impact * [x] New migrations * [x] New/Updated API fields or mutations * [ ] Deprecated API fields or mutations * [ ] Removed API types, fields, or mutations...
2020-05-22T10:49:03Z
Missing payment_captured and order_fully_paid events ### What I'm trying to achieve When placing orders using a gateway that captures the amount (without using the dashboard), the events payment_captured and order_fully_paid are not registered. These events are registered only when marking orders as paid in the dashbo...
Thanks for reporting, it's a bug. These events should be called as well when an order is placed through checkout mutations. Hi, this seems to be caused because order object is not set up correctly in payment object (is None when capturing a payment). Do you have any clue where in the code this can be happening (so I ca...
[ { "body": "### What I'm trying to achieve\r\nWhen placing orders using a gateway that captures the amount (without using the dashboard), the events payment_captured and order_fully_paid are not registered. These events are registered only when marking orders as paid in the dashboard.\r\n\r\n### Steps to reprodu...
6a02be895ebf243a67f61cfb64eb057ca439e533
{ "head_commit": "cd0c06c0312b92a7f25a29d27789c94debda642b", "head_commit_message": "Fix CHANGELOG", "patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex 1d88b898ac4..5da0d29672a 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -9,6 +9,7 @@ All notable, unreleased changes to this project will be ...
[ { "diff_hunk": "@@ -1576,16 +1576,12 @@ def test_order_capture(\n assert data[\"isPaid\"]\n assert data[\"totalCaptured\"][\"amount\"] == float(amount)\n \n- event_order_paid = order.events.first()\n- assert event_order_paid.type == order_events.OrderEvents.ORDER_FULLY_PAID\n- assert event_orde...
f1660a0e846308c86942ff40218b0308a1897dc5
diff --git a/CHANGELOG.md b/CHANGELOG.md index 688ae4266fc..7285b4e67ec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ All notable, unreleased changes to this project will be documented in this file. - Explicit country assignment in default shipping zones - #5736 by @maarcingebala - Drop `json_content...
{ "difficulty": "medium", "estimated_review_effort": 4, "problem_domain": "Bug Fixes" }
saleor__saleor-5611@a2d5871
saleor/saleor
Python
5,611
Fix warehouse migrations
Fix failing migrations for warehouse with an empty string in name. Fixes #5607 <!-- Please mention all relevant issue numbers. --> # Impact * [ ] New migrations * [ ] New/Updated API fields or mutations * [ ] Deprecated API fields or mutations * [ ] Removed API types, fields, or mutations # Pull Request...
2020-05-08T07:29:01Z
Warehouse slug migration failing Hey guys, Congratulations on the upcoming 2.10 release! Any tip on why would this migration fail? ``` Applying warehouse.0003_warehouse_slug...Traceback (most recent call last): File "manage.py", line 10, in <module> execute_from_command_line(sys.argv) File "/Users...
Seems like you have a `Warehouse` instance without a name. Quick fix would be to filter such warehouses in Django shell and set some names (or do that in the dashboard). And we have to fix the migration anyway. To me it looks like our own initial migration [creates warehouses with empty attributes](https://github.com/m...
[ { "body": "Hey guys,\r\n\r\nCongratulations on the upcoming 2.10 release!\r\n\r\nAny tip on why would this migration fail?\r\n\r\n```\r\n Applying warehouse.0003_warehouse_slug...Traceback (most recent call last):\r\n File \"manage.py\", line 10, in <module>\r\n execute_from_command_line(sys.argv)\r\n File...
a1ec77677e1a769ad7995e3163c7c35295c13ed6
{ "head_commit": "a2d5871826d57891255e4b810e4fadca88694650", "head_commit_message": "Handle warehouse without shipping zone in migrations", "patch_to_review": "diff --git a/saleor/warehouse/migrations/0001_initial.py b/saleor/warehouse/migrations/0001_initial.py\nindex ce01e2486be..4d236a03606 100644\n--- a/saleo...
[ { "diff_hunk": "@@ -8,29 +8,38 @@\n def create_unique_slug_for_warehouses(apps, schema_editor):\n Warehouse = apps.get_model(\"warehouse\", \"Warehouse\")\n \n+ default_slug_value = \"warehouse\"\n warehouses = (\n Warehouse.objects.filter(slug__isnull=True).order_by(Lower(\"name\")).iterator...
502eb81964d7ab92a112d2e2e4adc3f8ae871c44
diff --git a/saleor/warehouse/migrations/0001_initial.py b/saleor/warehouse/migrations/0001_initial.py index ce01e2486be..4d236a03606 100644 --- a/saleor/warehouse/migrations/0001_initial.py +++ b/saleor/warehouse/migrations/0001_initial.py @@ -23,7 +23,7 @@ def get_or_create_warehouse(apps): Address = apps.ge...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "Bug Fixes" }
saleor__saleor-5646@d1a4736
saleor/saleor
Python
5,646
Add our implementation of UUID Scalar
I want to merge this change because... This PR gives us control over UUID scalar and changes thrown errors to `GraphQLError` when provided a wrong value for the token. <!-- Please mention all relevant issue numbers. --> Fixes #5008 # Impact * [ ] New migrations * [ ] New/Updated API fields or mutations * ...
2020-05-14T10:10:41Z
Resolving a checkout by providing an invalid UUID should be handled When running a query like the following: ``` { checkout(token: "Best-UUID") { created } } ``` A `ValueError` will occur. We should whether return `None` or raise a validation error. Note: we need to update the other queries and m...
[ { "body": "When running a query like the following:\r\n\r\n```\r\n{\r\n checkout(token: \"Best-UUID\") {\r\n created\r\n }\r\n}\r\n```\r\n\r\nA `ValueError` will occur. We should whether return `None` or raise a validation error.\r\n\r\nNote: we need to update the other queries and mutations that are using...
0935d4e6e251fad97213f11311bc2a2150e3efd9
{ "head_commit": "d1a4736ab18a442eb1f9481232bcfe1cf9aa7a63", "head_commit_message": "Fix CHANGELOG", "patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex 32711b97671..9e5e6302779 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -4,7 +4,10 @@ All notable, unreleased changes to this project will be...
[ { "diff_hunk": "@@ -109,6 +110,7 @@ class Checkout(CountableDjangoObjectType):\n TaxedMoney,\n description=\"The price of the checkout before shipping, with taxes included.\",\n )\n+ token = graphene.Field(UUID, description=(\"UUID of checkout.\"), required=True)", "line": null, "...
05e64af3b25d84d1cfa79e9cb2a61ba0177b1906
diff --git a/CHANGELOG.md b/CHANGELOG.md index 32711b97671..9e5e6302779 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,10 @@ All notable, unreleased changes to this project will be documented in this file. ## [Unreleased] +- Add our implementation of UUID scalar - #5646 by @koradon + ## 2.10.0 + - OpenT...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "Bug Fixes" }
saleor__saleor-5593@4fc2581
saleor/saleor
Python
5,593
Create product without category
I want to merge this change because...closes https://github.com/mirumee/saleor/issues/5589 <!-- Please mention all relevant issue numbers. --> # Impact * [ ] New migrations * [ ] New/Updated API fields or mutations * [ ] Deprecated API fields or mutations * [ ] Removed API types, fields, or mutations # P...
2020-05-05T10:30:32Z
Cannot create product without assigning it to category ### What I'm trying to achieve To create product with "category" field not filled ### Steps to reproduce the problem 1. Go to dashboard 2. Fill all fields except category 3. Get this ``` { "errors": [ { "message": "The loader.load() function...
[ { "body": "### What I'm trying to achieve\r\nTo create product with \"category\" field not filled\r\n\r\n### Steps to reproduce the problem\r\n1. Go to dashboard\r\n2. Fill all fields except category\r\n3. Get this\r\n```\r\n{\r\n \"errors\": [\r\n {\r\n \"message\": \"The loader.load() function must b...
f53d19940187cb969b2db41c73203d1ade5ed267
{ "head_commit": "4fc25816c1007f9053493a58dadac768497434e8", "head_commit_message": "Fix creating product without category", "patch_to_review": "diff --git a/saleor/graphql/product/types/products.py b/saleor/graphql/product/types/products.py\nindex 19b8548d151..077275b49af 100644\n--- a/saleor/graphql/product/typ...
[ { "diff_hunk": "@@ -460,7 +460,10 @@ class Meta:\n \n @staticmethod\n def resolve_category(root: models.Product, info):\n- return CategoryByIdLoader(info.context).load(root.category_id)\n+ category_id = root.category_id\n+ if category_id:\n+ return CategoryByIdLoader(info...
a3c97dbbc066b8a47d5b828c7af54530d7e704d9
diff --git a/saleor/graphql/product/types/products.py b/saleor/graphql/product/types/products.py index 19b8548d151..8461b8dcbd6 100644 --- a/saleor/graphql/product/types/products.py +++ b/saleor/graphql/product/types/products.py @@ -460,7 +460,11 @@ class Meta: @staticmethod def resolve_category(root: model...
{ "difficulty": "low", "estimated_review_effort": 2, "problem_domain": "Bug Fixes" }
scipy__scipy-18979@5c43ca4
scipy/scipy
Python
18,979
DOC: Add units to scipy.constants description
Closes #17571 As noted in issue #17571, while most constants have units indicated, the "Physical constants" at the top of the documentation do not. I copied the unit symbols from _codata.py. This should close the issue. [skip actions] [skip cirrus]
2023-07-27T21:06:28Z
ENH: Add units to scipy.constants description ### Is your feature request related to a problem? Please describe. I could not find out, in which units the constants of `scipy.constants` are. I guess they are in SI notation, but I'd like to be sure, before I use these numbers. ### Describe the solution you'd like. Co...
Hi @bmoneke, thank you for reporting. Units are in the doc here https://docs.scipy.org/doc/scipy/reference/constants.html Is there something missing? (scroll down). Otherwise yes, everything is in SI and yes maybe we can add a note at the beginning to make it clear. Would you like to do it? Below are the constants w...
[ { "body": "### Is your feature request related to a problem? Please describe.\n\nI could not find out, in which units the constants of `scipy.constants` are.\r\nI guess they are in SI notation, but I'd like to be sure, before I use these numbers.\n\n### Describe the solution you'd like.\n\nCould you add either ...
7ad6eb4161f9b18a659c0d31567932cb3b3e30bf
{ "head_commit": "5c43ca40b35811289f383f84ed18c0947479c37d", "head_commit_message": "DOC: Indicate alpha = fine_structure is unitless\n\n[skip actions] [skip cirrus]", "patch_to_review": "diff --git a/scipy/constants/__init__.py b/scipy/constants/__init__.py\nindex ed1f39350d23..be68e2ae90b2 100644\n--- a/scipy/c...
[ { "diff_hunk": "@@ -22,36 +22,36 @@\n ==================\n \n =========================== =================================================================\n-``c`` speed of light in vacuum\n-``speed_of_light`` speed of light in vacuum\n-``mu_0`` the magnetic...
81de248cc3f94b07e3f9ac815e5c6094dd1cccaf
diff --git a/scipy/constants/__init__.py b/scipy/constants/__init__.py index ce2805070eef..b58795043dc4 100644 --- a/scipy/constants/__init__.py +++ b/scipy/constants/__init__.py @@ -20,39 +20,43 @@ Physical constants ================== - -=========================== ===============================================...
{ "difficulty": "low", "estimated_review_effort": 1, "problem_domain": "New Feature Additions" }
scipy__scipy-18682@f6ef108
scipy/scipy
Python
18,682
TST: stats: fix xslow test failures
#### Reference issue Closes gh-18680 #### What does this implement/fix? gh-18680 reported failures in xslow tests. This fixes them. #### Additional Information These probably started failing due to gh-18496 (effectively) changing the random number stream.
2023-06-14T20:18:38Z
stats: XSLOW test failures in TestFit I'm getting two failures in the stats `TestFit` test class when I run the tests with `SCIPY_XSLOW=1`: ``` $ SCIPY_XSLOW=1 python3 dev.py test -m full -j 10 -t scipy.stats.tests.test_fit::TestFit 💻 ninja -C /home/warren/repos/git/forks/scipy/build -j12 ninja: Entering dire...
[ { "body": "I'm getting two failures in the stats `TestFit` test class when I run the tests with `SCIPY_XSLOW=1`:\r\n\r\n```\r\n$ SCIPY_XSLOW=1 python3 dev.py test -m full -j 10 -t scipy.stats.tests.test_fit::TestFit\r\n💻 ninja -C /home/warren/repos/git/forks/scipy/build -j12\r\nninja: Entering directory `/hom...
299df543dabc77fc5007df4c54457e31b2d2e71d
{ "head_commit": "f6ef1087a7d876fbf8b2b28f722f1a2da8cb4282", "head_commit_message": "TST: stats: fix xslow test failures", "patch_to_review": "diff --git a/scipy/stats/tests/test_fit.py b/scipy/stats/tests/test_fit.py\nindex 471c293cd2b9..0d7083e8fcf4 100644\n--- a/scipy/stats/tests/test_fit.py\n+++ b/scipy/stats...
[ { "diff_hunk": "@@ -269,7 +269,7 @@ def cases_test_fit_mse():\n 'kstwo', # very slow (~25 min) but passes\n 'geninvgauss', # quite slow (~4 minutes) but passes\n 'gausshyper', 'genhyperbolic', # integration warnings\n- 'ar...
b43f8c8a9888de8db19399f2e24d61d601c410aa
diff --git a/scipy/stats/tests/test_fit.py b/scipy/stats/tests/test_fit.py index 471c293cd2b9..4e2647063859 100644 --- a/scipy/stats/tests/test_fit.py +++ b/scipy/stats/tests/test_fit.py @@ -269,7 +269,7 @@ def cases_test_fit_mse(): 'kstwo', # very slow (~25 min) but passes ...
{ "difficulty": "low", "estimated_review_effort": 2, "problem_domain": "Bug Fixes" }
scipy__scipy-18636@93a6e10
scipy/scipy
Python
18,636
MAINT: stats.truncnorm/stats.betaprime: fix _munp for higher moments, add tests
#### Reference issue Closes gh-18634 #### What does this implement/fix? gh-18634 reported > When using the stats.truncnorm.moment, I always get an error, if I try to compute a moment greater than [or equal to] 5. This fixes the bug and adds a distribution-specific tests. Since there was no existing test ...
2023-06-05T22:42:20Z
BUG: stats.truncnorm.moments yields error for moment order greater than 5 ### Describe your issue. When using the stats.truncnorm.moment, I always get an error, if I try to compute a moment greater than 5 ### Reproducing Code Example ```python scipy.stats.truncnorm.moment(5, -2, 3) ``` ### Error message ```shell ...
Thanks for reporting. I'll take a look. Could be as simple as making the list in [this line](https://github.com/scipy/scipy/blame/1305da5985cbb1524aaa58b1296647bb122e6249/scipy/stats/_continuous_distns.py#L9379) an array. That code wasn't modified in the recent `truncnorm` changes, and it looks like it relied on `_pdf`...
[ { "body": "### Describe your issue.\n\nWhen using the stats.truncnorm.moment, I always get an error, if I try to compute a moment greater than 5\n\n### Reproducing Code Example\n\n```python\nscipy.stats.truncnorm.moment(5, -2, 3)\n```\n\n\n### Error message\n\n```shell\n----> 1 truncnorm.moment(8, -2, 3)\r\n\r\...
1305da5985cbb1524aaa58b1296647bb122e6249
{ "head_commit": "93a6e10de6e5acd1b6b58a2014d16bfc63710ba5", "head_commit_message": "MAINT: stats.truncnorm/stats.betaprime: fix _munp for higher moments, add tests", "patch_to_review": "diff --git a/scipy/stats/_continuous_distns.py b/scipy/stats/_continuous_distns.py\nindex 279b97efa836..3cf386261ab0 100644\n--...
[ { "diff_hunk": "@@ -964,7 +964,10 @@ def _munp(self, n, a, b):\n ((b - 4.0)*(b - 3.0)*(b - 2.0)*(b - 1.0))),\n fillvalue=np.inf)\n else:\n- raise NotImplementedError\n+ return _lazywhere(b > n, (a, b),\n+ # ...
c801fb6afdb33aacaede642ea18de5b9b33d7f0c
diff --git a/scipy/stats/_continuous_distns.py b/scipy/stats/_continuous_distns.py index 279b97efa836..5d345fc32af0 100644 --- a/scipy/stats/_continuous_distns.py +++ b/scipy/stats/_continuous_distns.py @@ -941,30 +941,10 @@ def _ppf(self, p, a, b): return out def _munp(self, n, a, b): - if n == ...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "Bug Fixes" }
redis__redis-py-2238@b19ede7
redis/redis-py
Python
2,238
Remove verbose logging from `redis-py/redis/cluster.py`
### Pull Request check-list _Please make sure to review and check all of these items:_ - [x] Does `$ tox` pass with this change (including linting)? - [x] Do the CI tests pass with this change (enable it first in your forked repo and wait for the github action build to finish)? - [ ] Is the new or changed code ...
2022-06-17T22:34:18Z
[Question] Remove Redis Cluster logs **Version**: 4.2.2 **Platform**: Python 3.8.10 on Ubuntu 20.04 **Description**: There is so much logs in `cluster` module that I would not want it to show up in my application logs. Is there a reason to leave these logs in this module? Instead, couldn't we just raise exce...
Agreed. Those shouldn't have made it through the PR. However, I'd argue that this is a breaking (but worthwhile!) change, in case someone is relying on this behaviour. We made a similar change in the latest Jedis. @dvora-h candidate for >=4.4.0 In theory, are we saying here that we would like to remove all of the...
[ { "body": "**Version**: \r\n4.2.2\r\n\r\n**Platform**:\r\nPython 3.8.10 on Ubuntu 20.04\r\n\r\n**Description**:\r\nThere is so much logs in `cluster` module that I would not want it to show up in my application logs. Is there a reason to leave these logs in this module? Instead, couldn't we just raise exception...
b2bcbc8bf1ae5622567acbc20e30e9c2e977e5c0
{ "head_commit": "b19ede760c84309309a6717b04ebf5b061e7f2cb", "head_commit_message": "updated CHANGES", "patch_to_review": "diff --git a/CHANGES b/CHANGES\nindex b7e238ebb3..e461806db6 100644\n--- a/CHANGES\n+++ b/CHANGES\n@@ -1,4 +1,4 @@\n-\n+ * Remove verbose logging from cluster.py\n * Allow negative `re...
[ { "diff_hunk": "@@ -1114,10 +1098,8 @@ def _execute_command(self, target_node, *args, **kwargs):\n return response\n \n except (RedisClusterException, BusyLoadingError) as e:", "line": null, "original_line": 1100, "original_start_line": null, "path": "redis/cluster.py...
5b56f28c087e514622780ddb2d7cd15e57545b3f
diff --git a/CHANGES b/CHANGES index b4841ddb2b..6a890ef122 100644 --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,4 @@ - + * Remove verbose logging from cluster.py * Add retry mechanism to async version of Connection * Compare commands case-insensitively in the asyncio command parser * Allow negative `retries...
{ "difficulty": "low", "estimated_review_effort": 2, "problem_domain": "Code Refactoring / Architectural Improvement" }
redis__redis-py-2140@b5d5c30
redis/redis-py
Python
2,140
Replace OSError exceptions from `can_read` with `redis.ConnectionError`
### Pull Request check-list _Please make sure to review and check all of these items:_ - [ ] Does `$ tox` pass with this change (including linting)? - [ ] Do the CI tests pass with this change (enable it first in your forked repo and wait for the github action build to finish)? - [ ] Is the new or changed code ...
2022-04-25T14:58:25Z
`connection.can_read()` raises OSError when connection is broken **Version**: 4.2.2 **Platform**: Windows 11 **Description**: `redis.asyncio.connection.Connection()`, the class provides a `can_read` method, which is used, for example, in `Client.parse_response`. However, unlike `Connection.read_response()` t...
[ { "body": "\r\n**Version**: 4.2.2\r\n\r\n**Platform**: Windows 11\r\n**Description**: \r\n`redis.asyncio.connection.Connection()`, the class provides a `can_read` method, which is used, for example, in `Client.parse_response`.\r\n\r\nHowever, unlike `Connection.read_response()` there is no error handling presen...
6ba46418236718d95f9dee09adaa8a42a4d5c23b
{ "head_commit": "b5d5c309ba1b193dec0ab977af95b297fc26c88f", "head_commit_message": "Replace OSError exceptions from `can_read` with `redis.ConnectionError`", "patch_to_review": "diff --git a/redis/asyncio/connection.py b/redis/asyncio/connection.py\nindex f0e6d3da4f..7b1463be4d 100644\n--- a/redis/asyncio/connec...
[ { "diff_hunk": "@@ -911,7 +911,13 @@ async def can_read(self, timeout: float = 0):\n \"\"\"Poll the socket to see if there's data that can be read.\"\"\"\n if not self.is_connected:\n await self.connect()\n- return await self._parser.can_read(timeout)\n+ try:\n+ ...
1087770be22b88da0ee88331c7e0774587684b84
diff --git a/redis/asyncio/connection.py b/redis/asyncio/connection.py index f0e6d3da4f..91961ba674 100644 --- a/redis/asyncio/connection.py +++ b/redis/asyncio/connection.py @@ -911,7 +911,13 @@ async def can_read(self, timeout: float = 0): """Poll the socket to see if there's data that can be read.""" ...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "Bug Fixes" }
saleor__saleor-5446@5943a40
saleor/saleor
Python
5,446
Allow Update/Delete Metadata mutations to affect multiple items
I want to merge this change because... Allow Metadata Update/Delete mutations affect more than one item. <!-- Please mention all relevant issue numbers. --> Closes #5417 # Impact * [ ] New migrations * [x] New/Updated API fields or mutations * [ ] Deprecated API fields or mutations * [ ] Removed API types,...
2020-04-06T15:02:32Z
Allow to update/delete multiple metadata items at once ### What I'm trying to achieve I'm trying to update/delete multiple metadata items. With the current implementation, I need to send multiple mutations, while I could just have one that updates/deletes multiple keys at once e.g. by passing input like `input: [{key:...
@maarcingebala in `test_meta_mutations` we have tests for a single meta item for every model (User, Product, Order, etc). Do we want to have tests with multiple updated/deleted items for every model also? I think it's fine if we refactor them to use lists with one element, but there need to be some tests that actually ...
[ { "body": "### What I'm trying to achieve\r\nI'm trying to update/delete multiple metadata items. With the current implementation, I need to send multiple mutations, while I could just have one that updates/deletes multiple keys at once e.g. by passing input like `input: [{key: \"key-a\", value: \"a\"}, {key: \...
92582e12a5545e4f9378ce1ec0bfdba006422f9c
{ "head_commit": "5943a40628abfb0263029564737ac7db60241a23", "head_commit_message": "Add entry to CHANGELOG", "patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex c1c1df8fd76..aaec41bd3d4 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -89,6 +89,7 @@ All notable, unreleased changes to this proje...
[ { "diff_hunk": "@@ -2316,10 +2316,10 @@ type Mutation {\n orderUpdateShipping(order: ID!, input: OrderUpdateShippingInput): OrderUpdateShipping\n orderVoid(id: ID!): OrderVoid\n orderBulkCancel(ids: [ID]!, restock: Boolean!): OrderBulkCancel\n- deleteMetadata(id: ID!, key: String!): DeleteMetadata\n+ de...
43a013674b9fe84181322a9f534a4abb187cf5ba
diff --git a/CHANGELOG.md b/CHANGELOG.md index 13f2bf17993..deda51ba1e9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -89,6 +89,7 @@ All notable, unreleased changes to this project will be documented in this file. - Remove unused settings and environment variables - #5420 by @maarcingebala - Add product price valid...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "New Feature Additions" }
saleor__saleor-5443@aef7067
saleor/saleor
Python
5,443
Check if sale contains product, category, collection before run celery
closes #5351 # Impact * [ ] New migrations * [ ] New/Updated API fields or mutations * [ ] Deprecated API fields or mutations * [ ] Removed API types, fields, or mutations # Pull Request Checklist <!-- Please keep this section. It will make maintainer's life easier. --> * [x] Privileged queries and mu...
2020-04-06T12:50:51Z
Creating a new sale raises error in Celery task ### Steps to reproduce the problem 1. Run the following mutation as an admin user (with `MANAGE_DISCOUNTS` permission): ``` mutation { saleCreate(input: {name: "Test"}) { errors { field message } sale { id name } } ...
[ { "body": "### Steps to reproduce the problem\r\n1. Run the following mutation as an admin user (with `MANAGE_DISCOUNTS` permission):\r\n```\r\nmutation {\r\n saleCreate(input: {name: \"Test\"}) {\r\n errors {\r\n field\r\n message\r\n }\r\n sale {\r\n id\r\n name\r\n }\r\n }\r...
afcdfca0f125147b7f0d4c07993e99608a5ba875
{ "head_commit": "aef706710a2907df164d37979bd365ab731483ff", "head_commit_message": "Fix test", "patch_to_review": "diff --git a/saleor/graphql/discount/mutations.py b/saleor/graphql/discount/mutations.py\nindex 8fc8dd3a02d..9ea3be8de34 100644\n--- a/saleor/graphql/discount/mutations.py\n+++ b/saleor/graphql/disc...
[ { "diff_hunk": "@@ -270,7 +270,12 @@ class SaleUpdateMinimalVariantPriceMixin:\n def success_response(cls, instance):\n # Update the \"minimal_variant_prices\" of the associated, discounted\n # products (including collections and categories).\n- update_products_minimal_variant_prices_...
7a08f784615fd54450bff492c1428587bc83943e
diff --git a/saleor/product/utils/variant_prices.py b/saleor/product/utils/variant_prices.py index 14038b2379b..d2cc2c649bd 100644 --- a/saleor/product/utils/variant_prices.py +++ b/saleor/product/utils/variant_prices.py @@ -58,18 +58,12 @@ def update_products_minimal_variant_prices_of_catalogues( if collection_id...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "Bug Fixes" }
scipy__scipy-18528@a250003
scipy/scipy
Python
18,528
ENH: Update isspmatrix behavior
Closes #15790 Updates `isspmatrix` so that it is no longer an alias of `issparse`. After #18440, it became possible to define the functions so that `issparse` returns `True` for both sparse arrays and sparse matrices, while `isspmatrix` returns True *only* for sparse matrices and not sparse arrays. This makes the be...
2023-05-24T22:30:10Z
BUG: `isspmatrix` doesn't account for sparse arrays ### Describe your issue. There are two functions in `scipy.sparse` which determine whether or not an object is a sparse container: `sp.sparse.isspmatrix` and `sp.sparse.issparse`. Based on the names of these functions, one might expect the former to return `True` for...
Thanks @rossbar. I agree with the proposed semantics for `issparse` and `ismatrix`. This shows an unfortunate issue though: ```python def isspmatrix(x): return isinstance(x, spmatrix) and not isinstance(x, _sparray) ``` The sparse array classes are subclasses of the matrix classes. That means existing `isi...
[ { "body": "### Describe your issue.\n\nThere are two functions in `scipy.sparse` which determine whether or not an object is a sparse container: `sp.sparse.isspmatrix` and `sp.sparse.issparse`. Based on the names of these functions, one might expect the former to return `True` for the sparse matrix containers (...
3a1bd91df0e6db688a0a77955285e085dacf363c
{ "head_commit": "a250003dd49b5229bdffbd52a9032fbb9e09251e", "head_commit_message": "MAINT: Rm isspmatrix_fmt usage from csgraph pyx files.", "patch_to_review": "diff --git a/scipy/sparse/_base.py b/scipy/sparse/_base.py\nindex 1b3a07e510af..1f95ffa07905 100644\n--- a/scipy/sparse/_base.py\n+++ b/scipy/sparse/_ba...
[ { "diff_hunk": "@@ -1452,23 +1454,46 @@ def issparse(x):\n Returns\n -------\n bool\n- True if x is a sparse array, False otherwise\n-\n- Notes\n- -----\n- issparse and isspmatrix are aliases for the same function.\n+ True if `x` is a sparse array, False otherwise", "line"...
8659c48e376c7eda2b9940edffb0472536597d09
diff --git a/scipy/sparse/_base.py b/scipy/sparse/_base.py index 8302477f1c29..dc0646c58a73 100644 --- a/scipy/sparse/_base.py +++ b/scipy/sparse/_base.py @@ -7,6 +7,8 @@ get_sum_dtype, isdense, isscalarlike, matrix, validateaxis,) +from ._matrix import spmatrix + __al...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "Bug Fixes" }
saleor__saleor-5426@0399846
saleor/saleor
Python
5,426
Match orders with a new user
closes [#5398](https://github.com/mirumee/saleor/issues/5398) <!-- Please mention all relevant issue numbers. --> # Impact * [ ] New migrations * [ ] New/Updated API fields or mutations * [ ] Deprecated API fields or mutations * [ ] Removed API types, fields, or mutations # Pull Request Checklist <!--...
2020-04-03T10:25:49Z
Match orders with new customer accounts ### What I'm trying to achieve > Affect order to customer. Case: Customer create an account and validité this account only after passing and order. Order is not affect to this customer (**user_id** empty in **order_order** table) ### Describe a proposed solution Modify...
Hey, correct me if I'm wrong - you want to be able to match existing orders with a user account? Example case - as a customer I placed an order with email "customer@example.com" (but I don't have any account in Saleor). Later I created an account for email "customer@example.com" and I don't see the order that I pla...
[ { "body": "### What I'm trying to achieve\r\n> Affect order to customer.\r\n\r\nCase: \r\nCustomer create an account and validité this account only after passing and order.\r\nOrder is not affect to this customer (**user_id** empty in **order_order** table)\r\n\r\n### Describe a proposed solution\r\nModify muta...
a1a2831c72cc0442f8f44f844a9b0dcbfe3c198c
{ "head_commit": "03998463fa011c4960b1ed210826307117d24297", "head_commit_message": "Add unit tests", "patch_to_review": "diff --git a/saleor/graphql/account/mutations/account.py b/saleor/graphql/account/mutations/account.py\nindex 11513557c5d..da791f27cd9 100644\n--- a/saleor/graphql/account/mutations/account.py...
[ { "diff_hunk": "@@ -633,18 +636,21 @@ def test_customer_register(send_account_confirmation_email_mock, api_client):\n customer_creation_event = account_events.CustomerEvent.objects.get()\n assert customer_creation_event.type == account_events.CustomerEvents.ACCOUNT_CREATED\n assert customer_creation...
5cddd33ca8b220280cc4477e5e6777e0c9ba64a1
diff --git a/saleor/graphql/account/mutations/account.py b/saleor/graphql/account/mutations/account.py index 11513557c5d..da791f27cd9 100644 --- a/saleor/graphql/account/mutations/account.py +++ b/saleor/graphql/account/mutations/account.py @@ -8,6 +8,7 @@ from ....account.utils import create_jwt_token, decode_jwt_tok...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "New Feature Additions" }
saleor__saleor-5423@f4827f4
saleor/saleor
Python
5,423
Add attribute validation to attributeAssign
closes #5140 # Impact * [ ] New migrations * [ ] New/Updated API fields or mutations * [ ] Deprecated API fields or mutations * [ ] Removed API types, fields, or mutations # Pull Request Checklist <!-- Please keep this section. It will make maintainer's life easier. --> * [x] Privileged queries and mut...
2020-04-01T16:16:00Z
Assigning a non-existing attribute to a product type crashes ### Steps to reproduce the problem **Query:** ```gql mutation AssignAttributesToPT( $productTypeID: ID! $operations: [AttributeAssignInput]! ) { attributeAssign(productTypeId: $productTypeID, operations: $operations) { errors { fiel...
[ { "body": "\r\n### Steps to reproduce the problem\r\n**Query:**\r\n```gql\r\nmutation AssignAttributesToPT(\r\n $productTypeID: ID!\r\n $operations: [AttributeAssignInput]!\r\n) {\r\n attributeAssign(productTypeId: $productTypeID, operations: $operations) {\r\n errors {\r\n field\r\n message\r\n...
a1a2831c72cc0442f8f44f844a9b0dcbfe3c198c
{ "head_commit": "f4827f43c6e127c6a284d8f5bc34d7de13ee7f85", "head_commit_message": "Return attributes global id instead of db pk", "patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex 081fb9564a5..e4b6fe6c17d 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -88,6 +88,7 @@ All notable, unreleased...
[ { "diff_hunk": "@@ -382,9 +382,41 @@ def check_product_operations_are_assignable(cls, product_attrs_pks):\n }\n )\n \n+ @classmethod\n+ def handle_typed_errors(cls, errors: list, **extra):\n+ typed_errors = [\n+ cls._meta.error_type_class( # type: ignore\n+ ...
b8b22f67ad8c0f3d939ab1438dd0a1b244a80a32
diff --git a/CHANGELOG.md b/CHANGELOG.md index 081fb9564a5..e4b6fe6c17d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -88,6 +88,7 @@ All notable, unreleased changes to this project will be documented in this file. - Add shipping rate price validation - #5411 by @kswiatek92 - Remove unused settings and environment v...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "Bug Fixes" }
scipy__scipy-18502@2c25c29
scipy/scipy
Python
18,502
BUG: guard against non-finite kd-tree queries
<!-- Thanks for contributing a pull request! Please ensure that your PR satisfies the checklist before submitting: http://scipy.github.io/devdocs/dev/contributor/development_workflow.html#checklist-before-submitting-a-pr Also, please name and describe your PR as you would write a commit message: http://scipy.g...
2023-05-22T12:56:06Z
MAINT, BUG: guard against non-finite kd-tree queries As a follow-up to gh-18230, we should follow the suggestion from @sturlamolden to guard against non-finite values in the various query methods available in our kd-tree analyses. It may be nice if we get this done before branching `maintenance/1.11.x` since we're bann...
[ { "body": "As a follow-up to gh-18230, we should follow the suggestion from @sturlamolden to guard against non-finite values in the various query methods available in our kd-tree analyses. It may be nice if we get this done before branching `maintenance/1.11.x` since we're banning non-finite points in the trees...
19d7a9461e24ce110077f9b075ec745fd48bb037
{ "head_commit": "2c25c29ff91ecc3eb208af016d4566393d9bc1aa", "head_commit_message": "BUG: guard against non-finite kd-tree queries", "patch_to_review": "diff --git a/scipy/spatial/_ckdtree.pyx b/scipy/spatial/_ckdtree.pyx\nindex 6709de54733a..8d9b3fcf2a2d 100644\n--- a/scipy/spatial/_ckdtree.pyx\n+++ b/scipy/spat...
[ { "diff_hunk": "@@ -1468,10 +1468,17 @@ def test_kdtree_nan():\n KDTree(data)\n \n \n-def test_gh_18223():\n+def test_nonfintite_inputs_gh_18223():", "line": null, "original_line": 1471, "original_start_line": null, "path": "scipy/spatial/tests/test_kdtree.py", "start_line": null, ...
a29b131662b07cf7efeae131286fc066c8067716
diff --git a/scipy/spatial/_ckdtree.pyx b/scipy/spatial/_ckdtree.pyx index 6709de54733a..8d9b3fcf2a2d 100644 --- a/scipy/spatial/_ckdtree.pyx +++ b/scipy/spatial/_ckdtree.pyx @@ -791,6 +791,9 @@ cdef class cKDTree: if p < 1: raise ValueError("Only p-norms with 1<=p<=infinity permitted") + ...
{ "difficulty": "low", "estimated_review_effort": 2, "problem_domain": "Bug Fixes" }
scipy__scipy-18339@8995748
scipy/scipy
Python
18,339
TST: optimize: fix test_milp_timeout
#### Reference issue Closes gh-17137 #### What does this implement/fix? gh-17137 `test_milp_timeout` fails on some platforms. Here, we'll try to fix it. #### Additional information I removed the `slow` and `timeout` marks to explore what happens on all CI platforms. Before merging, we need to check the `durati...
2023-04-21T14:10:39Z
BUG: optimize: Intermittent failure of `test_milp_timeout_16545` ### Describe your issue. When I run the `optimize` tests with the main development branch (version `1.10.0.dev0+1987.fa3276a`), the test `test_milp_timeout_16545` often (but not always!) fails. ### Reproducing Code Example ```python $ python dev.py tes...
This fails consistently for me. The test tries to assert a time limit of 10 seconds. That's not going to be reliable it looks like - unless the `10` means 10 milli-seconds and the solution time is a few orders of magnitude higher. That was probably the intent - changing the limit to `0.01` fixes it for me. For me t...
[ { "body": "### Describe your issue.\n\nWhen I run the `optimize` tests with the main development branch (version `1.10.0.dev0+1987.fa3276a`), the test `test_milp_timeout_16545` often (but not always!) fails.\n\n### Reproducing Code Example\n\n```python\n$ python dev.py test -m full -j 9 -s optimize\r\n💻 ninja...
aadf63928f17aa4d56c0867f7b67e817a01e2cbd
{ "head_commit": "8995748b7513d060d03b5a18630fb2813ec9f906", "head_commit_message": "MAINT: optimize: fix test_milp_timeout", "patch_to_review": "diff --git a/scipy/optimize/tests/test_milp.py b/scipy/optimize/tests/test_milp.py\nindex 59f42bff1bdb..f3fe93ba4239 100644\n--- a/scipy/optimize/tests/test_milp.py\n++...
[ { "diff_hunk": "@@ -295,9 +295,7 @@ def test_infeasible_prob_16609():\n \n @pytest.mark.skipif(np.intp(0).itemsize < 8,\n reason=\"Unhandled 32-bit GCC FP bug\")\n-@pytest.mark.slow\n-@pytest.mark.timeout(360)\n-@pytest.mark.parametrize([\"options\", \"msg\"], [({\"time_limit\": 10}, _msg_ti...
9be1894c8cfb5b57a9c2ffa101148cc8a9fcae31
diff --git a/scipy/optimize/tests/test_milp.py b/scipy/optimize/tests/test_milp.py index 59f42bff1bdb..0970a15a8bcc 100644 --- a/scipy/optimize/tests/test_milp.py +++ b/scipy/optimize/tests/test_milp.py @@ -296,8 +296,7 @@ def test_infeasible_prob_16609(): @pytest.mark.skipif(np.intp(0).itemsize < 8, ...
{ "difficulty": "low", "estimated_review_effort": 2, "problem_domain": "Bug Fixes" }
scipy__scipy-18328@d6734b2
scipy/scipy
Python
18,328
MAINT: stats.shapiro: override p-value when len(x)==3
#### Reference issue Closes gh-18322 #### What does this implement/fix? gh-18322 reported that `shapiro` can produce negative p-values when `len(x)==3`. This PR overrides the p-value reported by `swilk` in this case. *Lint failure unrelated. That will be fixed when gh-18321 is reverted (i.e. gh-16996 comes back...
2023-04-20T16:08:06Z
BUG: scipy.stats.shapiro gives a negative pvalue ### Describe your issue. p-values are supposed to be in [0,1], but I get a negative p-value using the scipy shapiro. See the example code below. ### Reproducing Code Example ```python from scipy.stats import shapiro x = [0.6931471805599453, 0.0, 0.0] res = shapiro(...
The null distribution of the Shapiro-Wilk test is usually estimated using a Monte Carlo approach, but for $n=3$ there is an [exact solution](https://math.mit.edu/~rmd/465/shapiro.pdf). ![image](https://user-images.githubusercontent.com/6570539/233172167-449fb54b-e458-4743-a948-941c2e58efa3.png) I think we want to ...
[ { "body": "### Describe your issue.\n\np-values are supposed to be in [0,1], but I get a negative p-value using the scipy shapiro.\r\nSee the example code below.\n\n### Reproducing Code Example\n\n```python\nfrom scipy.stats import shapiro\r\nx = [0.6931471805599453, 0.0, 0.0]\r\nres = shapiro(x)\r\nres.pvalue ...
745bf604640969a25c18f6d6ace166701fac0429
{ "head_commit": "d6734b2480a5108ecc64b94cda01db090ee21502", "head_commit_message": "MAINT: stats.shapiro: override p-value when len(x)==3", "patch_to_review": "diff --git a/scipy/stats/_morestats.py b/scipy/stats/_morestats.py\nindex 65afcdc20308..34b16b4bbf4c 100644\n--- a/scipy/stats/_morestats.py\n+++ b/scipy...
[ { "diff_hunk": "@@ -225,6 +225,22 @@ def test_gh14462(self):\n \n assert_allclose(res, ref, rtol=1e-5)\n \n+ def test_length_3_gh18322(self):\n+ # gh-18322 reported that the p-value could be negative for input of\n+ # length 3. Check that this is resolved.\n+ res = stats.shapiro(...
315fe3ba7d88916f6669248a602fa86344f0d3ef
diff --git a/scipy/stats/_morestats.py b/scipy/stats/_morestats.py index 65afcdc20308..34b16b4bbf4c 100644 --- a/scipy/stats/_morestats.py +++ b/scipy/stats/_morestats.py @@ -1881,6 +1881,10 @@ def shapiro(x): if N > 5000: warnings.warn("p-value may not be accurate for N > 5000.") + # `swilk` can ret...
{ "difficulty": "medium", "estimated_review_effort": 2, "problem_domain": "Bug Fixes" }
scipy__scipy-18288@5dabe8e
scipy/scipy
Python
18,288
TST: stats.ortho_group: improve determinant distribution test
#### Reference issue Closes gh-18272 #### What does this implement/fix? gh-18272 reported an occasional failure of `test_multivariate.TestOrthoGroup.test_det_and_ortho`. This improves the test and makes it deterministic.
2023-04-13T01:34:04Z
BUG: stats: occasional failure of `test_multivariate.TestOrthoGroup.test_det_and_ortho` I see an occasional failure of the test `scipy.stats.tests.test_multivariate.TestOrthoGroup.test_det_and_ortho`. Here's a typical example of the failure: ``` =========================================================== FAILURES...
Thanks Warren. Sounds like it would have been better to manually set some matrices instead of using random values without meaning. In this case, we're testing a statistical property of the `rvs()` method, so generating a random sample is appropriate. But we need a smarter test. For example: generate more samples (may...
[ { "body": "I see an occasional failure of the test `scipy.stats.tests.test_multivariate.TestOrthoGroup.test_det_and_ortho`.\r\n\r\nHere's a typical example of the failure:\r\n```\r\n=========================================================== FAILURES ===========================================================\...
8ff629332c786e9f0ee6aaf88042716557bf3aa1
{ "head_commit": "5dabe8e5859fcad4bb326a2e924bd7d252b7239d", "head_commit_message": "STY: stats.tests.test_multivariate: remove blank line whitespace\n\n[ci skip]", "patch_to_review": "diff --git a/scipy/stats/tests/test_multivariate.py b/scipy/stats/tests/test_multivariate.py\nindex 1964728cd6cf..6ffbb5780ff4 10...
[ { "diff_hunk": "@@ -1860,18 +1860,25 @@ def test_det_and_ortho(self):\n dets = np.array([[np.linalg.det(x) for x in xx] for xx in xs])\n assert_allclose(np.fabs(dets), np.ones(dets.shape), rtol=1e-13)\n \n- # Test that we get both positive and negative determinants\n- # Check that ...
cceb08d288ff44fa2715a465eb83566f190836a2
diff --git a/scipy/stats/tests/test_multivariate.py b/scipy/stats/tests/test_multivariate.py index 1964728cd6cf..065b0ae3a84d 100644 --- a/scipy/stats/tests/test_multivariate.py +++ b/scipy/stats/tests/test_multivariate.py @@ -532,7 +532,7 @@ def test_frozen(self): assert_allclose(norm_frozen.cdf(x), multivari...
{ "difficulty": "low", "estimated_review_effort": 3, "problem_domain": "Bug Fixes" }
scipy__scipy-18228@03119f8
scipy/scipy
Python
18,228
ENH: stats.geometric.entropy: implement analytical formula
<!-- Thanks for contributing a pull request! Please ensure that your PR satisfies the checklist before submitting: http://scipy.github.io/devdocs/dev/contributor/development_workflow.html#checklist-before-submitting-a-pr Also, please name and describe your PR as you would write a commit message: http://scipy.g...
2023-04-01T09:02:47Z
ENH: stats.geometric.entropy: implement analytical formula The geometric distribution entropy is calculated numerically, and is sometimes incorrect. ``` ss.geom(0.0146).entropy() # Should be: 5.219397961962304 /home/neil/.cache/pypoetry/virtualenvs/efax-ZssyUsLU-py3.11/lib/python3.11/site-packages/scipy/stats/_dis...
This is a good suggestion and the analytical formula looks like a straight forward improvement. Would you be interested in creating a PR? We had many PRs related to entropy calculations lately, see e.g. https://github.com/scipy/scipy/pull/17857 or https://github.com/scipy/scipy/pull/17742, they could help you especi...
[ { "body": "The geometric distribution entropy is calculated numerically, and is sometimes incorrect.\r\n```\r\nss.geom(0.0146).entropy() # Should be: 5.219397961962304\r\n/home/neil/.cache/pypoetry/virtualenvs/efax-ZssyUsLU-py3.11/lib/python3.11/site-packages/scipy/stats/_distn_infrastructure.py:3814: RuntimeW...
bd6423f6332ddbfb6d27ab20898018c5aafff7e5
{ "head_commit": "03119f876b7871617da17d996ed4611c706696b1", "head_commit_message": "ENH: stats.geometric.entropy: implement analytical formula", "patch_to_review": "diff --git a/scipy/stats/_discrete_distns.py b/scipy/stats/_discrete_distns.py\nindex 9cfa6d76a04a..26e90e0b6ac3 100644\n--- a/scipy/stats/_discrete...
[ { "diff_hunk": "@@ -999,6 +999,12 @@ def test_ppf_underflow(self):\n # this should not underflow\n assert_allclose(stats.geom.ppf(1e-20, 1e-20), 1.0, atol=1e-14)\n \n+ def test_entropy(self):\n+ # Simple tests of entropy.\n+ h = stats.geom(np.array([0.0146, 0.2, 0.5, 0.8])).entr...
e49521ccba9568bee60ec2f055f813dd7ef75fc3
diff --git a/scipy/stats/_discrete_distns.py b/scipy/stats/_discrete_distns.py index 9cfa6d76a04a..26e90e0b6ac3 100644 --- a/scipy/stats/_discrete_distns.py +++ b/scipy/stats/_discrete_distns.py @@ -441,6 +441,9 @@ def _stats(self, p): g2 = np.polyval([1, -6, 6], p)/(1.0-p) return mu, var, g1, g2 + ...
{ "difficulty": "low", "estimated_review_effort": 2, "problem_domain": "New Feature Additions" }
saleor__saleor-5254@efbebcc
saleor/saleor
Python
5,254
Enabled opentracing segmentation of spans
This adds segmentation to the OpenTracing spans, so each child span has its parent correctly associated to it. On top, I added a change that was in my logs: `PLAYGROUND_ENABLED` setting key, which was discussed some time ago that it would be nice to be able to use the playground in production mode. Closes #5249. ...
2020-02-14T09:05:39Z
OpenTracing segments are orphans instead of children of the root span Saleor is using `start_span` instead of `start_active_span` which is resulting to having a trace for each span instead of a segment, making the tracing close to useless. On top, we should add a test(s) using MockTracer to ensure it does not break ...
[ { "body": "Saleor is using `start_span` instead of `start_active_span` which is resulting to having a trace for each span instead of a segment, making the tracing close to useless.\r\n\r\nOn top, we should add a test(s) using MockTracer to ensure it does not break in the future.", "number": 5249, "title...
73f40eb405709b2748bbe7714a5b173226d70533
{ "head_commit": "efbebcc10aa24535496fd8a1630e273ffde82825", "head_commit_message": "Updated tests and changelog for disabling/enabling playground", "patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex 3c96b423944..33c0af0efbe 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -64,7 +64,8 @@ All no...
[ { "diff_hunk": "@@ -1,6 +1,7 @@\n from typing import Optional\n \n-import opentracing\n+import opentracing as ot\n+import opentracing.tags", "line": null, "original_line": 4, "original_start_line": null, "path": "saleor/graphql/middleware.py", "start_line": null, "text": "@user1:\nunused...
392dd76f429918a4b6a0ec97d3ef3ace84b460b0
diff --git a/CHANGELOG.md b/CHANGELOG.md index 3c96b423944..33c0af0efbe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -64,7 +64,8 @@ All notable, unreleased changes to this project will be documented in this file. - Add slug to Warehouse, Product, ProductType and update slug in models which already using it - #5196 ...
{ "difficulty": "medium", "estimated_review_effort": 4, "problem_domain": "Bug Fixes" }
scipy__scipy-18337@6882fc2
scipy/scipy
Python
18,337
MAINT: update boost_math
Closes #18302
2023-04-21T11:23:55Z
BUG: beta.pdf is broken on main (1.11.0.dev0) ### Describe your issue. beta.pdf has changes from 1.10 to the 1.11.0.dev0 build and now returns incorrect results. ### Reproducing Code Example ```python import numpy as np from scipy import stats xx = np.array([0. , 0.11111111, 0.22222222, 0.333...
Creating a failure on statsmodels pre-release testing. Thanks @bashtage I confirm the issue. A smaller reproducer is ```python stats.beta.pdf(1e-30, a=1, b=5) # 5.000000000000035 stats.beta.pdf(0, a=1, b=5) # 0.0 ``` I can get to the actually error playing with the float ```python stats.beta.pdf(1e-310, a...
[ { "body": "### Describe your issue.\r\n\r\nbeta.pdf has changes from 1.10 to the 1.11.0.dev0 build and now returns incorrect results.\r\n\r\n\r\n\r\n\r\n### Reproducing Code Example\r\n\r\n```python\r\nimport numpy as np\r\nfrom scipy import stats\r\n\r\nxx = np.array([0. , 0.11111111, 0.22222222, 0.3333...
5f1e3b77e714785a7307f142c9a1215d8ca051c0
{ "head_commit": "6882fc221742c13702dd72dcec8a7454c492e86d", "head_commit_message": "ENH/TST: filter overflow warning and better tests", "patch_to_review": "diff --git a/scipy/_lib/boost_math b/scipy/_lib/boost_math\nindex 109a814e89f7..298a243ccd36 160000\n--- a/scipy/_lib/boost_math\n+++ b/scipy/_lib/boost_math...
[ { "diff_hunk": "@@ -678,6 +678,8 @@ def _pdf(self, x, a, b):\n # gamma(a+b) * x**(a-1) * (1-x)**(b-1)\n # beta.pdf(x, a, b) = ------------------------------------\n # gamma(a)*gamma(b)\n+ message = \"overflow encountered in _beta_pd...
53d8025e660129c8e644e3aa28a5233cb7371c6a
diff --git a/scipy/_lib/boost_math b/scipy/_lib/boost_math index 109a814e89f7..298a243ccd36 160000 --- a/scipy/_lib/boost_math +++ b/scipy/_lib/boost_math @@ -1 +1 @@ -Subproject commit 109a814e89f77ff8a3fc8f0391f6b35a12640669 +Subproject commit 298a243ccd3639b6eaa59bcdab7ab9d5f008fb36 diff --git a/scipy/stats/_continu...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "Bug Fixes" }
scipy__scipy-18219@82b77c9
scipy/scipy
Python
18,219
DEP: integrate: Deprecate `initial` values other than None or 0 in cumulative_trapezoid
<!-- Thanks for contributing a pull request! Please ensure that your PR satisfies the checklist before submitting: http://scipy.github.io/devdocs/dev/contributor/development_workflow.html#checklist-before-submitting-a-pr Also, please name and describe your PR as you would write a commit message: http://scipy.g...
2023-03-31T03:02:22Z
DOC: scipy.integrate.cumulative_trapezoid initial clarification ### Issue with current documentation: Currently it is stated that the `initial` argument of `scipy.integrate.cumulative_trapezoid` is inserted as the resulting array of the cumulative integration. However, I would have expected a cumulative function ...
Thanks @zerothi this will hopefully be fixed in #18219 Great! Thanks for this!
[ { "body": "### Issue with current documentation:\r\n\r\nCurrently it is stated that the `initial` argument of `scipy.integrate.cumulative_trapezoid` is inserted as the resulting array of the cumulative integration.\r\n\r\nHowever, I would have expected a cumulative function to add the `initial` to *all* values ...
b8b4d9e19193cbd84991060bef8f87570d3a684a
{ "head_commit": "82b77c92f34995fd05fa0a5941692c47a9e65dec", "head_commit_message": "STY: Remove trailing whitespace", "patch_to_review": "diff --git a/scipy/integrate/_quadrature.py b/scipy/integrate/_quadrature.py\nindex 1048e352675e..b54a69927fb9 100644\n--- a/scipy/integrate/_quadrature.py\n+++ b/scipy/integr...
[ { "diff_hunk": "@@ -322,18 +322,28 @@ def test_x_none(self):\n y_expected = [-1.5, -2., -1.5, 0.]\n assert_allclose(y_int, y_expected)\n \n- y_int = cumulative_trapezoid(y, initial=1.23)\n- y_expected = [1.23, -1.5, -2., -1.5, 0.]\n+ y_int = cumulative_trapezoid(y, initial=0...
8d642f2e289061134fe703d81bcbf5b3b8278886
diff --git a/scipy/integrate/_quadrature.py b/scipy/integrate/_quadrature.py index 1048e352675e..f06aa05927d5 100644 --- a/scipy/integrate/_quadrature.py +++ b/scipy/integrate/_quadrature.py @@ -407,9 +407,13 @@ def cumulative_trapezoid(y, x=None, dx=1.0, axis=-1, initial=None): Specifies the axis to cumulate....
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "Documentation Updates" }
redis__redis-py-1635@237111f
redis/redis-py
Python
1,635
Enable floating parameters in SET (ex and px)
### Pull Request check-list _Please make sure to review and check all of these items:_ - [x] Does `$ tox` pass with this change (including linting)? - [x] Do the CI tests pass with this change (enable it first in your forked repo and wait for the github action build to finish)? - [x] Is the new or changed code ...
2021-10-21T09:40:32Z
error in set when ex is a float is confusing **Version**: redis-py 3.5.3 **Platform**: Python 3.7.3 (default, Jan 22 2021, 20:04:44) [GCC 8.3.0] on linux **Description**: ```py >>> import redis >>> r = redis.Redis(host='localhost', port=6379, db=0) >>> r.set('foo', 'bar', ex=10.0) Traceback (most recent call...
[ { "body": "**Version**: redis-py 3.5.3\r\n\r\n**Platform**: Python 3.7.3 (default, Jan 22 2021, 20:04:44) [GCC 8.3.0] on linux\r\n\r\n**Description**:\r\n```py\r\n>>> import redis\r\n>>> r = redis.Redis(host='localhost', port=6379, db=0)\r\n>>> r.set('foo', 'bar', ex=10.0)\r\nTraceback (most recent call last):\...
63ebe693174a4e6ec314e48d12fcdf3f8401eec6
{ "head_commit": "237111fa5700dc9351878d1e4fec84f433ec5b48", "head_commit_message": "Enable floating params in SET (ex and px)", "patch_to_review": "diff --git a/redis/commands.py b/redis/commands.py\nindex 44a77354aa..fdc4441926 100644\n--- a/redis/commands.py\n+++ b/redis/commands.py\n@@ -1173,13 +1173,21 @@ de...
[ { "diff_hunk": "@@ -1173,13 +1173,21 @@ def set(self, name, value,\n if ex is not None:\n pieces.append('EX')\n if isinstance(ex, datetime.timedelta):\n- ex = int(ex.total_seconds())\n- pieces.append(ex)\n+ ex = ex.total_seconds()\n+ ...
ee540817c011ddb26402415d4a250d50580a7161
diff --git a/redis/commands.py b/redis/commands.py index 44a77354aa..f2c15384af 100644 --- a/redis/commands.py +++ b/redis/commands.py @@ -1174,12 +1174,18 @@ def set(self, name, value, pieces.append('EX') if isinstance(ex, datetime.timedelta): ex = int(ex.total_seconds()) - ...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "Bug Fixes" }
saleor__saleor-5088@2312804
saleor/saleor
Python
5,088
Fix checkout with shipping and digital product
I want to merge this change because resolve #5006 <!-- Please mention all relevant issue numbers. --> ### Screenshots <!-- If your changes affect the UI, providing "before" and "after" screenshots will greatly reduce the amount of work needed to review your work. --> ### Pull Request Checklist <!-- Ple...
2019-12-19T11:38:02Z
unable to checkout on graphql mutation [digital product] ### What I'm trying to achieve checkout error on when only digital product is left in the cart system, if there is shipping method assigned before ### Steps to reproduce the problem 1. add shippable product 2. add non-shippable (digital) product 4. add shi...
Thanks for reporting @trence ! We are aware of this issue. If we find a solution, I will let you know. And if you have any feedback or questions, we're happy to help you.
[ { "body": "### What I'm trying to achieve\r\ncheckout error on when only digital product is left in the cart system, if there is shipping method assigned before\r\n\r\n### Steps to reproduce the problem\r\n1. add shippable product\r\n2. add non-shippable (digital) product\r\n4. add shipping method\r\n3. remove ...
da715b1be241a8f456221a7771ec56491e3d3f9f
{ "head_commit": "2312804e35213377dd3235e7e5e5bcd8d1ee5b19", "head_commit_message": "Add test for check remove shipping for specific checkout", "patch_to_review": "diff --git a/saleor/graphql/checkout/mutations.py b/saleor/graphql/checkout/mutations.py\nindex d8328dffa75..f0e65e9b265 100644\n--- a/saleor/graphql/...
[ { "diff_hunk": "@@ -85,9 +85,14 @@ def update_checkout_shipping_method_if_invalid(checkout: models.Checkout, discou\n checkout.shipping_method = None\n checkout.save(update_fields=[\"shipping_method\"])\n \n- is_valid = clean_shipping_method(\n- checkout=checkout, method=checkout.shipp...
a663af69b0d842f884e422e029afd2c168415c67
diff --git a/saleor/graphql/checkout/mutations.py b/saleor/graphql/checkout/mutations.py index d8328dffa75..3686fbcf53a 100644 --- a/saleor/graphql/checkout/mutations.py +++ b/saleor/graphql/checkout/mutations.py @@ -81,7 +81,7 @@ def clean_shipping_method( def update_checkout_shipping_method_if_invalid(checkout: mo...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "Bug Fixes" }
scipy__scipy-18160@8b013c9
scipy/scipy
Python
18,160
BUG: Wrong status returned by _check_result. See #18106. optimize
#### Reference issue Closes #18106 #### What does this implement/fix? The _check_result function that would parse the results from highs didn't take into account integrality of the variables. The status would say that it encountered a problem when in fact it was correct and it had converged. #### Additional in...
2023-03-16T16:30:18Z
BUG: Linprog reports failure despite success convergence, given a problem involving semi-continuous variables ### Describe your issue. Given the following problem involving a semi-continuous variable, `linprog(method='highs')` reports a failure despite successful convergence to a solution. The problem is the foll...
I looked into the implementation of `linprog`. The bounds checking in `_check_results` doesn't make sense for semi-continuous variables: https://github.com/scipy/scipy/blob/4a6f2d1e9a66a9447dd6a69a44be7170f2567b31/scipy/optimize/_linprog_util.py#L1491 Semi-continuous variables can always take value 0 (same for se...
[ { "body": "### Describe your issue.\r\n\r\nGiven the following problem involving a semi-continuous variable, `linprog(method='highs')` reports a failure despite successful convergence to a solution.\r\n\r\nThe problem is the following:\r\n\r\n```\r\nmaximize x\r\ns.t\r\n x <= 0.5\r\n x is semi-continuous,...
ad1918abafb39cfa6feca639f7e0a31c025947e9
{ "head_commit": "8b013c975c092eb3b2a705eb7b9639a4dc792f65", "head_commit_message": "BUG: Wrong status returned by _check_result. See #18106. optimize", "patch_to_review": "diff --git a/scipy/optimize/_linprog.py b/scipy/optimize/_linprog.py\nindex a11041f099e9..18b68bda1897 100644\n--- a/scipy/optimize/_linprog....
[ { "diff_hunk": "@@ -1489,6 +1489,21 @@ def _check_result(x, fun, status, slack, con, bounds, tol, message):\n is_feasible = False\n else:\n invalid_bounds = (x < bounds[:, 0] - tol).any() or (x > bounds[:, 1] + tol).any()\n+", "line": null, "original_line": 1492, "original_start_...
9657aae7dafd6de782677bc50a7432fdf170bba5
diff --git a/scipy/optimize/_linprog.py b/scipy/optimize/_linprog.py index a11041f099e9..5120b29dda40 100644 --- a/scipy/optimize/_linprog.py +++ b/scipy/optimize/_linprog.py @@ -640,7 +640,8 @@ def linprog(c, A_ub=None, b_ub=None, A_eq=None, b_eq=None, **solver_options) sol['stat...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "Bug Fixes" }
redis__redis-py-1660@40a5893
redis/redis-py
Python
1,660
Adding RedisCluster client to support Redis Cluster Mode
### Pull Request check-list _Please make sure to review and check all of these items:_ - [ V] Does `$ tox` pass with this change (including linting)? - [V ] Do the CI tests pass with this change (enable it first in your forked repo and wait for the github action build to finish)? - [ V] Is the new or changed co...
2021-10-28T08:04:57Z
Redis Cluster Support? I've been looking into getting Celery to work with redis clusters. Kombu has a PR that's a few months old to implement it's own transport/backend for redis-cluster, but it doesn't seem like it's going to get merged. I was wondering if this library would ever support redis clusters such that...
@Jaredn I would suggest https://github.com/Grokzen/redis-py-cluster It is not fully transparent in all situations but for most operations it is Q1: Does `redis-py-cluster` have the same API as `redis-py`? (I mean, same classes/methods/functions signature for connection, parser, etc). Q2: Can I use it with [django...
[ { "body": "I've been looking into getting Celery to work with redis clusters.\r\n\r\nKombu has a PR that's a few months old to implement it's own transport/backend for redis-cluster, but it doesn't seem like it's going to get merged.\r\n\r\nI was wondering if this library would ever support redis clusters such ...
64791a54f4b2c28b6a61920a23df9e1f614e6983
{ "head_commit": "40a5893f4f4903f4c04bf438beb5be7a9cdb319e", "head_commit_message": "Moved timesteries tests to a class", "patch_to_review": "diff --git a/README.md b/README.md\nindex 4bcea7be33..5cd9b53570 100644\n--- a/README.md\n+++ b/README.md\n@@ -942,8 +942,228 @@ C 3\n \n ### Cluster Mode\n \n-redis-py doe...
[ { "diff_hunk": "@@ -40,7 +40,10 @@ def tests(c):\n \"\"\"Run the redis-py test suite against the current python,\n with and without hiredis.\n \"\"\"\n+ print(\"Starting Redis tests\")\n run(\"tox -e plain -e hiredis\")\n+ print(\"Starting RedisCluster tests\")\n+ run(\"tox -e plain -e ...
bf3d21d1626297d55e43d79d75d1668d3d4dc111
diff --git a/.github/workflows/install_and_test.sh b/.github/workflows/install_and_test.sh index 330102eb41..7a8cd672fd 100755 --- a/.github/workflows/install_and_test.sh +++ b/.github/workflows/install_and_test.sh @@ -38,4 +38,8 @@ cd ${TESTDIR} # install, run tests pip install ${PKG} -pytest +# Redis tests +pytes...
{ "difficulty": "medium", "estimated_review_effort": 4, "problem_domain": "New Feature Additions" }
saleor__saleor-5126@7e84468
saleor/saleor
Python
5,126
Account confirmation by email when creating new account
I want to merge this change because it resolves #1527 Cannot be merged until appropriate frontend view is ready (confirmation part that triggers the mutation) Should also be merged with storefront mutation switch (which can be merged even sooner) https://github.com/mirumee/saleor-storefront/pull/549 <!-- Please ...
2020-01-02T12:49:05Z
Newly registered user e-mail confirmation I see that according to previous issues and pull requests, that e-mail address confirmation for new users was a feature in the past but currently is not. I would like to add it to my site, I can work on it as a pull request for Saleor (mostly taken from the django-allauth imple...
Hi @primal100, there's currently no such feature but I think it would be very useful to have it by default in Saleor with the ability to switch it through settings. If you are willing to add it, a PR would be welcomed :) I would start with customizing the `SignupForm` to send the email upon successful registratio...
[ { "body": "I see that according to previous issues and pull requests, that e-mail address confirmation for new users was a feature in the past but currently is not. I would like to add it to my site, I can work on it as a pull request for Saleor (mostly taken from the django-allauth implementation, it would be ...
3d8dba3a550598c7f0cf3d24ebcd2aa55cfea09e
{ "head_commit": "7e844686e016af624e842f47c3c752b4bf87283f", "head_commit_message": "Update schema", "patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex b3fc68f8323..dfc712089bd 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -4,6 +4,7 @@ All notable, unreleased changes to this project will be ...
[ { "diff_hunk": "@@ -153,6 +153,44 @@ def perform_mutation(cls, _root, info, **data):\n return RequestPasswordReset()\n \n \n+class ConfirmAccount(BaseMutation):\n+ class Arguments:\n+ token = graphene.String(\n+ description=\"A one-time token required to set the password.\", require...
030defa61c8997dde4ac5077a45f82c1e8fba033
diff --git a/CHANGELOG.md b/CHANGELOG.md index 4e3349a6c37..ef22ad2711f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ All notable, unreleased changes to this project will be documented in this file. ## [Unreleased] +- Account confirmation email - #5126 by @tomaszszymanski129 - Relocate Checkout and...
{ "difficulty": "medium", "estimated_review_effort": 4, "problem_domain": "New Feature Additions" }
scipy__scipy-18137@f5718f5
scipy/scipy
Python
18,137
Bugfix for somersd where an integer overflow could occur
<!-- Thanks for contributing a pull request! Please ensure that your PR satisfies the checklist before submitting: http://scipy.github.io/devdocs/dev/contributor/development_workflow.html#checklist-before-submitting-a-pr Also, please name and describe your PR as you would write a commit message: http://scipy.g...
2023-03-12T01:11:02Z
BUG: invalid output and behavior of scipy.stats.somersd ### Describe your issue. The Somers' D statistic is a measure of ordinal association between two possibly dependent random variables X and Y and is implemented in scipy.stats as the function somersd(x,...). This implementation has some unexpected and incorrec...
I'll take a look. Could be an integer overflow. Do you ever get incorrect output without the RuntimeWarning or a RuntimeWarning with perfectly correct output? Otherwise, I would not consider the RuntimeWarning behavior itself to be a bug. It is signaling that there is a problem and the output cannot be trusted, whic...
[ { "body": "### Describe your issue.\n\nThe Somers' D statistic is a measure of ordinal association between two possibly dependent random variables X and Y and is implemented in scipy.stats as the function somersd(x,...). \r\n\r\nThis implementation has some unexpected and incorrect behavior, at least for large ...
edf236d5a0fe6bc0e1e59a544decd240bede2540
{ "head_commit": "f5718f54254fe2cf068933dc937e531db9169dbe", "head_commit_message": "Bugfix for somersd where an integer overflow could occur for cases that should be computable (Issue #18132). Modified the somersd function and added unit tests.", "patch_to_review": "diff --git a/scipy/stats/_hypotests.py b/scipy...
[ { "diff_hunk": "@@ -871,7 +871,8 @@ def somersd(x, y=None, alternative='two-sided'):\n table = x\n else:\n raise ValueError(\"x must be either a 1D or 2D array\")\n- d, p = _somers_d(table, alternative)\n+ # The table type is converted to a float to avoid an integer overflows", "li...
e894faa582ba3c7fb17045824dce0c8228ecc1ad
diff --git a/scipy/stats/_hypotests.py b/scipy/stats/_hypotests.py index da98054a4fff..732304722c82 100644 --- a/scipy/stats/_hypotests.py +++ b/scipy/stats/_hypotests.py @@ -871,7 +871,8 @@ def somersd(x, y=None, alternative='two-sided'): table = x else: raise ValueError("x must be either a 1D o...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "Bug Fixes" }
scipy__scipy-18152@d349c38
scipy/scipy
Python
18,152
ENH: stats.moment: enable non-central moment calculation
#### Reference issue Closes gh-17749 ## What does this implement/fix? Described in gh-17749. #### Additional information No unit tests and documentation added, just opened for reviewers to comment on the API - hence it's a draft.
2023-03-15T08:58:38Z
ENH: Compute non centraled moments with `stats.moment`? ### Is your feature request related to a problem? Please describe. To compute a non-central moment of order `n>2`, one can't use the current implementation, but has to reside to implement their own. ### Describe the solution you'd like. I'd like the `stat...
Haven't tested this yet, but it seems a fix wouldn't be that hard: ```patch diff --git i/scipy/stats/_mstats_basic.py w/scipy/stats/_mstats_basic.py index 145323c08..d25a6da5d 100644 --- i/scipy/stats/_mstats_basic.py +++ w/scipy/stats/_mstats_basic.py @@ -2549,7 +2549,7 @@ def winsorize(a, limits=None, inclusi...
[ { "body": "### Is your feature request related to a problem? Please describe.\r\n\r\nTo compute a non-central moment of order `n>2`, one can't use the current implementation, but has to reside to implement their own.\r\n\r\n### Describe the solution you'd like.\r\n\r\nI'd like the `stats.moment` function to per...
204ff51bdc8f020525950eed9553a56befa5ea3c
{ "head_commit": "d349c38334d6ed8b9dad7ad343b22a68b5db1a03", "head_commit_message": "stats.moment: update docstring phrasing\n\nCo-authored-by: Matt Haberland <mhaberla@calpoly.edu>", "patch_to_review": "diff --git a/scipy/stats/_stats_py.py b/scipy/stats/_stats_py.py\nindex 290118c41b6e..ffbeb1e9dc35 100644\n---...
[ { "diff_hunk": "@@ -3001,6 +3001,27 @@ def _assert_equal(self, actual, expect, *, shape=None, dtype=None):\n dtype = expect.dtype\n assert actual.dtype == dtype\n \n+ def test_moment_center(self):\n+ # mean((testcase-mean(testcase))**power,axis=0),axis=0))**power))\n+ y = st...
7990cdea750ce5f4cb236c2ca63d7e34870e294c
diff --git a/scipy/stats/_stats_py.py b/scipy/stats/_stats_py.py index 6174850eff04..7be7a0669600 100644 --- a/scipy/stats/_stats_py.py +++ b/scipy/stats/_stats_py.py @@ -936,7 +936,7 @@ def _moment_result_object(*args): _moment_result_object, n_samples=1, result_to_tuple=lambda x: (x,), n_outputs=_moment_out...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "New Feature Additions" }
scipy__scipy-18361@6f835dd
scipy/scipy
Python
18,361
ENH: add `fit` method to `multivariate_normal`
#### Reference issue Closes #15676 #### What does this implement/fix? Implements a method to fit a multivariate normal distribution to data. Still in very premature stage to get some feedback. #### Additional information I am not sure how to generate test cases for the correctness of the fit. Ideally we would ...
2023-04-24T20:35:10Z
ENH: Implement `multivariate_normal.fit` ### Is your feature request related to a problem? Please describe. `multivariate_normal.fit` is not available, but is trivial to implement. ### Describe the solution you'd like. Should be available. ### Describe alternatives you've considered. Doing it yourself. It is incon...
This sounds reasonable. Multivariate distributions do not have a lot of shared functionality, so I think it's OK if this is only defined for `multivariate_normal` initially. Not that the univariate `fit` interface is perfect, but it is what we have, so I think the interface of a multivariate `fit` method should be ...
[ { "body": "### Is your feature request related to a problem? Please describe.\n\n`multivariate_normal.fit` is not available, but is trivial to implement.\n\n### Describe the solution you'd like.\n\nShould be available.\n\n### Describe alternatives you've considered.\n\nDoing it yourself. It is inconvenient.\n\n...
bd00dfbf2b8f0e5a936e80597beda97338b6ee35
{ "head_commit": "6f835ddaec5911366ed590d3579d7a994b5fa974", "head_commit_message": "TST: properly escape error message", "patch_to_review": "diff --git a/scipy/stats/_multivariate.py b/scipy/stats/_multivariate.py\nindex 0fdda070f915..1f0d1f1ad14e 100644\n--- a/scipy/stats/_multivariate.py\n+++ b/scipy/stats/_mu...
[ { "diff_hunk": "@@ -803,6 +805,18 @@ def test_mean_cov(self):\n ref = multivariate_normal.pdf(x, [1, 1, 1], cov_object)\n assert_equal(multivariate_normal.pdf(x, 1, cov=cov_object), ref)\n \n+ def test_fit_error(self):\n+ data = [1, 3]\n+ error_msg = \"`x` must be two-dimensiona...
46dd7e59b3b6239c083ef1308944e3cc51c648c8
diff --git a/scipy/stats/_multivariate.py b/scipy/stats/_multivariate.py index 8f14bb48cd1e..5d2a825f0eb3 100644 --- a/scipy/stats/_multivariate.py +++ b/scipy/stats/_multivariate.py @@ -787,6 +787,39 @@ def entropy(self, mean=None, cov=1): dim, mean, cov_object = self._process_parameters(mean, cov) r...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "New Feature Additions" }
saleor__saleor-5085@f8ed729
saleor/saleor
Python
5,085
Bump black and formatting to new version
I want to merge this change because... ...Black no longer crashes on Windows machines with more than 61 cores and allows for hanging `,` Closes #4931 (done) Closes #5013 (done) ### Pull Request Checklist <!-- Please keep this section. It will make maintainer's life easier. --> 1. [ ] Privileged views ...
2019-12-18T15:00:17Z
Update black and other checks to latest Black was updated with major changes, which requires to rerun it over the whole project. At the same time, we could take the time to update flake8, isort, etc. from pre-commit. TBD: - [ ] Update black to latest - [ ] Update black version in `tox.ini` - [ ] Update `.pre-c...
[ { "body": "Black was updated with major changes, which requires to rerun it over the whole project.\r\n\r\nAt the same time, we could take the time to update flake8, isort, etc. from pre-commit.\r\n\r\nTBD:\r\n- [ ] Update black to latest\r\n- [ ] Update black version in `tox.ini`\r\n- [ ] Update `.pre-commit-c...
728c545e15b6b6f7ca3940bb7aa5b295c2b3a52a
{ "head_commit": "f8ed7294b141d248d28ca545b1b4e43f6025ea0c", "head_commit_message": "Bump black and formatting to new version", "patch_to_review": "diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml\nindex 72197aaf642..dcbd2e15a91 100644\n--- a/.pre-commit-config.yaml\n+++ b/.pre-commit-config.yaml\n@...
[ { "diff_hunk": "@@ -1,6 +1,6 @@\n repos:\n - repo: https://github.com/ambv/black\n- rev: 19.3b0\n+ rev: 19.10b0\n hooks:\n - id: black\n language_version: python3", "line": null, "original_line": 6, "original_start_line": null, "path": ".pre-commit-config.yaml", "st...
fb258085ae1c12bf42fb7828f6387f1745a88d06
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 72197aaf642..1e8bae85aca 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,9 +1,9 @@ repos: - repo: https://github.com/ambv/black - rev: 19.3b0 + rev: 19.10b0 hooks: - id: black - language_version: p...
{ "difficulty": "low", "estimated_review_effort": 2, "problem_domain": "Code Style, Linting, Formatting Fixes" }
scipy__scipy-18081@fc26d7d
scipy/scipy
Python
18,081
ENH: allow single observation for equal variance in `stats.ttest_ind`
<!-- Thanks for contributing a pull request! Please ensure that your PR satisfies the checklist before submitting: http://scipy.github.io/devdocs/dev/contributor/development_workflow.html#checklist-before-submitting-a-pr Also, please name and describe your PR as you would write a commit message: http://scipy.g...
2023-03-02T11:05:49Z
ENH: stats.ttest_ind is inconsistent with R. It does not allow testing against a single datapoint ### Is your feature request related to a problem? Please describe. It is frequently useful to perform a two-sample t-test for the case when one of the samples has only one datapoint, and variances are equal. Mathematicall...
Often the formula for the t statistic is expressed in terms of the individual sample variances. Can the formula be reduced to show that the NaN you get is just an artifact of the way the formula is expressed? Or is it an assumption, as you wrote, that the sample variance is zero? If it is an assumption, does the tes...
[ { "body": "### Is your feature request related to a problem? Please describe.\n\nIt is frequently useful to perform a two-sample t-test for the case when one of the samples has only one datapoint, and variances are equal. Mathematically, only the total variance is required for the test, so variance of 0 can be ...
ad48d95e935c64f6b5b741543e199e32c7aacfef
{ "head_commit": "fc26d7de8e9e1d9542596670c114afe00db86715", "head_commit_message": "TST: add single observation test\n\n[skip ci]", "patch_to_review": "diff --git a/scipy/stats/_stats_py.py b/scipy/stats/_stats_py.py\nindex c78e7b71c18a..6e3cb5d4b998 100644\n--- a/scipy/stats/_stats_py.py\n+++ b/scipy/stats/_sta...
[ { "diff_hunk": "@@ -1155,7 +1156,8 @@ def _var(x, axis=0, ddof=0, mean=None):\n var = _moment(x, 2, axis, mean=mean)\n if ddof != 0:\n n = x.shape[axis] if axis is not None else x.size\n- var *= np.divide(n, n-ddof) # to avoid error on division by zero\n+ with np.errstate(divide='...
19a3681a6b20a213ca464463a6075954f3aced35
diff --git a/scipy/stats/_stats_py.py b/scipy/stats/_stats_py.py index c78e7b71c18a..c2410f4190e4 100644 --- a/scipy/stats/_stats_py.py +++ b/scipy/stats/_stats_py.py @@ -1131,7 +1131,8 @@ def _moment(a, moment, axis, *, mean=None): keepdims=True) / np.abs(mean) with np.errstate(...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "New Feature Additions" }
saleor__saleor-4980@6479a24
saleor/saleor
Python
4,980
Checkout plugins rework
I want to merge this change because... - Fix #4965 - want to remove methods from models - want to address way of using extensions (via importing manager vs helper functions) - type annotations matter ### Screenshots <!-- If your changes affect the UI, providing "before" and "after" screenshots will greatly...
2019-11-15T17:53:04Z
Shipping calculation, totals and plugins ### What I'm trying to achieve Shipping price calculation plugin ### Steps to reproduce the problem 1. I’ve introduced plugin with overwritten calculate_checkout_shipping method 2. Now I can call the manager to get shipping prices, cool! 3. Now checkout total will be inva...
The manager calculates only the default value (inside his body) which will be used in the case when you don't have any plugin with the method that the manager is gonna call. Your case: `manager.calculate_checkout_total` - calculates `default_value` base on `checkout.get_total(discounts)`. The manager wil pass it as...
[ { "body": "### What I'm trying to achieve\r\nShipping price calculation plugin\r\n\r\n### Steps to reproduce the problem\r\n1. I’ve introduced plugin with overwritten calculate_checkout_shipping method\r\n2. Now I can call the manager to get shipping prices, cool!\r\n3. Now checkout total will be invalid: `mana...
67cce448994fc9f831e418873974286dbfb9fc60
{ "head_commit": "6479a2488a4b77c0366893642bdbf91d12f234c7", "head_commit_message": "Rebase issues", "patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex 6ad9e7601cb..719ad23704a 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -4,6 +4,7 @@ All notable, unreleased changes to this project will be ...
[ { "diff_hunk": "@@ -107,7 +111,7 @@ def _validate_adddress_details(\n \n def _validate_order(order: \"Order\") -> bool:\n \"\"\"Validate the order object if it is ready to generate a request to avatax.\"\"\"\n- if not order.lines.count():\n+ if not len(order.lines.all()):", "line": null, "orig...
08efd3abd0df04528c9b9f8d634932ad63bd402b
diff --git a/CHANGELOG.md b/CHANGELOG.md index 6ad9e7601cb..719ad23704a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ All notable, unreleased changes to this project will be documented in this file. ## [Unreleased] +- Relocate Checkout and CheckoutLine methods into separate module and update checkou...
{ "difficulty": "medium", "estimated_review_effort": 4, "problem_domain": "Bug Fixes" }
scipy__scipy-17976@b0055c0
scipy/scipy
Python
17,976
DOC/MAINT: simplify release entries
Follows NumPy's doc. This greatly simplify the tree structure. I think it's simpler and clearer to make releases then. Instead of having to add 2 files for the release entry, only a single file is needed and the link in `release.rst` directly points to it instead of an empty file which only does the linking. The ...
2023-02-15T15:57:40Z
MAINT, DOC: doc_requirements and make dist and pooch This patch is needed to succeed with `make dist` locally during the release process, to build the docs: ```diff diff --git a/doc_requirements.txt b/doc_requirements.txt index f601052f3..8f66e5886 100644 --- a/doc_requirements.txt +++ b/doc_requirements.txt @@...
Interesting, out of curiosity, are the requirements from `environment.yml` not already installed before running `make dist` and building the docs? Or is this always a standalone, independent command? `environment.yml` is a `conda`-specific thing, not used in local doc build process, which isolates to a `venv` I think; ...
[ { "body": "This patch is needed to succeed with `make dist` locally during the release process, to build the docs:\r\n\r\n```diff\r\ndiff --git a/doc_requirements.txt b/doc_requirements.txt\r\nindex f601052f3..8f66e5886 100644\r\n--- a/doc_requirements.txt\r\n+++ b/doc_requirements.txt\r\n@@ -5,3 +5,4 @@ pydata...
a4bed793057026b86dc8fb12a5fd69813da8a728
{ "head_commit": "b0055c060568ed137835655c80ff298802c9286d", "head_commit_message": "DOC/MAINT: add pooch to the doc requirements.\n\n[skip actions] [skip azp] [skip cirrus]", "patch_to_review": "diff --git a/doc/source/release.0.10.0.rst b/doc/source/release.0.10.0.rst\ndeleted file mode 100644\nindex 5e47a00b02...
[ { "diff_hunk": "@@ -2,68 +2,68 @@\n Release Notes\n *************\n \n-This is the list of changes to SciPy between each release. For full details,\n+This is the list of changes to SciPy between each For full details,-notes", "line": null, "original_line": 5, "original_start_line": null, "path"...
6e99f592ffbb5837acc41952e1155f0b646b51f2
diff --git a/doc/source/release.0.10.0.rst b/doc/source/release.0.10.0.rst deleted file mode 100644 index 5e47a00b0248..000000000000 --- a/doc/source/release.0.10.0.rst +++ /dev/null @@ -1 +0,0 @@ -.. include:: ../release/0.10.0-notes.rst diff --git a/doc/source/release.0.10.1.rst b/doc/source/release.0.10.1.rst delete...
{ "difficulty": "low", "estimated_review_effort": 2, "problem_domain": "Documentation Updates" }
scipy__scipy-17993@826bf9b
scipy/scipy
Python
17,993
BLD: Fix meson build on Cygwin.
Mostly fixing dependency contents and order. Some inclusion of visibility macros before stdlib headers. <!-- Thanks for contributing a pull request! Please ensure that your PR satisfies the checklist before submitting: http://scipy.github.io/devdocs/dev/contributor/development_workflow.html#checklist-before-sub...
2023-02-17T18:09:31Z
BUG: Import error with Cygwin (tested versions 1.9.0, 1.9.3, 1.10.0, 1.11.0) ### Describe your issue. Build works fine except that I need to add -D_DEFAULT_SOURCE to the C and C++ build arguments in the meson.build file because otherwise math symbols such as M_PI can't be found on my platform. But then when trying ...
> Not sure why it's looking for a `.pyx` file when the build is already over For ease of debugging, since you will usually edit the `.pyx` file to fix problems rather than the `.dll` file. I've run into a few causes for `ImportError` on compiled extension modules: what happens when you run `cygcheck` on the file co...
[ { "body": "### Describe your issue.\n\nBuild works fine except that I need to add -D_DEFAULT_SOURCE to the C and C++ build arguments in the meson.build file because otherwise math symbols such as M_PI can't be found on my platform.\r\n\r\nBut then when trying to import scipy.interpolate.UnivariateSpline, I get ...
a438ba6ef4061c28d79657b525ed2378154dfea8
{ "head_commit": "826bf9b0856eeb2430538027bedf3d82be6c9054", "head_commit_message": "BLD: Fix meson build on Cygwin.\n\nMostly fixing dependency contents and order.\nSome inclusion of visibility macros before stdlib headers.", "patch_to_review": "diff --git a/dev.py b/dev.py\nindex 1594931996e0..26f46274ec4c 1006...
[ { "diff_hunk": "@@ -1,6 +1,7 @@\n #ifndef WRIGHT_HH\n #define WRIGHT_HH\n \n+#include <pyconfig.h>", "line": null, "original_line": 4, "original_start_line": null, "path": "scipy/special/wright.hh", "start_line": null, "text": "@user1:\nInstead of this, can you move `#include <Python.h>`...
f7e70f6c7c8ac0d244e406f3a009bd2d305b5e7f
diff --git a/dev.py b/dev.py index 1594931996e0..26f46274ec4c 100644 --- a/dev.py +++ b/dev.py @@ -436,6 +436,13 @@ def setup_build(cls, dirs, args): raise RuntimeError("Can't build into non-empty directory " f"'{build_dir.absolute()}'") + if sys.platform ==...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "Bug Fixes" }
saleor__saleor-4970@343822c
saleor/saleor
Python
4,970
Allow to delete category and leave products
Allow to create product without category. After removing category, related products become unpublished and minimal variant price is recalculated. Closes #1928 ### Pull Request Checklist <!-- Please keep this section. It will make maintainer's life easier. --> 1. [ ] Privileged views and APIs are guarded by...
2019-11-14T09:37:08Z
Deleting a category deletes all subcategories and their products Since there's no way to undo deleting one of the main categories is a great way to accidentally get rid of most if not all of your products. The only remedy is restoring the entire store from a recent backup.
What about a simple `SET_NULL`? ```patch Index: saleor/product/models.py IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- saleor/product/models.py (date 1523632186000) +++ saleor/product/models.py (...
[ { "body": "Since there's no way to undo deleting one of the main categories is a great way to accidentally get rid of most if not all of your products. The only remedy is restoring the entire store from a recent backup.", "number": 1928, "title": "Deleting a category deletes all subcategories and their ...
5f5936a7d3956ef1fa2bedf61203578901ce8262
{ "head_commit": "343822c5bca9e72d58b83799daba7f996fc6eec5", "head_commit_message": "Merge branch 'master' into allow-to-delete-category-and-leave-products", "patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex 79ffa42fd26..4560c496feb 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -8,6 +8,7 @@...
[ { "diff_hunk": "@@ -363,6 +366,13 @@ def clean_seo_description(self):\n )\n return seo_description\n \n+ def clean_is_published(self):\n+ is_published = self.cleaned_data[\"is_published\"]", "line": null, "original_line": 370, "original_start_line": null, "path": "saleo...
d79112b02d91aea2d41aaf8586a4a864087a9da2
diff --git a/CHANGELOG.md b/CHANGELOG.md index 6296f2dc8cb..9f264a99a7d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,8 +9,8 @@ All notable, unreleased changes to this project will be documented in this file. - Deprecate `localized` field in Money type - #4952 by @IKarbowiak - Fix for shipping api doesn't apply ...
{ "difficulty": "medium", "estimated_review_effort": 4, "problem_domain": "Bug Fixes" }
saleor__saleor-4952@2e1363c
saleor/saleor
Python
4,952
Deprecate `localized` field in Money type
Set 'localized' field in the Money type as deprecated - it's useless. Price formatting according to the current locale will be handled by the frontend client. Closes #4934 ### Pull Request Checklist <!-- Please keep this section. It will make maintainer's life easier. --> 1. [ ] Privileged views and APIs a...
2019-11-07T11:46:00Z
Deprecate `localized` field Deprecate the `localized` field in the `Money` type. In the API it's enough to expose the `amount` and `currency` fields, while price formatting according to the current locale should be handled by the frontend client (we already have a library for that in our dashboard).
[ { "body": "Deprecate the `localized` field in the `Money` type. In the API it's enough to expose the `amount` and `currency` fields, while price formatting according to the current locale should be handled by the frontend client (we already have a library for that in our dashboard). ", "number": 4934, "...
af9de7c3a02d66d230af5df9afc6f8fbd3c00d7c
{ "head_commit": "2e1363c4acfb3de4160d24fed74a6cd47d1694e4", "head_commit_message": "Edit changelog", "patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex c0d1bd83e64..4fb2656c7f9 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -6,6 +6,7 @@ All notable, unreleased changes to this project will be...
[ { "diff_hunk": "@@ -8,7 +8,11 @@ class Money(graphene.ObjectType):\n currency = graphene.String(description=\"Currency code.\", required=True)\n amount = graphene.Float(description=\"Amount of money.\", required=True)\n localized = graphene.String(\n- description=\"Money formatted according t...
025efc5f8b468fceb0867d6f4d95243c1461c30b
diff --git a/CHANGELOG.md b/CHANGELOG.md index c0d1bd83e64..4fb2656c7f9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ All notable, unreleased changes to this project will be documented in this file. - Fix problem with free shipping voucher - #4942 by @IKarbowiak - Add sub-categories to random data - ...
{ "difficulty": "low", "estimated_review_effort": 2, "problem_domain": "Code Refactoring / Architectural Improvement" }
saleor__saleor-4914@bc9833c
saleor/saleor
Python
4,914
Query object translation with only manage_translation permission
I want to merge this change because resolve #4834 <!-- Please mention all relevant issue numbers. --> ### Screenshots <!-- If your changes affect the UI, providing "before" and "after" screenshots will greatly reduce the amount of work needed to review your work. --> ### Pull Request Checklist <!-- Ple...
2019-10-30T10:00:13Z
Translate eg. products without manage_products permissions ### What I'm trying to achieve To translate hidden products, sales and other permission-protected objects. ### Describe a proposed solution ``` translation(kind: PRODUCT, id: "", languageCode: DE) { ..on Product { id name description ...
[ { "body": "### What I'm trying to achieve\r\nTo translate hidden products, sales and other permission-protected objects.\r\n\r\n### Describe a proposed solution\r\n```\r\ntranslation(kind: PRODUCT, id: \"\", languageCode: DE) {\r\n ..on Product {\r\n id\r\n name\r\n description\r\n ...\r\n trans...
fd8cb83a92809b929fdef81811db03d8175f937b
{ "head_commit": "bc9833ca5dcc8152626327935841cc1a03a64ece", "head_commit_message": "Fix review remarks", "patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex 79ffa42fd26..f80b101e4b5 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -8,6 +8,7 @@ All notable, unreleased changes to this project wil...
[ { "diff_hunk": "@@ -37,33 +51,62 @@ class Meta:\n )\n \n \n+# TODO Consider name of this class, we should replace to TranslatableItem after\n+# `translations` query refactor. Issue #4957\n+class DefaultTranslationItem(graphene.Union):\n+ class Meta:\n+ types = (\n+ translation_types...
2589146afe1dbb734d79ce0666f88852e44f12c5
diff --git a/CHANGELOG.md b/CHANGELOG.md index 2687043e242..6296f2dc8cb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,8 +8,10 @@ All notable, unreleased changes to this project will be documented in this file. - Add sub-categories to random data - #4949 by @IKarbowiak - Deprecate `localized` field in Money type ...
{ "difficulty": "medium", "estimated_review_effort": 4, "problem_domain": "New Feature Additions" }
scipy__scipy-18016@0a8f568
scipy/scipy
Python
18,016
Add axes argument to ndimage filters
closes #10554 see also requests/discussion at: https://github.com/scipy/scipy/issues/12997#issuecomment-811268933 and https://github.com/scipy/scipy/issues/16191#issuecomment-1144781807 cc @mdhaber # description This PR adds an "axes" keyword argument to most `scipy.ndimage` filters (1D filters already have ...
2023-02-20T22:32:02Z
ndimage.gaussian_filter provide axis option **Is your feature request related to a problem? Please describe.** I have a stacked array of 2d images, which is a 3d array. I want to use ndimage.gaussian_filter for each 2d image in the array. However, current method does 3d gaussian, which I did not realize at the beginni...
I had the same problem, but was able to work around it by setting `sigma` to a tuple of standard deviations (instead of a single float) and fixing the standard deviation for the color channel dimension to 0: ```python3 import numpy as np import scipy.ndimage # create test image with shape (2, 2, 2), first chann...
[ { "body": "**Is your feature request related to a problem? Please describe.**\r\nI have a stacked array of 2d images, which is a 3d array. I want to use ndimage.gaussian_filter for each 2d image in the array. However, current method does 3d gaussian, which I did not realize at the beginning. \r\n\r\n**Describe ...
57b6c91437d7263974f4958fd4c9f095157aecd5
{ "head_commit": "0a8f568684fdb60624354ed465c566fcf2f2952b", "head_commit_message": "also test order argument with axes specified", "patch_to_review": "diff --git a/scipy/ndimage/_filters.py b/scipy/ndimage/_filters.py\nindex 6804ef51fa87..d6ea8d2d2571 100644\n--- a/scipy/ndimage/_filters.py\n+++ b/scipy/ndimage/...
[ { "diff_hunk": "@@ -306,6 +307,12 @@ def gaussian_filter(input, sigma, order=0, output=None,\n for all axes. If specified, the size of the kernel along each axis\n will be ``2*radius + 1``, and `truncate` is ignored.\n Default is None.\n+ axes : tuple of int or None, optional\n+ ...
fa3b09d86d1b509e14fbe7682cf5c6711428c887
diff --git a/scipy/ndimage/_filters.py b/scipy/ndimage/_filters.py index 6804ef51fa87..bd0f553cda19 100644 --- a/scipy/ndimage/_filters.py +++ b/scipy/ndimage/_filters.py @@ -240,8 +240,9 @@ def gaussian_filter1d(input, sigma, axis=-1, order=0, output=None, Notes ----- - The Gaussian kernel will have siz...
{ "difficulty": "medium", "estimated_review_effort": 4, "problem_domain": "New Feature Additions" }
saleor__saleor-4863@90332b3
saleor/saleor
Python
4,863
Add customer set password url to Site settings
I want to merge this change because resolve #4830 <!-- Please mention all relevant issue numbers. --> ### Screenshots <!-- If your changes affect the UI, providing "before" and "after" screenshots will greatly reduce the amount of work needed to review your work. --> ### Pull Request Checklist <!-- Ple...
2019-10-18T09:37:57Z
Configure storefront URL through the API In the dashboard, we have a view for creating customers, which can automatically send them a link to set up their passwords. The issue is that the dashboard doesn't know what is the storefront's URL, and in particular, what is the address of a view to set the password. I sug...
[ { "body": "In the dashboard, we have a view for creating customers, which can automatically send them a link to set up their passwords. The issue is that the dashboard doesn't know what is the storefront's URL, and in particular, what is the address of a view to set the password. \r\n\r\nI suggest that we add a...
fe68e5e59b244fc86a0bc8e04eabb0f00a611149
{ "head_commit": "90332b3de32fac7c739e15c2008e1796cbc188e1", "head_commit_message": "Add schema and changelog", "patch_to_review": "diff --git a/.isort.cfg b/.isort.cfg\nindex 72a7c64739e..13f594c9866 100644\n--- a/.isort.cfg\n+++ b/.isort.cfg\n@@ -1,2 +1,2 @@\n [settings]\n-known_third_party = PIL,babel,bleach,b...
[ { "diff_hunk": "@@ -149,6 +149,10 @@ class Shop(graphene.ObjectType):\n company_address = graphene.Field(\n Address, description=\"Company address.\", required=False\n )\n+ customer_set_password_url = graphene.String(\n+ description=\"storefront url address in which the client sets the...
11b3bf83b03b764f572c246259f633289c10770f
diff --git a/.isort.cfg b/.isort.cfg index 72a7c64739e..13f594c9866 100644 --- a/.isort.cfg +++ b/.isort.cfg @@ -1,2 +1,2 @@ [settings] -known_third_party = PIL,babel,bleach,bootstrap4,braintree,bs4,captcha,celery,dj_database_url,dj_email_url,django,django_babel,django_cache_url,django_countries,django_elasticsearch_d...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "New Feature Additions" }
saleor__saleor-4944@03f8b4f
saleor/saleor
Python
4,944
Hide all secret fields in plugin configuration
- Adds new config fields - `Secret`, `Password` - `Secret` dedicated for fields like `Public Key`, `Private Key` - `Password` dedicated to fields that should be fully hidden. - Remove `hide_secret_fields`logic from `BasePlugin` - Hide secret logic on graphene type level - closes #4937 For API: - `Secr...
2019-11-06T10:33:25Z
Plugins query doesn't have all fields ``` class ExtensionsManager(PaymentInterface): def get_plugin_configurations(self) -> List["PluginConfiguration"]: plugin_configuration_ids = [] plugin_configurations_qs = PluginConfiguration.objects.all() for plugin in self.plugins: pl...
[ { "body": "```\r\nclass ExtensionsManager(PaymentInterface):\r\n def get_plugin_configurations(self) -> List[\"PluginConfiguration\"]:\r\n plugin_configuration_ids = []\r\n plugin_configurations_qs = PluginConfiguration.objects.all()\r\n for plugin in self.plugins:\r\n plugin_...
57f3e0a6054c4ecc6d52cbba56a308140964d969
{ "head_commit": "03f8b4f1360f2311a2ba6c707ab3d9bc65a040be", "head_commit_message": "Hide all secret fields in plugin configuration", "patch_to_review": "diff --git a/saleor/dashboard/forms.py b/saleor/dashboard/forms.py\nindex 6fc3c2675fe..ffb39d7562c 100644\n--- a/saleor/dashboard/forms.py\n+++ b/saleor/dashboa...
[ { "diff_hunk": "@@ -24,3 +24,25 @@ class Meta:\n model = models.PluginConfiguration\n interfaces = [graphene.relay.Node]\n only_fields = [\"name\", \"description\", \"active\", \"configuration\"]\n+\n+ def resolve_configuration(self, _info):\n+ plugin = manager.get_extensions_m...
aa78d1b89f23c12263375dc13cde93f13efe11ac
diff --git a/saleor/dashboard/forms.py b/saleor/dashboard/forms.py index f05148b4a4e..32e778e3f4e 100644 --- a/saleor/dashboard/forms.py +++ b/saleor/dashboard/forms.py @@ -209,3 +209,9 @@ class ConfigCharField(forms.CharField): def clean(self, value): parsed_value = super().clean(value) return {...
{ "difficulty": "medium", "estimated_review_effort": 4, "problem_domain": "New Feature Additions" }
saleor__saleor-4807@0997afc
saleor/saleor
Python
4,807
Add form to configure payment gateways in dashboard
Right now there is no option to set payments data in dashboard 1.0 In this pull request I've added a section in the dashboard with listed all available payment gateways in `settings.PLUGINS` and option to configure them. From developers side I've created model form for `Plugin Configuration` with dynamic fields create...
2019-10-04T13:31:21Z
Add configuration of payments gateway to dashboard 1.0 We moved payments gateway to the plugin architecture. Each plugin can be configured over dashboard2.0 by using dynamic settings. Because we removed the payment configuration from settings.py, we don't have any way to configure them by someone who uses dashboard1....
[ { "body": "We moved payments gateway to the plugin architecture. Each plugin can be configured over dashboard2.0 by using dynamic settings. \r\nBecause we removed the payment configuration from settings.py, we don't have any way to configure them by someone who uses dashboard1.0. We need to add some forms for e...
d3c8757fddba89a778c7eab8081101f8cbc87f6d
{ "head_commit": "0997afcb030581199436585823a5137096e4e64d", "head_commit_message": "Update absctract class definition", "patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex c4c4fe981e3..24cd438a82b 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -90,6 +90,7 @@ All notable, unreleased changes to...
[ { "diff_hunk": "@@ -272,7 +272,11 @@ def list_payment_gateways(self) -> List[dict]:\n }\n for plugin in self.plugins\n if payment_method in type(plugin).__dict__\n- and self.get_plugin_configuration(plugin.PLUGIN_NAME).active\n+ and (", "line": null,...
1e0437b35a5789975e3590ea47e172008a805de9
diff --git a/CHANGELOG.md b/CHANGELOG.md index 0e33dd7ff1d..08997c33fc7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -95,6 +95,7 @@ All notable, unreleased changes to this project will be documented in this file. - `productVariant` nodes now require `manage_products` permission to query `costPrice` and `stockQuanti...
{ "difficulty": "medium", "estimated_review_effort": 4, "problem_domain": "New Feature Additions" }
scipy__scipy-17886@77467f6
scipy/scipy
Python
17,886
ENH: Warn about missing boundary when NOLA condition failed in ISTFT …
Warn about missing boundary when NOLA condition failed. #17885 #### Reference issue closes: #17885 #### What does this implement/fix? Add additional information to the warning message.
2023-01-30T15:05:30Z
ENH: signal.istft gives NOLA conditional failed warning but signal.check_NOLA functions tells me the constraint is satisfies ### Is your feature request related to a problem? Please describe. When running a signal.istft with boundary equal to False I get a warning telling me that the NOLA condition failed. However whe...
[ { "body": "### Is your feature request related to a problem? Please describe.\n\nWhen running a signal.istft with boundary equal to False I get a warning telling me that the NOLA condition failed. However when I use the signal.check_NOLA function it tells me that the condition is satisfied, this is counterintui...
e6c27e50f3f98a68768291af274d783749ffdf15
{ "head_commit": "77467f6bf02ce957f24461af5819eeecea4b7632", "head_commit_message": "ENH: Warn about missing boundary when NOLA condition failed in ISTFT #17885", "patch_to_review": "diff --git a/scipy/signal/_spectral_py.py b/scipy/signal/_spectral_py.py\nindex 29a14da5f5a3..f70b9ab55130 100644\n--- a/scipy/sign...
[ { "diff_hunk": "@@ -1489,7 +1489,7 @@ def istft(Zxx, fs=1.0, window='hann', nperseg=None, noverlap=None, nfft=None,\n \n # Divide out normalization where non-tiny\n if np.sum(norm > 1e-10) != len(norm):\n- warnings.warn(\"NOLA condition failed, STFT may not be invertible\")\n+ warnings.war...
a23a1bf4948e868e380e8774a55f02872ba87ec2
diff --git a/scipy/signal/_spectral_py.py b/scipy/signal/_spectral_py.py index 29a14da5f5a3..0fda31b2d41c 100644 --- a/scipy/signal/_spectral_py.py +++ b/scipy/signal/_spectral_py.py @@ -1489,7 +1489,10 @@ def istft(Zxx, fs=1.0, window='hann', nperseg=None, noverlap=None, nfft=None, # Divide out normalization wh...
{ "difficulty": "low", "estimated_review_effort": 2, "problem_domain": "Bug Fixes" }
scipy__scipy-17830@c3cd04e
scipy/scipy
Python
17,830
MAINT: stats._axis_nan_policy: raise appropriate TypeErrors
#### Reference issue Closes gh-17713 #### What does this implement/fix? Ensures that functions wrapped with `_axis_nan_policy` decorator raise common TypeErrors as appropriate.
2023-01-20T20:32:52Z
BUG: `_axis_nan_policy` changes some common `TypeError`s ### Describe your issue. Functions wrapped with the `_axis_nan_policy` decorator give the correct error message when unrecognized arguments are passed and when multiple values are passed for the same argument: <details> ```python3 from scipy import stats ...
Incidentally, I discovered this when trying to use `ttest_rel` with one sample (the difference `a - b`), which should be allowed (as it is for `wilcoxon`), but isn't. I won't open a separate issue for it, but let's fix that, too. Sir, I want to work on this issue. Could you please guide me how to fix this bug? May I su...
[ { "body": "### Describe your issue.\n\nFunctions wrapped with the `_axis_nan_policy` decorator give the correct error message when unrecognized arguments are passed and when multiple values are passed for the same argument:\r\n\r\n<details>\r\n\r\n```python3\r\nfrom scipy import stats\r\nstats.gmean([1, 2, 3], ...
f5f64c55899e3b3d3b27f9566d310c434401a8a7
{ "head_commit": "c3cd04e834bfce8f8fb1f12fe53a5080c4625a79", "head_commit_message": "MAINT: stats._axis_nan_policy: raise appropriate TypeErrors", "patch_to_review": "diff --git a/scipy/stats/_axis_nan_policy.py b/scipy/stats/_axis_nan_policy.py\nindex c44c90c36963..58752d7697d4 100644\n--- a/scipy/stats/_axis_na...
[ { "diff_hunk": "@@ -403,12 +403,17 @@ def axis_nan_policy_wrapper(*args, _no_deco=False, **kwds):\n # Note that *args can't be provided as a keyword argument\n params = [f\"arg{i}\" for i in range(len(args))] + params[1:]\n \n+ # raise if there are too many positional ...
58a7877ebe8e322351d813c0fa8a2c53acd1884e
diff --git a/scipy/stats/_axis_nan_policy.py b/scipy/stats/_axis_nan_policy.py index c44c90c36963..1ecd41aeabe8 100644 --- a/scipy/stats/_axis_nan_policy.py +++ b/scipy/stats/_axis_nan_policy.py @@ -403,12 +403,17 @@ def axis_nan_policy_wrapper(*args, _no_deco=False, **kwds): # Note that *args can't be...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "Bug Fixes" }
saleor__saleor-4791@19df38e
saleor/saleor
Python
4,791
Add Prettier
I want to merge this change because i add prettier to formate the js files. <!-- Please mention all relevant issue numbers. --> Fixes #3404
2019-10-02T08:35:35Z
Adopt prettier for older JS files We currently have two contradicting styles in the same repository. Typescript uses `prettier` but the old storefront code follows a different set of rules. Let's make `prettier` the only accepted style and update our JS files to match it.
I want to try to help @Julian-B90 Sorry for no earlier response, are you still interested in helping out? @maarcingebala yes im interested :-) Great! So we have a bunch of JS files in Saleor repo, inside `saleor/static/js` catalog. They are all used either by the static storefront and the dashboard served by Django. To...
[ { "body": "We currently have two contradicting styles in the same repository. Typescript uses `prettier` but the old storefront code follows a different set of rules. Let's make `prettier` the only accepted style and update our JS files to match it.", "number": 3404, "title": "Adopt prettier for older J...
5f2dde844f806219e385175c58366da1c157090b
{ "head_commit": "19df38e72afb86b9212407066d34917b978e7f2f", "head_commit_message": "fix codestyling form js files with prettier+", "patch_to_review": "diff --git a/.eslintrc.json b/.eslintrc.json\nindex 36a6f380cf7..e30b6169962 100644\n--- a/.eslintrc.json\n+++ b/.eslintrc.json\n@@ -3,7 +3,11 @@\n \"browser\...
[ { "diff_hunk": "@@ -0,0 +1,17 @@\n+{\n+ \"arrowParens\": \"avoid\",\n+ \"bracketSpacing\": true,\n+ \"htmlWhitespaceSensitivity\": \"css\",\n+ \"insertPragma\": false,\n+ \"jsxBracketSameLine\": false,\n+ \"jsxSingleQuote\": false,\n+ \"printWidth\": 80,\n+ \"proseWrap\": \"preserve\",\n+ \"quoteProps\...
f28e7d854de2751bd981d2447765cdbe3d5f3239
diff --git a/.eslintrc.json b/.eslintrc.json index 36a6f380cf7..e30b6169962 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -3,7 +3,11 @@ "browser": true, "jquery": true }, - "extends": ["standard", "plugin:react/recommended"], + "extends": [ + "standard", + "plugin:react/recommended", + "pl...
{ "difficulty": "low", "estimated_review_effort": 3, "problem_domain": "Code Style, Linting, Formatting Fixes" }
scipy__scipy-18385@4f78202
scipy/scipy
Python
18,385
BUG: linalg: fix sqrtm precision preservation for complex input.
<!-- Thanks for contributing a pull request! Please ensure that your PR satisfies the checklist before submitting: http://scipy.github.io/devdocs/dev/contributor/development_workflow.html#checklist-before-submitting-a-pr Also, please name and describe your PR as you would write a commit message: http://scipy.g...
2023-04-29T12:49:23Z
BUG: `complex256` type created by entering `complex128` into `linalg.sqrtm` causes errors. ### Describe your issue. When `scipy.linalg` operates on a complex array/matrix it returns a complex array with double the precision of the input array. As a result if given a `complex128` type array it will return a `complex256...
That's probably an oversight that came from a contributor with a Windows machine (maybe even from myself). Because on Win, complex256 is complex128 anyways. We don't use complex256 anywhere. I'll check. For reference, this was added intentionally in gh-16294 in response to gh-14853, but as noted in the last comment th...
[ { "body": "### Describe your issue.\n\nWhen `scipy.linalg` operates on a complex array/matrix it returns a complex array with double the precision of the input array. As a result if given a `complex128` type array it will return a `complex256` array.\r\n\r\nThis type of array is not supported by `numpy.linalg` ...
e007717494ff531bd0044a424f4ac6069247f6dd
{ "head_commit": "4f782026c2e5e08265ec8ee844d9bd1aef740d1d", "head_commit_message": "BUG: linalg: fix sqrtm precision preservation based on review comment.", "patch_to_review": "diff --git a/scipy/linalg/_matfuncs_sqrtm.py b/scipy/linalg/_matfuncs_sqrtm.py\nindex 867d67cc263f..1e59fae5c6df 100644\n--- a/scipy/lin...
[ { "diff_hunk": "@@ -412,69 +412,64 @@ def test_gh7839(self):\n \n def test_data_size_preservation_uint_in_float_out(self):\n M = np.zeros((10, 10), dtype=np.uint8)\n- # input bit size is 8, but minimum float bit size is 16\n- assert sqrtm(M).dtype == np.float16\n+ assert sqrtm(M...
1867c90111fb4ded6b67c18e6623130477455ae9
diff --git a/scipy/linalg/_matfuncs_sqrtm.py b/scipy/linalg/_matfuncs_sqrtm.py index e76c08932eb4..b7da6ced474e 100644 --- a/scipy/linalg/_matfuncs_sqrtm.py +++ b/scipy/linalg/_matfuncs_sqrtm.py @@ -14,6 +14,7 @@ from ._misc import norm from .lapack import ztrsyl, dtrsyl from ._decomp_schur import schur, rsf2csf +fr...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "Bug Fixes" }
saleor__saleor-4715@fdbc4dd
saleor/saleor
Python
4,715
Filtering: use search in a consistent way
I want to merge this change because: - [x] resolve #4007 - [x] resolve #4711 <!-- Please mention all relevant issue numbers. --> ### Screenshots <!-- If your changes affect the UI, providing "before" and "after" screenshots will greatly reduce the amount of work needed to review your work. --> ### Pull...
2019-09-04T11:36:49Z
Filtering: use search in a consistent way Some filters have the `search` filter which doesn't work in a consistent manner - for some filters it does `icontains` filtering (`filter_by_query_param` function) while products resolver uses database search (see the `ProductFilter` class). We should unify this and use search ...
Another problem is that we have two ways to search for things in the API - either by using `query` field (top-level argument in many resolvers) or `search` inside filter objects. We'll make sure that all connection fields that we want to have search capabilities will have the `filter` object with the `search` field ins...
[ { "body": "Some filters have the `search` filter which doesn't work in a consistent manner - for some filters it does `icontains` filtering (`filter_by_query_param` function) while products resolver uses database search (see the `ProductFilter` class). We should unify this and use search for all `search` filter...
e27a609df840baeecf65ea2317951a3a939a3c69
{ "head_commit": "fdbc4dd3c858b9ded2d6803bc092c4d358e81951", "head_commit_message": "Add changelog and graphql schema", "patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex fe84fe6e051..9101908f542 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -65,6 +65,7 @@ All notable, unreleased changes to ...
[ { "diff_hunk": "@@ -55,13 +55,27 @@ def filter_created_range(qs, _, value):\n return qs\n \n \n+def filter_order_search(qs, _, value):\n+ order_fields = [\n+ \"discount_name\",\n+ \"token\",", "line": null, "original_line": 61, "original_start_line": null, "path": "saleor/gr...
445d59019f91e3ce9d1746b8d448872b12779c59
diff --git a/CHANGELOG.md b/CHANGELOG.md index fe84fe6e051..9101908f542 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -65,6 +65,7 @@ All notable, unreleased changes to this project will be documented in this file. - Distinguish OrderLine product name and variant name - #4702 by @fowczarek - Fix for Digital products...
{ "difficulty": "medium", "estimated_review_effort": 4, "problem_domain": "Code Refactoring / Architectural Improvement" }
saleor__saleor-4702@c9ebf14
saleor/saleor
Python
4,702
Distinguish OrderLine product name and variant name
I want to merge this change because resolve #4624 <!-- Please mention all relevant issue numbers. --> ### Screenshots <!-- If your changes affect the UI, providing "before" and "after" screenshots will greatly reduce the amount of work needed to review your work. --> ### Pull Request Checklist <!-- Ple...
2019-08-29T14:06:38Z
Distinguish OrderLine product name and variant name Currently `OrderLine` `productName` is a combination of `product.name (variant.name)`. Proposal: Backend should not force how to format the order line item name, ideally it should expose `productName` and `variantName` and let the frontend decide what and how to d...
[ { "body": "Currently `OrderLine` `productName` is a combination of `product.name (variant.name)`.\r\n\r\nProposal:\r\nBackend should not force how to format the order line item name, ideally it should expose `productName` and `variantName` and let the frontend decide what and how to display it.\r\n", "numbe...
e28546eee48b9102501449cf67c25650ee92c325
{ "head_commit": "c9ebf14bc580f198a7627d86e46ccb8c1f5236e0", "head_commit_message": "Add schema and changelog", "patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex c397a8ff56d..bc793c61141 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -59,7 +59,8 @@ All notable, unreleased changes to this pro...
[ { "diff_hunk": "@@ -198,6 +198,12 @@ class OrderLine(CountableDjangoObjectType):\n A purchased product variant. Note: this field may be null if the\n variant has been removed from stock at all.\"\"\",\n )\n+ translated_product_name = graphene.String(\n+ required=True, descr...
53b09ef85af523c66ede638d4930ee7e89498ebe
diff --git a/CHANGELOG.md b/CHANGELOG.md index c397a8ff56d..bc793c61141 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -59,7 +59,8 @@ All notable, unreleased changes to this project will be documented in this file. - Change AddressValidationRules API - #4655 by @Kwaidan00 - Refactor account deletion mutations - #466...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "New Feature Additions" }
scipy__scipy-17691@2742e1c
scipy/scipy
Python
17,691
ENH: optimize.root_scalar: allow newton without f', secant without x1
#### Reference issue Closes gh-17570 #### What does this implement/fix? `root_scalar` does not allow `method='newton'` to be used without an analytical derivative even though `scipy.optimize.root` does, and it does not allow `method='secant'` to be used without an explicit `x1` even though `scipy.optimize.newton` ...
2023-01-01T00:50:39Z
ENH: optimize.root_scalar: default to `newton` when only `x0` is provided ### Is your feature request related to a problem? Please describe. When `method` is not specified, `optimize.root_scalar` attempts to select the best method given the information available. I was always surprised that the following: ```pyth...
+1 from me. I don't see why we would be required to provide fprime.
[ { "body": "### Is your feature request related to a problem? Please describe.\r\n\r\nWhen `method` is not specified, `optimize.root_scalar` attempts to select the best method given the information available. I was always surprised that the following:\r\n\r\n```python3\r\nfrom scipy import optimize\r\n\r\ndef f(...
35dfd06bf37a5fdddda5e0b9e8043623957c084e
{ "head_commit": "2742e1ce049deecb168d3beed1bf1f0cbd53eab8", "head_commit_message": "ENH: optimize.root_scalar: allow newton without f', secant without x1", "patch_to_review": "diff --git a/scipy/optimize/_root_scalar.py b/scipy/optimize/_root_scalar.py\nindex 54ffd95c3dc2..6f75150a450c 100644\n--- a/scipy/optimi...
[ { "diff_hunk": "@@ -286,7 +288,23 @@ def root_scalar(f, args=(), method=None, bracket=None,\n if x0 is None:\n raise ValueError('x0 must not be None for %s' % method)\n if not fprime:\n- raise ValueError('fprime must be specified for %s' % method)\n+ # approxima...
74b58c6603bcddf5f66708cab128f4b0b37a9f8a
diff --git a/scipy/optimize/_root_scalar.py b/scipy/optimize/_root_scalar.py index 54ffd95c3dc2..869921b9b0ff 100644 --- a/scipy/optimize/_root_scalar.py +++ b/scipy/optimize/_root_scalar.py @@ -9,6 +9,7 @@ import numpy as np from . import _zeros_py as optzeros +from ._numdiff import approx_derivative __all__ = ...
{ "difficulty": "medium", "estimated_review_effort": 4, "problem_domain": "New Feature Additions" }
scipy__scipy-17692@2311637
scipy/scipy
Python
17,692
MAINT: optimize.minimize_scalar: enforce output shape consistency
#### Reference issue Closes gh-16196 #### What does this implement/fix? gh-16196 reported that the output shape of `minimize_scalar`'s result object `x` attribute was consistent when an objective function returned an array. This PR ensures that `x` attribute is always a NumPy scalar. #### Additional information...
2023-01-01T09:17:26Z
BUG: OptimizeResult from optimize.minimize_scalar changes 'x' type if convergence is found in first step. ### Describe your issue. Executing an optimization of the same function through `optimize.minimize_scalar`, but with different bounds or tolerance values, is causing the type of the `x` attribute of the `OptimizeR...
@seberg I came up with many ways to convert a python scalar, NumPy scalar, or size 1 NumPy array to a NumPy scalar of the appropriate `dtype`. The simplest is probably: ```python3 x = np.atleast_1d(x)[0] ``` or ```python3 x = np.squeeze(x)[()] ``` but these take 10x as long on my machine as ```python3 x = np....
[ { "body": "### Describe your issue.\n\nExecuting an optimization of the same function through `optimize.minimize_scalar`, but with different bounds or tolerance values, is causing the type of the `x` attribute of the `OptimizeResult` object to change between executions.\r\n\r\nIn this example, the function retu...
09a2035a6c478bcac8a4e9cd330e28c0c42183f4
{ "head_commit": "231163756a18234426551c2b0de9567c32f99ccf", "head_commit_message": "MAINT: optimize.minimize_scalar: always return `x` as NumPy scalar", "patch_to_review": "diff --git a/scipy/optimize/_minimize.py b/scipy/optimize/_minimize.py\nindex 563fc2cfbea8..5b62b25769d9 100644\n--- a/scipy/optimize/_minim...
[ { "diff_hunk": "@@ -921,19 +921,22 @@ def minimize_scalar(fun, bracket=None, bounds=None, args=(),\n options['disp'] = 2 * int(disp)\n \n if meth == '_custom':\n- return method(fun, args=args, bracket=bracket, bounds=bounds, **options)\n+ res = method(fun, args=args, bracket=bracket, b...
7f20f9a20eab66817e8c9bc072be19a93d4171e9
diff --git a/scipy/optimize/_minimize.py b/scipy/optimize/_minimize.py index 563fc2cfbea8..c61b3bb58181 100644 --- a/scipy/optimize/_minimize.py +++ b/scipy/optimize/_minimize.py @@ -921,19 +921,26 @@ def minimize_scalar(fun, bracket=None, bounds=None, args=(), options['disp'] = 2 * int(disp) if meth ==...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "Performance Optimizations" }
scipy__scipy-17591@2948197
scipy/scipy
Python
17,591
MAINT: stats.pearsonr: raise error for complex input
In pearsonr rasie a ValueError for complex data. Unit test included to show the intended error. <!-- Thanks for contributing a pull request! Please ensure that your PR satisfies the checklist before submitting: http://scipy.github.io/devdocs/dev/contributor/development_workflow.html#checklist-before-submitting-...
2022-12-12T21:22:47Z
ENH: stats.pearsonr: support complex data ### Describe your issue. I create a numpy array full of complex numbers, and I compute the correlation of the array with itself. Instead of the expected output of R = 1, some other value is produced. ### Reproducing Code Example ```python import numpy as np import scipy.sta...
I encountered a similar problem in [xarray](https://github.com/pydata/xarray/issues/7340). One of the arrays needs to be conjugated before computing the dot product when computing covariance. Not much of scipy.stats appears to have been designed with complex data in mind, so I don't think this is a bug. I'll change the...
[ { "body": "### Describe your issue.\n\nI create a numpy array full of complex numbers, and I compute the correlation of the array with itself. Instead of the expected output of R = 1, some other value is produced.\n\n### Reproducing Code Example\n\n```python\nimport numpy as np\r\nimport scipy.stats\r\n\r\narra...
78608b7c7e26908bc54fe363360d5619b54b961c
{ "head_commit": "294819781c4db8a1852b0db9f330e257a42aae51", "head_commit_message": "ENH: stats.pearsonr: issue 17518\n\nIn pearsonr rasie a ValueError for complex data.\nUnit test included to show the intended error.", "patch_to_review": "diff --git a/scipy/stats/_stats_py.py b/scipy/stats/_stats_py.py\nindex 2d...
[ { "diff_hunk": "@@ -4413,6 +4413,9 @@ def pearsonr(x, y, *, alternative='two-sided'):\n x = np.asarray(x)\n y = np.asarray(y)\n \n+ if True in np.iscomplex(x) or True in np.iscomplex(y):", "line": null, "original_line": 4416, "original_start_line": null, "path": "scipy/stats/_stats_py...
49e1fc6bc24452b3ab01b0aab7f99380d1b9c62c
diff --git a/scipy/stats/_stats_py.py b/scipy/stats/_stats_py.py index 2dadadef0c8a..3f8a7713946b 100644 --- a/scipy/stats/_stats_py.py +++ b/scipy/stats/_stats_py.py @@ -4413,6 +4413,10 @@ def pearsonr(x, y, *, alternative='two-sided'): x = np.asarray(x) y = np.asarray(y) + if (np.issubdtype(x.dtype, np...
{ "difficulty": "low", "estimated_review_effort": 2, "problem_domain": "Bug Fixes" }
scipy__scipy-17704@89f864e
scipy/scipy
Python
17,704
MAINT: optimize.bracket: don't fail silently
#### Reference issue Closes gh-14858 #### What does this implement/fix? gh-14858 reported that `scipy.optimize.bracket` may silently return an invalid bracket, causing scalar minimization functions to fail. This PR resolves the issue by checking for failure before returning. It also begins to improve the function ...
2023-01-02T22:46:04Z
BUG: scipy.optimize.bracket sometimes fails silently ### Describe your issue. Sometimes scipy.optimize.bracket fails to find a bracket (e.g. see example below). Thats probably ok. There are some weird functions out there. But at least one of the following should probably be true - scipy.optimize.bracket should...
I think the problem is that `optimize.bracket` does not check the results whether the results satisfies " f(xa) > f(xb) < f(xc)" or not here. https://github.com/scipy/scipy/blob/47bb6febaa10658c72962b9615d5d5aa2513fa3a/scipy/optimize/optimize.py#L2661-L2667 I came up with two options to fix the issue: [Option 1]...
[ { "body": "### Describe your issue.\r\n\r\nSometimes scipy.optimize.bracket fails to find a bracket (e.g. see example below). Thats probably ok. There are some weird functions out there. But at least one of the following should probably be true\r\n\r\n- scipy.optimize.bracket should throw an exception if it ...
0e9f5c010100dedaa3f1c2f2ca0384fba53e4f62
{ "head_commit": "89f864ebda932085b6f596f39a06ffe219de2fdb", "head_commit_message": "MAINT: optimize.bracket: correct error condition, add Raises section to docs", "patch_to_review": "diff --git a/scipy/optimize/_minimize.py b/scipy/optimize/_minimize.py\nindex 04bb46e4f2dc..b2909a93b79a 100644\n--- a/scipy/optim...
[ { "diff_hunk": "@@ -2928,9 +2941,17 @@ def bracket(func, xa=0.0, xb=1.0, args=(), grow_limit=110.0, maxiter=1000):\n >>> plt.plot(xc, fc, \"bx\")\n >>> plt.show()\n \n+ Note that both initial points were to the right of the minimum, and the\n+ third point was found in the \"downhill\" direction: t...
2bb214b01399bb89093427009bc90fa3a2fb02e8
diff --git a/scipy/optimize/_minimize.py b/scipy/optimize/_minimize.py index 04bb46e4f2dc..8e4b174c6d81 100644 --- a/scipy/optimize/_minimize.py +++ b/scipy/optimize/_minimize.py @@ -19,7 +19,7 @@ _minimize_bfgs, _minimize_newtoncg, _minimize_scalar_brent, _minimize_sca...
{ "difficulty": "medium", "estimated_review_effort": 4, "problem_domain": "Bug Fixes" }
saleor__saleor-4524@c78fdd2
saleor/saleor
Python
4,524
Update JSON menu representation in mutations
Storefront 1.0 uses `json_content` fields to render menus in its HTML templates (to optimize rendering and not fetch the whole structure from the database every time). Those fields were however not updated when using API mutations. This PR introduces the following changes: - adds `update_menu` and `update_menus` ca...
2019-07-24T15:40:12Z
Cannot assign a page to a menu item (graphql) Cannot assign "<Page: About>": "MenuItem.category" must be a "Category" instance. ``` Traceback (most recent call last): File "/Users/mikail/Development/saleor-venv/lib/python3.7/site-packages/promise/promise.py", line 487, in _resolve_from_executor executor(res...
[ { "body": "Cannot assign \"<Page: About>\": \"MenuItem.category\" must be a \"Category\" instance.\r\n\r\n```\r\nTraceback (most recent call last):\r\n File \"/Users/mikail/Development/saleor-venv/lib/python3.7/site-packages/promise/promise.py\", line 487, in _resolve_from_executor\r\n executor(resolve, rej...
cf43e0e604c88a84606e8cc0fd6bee84bb660079
{ "head_commit": "c78fdd21fe6596a75a16a348d4af83c26cc4c83d", "head_commit_message": "Validate menu item ID in mutation", "patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex 15e79d68ec2..8851e8ba4f5 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -27,6 +27,8 @@ All notable, unreleased changes to...
[ { "diff_hunk": "@@ -26,3 +27,9 @@ class Meta:\n description = \"Deletes menu items.\"\n model = models.MenuItem\n permissions = (\"menu.manage_menus\",)\n+\n+ @classmethod\n+ def bulk_action(cls, queryset):\n+ menu_ids = set([item.menu_id for item in queryset])", "line":...
a801c56351da980729654f83b0c2264f30337fb7
diff --git a/CHANGELOG.md b/CHANGELOG.md index 15e79d68ec2..8851e8ba4f5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,8 @@ All notable, unreleased changes to this project will be documented in this file. - Changed license for artwork to CC-BY 4.0 - Fix rendering user avatar when it's null #4546 by @maarci...
{ "difficulty": "medium", "estimated_review_effort": 4, "problem_domain": "Bug Fixes" }
saleor__saleor-4617@9c2907b
saleor/saleor
Python
4,617
Refactor password recovery mutations
I want to merge this change because resolve #4153 <!-- Please mention all relevant issue numbers. --> ### Screenshots <!-- If your changes affect the UI, providing "before" and "after" screenshots will greatly reduce the amount of work needed to review your work. --> ### Pull Request Checklist <!-- Plea...
2019-08-08T12:47:08Z
Refactoring of password recovery system Proposed changes: - we don't have mutations for password recovery and account activation - mutation which reset password should also return JWT token so user don't need to pass login/password twice (usually after password change user want to access page) - for password recov...
> mutation for password reset should have url for recovery view as additional field - GraphQL API does not know how routing in PWA looks like so backend cant ATM attach valid URL ino emai I'm not sure what you mean there. Could you give more details about that? - backend currently act as GQL endpoint only, no other ...
[ { "body": "Proposed changes:\r\n\r\n- we don't have mutations for password recovery and account activation\r\n- mutation which reset password should also return JWT token so user don't need to pass login/password twice (usually after password change user want to access page)\r\n- for password recovery we are en...
1943069ece044de3412b5679a964174cdbb03eeb
{ "head_commit": "9c2907bff402b2ec7e114eaf7cbe7dbef5357ce9", "head_commit_message": "Changelog and graphql schema", "patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex fb273958faf..d7900565722 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -46,10 +46,11 @@ All notable, unreleased changes to th...
[ { "diff_hunk": "@@ -14,26 +16,23 @@\n from ...core.mutations import (\n BaseMutation,\n ClearMetaBaseMutation,\n+ CreateToken,\n ModelDeleteMutation,\n ModelMutation,\n UpdateMetaBaseMutation,\n+ validation_error_to_error_type,\n )\n \n BILLING_ADDRESS_FIELD = \"default_billing_address...
0331a93277406ec6ce055cf0d658509b44a1dd1b
diff --git a/CHANGELOG.md b/CHANGELOG.md index fb273958faf..d7900565722 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -46,10 +46,11 @@ All notable, unreleased changes to this project will be documented in this file. - Users cannot add multiple times the same product into a collection anymore - #4518 by @NyanKiyoshi ...
{ "difficulty": "medium", "estimated_review_effort": 4, "problem_domain": "Code Refactoring / Architectural Improvement" }
saleor__saleor-4542@4710afa
saleor/saleor
Python
4,542
Input UI changes
Resolves #4421 <!-- Please mention all relevant issue numbers. --> ### Screenshots <!-- If your changes affect the UI, providing "before" and "after" screenshots will greatly reduce the amount of work needed to review your work. --> ### Pull Request Checklist <!-- Please keep this section. It will make...
2019-07-26T17:56:24Z
Input UI changes Request: Changes to input UI and behaviour. We also need to change Checkbox UI. Reason: We need to make this changes to improve usability and readability of the UI. Changes can be seen on Figma - [ ] Inputs changed - [ ] Checkboxs changed
[ { "body": "Request: Changes to input UI and behaviour. We also need to change Checkbox UI.\r\n\r\nReason: We need to make this changes to improve usability and readability of the UI. Changes can be seen on Figma\r\n\r\n- [ ] Inputs changed\r\n- [ ] Checkboxs changed\r\n", "number": 4421, "title": "Input...
cf43e0e604c88a84606e8cc0fd6bee84bb660079
{ "head_commit": "4710afa3710f76b70a81432fdf3e61d15fd243ec", "head_commit_message": "Update changelog", "patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex 82251eae245..14a69ce955a 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -24,6 +24,7 @@ All notable, unreleased changes to this project wil...
[ { "diff_hunk": "@@ -122,16 +96,18 @@ const styles = (theme: Theme) =>\n \"& .Draftail\": {\n \"&-Editor\": {\n \"&--focus\": {\n- \"& .DraftEditor\": {\n- \"&-editorContainer\": {\n- \"&:after\": {\n- animationName: \"focus !importa...
6c97f990572b7e6286d1ab0c014b555b1e93c1d4
diff --git a/CHANGELOG.md b/CHANGELOG.md index 15e79d68ec2..41628137699 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,7 @@ All notable, unreleased changes to this project will be documented in this file. - Allow selecting the number of rows displayed in dashboard's list views - #4414 by @benekex2 - Fix ge...
{ "difficulty": "medium", "estimated_review_effort": 4, "problem_domain": "New Feature Additions" }
saleor__saleor-4573@e1507f3
saleor/saleor
Python
4,573
Disable shipping on checkout process when checkout is not shippable
- If shipping is not allowed/available on the current checkout: - `checkoutCreate` doesn't save the shipping address (no error); - `checkoutShippingMethodUpdate` now raises a validation error on the `shipping_method` field; - `checkoutShippingAddressUpdate` now raises a validation error on the `shipping_addres...
2019-07-31T09:15:27Z
Do not accept shipping address if no shipping is required We shouldn't allow the user to set a shipping address on digital orders. Cannot capture payments without order associated to them ### What I'm trying to achieve … ### Steps to reproduce the problem 1. Create a payment through `checkoutPaymentCreate` 2. Tr...
[ { "body": "We shouldn't allow the user to set a shipping address on digital orders.", "number": 4368, "title": "Do not accept shipping address if no shipping is required" }, { "body": "### What I'm trying to achieve\r\n…\r\n\r\n### Steps to reproduce the problem\r\n1. Create a payment through `c...
3a6fe51c068aca991331d6eb43317102ed68ed09
{ "head_commit": "e1507f36c3615e4d8dd63131a8f5b334a44d4b77", "head_commit_message": "Add prefetch over the passed variant during creation", "patch_to_review": "diff --git a/saleor/graphql/checkout/mutations.py b/saleor/graphql/checkout/mutations.py\nindex b1b6c5f9f86..132dfe8ec6c 100644\n--- a/saleor/graphql/chec...
[ { "diff_hunk": "@@ -193,23 +215,36 @@ def clean_input(cls, info, instance, data):\n return cleaned_input\n \n @classmethod\n- @transaction.atomic()\n- def save(cls, info, instance, cleaned_input):\n+ def save_addresses(\n+ cls,\n+ instance: models.Checkout,\n+ cleaned_i...
18d10ef764baf506923ceacd7108cf0cf8dc0c81
diff --git a/CHANGELOG.md b/CHANGELOG.md index cd75849b706..7211e13307d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -35,6 +35,7 @@ All notable, unreleased changes to this project will be documented in this file. - Display menu item form errors - #4551 by @dominik-zeglen - Add voucher settings - #4556 by @benekex2...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "Bug Fixes" }
scipy__scipy-17236@4bcc005
scipy/scipy
Python
17,236
stats/distributions: make rv_sample public, allow subclassing
#### Reference issue <!--Example: Closes gh-WXYZ.--> closes gh-8057 #### What does this implement/fix? <!--Please explain your changes.--> Expose `rv_sample` to the main stats namespace. Make it play ball with subclassing: previously, subclassing `rv_discrete(values=(..., ...))` was broken. With this PR, s...
2022-10-16T09:08:34Z
Subclass of scipy.stats.rv_discrete initiated with values throws an AttributeError on pmf method Subclass of `scipy.stats.rv_discrete` initiated with values (i.e `rv_sample`) throws an error if `pmf `method is called. The same without subclassing works fine. ### Reproducing code example: ``` from scipy import stat...
Can you share a use case where you need such a subclass? In general, I wanted to adjust the `rv_discrete` to do Bayesian statistics. In particular, I wanted to add a likelihood function, mixture etc. in a similar way that is described in the docs. That was a simple tinkering experiment and I understand that there are...
[ { "body": "Subclass of `scipy.stats.rv_discrete` initiated with values (i.e `rv_sample`) throws an error if `pmf `method is called. The same without subclassing works fine.\r\n\r\n### Reproducing code example:\r\n```\r\nfrom scipy import stats \r\n\r\nclass subc_rv_discrete(stats.rv_discrete):\r\n pass\r\n\r...
a082eb415192f3075921fbf3e539f2b82a53811e
{ "head_commit": "4bcc00505b0965ae5e4034268caa51ce5db88d7d", "head_commit_message": "MAINT: stats: rename rv_sample -> rv_count, add docstring", "patch_to_review": "diff --git a/scipy/stats/__init__.py b/scipy/stats/__init__.py\nindex ea8275fda544..153674b3c4a4 100644\n--- a/scipy/stats/__init__.py\n+++ b/scipy/s...
[ { "diff_hunk": "@@ -1054,7 +1054,7 @@ def rvs(self, *args, **kwds):\n self._random_state = random_state_saved\n \n # Cast to int if discrete\n- if discrete and not isinstance(self, rv_sample):\n+ if discrete and not isinstance(self, _rv_sample):", "line": null, "origina...
bd473df63b519e3c235132bfe1e0165cc231a341
diff --git a/scipy/stats/__init__.py b/scipy/stats/__init__.py index ea8275fda544..153674b3c4a4 100644 --- a/scipy/stats/__init__.py +++ b/scipy/stats/__init__.py @@ -40,6 +40,7 @@ rv_continuous rv_discrete + rv_count rv_histogram Continuous distributions @@ -481,6 +482,7 @@ from ._stats_py import *...
{ "difficulty": "medium", "estimated_review_effort": 4, "problem_domain": "Bug Fixes" }
saleor__saleor-4508@69bc9d9
saleor/saleor
Python
4,508
Contrast improvements
Closes #4419 Closes #4509 <!-- Please mention all relevant issue numbers. --> ### Screenshots <!-- If your changes affect the UI, providing "before" and "after" screenshots will greatly reduce the amount of work needed to review your work. --> ### Pull Request Checklist <!-- Please keep this section. I...
2019-07-23T08:42:44Z
Contrast Improvements Request: Change colors of the active elements in the UI. Those colors does not change in dark theme. Reason: After reviewing the dashboard I noticed that we need to make improvements on the colors that we use. I've made changes to the design and we need to implement those changes. Changes can b...
[ { "body": "Request: Change colors of the active elements in the UI. Those colors does not change in dark theme.\r\n\r\nReason: After reviewing the dashboard I noticed that we need to make improvements on the colors that we use. I've made changes to the design and we need to implement those changes. Changes can ...
633be78e3a542307728e889a2d7b67720b4a21f5
{ "head_commit": "69bc9d95ce19b629547858043be71845cebc74b7", "head_commit_message": "Fix avatar types", "patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex b46261b9de5..8550b21dab1 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -19,6 +19,7 @@ All notable, unreleased changes to this project wil...
[ { "diff_hunk": "@@ -12,7 +12,13 @@ const createShadow = (pv, pb, ps, uv, ub, us, av, ab, as) =>\n export const ICONBUTTON_SIZE = 48;\n \n export type IThemeColors = Record<\n- \"primary\" | \"secondary\" | \"error\" | \"paperBorder\" | \"autofill\",\n+ | \"primary\"\n+ | \"secondary\"\n+ | \"error\"\n+ | \...
52321896d644287d64df61af78ea0f95251812a8
diff --git a/CHANGELOG.md b/CHANGELOG.md index 3b43bbf66da..73feb01d053 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ All notable, unreleased changes to this project will be documented in this file. - Order is no longer created when the payment was unsuccessful in the API - #4500 by @NyanKiyoshi - Fi...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "Bug Fixes" }
scipy__scipy-17161@0e545b4
scipy/scipy
Python
17,161
MAINT: stats.sampling.NumericalInverseHermite: private distribution methods need at least 1d arrays
#### Reference issue Closes gh-17155 #### What does this implement/fix? This fixes gh-17155. #### Additional information I'm not sure if there are other implications of this change. Based on the code like: ```python3 if res < 0: return 0 ``` It looks like `res` is _always_ expected to have one e...
2022-10-06T19:44:39Z
BUG: stats: Bug in XSLOW tests in TestNumericalInverseHermite ### Describe your issue. When the environment variable `SCIPY_XSLOW` is set, I get two failures of a test in the `TestNumericalInverseHermite` test class. I am also use a development version of numpy (version `'1.24.0.dev0+837.g9c5a2b41c'`). Here's the ...
The existing distribution infrastructure usually ensures that the inputs to private (distribution-specific implementation) methods are at least 1d, but it is not perfectly consistent. This could be one of those cases, or perhaps NumericalInverseHermite is calling `_logcdf` directly and passing a 0d array? Fix looks sim...
[ { "body": "### Describe your issue.\n\nWhen the environment variable `SCIPY_XSLOW` is set, I get two failures of a test in the `TestNumericalInverseHermite` test class. I am also use a development version of numpy (version `'1.24.0.dev0+837.g9c5a2b41c'`).\r\n\r\nHere's the transcript of running just the `TestN...
a082eb415192f3075921fbf3e539f2b82a53811e
{ "head_commit": "0e545b40a2ec9cd85e21ddc17e3275262ad54238", "head_commit_message": "Merge branch 'main' into gh17155", "patch_to_review": "diff --git a/scipy/stats/_unuran/unuran_wrapper.pyx.templ b/scipy/stats/_unuran/unuran_wrapper.pyx.templ\nindex 1c44d681b273..90c1a79b3e32 100644\n--- a/scipy/stats/_unuran/u...
[ { "diff_hunk": "@@ -1005,10 +1005,8 @@ def test_inf_nan_domains(self, domain, err, msg):\n with pytest.raises(err, match=msg):\n NumericalInverseHermite(StandardNormal(), domain=domain)\n \n- @pytest.mark.filterwarnings('ignore::RuntimeWarning')\n- @pytest.mark.xslow\n- @pytest.mark...
6495d09603e5979b7400c1496ba5083834e73138
diff --git a/scipy/stats/_unuran/unuran_wrapper.pyx.templ b/scipy/stats/_unuran/unuran_wrapper.pyx.templ index 1c44d681b273..90c1a79b3e32 100644 --- a/scipy/stats/_unuran/unuran_wrapper.pyx.templ +++ b/scipy/stats/_unuran/unuran_wrapper.pyx.templ @@ -264,10 +264,10 @@ cdef dict _unpack_dist(object dist, str dist_type, ...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "Bug Fixes" }
scipy__scipy-17140@bfa96d5
scipy/scipy
Python
17,140
BUG: Fix issue with shgo not correctly passing jac to minimizer
Resolves [gh-12963](https://github.com/scipy/scipy/issues/12963) where `_minimize_slsqp()` could receive too many arguments.
2022-10-03T22:37:16Z
shgo is not correctly passing jac to minimizer I am getting the "_minimize_slsqp() got multiple values for argument 'jac' " error for my toy example below. Is this a bug in shgo or am I doing something wrong? Please advise if there is a workaround. ``` from scipy.optimize import shgo def objective(x): retu...
This appears to be a mistake in the documentation. The `jac` parameter should be passed in the `minimizer_kwargs` dictionary rather than int `options`. @Stefan-Endres would you like to make a fix? I think the `hess` parameter is also in the wrong place. Thank you for tagging me @pmla. You are right that passing t...
[ { "body": "I am getting the \"_minimize_slsqp() got multiple values for argument 'jac' \" error for my toy example below. Is this a bug in shgo or am I doing something wrong? Please advise if there is a workaround.\r\n\r\n```\r\nfrom scipy.optimize import shgo\r\n\r\ndef objective(x):\r\n return 3*x[0]*x[0]...
b4a970bf4eba1065ea31f8d0988cd4ec523a07d4
{ "head_commit": "bfa96d569cf517233f248d5f7f3d95cb2c53dee5", "head_commit_message": "MAINT: optimize.shgo: simplify changes", "patch_to_review": "diff --git a/scipy/optimize/_shgo.py b/scipy/optimize/_shgo.py\nindex 346cb57e520e..a4589e312b96 100644\n--- a/scipy/optimize/_shgo.py\n+++ b/scipy/optimize/_shgo.py\n@...
[ { "diff_hunk": "@@ -682,7 +683,14 @@ def init_options(self, options):\n None\n \n \"\"\"\n+ # Ensure that 'jac' and 'hess' are passed directly to `minimize` as\n+ # keywords, not as part of its 'options' dictionary\n+ self.minimizer_kwargs['jac'] = options.pop('jac', None)\n...
abd5b1df116bc5b3badef798076730d7a631c05d
diff --git a/scipy/optimize/_shgo.py b/scipy/optimize/_shgo.py index 346cb57e520e..fc922f9dd1ac 100644 --- a/scipy/optimize/_shgo.py +++ b/scipy/optimize/_shgo.py @@ -576,6 +576,7 @@ def __init__(self, func, bounds, args=(), constraints=None, n=None, 'trust-ncg': ['jac', 'hess', 'hessp'], 'tru...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "Bug Fixes" }
saleor__saleor-4494@169fb87
saleor/saleor
Python
4,494
Add mutation for deleting account
I want to merge this change because resolve #4286 <!-- Please mention all relevant issue numbers. --> ### Screenshots <!-- If your changes affect the UI, providing "before" and "after" screenshots will greatly reduce the amount of work needed to review your work. --> ### Pull Request Checklist <!-- Pl...
2019-07-18T12:01:27Z
Add mutation for removing user account ### What I'm trying to achieve As a user of storefront I would like to remove my account. Right now it is only possible for staff/admin user accounts ### Describe a proposed solution Add mutation for removing account by regular user
[ { "body": "### What I'm trying to achieve\r\nAs a user of storefront I would like to remove my account. Right now it is only possible for staff/admin user accounts\r\n\r\n### Describe a proposed solution\r\nAdd mutation for removing account by regular user\r\n\r\n", "number": 4286, "title": "Add mutatio...
abfcf33e172d68c342bf42c75d6171213c13d567
{ "head_commit": "169fb87c39d269069f44444bbfd4d4fd4b88a8e2", "head_commit_message": "Add graphql schema and changelog", "patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex 72693a82f3a..42f775ec61c 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -12,6 +12,7 @@ All notable, unreleased changes to ...
[ { "diff_hunk": "@@ -938,6 +938,41 @@ def test_logged_customer_update_anonymous_user(api_client, query):\n assert_no_permission(response)\n \n \n+ACCOUNT_DELETE_QUERY = \"\"\"\n+ mutation accountDelete {\n+ accountDelete {\n+ errors {\n+ field\n+ message\n+ ...
d849171ba41cfc1ccd038d631ef3d77bb281df67
diff --git a/CHANGELOG.md b/CHANGELOG.md index 72693a82f3a..42f775ec61c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ All notable, unreleased changes to this project will be documented in this file. - Fix voucher limit value when checkbox unchecked - #4456 by @benekex2 - New menu design - #4476 by @b...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "New Feature Additions" }
saleor__saleor-4656@240c7af
saleor/saleor
Python
4,656
Add mutation to change the authenticated user's password
I want to merge this change because resolve #4287 <!-- Please mention all relevant issue numbers. --> ### Screenshots <!-- If your changes affect the UI, providing "before" and "after" screenshots will greatly reduce the amount of work needed to review your work. --> ### Pull Request Checklist <!-- Ple...
2019-08-19T11:46:32Z
Add mutation to allow authenticated user to change password ### What I'm trying to achieve ~~I would like to use setPassword mutation for changing users password but I need one time token and there is no query right now for obtaining it.~~ ~~setPassword mutation receives: token String! - A one-time token requi...
@mateuszkula Operations like password reset require email confirmation. Flow to obtain the token in that case would be as follows: - users request an action (e.g. password reset, email change etc), - the server sends an email with a link containing an expirable token, - when users click the link they're redirected t...
[ { "body": "### What I'm trying to achieve\r\n~~I would like to use setPassword mutation for changing users password but I need one time token and there is no query right now for obtaining it.~~\r\n\r\n~~setPassword mutation receives:\r\n token String! - A one-time token required to set the password\r\n pa...
1f4c0e4e495dcf6a701eb2ce3bf9740c773c2968
{ "head_commit": "240c7af36f2a07d7079cb1f0f260f1e8dda58772", "head_commit_message": "Fix review remarks", "patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex 4bf78a3d9e5..cd80368f54c 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -52,6 +52,7 @@ All notable, unreleased changes to this project w...
[ { "diff_hunk": "@@ -114,6 +114,41 @@ def perform_mutation(cls, _root, info, **data):\n return RequestPasswordReset()\n \n \n+class PasswordChange(BaseMutation):\n+ user = graphene.Field(User, description=\"An user instance with new password.\")", "line": null, "original_line": 118, "origi...
0de9ed410338a0de3c7ca316a1333b6c7c4fdeba
diff --git a/CHANGELOG.md b/CHANGELOG.md index c451fa37c1e..0f9c01a3fb2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -53,6 +53,7 @@ All notable, unreleased changes to this project will be documented in this file. - Refactoring of password recovery system - #4617 by @fowczarek - Added capability to filter attribute...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "New Feature Additions" }
saleor__saleor-4447@a7210e7
saleor/saleor
Python
4,447
Create general abstraction for object metadata
Metadata is a convenient way of extending existing data model, both internally and externally. API clients, staff, plugins and integrations can use both private and public metadata fields to store useful context and not depend on service itself for data interpretation and business logic application. Recently _metadat...
2019-07-11T13:10:01Z
Create meta mixin for models ### What I'm trying to achieve Products has already been extended with metadata, now we add private meta field to _User_ model. More will surely come. ### Describe a proposed solution Generalize metadata into public and private fields introduced in dedicated mixin making to possible to...
[ { "body": "### What I'm trying to achieve\r\nProducts has already been extended with metadata, now we add private meta field to _User_ model. More will surely come.\r\n\r\n### Describe a proposed solution\r\nGeneralize metadata into public and private fields introduced in dedicated mixin making to possible to a...
9b0a3da21ec309cef1df57c8217308a458c3816d
{ "head_commit": "a7210e759df964bffc179e1159954a8c92600d86", "head_commit_message": "Fix permissions", "patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex b46261b9de5..2b06dd46a1a 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -19,6 +19,7 @@ All notable, unreleased changes to this project will...
[ { "diff_hunk": "@@ -132,16 +133,20 @@ def apply_taxes_to_shipping_price_range(\n def assign_tax_to_object_meta(obj: Union[\"Product\", \"ProductType\"], tax_code: str):\n if tax_code not in dict(TaxRateType.CHOICES):\n return\n- if not hasattr(obj, \"meta\"):\n+ if not hasattr(obj, \"private_m...
8c443b8e60d575b7ae08997e6f841827866f660e
diff --git a/CHANGELOG.md b/CHANGELOG.md index d98b9063bd1..3b43bbf66da 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ All notable, unreleased changes to this project will be documented in this file. - Do not allow random ids to appear in snapshots - #4495 by @dominik-zeglen - Order is no longer creat...
{ "difficulty": "medium", "estimated_review_effort": 4, "problem_domain": "New Feature Additions" }
scipy__scipy-16961@1da7155
scipy/scipy
Python
16,961
ENH: optimize: Add `nan_policy` optional argument for `curve_fit`.
<!-- Thanks for contributing a pull request! Please ensure that your PR satisfies the checklist before submitting: http://scipy.github.io/devdocs/dev/contributor/development_workflow.html#checklist-before-submitting-a-pr Also, please name and describe your PR as you would write a commit message: http://scipy.g...
2022-09-05T06:49:28Z
Ignore NaN with scipy.optimize.curve_fit Occasionally I need to fit data that's incomplete (missing values) or perform a fitting task over a grid of 3-D data, i.e. fitting M points for every NxN element, where one of the elements needs to be masked out or ignored. It may be a good feature to have a flag (or flags) t...
Makes sense, there have been issues with this before IIRC. Also there's gh-4777 which asks for nan/inf handling in `leastsq`. @rgommers I was specifically thinking about NaNs. I only mentioned infs because they’re called out in the documentation I read about the check for flag.
[ { "body": "Occasionally I need to fit data that's incomplete (missing values) or perform a fitting task over a grid of 3-D data, i.e. fitting M points for every NxN element, where one of the elements needs to be masked out or ignored.\r\n\r\nIt may be a good feature to have a flag (or flags) to curve_fit that t...
d5d04efa879f369cdc996efd60b7abb130ca7d17
{ "head_commit": "1da7155687008db74570402e4c4022fe0306a285", "head_commit_message": "ENH: optimize: remove for loop code based on review.", "patch_to_review": "diff --git a/scipy/optimize/_minpack_py.py b/scipy/optimize/_minpack_py.py\nindex 205acce8833f..49fc40948782 100644\n--- a/scipy/optimize/_minpack_py.py\n...
[ { "diff_hunk": "@@ -551,6 +551,73 @@ def test_NaN_handling(self):\n assert_raises(ValueError, curve_fit, lambda x, a, b: a*x + b,\n xdata, ydata, **{\"check_finite\": True})\n \n+ @staticmethod\n+ def _check_nan_policy(f, xdata_with_nan, xdata_without_nan,\n+ ...
64b88ae4dd062a096fb18ccdbf32ec57b57788d4
diff --git a/scipy/optimize/_minpack_py.py b/scipy/optimize/_minpack_py.py index 205acce8833f..49fc40948782 100644 --- a/scipy/optimize/_minpack_py.py +++ b/scipy/optimize/_minpack_py.py @@ -8,7 +8,7 @@ finfo, inexact, issubdtype, dtype) from scipy import linalg from scipy.linalg import svd, chole...
{ "difficulty": "medium", "estimated_review_effort": 4, "problem_domain": "New Feature Additions" }
scipy__scipy-16954@8992932
scipy/scipy
Python
16,954
MAINT: stats.mode: fix bug with `axis!=1`, `nan_policy='omit'`, `keepdims=False`
#### Reference issue Closes gh-16952 #### What does this implement/fix? gh-16952 reported a bug with `stats.mode` with `axis!=`, `nan_policy='omit'`, and `keepdims=False`. This fixes the bug.
2022-09-03T13:48:09Z
BUG: error from `scipy.stats.mode` with `NaN`s, `axis != 0`, `keepdims=False`, and `nan_policy="omit"` ### Describe your issue. `scipy.stats.mode` raises an error when called with a particular combination of arguments: * multidimensional `a` that has one or more `NaN` values * `axis` is not `0` * `keepdims=False`...
[ { "body": "### Describe your issue.\n\n`scipy.stats.mode` raises an error when called with a particular combination of arguments:\r\n\r\n* multidimensional `a` that has one or more `NaN` values\r\n* `axis` is not `0`\r\n* `keepdims=False`\r\n* `nan_policy=\"omit\"`\r\n\r\nThe error seems to be specific to this ...
0e6e501b90a03a8b7cf54d4d9f39b595c4a67768
{ "head_commit": "89929329b72a952a25c20beda05df41db3923792", "head_commit_message": "MAINT: stats.mode: fix bug with axis!=1, nan_policy='omit', keepdims=False", "patch_to_review": "diff --git a/scipy/stats/_mstats_basic.py b/scipy/stats/_mstats_basic.py\nindex 069983485b4e..e912a8a29688 100644\n--- a/scipy/stats...
[ { "diff_hunk": "@@ -340,6 +340,7 @@ def _mode1D(a):\n else:\n output = ma.apply_along_axis(_mode1D, axis, a)\n if keepdims is None or keepdims:\n+ np.moveaxis(a, -1, axis)", "line": null, "original_line": 343, "original_start_line": null, "path": "scipy/stats/_msta...
3b97f42cb1bc174b4c45ed31f937ded150040030
diff --git a/scipy/stats/_mstats_basic.py b/scipy/stats/_mstats_basic.py index 069983485b4e..a1a0bbf623a8 100644 --- a/scipy/stats/_mstats_basic.py +++ b/scipy/stats/_mstats_basic.py @@ -348,6 +348,8 @@ def _mode1D(a): slices[axis] = 1 counts = output[tuple(slices)].reshape(newshape) ...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "Bug Fixes" }
scipy__scipy-16940@2240baf
scipy/scipy
Python
16,940
DOC: Documentation note update for truncnorm
<!-- Thanks for contributing a pull request! Please ensure that your PR satisfies the checklist before submitting: http://scipy.github.io/devdocs/dev/contributor/development_workflow.html#checklist-before-submitting-a-pr Also, please name and describe your PR as you would write a commit message: http://scipy...
2022-08-31T12:34:12Z
BUG: documentation of scipy.stats.truncnorm could be clearer ### Describe your issue. In the notes of the distribution, it states: > The standard form of this distribution is a standard normal truncated to the range [a, b], where a and b are user-provided shape parameters. The parameter loc shifts the mean of the u...
We did some work on that message, but I agree - we still didn't get it right. I think your phrasing is great - I really like that it's put in terms of standard deviations, since I think is something newcomers will understand better than "scale". I'd just trim some of the parts I think can be left unstated. > Th...
[ { "body": "### Describe your issue.\n\nIn the notes of the distribution, it states:\r\n\r\n> The standard form of this distribution is a standard normal truncated to the range [a, b], where a and b are user-provided shape parameters. The parameter loc shifts the mean of the underlying normal distribution, and s...
f48e1d2532aca1bcdb67b38d11be8356e6f446c3
{ "head_commit": "2240baf4dd727b31aeaa16c481d55b786d99f590", "head_commit_message": "Cleaned up spacing.", "patch_to_review": "diff --git a/scipy/stats/_continuous_distns.py b/scipy/stats/_continuous_distns.py\nindex 65f2bba06376..d0222cb2407d 100644\n--- a/scipy/stats/_continuous_distns.py\n+++ b/scipy/stats/_co...
[ { "diff_hunk": "@@ -8402,14 +8402,12 @@ class truncnorm_gen(rv_continuous):\n \n Notes\n -----\n- The standard form of this distribution is a standard normal truncated to\n- the range ``[a, b]``, where ``a`` and ``b`` are user-provided shape\n- parameters. The parameter ``loc`` shifts the mean ...
db3adca9e15993fa9f8253facccb100b177eeef5
diff --git a/scipy/stats/_continuous_distns.py b/scipy/stats/_continuous_distns.py index 65f2bba06376..ccbc8a341592 100644 --- a/scipy/stats/_continuous_distns.py +++ b/scipy/stats/_continuous_distns.py @@ -8402,14 +8402,12 @@ class truncnorm_gen(rv_continuous): Notes ----- - The standard form of this di...
{ "difficulty": "low", "estimated_review_effort": 1, "problem_domain": "Documentation Updates" }
saleor__saleor-4427@e5c79f0
saleor/saleor
Python
4,427
Add minimal quantity of products for voucher
I want to merge this change because resolve #4316 and fix #4379 ### Screenshots <!-- If your changes affect the UI, providing "before" and "after" screenshots will greatly reduce the amount of work needed to review your work. --> ### Pull Request Checklist <!-- Please keep this section. It will make m...
2019-07-09T09:56:46Z
Minimal quantity of products for voucher I would like to be able to set the minimum number of products before using the voucher. Using voucher with on going sales on specific product isn't working properly Percentage specific product vouchers don't give the correct percent if there are items in the sale.
[ { "body": "I would like to be able to set the minimum number of products before using the voucher.", "number": 4316, "title": "Minimal quantity of products for voucher" }, { "body": "Percentage specific product vouchers don't give the correct percent if there are items in the sale. ", "numbe...
d5282637b518869d24c8b54a5179fb531500e92d
{ "head_commit": "e5c79f04b307552c23b112b75cbd2434cf993684", "head_commit_message": "Add specific product voucher amonut calculation with sale", "patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex cbe96982b4b..f8bd258dbd0 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -19,6 +19,7 @@ All notabl...
[ { "diff_hunk": "@@ -791,7 +792,12 @@ def _get_products_voucher_discount(checkout, voucher):\n \"Voucher not applicable\", \"This offer is only valid for selected items.\"\n )\n raise NotApplicable(msg)\n- return get_products_voucher_discount(voucher, prices)\n+ return get_produ...
f6a298bbcda059ace60cb0bc2925574856540a96
diff --git a/CHANGELOG.md b/CHANGELOG.md index cbe96982b4b..f8bd258dbd0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ All notable, unreleased changes to this project will be documented in this file. - Improve vouchers ui - #4362 by @benekex2 - Fix for random failing tests in test_discount - #4401 by ...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "Bug Fixes" }
scipy__scipy-17062@2b1b089
scipy/scipy
Python
17,062
Add location and sign to KS test result
#### Reference issue Aims to close #9389 #### What does this implement/fix? Moves the result of Kolmogorov-Smirnov tests (1 or 2 samples) to a "tuple bunch" with two additional attributes: - `statistic_location` indicating at what value of the stochastic variable (approximately) the maximal distance in CDF is rea...
2022-09-20T23:04:25Z
Kolmogorov Smirnov 2 samples returning max distance location [Enhancement] <!-- Thank you for taking the time to report a SciPy issue. Please describe the issue in detail, and for bug reports fill in the fields below. You can delete the sections that don't apply to your issue. You can view the final output by cl...
I thought this suggestion is very useful to know the index at maxima. If this idea put it in `scipy.stats.mstats.ks_twosamp()`, the return variable will be increased by 3(ks value, p-value, index at maxima). If you do not mind, I would like to take this issue. While I see the point that this information can be help...
[ { "body": "<!-- \r\nThank you for taking the time to report a SciPy issue.\r\nPlease describe the issue in detail, and for bug reports\r\nfill in the fields below. You can delete the sections that \r\ndon't apply to your issue. You can view the final output\r\nby clicking the preview button above.\r\n-->\r\n\r\...
d00c69c13769f7dcbf171407b61c90a3dcf21781
{ "head_commit": "2b1b08981e4af470d39ba22ccfae7f35ad8160c3", "head_commit_message": "Add location and sign to KS test result", "patch_to_review": "diff --git a/scipy/stats/_stats_py.py b/scipy/stats/_stats_py.py\nindex 6446a3140a9b..159496b875cd 100644\n--- a/scipy/stats/_stats_py.py\n+++ b/scipy/stats/_stats_py....
[ { "diff_hunk": "@@ -8098,7 +8167,7 @@ def ks_2samp(data1, data2, alternative='two-sided', method='auto'):\n prob = np.exp(expt)\n \n prob = np.clip(prob, 0, 1)\n- return KstestResult(d, prob)\n+ return KstestResult(d, prob, statistic_location=d_location, statistic_sign=d_sign)", "line"...
65adb86772a4d6b938c86edc5d06b6321392c851
diff --git a/scipy/stats/_stats_py.py b/scipy/stats/_stats_py.py index 6f528244b667..a26a48bba66b 100644 --- a/scipy/stats/_stats_py.py +++ b/scipy/stats/_stats_py.py @@ -7549,40 +7549,55 @@ def chisquare(f_obs, f_exp=None, ddof=0, axis=0): lambda_="pearson") -KstestResult = namedtuple(...
{ "difficulty": "medium", "estimated_review_effort": 4, "problem_domain": "New Feature Additions" }
scipy__scipy-16936@f227e96
scipy/scipy
Python
16,936
BUG: sparse: fix argmin/argmax when all entries are nonzero
#### Reference issue Fixes gh-16929. #### What does this implement/fix? The special case for "all nonzeros" was incorrect, returning the flat index of the `data` array instead of the sparse matrix itself. See the linked issue for examples.
2022-08-31T01:08:48Z
BUG: `scipy.sparse.csc_matrix.argmin` returns wrong values ### Describe your issue. `scipy.sparse.csc_matrix.argmin` seems to return wrong value when all elements are positive. ### Reproducing Code Example ```python >>> import scipy >>> x = scipy.sparse.coo_matrix(([1, 0.1, 1, 1], ([0, 0, 1, 1], [0, 1, 0, 1])), sha...
Thanks for the report, @asi1024. Here are a few more examples: ``` In [75]: a = csc_matrix([[3, 4, 1], [10, 2, 9]]) In [76]: a.A Out[76]: array([[ 3, 4, 1], [10, 2, 9]]) In [77]: a.argmin() # Should be 2 Out[77]: 4 In [78]: a.A.argmin() Out[78]: 2 ``` ``` In [79]: b = csr_matrix([[3, ...
[ { "body": "### Describe your issue.\n\n`scipy.sparse.csc_matrix.argmin` seems to return wrong value when all elements are positive.\n\n### Reproducing Code Example\n\n```python\n>>> import scipy\r\n>>> x = scipy.sparse.coo_matrix(([1, 0.1, 1, 1], ([0, 0, 1, 1], [0, 1, 0, 1])), shape=(2, 2)).tocsc()\r\n>>> x.tod...
79f5cd1ec0a1ba37ad4c295dedb5543d368be438
{ "head_commit": "f227e96e835fe4c6346ea0e993a11e996204ccfe", "head_commit_message": "Change COO.sum_duplicates to produce a \"C-ordered\" result\n\nPreviously, we were sorting the indices in column-major order, which meant that the linearized form would _not_ be sorted.", "patch_to_review": "diff --git a/scipy/sp...
[ { "diff_hunk": "@@ -261,37 +261,37 @@ def _arg_min_or_max(self, axis, out, op, compare):\n \n validateaxis(axis)\n \n- if axis is None:\n- if 0 in self.shape:\n- raise ValueError(\"Can't apply the operation to \"\n- \"an empty matrix.\")\n...
51884c6abd049c4c1236355a29aa2e0f0ac5b199
diff --git a/scipy/sparse/_coo.py b/scipy/sparse/_coo.py index 371329e069c3..e6c4e160fc8d 100644 --- a/scipy/sparse/_coo.py +++ b/scipy/sparse/_coo.py @@ -533,7 +533,10 @@ def _sum_duplicates(self, row, col, data): # Assumes (data, row, col) not in canonical format. if len(data) == 0: ret...
{ "difficulty": "medium", "estimated_review_effort": 4, "problem_domain": "Bug Fixes" }
scipy__scipy-16705@af17eab
scipy/scipy
Python
16,705
MAINT: add `__bool__` method to spatial.transform.Rotation
<!-- Thanks for contributing a pull request! Please ensure that your PR satisfies the checklist before submitting: http://scipy.github.io/devdocs/dev/contributor/development_workflow.html#checklist-before-submitting-a-pr Also, please name and describe your PR as you would write a commit message: http://scipy.g...
2022-07-26T18:28:15Z
BUG: `bool(rotation)` leads to error ### Describe your issue. Maybe it's undefined behavior, but calling `bool` on an instance of `scipy.spatial.transform.Rotation` yields an unclear error. Perhaps any identity rotations could be Falsy, and anything else be truthy? (That's also why I tried `bool` on it) ### Reprod...
Apologies for the tag churn; this is in fact a defect. At least in Python 3.6 and scipy 1.4.1, `bool(some_rotation)` used to unconditionally return `True` without error. Now, it will return `True` in some cases but not others. Did something change in Python's `bool()` semantics since 3.6? Or Cython's code generation...
[ { "body": "### Describe your issue.\n\nMaybe it's undefined behavior, but calling `bool` on an instance of `scipy.spatial.transform.Rotation` yields an unclear error.\r\n\r\nPerhaps any identity rotations could be Falsy, and anything else be truthy? (That's also why I tried `bool` on it)\n\n### Reproducing Code...
7ed8128f86dadf9a9a912f0699576dbeadb02638
{ "head_commit": "af17eabaa524197db10f047332a9e41e62c4e5d1", "head_commit_message": "DOC: accept review comment by shortening docstring\r\n\r\n[skip github] [skip azp]\n\nCo-authored-by: Fabian Egli <fabianegli@users.noreply.github.com>", "patch_to_review": "diff --git a/scipy/spatial/transform/_rotation.pyx b/sc...
[ { "diff_hunk": "@@ -545,6 +545,14 @@ cdef class Rotation:\n \"\"\"Whether this instance represents a single rotation.\"\"\"\n return self._single\n \n+ @staticmethod\n+ def __bool__():", "line": null, "original_line": 549, "original_start_line": 548, "path": "scipy/spatial/...
49e5f8d0d1f47f4334327c3b1f734f4ab27b946c
diff --git a/scipy/spatial/transform/_rotation.pyx b/scipy/spatial/transform/_rotation.pyx index 860902892e3a..e1c585909ffa 100644 --- a/scipy/spatial/transform/_rotation.pyx +++ b/scipy/spatial/transform/_rotation.pyx @@ -545,6 +545,13 @@ cdef class Rotation: """Whether this instance represents a single rotat...
{ "difficulty": "low", "estimated_review_effort": 2, "problem_domain": "Bug Fixes" }
scipy__scipy-16613@c6456c5
scipy/scipy
Python
16,613
BUG Enables find_peaks to work on read-only data
<!-- Thanks for contributing a pull request! Please ensure that your PR satisfies the checklist before submitting: http://scipy.github.io/devdocs/dev/contributor/development_workflow.html#checklist-before-submitting-a-pr Also, please name and describe your PR as you would write a commit message: http://scipy.g...
2022-07-16T14:43:57Z
BUG: find_peaks() fails if x.flags.writable = False ### Describe your issue. If the writable flag has been set to False on a np.array, then find_peaks() fails with a ValueError: buffer source array is read-only. It seems that the View.MemoryView functions require writable arrays, but then why are they called "View...
Indeed, we should use `const` to indicate that read-only arrays are permissible since the function doesn't actually write back into the input array. [This feature](https://cython.readthedocs.io/en/latest/src/userguide/memoryviews.html#read-only-views) isn't exactly _new_ to Cython, but I expect that it didn't exist at ...
[ { "body": "### Describe your issue.\n\nIf the writable flag has been set to False on a np.array, then find_peaks() fails with a ValueError: buffer source array is read-only.\r\n \r\nIt seems that the View.MemoryView functions require writable arrays, but then why are they called \"View\"?\r\n\n\n### Reproducing...
0bb3a79eb5258012f11caf601a5460bba9851b46
{ "head_commit": "c6456c58a53d8cddf8487fa85dd9f47acd448a52", "head_commit_message": "CLN Better variable name", "patch_to_review": "diff --git a/scipy/signal/_peak_finding_utils.pyx b/scipy/signal/_peak_finding_utils.pyx\nindex 4a523f135ca2..60cef5736bf3 100644\n--- a/scipy/signal/_peak_finding_utils.pyx\n+++ b/s...
[ { "diff_hunk": "@@ -770,6 +770,26 @@ def test_wlen_smaller_plateau(self):\n for key in (\"left_bases\", \"right_bases\", \"left_ips\", \"right_ips\"):\n assert_equal(props[key], peaks)\n \n+ @pytest.mark.parametrize(\"kwargs\", [\n+ {},\n+ {\"distance\": 3.0},\n+ {\"p...
ad2824bb487c8cdd7fccb6783e9e8970c7763c38
diff --git a/scipy/signal/_peak_finding_utils.pyx b/scipy/signal/_peak_finding_utils.pyx index 4a523f135ca2..60cef5736bf3 100644 --- a/scipy/signal/_peak_finding_utils.pyx +++ b/scipy/signal/_peak_finding_utils.pyx @@ -17,7 +17,7 @@ __all__ = ['_local_maxima_1d', '_select_by_peak_distance', '_peak_prominences', ...
{ "difficulty": "low", "estimated_review_effort": 2, "problem_domain": "Bug Fixes" }
scipy__scipy-16776@6b1d254
scipy/scipy
Python
16,776
BUG: Set nperseg size to the size of an already-initialized window on periodogram
<!-- Thanks for contributing a pull request! Please ensure that your PR satisfies the checklist before submitting: http://scipy.github.io/devdocs/dev/contributor/development_workflow.html#checklist-before-submitting-a-pr Also, please name and describe your PR as you would write a commit message: http://scipy.g...
2022-08-04T17:41:28Z
BUG: scipy.signal.periodogram window parameter ### Describe your issue. When trying to pass an array as the `window` for scipy's periodogram, the behavior is inconsistent with the documentation. In the doc it says: *window : str or tuple or array_like, optional Desired window to use. If `window` is a string or...
Thanks for the bug report @tensionhead > I guess it's intended use is for windows precisely the size of the signal `x`. Yes, I believe that is correct. This is also what ends up happening under the hood when you give a string name for the window (e.g., `'hann'`). In `periodogram`, `nperseg` is set to the length...
[ { "body": "### Describe your issue.\r\n\r\nWhen trying to pass an array as the `window` for scipy's periodogram, the behavior is inconsistent with the documentation. In the doc it says:\r\n*window : str or tuple or array_like, optional\r\n Desired window to use. If `window` is a string or tuple, it is\r\n ...
8bcfdf7ef7c8f3fe5c8c5538ebac13aed075e053
{ "head_commit": "6b1d2544b6a4f894fcb33e31948be83329f595e1", "head_commit_message": "FIX: Compare the size of the window w.r.t the input\n\nRaises an exception if necessary", "patch_to_review": "diff --git a/scipy/signal/_spectral_py.py b/scipy/signal/_spectral_py.py\nindex d5bfe01c82c4..ec9b4da4855a 100644\n--- ...
[ { "diff_hunk": "@@ -267,6 +269,12 @@ def periodogram(x, fs=1.0, window='boxcar', nfft=None, detrend='constant',\n \n if window is None:\n window = 'boxcar'\n+ elif hasattr(window, 'size'):\n+ axis_size = x.shape[axis]\n+ window_size = window.size\n+ if window_size != axis_siz...
2015b5767fafafd6b6826b07ae18a2a85d1f395f
diff --git a/scipy/signal/_spectral_py.py b/scipy/signal/_spectral_py.py index d5bfe01c82c4..6dce42bb08ef 100644 --- a/scipy/signal/_spectral_py.py +++ b/scipy/signal/_spectral_py.py @@ -169,7 +169,8 @@ def periodogram(x, fs=1.0, window='boxcar', nfft=None, detrend='constant', passed to `get_window` to generat...
{ "difficulty": "low", "estimated_review_effort": 3, "problem_domain": "Bug Fixes" }
scipy__scipy-17924@34af547
scipy/scipy
Python
17,924
ENH: sparse.linalg: speed up `spsolve_triangular`
<!-- Thanks for contributing a pull request! Please ensure that your PR satisfies the checklist before submitting: http://scipy.github.io/devdocs/dev/contributor/development_workflow.html#checklist-before-submitting-a-pr Also, please name and describe your PR as you would write a commit message: http://scipy.g...
2023-02-03T17:32:01Z
BUG: spsolve_triangular is way slower than spsolve ### Describe your issue. Hi! I used `spsolve_trianguar` in a project and noticed that is is really slow. Then I compared it to the generic `spsolve` method and this one is indeed a lot faster. I created a mini program that simply solves `Ax=b` for an identity matrix...
~~I think this is a duplicate of gh-10722. Do you agree @pjaap?~~ Never mind! This is the sparse version of that issue.
[ { "body": "### Describe your issue.\n\nHi! \r\nI used `spsolve_trianguar` in a project and noticed that is is really slow. Then I compared it to the generic `spsolve` method and this one is indeed a lot faster. I created a mini program that simply solves `Ax=b` for an identity matrix `A` and a zero vector `b`\r...
1ba35d1c4f66d82e0d395cf086e2212c06d8852d
{ "head_commit": "34af5470a5aafbcfd8c1d8af42c24e1e3ff0c5c8", "head_commit_message": "ENH: spsolve_triangular raises LinAlgError\n\ninstead of warning when the matrix is singular.\n\nCo-authored-by: Jake Bowhay <60778417+j-bowhay@users.noreply.github.com>", "patch_to_review": "diff --git a/scipy/sparse/linalg/_dso...
[ { "diff_hunk": "@@ -774,29 +774,33 @@ def test_input_types(self):\n @pytest.mark.timeout(120) # prerelease_deps_coverage_64bit_blas job\n @sup_sparse_efficiency\n def test_random(self):\n- def random_triangle_matrix(n, lower=True):\n- A = scipy.sparse.random(n, n, density=0.1, for...
eac2cfefcdcb483294bb809466d4891c596fd34b
diff --git a/benchmarks/benchmarks/sparse_linalg_spsolve_triangular.py b/benchmarks/benchmarks/sparse_linalg_spsolve_triangular.py new file mode 100644 index 000000000000..be5feb66388c --- /dev/null +++ b/benchmarks/benchmarks/sparse_linalg_spsolve_triangular.py @@ -0,0 +1,47 @@ +""" +Check the speed of the sparse tria...
{ "difficulty": "medium", "estimated_review_effort": 4, "problem_domain": "Bug Fixes" }
scipy__scipy-16508@3d7cf12
scipy/scipy
Python
16,508
BUG/ENH: handle spline interpolation methods in `interpn` and fix bug for trailing dimensions
<!-- Thanks for contributing a pull request! Please ensure that your PR satisfies the checklist before submitting: http://scipy.github.io/devdocs/dev/contributor/development_workflow.html#checklist-before-submitting-a-pr Also, please name and describe your PR as you would write a commit message: http://scipy.g...
2022-06-30T21:36:20Z
handle spline interpolation methods in `interpn` As long as `interpn` is (mostly) a convenience wrapper over RegularGridInterpolator, it may make sense for it to grow support for new `cubic`, `quintic` and `pchip` modes which were added for 1.9.0. Currently it only supports `nearest` and `linear` modes of RGI, plus ...
Good point. Looking at the doc we could make a top section with these wrapper: `interp1d`, `interpn` and `griddata` (which could be also extended to take `RBFInterpolator` by the way). (Also not clear if we have such wrapper for splines). It would make it clearer for end users which are looking for an easy on the shelf...
[ { "body": "As long as `interpn` is (mostly) a convenience wrapper over RegularGridInterpolator, it may make sense for it to grow support for new `cubic`, `quintic` and `pchip` modes which were added for 1.9.0.\r\n\r\nCurrently it only supports `nearest` and `linear` modes of RGI, plus `splinef2d` which should p...
0a1778310072d7a6aeef1be3d68f5479c6b92bfe
{ "head_commit": "3d7cf1201e795950a0c3e437ccf08503237384eb", "head_commit_message": "TST: use rng not seed", "patch_to_review": "diff --git a/scipy/interpolate/_rgi.py b/scipy/interpolate/_rgi.py\nindex c774cb3247f9..e5d40930d223 100644\n--- a/scipy/interpolate/_rgi.py\n+++ b/scipy/interpolate/_rgi.py\n@@ -268,9 ...
[ { "diff_hunk": "@@ -484,6 +482,71 @@ def test_fill_value(self, method):\n method=method, bounds_error=False)\n assert np.isnan(interp([10]))\n \n+ @parametrize_rgi_interp_methods\n+ def test_nonscalar_values(self, method):\n+ # Verify that non-scalar...
97f7f2aa5f705189a9b3c398c47dc4c19a42eca3
diff --git a/scipy/interpolate/_rgi.py b/scipy/interpolate/_rgi.py index c774cb3247f9..e5d40930d223 100644 --- a/scipy/interpolate/_rgi.py +++ b/scipy/interpolate/_rgi.py @@ -268,9 +268,15 @@ def __call__(self, xi, method=None): xi : ndarray of shape (..., ndim) The coordinates to evaluate the int...
{ "difficulty": "medium", "estimated_review_effort": 4, "problem_domain": "New Feature Additions" }
scipy__scipy-16460@4690710
scipy/scipy
Python
16,460
Fix ttest permutations
<!-- Thanks for contributing a pull request! Please ensure that your PR satisfies the checklist before submitting: http://scipy.github.io/devdocs/dev/contributor/development_workflow.html#checklist-before-submitting-a-pr Also, please name and describe your PR as you would write a commit message: http://scipy.g...
2022-06-23T09:49:45Z
BUG: stats.ttest_ind returns wrong p-values with permutations ### Describe your issue. When running the two-sample t-test with permutations we do not make any assumptions about the distributions. A user would reject the two-sample null hypothesis when obtaining a p-value smaller or equal to their significance level a...
@mortonjt maybe you can have a look here. I think you committed the original code. This is correct in `stats.permutation_test`. References that support the need to add +1 in the numerator and denominator for randomized tests are [2] and [3] of the [documentation](https://docs.scipy.org/doc//scipy/reference/generated/s...
[ { "body": "### Describe your issue.\n\nWhen running the two-sample t-test with permutations we do not make any assumptions about the distributions.\r\nA user would reject the two-sample null hypothesis when obtaining a p-value smaller or equal to their significance level and we should **guarantee** that under t...
b4857872e7ccbcfa86ad06e001c10334843dc0b7
{ "head_commit": "4690710979013671b6cabc5a2e793fd5c25a9988", "head_commit_message": "STY: stats.ttest_ind: fix PEP8 lines too long in tests", "patch_to_review": "diff --git a/scipy/stats/_stats_py.py b/scipy/stats/_stats_py.py\nindex 5cb0cb8e83b7..b008f282111c 100644\n--- a/scipy/stats/_stats_py.py\n+++ b/scipy/s...
[ { "diff_hunk": "@@ -6771,7 +6771,10 @@ def _permutation_ttest(a, b, permutations, axis=0, equal_var=True,\n \n # Calculate the p-values\n cmps = compare[alternative](t_stat, t_stat_observed)\n- pvalues = cmps.sum(axis=0) / permutations\n+ if n_max > permutations:\n+ pvalues = (cmps.sum(axis...
32785b914ab5d44466e00ca77004812ebc499ca3
diff --git a/scipy/stats/_stats_py.py b/scipy/stats/_stats_py.py index 5cb0cb8e83b7..0a9d67ca87be 100644 --- a/scipy/stats/_stats_py.py +++ b/scipy/stats/_stats_py.py @@ -6522,7 +6522,7 @@ def ttest_ind(a, b, axis=0, equal_var=True, nan_policy='propagate', >>> stats.ttest_ind(rvs1, rvs5, permutations=10000, ...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "Bug Fixes" }
saleor__saleor-4204@f639ef6
saleor/saleor
Python
4,204
Add database query count tests for API
Closes #3946. ### Screenshots <!-- If your changes affect the UI, providing "before" and "after" screenshots will greatly reduce the amount of work needed to review your work. --> ### Pull Request Checklist <!-- Please keep this section. It will make maintainer's life easier. --> 1. [ ] Privileged views...
2019-06-04T17:10:39Z
Tests for counting db queries in GraphQL queries and mutations ### What I'm trying to achieve I want to have some tests that will give me a better perspective for usage of DB queries under graphql API. Now we don't have any information about numbers of queries hitting DB. Most of the fields have optimization but even...
Do you have an idea on how we would check if the query was performed in a correct number of queries? Would we check that the number of queries is lower than a given number? If so, how would we determine the way to do so? Anyway, there are two available fixtures: - `django_assert_num_queries`; - `django_assert_max_...
[ { "body": "### What I'm trying to achieve\r\nI want to have some tests that will give me a better perspective for usage of DB queries under graphql API. Now we don't have any information about numbers of queries hitting DB. Most of the fields have optimization but even this I would like to have explicit logic ...
c71c666eac04856c17645cbf53c4de98ada3ca0c
{ "head_commit": "f639ef649ce821f289250feff3480b28f98804b4", "head_commit_message": "Add database query count tests for homepage and checkout", "patch_to_review": "diff --git a/tests/api/test_checkout_bench.py b/tests/api/test_checkout_bench.py\nnew file mode 100644\nindex 00000000000..9acd0508099\n--- /dev/null\...
[ { "diff_hunk": "@@ -0,0 +1,602 @@\n+import pytest\n+from django.conf import settings\n+from graphene import Node\n+\n+from saleor.checkout.utils import add_variant_to_checkout\n+from saleor.payment import ChargeStatus, TransactionKind\n+from saleor.payment.models import Payment\n+from tests.api.utils import get...
fb43fec6972ae80647da44a528cd4dab8d97a260
diff --git a/.gitignore b/.gitignore index c5190bdbc7b..aa600426151 100644 --- a/.gitignore +++ b/.gitignore @@ -35,3 +35,6 @@ dist/ webpack-bundle.json /templates/templated_email/compiled/* !/templates/templated_email/compiled/.gitkeep + +# Exported results file +django-queries-results.html diff --git a/.travis.yml...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "Test Suite / CI Enhancements" }
saleor__saleor-4195@38e4333
saleor/saleor
Python
4,195
Add ability to store payment source
Adds ability to store credit card information on payment. Closes #2700 This PR introduces: - new private meta field for user to store external data, ex. gateway information - new interface for extending parameters for client token generation, ex. braintree token for existing customer - new flag in CheckoutCom...
2019-05-31T10:57:04Z
Ability to store credit card for further usage Most of the payment providers allow storing tokenized credit card data in a secure way for further transactions. So after the first transaction, the customer doesn't have to enter credit card details again but just selects stored card from a list. - [ ] Adapt payment g...
Good news everyone, we are going forward! We discussed how it should work: - we should not save Card details in our db - gateways nowadays provide extra features like automatic card update after exp. date. So we need to pull saved cards directly from the provider - User model needs hstore field for keeping externa...
[ { "body": "Most of the payment providers allow storing tokenized credit card data in a secure way for further transactions.\r\nSo after the first transaction, the customer doesn't have to enter credit card details again but just selects stored card from a list.\r\n\r\n- [ ] Adapt payment gateways interface to s...
d5282637b518869d24c8b54a5179fb531500e92d
{ "head_commit": "38e4333a9a860672a45f8187e1a9cea381322850", "head_commit_message": "Remove unused import", "patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex cbe96982b4b..9e0f833120c 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -21,6 +21,7 @@ All notable, unreleased changes to this project...
[ { "diff_hunk": "@@ -469,6 +469,7 @@ class CheckoutComplete(BaseMutation):\n \n class Arguments:\n checkout_id = graphene.ID(description=\"Checkout ID\", required=True)\n+ store_source = graphene.Boolean(default_value=False)", "line": null, "original_line": 472, "original_start_lin...
ad32191228bb083dca68e14ab3e10cd70d055592
diff --git a/CHANGELOG.md b/CHANGELOG.md index 2e7ee470f76..79c6b3c5ef6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ All notable, unreleased changes to this project will be documented in this file. - Fix internal error when users enters an invalid phone number in an address - #4404 by @NyanKiyoshi -...
{ "difficulty": "medium", "estimated_review_effort": 4, "problem_domain": "New Feature Additions" }
scipy__scipy-16313@681a7ba
scipy/scipy
Python
16,313
MAINT: Update optimize.shgo
Reopening of previously closed issue #14013, also addresses the reviewer comments by @tupui discussed there (also now using from scipy._lib._util.MapWrapper to hopefully lower future maintenance). Reference issues/fixes === Fixes for GitHub reported issues (with tests in scipy/optimize/tests/test__shgo.py): - Clo...
2022-05-29T22:37:06Z
scipy.optimize.shgo(): 'args' is incorrectly passed to constraint function when 'sobol' sampling is used Hello! I've discovered an issue in shgo when the 'args' argument is used together with constraint functions. It seems like the 'args' argument to shgo() is incorrectly passed on the constraint functions when sa...
Thanks for the report @ahenriksson @Stefan-Endres would you mind having a look at this? Hi @ahenriksson, thank you for the detailed report. I will write a quick fix a unittest case for this. @Stefan-Endres Thank you for reporting this @cherrywoods and @pmla for the ping. This should be relatively easy to fix I...
[ { "body": "Hello!\r\n\r\nI've discovered an issue in shgo when the 'args' argument is used together with constraint functions. \r\nIt seems like the 'args' argument to shgo() is incorrectly passed on the constraint functions when sampling_method='sobol' is used.\r\n\r\nI'm using scipy 1.4.1.\r\n\r\nCode sample ...
36e73929ee0eebec670b903451baf42c753199c5
{ "head_commit": "681a7ba42d77d4ff92d67c35b4a3d04d44da36e7", "head_commit_message": "Update scipy/optimize/_shgo.py\n\nCo-authored-by: Daniel Schmitz <40656107+dschmitz89@users.noreply.github.com>", "patch_to_review": "diff --git a/scipy/optimize/__init__.py b/scipy/optimize/__init__.py\nindex 22efc70e7020..6107f...
[ { "diff_hunk": "@@ -422,7 +422,7 @@\n LinearConstraint,\n Bounds)\n from ._hessian_update_strategy import HessianUpdateStrategy, BFGS, SR1\n-from ._shgo import shgo\n+from ._shgo import shgo, SHGO", "line": null, "original_line": 425, "original_s...
6c33ef2784815b680b2aa2c19187abbd989f5459
diff --git a/scipy/optimize/_shgo.py b/scipy/optimize/_shgo.py index 6556bad619d9..cbf8a8df4bb7 100644 --- a/scipy/optimize/_shgo.py +++ b/scipy/optimize/_shgo.py @@ -1,24 +1,28 @@ -""" -shgo: The simplicial homology global optimisation algorithm -""" - -import numpy as np +"""shgo: The simplicial homology global optim...
{ "difficulty": "medium", "estimated_review_effort": 4, "problem_domain": "Bug Fixes" }
scipy__scipy-16455@cfefdf7
scipy/scipy
Python
16,455
ENH: stats.bootstrap: add BCa method for multi-sample statistic
#### Reference issue Closes gh-16433 Addresses item in gh-13371 #### What does this implement/fix? Currently, `stats.bootstrap` only supports `method='BCa'` for single-sample statistics. This adds support for multi-sample statistics. I need to add a test. @FlorinAndrei can you help me devise one? One way to do...
2022-06-22T22:22:41Z
ENH: scipy.stats.bootstrap() should do BCa for multivariate statistics too ### Is your feature request related to a problem? Please describe. I've seen this several times while looking at datasets. In R I can do BCa correction any time. When I try to do the same analysis with Python and I want to apply the BCa correct...
Ok, i can add it. The reason we didn't is that there is not much literature that we could find about a multi-sample jackknife. It is conceptually simple to generalize, but the algorithm is time-consuming. So we started thinking about using bootstrap within bootstrap... and decided to let it go for the time being. With...
[ { "body": "### Is your feature request related to a problem? Please describe.\n\nI've seen this several times while looking at datasets. In R I can do BCa correction any time. When I try to do the same analysis with Python and I want to apply the BCa correction, it only works for univariate.\n\n### Describe the...
ac729b8f96a018b9156a0e5679e18b5d6e2e70a7
{ "head_commit": "cfefdf7e600e6a51d0f47969a41246745806b964", "head_commit_message": "ENH: stats.bootstrap: add BCa method for multi-sample statistic", "patch_to_review": "diff --git a/scipy/stats/_resampling.py b/scipy/stats/_resampling.py\nindex d1c938f28d4f..6e5e2d867e1a 100644\n--- a/scipy/stats/_resampling.py...
[ { "diff_hunk": "@@ -103,17 +103,27 @@ def _percentile_along_axis(theta_hat_b, alpha):\n def _bca_interval(data, statistic, axis, alpha, theta_hat_b, batch):\n \"\"\"Bias-corrected and accelerated interval.\"\"\"\n # closely follows [2] \"BCa Bootstrap CIs\"\n- sample = data[0] # only works with 1 sa...
7783656dbded57628703130bc9708f1aab722603
diff --git a/scipy/stats/_resampling.py b/scipy/stats/_resampling.py index 3344afdacff8..04cc601b3b30 100644 --- a/scipy/stats/_resampling.py +++ b/scipy/stats/_resampling.py @@ -103,23 +103,44 @@ def _percentile_along_axis(theta_hat_b, alpha): def _bca_interval(data, statistic, axis, alpha, theta_hat_b, batch): ...
{ "difficulty": "high", "estimated_review_effort": 4, "problem_domain": "New Feature Additions" }
saleor__saleor-4121@0e8ddf7
saleor/saleor
Python
4,121
Migrate deprecated fields
I want to merge this change because... Resolves #3996 <!-- Please mention all relevant issue numbers. --> ### Screenshots <!-- If your changes affect the UI, providing "before" and "after" screenshots will greatly reduce the amount of work needed to review your work. --> ### Pull Request Checklist <!...
2019-05-16T12:40:17Z
Migrate from `deprecated` fields Some GraphQL fields were recently deprecated in our API: - OrderLine.thumbnailUrl - Page.availableOn - Page.isVisible - ProductVariant.availability - Product.availability -> pricing - Product.availableOn - Product.price - Product.thumbnailUrl - Collection.publishedDate We sh...
Field `Collection.publishedDate` is not used
[ { "body": "Some GraphQL fields were recently deprecated in our API:\r\n- OrderLine.thumbnailUrl\r\n- Page.availableOn\r\n- Page.isVisible\r\n- ProductVariant.availability\r\n- Product.availability -> pricing\r\n- Product.availableOn\r\n- Product.price\r\n- Product.thumbnailUrl\r\n- Collection.publishedDate\r\n\...
32edec1518a8cf3e823d5c47815579ec9d7c51ea
{ "head_commit": "0e8ddf7606fca15153c5dd5a192224cf154e2026", "head_commit_message": "Rebase master", "patch_to_review": "diff --git a/package-lock.json b/package-lock.json\nindex 8c0dc53013b..24d0a86c3a6 100644\n--- a/package-lock.json\n+++ b/package-lock.json\n@@ -15062,7 +15062,8 @@\n \"ansi-regex\": {\...
[ { "diff_hunk": "@@ -95,7 +97,9 @@ export const ProductList = withStyles(styles, { name: \"ProductList\" })(\n products,\n product => (\n <TableRow key={product ? product.id : \"skeleton\"}>\n- <TableCellAvatar thumbnail={product && product.thumbnailUrl} />\n+...
0746e8707687d5f3cb2bc72cf7fe10bd9f4f5f01
diff --git a/CHANGELOG.md b/CHANGELOG.md index f54b0d4d71a..be5021c84d1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ All notable, unreleased changes to this project will be documented in this file. For the released changes, please visit the [Releases](https://github.com/mirumee/saleor/releases) page. ...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "New Feature Additions" }
saleor__saleor-4078@431cc4a
saleor/saleor
Python
4,078
Add list enum to some filters fields
I want to merge this change because... Closes #4006 1. [ ] Privileged views and APIs are guarded by proper permission checks. 1. [ ] All visible strings are translated with proper context. 1. [ ] All data-formatting is locale-aware (dates, numbers, and so on). 1. [ ] Database queries are optimized and the number ...
2019-05-07T14:39:55Z
Allow filtering by lists of enums In GraphQL API we can filter data by enum fields: ``` orders(filter: {status: READY_TO_FULFILL}) ``` It would be relatively easy to make the filtering more flexible by changing enum filters to lists: ``` orders(filter: {status: [READY_TO_CAPTURE, READY_TO_FULFILL]}) ```
[ { "body": "In GraphQL API we can filter data by enum fields:\r\n```\r\norders(filter: {status: READY_TO_FULFILL})\r\n```\r\n\r\nIt would be relatively easy to make the filtering more flexible by changing enum filters to lists: \r\n```\r\norders(filter: {status: [READY_TO_CAPTURE, READY_TO_FULFILL]})\r\n```\r\n"...
de5784bee5d9aca6e132b3e8a0915b1ef3693ad7
{ "head_commit": "431cc4a1e41cf0fce37337418dbea70bf7956114", "head_commit_message": "Update changelog", "patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex 8e4f627a680..83fc902b8f4 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -55,6 +55,7 @@ All notable, unreleased changes to this project wil...
[ { "diff_hunk": "@@ -910,6 +910,8 @@ input FulfillmentUpdateTrackingInput {\n \n enum GatewaysEnum {\n DUMMY\n+ BRAINTREE", "line": null, "original_line": 913, "original_start_line": null, "path": "saleor/graphql/schema.graphql", "start_line": null, "text": "@user1:\nI think we have on...
89133e288518ae994ac876867a1a9c83963cc2c6
diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e4f627a680..83fc902b8f4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -55,6 +55,7 @@ All notable, unreleased changes to this project will be documented in this file. - Add migrations since unnecessary indexes are removed in mptt model in [django-mptt/django-mptt#578](h...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "New Feature Additions" }
scipy__scipy-16166@90ebe6d
scipy/scipy
Python
16,166
MAINT:linalg: Expose Cython functions for generic use
Closes #16143 Certain low-level Cython functions are useful for multiple functions, such as checking for triangular-ness, or symmetry/Hermitian structure. With generous help of @ev-br hopefully this PR manages the cimportable cdef'd functions. @rgommers I think this needs you attention since we butchered ou...
2022-05-12T21:24:32Z
ENH: Expose Cythonized functions to other pyx files through cimport This is more of a learning issue that I have been trying out for a few weeks now but couldn't have any progress. What I would like to have is - expose a Cython API for linalg that is similar to `cython_blas`, `cython_lapack` or `cython_special`. ...
[ { "body": "This is more of a learning issue that I have been trying out for a few weeks now but couldn't have any progress. What I would like to have is \r\n - expose a Cython API for linalg that is similar to `cython_blas`, `cython_lapack` or `cython_special`. \r\n - or at least make certain Cythonized functio...
c478a0dbe1ee0c1349eb584910781b1aeb158d38
{ "head_commit": "90ebe6dfaeb14fa48299271e03f0fa4d16d6f24f", "head_commit_message": "MAINT:linalg: Expose low-level Cython functions for generic use", "patch_to_review": "diff --git a/scipy/linalg/_cythonized_array_utils.pxd b/scipy/linalg/_cythonized_array_utils.pxd\nnew file mode 100644\nindex 000000000000..626...
[ { "diff_hunk": "@@ -222,6 +222,30 @@ cython_lapack = py3.extension_module('cython_lapack',\n subdir: 'scipy/linalg'\n )\n \n+\n+py3.install_sources(\n+ ['_cythonized_array_utils.pyi', '_cythonized_array_utils.pxd'],\n+ pure: false,\n+ subdir: 'scipy/linalg',\n+)\n+\n+# This is needed to add pxd files into ...
39feed0a6fc21a95d4f322982e864bc1661e3b17
diff --git a/scipy/linalg/_cythonized_array_utils.pxd b/scipy/linalg/_cythonized_array_utils.pxd new file mode 100644 index 000000000000..6263fa249272 --- /dev/null +++ b/scipy/linalg/_cythonized_array_utils.pxd @@ -0,0 +1,40 @@ +cimport numpy as cnp + +ctypedef fused lapack_t: + float + double + (float comple...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "Code Refactoring / Architectural Improvement" }
scipy__scipy-16181@3b24748
scipy/scipy
Python
16,181
BUG: stats: fix multivariate_hypergeom.rvs method
#### Reference issue fixes #16171 #### What does this implement/fix? Fixes multivariate_hypergeom.rvs method when the last two or more elements of the population are 0.
2022-05-14T07:04:31Z
BUG: scipy.stats.multivariate_hypergeom.rvs raises ValueError when at least the last two populations are 0 ### Describe your issue. I ran into a strange issue when sampling using Scipy's multivariate hypergeometric distribution. Calling `scipy.stats.multivariate_hypergeom.rvs` on a list of populations raises the error...
Hi @Alexamk, thank you for reporting. Indeed I can reproduce and agree that this behaviour is confusing. The problem is here: https://github.com/scipy/scipy/blob/a6ee381ec61f89e8b43631bb7f3e5ee30e6bda47/scipy/stats/_multivariate.py#L4875-L4878 When n is 0, the result on the right is zero (because of the multiplic...
[ { "body": "### Describe your issue.\n\nI ran into a strange issue when sampling using Scipy's multivariate hypergeometric distribution. Calling `scipy.stats.multivariate_hypergeom.rvs` on a list of populations raises the error message `ValueError: ngood + nbad < nsample`, while calling the same function on the ...
a8b7c3216c0e8d6dc832d01d3e3dd92919279303
{ "head_commit": "3b24748f1721ea731a7957ddaf41ff76af762efc", "head_commit_message": "BUG: stats: fix multivariate_hypergeom.rvs method", "patch_to_review": "diff --git a/scipy/stats/_multivariate.py b/scipy/stats/_multivariate.py\nindex 204cb2e754e4..1cdfc36d0369 100644\n--- a/scipy/stats/_multivariate.py\n+++ b/...
[ { "diff_hunk": "@@ -1976,6 +1976,17 @@ def test_rvs_broadcasting(self):\n rvs = rv.rvs(size=(1000, 2), random_state=123)\n assert_allclose(rvs.mean(0), rv.mean(), rtol=1e-2)\n \n+ @pytest.mark.parametrize('m, n', (\n+ ([0, 0, 20, 0, 0], 5), ([0, 0, 0, 0, 0], 0), ([0, 0], 0),", "lin...
3ee6b525c4c3b67cfb23d80c54a71bab8d6033b7
diff --git a/scipy/stats/_multivariate.py b/scipy/stats/_multivariate.py index 204cb2e754e4..1cdfc36d0369 100644 --- a/scipy/stats/_multivariate.py +++ b/scipy/stats/_multivariate.py @@ -4872,9 +4872,11 @@ def rvs(self, m, n, size=None, random_state=None): # https://github.com/numpy/numpy/pull/13794 f...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "Bug Fixes" }
scipy__scipy-16160@caddaab
scipy/scipy
Python
16,160
MAINT: stats.nbinom.logcdf: fix vectorization
#### Reference issue Closes gh-16159 #### What does this implement/fix? The vectorization of `stats.nbinom.logcdf` was broken due to a mistake in the use of `_lazywhere`. This fixes it.
2022-05-12T03:56:34Z
BUG: scipy.stats.nbinom.logcdf returns wrong result for particular arguments ### Describe your issue. The function `scipy.stats.nbinom.logcdf` returns wrong results for certain combinations of input arguments. If we set `n=4.8` and `p=0.45` then for the input `[0, 5, 0, 5]` the function returns `[-3.832837, -0.6473...
[ { "body": "### Describe your issue.\n\nThe function `scipy.stats.nbinom.logcdf` returns wrong results for certain combinations of input arguments.\r\n\r\nIf we set `n=4.8` and `p=0.45` then for the input `[0, 5, 0, 5]` the function returns `[-3.832837, -0.647303, -0.647303, -0.647303]`. The third array element ...
1a6f02c435d66a40b255c96a68fa20a346bf0962
{ "head_commit": "caddaabde008644db479990a9f41ad895bb4fd7c", "head_commit_message": "MAINT: stats.nbinom.logcdf: fix vectorization", "patch_to_review": "diff --git a/scipy/stats/_discrete_distns.py b/scipy/stats/_discrete_distns.py\nindex 6f4d2ed1f58e..c7a2c514b100 100644\n--- a/scipy/stats/_discrete_distns.py\n+...
[ { "diff_hunk": "@@ -344,11 +344,11 @@ def _logcdf(self, x, n, p):\n def f1(k, n, p):\n return np.log1p(-special.betainc(k + 1, n, 1 - p))\n \n- def f2(k, n, p):\n- return np.log(cdf)\n-\n+ logcdf = np.empty_like(cdf)", "line": null, "original_line": 347, ...
f3595319917fe0ea2b53336554f1903071abdac8
diff --git a/scipy/stats/_discrete_distns.py b/scipy/stats/_discrete_distns.py index 6f4d2ed1f58e..491c489dd04e 100644 --- a/scipy/stats/_discrete_distns.py +++ b/scipy/stats/_discrete_distns.py @@ -344,11 +344,12 @@ def _logcdf(self, x, n, p): def f1(k, n, p): return np.log1p(-special.betainc(k +...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "Bug Fixes" }
scipy__scipy-16077@1fee8a2
scipy/scipy
Python
16,077
BUG: interpolate: RGI(nan) is nan
<!-- Thanks for contributing a pull request! Please ensure that your PR satisfies the checklist before submitting: http://scipy.github.io/devdocs/dev/contributor/development_workflow.html#checklist-before-submitting-a-pr Also, please name and describe your PR as you would write a commit message: http://scipy.g...
2022-04-30T08:42:52Z
incorrect handling of nan by RegularGridInterpolator RegularGridInterpolator does not seem to handle nans correctly when the interpolation method is nearest-neighbor. Sample script follows below. --Bram ### import numpy as np from scipy.interpolate import RegularGridInterpolator f = RegularGridInterpolator(([1,2,3]...
Indeed `f(nan)` should be `nan`. The offender is ``` In [2]: np.searchsorted([1, 2, 3, 4], np.nan) Out[2]: 4 ``` I'll send a fix shortly.
[ { "body": "RegularGridInterpolator does not seem to handle nans correctly when the interpolation method is nearest-neighbor. Sample script follows below.\n\n--Bram\n### \n\nimport numpy as np\nfrom scipy.interpolate import RegularGridInterpolator\n\nf = RegularGridInterpolator(([1,2,3],), [10,20,30], bounds_err...
9137ef1c201aa75f891fe2ad5ac056ad9d2ff5d4
{ "head_commit": "1fee8a25397d2e5e578642f0b176021f9b101995", "head_commit_message": "TST: interpolate: filter out nan some warnings in RGI tests\n\nOut-of-bounds checks, `out_of_bounds += x < grid[0]`, generate\nnumpy warnings if `x` contains nans. These warnings should\npropagate to user (since `x` is user input)....
[ { "diff_hunk": "@@ -2744,6 +2744,64 @@ def test_length_one_axis2(self, fill_value, method):\n else:\n assert_allclose(zb, fill_value)\n \n+ @pytest.mark.parametrize(\"method\", ['nearest', 'linear'])\n+ def test_nan_x_1d(self, method):\n+ # gh-6624 : if x is nan, result should b...
c7c358f9c1f4908cdb04e6cda91567f0c66a540c
diff --git a/scipy/interpolate/_interpolate.py b/scipy/interpolate/_interpolate.py index ae89c726dc98..833fc6b24f29 100644 --- a/scipy/interpolate/_interpolate.py +++ b/scipy/interpolate/_interpolate.py @@ -2534,6 +2534,9 @@ def __call__(self, xi, method=None): xi_shape = xi.shape xi = xi.reshape(-1, ...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "Bug Fixes" }