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
pip install abracudabra
Basic Usage
Here's a quick example demonstrating how to convert a NumPy array to a CUDA-compatible (CuPy) array:
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.
Metadata
Release files for abracudabra 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| abracudabra-0.1.3-py3-none-any.whl | Python 3 | none | any | Details for abracudabra-0.1.3-py3-none-any.whl |
Release files / abracudabra-0.1.3-py3-none-any.whl
| Download URL | abracudabra-0.1.3-py3-none-any.whl |
|---|---|
| Size | 22.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d33364696c74904394bf00704de72fb021d145d5d9edb66533b2c8796ab728b4
|
|
BLAKE2b-256 checksum How to use checksums |
56c069b49b852023b0d79271b7f7299dc620bdf9dbd8ddfec6f9d32f3cac2352
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.6.3
|
Security for abracudabra 0.1.3
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.