jax icon indicating copy to clipboard operation
jax copied to clipboard

doc: don't use typehints for signatures.

Open jakevdp opened this issue 1 month ago • 0 comments

The reason to avoid this is that overloaded signatures can be very confusing.

This is the current documentation page for jax.numpy.where: screenshot-2

This is the same page built with this PR: screenshot-1

The downside is that for non-overloaded functions, this change causes type annotations to not be inserted into parameter descriptions. For example this is the current documentation page for jax.scipy.linalg.inv: screenshot-4

And this is the same page built with this PR: screenshot-3

I think the benefit in the case of jnp.where and other overloaded functions far outweighs the loss of annotations in other cases.

jakevdp avatar Jun 11 '24 02:06 jakevdp