Link Search Menu Expand Document

arena-py API v1.4.0

arena.utils.not_numpy

not-numpy: Numpy replacement for util quaternion/matrix operations Supports all slice operations: mat[0:3, 0:3], mat[0:3, 3], etc.

class NDArray:

Complete array class that mimics numpy.ndarray for specifically euler/quat utils.

NDArray(data)
def tolist(self):

Convert to nested Python lists like numpy.

def array(data):

Create NDArray from list/nested list.

def identity(n):

Create n×n identity matrix.

def diag(values):

Create diagonal matrix from values.

def sqrt(x):

Element-wise or scalar square root.

def copysign(x, y):

Apply sign of y to magnitude of x.

def builtin_sum(iterable, /, start=0):

Return the sum of a 'start' value (default: 0) plus an iterable of numbers

When the iterable is empty, return the start value. This function is intended specifically for use with numeric values and may reject non-numeric types.

def sum(arr, axis=None):

Sum array elements along specified axis.

def max(x, default_val):

Return max of x and default_val.