Stars: 196
Forks: 22
Pull Requests: 20
Issues: 19
Watchers: 9
Last Updated: 2023-09-14 06:46:34
A library and extension that provides objects for scientific computing in PHP.
License: MIT License
Languages: PHP, M4, C, Shell, Zephir, Batchfile
A library and extension that provides objects for scientific computing in PHP.
Follow the instructions below to install either Tensor PHP or the Tensor extension.
Install Tensor PHP into your project with Composer:
$ composer require rubix/tensorInstall the Tensor extension via PECL:
$ pecl install tensorNote: If both the library and extension are installed, the extension will take precedence.
Clone the repository locally using Git:
$ git clone https://github.com/RubixML/TensorMake 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.
$ sudo apt-get install make gcc gfortran php-dev libopenblas-dev liblapacke-dev re2c build-essentialThen, 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.
$ cd ./ext
$ phpize
$ ./configure
$ make
$ sudo make installFinally, 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.
php -m | grep tensorRubix ML is funded by donations from the community. You can become a sponsor by making a contribution to one of our funding sources below.
See CONTRIBUTING.md for guidelines.
The code is licensed MIT and the documentation is licensed CC BY-NC 4.0.