Skip to content

BUG: Kernel dies upon np.array of a list with mixed custom types #21911

@rkishony

Description

@rkishony

Describe the issue:

The np.array() function causes the kernel to die when operating on a list containing a list and an array with a custom type.

Reproduce the code example:

import numpy as np
dtype_ = np.dtype([('', np.int32, 2)])
arr = np.zeros((3, ), dtype=dtype_)
np.array([arr, [1, 2, 3]], dtype=object)

Error message:

In pycharm, I get 

Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)

In Juyter Notebook:

Kernel Restarting
The kernel for developer_tools/demos/Untitled.ipynb appears to have died. It will restart automatically.


### NumPy/Python version information:

1.23.0 3.10.5 | packaged by conda-forge | (main, Jun 14 2022, 07:03:09) [Clang 13.0.1 ]

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions