{"library":"jaxlib","code":"import jax\nimport jax.numpy as jnp\n\ndef my_function(x):\n    return jnp.sin(x) * jnp.cos(x)\n\n# JIT-compile the function for performance\ncompiled_function = jax.jit(my_function)\n\n# Create a JAX array\nx = jnp.linspace(0, 10, 1000)\n\n# Run the compiled function\ny = compiled_function(x)\n\nprint(f\"JAX detected devices: {jax.devices()}\")\nprint(f\"Result array shape: {y.shape}\")\nprint(f\"First 5 elements of y: {y[:5]}\")","lang":"python","description":"This quickstart demonstrates a basic JAX program that implicitly leverages `jaxlib` for Just-In-Time (JIT) compilation and execution on available accelerators (CPU, GPU, or TPU). It defines a simple numerical function, compiles it with `jax.jit`, and performs an operation on a JAX array. The output shows detected devices and a sample of the computation.","tag":null,"tag_description":null,"last_tested":"2026-04-24","results":[{"runtime":"python:3.10-alpine","exit_code":1},{"runtime":"python:3.10-slim","exit_code":0},{"runtime":"python:3.11-alpine","exit_code":1},{"runtime":"python:3.11-slim","exit_code":0},{"runtime":"python:3.12-alpine","exit_code":1},{"runtime":"python:3.12-slim","exit_code":0},{"runtime":"python:3.13-alpine","exit_code":1},{"runtime":"python:3.13-slim","exit_code":0},{"runtime":"python:3.9-alpine","exit_code":1},{"runtime":"python:3.9-slim","exit_code":0}]}