Skip to content

Feat: add global NDArray function proxies and docs - #18

Merged
CodeWithKyrian merged 1 commit into
mainfrom
feat/global-functions
May 13, 2026
Merged

CodeWithKyrian merged 1 commit into
mainfrom
feat/global-functions

Conversation

@CodeWithKyrian

Copy link
Copy Markdown
Contributor

This PR introduces a documented set of namespaced functions that delegate to NDArray.

Motivation and Context

Some callers prefer a functional style over chaining on an object, and small pipelines read cleanly when the array is passed through plain functions; that style also lines up well with language affordances such as the pipe operator in PHP 8.5, where a sequence of transforms is easier to express as functions than as repeated method calls. The proxies stay thin wrappers over the existing class API so behavior, semantics, and tests stay centralized on NDArray without a second implementation path.

What’s Changed

  • Namespaced global functions that mirror NDArray factories, reductions, element-wise and structural operations, and related helpers, all delegating to the class.
  • Sub-namespaces for linear algebra, FFT/DCT, and window functions so imports stay grouped and readable.
  • API reference page that exhaustively maps those functions to the existing method documentation, plus sidebar and index links so the surface is discoverable.
  • PHP CS Fixer configuration updated so leading backslashes on selected PHP builtins are not stripped where the package defines same-named functions in the NDArray namespace.

Breaking Changes

None.

@CodeWithKyrian
CodeWithKyrian merged commit c7af91c into main May 13, 2026
14 checks passed
@CodeWithKyrian
CodeWithKyrian deleted the feat/global-functions branch May 13, 2026 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant