Skip to content

Commit

Permalink
apacheGH-39533: [Python] NumPy 2.0 compat: remove usage of np.core
Browse files Browse the repository at this point in the history
  • Loading branch information
jorisvandenbossche committed Jan 9, 2024
1 parent b522f8c commit 4e403be
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions python/pyarrow/pandas_compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
import warnings

import numpy as np
from numpy.core.numerictypes import sctypes as _np_sctypes

import pyarrow as pa
from pyarrow.lib import _pandas_api, frombytes # noqa
Expand Down Expand Up @@ -789,9 +788,10 @@ def table_to_dataframe(
# Set of the string repr of all numpy dtypes that can be stored in a pandas
# dataframe (complex not included since not supported by Arrow)
_pandas_supported_numpy_types = {
str(np.dtype(typ))
for typ in (_np_sctypes['int'] + _np_sctypes['uint'] + _np_sctypes['float'] +
['object', 'bool'])
"int8", "int16", "int32", "int64",
"uint8", "uint16", "uint32", "uint64",
"float16", "float32", "float64", "float128",
"object", "bool"
}


Expand Down

0 comments on commit 4e403be

Please sign in to comment.