Metadata-Version: 2.4
Name: abracudabra
Version: 0.1.0
Summary: Convert Tensors, Arrays and DataFrames Between CPU and CUDA
Project-URL: Homepage, https://gitlab.cern.ch/particlepredatorinvasion/abracudabra
Project-URL: Documentation, https://abracudabra.docs.cern.ch
Project-URL: Repository, https://gitlab.cern.ch/particlepredatorinvasion/abracudabra
Project-URL: Issues, https://gitlab.cern.ch/particlepredatorinvasion/abracudabra/issues
Project-URL: Changelog, https://gitlab.cern.ch/particlepredatorinvasion/abracudabra/-/blob/master/CHANGELOG.md
Author-email: Anthony Correia <anthony.correia@cern.ch>
License: Apache License (2.0)
License-File: LICENSE
Keywords: array,cpu,cuda,cudf,cupy,data-processing,data-science,dataframe,deep-learning,gpu,machine-learning,numpy,pandas,series,tensor,torch
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering
Requires-Python: >=3.10
Provides-Extra: cpu
Requires-Dist: numpy>=2.0.2; extra == 'cpu'
Requires-Dist: pandas>=2.2.3; extra == 'cpu'
Requires-Dist: torch<2.6.0; extra == 'cpu'
Provides-Extra: cuda124
Requires-Dist: cudf-cu12==25.2.*; extra == 'cuda124'
Requires-Dist: cupy-cuda12x>=13.4.0; extra == 'cuda124'
Requires-Dist: torch<2.6.0; extra == 'cuda124'
Description-Content-Type: text/markdown

![TurboGraph logo](https://gitlab.cern.ch/particlepredatorinvasion/abracudabra/raw/master/docs/source/_static/logo.png)

Convert Tensors, Arrays and DataFrames Between CPU and CUDA

📖 **Documentation:** https://abracudabra.docs.cern.ch/master

Abracudabra simplifies moving data between CPU and CUDA devices,
supporting seamless conversions for torch tensors, NumPy/CuPy arrays,
and pandas/cudf Series and DataFrames.

## Quick Installation

```bash
pip install abracudabra
```

## Basic Usage

Here's a quick example demonstrating how to convert a NumPy array to a CUDA-compatible
(CuPy) array:
```python
from abracudabra import to_array
import torch

tensor = torch.rand(2, 3, device="cuda:0")
array = to_array(tensor)

print(type(array))  # <class 'cupy.ndarray'>
```

## More Information

Abracudabra also supports conversions for dataframes, series, tensors,
and includes utilities for querying and managing device contexts.
For comprehensive documentation and additional examples,
please visit the [official usage guide](https://abracudabra.docs.cern.ch/master/usage.html).

