using redis to store tensor data
Project description
save numpy tensor using redis
prepare
install redis-server
using
from redistensor import RedisTensor as rt
import numpy as np
host = "localhost"
port = 6379
password = ""
r = rt(host, port, password)
# save one tensor
x = np.random.randn(2,3).astype(np.float32)
print(x)
r.set('x_1', x)
# get one tensor
y = r.get('x_1')
print(y)
# redis tensor name list
names = r.names()
for name in names:
print(name)
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
redistensor-0.0.2.tar.gz
(2.3 kB
view details)
File details
Details for the file redistensor-0.0.2.tar.gz.
File metadata
- Download URL: redistensor-0.0.2.tar.gz
- Upload date:
- Size: 2.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2a0cef98b1c9c8d8ab5992b62b450937859acc2a3429d363f77ed1f1b70a44f5
|
|
| MD5 |
fbb7957ff531cc0ada615aa699cece8e
|
|
| BLAKE2b-256 |
ce831cf603d5806b66e2c8319feb159e0819f3250a65bb9236132e602a7082d3
|