PHPackages                             numpower/numpower - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. numpower/numpower

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

numpower/numpower
=================

PHP extension for efficient scientific computing and array manipulation with GPU support.

0.6.0(1y ago)236↓50%1[1 PRs](https://github.com/NumPower/numpower-composer/pulls)MITPHPPHP &gt;=8.2

Since Jul 9Pushed 1y ago1 watchersCompare

[ Source](https://github.com/NumPower/numpower-composer)[ Packagist](https://packagist.org/packages/numpower/numpower)[ Docs](https://www.numpower.org)[ RSS](/packages/numpower-numpower/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (3)Used By (0)

 [![](https://private-user-images.githubusercontent.com/1107499/255315252-ea2e8895-a1ab-4212-bd91-033e9afa711b.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzUyMDM4NjksIm5iZiI6MTc3NTIwMzU2OSwicGF0aCI6Ii8xMTA3NDk5LzI1NTMxNTI1Mi1lYTJlODg5NS1hMWFiLTQyMTItYmQ5MS0wMzNlOWFmYTcxMWIucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI2MDQwMyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNjA0MDNUMDgwNjA5WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MDAwNDM0NmE2M2QyMDU3OWNmYWRmZGM0OTBhZjhjODQ4N2QxMjcxYzBhZDg0YjcxNGMyMDY2ZmQ1MjBjZTMxZCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.aBHypw_lf7aaMmBcZlSDlpDGrFkay4YW-rlhSY9bQHQ)](https://private-user-images.githubusercontent.com/1107499/255315252-ea2e8895-a1ab-4212-bd91-033e9afa711b.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzUyMDM4NjksIm5iZiI6MTc3NTIwMzU2OSwicGF0aCI6Ii8xMTA3NDk5LzI1NTMxNTI1Mi1lYTJlODg5NS1hMWFiLTQyMTItYmQ5MS0wMzNlOWFmYTcxMWIucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI2MDQwMyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNjA0MDNUMDgwNjA5WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MDAwNDM0NmE2M2QyMDU3OWNmYWRmZGM0OTBhZjhjODQ4N2QxMjcxYzBhZDg0YjcxNGMyMDY2ZmQ1MjBjZTMxZCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.aBHypw_lf7aaMmBcZlSDlpDGrFkay4YW-rlhSY9bQHQ)

NumPower
========

[](#numpower)

[![Typing SVG](https://camo.githubusercontent.com/7537eebb58969c37fc2ab4e7e4c6a3e70cf300de3c971a12aa790df2d23ab8cc/68747470733a2f2f726561646d652d747970696e672d7376672e64656d6f6c61622e636f6d3f666f6e743d466972612b436f6465266475726174696f6e3d323030302670617573653d353030266d756c74696c696e653d747275652677696474683d343335266865696768743d31303026736570617261746f723d253343266c696e65733d253234612b2533442b6e64253341253341617272617928253542253542312532432b322535442532432b253542332532432b34253544253544293b253343253234622b2533442b253234612b2a2b323b2533437072696e745f722825323462293b)](https://git.io/typing-svg)

Inspired by NumPy, the NumPower library was created to provide the foundation for efficient scientific computing in PHP, as well as leverage the machine learning tools and libraries that already exist and can benefit from it.

This C extension developed for PHP can be used to considerably speed up mathematical operations on large datasets and facilitate the manipulation, creation and operation of N-dimensional tensors. NumPower was designed from the ground up to utilize AVX2 and the GPU to further improve performance. With the use of contiguous single precision arrays, slices, buffer sharing and a specific GC engine, NumPower aims to manage memory more efficiently than a matrix in PHP arrays [![Typing SVG](https://camo.githubusercontent.com/987443085e8ed95a3075ea3cdb6e8793f2a7dc3da1ef4425006b99f7d05bc91a/68747470733a2f2f726561646d652d747970696e672d7376672e64656d6f6c61622e636f6d3f666f6e743d466972612b436f6465266475726174696f6e3d323030302670617573653d353030266d756c74696c696e653d747275652677696474683d343335266865696768743d31303026736570617261746f723d253343266c696e65733d253234615f6770752b2533442b253234612d25334567707528293b253343253234625f6770752b2533442b253234622d25334567707528293b2533432532346d2b2533442b6e642533412533416d61746d756c28253234615f6770752532432b253234625f677075293b)](https://git.io/typing-svg)

Documentation &amp; Installation
--------------------------------

[](#documentation--installation)

- Website:
- Documentation:
- API:
- Docker:

Requirements
------------

[](#requirements)

- PHP &gt;= 8.2
- NumPower Extension () &gt;= 0.5.2

Installing
----------

[](#installing)

```
$ composer require numpower/numpower
```

GPU Support
-----------

[](#gpu-support)

If you have an NVIDIA graphics card with CUDA support, you can use your graphics card to perform operations. To do this, just copy your array to the GPU memory.

```
use \NDArray as nd;

$x = nd::ones([10, 10]);
$y = nd::ones([10, 10]);

$x_gpu = $x->gpu();   // Copy $x from RAM to VRAM
$y_gpu = $y->gpu();   // Copy $y from RAM to VRAM

$r = nd::matmul($x_gpu, $y_gpu); // Matmul is performed using CUDA
```

Both GPU and CPU memory management are done automatically by NumPower, so the memory of both devices will be automatically freed by the garbage collector. You can also bring arrays back from VRAM into RAM:

```
$x_cpu = $x->cpu();
```

> **You must explicitly copy the arrays you want to use in your devices**. Cross-array operations (like adding) will raise an exception if the arrays used are on different devices.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance33

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~7 days

Total

2

Last Release

662d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/71781461232111b15968d3047f122772e0945c319e9ee9784871aca0948730ff?d=identicon)[henrique-borba](/maintainers/henrique-borba)

---

Top Contributors

[![henrique-borba](https://avatars.githubusercontent.com/u/1107499?v=4)](https://github.com/henrique-borba "henrique-borba (4 commits)")

### Embed Badge

![Health badge](/badges/numpower-numpower/health.svg)

```
[![Health](https://phpackages.com/badges/numpower-numpower/health.svg)](https://phpackages.com/packages/numpower-numpower)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
