Metadata-Version: 2.4
Name: hsdpy
Version: 0.1.0b2
Summary: Python bindings for the Hsdlib library
Author-email: Hassan Abedi <hassan.abedi.t+hsdlib@gmail.com>
License: MIT
Project-URL: Repository, https://github.com/habedi/hsdlib
Project-URL: Issues, https://github.com/habedi/hsdlib/issues
Keywords: python binding,simd,distance metrics,similarity measures
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=2.0.0
Provides-Extra: dev
Requires-Dist: pytest>=8.0.1; extra == "dev"
Requires-Dist: pytest-cov>=6.0.0; extra == "dev"
Requires-Dist: pyright>=1.1.391; extra == "dev"
Requires-Dist: ruff>=0.9.3; extra == "dev"
Requires-Dist: scipy>=1.15.2; extra == "dev"
Dynamic: license-file

## HsdPy

[![License: MIT](https://img.shields.io/badge/License-MIT-007ec6.svg)](../../LICENSE)
[![Python version](https://img.shields.io/badge/Python-%3E=3.10-blue)](https://github.com/habedi/hsdlib)
[![PyPI version](https://badge.fury.io/py/hsdpy.svg)](https://badge.fury.io/py/hsdpy)
[![Pip downloads](https://img.shields.io/pypi/dm/hsdpy.svg)](https://pypi.org/project/hsdpy)

HsdPy library allows users to use [Hsdlib](https://github.com/habedi/hsdlib) in Python.

### Installation

```bash
pip install hsdpy
```

### Simple Example

```python
import hsdpy

# HsdPy uses NumPy for array handling
import numpy as np

# Create two NumPy arrays of float32 type
a = np.array([1.0, 2.0, 3.0], dtype=np.float32)
b = np.array([4.0, 5.0, 6.0], dtype=np.float32)

# Calculate the euclidean distance between the two arrays
dist_euc = hsdpy.dist_sqeuclidean_f32(a, b) ** 0.5

# Calculate Manhattan distance
dist_man = hsdpy.dist_manhattan_f32(a, b)

# Let's see the results
print(f"Euclidean distance: {dist_euc}")  # 5.196
print(f"Manhattan distance: {dist_man}")  # 9.0

# See the SIMD backend in use
print(f"Backend: {hsdpy.get_backend()}")
```

### License

HsdPy is licensed under the [MIT License](../../LICENSE).
