Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

numpy array support #86

Open
dineshbvadhia opened this issue Feb 11, 2022 · 1 comment
Open

numpy array support #86

dineshbvadhia opened this issue Feb 11, 2022 · 1 comment

Comments

@dineshbvadhia
Copy link

I know pickleDB is a python-only kv store but does it (or can it) support numpy arrays?

@markoxu
Copy link

markoxu commented May 15, 2022

You can refer to stackoverflow for more details.

import numpy as np
import pickledb
db = pickledb.load('pickle.db')
db = pickledb.load('pickle.db', False)
array = np.arange(10).reshape(2,5)
db.set('array', array) # or db.set('array', array.tolist())
np.array(db.get('array'))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants