Skip to content

Multiprocessing returns Array, RawArray of wrong length python 3.10.4 #98447

Closed
@tendermonster

Description

@tendermonster

Bug report

When initializing Array or RawArray of type int, wrong length of the arrays is returned

Reproducible example:

from multiprocessing import RawArray, RawValue, Array, Value
a = Array('d',12)
X = np.frombuffer(a.get_obj())
print(X) # [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.]

a = Array('i',12)
X = np.frombuffer(a.get_obj())
print(X) # [0. 0. 0. 0. 0. 0.]

a = RawArray('d',12)
X = np.frombuffer(a)
print(X) # [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.]

a = RawArray('i',12)
X = np.frombuffer(a)
print(X) # [0. 0. 0. 0. 0. 0.]

Your environment

working with vscode
conda-forge python 3.10.4
using ubuntu uname-a: 5.11.0-46-generic #51~20.04.1-Ubuntu SMP Fri Jan 7 06:51:40 UTC 2022

  • CPython versions tested on: conda-forge python 3.10.4
  • Operating system and architecture: using ubuntu uname-a: 5.11.0-46-generic 51~20.04.1-Ubuntu

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy