NumPhp Functions

Array creation

Changing number of dimensions

Range methods

Files

  • NumPhp::loadtxt() - Load data from a text file.
  • NumPhp::save() - Documentation does NOT exist for this function

Diagonal matrix

Triangle matrix

  • NumPhp::tri() - Construct an array with ones at and below the given diagonal and zeros elsewhere.
  • NumPhp::tril() - Construct a triangle matrix based on the lower triangle of another one.
  • NumPhp::triu() - Construct a triangle matrix based on the upper triangle of another one.

Power matrix

Mathematical functions

Arithmetic

Sums, products, differences

  • NumPhp::prod() - Documentation does NOT exist for this function
  • NumPhp::sum() - Sum all elements.
  • NumPhp::trapz() - Integrate along the given axis using the composite trapezoidal rule.

Logarithms

Exponents

  • NumPhp::exp() - Calculate the exponential of all elements in the input array.
  • NumPhp::expm1() - Calculate the exponential of all elements in the input array.
  • NumPhp::exp2() - Calculate 2 ** element, element-wise.

Floating point