Skip to main content
Array stored in database
========================

`DBArray` is an 2D array stored in database.
The purpose of this class is to provide a way to store and access large
array which can not be loaded into memory.

## Example

```python
import numpy as np
from dbarray import DBArray

# Create random array
nrows = 5
ncols = 8
dtype = np.float32
arr = np.random.random((nrows, ncols))
arr = np.require(arr, dtype)
print arr

""" `DBArray` from scratch
"""
# Create `DBArray`
dba1 = DBArray('test1.db')
# Initialize
dba1.set_shape((nrows, ncols))
dba1.set_dtype(dtype)

# Set rows
for i in range(nrows):
dba1[i] = arr[i]

# Convert to ndarray
print dba1.tondarray()

""" `DBArray` from `ndarray`
"""
# Create `DBArray`
dba2 = DBArray.fromndarray(arr, 'test2.db')

# Check attributes
print dba2.nrows, dba2.ncols, dba2.dtype

# Convert to ndarray
print dba2.tondarray()
```

Metadata

Release files for dbarray 0.1.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dbarray 0.1.7
File Size Uploaded Provenance Actions
dbarray-0.1.7.tar.gz 5.3 kB Without provenance Details for dbarray-0.1.7.tar.gz

Release files / dbarray-0.1.7.tar.gz

Download URL dbarray-0.1.7.tar.gz
Size 5.3 kB
Tags Source
SHA-256 checksum
How to use checksums
cfa4461f8e6b914738efc08d93db0f085d3cbfa9f72ca4ad29c944ab71748222
BLAKE2b-256 checksum
How to use checksums
d5a0a584a32d7819a28e626706758824272c06995ba6a997e820ea8035bcd26c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for dbarray 0.1.7

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page