Repository navigation
Accept strided inputs in Numba-backed features - #60
Draft
AHMETHAKANBEZIR1 wants to merge 1 commit into
Draft
AHMETHAKANBEZIR1 wants to merge 1 commit into
AHMETHAKANBEZIR1 wants to merge 1 commit into
Conversation
Owner
|
Thank you for your contribution! AntroPy now has guidelines for pull requests, including specific steps for AI-assisted PRs: #61 Before I review this PR, could you please go through those steps and update the PR accordingly? In particular: state the user-impact rating (P1-P3) with a short justification, start the description with a summary in your own words, report the exact AI model used (if any), and run an AI review and post a summary of it as a comment. Thanks! |
AHMETHAKANBEZIR1
marked this pull request as draft
October 24, 2026 12:27
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
sample_entropy,higuchi_fdanddetrended_fluctuationreject valid noncontiguous float64 arrays because their Numba kernels have C-contiguous signatures. A common downsampling view,np.random.default_rng(42).normal(size=200)[::2], raisesTypeError: No matching definition ... array(float64, 1d, A)in all three functions, although copying the same samples works.Make the array contiguous at the three Numba call boundaries. Contiguous inputs are reused, while strided views get a copy; the numerical algorithms, float64 conversion and sample-entropy KDTree routes are retained. This groups the three occurrences of the same layout-contract bug in one fix.
Validation on Windows CPU, Python 3.12.14:
6843920: 18 fail and 32 controls pass. Fixed: all 50 pass, with exact equality to contiguous copies and unchanged source samples/writeability.Other operating systems, doctests and performance benchmarks were not run.
AI disclosure: OpenAI Codex autonomously investigated and implemented the patch/tests, wrote the description and ran the reported checks. No independent human pre-submission review has been performed.