Usage
Ember provides a Tensor class and various mathematical operations.
Creating Tensors
You can create tensors from Python lists or NumPy arrays.
import ember as em
import numpy as np
from ember import Tensor
# From list
a = Tensor([1, 2, 3])
# From NumPy
np_arr = np.array([1.0, 2.0, 3.0], dtype=np.float32)
b = Tensor(np_arr) # Automatically converts from buffer
Operations
Ember supports element-wise operations and broadcasting with scalars.
Arithmetic
Trigonometric & Hyperbolic
Matrix Multiplication
# Create 2x2 matrices (flattened logic for now, or reshape support pending)
# Note: Current implementation is basic.
pass
Data Exchange
Convert back to standard Python/NumPy types easily.