Skip to main content

Create an iterable set of pointers to a specified length. Utilities for working with ZeroIntensity's pointers.py

Project description

cereal

Parallelization requires tools to reference data without overuse of memory. cereal allows you to reference PyObjects to pointers without creating a deep copy in memory. An extension for ZeroIntensity's pointers.py.

cereal:

pointers.py:

import numpy as np
from cereal import eat

x = [1, 2, 3, 4]

yum = eat(x, its = 4, np.array, copy = False)

>> yum
>> array([<pointer to list object at 0x113b3edc0>,
          <pointer to list object at 0x113b3edc0>,
          <pointer to list object at 0x113b3edc0>,
          <pointer to list object at 0x113b3edc0>], dtype=object) # 4 pointers to the original object

>> (~yum[0])[0]
>> 1

yum[0][0] = 4

>> x # the original object
>> [4, 2, 3, 4] # it changed!

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

cereal-py-1.0.3.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

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

cereal_py-1.0.3-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file cereal-py-1.0.3.tar.gz.

File metadata

  • Download URL: cereal-py-1.0.3.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.0

File hashes

Hashes for cereal-py-1.0.3.tar.gz
Algorithm Hash digest
SHA256 eb68565fcc4c9fef06d8fb2a57b535e18b14bb05c84fca7bd878f2308bf2a515
MD5 9a1fec9a95bd6e066866e3887df182e4
BLAKE2b-256 a7a67967b31fe18a0cde86f4bde88159df016c7dfd18d559f72e671ad0df9b0d

See more details on using hashes here.

File details

Details for the file cereal_py-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: cereal_py-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.0

File hashes

Hashes for cereal_py-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 7ce72d49af1b24fbd87bec0c0ac936d8fddf170f3c31441a85c6598f127dd2cf
MD5 c7830fb17ee9dd415a2a5f5b257c4003
BLAKE2b-256 ca1258b7e6ce453dc5b2d6cafe5682c2d6c1968055c13888b0dfed359362c0c0

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