8000 BUG: Incorrect assignment to recarray items · Issue #3561 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content
BUG: Incorrect assignment to recarray items #3561
Closed
@magistere

Description

@magistere

Assigning to field of recarray is not working correctly. Example script is below.

import numpy as np

rec = np.recarray(1, dtype=[('x', float, 5)])

# Bug behaviour
rec[0].x = 1
print rec[0] # should print: (array([ 1.,  1.,  1.,  1.,  1.]),)
             # but prints uninitialized float values

# Correct behaviour
rec.x = 2
print rec[0] # prints: (array([ 2.,  2.,  2.,  2.,  2.]),)

Metadata

Metadata

Assignees

No one assigned

    Labels 33D5

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0