mirror of
https://github.com/wassname/jaxtyping.git
synced 2026-09-09 11:24:55 +08:00
Have PRNGKeyArray appear correctly in downstream documentation
This commit is contained in:
+11
-1
@@ -188,7 +188,17 @@ if typing.TYPE_CHECKING:
|
||||
|
||||
from ._indirection import Scalar as Scalar, ScalarLike as ScalarLike
|
||||
elif has_jax:
|
||||
from ._array_types import PRNGKeyArray, Scalar, ScalarLike # noqa: F401
|
||||
from ._array_types import Scalar, ScalarLike # noqa: F401
|
||||
|
||||
if getattr(typing, "GENERATING_DOCUMENTATION", False):
|
||||
# That is, we're generating some downstream documentation, not the jaxtyping
|
||||
# documentation itself.
|
||||
class PRNGKeyArray:
|
||||
pass
|
||||
|
||||
PRNGKeyArray.__module__ = "builtins"
|
||||
else:
|
||||
from ._array_types import PRNGKeyArray
|
||||
|
||||
del has_jax
|
||||
|
||||
|
||||
Reference in New Issue
Block a user