{"library":"nutpie","title":"Nutpie for Stan or PyMC Models","description":"Nutpie is a Python library designed to sample Stan or PyMC models efficiently, leveraging JAX for high-performance computation. It provides an alternative MCMC sampler for probabilistic programming models, aiming for speed and robustness. The current version is 0.16.8, and it maintains a frequent release cadence, often with minor bug fixes, dependency updates, and feature enhancements.","language":"python","status":"active","last_verified":"Fri Apr 17","install":{"commands":["pip install nutpie"],"cli":null},"imports":["import nutpie; nutpie.sample(...)","import nutpie; nutpie.compile_pymc_model(...)"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import pymc as pm\nimport nutpie as np\n\n# Define a simple PyMC model\nwith pm.Model() as model:\n    # Priors\n    mu = pm.Normal('mu', mu=0, sigma=1)\n    sigma = pm.HalfNormal('sigma', sigma=1)\n    \n    # Likelihood\n    obs = pm.Normal('obs', mu=mu, sigma=sigma, observed=[1.0, 2.0, 3.0])\n\n# Sample the model using Nutpie\nprint(\"Starting Nutpie sampling...\")\nidata = np.sample(model)\n\nprint(\"Sampling complete. InferenceData:\\n\", idata)","lang":"python","description":"This example demonstrates how to define a basic PyMC model and then use `nutpie.sample()` to perform MCMC sampling. The results are returned in an `arviz.InferenceData` object.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}