Skip to main content

Allows to create Numpy `.npy` files that are larger than the main memory

Project description

NpyAppendArray

Allows to create Numpy .npy files that are larger than the main memory of the machine by appending on the zero axis. The file can then be read with mmap_mode="r".

from npy_append_array import NpyAppendArray
import numpy as np

arr1 = np.array([[1,2],[3,4]])
arr2 = np.array([[1,2],[3,4],[5,6]])

filename='out.npy'

# line may be removed, still works correctly if filename does not exist
np.save(filename, arr1)

npaa = NpyAppendArray(filename)
npaa.append(arr2)
npaa.append(arr2)
npaa.append(arr2)

data = np.load(filename, mmap_mode="r")

print(data)

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

npy-append-array-0.9.4.tar.gz (2.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

npy_append_array-0.9.4-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

Details for the file npy-append-array-0.9.4.tar.gz.

File metadata

  • Download URL: npy-append-array-0.9.4.tar.gz
  • Upload date:
  • Size: 2.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/0.0.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0.post20200925 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.5

File hashes

Hashes for npy-append-array-0.9.4.tar.gz
Algorithm Hash digest
SHA256 0875dbf85be4061d6a70a58524b8dfe956a739d536054a209057084754d14860
MD5 58407724c150cde6cc2f658c2753dde8
BLAKE2b-256 c1bfe947c40572d1bb69ad1dd26d7ef6d83d3e6bbcdbc05e655cd99d8f9c2a2d

See more details on using hashes here.

File details

Details for the file npy_append_array-0.9.4-py3-none-any.whl.

File metadata

  • Download URL: npy_append_array-0.9.4-py3-none-any.whl
  • Upload date:
  • Size: 3.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/0.0.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0.post20200925 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.5

File hashes

Hashes for npy_append_array-0.9.4-py3-none-any.whl
Algorithm Hash digest
SHA256 48058e2f8c9f251af6a04d21e2fa9c97c4d93d26fff3bf309bc0468b9293f652
MD5 3c1220a532765766ca5fac059b40fc35
BLAKE2b-256 8c20221c80a8996b445b57efb5ecd6aadf2b16bb2d0a21d0af8aa3a7b45133c2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page