Skip to content

API Reference

Complete reference for all NDArray classes and methods.

Core

Array Manipulation

Mathematical Operations

Other

Quick Reference

Most Common Methods

Creation:

  • NDArray::array() - From PHP array
  • NDArray::zeros() - Array of zeros
  • NDArray::ones() - Array of ones
  • NDArray::random() - Random values

Properties:

  • shape() - Get dimensions
  • dtype() - Get data type
  • size() - Total elements

Math:

  • add(), subtract(), multiply(), divide()
  • sum(), mean(), std(), min(), max()

Shape:

  • reshape(), transpose(), flatten()
  • slice() - Extract subarrays

Next Steps

Released under the MIT License.