https://github.com/rubixml/tensor
A library and extension that provides objects for scientific computing in PHP.
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (12.5%) to scientific vocabulary
Keywords
Repository
A library and extension that provides objects for scientific computing in PHP.
Basic Info
- Host: GitHub
- Owner: RubixML
- License: mit
- Language: PHP
- Default Branch: master
- Homepage: https://rubixml.com
- Size: 1.99 MB
Statistics
- Stars: 253
- Watchers: 11
- Forks: 31
- Open Issues: 5
- Releases: 28
Topics
Metadata Files
README.md
Tensor: Scientific Computing for PHP
A library and extension that provides objects for scientific computing in PHP.
Installation
Follow the instructions below to install either Tensor PHP or the Tensor extension.
Tensor PHP
Install Tensor PHP into your project with Composer:
sh
$ composer require rubix/tensor
Tensor Extension
Install the Tensor extension via PECL:
sh
$ pecl install tensor
Compiling on MacOS :
To avoid some errors on Mac devices using homebrew, don't forget to add environment variables:
sh
export LDFLAGS="-L$(brew --prefix openblas)/lib -L$(brew --prefix pcre2)/lib -L$(brew --prefix gcc)/lib/gcc/current"
export CPPFLAGS="-I$(brew --prefix openblas)/include -I$(brew --prefix pcre2)/include -I$(brew --prefix gcc)/include"
export PKG_CONFIG_PATH="$(brew --prefix openblas)/lib/pkgconfig:$(brew --prefix pcre2)/lib/pkgconfig:$(brew --prefix gcc)/lib/pkgconfig"
export PATH="$(brew --prefix gcc)/bin:$PATH"
export FC=$(brew --prefix gcc)/bin/gfortran
Note: If both the library and extension are installed, the extension will take precedence.
Requirements
- PHP 8.0 or above
Optional To Compile Extension
- A C compiler such as GCC, Clang, or Visual C++
- A Fortran compiler such as GFortran
- The PHP development package (source code and tooling)
- OpenBLAS development package
- LAPACKE C interface to LAPACK
- re2c 0.13.6 or later
- GNU make 3.81 or later
- autoconf 2.31 or later
- automake 1.14 or later
- Ubuntu build-essentials
Manually Compiling the Extension
Clone the repository locally using Git:
sh
$ git clone https://github.com/RubixML/Tensor
Make sure you have all the necessary build tools installed such as a C compiler and make tools. For example, on an Ubuntu linux system you can enter the following on the command line to install the necessary dependencies.
sh
$ sudo apt-get install make gcc gfortran php-dev libopenblas-dev liblapacke-dev re2c build-essential
Then, change into the ext directory from the project root and run the following commands from the terminal. See this guide for more information on compiling PHP extensions with PHPize.
sh
$ cd ./ext
$ phpize
$ ./configure
$ make
$ sudo make install
Finally, add the following line to your php.ini configuration to install the extension.
extension=tensor.so
To confirm that the extension is loaded in PHP, you can run the following command.
sh
php -m | grep tensor
Performance Comparison


Contributing
See CONTRIBUTING.md for guidelines.
License
The code is licensed MIT and the documentation is licensed CC BY-NC 4.0.
Owner
- Name: Rubix ML
- Login: RubixML
- Kind: organization
- Repositories: 19
- Profile: https://github.com/RubixML
Machine Learning and Deep Learning for the PHP language.
GitHub Events
Total
- Issues event: 8
- Watch event: 28
- Issue comment event: 9
- Push event: 8
- Pull request event: 1
- Fork event: 3
Last Year
- Issues event: 8
- Watch event: 28
- Issue comment event: 9
- Push event: 8
- Pull request event: 1
- Fork event: 3
Committers
Last synced: 10 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Andrew DalPino | me@a****m | 300 |
| Michele Locati | m****e@l****t | 7 |
| Sam | 4****m | 1 |
| Louis AUTHIE | 6****E | 1 |
| Fabien Villepinte | f****e@g****m | 1 |
| Christoph M. Becker | c****9@g****e | 1 |
| Chris Lloyd | c****3@g****m | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 9 months ago
All Time
- Total issues: 26
- Total pull requests: 24
- Average time to close issues: 9 months
- Average time to close pull requests: 25 days
- Total issue authors: 16
- Total pull request authors: 11
- Average comments per issue: 4.35
- Average comments per pull request: 3.08
- Merged pull requests: 21
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 3
- Pull requests: 1
- Average time to close issues: 4 days
- Average time to close pull requests: 29 minutes
- Issue authors: 3
- Pull request authors: 1
- Average comments per issue: 2.0
- Average comments per pull request: 2.0
- Merged pull requests: 1
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- andrewdalpino (3)
- remicollet (3)
- mlocati (3)
- Kabingeran (2)
- takielias (2)
- Anecho (2)
- FxNion (1)
- Aweptimum (1)
- bounmed (1)
- henrique-borba (1)
- myfluxi (1)
- MarkLuds (1)
- sneakyimp (1)
- EDPSH (1)
- P2T (1)
Pull Request Authors
- andrewdalpino (8)
- mlocati (7)
- LouisAUTHIE (2)
- cmb69 (1)
- henrique-borba (1)
- 27pchrisl (1)
- davidbuzz (1)
- remicollet (1)
- myfluxi (1)
- tuqqu (1)
- villfa (1)
- Aweptimum (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- packagist 1,178,270 total
- Total docker downloads: 1,256,474,101
- Total dependent packages: 5
- Total dependent repositories: 47
- Total versions: 29
- Total maintainers: 1
packagist.org: rubix/tensor
A library and extension that provides objects for scientific computing in PHP.
- Homepage: https://github.com/RubixML/Tensor
- License: MIT
-
Latest release: 3.0.5
published almost 2 years ago
Rankings
Maintainers (1)
Funding
- url: https://github.com/andrewdalpino: type: github
Dependencies
- friendsofphp/php-cs-fixer ^3.0 development
- phalcon/zephir ^0.16 development
- phpbench/phpbench ^1.0 development
- phpstan/extension-installer ^1.0 development
- phpstan/phpstan ^1.0 development
- phpstan/phpstan-phpunit ^1.0 development
- phpunit/phpunit ^9.0 development
- php >=7.4
- actions/checkout v2 composite
- actions/checkout v2 composite
- shivammathur/setup-php v2 composite
- cla-assistant/github-action v2.1.3-beta composite