@@ -65,15 +65,14 @@ Below is a possibly non-exhaustive list of changes:
65
65
66
66
1. Instantiating using a numpy numeric array now follows the dtype of the numpy array.
67
67
Previously, all indexes created from numpy numeric arrays were forced to 64-bit. Now,
68
- the index dtype follows the dtype of the numpy array. For example, it would for all
69
- signed integer arrays previously return an index with ``int64 `` dtype, but will now
70
- reuse the dtype of the supplied numpy array. So ``Index(np.array([1, 2, 3])) `` will be ``int32 `` on 32-bit systems.
68
+ for example, ``Index(np.array([1, 2, 3])) `` will be ``int32 `` on 32-bit systems, where
69
+ it previously would have been ``int64` `` even on 32-bit systems.
71
70
Instantiating :class: `Index ` using a list of numbers will still return 64bit dtypes,
72
71
e.g. ``Index([1, 2, 3]) `` will have a ``int64 `` dtype, which is the same as previously.
73
- 2. The various numeric datetime attributes of :class: `DateTimeIndex ` (:attr: `~Date_TimeIndex .day `,
74
- :attr: `~DateTimeIndex .month `, :attr: `~DateTimeIndex .year ` etc.) were previously in of
72
+ 2. The various numeric datetime attributes of :class: `DatetimeIndex ` (:attr: `~DatetimeIndex .day `,
73
+ :attr: `~DatetimeIndex .month `, :attr: `~DatetimeIndex .year ` etc.) were previously in of
75
74
dtype ``int64 ``, while they were ``int32 `` for :class: `DatetimeArray `. They are now
76
- ``int32 `` on ``DateTimeIndex `` also:
75
+ ``int32 `` on ``DatetimeIndex `` also:
77
76
78
77
.. ipython :: python
79
78
@@ -92,7 +91,7 @@ Below is a possibly non-exhaustive list of changes:
92
91
([3.0 , 1.0 , 2.0 ], ([1 , 0 , 0 ], [0 , 2 , 3 ])), shape = (3 , 4 )
93
92
)
94
93
ser = pd.Series.sparse.from_coo(A)
95
- ser.index.dtype
94
+ ser.index.dtypes
96
95
97
96
4. :class: `Index ` cannot be instantiated using a float16 dtype. Previously instantiating
98
97
an :class: `Index ` using dtype ``float16 `` resulted in a :class: `Float64Index ` with a
0 commit comments