Add equalent np.convolve (just full mode)#7
Merged
Oceania2018 merged 1 commit intoSciSharp:masterfrom Oct 17, 2018
Merged
Conversation
Member
dotChris90
commented
Oct 17, 2018
- according to issue implement numpy.convolve #6
Member
|
Hi @dotChris90 , the np.convolve looks great, could you please add the convolve to the Implemented APIs list in the README? |
Member
|
Keep this open due to same and valid mode is not finished yet. |
Nucs
added a commit
that referenced
this pull request
Apr 23, 2026
Implements fixes detailed in docs/NPYITER_FIXES_REQUIRED.md to improve NumPy compatibility of the NpyIter implementation. Fix #1: Coalescing Always Runs - Changed NpyIterRef.Initialize() to always coalesce axes after construction unless MULTI_INDEX flag is set - Matches NumPy's nditer_constr.c line 395-396 behavior Fix #2: Inner Stride Cache - Added InnerStrides[MaxOperands] array to NpyIterState - Added UpdateInnerStrides() method to gather inner strides - GetInnerStrideArray() now returns contiguous array matching NumPy's NpyIter_GetInnerStrideArray() format Fix #3: op_axes Parameter Implementation - Added ApplyOpAxes() method to support axis remapping - Supports -1 entries for broadcast/reduction axes - Enables reduction operations via custom axis mapping Fix #4: Multi-Index Support - Added GetMultiIndex(Span<long>) for coordinate retrieval - Added GotoMultiIndex(ReadOnlySpan<long>) for coordinate jumping - Added HasMultiIndex property - HASMULTIINDEX flag tracked during construction Fix #5: Ranged Iteration - Added ResetToIterIndexRange(start, end) for parallel chunking - Added IterStart, IterEnd, and IsRanged properties - RANGE flag tracks ranged iteration mode Fix #6: Buffer Copy Type Dispatch - Added non-generic CopyToBuffer/CopyFromBuffer overloads - Runtime dtype dispatch for all 12 NumSharp types - Enables dtype-agnostic iteration code Fix #7: Flag Bit Positions Documented - Added documentation explaining NumSharp's flag bit layout - Legacy compatibility flags use bits 0-7 - NumPy-equivalent flags use bits 8-15 - Semantic meaning matches NumPy, positions differ Fix #8: MaxDims Increased to 64 - Changed MaxDims from 32 to 64 to match NPY_MAXDIMS - Supports high-dimensional array iteration Test coverage: - 13 new tests for coalescing, multi-index, ranged iteration, inner strides, and MaxDims validation - All 5666 non-OpenBugs tests pass Note: Full axis reordering before coalescing (for complete 1D coalescing of contiguous arrays) not yet implemented. Current implementation coalesces adjacent compatible axes only.
Nucs
added a commit
that referenced
this pull request
Apr 23, 2026
Explicit the hierarchy — Tier A/B/C were always sub-tiers of Layer 3
(the baked-ufunc layer). Numbering them `3A/3B/3C` makes the
relationship visible at a glance:
Layer 1 — ForEach (delegate)
Layer 2 — ExecuteGeneric (struct-generic)
Layer 3 — ExecuteBinary / Unary / ... (baked)
Tier 3A — ExecuteRawIL (sub-tier: custom IL)
Tier 3B — ExecuteElementWise (sub-tier: templated)
Tier 3C — ExecuteExpression / Call (sub-tier: DSL)
100 references touched across 6 files:
docs/website-src/docs/NDIter.md — prose, TOC, anchor links, worked-
example heading anchors (#6, #7, #8)
src/NumSharp.Core/Backends/Iterators/NpyExpr.cs — header comment
src/NumSharp.Core/Backends/Iterators/NpyIter.Execution.Custom.cs
— file header, region comments for each tier entry point
src/NumSharp.Core/Backends/Kernels/ILKernelGenerator.InnerLoop.cs
— factory method docstrings
test/NumSharp.UnitTest/Backends/Iterators/NpyIterCustomOpTests.cs
— class docstring, region comments, 10 test method names
(TierA_* → Tier3A_*, TierB_* → Tier3B_*, TierC_* → Tier3C_*)
test/NumSharp.UnitTest/Backends/Iterators/NpyIterCustomOpEdgeCaseTests.cs
— region comments, 2 test method names (Validate_TierA_* →
Validate_Tier3A_*)
No behavior changes. 264/264 NpyExpr + custom-op tests pass on net8 +
net10. Full suite still green (0 regressions).
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.