Yet another numpy ndarray fields for Django
Project description
django-ndarrayfield
New Django field to store numpy ndarray.
Description
Store a numpy n-dimensional array in database (compatible with all database backend). Use numpy save/load, you can define a shape (not required), and a dtype (default float32).
Usage
import numpy as np
from django.db import models
from ndarraydjango.fields import NDArrayField
class MyModel(models.Model):
vec1 = NDArrayField(shape=(32, 4), dtype=np.float64)
date = models.DateTimeField(auto_now_add=True)
Warning
This field type does not replace a static file storage. The main goal is to store parameter data, results of algorithms and small and medium machine learning models. A good indication is the shape of the nd-array. It would be static, and with a reasonable size. The overrall data size should not exceed 1mb. For example a field of 300x400 of 2 float32 value ( (300, 400, 2) dtype=float32) should be a maximum.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Hashes for django-ndarrayfield-1.0.0rc3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1abc562a541e3e068cb10980fc427ecf8430998bcf9362894cb9acd1c1fa76fa |
|
MD5 | bbf8a89c468f0f688ed63edd1c0f1605 |
|
BLAKE2b-256 | 6a68e958cd110a81ec984a44a382d97e4bd08358440c849f5c177a2c9fc604fe |