Have PRNGKeyArray appear correctly in downstream documentation

This commit is contained in:
Patrick Kidger
2023-06-29 18:39:22 -07:00
parent 83be9e9d16
commit a6ab6c0d28
+11 -1
View File
@@ -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