Skip to content

add support for pd.Series in asarray #895

@gdementen

Description

@gdementen

Today I was bitten/surprised by the fact that la.asarray(Series) works but drops the index.

>>> asarray(pd.Series([0, 1, 2], ['a0', 'a1', 'a2']))
{0}*  0  1  2
      0  1  2

In fact, it's just that Series are not handled in asarray, so this goes via the __array__ path.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions