Skip to content

Comments

Update NDArray stubs: fixed method signatures, added missing methods,…#1

Open
omegaalfa wants to merge 1 commit intoNumPower:mainfrom
omegaalfa:feature/document-ndarray-methods
Open

Update NDArray stubs: fixed method signatures, added missing methods,…#1
omegaalfa wants to merge 1 commit intoNumPower:mainfrom
omegaalfa:feature/document-ndarray-methods

Conversation

@omegaalfa
Copy link

📄 Description
This PR improves the stubs for the NDArray class in the NumPower extension to ensure greater consistency and alignment with the actual extension API:

✅ Fixed method signatures: Added missing parameters (e.g., axis, keepdims, etc.) in methods like max(), min(), and others, matching the official extension specification.

➕ Added missing methods: Implemented stubs for methods that were absent, based on the official documentation and C implementation review.

🔄 Updated composer.json: Minor adjustment (if applicable) to keep everything in sync.

💡 Motivation:
While integrating NumPower into PHP projects, I noticed some missing or inconsistent NDArray method signatures, which can affect IDE autocompletion and static analysis tools (e.g., PhpStorm, Psalm). This PR aims to enhance the developer experience and accuracy of the stubs.

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