### Installing QuantEcon.py from Local Source Source: https://github.com/quantecon/quantecon.py/blob/main/docs/source/setup.rst These commands navigate into the previously cloned QuantEcon.py directory and then install the package using pip from the local source files. This method is typically used by developers or when a specific, unreleased version of the library is required. ```bash cd QuantEcon.py pip install . ``` -------------------------------- ### Installing QuantEcon.py with pip Source: https://github.com/quantecon/quantecon.py/blob/main/docs/source/setup.rst This command installs the QuantEcon.py library using pip, the standard Python package installer. It's a common and straightforward method for adding Python packages to your environment, requiring an active internet connection to download the package. ```bash pip install quantecon ``` -------------------------------- ### Cloning QuantEcon.py Repository with Git Source: https://github.com/quantecon/quantecon.py/blob/main/docs/source/setup.rst This Git command clones the official QuantEcon.py source code repository from GitHub to your local machine. This is a prerequisite step if you intend to install the package manually from its source files rather than through a package manager. ```bash git clone https://github.com/QuantEcon/QuantEcon.py ``` -------------------------------- ### Installing QuantEcon Library Locally for Documentation Build Source: https://github.com/quantecon/quantecon.py/blob/main/docs/README.md These commands navigate up one directory, install the `quantecon` Python library in editable mode from the current local directory using pip, and then navigate back into the `docs` directory. This step ensures the documentation build uses the local, potentially modified, version of the library. ```Shell cd .. pip install . cd docs ``` -------------------------------- ### Installing Documentation Dependencies with Conda Source: https://github.com/quantecon/quantecon.py/blob/main/docs/README.md This command installs the required Python packages for building the `quantecon` documentation using the Conda package manager. These dependencies include Sphinx for documentation generation, numpydoc for NumPy-style docstring support, sphinx_rtd_theme for the Read the Docs theme, and mock for testing. ```Shell conda install sphinx numpydoc sphinx_rtd_theme mock ``` -------------------------------- ### Checking QuantEcon.py Version in Python Source: https://github.com/quantecon/quantecon.py/blob/main/docs/source/setup.rst This Python code snippet prints the currently installed version of the QuantEcon.py library. It's useful for verifying your installation, debugging version-related issues, or determining if an upgrade is necessary to access newer features or bug fixes. ```python print(qe.__version__) ``` -------------------------------- ### Installing QuantEcon.py with conda-forge Source: https://github.com/quantecon/quantecon.py/blob/main/docs/source/setup.rst This command installs the QuantEcon.py library using the conda package manager from the conda-forge channel. Conda is often preferred in scientific Python environments, especially when using Anaconda, as it handles both package and environment management. ```bash conda install -c conda-forge quantecon ``` -------------------------------- ### Makefile Targets for Clean and Full Documentation Build Source: https://github.com/quantecon/quantecon.py/blob/main/docs/README.md This Makefile snippet defines two targets: `srcclean` and `myhtml`. The `srcclean` target removes previously generated source files to ensure a clean build. The `myhtml` target automates the entire documentation build process by first cleaning sources, then installing the `quantecon` library locally, running the API documentation generator, and finally building the HTML documentation. ```Makefile srcclean: rm -rf source/modules* rm -rf source/models* rm -rf source/tools* rm -f source/index.rst rm -f source/models.rst rm -f source/tools.rst myhtml: make srcclean cd .. && pip install . && cd docs python qe_apidoc.py make html ``` -------------------------------- ### Checking QuantEcon Version (Python) Source: https://github.com/quantecon/quantecon.py/blob/main/README.md This snippet demonstrates how to check the installed version of the QuantEcon library using the `__version__` attribute of the imported `qe` module. This is useful for verifying the current installation and determining if an upgrade is needed. ```python print(qe.__version__) ``` -------------------------------- ### Upgrading QuantEcon.py with pip Source: https://github.com/quantecon/quantecon.py/blob/main/docs/source/setup.rst This command upgrades the QuantEcon.py library to its latest available version using pip. Regularly upgrading ensures you have access to the newest features, performance improvements, and critical bug fixes, keeping your environment up-to-date. ```bash pip install --upgrade quantecon ``` -------------------------------- ### Importing QuantEcon.py in Python Source: https://github.com/quantecon/quantecon.py/blob/main/docs/source/setup.rst This Python statement imports the QuantEcon.py library, aliasing it as 'qe' for convenience. This is the essential first step to access and utilize any of the library's functions and classes within a Python script or interactive session. ```python import quantecon as qe ``` -------------------------------- ### Building HTML Documentation with Make Source: https://github.com/quantecon/quantecon.py/blob/main/docs/README.md This command invokes the `make` utility to build the HTML version of the documentation. It uses the `Makefile` in the current directory to execute the necessary Sphinx commands, compiling the reStructuredText source files into a set of static HTML pages that can be viewed in a web browser. ```Shell make html ``` -------------------------------- ### Generating API Documentation with qe_apidoc.py Source: https://github.com/quantecon/quantecon.py/blob/main/docs/README.md This command executes the `qe_apidoc.py` script, which is responsible for generating the API documentation files for the `quantecon` library. This script typically creates reStructuredText files from the library's source code, which Sphinx then uses to build the final documentation. ```Shell python qe_apidoc.py ``` -------------------------------- ### Solving Discrete Dynamic Programming Problems with QuantEcon.py (Python) Source: https://github.com/quantecon/quantecon.py/blob/main/README.md This snippet demonstrates how to solve a discrete dynamic programming (DDP) problem using the `DiscreteDP` class from `quantecon.markov`. It initializes a DDP instance with given reward (R), transition probabilities (Q), and discount factor (beta), then solves it using the 'policy_iteration' method. ```python from quantecon.markov import DiscreteDP aiyagari_ddp = DiscreteDP(R, Q, beta) results = aiyagari_ddp.solve(method='policy_iteration') ``` -------------------------------- ### Importing QuantEcon Library (Python) Source: https://github.com/quantecon/quantecon.py/blob/main/README.md This snippet shows the standard way to import the QuantEcon library in Python, aliasing it as `qe` for convenience. This is the first step to using any functionality provided by the library. ```python import quantecon as qe ``` -------------------------------- ### Citing QuantEcon.py (BibTeX) Source: https://github.com/quantecon/quantecon.py/blob/main/README.md This BibTeX entry provides the standard citation format for QuantEcon.py, suitable for inclusion in LaTeX documents. It includes authors, DOI, title, journal, year, volume, number, and pages, facilitating proper academic attribution. ```bibtex @article{10.21105/joss.05585, author = {Batista, Quentin and Coleman, Chase and Furusawa, Yuya and Hu, Shu and Lunagariya, Smit and Lyon, Spencer and McKay, Matthew and Oyama, Daisuke and Sargent, Thomas J. and Shi, Zejin and Stachurski, John and Winant, Pablo and Watkins, Natasha and Yang, Ziyue and Zhang, Hengcheng}, doi = {10.5281/zenodo.10345102}, title = {QuantEcon.py: A community based Python library for quantitative economics}, year = {2024}, journal = {Journal of Open Source Software}, volume = {9}, number = {93}, pages = {5585} } ``` -------------------------------- ### Listing Python Project Dependencies Source: https://github.com/quantecon/quantecon.py/blob/main/docs/rtd-requirements.txt This snippet outlines the essential Python packages and their version constraints that the Quantecon project relies on. These dependencies ensure compatibility and proper functioning of the project's components. ```Python sphinx<=6.2.1 ipython numpydoc numba>=0.49 numpy>=1.17 sympy scipy>=1.5 requests matplotlib sphinx_rtd_theme ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.