xax 0.2.15__tar.gz → 0.2.16__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {xax-0.2.15/xax.egg-info → xax-0.2.16}/PKG-INFO +1 -1
- {xax-0.2.15 → xax-0.2.16}/xax/__init__.py +1 -1
- {xax-0.2.15 → xax-0.2.16}/xax/nn/geom.py +5 -1
- {xax-0.2.15 → xax-0.2.16/xax.egg-info}/PKG-INFO +1 -1
- {xax-0.2.15 → xax-0.2.16}/LICENSE +0 -0
- {xax-0.2.15 → xax-0.2.16}/MANIFEST.in +0 -0
- {xax-0.2.15 → xax-0.2.16}/README.md +0 -0
- {xax-0.2.15 → xax-0.2.16}/pyproject.toml +0 -0
- {xax-0.2.15 → xax-0.2.16}/setup.cfg +0 -0
- {xax-0.2.15 → xax-0.2.16}/setup.py +0 -0
- {xax-0.2.15 → xax-0.2.16}/xax/core/__init__.py +0 -0
- {xax-0.2.15 → xax-0.2.16}/xax/core/conf.py +0 -0
- {xax-0.2.15 → xax-0.2.16}/xax/core/state.py +0 -0
- {xax-0.2.15 → xax-0.2.16}/xax/nn/__init__.py +0 -0
- {xax-0.2.15 → xax-0.2.16}/xax/nn/embeddings.py +0 -0
- {xax-0.2.15 → xax-0.2.16}/xax/nn/equinox.py +0 -0
- {xax-0.2.15 → xax-0.2.16}/xax/nn/export.py +0 -0
- {xax-0.2.15 → xax-0.2.16}/xax/nn/functions.py +0 -0
- {xax-0.2.15 → xax-0.2.16}/xax/nn/losses.py +0 -0
- {xax-0.2.15 → xax-0.2.16}/xax/nn/metrics.py +0 -0
- {xax-0.2.15 → xax-0.2.16}/xax/nn/parallel.py +0 -0
- {xax-0.2.15 → xax-0.2.16}/xax/nn/ssm.py +0 -0
- {xax-0.2.15 → xax-0.2.16}/xax/py.typed +0 -0
- {xax-0.2.15 → xax-0.2.16}/xax/requirements-dev.txt +0 -0
- {xax-0.2.15 → xax-0.2.16}/xax/requirements.txt +0 -0
- {xax-0.2.15 → xax-0.2.16}/xax/task/__init__.py +0 -0
- {xax-0.2.15 → xax-0.2.16}/xax/task/base.py +0 -0
- {xax-0.2.15 → xax-0.2.16}/xax/task/launchers/__init__.py +0 -0
- {xax-0.2.15 → xax-0.2.16}/xax/task/launchers/base.py +0 -0
- {xax-0.2.15 → xax-0.2.16}/xax/task/launchers/cli.py +0 -0
- {xax-0.2.15 → xax-0.2.16}/xax/task/launchers/single_process.py +0 -0
- {xax-0.2.15 → xax-0.2.16}/xax/task/logger.py +0 -0
- {xax-0.2.15 → xax-0.2.16}/xax/task/loggers/__init__.py +0 -0
- {xax-0.2.15 → xax-0.2.16}/xax/task/loggers/callback.py +0 -0
- {xax-0.2.15 → xax-0.2.16}/xax/task/loggers/json.py +0 -0
- {xax-0.2.15 → xax-0.2.16}/xax/task/loggers/state.py +0 -0
- {xax-0.2.15 → xax-0.2.16}/xax/task/loggers/stdout.py +0 -0
- {xax-0.2.15 → xax-0.2.16}/xax/task/loggers/tensorboard.py +0 -0
- {xax-0.2.15 → xax-0.2.16}/xax/task/mixins/__init__.py +0 -0
- {xax-0.2.15 → xax-0.2.16}/xax/task/mixins/artifacts.py +0 -0
- {xax-0.2.15 → xax-0.2.16}/xax/task/mixins/checkpointing.py +0 -0
- {xax-0.2.15 → xax-0.2.16}/xax/task/mixins/compile.py +0 -0
- {xax-0.2.15 → xax-0.2.16}/xax/task/mixins/cpu_stats.py +0 -0
- {xax-0.2.15 → xax-0.2.16}/xax/task/mixins/data_loader.py +0 -0
- {xax-0.2.15 → xax-0.2.16}/xax/task/mixins/gpu_stats.py +0 -0
- {xax-0.2.15 → xax-0.2.16}/xax/task/mixins/logger.py +0 -0
- {xax-0.2.15 → xax-0.2.16}/xax/task/mixins/process.py +0 -0
- {xax-0.2.15 → xax-0.2.16}/xax/task/mixins/runnable.py +0 -0
- {xax-0.2.15 → xax-0.2.16}/xax/task/mixins/step_wrapper.py +0 -0
- {xax-0.2.15 → xax-0.2.16}/xax/task/mixins/train.py +0 -0
- {xax-0.2.15 → xax-0.2.16}/xax/task/script.py +0 -0
- {xax-0.2.15 → xax-0.2.16}/xax/task/task.py +0 -0
- {xax-0.2.15 → xax-0.2.16}/xax/utils/__init__.py +0 -0
- {xax-0.2.15 → xax-0.2.16}/xax/utils/data/__init__.py +0 -0
- {xax-0.2.15 → xax-0.2.16}/xax/utils/data/collate.py +0 -0
- {xax-0.2.15 → xax-0.2.16}/xax/utils/debugging.py +0 -0
- {xax-0.2.15 → xax-0.2.16}/xax/utils/experiments.py +0 -0
- {xax-0.2.15 → xax-0.2.16}/xax/utils/jax.py +0 -0
- {xax-0.2.15 → xax-0.2.16}/xax/utils/jaxpr.py +0 -0
- {xax-0.2.15 → xax-0.2.16}/xax/utils/logging.py +0 -0
- {xax-0.2.15 → xax-0.2.16}/xax/utils/numpy.py +0 -0
- {xax-0.2.15 → xax-0.2.16}/xax/utils/profile.py +0 -0
- {xax-0.2.15 → xax-0.2.16}/xax/utils/pytree.py +0 -0
- {xax-0.2.15 → xax-0.2.16}/xax/utils/tensorboard.py +0 -0
- {xax-0.2.15 → xax-0.2.16}/xax/utils/text.py +0 -0
- {xax-0.2.15 → xax-0.2.16}/xax/utils/types/__init__.py +0 -0
- {xax-0.2.15 → xax-0.2.16}/xax/utils/types/frozen_dict.py +0 -0
- {xax-0.2.15 → xax-0.2.16}/xax/utils/types/hashable_array.py +0 -0
- {xax-0.2.15 → xax-0.2.16}/xax.egg-info/SOURCES.txt +0 -0
- {xax-0.2.15 → xax-0.2.16}/xax.egg-info/dependency_links.txt +0 -0
- {xax-0.2.15 → xax-0.2.16}/xax.egg-info/requires.txt +0 -0
- {xax-0.2.15 → xax-0.2.16}/xax.egg-info/top_level.txt +0 -0
@@ -102,12 +102,13 @@ def get_projected_gravity_vector_from_quat(quat: Array, eps: float = 1e-6) -> Ar
|
|
102
102
|
return jnp.concatenate([gx, gy, -gz], axis=-1)
|
103
103
|
|
104
104
|
|
105
|
-
def rotate_vector_by_quat(vector: Array, quat: Array, eps: float = 1e-6) -> Array:
|
105
|
+
def rotate_vector_by_quat(vector: Array, quat: Array, inverse: bool = False, eps: float = 1e-6) -> Array:
|
106
106
|
"""Rotates a vector by a quaternion.
|
107
107
|
|
108
108
|
Args:
|
109
109
|
vector: The vector to rotate, shape (*, 3).
|
110
110
|
quat: The quaternion to rotate by, shape (*, 4).
|
111
|
+
inverse: If True, rotate the vector by the conjugate of the quaternion.
|
111
112
|
eps: A small epsilon value to avoid division by zero.
|
112
113
|
|
113
114
|
Returns:
|
@@ -117,6 +118,9 @@ def rotate_vector_by_quat(vector: Array, quat: Array, eps: float = 1e-6) -> Arra
|
|
117
118
|
quat = quat / (jnp.linalg.norm(quat, axis=-1, keepdims=True) + eps)
|
118
119
|
w, x, y, z = jnp.split(quat, 4, axis=-1)
|
119
120
|
|
121
|
+
if inverse:
|
122
|
+
x, y, z = -x, -y, -z
|
123
|
+
|
120
124
|
# Extract vector components
|
121
125
|
vx, vy, vz = jnp.split(vector, 3, axis=-1)
|
122
126
|
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|