Skip to content

API: Should NumericIndex([1 2, 3]).dtype be int64 or int32 on 32-bit systems? #49813

Closed
@topper-123

Description

@topper-123

I've had some 32-bit issues while working on removing Int64Index and friends from the code base. One issue that I would appreciate input on the the desired dtype for numeric indexes on 32-bit systems. Currently we have (for 32-bit systems):

>>> from pandas.core.api import Series, NumericIndex
>>> Series([1, 2, 3]).dtype
dtype('int64')
>>> NumericIndex([1, 2, 3]).dtype
dtype('int32')

IMO these two should have the same dtype and because changing Series would break backwards compatability, I'd say that NumericIndex([1, 2, 3]).dtype should be dtype('int64')

Do you agree with me on this, or is there a need for discussion?

Added: BTW, NumericIndex will of course be removed also for pandas 2.0 and numerical functionality included in Index (as we previously have discussed), so the above question is the same as asking if in pandas 2.0 Index([1, 2, 3]).dtype should be int32 or int64 on 32-bit systems.

Metadata

Metadata

Assignees

No one assigned

    Labels

    32bit32-bit systemsAPI DesignIndexRelated to the Index class or subclasses

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions