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 ctypes.util
>>> import numpy_allocator
>>> my = ctypes.CDLL(ctypes.util.find_library('my'))
>>> class my_allocator(metaclass=numpy_allocator.type):
...     _calloc_ = ctypes.addressof(my.calloc_func)
...     _free_ = ctypes.addressof(my.free_func)
...     _malloc_ = ctypes.addressof(my.malloc_func)
...     _realloc_ = ctypes.addressof(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.2.1.tar.gz (11.0 kB view details)

Uploaded Source

Built Distributions

numpy_allocator-1.2.1-cp313-cp313-musllinux_1_2_x86_64.whl (36.8 kB view details)

Uploaded CPython 3.13 musllinux: musl 1.2+ x86-64

numpy_allocator-1.2.1-cp313-cp313-musllinux_1_2_i686.whl (35.6 kB view details)

Uploaded CPython 3.13 musllinux: musl 1.2+ i686

numpy_allocator-1.2.1-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (36.9 kB view details)

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

numpy_allocator-1.2.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl (35.0 kB view details)

Uploaded CPython 3.13 manylinux: glibc 2.17+ i686 manylinux: glibc 2.5+ i686

numpy_allocator-1.2.1-cp312-cp312-musllinux_1_2_x86_64.whl (36.8 kB view details)

Uploaded CPython 3.12 musllinux: musl 1.2+ x86-64

numpy_allocator-1.2.1-cp312-cp312-musllinux_1_2_i686.whl (35.6 kB view details)

Uploaded CPython 3.12 musllinux: musl 1.2+ i686

numpy_allocator-1.2.1-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (36.9 kB view details)

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

numpy_allocator-1.2.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl (35.0 kB view details)

Uploaded CPython 3.12 manylinux: glibc 2.17+ i686 manylinux: glibc 2.5+ i686

numpy_allocator-1.2.1-cp311-cp311-musllinux_1_2_x86_64.whl (34.9 kB view details)

Uploaded CPython 3.11 musllinux: musl 1.2+ x86-64

numpy_allocator-1.2.1-cp311-cp311-musllinux_1_2_i686.whl (34.0 kB view details)

Uploaded CPython 3.11 musllinux: musl 1.2+ i686

numpy_allocator-1.2.1-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (35.2 kB view details)

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

numpy_allocator-1.2.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl (33.4 kB view details)

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

numpy_allocator-1.2.1-cp310-cp310-musllinux_1_2_x86_64.whl (34.7 kB view details)

Uploaded CPython 3.10 musllinux: musl 1.2+ x86-64

numpy_allocator-1.2.1-cp310-cp310-musllinux_1_2_i686.whl (33.7 kB view details)

Uploaded CPython 3.10 musllinux: musl 1.2+ i686

numpy_allocator-1.2.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (34.9 kB view details)

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

numpy_allocator-1.2.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl (33.1 kB view details)

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

numpy_allocator-1.2.1-cp39-cp39-musllinux_1_2_x86_64.whl (34.2 kB view details)

Uploaded CPython 3.9 musllinux: musl 1.2+ x86-64

numpy_allocator-1.2.1-cp39-cp39-musllinux_1_2_i686.whl (33.2 kB view details)

Uploaded CPython 3.9 musllinux: musl 1.2+ i686

numpy_allocator-1.2.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (34.4 kB view details)

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

numpy_allocator-1.2.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl (32.6 kB view details)

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

numpy_allocator-1.2.1-cp38-cp38-musllinux_1_2_x86_64.whl (36.2 kB view details)

Uploaded CPython 3.8 musllinux: musl 1.2+ x86-64

numpy_allocator-1.2.1-cp38-cp38-musllinux_1_2_i686.whl (35.2 kB view details)

Uploaded CPython 3.8 musllinux: musl 1.2+ i686

numpy_allocator-1.2.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (37.1 kB view details)

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

numpy_allocator-1.2.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl (35.2 kB view details)

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

File details

Details for the file numpy_allocator-1.2.1.tar.gz.

File metadata

  • Download URL: numpy_allocator-1.2.1.tar.gz
  • Upload date:
  • Size: 11.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for numpy_allocator-1.2.1.tar.gz
Algorithm Hash digest
SHA256 1a7a634c3b82246dad522879a5d88340c8619219e7d24d34b3a655b89cf544fc
MD5 9d3370f3e0ac2983d71f5306440fbe9a
BLAKE2b-256 fa72235e3170b1bed685eaab6bcb93c56461894f6b53b9401c07bd30118f9a0b

See more details on using hashes here.

File details

Details for the file numpy_allocator-1.2.1-cp313-cp313-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for numpy_allocator-1.2.1-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 ba8ab2d9705c7a0dcba53936585cca131d29709856a78373025e41da35703085
MD5 08955a0e254d29baff5d575d9331b01d
BLAKE2b-256 de5d6ef604838764429586499f3c6a1420746e380cd41ed481b172854337c0af

See more details on using hashes here.

File details

Details for the file numpy_allocator-1.2.1-cp313-cp313-musllinux_1_2_i686.whl.

File metadata

File hashes

Hashes for numpy_allocator-1.2.1-cp313-cp313-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 74651736de4d6a1446d13ca7661c65482008a71df4076865cea764c66b4bbd7d
MD5 23bfff7dabb9730d4b46fef2d3301874
BLAKE2b-256 7fb9216ef902f77c21efc5febfb30690d7e672ea7d054e6b95cdb2ffe3933b3b

See more details on using hashes here.

File details

Details for the file numpy_allocator-1.2.1-cp313-cp313-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.2.1-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b855120f4542103685f04f77b60608e2001ba1dea0a13258a60e2cdeac9bd0ee
MD5 4818fc442996499fd84b130635bc5762
BLAKE2b-256 ab95bb960f0cfa5917126c433e389f097431f51b5eb0c2536e90ee81051aa721

See more details on using hashes here.

File details

Details for the file numpy_allocator-1.2.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for numpy_allocator-1.2.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 6ae5488fc081386aec3bebaf643be31ecca1be41c6b27bd840b3f1866e3a0ccf
MD5 88d5df2c91ccdc47e1e72e806c3a5721
BLAKE2b-256 6a31ef8af48692d98657c57a16a18193f6b9e5b886d591d2b6cbb3e8645026e2

See more details on using hashes here.

File details

Details for the file numpy_allocator-1.2.1-cp312-cp312-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for numpy_allocator-1.2.1-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 11f0db0d2b3c1b9fd1db67f898301e468923454f1a100a3e9799e37f3517c4d2
MD5 eb324e100db4871eb666b0d628085b84
BLAKE2b-256 9834c3e06f64f8bc0c129f98f79a74609b6414604f82608b9b4980b070aaf751

See more details on using hashes here.

File details

Details for the file numpy_allocator-1.2.1-cp312-cp312-musllinux_1_2_i686.whl.

File metadata

File hashes

Hashes for numpy_allocator-1.2.1-cp312-cp312-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 181c7820a502bef78aecd230373c54bdd687a9650a5fc0a36b37276ce802e8ec
MD5 2045170f1bc6e4dea1d43f1cff9d1ce4
BLAKE2b-256 e9ef6c57919a1bcc7cb97798d0e8d7d9e889231332b7f49c0657220400014cc6

See more details on using hashes here.

File details

Details for the file numpy_allocator-1.2.1-cp312-cp312-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.2.1-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a9eac087b13115dc7cb330bc4b809eee1dfef27d42dc7ff9b43d23292d7b17e7
MD5 cb652470c08de0123406077a68e03b6a
BLAKE2b-256 05209c2621800a8dad555e18e5abf77ba207297c4e6519ee50dcd7d4bba1bf78

See more details on using hashes here.

File details

Details for the file numpy_allocator-1.2.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for numpy_allocator-1.2.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 9ec3ae3592f91327b39b639047a2d88f2bc37b8c919a8e50afd8d65ba620d4d1
MD5 04b8eeb7cad3c9270e0d70b9cce17470
BLAKE2b-256 e665c404761e519d344b2effcb75ef3f4c153fa86378c5086b4d5b2140b6acea

See more details on using hashes here.

File details

Details for the file numpy_allocator-1.2.1-cp311-cp311-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for numpy_allocator-1.2.1-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 257eb19071efb3456908b039049e6dfd01d98df7afaa6b32acd52c48894044eb
MD5 549a38e64c758682feaecbd8b398861c
BLAKE2b-256 c3bcf21127b6f5e8419076e7c43eb9238200ae75986863e084ce42b93a9b0a2b

See more details on using hashes here.

File details

Details for the file numpy_allocator-1.2.1-cp311-cp311-musllinux_1_2_i686.whl.

File metadata

File hashes

Hashes for numpy_allocator-1.2.1-cp311-cp311-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 1952ee832eb27960ea5e091f3f1307e44235210f895cbb189b7b6edd094d9242
MD5 e07a82b378fede1274337532e0655a87
BLAKE2b-256 ddb0da6cb3569d22208a0b6c4e91c6e8fbd30223ad110851308cefbaaf7cce93

See more details on using hashes here.

File details

Details for the file numpy_allocator-1.2.1-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.2.1-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 cfac2bc42f1c84b53d7d947c6c751ba1e9c64a7261a6027f16071ded2614c4d2
MD5 effac80f7ab37c3b9029c8e82266b11e
BLAKE2b-256 fa4d7f217c8a4b7bb30c5bafd88bf7494eb11ee8519dc419a3b8275013c75f7c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for numpy_allocator-1.2.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 f0207b3a085f5b86de2e57c8b807816fb0a5e1bcbae6a61854a79a17fe43e10c
MD5 f0d96194c71955d1f00a728ed8faf960
BLAKE2b-256 467c8d06d1efdce9e4a81540e775dc680d4577a6b1a65cccbce31b05f15bea59

See more details on using hashes here.

File details

Details for the file numpy_allocator-1.2.1-cp310-cp310-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for numpy_allocator-1.2.1-cp310-cp310-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 332c53eb6042669af5ab2ff29225bbea53549d816f2174b87e339aeff1861c48
MD5 b3f28e5318010c1741f5d4155e13daac
BLAKE2b-256 d46bdb504cf745fabd1b01fadcf4c00f472824ba154f2c81dd0521a7f8e9621c

See more details on using hashes here.

File details

Details for the file numpy_allocator-1.2.1-cp310-cp310-musllinux_1_2_i686.whl.

File metadata

File hashes

Hashes for numpy_allocator-1.2.1-cp310-cp310-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 49d4df037e8a5cf18a04b52483f97db029d75c852009a3fec848610a12d6f1ce
MD5 99c03d16db3bdcfb15f06249b6880e8b
BLAKE2b-256 3eef1bf73d4c3ab018854b167f5d305190b78204be6088e8e314844eec16f27b

See more details on using hashes here.

File details

Details for the file numpy_allocator-1.2.1-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.2.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d0c6bc5cc5eeed6d5efb60d2e822ba5422601009ecbaa86f8fefb76d4e79b06d
MD5 02282d233251c9df1292c9ab4e744be8
BLAKE2b-256 9bcb16d10617c58271067718c8de561b44cf6cd9881f38dd01240f261829e35c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for numpy_allocator-1.2.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 24bcffd57a7ea459f83b5b83f2d547b277fca715e8d9f08d1682df287f18c9e8
MD5 a09c3b9fba1c298e9ec711c53423914c
BLAKE2b-256 19532a4b16da1003d5f7d79450d2f17e9fc8eacd94274c651c56be7c79ad9ffe

See more details on using hashes here.

File details

Details for the file numpy_allocator-1.2.1-cp39-cp39-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for numpy_allocator-1.2.1-cp39-cp39-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 503be9e22f1f8cf791e37612e408ff4eec6cf545e0254b44b5d9724fde925c2d
MD5 9cf0f7e90c10f919fc108118b80ef2e8
BLAKE2b-256 e2c361ac69d9a2f87b1677459777891e40b01faca09cad30e45332dabb0dfebc

See more details on using hashes here.

File details

Details for the file numpy_allocator-1.2.1-cp39-cp39-musllinux_1_2_i686.whl.

File metadata

File hashes

Hashes for numpy_allocator-1.2.1-cp39-cp39-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 9d155c51a99238741327ba914eef02f7c580d8edb5449d939ccbd7d7101e6867
MD5 69d12624090e156c123a7d5b64f911ec
BLAKE2b-256 f239308bdce47d071bf395e6c45184834001a9369eb61d3501ea673808939a4e

See more details on using hashes here.

File details

Details for the file numpy_allocator-1.2.1-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.2.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9642b20aa517a798fef26b9e752d65c49968eafadbefe520fd69b054f5671a90
MD5 5d072a0725b03fb036c4e7b64ebeb592
BLAKE2b-256 5dcb742c6ba822356bb9421533b62965d4ee3721e51647b7f8be8109e233b32a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for numpy_allocator-1.2.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 942ef7cc3fb2ef0043c478f1cb76c065561a5059506b9a497e345d9a4f6a78ed
MD5 8431b10ccf494cc8c730ae4e353aca8a
BLAKE2b-256 28d443e4e9abfc193e81befd657a514bac27fef62556aa0de8c51019b6cd2199

See more details on using hashes here.

File details

Details for the file numpy_allocator-1.2.1-cp38-cp38-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for numpy_allocator-1.2.1-cp38-cp38-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 5cfa3ac958f06ec5c0e5595c5aa0deac7c69fba45dd41eda9f521680f3888ead
MD5 e7ede9c12943ffa34b51de2454c3b989
BLAKE2b-256 070b54596aa14375a13f29b091bd3d3784d5bf7b658ab5f99f47cb2465549a50

See more details on using hashes here.

File details

Details for the file numpy_allocator-1.2.1-cp38-cp38-musllinux_1_2_i686.whl.

File metadata

File hashes

Hashes for numpy_allocator-1.2.1-cp38-cp38-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 00e1ea4de8dec39063a812275c6b01678a7b808720edb4b250abd4607ae77b67
MD5 cd76bdd703554fd822b8055d52880240
BLAKE2b-256 abd1b2d06d1ca0e0b13ac848caa83592b11f884e8a630df00d104d809d2d000f

See more details on using hashes here.

File details

Details for the file numpy_allocator-1.2.1-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.2.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c6eb7998bffa992f94a0ba36793fc37f60cca4180f5340a7dea282254d1daada
MD5 ed6e3f4a8882f779db9c7b66bb3fc0f8
BLAKE2b-256 aae7e987921f711449e605b259c1dcb44fe9aa1e0e597f8a104db1d39e5d6ef4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for numpy_allocator-1.2.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 043bdbcc2aad274b2df4cb3049cb4de078456bed48522de89239b7462c32c736
MD5 2f07249b471f397f94fe2bab45a31bca
BLAKE2b-256 d8d943be0cc974a9d20f567b11f443b7186a2838fdb418a5f60d35704b470224

See more details on using hashes here.

Supported by

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