forked from HQU-gxy/CVTH3PE
feat: Enhance play notebook and camera module with new unprojection functionalities
- Updated the play notebook to include new methods for unprojecting 2D points onto a 3D plane. - Introduced `unproject_points_onto_plane` and `unproject_points_to_z_plane` functions in the camera module for improved point handling. - Enhanced the `Camera` class with a method for unprojecting points to a specified z-plane. - Cleaned up execution counts in the notebook for better organization and clarity.
This commit is contained in:
@ -156,19 +156,3 @@ class MyDataclass:
|
||||
x: Float[Array, "batch"]
|
||||
y: Float[Array, "batch"]
|
||||
```
|
||||
|
||||
## Scalars, PRNG keys
|
||||
|
||||
For convenience, jaxtyping also includes `jaxtyping.Scalar`, `jaxtyping.ScalarLike`, and `jaxtyping.PRNGKeyArray`, defined as:
|
||||
|
||||
```python
|
||||
Scalar = Shaped[Array, ""]
|
||||
ScalarLike = Shaped[ArrayLike, ""]
|
||||
|
||||
# Left: new-style typed keys; right: old-style keys. See JEP 9263.
|
||||
PRNGKeyArray = Union[Key[Array, ""], UInt32[Array, "2"]]
|
||||
```
|
||||
|
||||
Recalling that shape-and-dtype specified jaxtyping arrays can be nested, this means that e.g. you can annotate the output of `jax.random.split` with `Shaped[PRNGKeyArray, "2"]`, or e.g. an integer scalar with `Int[Scalar, ""]`.
|
||||
|
||||
Note that `jaxtyping.{Scalar, ScalarLike, PRNGKeyArray}` are only available if JAX has been installed.
|
||||
Reference in New Issue
Block a user