Skip to content

Commit 38a6942

Browse files
author
Matteo Felici
committed
Merge branch 'master' into format - fix CI fail pandas-dev#34835
2 parents cc2e1c1 + 16dfb61 commit 38a6942

File tree

78 files changed

+286
-285
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+286
-285
lines changed

asv_bench/benchmarks/pandas_vb_common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
np.uint8,
3434
]
3535
datetime_dtypes = [np.datetime64, np.timedelta64]
36-
string_dtypes = [np.object]
36+
string_dtypes = [object]
3737
try:
3838
extension_dtypes = [
3939
pd.Int8Dtype,

asv_bench/benchmarks/series_methods.py

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -58,17 +58,15 @@ def time_isin_nan_values(self):
5858

5959
class IsInForObjects:
6060
def setup(self):
61-
self.s_nans = Series(np.full(10 ** 4, np.nan)).astype(np.object)
62-
self.vals_nans = np.full(10 ** 4, np.nan).astype(np.object)
63-
self.s_short = Series(np.arange(2)).astype(np.object)
64-
self.s_long = Series(np.arange(10 ** 5)).astype(np.object)
65-
self.vals_short = np.arange(2).astype(np.object)
66-
self.vals_long = np.arange(10 ** 5).astype(np.object)
61+
self.s_nans = Series(np.full(10 ** 4, np.nan)).astype(object)
62+
self.vals_nans = np.full(10 ** 4, np.nan).astype(object)
63+
self.s_short = Series(np.arange(2)).astype(object)
64+
self.s_long = Series(np.arange(10 ** 5)).astype(object)
65+
self.vals_short = np.arange(2).astype(object)
66+
self.vals_long = np.arange(10 ** 5).astype(object)
6767
# because of nans floats are special:
68-
self.s_long_floats = Series(np.arange(10 ** 5, dtype=np.float)).astype(
69-
np.object
70-
)
71-
self.vals_long_floats = np.arange(10 ** 5, dtype=np.float).astype(np.object)
68+
self.s_long_floats = Series(np.arange(10 ** 5, dtype=np.float)).astype(object)
69+
self.vals_long_floats = np.arange(10 ** 5, dtype=np.float).astype(object)
7270

7371
def time_isin_nans(self):
7472
# if nan-objects are different objects,

asv_bench/benchmarks/sparse.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def time_series_to_frame(self):
3232

3333
class SparseArrayConstructor:
3434

35-
params = ([0.1, 0.01], [0, np.nan], [np.int64, np.float64, np.object])
35+
params = ([0.1, 0.01], [0, np.nan], [np.int64, np.float64, object])
3636
param_names = ["dense_proportion", "fill_value", "dtype"]
3737

3838
def setup(self, dense_proportion, fill_value, dtype):

doc/source/user_guide/io.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1884,7 +1884,7 @@ Fallback behavior
18841884
If the JSON serializer cannot handle the container contents directly it will
18851885
fall back in the following manner:
18861886

1887-
* if the dtype is unsupported (e.g. ``np.complex``) then the ``default_handler``, if provided, will be called
1887+
* if the dtype is unsupported (e.g. ``np.complex_``) then the ``default_handler``, if provided, will be called
18881888
for each value, otherwise an exception is raised.
18891889

18901890
* if an object is unsupported it will attempt the following:

doc/source/whatsnew/v1.0.5.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
.. _whatsnew_105:
33

4-
What's new in 1.0.5 (June XX, 2020)
4+
What's new in 1.0.5 (June 17, 2020)
55
-----------------------------------
66

77
These are the changes in pandas 1.0.5. See :ref:`release` for a full changelog

doc/source/whatsnew/v1.1.0.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ Other enhancements
292292
- :meth:`DataFrame.to_csv` and :meth:`Series.to_csv` now accept an ``errors`` argument (:issue:`22610`)
293293
- :meth:`groupby.transform` now allows ``func`` to be ``pad``, ``backfill`` and ``cumcount`` (:issue:`31269`).
294294
- :meth:`~pandas.io.json.read_json` now accepts `nrows` parameter. (:issue:`33916`).
295-
- :meth `~pandas.io.gbq.read_gbq` now allows to disable progress bar (:issue:`33360`).
295+
- :meth:`~pandas.io.gbq.read_gbq` now allows to disable progress bar (:issue:`33360`).
296296
- :meth:`~pandas.io.gbq.read_gbq` now supports the ``max_results`` kwarg from ``pandas-gbq`` (:issue:`34639`).
297297

298298
.. ---------------------------------------------------------------------------
@@ -843,6 +843,9 @@ Datetimelike
843843
- Bug in :meth:`DatetimeIndex.intersection` and :meth:`TimedeltaIndex.intersection` with results not having the correct ``name`` attribute (:issue:`33904`)
844844
- Bug in :meth:`DatetimeArray.__setitem__`, :meth:`TimedeltaArray.__setitem__`, :meth:`PeriodArray.__setitem__` incorrectly allowing values with ``int64`` dtype to be silently cast (:issue:`33717`)
845845
- Bug in subtracting :class:`TimedeltaIndex` from :class:`Period` incorrectly raising ``TypeError`` in some cases where it should succeed and ``IncompatibleFrequency`` in some cases where it should raise ``TypeError`` (:issue:`33883`)
846+
- Bug in constructing a Series or Index from a read-only NumPy array with non-ns
847+
resolution which converted to object dtype instead of coercing to ``datetime64[ns]``
848+
dtype when within the timestamp bounds (:issue:`34843`).
846849
- The ``freq`` keyword in :class:`Period`, :func:`date_range`, :func:`period_range`, :func:`pd.tseries.frequencies.to_offset` no longer allows tuples, pass as string instead (:issue:`34703`)
847850

848851
Timedelta

pandas/_libs/hashtable_class_helper.pxi.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ cdef class StringVector:
178178
Py_ssize_t n
179179
object val
180180

181-
ao = np.empty(self.data.n, dtype=np.object)
181+
ao = np.empty(self.data.n, dtype=object)
182182
for i in range(self.data.n):
183183
val = self.data.data[i]
184184
ao[i] = val

pandas/_libs/hashtable_func_helper.pxi.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ cpdef value_count_{{dtype}}({{c_type}}[:] values, bint dropna):
9494
build_count_table_{{dtype}}(values, table, dropna)
9595
{{endif}}
9696

97-
result_keys = np.empty(table.n_occupied, dtype=np.{{dtype}})
97+
result_keys = np.empty(table.n_occupied, '{{dtype}}')
9898
result_counts = np.zeros(table.n_occupied, dtype=np.int64)
9999

100100
{{if dtype == 'object'}}

pandas/_libs/parsers.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2037,7 +2037,7 @@ def _concatenate_chunks(list chunks):
20372037
numpy_dtypes = {x for x in dtypes if not is_categorical_dtype(x)}
20382038
if len(numpy_dtypes) > 1:
20392039
common_type = np.find_common_type(numpy_dtypes, [])
2040-
if common_type == np.object:
2040+
if common_type == object:
20412041
warning_columns.append(str(name))
20422042

20432043
dtype = dtypes.pop()

pandas/_libs/sparse.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -791,4 +791,4 @@ def make_mask_object_ndarray(ndarray[object, ndim=1] arr, object fill_value):
791791
if value == fill_value and type(value) == type(fill_value):
792792
mask[i] = 0
793793

794-
return mask.view(dtype=np.bool)
794+
return mask.view(dtype=bool)

0 commit comments

Comments
 (0)