Skip to content

COMPAT: numpy object array coercion warnings #31201

Closed
@AlexKirko

Description

@AlexKirko

Problem description

Since at least a couple hours ago, the Numpy Dev pipeline fails 39 tests:

##[error]39 test(s) failed, 60964 test(s) collected.

I checked and all 39 are like this:

numpy.VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray

Full output of one of the tests below.


        True
        >>> a = np.array([(1.0, 2), (3.0, 4)], dtype='f4,i4').view(np.recarray)
        >>> np.asarray(a) is a
        False
        >>> np.asanyarray(a) is a
        True
    
        """
>       return array(a, dtype, copy=False, order=order)
E       numpy.VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray

Thanks to @jreback for pointing out we've run into this before, but Numpy reverted the deprecation warning. The original issue was #30043

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions