Update Common_Gotchas_in_JAX.ipynb

Clarify that the index is clamped to the bounds of the array when accessing out of bounds.
This commit is contained in:
johnpjf 2020-10-05 10:19:18 -07:00 committed by GitHub
parent d388b6260b
commit b357005e60
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -603,7 +603,7 @@
"id": "eoXrGARWypdR"
},
"source": [
"However, raising an error on other accelerators can be more difficult. Therefore, JAX does not raise an error and instead returns the last value in the array. "
"However, raising an error on other accelerators can be more difficult. Therefore, JAX does not raise an error, instead the index is clamped to the bounds of the array, meaning that for this example the last value of the array will be returned. "
]
},
{