Skip to main content

Configurable memory allocations

Project description

Memory management in NumPy*

Binder PyPI version

*NumPy is a trademark owned by NumFOCUS.

Customize Memory Allocators

Α metaclass is used to override the internal data memory routines. The metaclass has four optional fields:

>>> import ctypes
>>> import numpy_allocator
>>> my = ctypes.CDLL('libmy.so')
>>> class my_allocator(metaclass=numpy_allocator.type):
...     _calloc_ = my.calloc_func
...     _free_ = my.free_func
...     _malloc_ = my.malloc_func
...     _realloc_ = my.realloc_func
...

An example using the allocator

>>> import numpy as np
>>> with my_allocator:
...     a = np.array([1, 2, 3])
...
>>> my_allocator.handles(a)
True

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

numpy-allocator-1.1.3.tar.gz (10.4 kB view details)

Uploaded Source

Built Distributions

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

numpy_allocator-1.1.3-cp311-cp311-musllinux_1_1_x86_64.whl (35.9 kB view details)

Uploaded CPython 3.11musllinux: musl 1.1+ x86-64

numpy_allocator-1.1.3-cp311-cp311-musllinux_1_1_i686.whl (34.5 kB view details)

Uploaded CPython 3.11musllinux: musl 1.1+ i686

numpy_allocator-1.1.3-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (31.9 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64manylinux: glibc 2.5+ x86-64

numpy_allocator-1.1.3-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl (30.4 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ i686manylinux: glibc 2.5+ i686

numpy_allocator-1.1.3-cp310-cp310-musllinux_1_1_x86_64.whl (34.9 kB view details)

Uploaded CPython 3.10musllinux: musl 1.1+ x86-64

numpy_allocator-1.1.3-cp310-cp310-musllinux_1_1_i686.whl (33.6 kB view details)

Uploaded CPython 3.10musllinux: musl 1.1+ i686

numpy_allocator-1.1.3-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (31.7 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64manylinux: glibc 2.5+ x86-64

numpy_allocator-1.1.3-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl (30.2 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ i686manylinux: glibc 2.5+ i686

numpy_allocator-1.1.3-cp39-cp39-musllinux_1_1_x86_64.whl (34.3 kB view details)

Uploaded CPython 3.9musllinux: musl 1.1+ x86-64

numpy_allocator-1.1.3-cp39-cp39-musllinux_1_1_i686.whl (33.0 kB view details)

Uploaded CPython 3.9musllinux: musl 1.1+ i686

numpy_allocator-1.1.3-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (31.2 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64manylinux: glibc 2.5+ x86-64

numpy_allocator-1.1.3-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl (29.7 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ i686manylinux: glibc 2.5+ i686

numpy_allocator-1.1.3-cp38-cp38-musllinux_1_1_x86_64.whl (35.4 kB view details)

Uploaded CPython 3.8musllinux: musl 1.1+ x86-64

numpy_allocator-1.1.3-cp38-cp38-musllinux_1_1_i686.whl (34.1 kB view details)

Uploaded CPython 3.8musllinux: musl 1.1+ i686

numpy_allocator-1.1.3-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (31.6 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64manylinux: glibc 2.5+ x86-64

numpy_allocator-1.1.3-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl (30.1 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ i686manylinux: glibc 2.5+ i686

File details

Details for the file numpy-allocator-1.1.3.tar.gz.

File metadata

  • Download URL: numpy-allocator-1.1.3.tar.gz
  • Upload date:
  • Size: 10.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for numpy-allocator-1.1.3.tar.gz
Algorithm Hash digest
SHA256 fc12c993579ac11d9a1eb2a450eea285410f880e24a1238256edec040842b4dc
MD5 abfc41bd820f2982c601e11d9ea54f6c
BLAKE2b-256 1eec7be78aa0abc1ae4035d6621592b4fde3583866b3a823aa11658be17c996e

See more details on using hashes here.

File details

Details for the file numpy_allocator-1.1.3-cp311-cp311-musllinux_1_1_x86_64.whl.

File metadata

File hashes

Hashes for numpy_allocator-1.1.3-cp311-cp311-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 142b77982d9ea2a7a997feec4d82e7f0c13aa066493219be0910e8a0f4f14081
MD5 535f5af11ebd9e73d5006f0d03e9fd16
BLAKE2b-256 02b3df72a86c1d2394e752bbb67650f1545a92457b16bf5b31a0939bc21468bf

See more details on using hashes here.

File details

Details for the file numpy_allocator-1.1.3-cp311-cp311-musllinux_1_1_i686.whl.

File metadata

File hashes

Hashes for numpy_allocator-1.1.3-cp311-cp311-musllinux_1_1_i686.whl
Algorithm Hash digest
SHA256 662db63ba2d7364a0558fe829ae753e4481b11dafc10ac306975e696c5ad7529
MD5 b485f9c408aa2b4da922f72fcf3cc6b9
BLAKE2b-256 3add4d39edba81374af2ae347c7b5e13570e2d126b0b51aa64a2e99980d0f897

See more details on using hashes here.

File details

Details for the file numpy_allocator-1.1.3-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for numpy_allocator-1.1.3-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d518587e0dd5e62d3a7927004a7c731014592529606c54a36f2e86687996e7e2
MD5 880912a5fea39dc71c300f6d92ba89fa
BLAKE2b-256 28c79a97c3cc111b44ecac59c0a2fb50c4a25031660874bffe4e7a589d2e7f56

See more details on using hashes here.

File details

Details for the file numpy_allocator-1.1.3-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for numpy_allocator-1.1.3-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 a348d7a0d96346049d802c64f3a7cddc77ef23cb9f0c4d2c0d979b23ff6734f7
MD5 045c03fe0986812e08d0bd59d171c820
BLAKE2b-256 1aa0b8ba8008c353d1eb72a29d9e8c27ce47d495303caf0792e6ae9f82691b83

See more details on using hashes here.

File details

Details for the file numpy_allocator-1.1.3-cp310-cp310-musllinux_1_1_x86_64.whl.

File metadata

File hashes

Hashes for numpy_allocator-1.1.3-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 be2e74e4825db4b93fa988ea5b14586827b0fa466c323b0b2d3c87535a0466e2
MD5 c8e6a1ca85f94fdea35e9dffb2fbb090
BLAKE2b-256 2c31d9cc8b7a6fc26f8fe52bb76e354c3298a93ba519a571e23186fef1af7de7

See more details on using hashes here.

File details

Details for the file numpy_allocator-1.1.3-cp310-cp310-musllinux_1_1_i686.whl.

File metadata

File hashes

Hashes for numpy_allocator-1.1.3-cp310-cp310-musllinux_1_1_i686.whl
Algorithm Hash digest
SHA256 91741ed235d5d982728932971c1399aca8094a2a029e60cd26dc50e8124378a8
MD5 d73973c8d614b78d13cf1777df0ac7b4
BLAKE2b-256 920d8a9605c2bf99564fb659236555f4d36da892f24b018dfe263eab14e0d064

See more details on using hashes here.

File details

Details for the file numpy_allocator-1.1.3-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for numpy_allocator-1.1.3-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c8dfd9c813832a1c7042571ba6bee145e717e451a8eb8ba80d4dca6499d163e3
MD5 9a073d5302b3cc3d282a65552b09e475
BLAKE2b-256 d64b38abd4d0a20a0e397f3914fa5104b5dfc8921a9a267b268016f537210367

See more details on using hashes here.

File details

Details for the file numpy_allocator-1.1.3-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for numpy_allocator-1.1.3-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 9d9bd994fed6badb276d489856f5958ab986f073915d6265988bde60160c9b99
MD5 6b95196d7be54799eb885b35b2868ece
BLAKE2b-256 0122c412db5f8d47766d9a251caa2d69fe0ffe669b813861496a7f1ace57e5a1

See more details on using hashes here.

File details

Details for the file numpy_allocator-1.1.3-cp39-cp39-musllinux_1_1_x86_64.whl.

File metadata

File hashes

Hashes for numpy_allocator-1.1.3-cp39-cp39-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 2ec547938188a8dd151b9aa71b3d28887481208f473ebcdd4f3c9d227ea01e56
MD5 fe67a00726cbe53138f5da28d83357b9
BLAKE2b-256 7b7d7780a50576d2524a0b0248ce6386172257068ea5e8398365feaad84cda60

See more details on using hashes here.

File details

Details for the file numpy_allocator-1.1.3-cp39-cp39-musllinux_1_1_i686.whl.

File metadata

File hashes

Hashes for numpy_allocator-1.1.3-cp39-cp39-musllinux_1_1_i686.whl
Algorithm Hash digest
SHA256 f170fd7033eea40db6258f9216130fcc62c38e295efd5e17e956e9a1b725b178
MD5 87f30e06cbf2cc53ecf2e796f8f3e785
BLAKE2b-256 9f6cba7ca20b7df43d593c857c304469e7468aaae43537c2d3809f374a13f4f9

See more details on using hashes here.

File details

Details for the file numpy_allocator-1.1.3-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for numpy_allocator-1.1.3-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 bb59a85f5373c405ae37af14b2e3e843315d1cc5e5ae22008f0b5de48d87664c
MD5 02d10f18cfec2c4f5664cae16e4cf084
BLAKE2b-256 7187b92f8356e904e4f49d1ba747169eace7bc5ecb9e9c3db67e2e6d92d1ad43

See more details on using hashes here.

File details

Details for the file numpy_allocator-1.1.3-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for numpy_allocator-1.1.3-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 81c54a6bbcc161247ba83be0526cd14c53d9823a4bbdfe483c07679bce896a6f
MD5 08d41ead029ad247fea869c38bc3c97e
BLAKE2b-256 2758fc891b2a8788508e9493fcd8ab96ef472b697c630c0770c693f5cd21a600

See more details on using hashes here.

File details

Details for the file numpy_allocator-1.1.3-cp38-cp38-musllinux_1_1_x86_64.whl.

File metadata

File hashes

Hashes for numpy_allocator-1.1.3-cp38-cp38-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 01d0aa833cfd01fef49c35d4a924e3ceae603d680bf6fe557434282a9c954e6c
MD5 edce8ebe1a155b0ed05dcb8ef9e7a4d7
BLAKE2b-256 d73ca765a082967a764d75ded36339b964fde16c32d39249efd34ecfec3a824f

See more details on using hashes here.

File details

Details for the file numpy_allocator-1.1.3-cp38-cp38-musllinux_1_1_i686.whl.

File metadata

File hashes

Hashes for numpy_allocator-1.1.3-cp38-cp38-musllinux_1_1_i686.whl
Algorithm Hash digest
SHA256 0b3536f429e351810308dfe8001af27c930cb823c56742412d40ebf2bec2e89b
MD5 c77ed1dd52f3b26344f5d87eb3a50e4a
BLAKE2b-256 85673c431351e8d6595364e912e500a57d8e7a94a4ee3203b263d2a3e3291dfb

See more details on using hashes here.

File details

Details for the file numpy_allocator-1.1.3-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for numpy_allocator-1.1.3-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6929189a354129be292feb875770cd1a5b007a9286645fa45a8aa0f2074f4463
MD5 475045706c98ba8549d74a3abfa6011c
BLAKE2b-256 8264d778c8ba90b3ef05a8043dad91bb052aeb79572830cec23da2cb5aacbf3c

See more details on using hashes here.

File details

Details for the file numpy_allocator-1.1.3-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for numpy_allocator-1.1.3-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 7392ea6b6ae6f22ddcebc8d4ad4c976ab74a8743a70340779789bb9a08a211d3
MD5 5e215f824b3b33f4684c0f674dc0faf7
BLAKE2b-256 9f7a40ca2bf4ba0242f0af53ff145232fe4692cb7a7f711d0e61bafa9c8f2bdd

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