Skip to main content

A package for converting between Cartesian and hyper-spherical (n-sphere) coordinates

Project description

Hyperspherical

Hyperspherical is a Python package for converting between Cartesian and hyper-spherical (n-sphere) coordinates in any number of dimensions. It also works for 2D cartesian and polar coordinates.

Installation

You can install Hyperspherical using pip:

pip install hyperspherical

Usage

Here's a basic example of how to use Hyperspherical:

import numpy as np
from hyperspherical import cartesian2spherical, spherical2cartesian

# Convert Cartesian to spherical
cartesian_points = np.array([[1, 1, 1], [0, 1, 0], [1, 0, 0]])
spherical_points = cartesian2spherical(cartesian_points)
print(spherical_points)

# Convert spherical to Cartesian
cartesian_points_back = spherical2cartesian(spherical_points)
print(cartesian_points_back)

License

This project is licensed under the MIT License - see the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hyperspherical-0.1.0.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hyperspherical-0.1.0-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file hyperspherical-0.1.0.tar.gz.

File metadata

  • Download URL: hyperspherical-0.1.0.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.7

File hashes

Hashes for hyperspherical-0.1.0.tar.gz
Algorithm Hash digest
SHA256 25c877e110094e1944a6df997444e3186f8a25c70654c5f1489b462170fec798
MD5 1300f8427f029557914f209128126083
BLAKE2b-256 344350cdb47560ea07cbff10e866fc849c0185330a1c6f91fc68c3d833a3629d

See more details on using hashes here.

File details

Details for the file hyperspherical-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: hyperspherical-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.7

File hashes

Hashes for hyperspherical-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 49a7cd032a5ab8231598c78f59c3a4d884e8e1b7817ae92490b7aae2d199e6f5
MD5 8c3ec7e8c49891ec02bab0bb99351865
BLAKE2b-256 97f02586fb0737ebd213c76649bb10aab7dc061026451c19e5dabdc93b83b228

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page