per page, with , order by , clip by
Results of 1 - 2 of about 2 for ndarray (0.001 sec.)
multiprocessing.shared_memory --- プロセス間で直接アクセス可能な共有メモリ — Py... 11228
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » 並行実行 » multiprocessing.shared_memory --- プロセス間で直接アクセス可能な共有メモリ テーマ 自動 ライト ダーク | multiprocessing.s ... The following example demonstrates a practical use of the SharedMemory class with NumPy arrays , accessing the same numpy.ndarray from two distinct Python shells: >>> # In the first Python interactive shell >>> import numpy as np >>> a = np . array ([ ... y . SharedMemory ( create = True , size = a . nbytes ) >>> # Now create a NumPy array backed by shared memory >>> b = np . ndarray ( a . shape , dtype = a . dtype , buffer = shm . buf ) >>> b [:] = a [:] # Copy the original data into shared memory >>> b ... array([1, 1, 2, 3, 5, 8]) >>> type ( b ) <class 'numpy.ndarray'> >>> type ( a ) <class 'numpy.ndarray'> >>> shm . name # We did not specify a name so one was chosen for us 'psm_21467_46 ...
https://man.mtool.work/python/3.14/library/multiprocessing.shared_memory.html
multiprocessing.shared_memory --- プロセス間で直接アクセス可能な共有メモリ — Py... 7485
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » 並行実行 » multiprocessing.shared_memory --- プロセス間で直接アクセス可能な共有メモリ テーマ 自動 ライト ダーク | multiprocessing.s ... The following example demonstrates a practical use of the SharedMemory class with NumPy arrays , accessing the same numpy.ndarray from two distinct Python shells: >>> # In the first Python interactive shell >>> import numpy as np >>> a = np . array ([ ... y . SharedMemory ( create = True , size = a . nbytes ) >>> # Now create a NumPy array backed by shared memory >>> b = np . ndarray ( a . shape , dtype = a . dtype , buffer = shm . buf ) >>> b [:] = a [:] # Copy the original data into shared memory >>> b ... array([1, 1, 2, 3, 5, 8]) >>> type ( b ) <class 'numpy.ndarray'> >>> type ( a ) <class 'numpy.ndarray'> >>> shm . name # We did not specify a name so one was chosen for us 'psm_21467_46 ...
https://man.mtool.work/python/3.14/library/multiprocessing.shared_memory.html
PREV 1 NEXT