Skip to content

Commit 86b81b5

Browse files
committed
formatting
1 parent 6c243f3 commit 86b81b5

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

pandas/tests/arrays/test_array.py

+13
Original file line numberDiff line numberDiff line change
@@ -20,41 +20,54 @@
2020
([1, 2], np.dtype('float32'),
2121
np.array([1., 2.0], dtype=np.dtype('float32'))),
2222
(np.array([1, 2]), None, np.array([1, 2])),
23+
2324
# String alias passes through to NumPy
2425
([1, 2], 'float32', np.array([1, 2], dtype='float32')),
26+
2527
# Period alias
2628
([pd.Period('2000', 'D'), pd.Period('2001', 'D')], 'Period[D]',
2729
period_array(['2000', '2001'], freq='D')),
30+
2831
# Period dtype
2932
([pd.Period('2000', 'D')], pd.PeriodDtype('D'),
3033
period_array(['2000'], freq='D')),
34+
3135
# Datetime (naive)
3236
([1, 2], np.dtype('datetime64[ns]'),
3337
np.array([1, 2], dtype='datetime64[ns]')),
3438
# TODO(DatetimeArray): add here
39+
3540
# Category
3641
(['a', 'b'], 'category', pd.Categorical(['a', 'b'])),
3742
(['a', 'b'], pd.CategoricalDtype(None, ordered=True),
3843
pd.Categorical(['a', 'b'], ordered=True)),
44+
3945
# Interval
4046
([pd.Interval(1, 2), pd.Interval(3, 4)], 'interval',
4147
pd.IntervalArray.from_tuples([(1, 2), (3, 4)])),
48+
4249
# Sparse
4350
([0, 1], 'Sparse[int64]', pd.SparseArray([0, 1], dtype='int64')),
51+
4452
# IntegerNA
4553
([1, None], 'Int16', integer_array([1, None], dtype='Int16')),
4654
(pd.Series([1, 2]), None, np.array([1, 2], dtype=np.int64)),
55+
4756
# Index
4857
(pd.Index([1, 2]), None, np.array([1, 2], dtype=np.int64)),
58+
4959
# Series[EA] returns the EA
5060
(pd.Series(pd.Categorical(['a', 'b'], categories=['a', 'b', 'c'])),
5161
None,
5262
pd.Categorical(['a', 'b'], categories=['a', 'b', 'c'])),
63+
5364
# "3rd party" EAs work
5465
([decimal.Decimal(0), decimal.Decimal(1)], 'decimal', to_decimal([0, 1])),
66+
5567
# 2D ndarrays pass through
5668
(np.array([[1, 2], [3, 4]]), None, np.array([[1, 2], [3, 4]])),
5769
([[1, 2], [3, 4]], None, np.array([[1, 2, ], [3, 4]])),
70+
5871
# pass an ExtensionArray, but a different dtype
5972
(period_array(['2000', '2001'], freq='D'),
6073
'category',

0 commit comments

Comments
 (0)