instance_id
stringlengths
10
65
repo
stringlengths
5
59
pr_number
int64
1
313k
task_type
stringclasses
1 value
base_commit
stringlengths
40
40
review_commit
stringlengths
40
40
title
stringlengths
2
282
body
stringlengths
7
3k
patch
stringlengths
202
204k
n_defects
int64
1
72
n_supported
int64
1
65
n_major
int64
0
32
defects
stringlengths
140
18.8k
certifier_count
int64
scikit-hep__awkward__3729
scikit-hep/awkward
3,729
defect
e619aaabaa69059ad726cb9388c71ebb7693903f
0195c4b4fa3dd180ab5466a6b696792c72424e49
fix: weights should not be raised to the power n in the n-th moment calculation
Closes https://github.com/scikit-hep/awkward/issues/3722
diff --git a/src/awkward/operations/ak_moment.py b/src/awkward/operations/ak_moment.py index 882da992e2..e8433a02b6 100644 --- a/src/awkward/operations/ak_moment.py +++ b/src/awkward/operations/ak_moment.py @@ -73,7 +73,7 @@ def moment( Passing all arguments to the reducers, the moment is calculated as - ...
1
1
1
[{"id": "G0", "claim": "The original issue should be added as a test case for the fixed moment calculation — copy and paste the manual expected-moment calculation T90REAL wrote — before merging, since no test for this existed until now.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introd...
null
scikit-hep__awkward__3741
scikit-hep/awkward
3,741
defect
af08e7b5bd07e81e81a2c4b5a72135a3c5c5b18b
306d9380f762e531291b8f4963139d64318f1ccb
feat: ability to optionally disable the caching of virtual arrays on themselves
This allows us to disable the caching of the materialized array on the virtual array object. The virtual arrays will still be aware of their generators and be able to materialize again (they just need to call the generator again). The option is passed through `from_buffers` which is currently the only publicly expose...
diff --git a/src/awkward/_nplikes/array_module.py b/src/awkward/_nplikes/array_module.py index 38ca0c4fbb..e376e7babb 100644 --- a/src/awkward/_nplikes/array_module.py +++ b/src/awkward/_nplikes/array_module.py @@ -80,6 +80,7 @@ def asarray( obj._dtype if dtype is None else dtype, ...
5
5
3
[{"id": "G0", "claim": "The new disable_virtualarray_caching kwarg has to be added to the docstring with a proper explanation of what reasonable values and types are for it.", "category": "documentation", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The caching decision shoul...
null
scikit-hep__awkward__3750
scikit-hep/awkward
3,750
defect
e547a34f4757f2ee9d4bbd02fbf182afa2f2bf03
c02f4cb5658e7ac5e2ecd9021b958cd18cfe6163
feat: Add `ak.sort()` for CUDA backend
Closes https://github.com/scikit-hep/awkward/issues/3749. Following the study https://github.com/scikit-hep/awkward/pull/3748, this PR adds support for `ak.sort()` for the CUDA backend, using https://nvidia.github.io/cccl/python/compute.html. ⚠️ This PR should not be merged in its current state - I'm opening it a...
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d92809e885..1457ca9c13 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -210,6 +210,7 @@ jobs: -c rapidsai -c nvidia python=3.13 + cccl-python cudf ...
3
1
1
[{"id": "G0", "claim": "Keep virtual arrays out of this POC, i.e. do not enable (un-xfail) the virtual-array sort tests such as test_numpyarray_sort in this pull request.", "category": "design", "verdict": "uncertain", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Prioritize CCCL (cuda.compute) kerne...
null
scikit-hep__awkward__3751
scikit-hep/awkward
3,751
defect
6dc0a1c9a79a95f72ea5782c1d1f179b955ad570
21213ec4120b703a8aea1aafae379fc7718e55fe
fix: keep track of buffer key instead of field path for VirtualNDArrays & PlaceholderArrays
There's more information in the buffer key than in the field path. Also, 3rd party libraries (like coffea) implement their own buffer keys, which makes this a more useful variable to keep track of than our manually build field path.
diff --git a/src/awkward/_nplikes/array_module.py b/src/awkward/_nplikes/array_module.py index 38ca0c4fbb..f83471e388 100644 --- a/src/awkward/_nplikes/array_module.py +++ b/src/awkward/_nplikes/array_module.py @@ -80,6 +80,7 @@ def asarray( obj._dtype if dtype is None else dtype, ...
2
2
1
[{"id": "G0", "claim": "The pull request should add a test that builds an array with virtual buffers and asserts that the buffers inside the resulting layout have the expected buffer keys.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The buffer_key sh...
null
scikit-hep__awkward__3765
scikit-hep/awkward
3,765
defect
87765b6adb379ba27b0f6b984607c250443b170c
ede6347429a090a7afde90897f45baa29e8174d4
fix: typetracer nplike's `all` function leads to infinite recursion for `axis=None`
The typetracer nplike's `all` function with `axis=None` calls itself again with `axis=None` leading into an infinite recursion naturally. This appears to be a typo. I think the point was when this was implemented to flatten the input with the `self.reshape(x, (-1,)` and then call it on the only existing axis which woul...
diff --git a/src/awkward/_nplikes/typetracer.py b/src/awkward/_nplikes/typetracer.py index 57e1600ccd..ac2a7b5179 100644 --- a/src/awkward/_nplikes/typetracer.py +++ b/src/awkward/_nplikes/typetracer.py @@ -1559,7 +1559,7 @@ def all( if axis is None: return self.all( cast(TypeTrac...
1
1
1
[{"id": "G0", "claim": "Please add a simple test covering the typetracer `all` fix (e.g. the reproducer and a `.any`-case) before merge.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
scikit-hep__awkward__3777
scikit-hep/awkward
3,777
defect
c6fc079a214ab6a9d8af1460c7fd0189e2dd17ab
bb3fbd83654c75eac9aa2b64c931af9ba8522143
feat: add argmax implementation using CCCL
This was working on a simple test like this one just yesterday: ``` import awkward as ak awkward_array = ak.Array([[1], [2, 3], [4, 5, 6, 7, 8, 9], [], [], [10]], backend = 'cuda') result = ak.argmax(awkward_array, axis = 1) ``` Now I'm getting a `NumbaNotImplementedError: input_data.dtype` error for some reason....
diff --git a/dev/generate-kernel-signatures.py b/dev/generate-kernel-signatures.py index 93c01e52d2..0f20c9e7a4 100644 --- a/dev/generate-kernel-signatures.py +++ b/dev/generate-kernel-signatures.py @@ -127,7 +127,7 @@ "awkward_reduce_min_complex", "awkward_reduce_argmin", "awkward_reduce_argmin_complex"...
2
2
1
[{"id": "G0", "claim": "Calling ak.argmax on a CUDA array fails with NumbaNotImplementedError because the cccl kernel builds its gpu_struct from `data: input_data.dtype`, which numba cannot convert.", "category": "correctness", "verdict": "supported", "priority": "P0", "scope": "introduced"}, {"id": "G1", "claim": "The...
null
scikit-hep__awkward__3845
scikit-hep/awkward
3,845
defect
675ff70fb896cb39a7ab59cddc4020c31d7628e3
b77b2e718baadb79540a450a7a66c082b629daf3
feat: implement byteswap as an nplike function
Fixes #2673 This PR removes the assumption that all array-like buffers implement `.byteswap()` in the `to_buffers` path. The byteorder conversion is now explicit for NumPy-backed buffers, avoiding unsafe assumptions across ndarray implementations. Tests updated accordingly.
diff --git a/src/awkward/_util.py b/src/awkward/_util.py index 77b2ea9446..3586fbab5b 100644 --- a/src/awkward/_util.py +++ b/src/awkward/_util.py @@ -56,7 +56,12 @@ def native_to_byteorder(array, byteorder: str): """ assert byteorder in "<>" if byteorder != native_byteorder: - return array.bytesw...
8
7
6
[{"id": "G0", "claim": "The pull request does not implement what the original issue asks - byteswap should be abstracted inside the nplikes for all backends - and instead native_to_byteorder just raises TypeError for non-NumPy arrays.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduce...
null
scikit-hep__awkward__3887
scikit-hep/awkward
3,887
defect
bb827d0030c76b9dd34c398295200ad8b22b87b6
a552e728266836a9255020dec3dcff65ddbc9c8b
test: introduce property-based testing with to_buffers/from_buffers roundtrip
## Summary Introduce property-based testing using [`hypothesis-awkward`](https://github.com/scikit-hep/hypothesis-awkward), which provides Hypothesis strategies for generating arbitrary Awkward Arrays. This PR sets up the infrastructure and adds the first test case (`to_buffers`/`from_buffers` roundtrip) as a proof of...
diff --git a/pyproject.toml b/pyproject.toml index fcba96fa47..48ab21da11 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -116,6 +116,7 @@ end-before = "<!-- readme-pypi-ignore-after -->" [tool.pytest.ini_options] minversion = "6.0" norecursedirs = [ + ".hypothesis", "src", "pybind11", "rapidjs...
6
3
1
[{"id": "G0", "claim": "The conftest.py should keep using the established pytest.importorskip-in-the-test pattern instead of collect_ignore_glob.", "category": "maintainability", "verdict": "opposed", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The test file should probably keep the pattern of bein...
null
scikit-hep__awkward__3894
scikit-hep/awkward
3,894
defect
970f5d0e2057c5627fb9bf45bb0df16cdbe7786c
7a567c6578f07c7520e39924b6ef814a5ab5c48c
feat: customly overload the reducers that call cuda-compute kernels
The purpose of this PR is to have custom reducers for cuda-compute (cccl) kernels (in a similar manner to JAX backend).
diff --git a/src/awkward/_backends/cupy.py b/src/awkward/_backends/cupy.py index 54d05b7ac6..271d3e1702 100644 --- a/src/awkward/_backends/cupy.py +++ b/src/awkward/_backends/cupy.py @@ -2,6 +2,7 @@ from __future__ import annotations +import awkward as ak from awkward._backends.backend import Backend, KernelKeyTy...
5
5
2
[{"id": "G0", "claim": "The internal `from awkward._connect.cuda.reducers import get_cuda_compute_reducer` import should be moved to come after the numpy import and the cupy installation docstring, since internal or specialized imports usually go last.", "category": "maintainability", "verdict": "supported", "priority"...
null
scikit-hep__awkward__3907
scikit-hep/awkward
3,907
defect
36156eb36264669fd3cd08f76a23dd3c6af0d254
89e3737800ad812ee5058cd9ae906108547c0692
feat: `NumpyArray` backed by CuPy exposes `__cuda_array_interface__`
# Add `__cuda_array_interface__` to `NumpyArray` and GPU segmented reduce ## Summary Adds `__cuda_array_interface__` to `NumpyArray` so that GPU-backed layouts can be passed directly to CUDA libraries (e.g. `cuda.compute`, `cupy`) without manually unwrapping `.data`. Also adds `awkward_reduce_min` as a working ex...
diff --git a/src/awkward/contents/numpyarray.py b/src/awkward/contents/numpyarray.py index 7e49d50d77..a2a4b51a61 100644 --- a/src/awkward/contents/numpyarray.py +++ b/src/awkward/contents/numpyarray.py @@ -146,6 +146,15 @@ def __init__(self, data: ArrayLike, *, parameters=None, backend=None): def data(self) -> Ar...
4
2
1
[{"id": "G0", "claim": "Exposing __cuda_array_interface__ as an always-present property makes it visible to CPU-side numba, which checks the properties in buffers, so the CPU tests catch it.", "category": "correctness", "verdict": "supported", "priority": "P0", "scope": "introduced"}, {"id": "G2", "claim": "NumpyArray ...
null
scikit-hep__awkward__3938
scikit-hep/awkward
3,938
defect
7499387f3191df5ba413bcf6c284d500c2bc90a2
b947382d3d9cfa7d8802de03b1f04545a31ce7dc
feat: allow generator expressions in highlevel operations that accept iterable of arrays as input
Closes https://github.com/scikit-hep/awkward/issues/3937
diff --git a/src/awkward/operations/ak_argcartesian.py b/src/awkward/operations/ak_argcartesian.py index 7283e56250..fa7559ac03 100644 --- a/src/awkward/operations/ak_argcartesian.py +++ b/src/awkward/operations/ak_argcartesian.py @@ -102,6 +102,7 @@ def argcartesian( if isinstance(arrays, Mapping): yield...
1
1
0
[{"id": "G0", "claim": "The tests should be expanded to cover the axis parameter, deeply nested structures, record arrays, negative cases (e.g. an invalid axis or bad nested structure) and type/shape checks.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
scikit-hep__awkward__583
scikit-hep/awkward
583
defect
7aa8747d94a618bfcf34b208c30a180748332266
927eb84ffb6f98f275360d36fb3f8915258c2167
Implement unflatten function
This implements an `unflatten` function for awkward as described in #555. As I really needed this function and the issue was marked as "good first issue" I thought I would give it a try. Would you like to have a unit test for the function? I'm not sure as this is my first pull request, but if needed I can write one. ...
diff --git a/src/awkward/operations/structure.py b/src/awkward/operations/structure.py index c14241bc3e..2fdec82543 100644 --- a/src/awkward/operations/structure.py +++ b/src/awkward/operations/structure.py @@ -1460,6 +1460,60 @@ def apply(layout): return out +def unflatten(array, counts, highlevel=True): ...
6
5
3
[{"id": "G0", "claim": "unflatten should raise an exception when counts <= 0, since the layout constructors do not sanity-check user-supplied input and errors would only surface downstream.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The missing-...
null
scikit-hep__awkward__907
scikit-hep/awkward
907
defect
473290479f4cc2bc40e1474d12a3d6032dc31d2b
97178926b71fbc15608b3b2febcc01f09ad8a140
Support for reading `pyarrow.lib.FixedSizeListType`
Fixes #906
diff --git a/src/awkward/operations/convert.py b/src/awkward/operations/convert.py index bab820b643..06a70291cf 100644 --- a/src/awkward/operations/convert.py +++ b/src/awkward/operations/convert.py @@ -2655,6 +2655,16 @@ def popbuffers(array, tpe, buffers): out = ak.layout.ListOffsetArray64(offsets, conte...
4
3
2
[{"id": "G0", "claim": "Use @VasilyFomin's pyarrow struct-of-FixedSizeListType example as a test for the new conversion.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Add a test asserting the converted output type is fixed-length (e.g. 2 * ?float64 lis...
null
scikit-hep__vector__128
scikit-hep/vector
128
defect
5ba111555bae20887e417c1e73101a940d06fc57
9c60f5fa5e724a7b59b2fdaf8d5fe24acc18b1ed
feat: allow overriding of protocol methods in subclasses
This PR addresses issue https://github.com/scikit-hep/vector/issues/127 by extending the [_handler_of](https://github.com/scikit-hep/vector/blob/5ba111555bae20887e417c1e73101a940d06fc57/src/vector/_methods.py#L2536-L2556) function to consider the module of all the inherited classes of a certain object. This is neccesar...
diff --git a/src/vector/_methods.py b/src/vector/_methods.py index 46007f85..cc0f9de1 100644 --- a/src/vector/_methods.py +++ b/src/vector/_methods.py @@ -4,6 +4,7 @@ # or https://github.com/scikit-hep/vector for details. import typing +from contextlib import suppress from vector._typeutils import ( BoolCol...
4
3
0
[{"id": "G0", "claim": "Change the docstring of `_get_handler_index` so it no longer mentions the `-1` return case.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Add an assertion in `_get_handler_index` covering the case where no handler is found...
null
scikit-hep__vector__20
scikit-hep/vector
20
defect
77966214d8792b3dcefc9a42edeb8ab7ef3db5fc
6ec53b82ec56e4a8497a6178b1cb41c177e01ca1
feat: multiplication
Also adds some typing, and various fixes / updates.
diff --git a/setup.cfg b/setup.cfg index ffdf5e2c..0304a4ff 100644 --- a/setup.cfg +++ b/setup.cfg @@ -26,7 +26,7 @@ classifiers = Programming Language :: Python :: 3.6 Programming Language :: Python :: 3.7 Programming Language :: Python :: 3.8 - Development Status :: 1 - Planning", + Development Status :: 1...
3
3
0
[{"id": "G0", "claim": "The mypy config section for the Awkward package should be named [mypy-awkward], not [mypy-awkward1].", "category": "correctness", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The delta_r2 docstring's summary line says \"ΔR the distance\" when the funct...
null
scikit-hep__vector__284
scikit-hep/vector
284
defect
4fbbd81727b61fae84a9b7747656f0e2da42214e
4e97d6b384057c880507857a9c67979e2673053c
feat: migrate to awkward v2 (and keep supporting v1)
## Description **Kindly take a look at [CONTRIBUTING.md](https://github.com/scikit-hep/vector/blob/main/.github/CONTRIBUTING.md).** _Please describe the purpose of this pull request. Reference and link to any relevant issues or pull requests._ ## Checklist - [ ] Have you followed the guidelines in our Contr...
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0ea836895..696f7f4e9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -60,14 +60,17 @@ jobs: - name: Install develop extras run: python -m pip install -e .[dev] + - name: Install awkward v1 + run:...
6
4
2
[{"id": "G0", "claim": "Testing vector with awkward v2.0.0rc1 hits numba errors because the code uses RecordArrayType.recordlookup, which awkward v2 renamed to fields.", "category": "correctness", "verdict": "supported", "priority": "P0", "scope": "introduced"}, {"id": "G1", "claim": "The v1 and v2 test steps run in on...
null
scikit-hep__vector__319
scikit-hep/vector
319
defect
a616cdcd15a96a8a1178c52811c3ad2474582934
33897f2e9dbc4764a5194f6d1ba83b7d148c2b1b
feat: allow passing coordinates to to_Vector*D
## Description Closes #276 Adds test and docs for #278 ## Checklist - [X] Have you followed the guidelines in our Contributing document? - [X] Have you checked to ensure there aren't any other open Pull Requests for the required change? - [X] Does your submission pass pre-commit? (`$ pre-commit run --al...
diff --git a/src/vector/_methods.py b/src/vector/_methods.py index 543ac2fa..148895f4 100644 --- a/src/vector/_methods.py +++ b/src/vector/_methods.py @@ -2966,32 +2966,89 @@ def to_Vector3D( theta: float | None = None, eta: float | None = None, ) -> VectorProtocolSpatial: + """ + C...
3
2
0
[{"id": "G0", "claim": "The docstring of the 3D to_Vector4D should read 'The scalar temporal coordinate is broadcasted for NumPy and Awkward vectors' rather than 'are broadcasted'.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The TypeError messa...
null
scikit-hep__vector__376
scikit-hep/vector
376
defect
bb92f086de4c4242a7845c19e63cad539d55d50f
6a3822a93827184311c6f096b0bf577a5ed8dbe5
fix: `keepdims` in `numpy.sum` should not be `None`
## Description Fixes #372 See https://github.com/scikit-hep/vector/issues/372#issuecomment-1708622415 I've added tests for the default case as well. ## Checklist - [X] Have you followed the guidelines in our Contributing document? - [X] Have you checked to ensure there aren't any other open Pull Request...
diff --git a/src/vector/backends/numpy.py b/src/vector/backends/numpy.py index 20602284..6d93a26a 100644 --- a/src/vector/backends/numpy.py +++ b/src/vector/backends/numpy.py @@ -20,6 +20,7 @@ import typing import numpy +from numpy._globals import _NoValue, _NoValueType import vector.backends.object from vector...
2
1
1
[{"id": "G0", "claim": "The PR should not use NumPy's private `_NoValue`/`_NoValueType` sentinel; `keepdims` should be typed `bool` and default to `False` in both `_reduce_sum` and `sum`.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The same keepdims m...
null
scikit-hep__vector__423
scikit-hep/vector
423
defect
8493623fe0c17cb7f91174c43d33258c16de6841
4db428e70556320487b57795f28ba15c3ed86daa
feat: allow momentum coords in to_Vector*D methods + cleanup
## Description Fixes #382 Paves the way for #422 (make the conversions more user-friendly) cc: @nsmith-, @iasonkrom, @lgray ## Checklist - [ ] Have you followed the guidelines in our Contributing document? - [ ] Have you checked to ensure there aren't any other open Pull Requests for the required change...
diff --git a/.gitignore b/.gitignore index 1c09a8dfa..28e662a6f 100644 --- a/.gitignore +++ b/.gitignore @@ -142,3 +142,6 @@ dmypy.json /node_modules /package.json /yarn.lock + +# MacOS +.DS_Store diff --git a/src/vector/_methods.py b/src/vector/_methods.py index d8febb3e9..feb8410b9 100644 --- a/src/vector/_methods...
3
3
1
[{"id": "G0", "claim": "The new test file's copyright header should say 2019-2024 instead of 2019-2023.", "category": "documentation", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "Passing conflicting coordinates (e.g. both z and pz, or both z and theta) to the to_Vector*D met...
null
scikit-hep__vector__558
scikit-hep/vector
558
defect
aef0d0e4eeaf5f462dbfdd067187b9ff2e4c3506
c05a4812156193f58227882d28d47fc299d8a0ed
fix: lib for typetracers
This PR fixes https://github.com/scikit-hep/coffea/pull/1195 (the current vector release 1.6.0 is broken for typetracers) The problem was that numpy (`lib`) functions were directly called on `TypeTracerArray`s. Instead, we should've used the corresponding `nplike` implementation if it exists. This is only implement...
diff --git a/src/vector/_methods.py b/src/vector/_methods.py index 4d278854..1450ae69 100644 --- a/src/vector/_methods.py +++ b/src/vector/_methods.py @@ -4400,7 +4400,7 @@ def _lib_of(*objects: VectorProtocol) -> Module: # NumPy-like module if isinstance(obj, Vector): if lib is None: ...
2
1
0
[{"id": "G0", "claim": "In the new _assert helper, when bool2 is an ak.Array the assert never runs, so on the cpu backend the comparison falls through and checks nothing.", "category": "correctness", "verdict": "uncertain", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The _assert helper hides what i...
null
scikit-hep__vector__57
scikit-hep/vector
57
defect
a42725b8eddf240e518bc2aa0f207dc2fcf08b42
9c8fc2588b827f1266807950f53181ef5d00747f
style: partial application of sourcery.ai
Closes #56. Applying just the good changes from that PR, along with some cleanup.
diff --git a/src/vector/__init__.py b/src/vector/__init__.py index 6dd05d21..bf62f75e 100644 --- a/src/vector/__init__.py +++ b/src/vector/__init__.py @@ -324,18 +324,11 @@ def Array(*args: typing.Any, **kwargs: typing.Any) -> typing.Any: depth = akarray.layout.purelist_depth - if dimension == 2 and not is_...
5
3
2
[{"id": "G0", "claim": "The out-of-range dimension branch is unreachable given the code above (it is not user input), so it should be an assertion rather than a user-facing RuntimeError.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Replacing the manual...
null
scikit-hep__vector__595
scikit-hep/vector
595
defect
6ba5a60ac90e5afa047f53681257b93ffa158cb5
fe75488427823132c16f109e84e3a009e5a1d394
Replace `nan_to_num` with `where` for CuPy
## Description Fixes #593 XRef #615 Using `where` is okay for other backends, but it is an issue for the SymPy backend. The shim `SympyLib.where` function is not a generic replacement for `np.where`, instead, it will only work for this particular case (return the second argument (first value) as that has the n...
diff --git a/pyproject.toml b/pyproject.toml index 3edba7071..724cffcfe 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -58,11 +58,11 @@ optional-dependencies.dev = [ "pytest>=6", "pytest-cov>=3", "pytest-doctestplus", - "sympy", + "sympy==1.13.*", # REMOVE THE PIN ] optional-dependencies.docs = [ ...
7
6
2
[{"id": "G0", "claim": "The Numba tests fail unexpectedly with this change, unlike the disassemble and SymPy failures which the author expected.", "category": "correctness", "verdict": "supported", "priority": "P0", "scope": "introduced"}, {"id": "G1", "claim": "The two TODO comments above xy_z and rhophi_z should be r...
null
scikit-hep__vector__637
scikit-hep/vector
637
defect
a6677295d49d4bf91228df8b06a8d5f93c479ed2
5b6e9b2e79d2456eb945aaf78f6b236c4e0d650c
feat: add PyTree support for vector objects
## Description See https://blog.scientific-python.org/pytrees/ for the rationale for these functions. As a demonstration, here's a projectile motion with air resistance simulation using vector and scipy, showing in particular the use of `vector.pytree.flatten` to wrap the SciPy ODE solver: ```python import he...
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a1b7c2de..71f9c92b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -35,6 +35,7 @@ repos: - numpy - packaging - sympy + - optree - repo: https://github.com/codespell-project/codespell...
5
4
2
[{"id": "G0", "claim": "The pull request should not set up the optree pytree integration as a side effect of `import vector`; a separate module (or an explicit opt-in API) would be better so the import stays cheap for users without optree.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "intr...
null
scikit-hep__vector__675
scikit-hep/vector
675
defect
c535be122814639e125bd42ffd723b5f4c4a85d8
346fbffe0b7a4599490124e7e1a1dd53ad7139a5
feat: test on python 3.14
## Description This PR enables testing on Python 3.14 and fixes Numba tests. XRef https://github.com/scikit-hep/vector/pull/653#issuecomment-3708467866 (thanks, @ikrommyd!) The behavior of `sys.getrefcount` has changed in Python 3.14 > The interpreter now avoids some reference count modifications internally...
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index aa90d653..e3ad6cbc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -43,6 +43,7 @@ jobs: - "3.11" - "3.12" - "3.13" + - "3.14" name: Python ${{ matrix.python-version }} - Lite ...
2
1
0
[{"id": "G0", "claim": "The version-gated refcount expectations the PR adds for Python 3.14 rest on an unstable premise: runtime optimizations and free-threaded-mode adjustments effectively change the timing and frequency of reference-count operations, so the hardcoded else-branch values may not hold across 3.14 builds...
null
scikit-learn-contrib__skglm__110
scikit-learn-contrib/skglm
110
defect
762293650fcbf3fe3a2d39adda27669069e7c560
d89c40a0fa7bcc9707aeb579b40539e7a25e08c9
ENH Add positive constraint to `L1`, `WeightedL1` and `L1_plus_L2`
Add positivity constraints to these penalties and corresponding estimators. Question: do we want it enabled for `WeightedL1`? It seems more consistent and is not tricky to do. Closes #107, #132
diff --git a/skglm/estimators.py b/skglm/estimators.py index 04c62bd64..6da433bfd 100644 --- a/skglm/estimators.py +++ b/skglm/estimators.py @@ -314,6 +314,9 @@ class Lasso(LinearModel, RegressorMixin): tol : float, optional Stopping criterion for the optimization. + positive : bool, optional + ...
4
3
1
[{"id": "G0", "claim": "The positivity case in `L1.subdiff_distance` should be handled first with an early return, so the usual case reads flat, to enhance readability of that part.", "category": "maintainability", "verdict": "opposed", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "`ST` in skglm/util...
null
scikit-learn-contrib__skglm__113
scikit-learn-contrib/skglm
113
defect
762293650fcbf3fe3a2d39adda27669069e7c560
d1bff10cb324f87f7876a419b888a5bb177285d3
FEAT Add Gamma regressor
Closes #81 Closes #114 A few remarks: - Solver is converging (please check the maths), but we don't have the same solution as `sklearn` for `alpha=0`. - `statsmodels` does not support a Gamma model so the only test I see would be to compare `sklearn` and `skglm` solutions for `alpha = 0`. WDYT? - I've opened...
diff --git a/skglm/datafits/__init__.py b/skglm/datafits/__init__.py index fad030ac3..8eaa33a15 100644 --- a/skglm/datafits/__init__.py +++ b/skglm/datafits/__init__.py @@ -1,12 +1,12 @@ from .base import BaseDatafit, BaseMultitaskDatafit -from .single_task import Quadratic, QuadraticSVC, Logistic, Huber, Poisson +fro...
10
9
4
[{"id": "G0", "claim": "Check the implementation against statsmodels' L1 gamma regressor, using GLM `fit_regularized` with an `L1_wt` parameter.", "category": "testing", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The `exp` term in the Gamma `raw_hessian` may need a minus si...
null
scikit-learn-contrib__skglm__130
scikit-learn-contrib/skglm
130
defect
9fe4bae4409ed28222593fec50b991820c31e83d
e8fcee3f49841d2f62d75393e1f7897e62631540
MNT - remove normalization by ``sqrt(n_samples)`` in Square root Lasso
Preparing the background for a primal-dual solver à la `skglm` since It turned out to be sensible to the scaling of the datafit and penalty terms. In fact, it's difficult to keep track of the scaling constants (for our Square root Lasso it's $\\sqrt{n}$ and for LAD-Lasso it would be $n$) without hard coding them in th...
diff --git a/skglm/experimental/sqrt_lasso.py b/skglm/experimental/sqrt_lasso.py index ae655e5df..57707f541 100644 --- a/skglm/experimental/sqrt_lasso.py +++ b/skglm/experimental/sqrt_lasso.py @@ -15,7 +15,8 @@ class SqrtQuadratic(BaseDatafit): """Square root quadratic datafit. The datafit reads:: - ...
1
1
0
[{"id": "G0", "claim": "The SqrtQuadratic class docstring should be changed to \"Unnormalized square root quadratic datafit\" to reflect that the datafit is no longer normalized by sqrt(n_samples).", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
scikit-learn-contrib__skglm__138
scikit-learn-contrib/skglm
138
defect
cb43489a53f59ed4f89f6aa4eda33d745af2969e
1bee995f699555860eeebaee21f0ab089275bdc8
ENH - Add fixed-point distance strategy to build working sets in ``ProxNewton``
## Context of the PR ``ProxNewton`` does not support a fixed-point strategy for building the working set. This limitation makes some problems out-of-reach, for instance, penalties with complex ``subdiff_distance``. Closes #100 ## Contributions of the PR - add support of ``ws_strategy="fixpoint"`` for ``Prox...
diff --git a/skglm/solvers/prox_newton.py b/skglm/solvers/prox_newton.py index 0b5b662bc..1d6dc20e6 100644 --- a/skglm/solvers/prox_newton.py +++ b/skglm/solvers/prox_newton.py @@ -2,6 +2,7 @@ from numba import njit from scipy.sparse import issparse from skglm.solvers.base import BaseSolver +from skglm.solvers.commo...
3
3
1
[{"id": "G0", "claim": "The ``fixpoint`` strategy should also be considered when determining the descent direction (in ``_descent_direction``), not only when building the working set.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The ``ProxNewton``...
null
scikit-learn-contrib__skglm__165
scikit-learn-contrib/skglm
165
defect
395af5eaaa73a4fc66f20529c5f4f14eac7da4dd
c75b21f1ceb69e3ac9a7c2f59374655bf8e1ff8c
Solver - add a wrapper for ``scipy`` L-BFGS solver
This adds a BFGS to the solvers' toolbox of `skglm`. It proceeds as follows: - [x] add wrapper around ``scipy.optimize.minimize(method="L-BFGS-B")`` - [x] unitest against `scikit-learn` L2-Logistic regression
diff --git a/skglm/datafits/single_task.py b/skglm/datafits/single_task.py index f21484fd6..457f63501 100644 --- a/skglm/datafits/single_task.py +++ b/skglm/datafits/single_task.py @@ -182,6 +182,9 @@ def value(self, y, w, Xw): def gradient_scalar(self, X, y, w, Xw, j): return (- X[:, j] @ (y * sigmoid(- ...
2
2
2
[{"id": "G0", "claim": "The docstring of the new L2 penalty states the formula as alpha*||w||_2, missing the square and the division by 2 that the code's value (alpha/2 * sum(w^2)) actually computes.", "category": "documentation", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "...
null
scikit-learn-contrib__skglm__167
scikit-learn-contrib/skglm
167
defect
0e5c938eafb531fef5a5d9b0551fde1af8f5563f
5eb7ab8e03d6083af8b4dcff2660b442718d853c
MNT - compatibility of ``Cox`` datafit with L2 regularization
For the Cox datafit to be compatible with ``L-BFGS``, a gradient method should be added. - [x] add gradient method - [x] unitest against lifelines L2 `CoxPHFitter`
diff --git a/skglm/datafits/single_task.py b/skglm/datafits/single_task.py index 457f63501..ab5e3ccea 100644 --- a/skglm/datafits/single_task.py +++ b/skglm/datafits/single_task.py @@ -646,6 +646,10 @@ def raw_hessian(self, y, Xw): return out / n_samples + def gradient(self, X, y, Xw): + """Compu...
5
5
0
[{"id": "G0", "claim": "Check whether the solutions can actually differ: the objective is strongly convex so the solution is unique and a comment allowing the norm of the solution to differ is misplaced.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Us...
null
scikit-learn-contrib__skglm__221
scikit-learn-contrib/skglm
221
defect
ccf0b8884d4a6fd106f2ade75b454c86205f98ec
935da39bd364de7c421f5ce72e3e3a969fd1773f
Add Group Lasso with positive weigths
## Context of the PR Add group Lasso with positive coefficients to solve #197 ## Contributions of the PR Added proximity operator and subdifferential of the block soft thresholding with positive constraints. ### Checks before merging PR - [x] added documentation for any new feature - [x] added uni...
diff --git a/doc/changes/0.4.rst b/doc/changes/0.4.rst index 4dd673d98..569632b1f 100644 --- a/doc/changes/0.4.rst +++ b/doc/changes/0.4.rst @@ -11,3 +11,4 @@ Version 0.3.1 (2023/12/21) - Add :ref:`LogSumPenalty <skglm.penalties.LogSumPenalty>` (PR: :gh:`#127`) - Remove abstract methods in ``BaseDatafit`` and ``BaseP...
4
4
1
[{"id": "G0", "claim": "Add a trailing comma to the get_spec tuple entries so future PRs touch fewer lines.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "In the subdiff_distance comments added by the PR, grad_j should be grad_g (three occurrenc...
null
scikit-learn-contrib__skglm__280
scikit-learn-contrib/skglm
280
defect
fc6bc21da6b3b1ea4f0ad32537208839f671e9bb
3e3df79db0876af9d6fbe1a6bfd459fdd89d9d59
ENH Add support for GLasso and Adaptive (reweighted) GLasso
## Context of the PR Add Graphical Lasso and Adaptive Graphical Lasso estimators ## Contributions of the PR * A new GraphicalLasso estimator that can: 1. Handle weighted regularization. 2. Use two different algorithms to solve the GLasso problem: 2.1. The "Banerjee" approach as in Banerjee et al., 2008 (the...
diff --git a/examples/plot_graphical_lasso.py b/examples/plot_graphical_lasso.py new file mode 100644 index 000000000..85d4c0e17 --- /dev/null +++ b/examples/plot_graphical_lasso.py @@ -0,0 +1,113 @@ +import numpy as np +from numpy.linalg import norm +import matplotlib.pyplot as plt +from sklearn.metrics import f1_scor...
23
22
1
[{"id": "G0", "claim": "The PR's CI is failing: the added code needs to be linted with flake8 and the example needs to be formatted as Sphinx expects (a module docstring at the top).", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The example must sp...
null
scikit-learn-contrib__skglm__311
scikit-learn-contrib/skglm
311
defect
530c55a504b0bcf825c77ecabc4b4e8ccd67a0a8
6622cf04cbc1b128e93d9ec9ce768795b24dc46a
FEAT - Basic GeneralizedLinearEstimatorCV
## Context of the PR Implements a cross-validation wrapper for `GeneralizedLinearEstimator` along with a standalone example script. Provides hyperparameter grids over `alpha` and optional `l1_ratio`, custom k-fold splitting, warm starts, scoring, and final full-data refit (closes Issue #308 ). ## Contributio...
diff --git a/examples/plot_generalized_linear_estimator_cv.py b/examples/plot_generalized_linear_estimator_cv.py new file mode 100644 index 000000000..d9b06e08f --- /dev/null +++ b/examples/plot_generalized_linear_estimator_cv.py @@ -0,0 +1,28 @@ +""" +=================================== +Cross Validation for Generaliz...
22
17
6
[{"id": "G0", "claim": "The CV code should live in `skglm/cv.py` rather than in a file under penalties, since it is not related to penalties.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The CV score should not be the datafit loss; it should be negativ...
null
scikit-learn-contrib__skglm__312
scikit-learn-contrib/skglm
312
defect
530c55a504b0bcf825c77ecabc4b4e8ccd67a0a8
be991c135d3036cae8474ae154c9472ba63586cb
FEAT - Implement SmoothQuantileRegression
## Context of the PR This PR implements a smooth quantile regression estimator using a Huberized loss with progressive smoothing. The goal is to provide a faster alternative to scikit-learn's QuantileRegressor while maintaining similar accuracy. (closes #276 ) (Also it aims to simplify earlier approaches done in P...
diff --git a/examples/plot_smooth_quantile.py b/examples/plot_smooth_quantile.py new file mode 100644 index 000000000..2dc74c75d --- /dev/null +++ b/examples/plot_smooth_quantile.py @@ -0,0 +1,81 @@ +""" +QuantileHuber vs Sklearn +""" +import numpy as np +import time +from sklearn.linear_model import QuantileRegressor ...
17
16
1
[{"id": "G0", "claim": "The create_data helper adds nothing but a wrapper around make_regression and should be dropped in favour of calling make_regression directly in the example.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The example's plo...
null
scikit-learn-contrib__skglm__318
scikit-learn-contrib/skglm
318
defect
1d03cdb0f3f0e054d429d74cea1cd40ca8547ed2
caecdeb704cb97ef8632d36710b693026e29b7a6
FEAT - Implement PoissonGroup Datafit
## Context of the PR This PR adresses Issue #317 ## Contributions of the PR - Adds a new PoissonGroup class to /skglm/datafits/group.py for Poisson regression with group penalties. - Implements group-wise gradient and sparse gradient methods for the Poisson datafit. - temporary toy script to play with the d...
diff --git a/debug_poisson_group.py b/debug_poisson_group.py new file mode 100644 index 000000000..69fa32306 --- /dev/null +++ b/debug_poisson_group.py @@ -0,0 +1,30 @@ +import numpy as np +from skglm import GeneralizedLinearEstimator +from skglm.datafits.group import PoissonGroup +from skglm.penalties import WeightedG...
1
1
1
[{"id": "G0", "claim": "The reviewer asks the author to come up with a unit test to give the new PoissonGroup datafit more rigorous testing than the ad-hoc debug script.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
scikit-learn-contrib__skglm__323
scikit-learn-contrib/skglm
323
defect
296adf040419acfa549dff540a07069243bdfafa
9df9d8096c67038aac73551f163d81f0bae84dff
TST: Add sklearn <-> skglm match tests for Poisson and Gamma predictions
Follows up on #321 : Add unit tests verifying sklearn prediction compatibility This PR addresses the request from @mathurinm to add unit tests ensuring that skglm's Poisson and Gamma estimators produce the same predictions as sklearn on simple data. These tests validate that the prediction fix from #321 (applyin...
diff --git a/skglm/estimators.py b/skglm/estimators.py index 9a847240a..bb72da336 100644 --- a/skglm/estimators.py +++ b/skglm/estimators.py @@ -19,7 +19,7 @@ from skglm.solvers import AndersonCD, MultiTaskBCD, GroupBCD, ProxNewton, LBFGS from skglm.datafits import ( - Cox, Quadratic, Logistic, Poisson, PoissonG...
2
2
0
[{"id": "G0", "claim": "Replace the hardcoded isinstance check and np.exp in predict() with dispatch through a datafit-provided inverse_link method.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Merge the two sklearn-match tests into a single parametriz...
null
scikit-learn-contrib__skglm__44
scikit-learn-contrib/skglm
44
defect
8a581b01c4a81b317b778b728c85f2adf545c90a
972277adb55c4f561588279ddc9d95b8491127ec
API design with penalty and datafit jitted inside fit
This attempts to simplify the API of datafits by jit complying classes when fitting models. Currently, we have a distinct jit class for each type (e.g. ``Quadratic``, ``Quadratic_32``)
diff --git a/test_design.py b/test_design.py new file mode 100644 index 000000000..02012da5b --- /dev/null +++ b/test_design.py @@ -0,0 +1,278 @@ +import numpy as np +from numpy.linalg import norm +from scipy.sparse import issparse +# from numba.types import bool_ +from numba.experimental import jitclass +from numba im...
3
2
0
[{"id": "G0", "claim": "Asks whether functools.lru_cache can be used instead of the hand-rolled jit_closure cache, since the spec looks unhashable (making specs tuples would enable it).", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G6", "claim": "spec_to_floa...
null
scikit-learn-contrib__skglm__51
scikit-learn-contrib/skglm
51
defect
f7a19839b12ca9349b304e29a13932a5e4907a1d
7d1fe63da7a225f1a296c5d7ed7a8f66f7b5b7c9
[READY] ENH - Add modular Prox Newton solver
Following the discussion in [#49](https://github.com/scikit-learn-contrib/skglm/pull/49#issuecomment-1208340139) and the investigation on #50, this adds an improved version of the suggested PN solver in #49 and applies it to Logistic Regression. Other problems will be handled in upcoming PRs. The improvements ar...
diff --git a/skglm/datafits/single_task.py b/skglm/datafits/single_task.py index 26980ce6f..cd19224cd 100644 --- a/skglm/datafits/single_task.py +++ b/skglm/datafits/single_task.py @@ -126,6 +126,11 @@ def get_spec(self): def params_to_dict(self): return dict() + def raw_hessian(self, y, Xw): + ...
38
35
3
[{"id": "G0", "claim": "The reviewer asks whether numba has an equivalent of scipy's expit so that raw_hessian need not hand-compute the logistic terms.", "category": "maintainability", "verdict": "opposed", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The raw_hessian docstring writes 'hessian' in l...
null
scikit-learn-contrib__skglm__57
scikit-learn-contrib/skglm
57
defect
8900c6f2e8ca5583d094eb956e93dbb750b8d55f
5fe3d835e28af35ca920f244b1efc78f4e75418b
ENH add Square root Lasso
This proposes a Prox Newton solver for the Square root Lasso, and potentially closes #53 So far, the solver: - gives the same solution as statsmodels up to 5 decimals - is 10x faster than statsmodels you can reproduce these results using [example_sqrtlasso](https://github.com/Badr-MOUFAD/skglm/blob/sqrt-lasso...
diff --git a/example_sqrtlasso.py b/example_sqrtlasso.py new file mode 100644 index 000000000..e59d51600 --- /dev/null +++ b/example_sqrtlasso.py @@ -0,0 +1,100 @@ +import numpy as np +from numpy.linalg import norm +import matplotlib.pyplot as plt +from statsmodels.regression import linear_model + +from skglm.penalties...
13
13
6
[{"id": "G0", "claim": "The solver keeps going for vanishing residuals at small lambdas, so a dedicated sqrt-lasso path computation that interrupts once the residual norm drops below 1e-8*norm(y) is needed, on top of which a SqrtLasso class can be built.", "category": "design", "verdict": "supported", "priority": "P1",...
null
scikit-learn-contrib__skglm__66
scikit-learn-contrib/skglm
66
defect
92e1266438afaf5e1726306ea4ddddc1e8247b8d
a78cf119ffcae3196ef6fc69a26a1973a5f244db
Remove is_classif attribute of GeneralizedLinearModel
closes #65
diff --git a/doc/add.rst b/doc/add.rst index 232d514d7..60b70c8cb 100644 --- a/doc/add.rst +++ b/doc/add.rst @@ -4,13 +4,14 @@ With skglm, you can solve any custom Generalized Linear Model with arbitrary smooth datafit and arbitrary proximable penalty, by defining two classes: a ``Penalty`` and a ``Datafit``. -The...
1
1
0
[{"id": "G0", "claim": "The new is_classif assignment in _glm_fit could be written as `isinstance(datafit, (Logistic, QuadraticSVC))` for consistency with line 288.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}]
null
scikit-learn-contrib__skglm__92
scikit-learn-contrib/skglm
92
defect
8b08c09fa38cc5f7381ce407b16636181ff8c56c
d8ab26b4fa4d676c5261decb840db49238e3ae50
ENH Add SLOPE penalty
POC of the SLOPE penalty with FISTA solver. We should first merge #91 before this one.
diff --git a/poc_slope.py b/poc_slope.py new file mode 100644 index 000000000..c563bd04d --- /dev/null +++ b/poc_slope.py @@ -0,0 +1,98 @@ +from numba import njit, float64 +import numpy as np +from numpy.linalg import norm +from skglm.solvers import FISTA +from skglm.datafits import Quadratic +from skglm.penalties impo...
9
9
3
[{"id": "G0", "claim": "The alpha_max computation should take an absolute value (norm of X.T @ y over negative entries is wrong without abs).", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The SLOPE value() should use absolute values of w (np.sum(np...
null
scipp__scipp__1160
scipp/scipp
1,160
defect
5cdafd0818800f97f401ae9d96100554fac45736
9c503fad26e60833090e167aa8f363e4530d6bec
Add realign option to neutron.convert
Fixes #1148. - Add `realign` option to `neutron.convert`. Only supporting `'linear'` for now, `'log'` would probably also be useful at some point. - Added `linspace` as a helper. TODO: - [x] I'd like some advice on testing this. Just looking at the "small" modifications made to `convert_generic`, we have at lea...
diff --git a/core/include/scipp/core/except.h b/core/include/scipp/core/except.h index 9dc53734dd..e6b579270f 100644 --- a/core/include/scipp/core/except.h +++ b/core/include/scipp/core/except.h @@ -43,6 +43,11 @@ template <class T> MismatchError(const core::Dimensions &, const T &) -> MismatchError<core::Dimensi...
3
1
1
[{"id": "G0", "claim": "The fractional linspace test should write the expected values as exact literals 0.2 and 0.3 instead of 0.1 + 0.1 and 0.1 + 0.2.", "category": "testing", "verdict": "opposed", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "Consider adding a usage example of the new realign optio...
null
scipp__scipp__1215
scipp/scipp
1,215
defect
d963cb21b5b8f64f0eb9335dbe2278248555058e
997307914c668f5109035c7c7d1eec2a3f412e7f
Add support for variables with variances in comparisons
Fixes #1178. See there for discussion. This works if both or one of the operands have variances.
diff --git a/core/include/scipp/core/element/comparison.h b/core/include/scipp/core/element/comparison.h index 790ad96548..28f4979e32 100644 --- a/core/include/scipp/core/element/comparison.h +++ b/core/include/scipp/core/element/comparison.h @@ -17,8 +17,6 @@ namespace scipp::core::element { constexpr auto comparison...
2
1
0
[{"id": "G0", "claim": "The two ~30-line tests comparison_no_variance_lhs and comparison_no_variance_rhs look identical apart from operand order and could reuse code, e.g. via testing::Combine, though the reviewer marks it non-critical and possibly a follow-up.", "category": "maintainability", "verdict": "supported", "...
null
scipp__scipp__1271
scipp/scipp
1,271
defect
e0505ebec668b06aeb80e1747c8bb9c48590118f
bf6422537a97c835e038d4fbdd4ebeeb0afd9508
Various plotting fixes
Fixed 3 things: 1. Plotting with non-dim coord when dim coord is **not** present: ```Py N = 50 M = 10 x = np.arange(N).astype(np.float) y = np.arange(M).astype(np.float) z = np.random.random([M, N]) d1 = sc.Dataset() d1.coords['y'] = sc.Variable(['y'], values=y, unit=sc.units.m) d1['Signal'] = sc.Variable([...
diff --git a/core/include/scipp/core/element/rebin.h b/core/include/scipp/core/element/rebin.h index 80eafabc3f..04330e149d 100644 --- a/core/include/scipp/core/element/rebin.h +++ b/core/include/scipp/core/element/rebin.h @@ -17,6 +17,74 @@ namespace scipp::core::element { +struct AscendingRebin {}; +struct Desce...
4
3
0
[{"id": "G0", "claim": "Remove the blocks of commented-out code the pull request adds (the commented sorted_edges templates in core/include/scipp/core/histogram.h and the commented rebin_inner_detail lines in variable/rebin.cpp).", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "intro...
null
scipp__scipp__1355
scipp/scipp
1,355
defect
62c9226829b0622b6e8577d0a7d2413aad700394
a02e6fba2b6241b3a6590a09f91d84e99c782062
Bucket filtering and other cleanup
- Re-enable filtering docs page. Note that not everything is supported yet. - Copying slices of bucket variables works now. This can provide an intuitive way of filtering. - `bucketby` can now be "chained". Main application could be to add TOF or pulse-time buckets to an "event workspace", i.e., data with events for ...
diff --git a/benchmark/buckets_benchmark.cpp b/benchmark/buckets_benchmark.cpp index 5b2fad6a1d..a6893c28de 100644 --- a/benchmark/buckets_benchmark.cpp +++ b/benchmark/buckets_benchmark.cpp @@ -8,6 +8,7 @@ #include "scipp/dataset/dataset.h" #include "scipp/dataset/shape.h" #include "scipp/variable/bucket_model.h" +...
1
1
1
[{"id": "G0", "claim": "The copy_spans element-wise helper (arg_list covering double, float, int64, int32 and bool only) cannot handle strings, so copying slices of bucket variables with string dtype is not supported.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
scipp__scipp__1405
scipp/scipp
1,405
defect
8331ad13b2520c2fe6662acf3b9c584fad7d257f
0b57ed95f7d90b3a390eeb74122b37a2a1d3589c
Unified out arg
Previously, every transform kernel needed to have two separate implementations, one which returns a value and one which assign to an out parameter. This adds `assign_op` to `core::element` which acts as a wrapper around kernels. For instance, instead of writing ```.cpp VariableView abs(const VariableConstView &var, ...
diff --git a/core/include/scipp/core/element/math.h b/core/include/scipp/core/element/math.h index fd06c8f23b..9a592e6194 100644 --- a/core/include/scipp/core/element/math.h +++ b/core/include/scipp/core/element/math.h @@ -14,65 +14,48 @@ namespace scipp::core::element { -constexpr auto abs = [](const auto x) noex...
8
6
0
[{"id": "G0", "claim": "The ValueAndVariance overloads for exp/log/log10 could be left out of this PR (support disabled at the transform level via transform flags) and implemented later.", "category": "design", "verdict": "opposed", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "assign_op's operator()...
null
scipp__scipp__1416
scipp/scipp
1,416
defect
74be6ba0feb80e17bf4c8abab65aed3bf746ab5c
50d43d0232c8537034d75ea07efb7f549bdfff8a
Rename meta data properties
As discussed yesterday, renaming: - `coords` -> `meta` - `aligned_coords` -> `coords` - `unaligned_coords` -> `attrs`. Note that the change affected our file format, but since this was introduced after the last release there is no risk of breaking anything. - Fixes #1264. - Fixes #1253 (just use erase/extract...
diff --git a/docs/developer/concepts.ipynb b/docs/developer/concepts.ipynb index f24d629c30..6f5cc6d9c5 100644 --- a/docs/developer/concepts.ipynb +++ b/docs/developer/concepts.ipynb @@ -41,11 +41,11 @@ "metadata": {}, "outputs": [], "source": [ - "assert 'x' in da['x', 0:1].coords # range slice preserve...
11
4
1
[{"id": "G0", "claim": "The doc comment on the slicing assertion should not refer to \"unaligned\" at all.", "category": "documentation", "verdict": "uncertain", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "A see-also cross-reference between the related `meta`, `coords` and `attrs` properties would ...
null
scipp__scipp__1453
scipp/scipp
1,453
defect
1b51533bb923da8ca207cd3157fdcc232aef94a1
db07c9ed7b83733c9408bb97b708247f3a3574fe
Special value int support
Fix mentioned in #1451 While `std` special value mathematical functions such as `std::isinf` do not support ints, scipps element level equivalents are made to do so. returned true/false is essentially compile-time depending by function. `isnan` on ints always false for example. Makes scipps behaviour more like nump...
diff --git a/core/include/scipp/core/element/special_values.h b/core/include/scipp/core/element/special_values.h index 475e57a89e..7aebe22c3a 100644 --- a/core/include/scipp/core/element/special_values.h +++ b/core/include/scipp/core/element/special_values.h @@ -12,33 +12,43 @@ namespace scipp::core::element { +co...
1
1
0
[{"id": "G0", "claim": "Defining the `is_integer` trait wrapping `std::decay_t` is questionable style; prefer using `std::is_integral` directly (or a common base overloaded) and avoid defining the trait.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
scipp__scipp__1565
scipp/scipp
1,565
defect
a368bbc318ca33c0ac6667d52ed9b81396378c9d
13c8f559aec9af3123c37164a672659043bf5f93
Avoid division by zero in `__sizeof__`
Fixes #1555.
diff --git a/dataset/test/size_of_test.cpp b/dataset/test/size_of_test.cpp index 52f8bb06e4..b12c847a7c 100644 --- a/dataset/test/size_of_test.cpp +++ b/dataset/test/size_of_test.cpp @@ -17,7 +17,7 @@ class BucketVariableSizeOfTest : public ::testing::Test { protected: Dimensions dims{Dim::Y, 3}; Variable indice...
1
1
0
[{"id": "G0", "claim": "The std::max guard relies on the unverified assumption that other factors are zero when the buffer dim is 0; the reviewer asks to instead compute the distance and use an explicit distance != 0 check so that, if the assumption turns out to be false, the exception would still trigger in Python.", ...
null
scipp__scipp__1639
scipp/scipp
1,639
defect
1027ce3fe55f0e86276b893ec265af975e598758
634baf483dfcdd8dc57fd6ba7543d8fbef04280a
Datetime bindings
Fixes #1097 Allow copy Python -> C++ and reinterpret cast C++ -> Python. There are still some open questions: - Currently, `np.datetime64` is implemented as a typedef of `int64_t` which the bindings exploit. But this is just an implementation detail and could change. I would like to ensure correctness of the bi...
diff --git a/core/include/scipp/core/time_point.h b/core/include/scipp/core/time_point.h index 8268188915..a37d5f51a8 100644 --- a/core/include/scipp/core/time_point.h +++ b/core/include/scipp/core/time_point.h @@ -4,6 +4,7 @@ #pragma once #include <stdint.h> +#include <string> namespace scipp::core { diff --g...
6
6
2
[{"id": "G0", "claim": "The dtype of returned datetime arrays is hard-coded to datetime64[ns]; it should be chosen depending on the variable's unit instead.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The new test_construct_0d_datetime duplicates...
null
scipp__scipp__1739
scipp/scipp
1,739
defect
b19c4abd5a05d8ac890f358c126dcb0ad05588b4
c97dc4c833edd4fcbe1e06fd8ed519a3ea2895bd
More datetime
This implements `bin` with datetime edges and groups, as well as `groupby`.
diff --git a/core/include/scipp/core/dtype.h b/core/include/scipp/core/dtype.h index 0302dcbe3a..d317dfcdc3 100644 --- a/core/include/scipp/core/dtype.h +++ b/core/include/scipp/core/dtype.h @@ -14,9 +14,15 @@ namespace scipp::core { struct SCIPP_CORE_EXPORT DType { int32_t index; - bool operator==(const DType &...
2
2
0
[{"id": "G0", "claim": "For the time_point is_linspace overload, delta should be computed from the difference between the first two elements rather than averaged over the whole range, since averaging only makes sense for floats.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {...
null
scipp__scipp__1742
scipp/scipp
1,742
defect
d4ccd3b4cdfb2da6187e74df8bbdc4e7503a328c
8e353b07b193f8b0d84c029cbd358edd218886b6
Add checks ensuring that llnl/units exponents do not overflow or underflow
My PR for addition of the required helpers has been merged upstream, so we can now have working checks here. The old one checking for error unit didn't actually have the desired effect, since llnl/units just silently overflows/underflows.
diff --git a/units/test/unit_test.cpp b/units/test/unit_test.cpp index 224dc83b38..e3e78547b1 100644 --- a/units/test/unit_test.cpp +++ b/units/test/unit_test.cpp @@ -31,6 +31,18 @@ TEST(UnitTest, construct_bad_string) { EXPECT_THROW(Unit("abcde"), except::UnitError); } +TEST(UnitTest, overflows) { + // These wo...
1
1
0
[{"id": "G0", "claim": "sqrt can also fail - repeated sqrt of eV ends in an uncaught error unit - so the error handling for sqrt needs fixing like the other operations.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "pre_existing"}]
null
scipp__scipp__1836
scipp/scipp
1,836
defect
606e62bff1a7f0c139945cc788e1f7d90f844142
d514f37deb8244914e1dfb9dd9df43b4d6fad4e5
Fix bin with 2d input edges
Fixes #1821 by remove overly restrictive dim check in `accumulate_in_place`.
diff --git a/dataset/test/bin_test.cpp b/dataset/test/bin_test.cpp index bbabfb0d52..6b8038ad1c 100644 --- a/dataset/test/bin_test.cpp +++ b/dataset/test/bin_test.cpp @@ -219,7 +219,7 @@ TEST_P(BinTest, rebin_2d_with_2d_coord) { auto table = GetParam(); auto xy = bin(table, {edges_x_coarse, edges_y_coarse}); V...
1
1
1
[{"id": "G0", "claim": "Add a test that the output variable of accumulate_in_place is unchanged when the dimension check fails, since the check now happens later (inside transform_data).", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
scipp__scipp__1899
scipp/scipp
1,899
defect
663e54ebdcd2f9250a1cf1cbe6cf50bc816608c1
72f49f215b1ca58175c07e6a34a737b3a44c9ede
Improve data array tests
- Improve/cleanup some tests. - Ensure data arrays binary ops deep-copy masks in ops with variables.
diff --git a/dataset/include/scipp/dataset/map_view.h b/dataset/include/scipp/dataset/map_view.h index 48b1978472..e568bad0b4 100644 --- a/dataset/include/scipp/dataset/map_view.h +++ b/dataset/include/scipp/dataset/map_view.h @@ -196,4 +196,7 @@ template <class Masks> SCIPP_DATASET_EXPORT Variable masks_merge_if_cont...
4
2
0
[{"id": "G0", "claim": "The purpose of the assertion `EXPECT_FALSE(out.data().is_same(var))` in GeneratedBinaryTest.DataArray_Variable is not evident from the test code.", "category": "maintainability", "verdict": "opposed", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The GeneratedUnaryTest.DataArr...
null
scipp__scipp__1932
scipp/scipp
1,932
defect
bf80c7bdf7a8043d46318a52885b8d1a474abec2
673c6c26dfadc649cb4a3bb232f3839eb987935f
Support masks in `groupby` reductions `min`, `max`, `all`, and `any`
Previously masks where only supported for `sum` and `mean`. - Generalize `masked_to_zero` to `where` (will add Python bindings separately). - Nicer and unified code.
diff --git a/CMakeLists.txt b/CMakeLists.txt index 2118a26c52..b0e6baec18 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -144,6 +144,7 @@ if(NOT WIN32) -Wold-style-cast -Wcast-qual -Wcast-align + -Werror=attributes -Werror=return-type ) add_compile_options( diff --git a/core/include/sc...
1
1
1
[{"id": "G0", "claim": "In masked `nanmean`, the element count should be computed with `!isnan` instead of `isfinite` for consistency with numpy, where `np.nanmean([1, 2, np.inf])` returns `np.inf`.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
scipp__scipp__1941
scipp/scipp
1,941
defect
1e92570e8c7547bfd05b9da5c1a1ae95a3ca31d1
a35cc2d752d8d7fae2b7065e2049bf04ac0f8c45
isclose for vectors
Operation `isclose` currently fails. But approximate/fuzzy comparison would be useful.
diff --git a/core/include/scipp/core/element/comparison.h b/core/include/scipp/core/element/comparison.h index df3be85791..f95a265122 100644 --- a/core/include/scipp/core/element/comparison.h +++ b/core/include/scipp/core/element/comparison.h @@ -8,15 +8,17 @@ #include "scipp/common/numeric.h" #include "scipp/commo...
3
3
1
[{"id": "G0", "claim": "isclose should also support NaN as vector elements; the norm-based comparison (and isclose_equal_nan, which excludes vector types) currently does not handle NaN vector elements.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "...
null
scipp__scipp__2058
scipp/scipp
2,058
defect
75bb2a94bae09a1c61b0c61f01ff5b1e7722fd67
e52541e58f97dfdd3f2cb28acb7ee98d58c87992
Add `transform_coords`
This is the result of https://github.com/scipp/scippneutron/issues/117, where we found a way to generalize the concept of "unit conversions" to coordinate transformations that are not neutron-scattering specific. Todo: - [x] Dataset support - [x] Documentation - [x] Results may depend on order of output spec, if ...
diff --git a/dataset/map_view.cpp b/dataset/map_view.cpp index a8c8e48760..4387e7008a 100644 --- a/dataset/map_view.cpp +++ b/dataset/map_view.cpp @@ -212,14 +212,6 @@ Dict<Key, Value> &Dict<Key, Value>::setSlice(const Slice s, const Dict &dict) { template <class Key, class Value> void Dict<Key, Value>::rename(const ...
15
12
2
[{"id": "G0", "claim": "transform_coords should offer options to remove intermediate results and to not rename dimensions (may be done in a later step).", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "User-defined conversion graphs can contain cycles, whi...
null
scipp__scipp__2114
scipp/scipp
2,114
defect
a0f7c1d5eb4a42ca2e2e320dee0c081c75ec13c5
44038bc253f68936399f85cd439cceb89bb18615
Add inplace binary operations for matrix types
Fixes #2113 Add *= for Matrix types makes compound rotations far more convenient.
diff --git a/core/include/scipp/core/element/arithmetic.h b/core/include/scipp/core/element/arithmetic.h index c87fbdf659..22efca3167 100644 --- a/core/include/scipp/core/element/arithmetic.h +++ b/core/include/scipp/core/element/arithmetic.h @@ -14,8 +14,8 @@ namespace scipp::core::element { constexpr auto add_inp...
4
3
3
[{"id": "G0", "claim": "Adding += and -= support for Eigen::Matrix3d (the rotation matrix dtype) is questionable, and the reviewer feels it should be dropped, since for scipp the matrix dtype really means rotation where only * is meaningful and element access or a diag() function suffices for scaling matrices.", "categ...
null
scipp__scipp__2218
scipp/scipp
2,218
defect
e71879848e05cbfffed76d685aedaa180e595d36
92af3bef762ee4dc5c572da0d27f6227d44c7b0e
Use double precision for accumulants in sum-type operations
Fixes #493. Motivation why this is implemented now: We ran into trouble with some small real event data, which uses float32 weights (all initialized to 1). Summing all the counts leads to inconsistent results. Does this solution make sense? The proposed approach is not perfect: For example, if we sum along all...
diff --git a/core/include/scipp/core/element/cumulative.h b/core/include/scipp/core/element/cumulative.h index f2617733d4..47c1b3228d 100644 --- a/core/include/scipp/core/element/cumulative.h +++ b/core/include/scipp/core/element/cumulative.h @@ -14,7 +14,7 @@ namespace scipp::core::element { // ValueAndVariance befor...
4
1
0
[{"id": "G0", "claim": "Automatically using double precision for float32 input in sum-type operations is questionable: users pick single precision for a reason (speed or memory), and the change breaks the speed assumption and potentially the memory assumption.", "category": "design", "verdict": "opposed", "priority": "...
null
scipp__scipp__2249
scipp/scipp
2,249
defect
8dcd939b7ac131470e9d54cfa2ac17e3ee803ba6
d90fcf6229d95bc298a7b11c2f1b9d9fff5142a3
Support D,M,Y units when printing datetime
Handling months and years is tricky because there seems to be no way to construct a `std::chrono::time_point` from a number of months (years) offset from the epoch. `std::chrono::months` uses average gregorian months (similar for `years`) which means that, e.g., ```.cpp std::chrono::time_point{std::chrono::months{3}}...
diff --git a/core/string.cpp b/core/string.cpp index b9d816cc74..47edd62ff8 100644 --- a/core/string.cpp +++ b/core/string.cpp @@ -96,6 +96,45 @@ std::string to_string(const std::chrono::duration<Rep, Period> &duration) { } return oss.str(); } + +constexpr std::chrono::year_month_day epoch{ + std::chrono::yea...
4
4
0
[{"id": "G0", "claim": "Since time (and possibly day) is somewhat ill-defined for month/year units, to_string_year_month should probably format only year and month (and day?) instead of a full date-time with T00:00:00.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1"...
null
scipp__scipp__2251
scipp/scipp
2,251
defect
6b8049af793385383ef8f28b5c1b215d76423eaa
1ecd17c3ca7327df162e8c4584ac3894b4e0cbc9
Add dim property
Fixes #2248
diff --git a/core/except.cpp b/core/except.cpp index 058f61ee12..d32f4d421a 100644 --- a/core/except.cpp +++ b/core/except.cpp @@ -68,10 +68,12 @@ void throw_cannot_have_variances(const DType type) { } // namespace scipp::except namespace scipp::core::expect { -void dimensionMatches(const Dimensions &dims, const Di...
2
1
0
[{"id": "G0", "claim": "The docstring added for the Python `dim` property misspells \"if\" as \"fo\" and should read \"if the data is not 1-dimensional.\".", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The new dim tests in variable_scalar_accesso...
null
scipp__scipp__2299
scipp/scipp
2,299
defect
3a9056ecc2b7f67066399c1e6ce09502dbe52d67
232075b695a3f37f9a7e4d354ca24e2e63feb6d9
Fix cppcheck warnings
Fixes #2291 Please review if the suppressions make sense!
diff --git a/cppcheck-suppressions.txt b/cppcheck-suppressions.txt index fe456aced2..168f83ebcf 100644 --- a/cppcheck-suppressions.txt +++ b/cppcheck-suppressions.txt @@ -1 +1,37 @@ useStlAlgorithm + +// clang-tidy's google-explicit-constructor matches our style better. +noExplicitConstructor + +// We often use `size`...
4
3
1
[{"id": "G0", "claim": "Asks why the assertion EXPECT_TRUE(numeric::isinf(numeric::pow(0, -3.2))); was removed from the test, i.e. whether dropping that coverage was justified.", "category": "testing", "verdict": "uncertain", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The double (and int) paramete...
null
scipp__scipp__2385
scipp/scipp
2,385
defect
e7b7cce7499615994a177c2a622dc8514c9a2cbe
954567504fff63cfe977368d29bd2998f2d5866b
Add squeeze
Fixes #2346
diff --git a/docs/about/release-notes.rst b/docs/about/release-notes.rst index 5e379a3492..43274d8384 100644 --- a/docs/about/release-notes.rst +++ b/docs/about/release-notes.rst @@ -10,6 +10,7 @@ Features ~~~~~~~~ * Added support for :py:func:`abs` to :py:class:`scipp.DataArray`, :py:class:`scipp.Dataset`, :py:cla...
2
2
0
[{"id": "G0", "claim": "dims_for_squeezing should iterate over data_dims directly rather than calling data_dims.labels().", "category": "correctness", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "squeeze should also accept a single dimension as a plain string (numpy-style, e....
null
scipp__scipp__2423
scipp/scipp
2,423
defect
d97b0cb2c659105eb9bfc11de386b3ad0fe4410a
59682966510a2ec789f43da2ccd0c2ee8b90b965
Support strides when slicing
- Fixes #860. - Does not support negative strides, since this is (maybe) considerably more complex and (definitely) more risky (in terms of test coverage).
diff --git a/docs/about/release-notes.rst b/docs/about/release-notes.rst index 2f0d50be83..67916de8ba 100644 --- a/docs/about/release-notes.rst +++ b/docs/about/release-notes.rst @@ -17,6 +17,7 @@ Features * :py:func:`sc.fold` now supports ``-1`` for one of the dimension sizes, to indicate automatic shape `#2414 <http...
3
3
0
[{"id": "G0", "claim": "The new docs example should show a case with stride != 1 instead of `var['x', 1:4:1]`.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Add a test case with `stride > end-begin` for `Sizes::slice` to confirm that case works."...
null
scipp__scipp__2469
scipp/scipp
2,469
defect
f5cc733f73209c67b2a7ed4ef262cb302f2caa85
2515c3ac7cc1dbc58023f963a7fd499994ffdfa6
Provide a properly public `find_bin_edge_dims`
Fixes #2468 There are a bunch of fixes to docstrings because those functions are now documented as part of the utils module and sphinx started complaining.
diff --git a/docs/about/release-notes.rst b/docs/about/release-notes.rst index 30ddec9158..5de0f5f24f 100644 --- a/docs/about/release-notes.rst +++ b/docs/about/release-notes.rst @@ -9,6 +9,8 @@ v0.13.0 (unreleased) Features ~~~~~~~~ +* Added :mod:`scipp.utils.bin_edges` with helpers to detect bin-edges `#2469 <htt...
5
3
3
[{"id": "G0", "claim": "Making all of scipp.utils public and documented would lose the ability to treat those functions as changeable implementation details, so the added functionality should be placed elsewhere or only selected functions documented publicly.", "category": "design", "verdict": "supported", "priority": ...
null
scipp__scipp__2843
scipp/scipp
2,843
defect
0f2ae54be9113594dfa10e2ad557b76de20371d3
e0d146992048af4f22ba44e21073d041cabfa059
Disallow custom units
Affects LLNL/Units custom units like CXCUN[...], CXUN[...], and equation units.
diff --git a/docs/about/release-notes.rst b/docs/about/release-notes.rst index 2e9cd5d77a..96c9e9ad9d 100644 --- a/docs/about/release-notes.rst +++ b/docs/about/release-notes.rst @@ -52,6 +52,7 @@ Breaking changes ~~~~~~~~~~~~~~~~ * Changed how units are stored in HDF5 files. Old files can still be loaded but new f...
1
1
0
[{"id": "G0", "claim": "The test string \"CXUN{1023]\" intentionally using mixed bracket types is a typo and should be \"CXUN[1023]\".", "category": "correctness", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
scipp__scipp__2966
scipp/scipp
2,966
defect
18c68f207686b5c2925ab17577404886671541da
bd29c2d6baab8f20f04529d24554c05ce26d4909
Error with better explanation when binary operation fails due to non-boolean masks
Fixes #2944
diff --git a/docs/about/release-notes.rst b/docs/about/release-notes.rst index 282ceb996c..c6d1ad3f09 100644 --- a/docs/about/release-notes.rst +++ b/docs/about/release-notes.rst @@ -73,6 +73,8 @@ Deprecations Stability, Maintainability, and Testing ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +* Added type check of mas...
2
1
0
[{"id": "G0", "claim": "The error message for non-boolean masks would be more useful if it included the name of the offending mask (e.g. \"Cannot combine non-boolean mask '\" + key + \"' in operation.\") instead of a generic note.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"},...
null
scipp__scipp__3040
scipp/scipp
3,040
defect
bc08cac4f2a464e30e1239d67b08542011304d34
57001b142c8d9739492196498a5644cc4214a04f
Add inverse for transforms
Fixes #3039 In general, it is better to not invert matrices but solve systems of equations with concrete inputs because this is less prone to floating point effects. But most inversions here are rather simple and easy to invert without incurring a loss in precision. So computing actual inverses is likely fine in mos...
diff --git a/lib/cmake/scipp-functions.cmake b/lib/cmake/scipp-functions.cmake index 64f785fe38..7817f9161b 100644 --- a/lib/cmake/scipp-functions.cmake +++ b/lib/cmake/scipp-functions.cmake @@ -25,6 +25,7 @@ scipp_unary(math ceil OUT) scipp_unary(math rint OUT) scipp_unary(math erf) scipp_unary(math erfc) +scipp_un...
8
8
2
[{"id": "G0", "claim": "The Translation constructor taking Eigen::Vector3d by value with std::move may be a pessimisation; the reviewer is wary despite Eigen treating Vector3d as an exception and suggests passing by const reference.", "category": "performance", "verdict": "supported", "priority": "P2", "scope": "introd...
null
scipp__scipp__3250
scipp/scipp
3,250
defect
902eba91ea58b87bf937cdaf8139273f55564db7
eb5c763bc49059df6ab10f6f16a769821ea5f3f7
fix: add appropriate type combinations
Fixes #3176. Is there a reason why `float` was excluded in the original `arg_list`? Now I just added all type combinations between `double, float, int32_t, int64_t`.
diff --git a/lib/core/include/scipp/core/element/bin_detail.h b/lib/core/include/scipp/core/element/bin_detail.h index 7afe90a6a7..a811ce1161 100644 --- a/lib/core/include/scipp/core/element/bin_detail.h +++ b/lib/core/include/scipp/core/element/bin_detail.h @@ -16,9 +16,14 @@ using bin_range_arg = std::tuple<scip...
3
3
3
[{"id": "G0", "claim": "The newly added type combinations may make comparisons misbehave in ways that unintentionally drop parts of the data, and the reviewer asks whether this has been considered and checked.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "c...
null
scipy__scipy__18605
scipy/scipy
18,605
defect
28697172c55070d61ee916f9d784c6a4ffa49191
85547baf9e18d560e8cfac9a17a272501327f2e6
ENH: special: add `softplus`
#### Reference issue Closes #17905 #### What does this implement/fix? This Pull Request implements a numerically stable version of the softplus function by wrapping the logaddexp function of the numpy API. All test cases have been covered. #### Additional information No.
diff --git a/scipy/special/__init__.py b/scipy/special/__init__.py index 165d223585c7..64d33b3489f6 100644 --- a/scipy/special/__init__.py +++ b/scipy/special/__init__.py @@ -739,6 +739,7 @@ spence -- Spence's function, also known as the dilogarithm. zeta -- Riemann zeta function. zetac --...
14
12
3
[{"id": "G0", "claim": "The softplus docstring should follow NumPy docstring formatting (unindented section bodies, `x : array_like` style, named return), as given in the suggestion block.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The formula...
null
scipy__scipy__20035
scipy/scipy
20,035
defect
a6587b6c1a806d384b292592423693e4c573882c
79e647cb9601cc5b7e4c7fe2ff69b9e74403aa96
BUG: spatial.HalfspaceIntersection: raise on non-feasible half space
* Fixes #19865 * Rather than returning a problematic half space intersection polytope, we raise an error for incremental processing when a new half space is added for which the interior point is no longer clearly interior [skip cirrus]
diff --git a/scipy/spatial/_qhull.pyx b/scipy/spatial/_qhull.pyx index ffc6cb5dfe37..46b953d693f8 100644 --- a/scipy/spatial/_qhull.pyx +++ b/scipy/spatial/_qhull.pyx @@ -2870,6 +2870,15 @@ class HalfspaceIntersection(_QhullUser): of halfspaces is also not possible after `close` has been called. """...
5
4
3
[{"id": "G0", "claim": "The per-halfspace feasibility loop could be vectorized with numpy for performance and idiomatic style instead of iterating over halfspaces one at a time.", "category": "performance", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The QhullError message c...
null
scipy__scipy__20321
scipy/scipy
20,321
defect
e4655a65036585d2c91ff8fb336b0cbce01a3b3f
597a12f580bf5e4784aa1ed3280c33874e116eed
BUG: Fix for scipy.special seterr, geterr, errstate
#### What does this implement/fix? <!--Please explain your changes.--> This PR is an alternative to #20316. `scipy.special.seterr`, `scipy.special.geterr`, `scipy.special.errstate` currently do not work for ufuncs not implemented in the extension module `_ufuncs` (whose cython code is generated by `_generate_pyx.py`)...
diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 51d417901d37..8a37c32ed46a 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -144,9 +144,24 @@ jobs: run: | python -m build --no-isolation -x -Csetup-args="-Duse-pythran=false" + ...
5
3
2
[{"id": "G0", "claim": "The shared library module should not be public API; naming it with a leading underscore should avoid having to add it to the test_public_api skip list.", "category": "design", "verdict": "opposed", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The delvewheel/unpacking workarou...
null
scipy__scipy__20397
scipy/scipy
20,397
defect
e2e39f691c048b8ad6dd5e7d4eb5a396a81f8dd3
32662a79c2f9f97d070e6c98170f24fb722bc0ff
ENH: Support scalar-first order of quaternion components in 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...
diff --git a/scipy/spatial/transform/_rotation.pyi b/scipy/spatial/transform/_rotation.pyi index e7665001535e..7b59f8bff416 100644 --- a/scipy/spatial/transform/_rotation.pyi +++ b/scipy/spatial/transform/_rotation.pyi @@ -15,7 +15,7 @@ class Rotation: def single(self) -> bool: ... def __len__(self) -> int: ....
7
4
1
[{"id": "G0", "claim": "The from_quat docstring (and others) should state explicitly which component order corresponds to scalar_first = False.", "category": "documentation", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The new scalar-first tests are more elaborate than neede...
null
scipy__scipy__20405
scipy/scipy
20,405
defect
2e7690b40c736474d2e493cb8a7ea7e7f10d78dc
f35142ec900607432ecc884ba4230af05bd0a3c3
BUG: Fix pair of bugs in Amos and Cephes yv which masked each other
This PR fixes a pair of matching bugs in cephes and amos respectively which went unnoticed because they cancel each other out. I discovered this while working on #20390. The issues ## Amos Here in the original Fortran https://github.com/scipy/scipy/blob/f133c27843a36c8fe1c2979b3a072ac4f5a00624/scipy/special/a...
diff --git a/scipy/special/cephes/yn.c b/scipy/special/cephes/yn.c index c02ff0acd853..b0c450e6c22b 100644 --- a/scipy/special/cephes/yn.c +++ b/scipy/special/cephes/yn.c @@ -98,7 +98,7 @@ double yn(int n, double x) r += 2.0; ++k; } - while (k < n); + while (k < n && isfinite(an)); return (sign ...
2
1
1
[{"id": "G0", "claim": "yn, a public/exposed interface whose behavior this PR changes, should be regression-tested directly, e.g. asserting that cephes.yn(500, 1) == -inf.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The test file's use of the `cephes...
null
scipy__scipy__20685
scipy/scipy
20,685
defect
7e69656229b6f1a8af7cd06afb87c2fe0acee63c
506c9a4b293c006277d242c3adfe0f57f72ed814
MAINT: Add graceful handling of invalid initial brackets to elementwise bracket finding functions
<!-- 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...
diff --git a/scipy/_lib/_elementwise_iterative_method.py b/scipy/_lib/_elementwise_iterative_method.py index 1c7820bbfdff..2252a3a9717a 100644 --- a/scipy/_lib/_elementwise_iterative_method.py +++ b/scipy/_lib/_elementwise_iterative_method.py @@ -18,6 +18,7 @@ _ECONVERR = -2 _EVALUEERR = -3 _ECALLBACK = -4 +_EINPUTE...
6
6
0
[{"id": "G0", "claim": "The logic in `_bracket_root` that builds the invalid-bracket boolean index is convoluted (shape compatibility forces an awkward 0-d special case and self-concatenation) and should be restructured — moved up next to `eim._initialize`, comparing against the broadcast, raveled components of `xs`, s...
null
scipy__scipy__20785
scipy/scipy
20,785
defect
de8d573ad46749ed377cf83062312521c98d7ff0
e61b040fa8c5afc8ae8bdb2723014673cf2ed048
ENH: `stats.nct.pdf`: increase range in left tail using boost
#### Reference issue Closes #20693 #### What does this implement/fix? - Use boost for the PDF of the noncentral T distribution - Updates boost to latest develop branch <details><summary>Plot generation</summary> <p> ```python import numpy as np from mpmath import mp from scipy.stats import nct import...
diff --git a/scipy/_lib/boost_math b/scipy/_lib/boost_math index a53b013c735c..52be1ad7f203 160000 --- a/scipy/_lib/boost_math +++ b/scipy/_lib/boost_math @@ -1 +1 @@ -Subproject commit a53b013c735caa98179532a32ad24d34569b9710 +Subproject commit 52be1ad7f203945b874078e969703b105dceeba5 diff --git a/scipy/special/_add_n...
1
1
1
[{"id": "G0", "claim": "The PR's Boost update makes the non-central F distribution no longer emit the warning asserted by test_ncf_ppf_issue_17026, so that test fails in CI (also reproduced locally with clang 16.0.6).", "category": "correctness", "verdict": "supported", "priority": "P0", "scope": "introduced"}]
null
scipy__scipy__21454
scipy/scipy
21,454
defect
4d2c9e050663efd54396a3d8749792fad0b55dde
46f767178c85e9170a86c9612e7e96d31d2f7fae
ENH: special: Add root finding tools to xsf and implement gdtrib for GPU while making substantial improvements
<!-- 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...
diff --git a/scipy/special/_add_newdocs.py b/scipy/special/_add_newdocs.py index 586483dfe8ab..5796e69b193e 100644 --- a/scipy/special/_add_newdocs.py +++ b/scipy/special/_add_newdocs.py @@ -5535,6 +5535,75 @@ def add_newdoc(name, doc): gdtria : Inverse with respect to `a` of `gdtr(a, b, x)`. gdtrix : Inverse...
22
17
4
[{"id": "G0", "claim": "The `if (y_frontier == 0.0)` block in the bracket finder's boundary-stop handling is redundant because that condition is already checked earlier in the loop and returns.", "category": "correctness", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Once `pl...
null
scipy__scipy__21495
scipy/scipy
21,495
defect
fd2a23c46ccd0d66b78feeb5432519af2570b17a
b63a42b1b6ddbc0b6486eee1780ea8c6ba4d4f89
BUG: special: Fix hyperu for b = 1, small x, small a
<!-- Thanks for contributing a pull request! Please ensure that your PR satisfies the checklist before submitting: https://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: https://scipy...
diff --git a/scipy/special/_hypergeometric.pxd b/scipy/special/_hypergeometric.pxd index d3b4b6ea7ca5..4eeafd4c7a68 100644 --- a/scipy/special/_hypergeometric.pxd +++ b/scipy/special/_hypergeometric.pxd @@ -26,5 +26,9 @@ cdef inline double hyperu(double a, double b, double x) noexcept nogil: else: ...
4
3
2
[{"id": "G0", "claim": "Negative values of a should be included in the tests.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The fix likely still has a rough edge as a approaches -1 because the recurrence calls with a+1, which lands in the problem regio...
null
scipy__scipy__21744
scipy/scipy
21,744
defect
e5728bfde64c0678c8e578e363fde82f04315520
4796fe7776bf66be40e5828d9b60f298f2d74d6a
ENH: special: Extend Riemann Zeta function to complex inputs
<!-- Thanks for contributing a pull request! Please ensure that your PR satisfies the checklist before submitting: https://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: https://scipy...
diff --git a/scipy/special/_basic.py b/scipy/special/_basic.py index 7a59257d3c1d..8ef8de734df8 100644 --- a/scipy/special/_basic.py +++ b/scipy/special/_basic.py @@ -3393,10 +3393,15 @@ def zeta(x, q=None, out=None): Parameters ---------- - x : array_like of float - Input data, must be real + ...
18
15
4
[{"id": "G0", "claim": "The commented test-generation block labelled 'points in critical strip' includes points outside the critical strip (negative real part), so the label should be corrected or the cases limited to the critical strip.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope"...
null
scipy__scipy__21773
scipy/scipy
21,773
defect
7709038a23152e6333fa3ef2c1fbe2c10d4181a4
cf91afc5fdc300c5c26b0656a04d04dd4a2d1ab9
DEP: special: Remove `special.btdtr` and `special.btdtri`
<!-- Thanks for contributing a pull request! Please ensure that your PR satisfies the checklist before submitting: https://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: https://scipy...
diff --git a/scipy/special/__init__.py b/scipy/special/__init__.py index 07a802246a69..2070fca2e767 100644 --- a/scipy/special/__init__.py +++ b/scipy/special/__init__.py @@ -231,10 +231,8 @@ .. autosummary:: :toctree: generated/ - btdtr -- Cumulative distribution function of the beta distribution. - ...
1
1
0
[{"id": "G0", "claim": "Remove the _depr_msg message template from scipy/special/__init__.py if it is not used anywhere else.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "pre_existing"}]
null
scipy__scipy__22081
scipy/scipy
22,081
defect
aba0dc1d1dc8cd060f0041caf8f8c7809c74f225
8d86c30ee5d15c033ef45f7dafb4b13fe84aae4a
MAINT: Add `__str__` overrides for distributions in new infra to fix plot titles
<!-- Thanks for contributing a pull request! Please ensure that your PR satisfies the checklist before submitting: https://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: https://scipy...
diff --git a/scipy/stats/_distribution_infrastructure.py b/scipy/stats/_distribution_infrastructure.py index 61fa28635975..c5ae0e5f5efb 100644 --- a/scipy/stats/_distribution_infrastructure.py +++ b/scipy/stats/_distribution_infrastructure.py @@ -1800,6 +1800,16 @@ def __repr__(self): info.append(str_parameter...
1
1
0
[{"id": "G0", "claim": "The new `__str__` override should return `f\"abs({str(self._dist)})\"` rather than `f\"abs({repr(self._dist)})\"`.", "category": "correctness", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
scipy__scipy__22228
scipy/scipy
22,228
defect
7f7f04caa4a55306a9c6613c89eef91fedbd72d4
4defeedaeb47c90b51abf56b7b76ea4b3d4ed693
ENH: linalg.lapack: wrap ?sytri and ?hetri
<!-- Thanks for contributing a pull request! Please ensure that your PR satisfies the checklist before submitting: https://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: https://scipy...
diff --git a/scipy/linalg/flapack_sym_herm.pyf.src b/scipy/linalg/flapack_sym_herm.pyf.src index d0decd33c92e..c3d0db143451 100644 --- a/scipy/linalg/flapack_sym_herm.pyf.src +++ b/scipy/linalg/flapack_sym_herm.pyf.src @@ -1410,3 +1410,40 @@ subroutine <prefix2c>heequb(lower,n,a,lda,s,scond,amax,work,info) integer...
2
1
1
[{"id": "G0", "claim": "The a dimension should be (lda, n) with lda = max(1, shape(a, 0)) instead of (n, n) with lda = max(n, 1), so LAPACK's row-count/column-count conventions are respected.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The work d...
null
scipy__scipy__22273
scipy/scipy
22,273
defect
dc8e8d5d90cd825da9576c194c970f2c2e6dca4a
7e0bc0499fdc1bbf7d420f9f89d13db94b7bdc1d
ENH: linalg.solve: use gbcon
<!-- Thanks for contributing a pull request! Please ensure that your PR satisfies the checklist before submitting: https://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: https://s...
diff --git a/scipy/linalg/_basic.py b/scipy/linalg/_basic.py index 9eb73a0e39e5..c16a1e0fc7bb 100644 --- a/scipy/linalg/_basic.py +++ b/scipy/linalg/_basic.py @@ -315,14 +315,14 @@ def solve(a, b, lower=False, overwrite_a=False, rcond, info = _gtcon(dl, d, du, du2, ipiv, anorm) # Banded case elif ass...
2
1
1
[{"id": "G0", "claim": "The new banded-solve gbcon path segfaults, probably because the zero-indexed ipiv returned by the gbsv wrapper is passed unchanged to gbcon, which expects 1-indexed pivots; the pivots should be made 1-indexed before the LAPACK call, with the author proposing to do the increment inside the gbcon ...
null
scipy__scipy__22304
scipy/scipy
22,304
defect
37ea990aecf3e498d4dd0b23def0477d885ec6c5
4938d3dcb73fc5f84399edd39db90adf90691fed
ENH: stats.special_ortho_group: speed up, allow 1x1 and 0x0 ortho and unitary groups
#### What does this implement/fix? - Closes #22303 - Allows to use symmetric group distributions with `dim=0` and `dim=1` #### Additional information The motivation for the second change is that the existing code actually already works with `dim=1` and `dim=0`. Not special-casing small sizes is a general desi...
diff --git a/scipy/stats/_multivariate.py b/scipy/stats/_multivariate.py index be303fe087bd..ba07e171f0ac 100644 --- a/scipy/stats/_multivariate.py +++ b/scipy/stats/_multivariate.py @@ -3620,9 +3620,9 @@ def __call__(self, dim=None, seed=None): def _process_parameters(self, dim): """Dimension N must be...
5
3
2
[{"id": "G0", "claim": "The previous seed of test_haar happened to fail, so the seed was changed to 513 without checking whether the test still passes at its intended rate.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The new tests should use the ...
null
scipy__scipy__22425
scipy/scipy
22,425
defect
b396430f57b17c16bd280ce518ed1ac3adf6aaf2
a217739d7a2438c594646a13aae71925369b5d48
MAINT: special: Update handling of `betainc` and `betaincc` edge cases
<!-- Thanks for contributing a pull request! Please ensure that your PR satisfies the checklist before submitting: https://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: https://scipy...
diff --git a/scipy/special/_add_newdocs.py b/scipy/special/_add_newdocs.py index 93eca8eca60c..b20a883dc87d 100644 --- a/scipy/special/_add_newdocs.py +++ b/scipy/special/_add_newdocs.py @@ -792,6 +792,21 @@ def add_newdoc(name, doc): function by multiplying the result of ``betainc(a, b, x)`` by ``beta(a, b)`...
4
4
1
[{"id": "G0", "claim": "Add test cases covering the infinite `a`/`b` limiting cases that the new betainc/betaincc handling introduces.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "In the betainc docstring, change \"although it should be\" to \"althoug...
null
scipy__scipy__22532
scipy/scipy
22,532
defect
508b5d5ee717f8fda786fd1ed3e85f1c31c3d84a
ea4eddc2797c5fe82e1e6a458ab12206f4714115
BUG: Remove warning for genextreme.stats(0.0, moments='mvsk')
<!-- Thanks for contributing a pull request! Please ensure that your PR satisfies the checklist before submitting: https://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: https://scipy...
diff --git a/scipy/stats/_continuous_distns.py b/scipy/stats/_continuous_distns.py index a85f4591b21a..fd35bfdf1522 100644 --- a/scipy/stats/_continuous_distns.py +++ b/scipy/stats/_continuous_distns.py @@ -3431,29 +3431,46 @@ def g(n): g3 = g(3) g4 = g(4) g2mg12 = np.where(abs(c) < 1e-7, (c*...
3
3
2
[{"id": "G0", "claim": "The new masked-assignment code in genextreme._stats should follow the existing precedent and use `_lazywhere` for concision and consistency (with the fillvalue on the side where the condition is not true), and per PEP8 no spaces should be added around exponents.", "category": "maintainability", ...
null
scipy__scipy__22971
scipy/scipy
22,971
defect
da7717ec686eceeb054168ccb31b58a50ec81f74
af223c58ce41d7b8ee21410bb021217c722d7613
MAINT: fix skellam distribution tests
#### Reference issue Closes #22956 #### What does this implement/fix? This should help with the recent discrete distribution updates. I do not understand the context fully though. Locally, I still see failures for other distributions. Long term, it would be better to have a unified wrapping mechanism for boost ...
diff --git a/scipy/special/boost_special_functions.h b/scipy/special/boost_special_functions.h index 4d865f8e5ce6..9f281a183ea4 100644 --- a/scipy/special/boost_special_functions.h +++ b/scipy/special/boost_special_functions.h @@ -699,8 +699,22 @@ Real ncx2_pdf_wrap(const Real x, const Real k, const Real l) { if...
2
2
1
[{"id": "G0", "claim": "The newly added test file content ends without a final newline; add the trailing newline at end of file as suggested.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The regression test covering the skellam crash is skippe...
null
scipy__scipy__22983
scipy/scipy
22,983
defect
21e25535048a3b34e057d93c8b951c7e23a5a9b2
a57d580c7e608413a58e1ce246b0fffb15b01640
ENH: sparse.linalg: a restarted Krylov method for evaluating f(A)b.
#### Reference issue Closes #22974 for vectors. #### What does this implement/fix? Implement a restarted Krylov method for computing `f(A) b` for an arbitrary function `f` and vector `b`. The routine is called `krylov_funmv` in the ``sparse.linalg`` module. The tests cover the `exp`, `sin`, `cos`, `sinh` and `c...
diff --git a/scipy/sparse/linalg/__init__.py b/scipy/sparse/linalg/__init__.py index ae19314d48b3..5b02c2b62ae8 100644 --- a/scipy/sparse/linalg/__init__.py +++ b/scipy/sparse/linalg/__init__.py @@ -22,6 +22,7 @@ inv -- compute the sparse matrix inverse expm -- compute the sparse matrix exponential expm_mul...
14
14
5
[{"id": "G0", "claim": "The function should be named funm_multiply_krylov instead of krylov_funmv, to match expm_multiply and leave room for an exact method.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "On an Arnoldi/Lanczos breakdown the code should u...
null
scipy__scipy__23019
scipy/scipy
23,019
defect
843c84ff1931daea8b81ef1bea69614c572028fd
9242d61d13a3df4df6f3cfcb291be2554ed7c41a
BUG: interpolate.Akima1DInterpolator: Identical Rearrangement Fixes
The subset of changes proposed in #22888 that is strictly an identical numerical stability improvement. The tests for the fix to #22882 are marked as skipped for now. #### Reference issue closes #22880 #### What does this implement/fix? As requested in the comments of #22888, I have split the pull request int...
diff --git a/scipy/interpolate/_cubic.py b/scipy/interpolate/_cubic.py index ead4e5ebb7d8..feefcbc6301d 100644 --- a/scipy/interpolate/_cubic.py +++ b/scipy/interpolate/_cubic.py @@ -538,13 +538,24 @@ def __init__(self, x, y, axis=0, *, method: Literal["akima", "makima"]="akima", else: f1 ...
3
2
0
[{"id": "G0", "claim": "The comment about a 'qualitative discontinuity' is unclear and would be nice to rephrase, though only alongside some unrelated commit/push since rewording alone is not worth the churn.", "category": "documentation", "verdict": "opposed", "priority": "P3", "scope": "introduced"}, {"id": "G1", "cl...
null
scipy__scipy__23047
scipy/scipy
23,047
defect
6d08b2b9cec027fdb0334d7d665fd367285d3571
fb278b49819044c11105eb51d3af780e4607172a
BUG: signal.csd: Zero-pad for different size inputs
Fixes #23036 This bug was introduced in 1.16.0rc1 with PR #22460.
diff --git a/scipy/signal/_spectral_py.py b/scipy/signal/_spectral_py.py index aefb827aadc9..1a0f95c573a8 100644 --- a/scipy/signal/_spectral_py.py +++ b/scipy/signal/_spectral_py.py @@ -897,6 +897,15 @@ def csd(x, y, fs=1.0, window='hann', nperseg=None, noverlap=None, nfft=None, if np.iscomplexobj(x) and return_o...
2
2
1
[{"id": "G0", "claim": "The docstrings of the two new regression tests (here and above) should mention the specific issue (23036) the tests were written for.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The new 1D test does not fail when the sou...
null
scipy__scipy__23443
scipy/scipy
23,443
defect
3fe8b5088d1b63e7557d26314cf5f40851f46a45
5df4c3653c21e30c0fde4c179132cbd24c49ab87
BUG: stats.qmc: Avoid infinite loop in sobol when requesting more than 2**32 samples
Fix bug where low_0_bit could loop forever. Also, add tests for low_0_bit. #### Reference issue Closes #23409 #### First approach I changed the following things: * ~~When evaluating a 64-bit Sobol sample, the bit shift was done in 32 bits, before the 32-bit result was promoted to a 64-bit number. The sh...
diff --git a/scipy/stats/_sobol.pyx b/scipy/stats/_sobol.pyx index e2b2feaa4ccb..edf4c6062a04 100644 --- a/scipy/stats/_sobol.pyx +++ b/scipy/stats/_sobol.pyx @@ -157,7 +157,7 @@ def _initialize_direction_numbers(poly, vinit, dtype): @cython.boundscheck(False) @cython.wraparound(False) -cdef int bit_length(uint_32_...
6
5
1
[{"id": "G0", "claim": "A new test file for one test is best avoided; the low_0_bit tests should be added to the existing test_qmc.py instead of creating test_sobol.py.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The ~5% time_sobol performanc...
null
scipy__scipy__23465
scipy/scipy
23,465
defect
0f2342f34cc850e7137a74afd33c6877c1c790e6
068b5cb89b2e968175816336b55c7835eabd6d64
BUG: sparse: nD sparse save_npz and load_npz
Fixes #23462 `save_npz` writes a `coo_array` as if it has ndim == 2 (whether 1D or nD for n>2). `load_npz` for coo_array always creates 2D array. This PR allows COO sparse format to be saved and loaded as nD. I'm not sure what the backward compatibility tradition is for `save_npz` and `load_npz`. For `save_...
diff --git a/scipy/sparse/_matrix_io.py b/scipy/sparse/_matrix_io.py index 5b7f533926fd..09fcd44581f9 100644 --- a/scipy/sparse/_matrix_io.py +++ b/scipy/sparse/_matrix_io.py @@ -61,6 +61,7 @@ def save_npz(file, matrix, compressed=True): arrays_dict.update(offsets=matrix.offsets) elif matrix.format == 'co...
3
3
1
[{"id": "G0", "claim": "The new nD coo test could cut down on file-handling boilerplate by using the tmpdir fixture instead of tempfile.mkstemp with try/finally cleanup.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "save_npz should keep writing...
null
scipy__scipy__23499
scipy/scipy
23,499
defect
252124e819948659f2a6f4f5201a5b2c5a98ea70
0274a8b0c35b4bf712cb1fa7f240d4974276fcfd
ENH: update boost to 1.89
#### Reference issue Closes #22682 #### What does this implement/fix? Updates boost to 1.89.0. This directly fixes #22682. I also added a new test for the noncentral F CDF which was reported by us to boost (see https://github.com/boostorg/math/issues/1198). As this boost update contains a large update to the incom...
diff --git a/meson.build b/meson.build index ce550bad7d42..d118acac72df 100644 --- a/meson.build +++ b/meson.build @@ -202,14 +202,14 @@ elif use_system_libraries.contains('auto') endif if all_system_libraries or use_system_libraries.contains('boost.math') - boost_math_dep = dependency('boost', version : '1.88.0')...
2
2
2
[{"id": "G0", "claim": "The reviewers question the PR's loosening of the nctdtr test rtol (5e-9 to 5e-8, later 2e-8), asking whether noncentral T accuracy got slightly worse on some platform or an unrelated flake is being fixed, and ask that a comment be added saying the value can be changed back to 5e-9 after upgradin...
null
scipy__scipy__23521
scipy/scipy
23,521
defect
2f8ef3e80dfad0171fa62904c0ca2cae384f05fe
52a3497ad508f55e0e66b27c34c8314a868d091c
BUG: shgo should accept args for fun/jac/hess
Closes #23517.
diff --git a/scipy/optimize/_shgo.py b/scipy/optimize/_shgo.py index eacfabcc4e7d..fb8c8e330274 100644 --- a/scipy/optimize/_shgo.py +++ b/scipy/optimize/_shgo.py @@ -515,7 +515,7 @@ def __init__(self, func, bounds, args=(), constraints=None, n=None, self.func = MemoizeJac(func) jac = ...
2
1
0
[{"id": "G0", "claim": "It asks whether the objective function itself raises the warnings that test_args_gh23517 suppresses, implying the blanket warning suppression (including UserWarning) may not be justified.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "cla...
null
scipy__scipy__23569
scipy/scipy
23,569
defect
601dc92c40f04752b454f3fb80008d069a68a316
ba3885d5ce02c54f95bd54b24a4c0b3ccc1ff6ac
ENH: interpolate.FloaterHormannInterpolator: add axis parameter
closes #22513 (since adding batch support to AAA is infeasible IMO as arrays would be ragged) 1. Adds an `axis` argument to `FloaterHormannInterpolator` 2. Raises an error for `roots` and `residues` for batched inputs since these currently do not work so it's better to raise a clean error than garbage.
diff --git a/scipy/interpolate/_bary_rational.py b/scipy/interpolate/_bary_rational.py index a2fe6f051f4d..7f4bdbc0ce9f 100644 --- a/scipy/interpolate/_bary_rational.py +++ b/scipy/interpolate/_bary_rational.py @@ -40,6 +40,7 @@ class _BarycentricRational: # generic type compatibility with scipy-stubs __class...
8
6
1
[{"id": "G0", "claim": "Avoid the `_axis = 0` class variable and store the axis per instance (principle of least surprise, since class-variable sharing behaviour is surprising).", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Why is `f = np.movea...
null
scipy__scipy__23607
scipy/scipy
23,607
defect
c919bcf145f67eba767632c798bc73d8b5f98c00
783ad69675b22ba30575b06923263730bd5e38e9
BUG: signal.lfilter: More meaningful error messages for invalid parameters.
The raising of exceptions in `lfliter` is refactored. Also, a unit test is added to ensure 100% code coverage. Closes #23555.
diff --git a/scipy/signal/_signaltools.py b/scipy/signal/_signaltools.py index 171b4ac43a7d..009cf9cd9ae4 100644 --- a/scipy/signal/_signaltools.py +++ b/scipy/signal/_signaltools.py @@ -2178,14 +2178,17 @@ def lfilter(b, a, x, axis=-1, zi=None): if zi is not None: zi = np.asarray(zi) + if not (b.ndim...
2
1
0
[{"id": "G0", "claim": "The zi/x dimension-mismatch error message should use explicit f-string interpolations like `f\"x.ndim={x.ndim}, zi.ndim={zi.ndim}!\"` instead of the `{x.ndim=}` self-documenting form.", "category": "maintainability", "verdict": "opposed", "priority": "P3", "scope": "introduced"}, {"id": "G1", "c...
null
scipy__scipy__23626
scipy/scipy
23,626
defect
d13bb11a21ffcc3bf9bbbaf687c59d4dd8080e4b
fd84121066e60d14bb3e09a38dbc793d97281a77
BUG:sparse: allow setting a singleton via a sparse container
<!-- Thanks for contributing a pull request! Please ensure that your PR satisfies the checklist before submitting: https://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: https://scipy...
diff --git a/scipy/sparse/_index.py b/scipy/sparse/_index.py index 22ea723b89f9..a544fa338468 100644 --- a/scipy/sparse/_index.py +++ b/scipy/sparse/_index.py @@ -165,7 +165,10 @@ def __setitem__(self, key, x): row, col = index if isinstance(row, INT_TYPES) and isinstance(col, INT_TYPES): - ...
1
1
1
[{"id": "G0", "claim": "The PR's tests only cover the 1D case while the changed singleton-assignment code is for the 2D case, so update `test_setelement` in `test_base.py` to cover the 2D case and also add an nD (3D) singleton-setting test at the end of `test_coo.py`.", "category": "testing", "verdict": "supported", "p...
null
scipy__scipy__23676
scipy/scipy
23,676
defect
ff50e408b6d8bf39711a107c9a7de6195cd4c467
e778b30fdea9162a9f284eaa18c2a433f2472239
BUG: Fixes #23644: sparse: csc_array.setdiag() makes indices unsorted
#### Reference issue Fixes #23644, #### What does this implement/fix? This PR: * fixes #23644 by sorting COO indices in `_cs_matrix._setdiag`. * refactors `mask` -> `is_existing` and `is_new` in `_setdiag`. * fixes the condition for converting to COO format in `_setdiag`. * adds tests for the logic branches ...
diff --git a/scipy/sparse/_compressed.py b/scipy/sparse/_compressed.py index 37ae345f829d..344fcc5c6d26 100644 --- a/scipy/sparse/_compressed.py +++ b/scipy/sparse/_compressed.py @@ -804,23 +804,27 @@ def _setdiag(self, values, k): self.data[offsets] = x return - mask = (offsets >= 0)...
3
3
3
[{"id": "G0", "claim": "The sort-need check must read the sorted-indices state into a flag before the setdiag/COO conversion (as _insert_many does with do_sort), because self.has_sorted_indices evaluated after the change would compute the state from already-modified indices instead of preserving the pre-change state.",...
null
scipy__scipy__23737
scipy/scipy
23,737
defect
dcc09b521359ed756e0e0e02dc33bf87526534c0
a8648fe8cd1c89007123d1f461ffba9b2a9473e8
ENH: Allow users to increase the QHull simplex assignment tolerance
<!-- Thanks for contributing a pull request! Please ensure that your PR satisfies the checklist before submitting: https://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: https://scipy...
diff --git a/scipy/interpolate/_interpnd.pyx b/scipy/interpolate/_interpnd.pyx index f25e287444a6..401e71fc6f68 100644 --- a/scipy/interpolate/_interpnd.pyx +++ b/scipy/interpolate/_interpnd.pyx @@ -151,7 +151,7 @@ class NDInterpolatorBase: xi = np.ascontiguousarray(xi, dtype=np.float64) return self._...
14
12
5
[{"id": "G0", "claim": "The new regression test should drop the @pytest.mark.parametrize(\"simplex_tolerance\", [1, 10]) decorator and go back to a plain method with a regression-test comment.", "category": "testing", "verdict": "uncertain", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "eps_broad sho...
null
scipy__scipy__23765
scipy/scipy
23,765
defect
cf4db8b5caabc9ea5b2c501021fa549351ca800c
77fd663cba03fbe2160deab416f5e3152cf43f71
TST: signal: isolate use of alternative backend only to function being tested in signal tests
<!-- Thanks for contributing a pull request! Please ensure that your PR satisfies the checklist before submitting: https://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: https://scipy...
diff --git a/scipy/_lib/_array_api.py b/scipy/_lib/_array_api.py index 3c98402edd17..bc5ff212dfec 100644 --- a/scipy/_lib/_array_api.py +++ b/scipy/_lib/_array_api.py @@ -55,7 +55,7 @@ 'np_compat', 'get_native_namespace_name', 'SCIPY_ARRAY_API', 'SCIPY_DEVICE', 'scipy_namespace_for', 'xp_assert_close', '...
9
7
3
[{"id": "G0", "claim": "The test could use the same tolerance (xp_assert_close with rtol=1e-15) on all backends instead of branching on is_cupy/is_torch.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The new xp_copy_to_numpy function should be ...
null