Skip to content

Commit a737725

Browse files
Merge pull request #33424 from jakevdp:error-doc
PiperOrigin-RevId: 834767465
2 parents a03b09e + 80bf8e6 commit a737725

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

docs/errors.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@ This page lists a few of the errors you might encounter when using JAX,
77
along with representative examples of how one might fix them.
88

99
.. currentmodule:: jax.errors
10+
.. autoclass:: JaxRuntimeError
11+
.. autoclass:: JAXTypeError
12+
.. autoclass:: JAXIndexError
1013
.. autoclass:: ConcretizationTypeError
1114
.. autoclass:: KeyReuseError
12-
.. autoclass:: JaxRuntimeError
1315
.. autoclass:: NonConcreteBooleanIndexError
1416
.. autoclass:: TracerArrayConversionError
1517
.. autoclass:: TracerBoolConversionError

jax/_src/errors.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@ def __init__(self, message: str):
3535

3636
@export
3737
class JAXTypeError(_JAXErrorMixin, TypeError):
38-
pass
38+
"""JAX-specific :class:`TypeError`"""
3939

4040

4141
@export
4242
class JAXIndexError(_JAXErrorMixin, IndexError):
43-
pass
43+
"""JAX-specific :class:`IndexError`"""
4444

4545

4646
@export

tests/documentation_coverage_test.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ def jax_docs_dir() -> str:
5858
'jax.debug': ['DebugEffect', 'log'],
5959
'jax.distributed': ['is_initialized'],
6060
'jax.dtypes': ['extended', 'finfo', 'iinfo'],
61-
'jax.errors': ['JAXIndexError', 'JAXTypeError'],
6261
'jax.ffi': ['build_ffi_lowering_function', 'include_dir', 'register_ffi_target_as_batch_partitionable', 'register_ffi_type_id'],
6362
'jax.lax': ['unreduced_psum', 'dce_sink', 'conv_transpose_shape_tuple', 'reduce_window_shape_tuple', 'preduced', 'conv_general_permutations', 'conv_general_shape_tuple', 'pbroadcast', 'padtype_to_pads', 'conv_shape_tuple', 'unreduced_psum_scatter', 'create_token', 'dtype', 'shape_as_value', 'all_gather_reduced', 'pvary', *(name for name in dir(jax.lax) if name.endswith('_p'))],
6463
'jax.lax.linalg': [api for api in dir(jax.lax.linalg) if api.endswith('_p')],

0 commit comments

Comments
 (0)