Skip to main content

Structural diversity index

The package structural-diversity-index implements code for fast numerical computation of the structural diversity index. The associated GitHub repository can be found here. The package's documentation ia available here.

Installation

To install the package and its dependencies you should create a python virtual environment. A detailed tutorial about virtual environments is available here. However, if you are in a hurry you can just open a terminal window and type

python3 -m venv sdi_venv

This creates a virtual environment called sdi_venv in your current directory. Next, activate the virtual environment. This is done on Unix or macOS by typing into the terminal

source sdi_venv/bin/activate

On Windows you should type

sdi_venv\Scripts\activate.bat

Once you created and activated the virtual environment you can install the structural_diversity_index package by typing into the terminal

pip install structural_diversity_index

This will install the latest version of the package in the virtual environment.

WARNING 1: Installing the package via pip will allow NOT you to use the scripts that run computations on GPUs. See below for details of how to run the scripts computing on GPUs.

WARNING 2: Installing the package into an existing virtual environment can cause the code to break due to conflicts with already existing dependencies. For this reason we advise to create a new virtual environment.

Installation for GPUs

If you are not interested in running computations on GPUs you can ignore this section.

Installing the structural_diversity_index package via pip does not enable you to run computations on GPUs. The reason is that pip cannot install Cudatoolkit (because it is not a python package).

To circumvent this issue one can use a package installer such as conda. Once you have installed conda on your computer, download the file environment.yml from the GitHub. In the terminal, go to the directory containing the environment.yml file you downloaded and type:

conda env create -f environment.yml

This will create a conda environment called sd_index and install all the dependencies necessary to computations on GPUs. Now you can set the flag on_cuda to True (see Examples.ipynb on GitHub) and computations will run on GPUs.

Tutorial

The Jupyter notebook Example.ipynb contains a detailed tutorial explaining how to use the package structural_diversity_index. You can find it here.

Extending the code

If you are interested in extending or simply playing around with the code, I have created a detailed documentation with ReadTheDocs which is available here. Have fun!

Metadata

Release files for structural-diversity-index 0.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for structural-diversity-index 0.0.7
File Size Uploaded Provenance Actions
structural_diversity_index-0.0.7.tar.gz 11.6 kB Without provenance Details for structural_diversity_index-0.0.7.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for structural-diversity-index 0.0.7
File Interpreter ABI Platform Actions
structural_diversity_index-0.0.7-py3-none-any.whl Python 3 none any Details for structural_diversity_index-0.0.7-py3-none-any.whl

Total release size: 26.0 kB

Release files / structural_diversity_index-0.0.7.tar.gz

Download URL structural_diversity_index-0.0.7.tar.gz
Size 11.6 kB
Tags Source
SHA-256 checksum
How to use checksums
81fda11c3d57893d669580a7f90f2571c31035c3b2d7406c1c45d99fbc5a877f
BLAKE2b-256 checksum
How to use checksums
d3c947f5aa5a973009b8d1c54aeb9f39ae1a4a575385d17484fd58c55679cbae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.8.2

Release files / structural_diversity_index-0.0.7-py3-none-any.whl

Download URL structural_diversity_index-0.0.7-py3-none-any.whl
Size 14.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ecb82337f9efc061c6433a458a5f68e10fd4533a67ff3f84bc257b21e3decb57
BLAKE2b-256 checksum
How to use checksums
cc66bad3fcfc88cdbb4c74543978cc1d3f4c59e9f24d48544e53cb107c4c375f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.8.2

Security for structural-diversity-index 0.0.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page