Skip to content

Regression in array creation np.array([...], dtype='(2,2)f4') RuntimeError (Zarr testsuite ) #17173

@Carreau

Description

@Carreau

Reproducing code example:

This is used as a test case in the Zarr codebase, it seem to be failing since #16200

import numpy as np
a = np.array([((0, 1),
                       (1, 2)),
                      ((1, 2),
                       (2, 3)),
                      ((2, 3),
                       (3, 4))], dtype='(2,2)f4')

Error message:

In [1]: import numpy as np
   ...: a = np.array([((0, 1),
   ...:                        (1, 2)),
   ...:                       ((1, 2),
   ...:                        (2, 3)),
   ...:                       ((2, 3),
   ...:                        (3, 4))], dtype='(2,2)f4')
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
<ipython-input-1-0a6ed20baa50> in <module>
      5                        (2, 3)),
      6                       ((2, 3),
----> 7                        (3, 4))], dtype='(2,2)f4')

RuntimeError: Inconsistent object during array creation? Content of sequences changed (now too shallow).

Numpy/Python version information:

2cfcf56cd1f9465871e355620465b0b734f1f56c is the first bad commit
commit 2cfcf56cd1f9465871e355620465b0b734f1f56c
Author: Sebastian Berg <[email protected]>
Date:   Fri May 8 09:13:57 2020 -0500

    WIP: Seems pretty good, but needs cleaning up...

:040000 040000 45409277bf118ad5a5e9badfd37f5522f26841b2 7186520518984483cbae2f28001fe883855df00f M	numpy

Multiple Pythons (3.7, 3.8), Multiple OS (Mac, Linux), though I bisected only on Linux/3.7.

I

Metadata

Metadata

Assignees

Labels

06 - RegressiontriagedIssue/PR that was discussed in a triage meeting

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions