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.6.tar.gz
(2.6 kB
view details)
File details
Details for the file redistensor-0.0.6.tar.gz.
File metadata
- Download URL: redistensor-0.0.6.tar.gz
- Upload date:
- Size: 2.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2421655137f24d990a67ad0bda181a07623aa5a0651ddf52e888126e04f4b8a4
|
|
| MD5 |
4445587fd1ad4270777a0fd859bc46de
|
|
| BLAKE2b-256 |
d8e793f00dfe7fd38ee2a5de36e7b0cf438042c4bd1093f9da6e1fcffa9187ec
|