Calculus |
diff(a, wrt=t, order=1)
integral(a, wrt=t, between=(0, 10))
|
|
Vectors |
O = R3("O")
v1 = O[1, 2, 3]
x, y, z = ("x", "y", "z") * m
v2 = O[x, y, z]
v3 = "v_3" @ O
v2.cross(v3)
|
|
Matrices |
O2 = R2("O2")
A = Mat[O, O2](
[1, 2],
[3, 4],
[5, 6]
)
v2_wrt_O2 = v2 @ A
B = Mat[O2, O]("B")
I = Mat[O2, O2].I
|
|
Numpy Compatibility |
y = sin(t)
y_fn = as_numpy_func(y)
y_fn({ t: [1, 2, 3] })
import numpy as np
y_fn({
t: np.arange(
start=0, stop=2 * np.pi, step=np.pi / 12
)
})
|
array([0.84147098, 0.90929743, 0.14112001])
array([0. , 0.25881905, 0.5 , 0.70710678, 0.8660254 ,
0.96592583, 1. , 0.96592583, 0.8660254 , 0.70710678,
0.5 , 0.25881905])
|