NumPhp is a port of the famous NumPy (Python) package in PHP language.
NumPhp supports PHP 5.6, 7.0, 7.1, 7.2, 7.3 and HHVM.
composer require sciphp/numphp
use SciPhp\NumPhp as np;
$m = np::ar(
[[ 1, 0, 0],
[ 0, 1, 0],
[ 0, 0, 1]]
)->dot(42);
echo "m.42 =\n$m";
will output:
m.42 =
[[ 42, 0, 0 ],
[ 0, 42, 0 ],
[ 0, 0, 42 ]]
- NdArray::copy
- NdArray::negative
- NdArray::ravel
- NdArray::reshape
- NdArray::resize
- NdArray::add
- NdArray::divide
- NdArray::dot
- NdArray::multiply
- NdArray::reciprocal
- NdArray::subtract
- NdArray::sum
- NdArray::trace
- NdArray::trapz
- NdArray::log
- NdArray::log10
- NdArray::log2
- NdArray::exp
- NdArray::expm1
- NdArray::exp2
- NdArray::tril
- NdArray::triu
- NdArray::copysign
- NdArray::signbit
- NdArray::vander
- NumPhp::ar
- NumPhp::full
- NumPhp::nulls
- NumPhp::ones
- NumPhp::zeros
- NumPhp::full_like
- NumPhp::nulls_like
- NumPhp::zeros_like
- NumPhp::arange
- NumPhp::linspace
- NumPhp::logspace
- NumPhp::loadtxt
- NumPhp::diag
- NumPhp::diagflat
- NumPhp::diagonal
- NumPhp::eye
- NumPhp::negative
- NumPhp::identity
- NumPhp::trace
- NumPhp::tri
- NumPhp::tril
- NumPhp::triu
- NumPhp::vander
- NumPhp::add
- NumPhp::divide
- NumPhp::dot
- NumPhp::multiply
- NumPhp::reciprocal
- NumPhp::subtract
- NumPhp::transpose
- NumPhp::sum
- NumPhp::trapz
- NumPhp::log
- NumPhp::log10
- NumPhp::log2
- NumPhp::exp
- NumPhp::expm1
- NumPhp::exp2
- NumPhp::signbit
- NumPhp::copysign