https://github.com/rubixml/tensor

A library and extension that provides objects for scientific computing in PHP.

https://github.com/rubixml/tensor

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

arithmetic engineering lapack linear-algebra machine-learning math matrix matrix-decompositions matrix-factorizations matrix-multiplication multithreaded php php-extension rubix scientific-computing statistics tensor tensor-extension tensor-php vector
Last synced: 5 months ago · JSON representation

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
arithmetic engineering lapack linear-algebra machine-learning math matrix matrix-decompositions matrix-factorizations matrix-multiplication multithreaded php php-extension rubix scientific-computing statistics tensor tensor-extension tensor-php vector
Created over 7 years ago · Last pushed 11 months ago
Metadata Files
Readme Changelog Contributing Funding License

README.md

Tensor: Scientific Computing for PHP

PHP from Packagist Latest Stable Version Code Checks Extension Build Downloads from Packagist GitHub

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

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

Tensor Performance MNIST

Tensor Performance Benchmarks

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

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

All Time
  • Total Commits: 312
  • Total Committers: 7
  • Avg Commits per committer: 44.571
  • Development Distribution Score (DDS): 0.038
Past Year
  • Commits: 9
  • Committers: 2
  • Avg Commits per committer: 4.5
  • Development Distribution Score (DDS): 0.111
Top Committers
Name Email 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
help wanted (4) Research (1) bug (1) enhancement (1) not an issue (1)
Pull Request Labels
bug (1)

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.

  • Versions: 29
  • Dependent Packages: 5
  • Dependent Repositories: 47
  • Downloads: 1,178,270 Total
  • Docker Downloads: 1,256,474,101
Rankings
Docker downloads count: 0.0%
Stargazers count: 1.2%
Dependent repos count: 1.4%
Downloads: 1.5%
Average: 1.6%
Forks count: 2.2%
Dependent packages count: 3.1%
Maintainers (1)
Funding
  • url: https://github.com/andrewdalpino: type: github
Last synced: 6 months ago

Dependencies

composer.json packagist
  • 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
.github/workflows/ci-ext.yml actions
  • actions/checkout v2 composite
.github/workflows/ci.yml actions
  • actions/checkout v2 composite
  • shivammathur/setup-php v2 composite
.github/workflows/cla.yml actions
  • cla-assistant/github-action v2.1.3-beta composite