NumPHP\Core\NumArray::getData PHP Method

getData() public method

Returns the data of the NumArray
Since: 1.0.0
public getData ( ) : mixed
return mixed
    public function getData()
    {
        return $this->data;
    }

Usage Example

Exemplo n.º 1
0
 /**
  * Combines all elements of an NumArray at a given axis with the `$callback`
  * function
  *
  * @param NumArray $numArray given NumArray
  * @param callback $callback callback function
  * @param int      $axis     given axis
  *
  * @return NumArray
  *
  * @throws InvalidArgumentException will be thrown, if axis is out of bounds
  *
  * @since 1.0.0
  */
 public static function reduceArray(NumArray $numArray, $callback, $axis)
 {
     if ($axis && $axis >= $numArray->getNDim()) {
         throw new InvalidArgumentException('Axis ' . $axis . ' out of bounds');
     }
     return new NumArray(self::reduceRecursive($numArray->getData(), $callback, $axis));
 }
All Usage Examples Of NumPHP\Core\NumArray::getData