Skip to content

Commit aaa69d1

Browse files
h-vetinarijreback
authored andcommitted
DEPS: drop numpy < 1.12 (pandas-dev#23062)
1 parent 6afa51e commit aaa69d1

Some content is hidden

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

41 files changed

+337
-554
lines changed

ci/azure-macos-35.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ dependencies:
88
- html5lib
99
- jinja2
1010
- lxml
11-
- matplotlib
11+
- matplotlib=2.2.0
1212
- nomkl
1313
- numexpr
14-
- numpy=1.10.4
14+
- numpy=1.12.0
1515
- openpyxl=2.5.5
1616
- pytables
1717
- python=3.5*

ci/azure-windows-27.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ dependencies:
1010
- html5lib
1111
- jinja2=2.8
1212
- lxml
13-
- matplotlib
13+
- matplotlib=2.0.1
1414
- numexpr
1515
- numpy=1.12*
1616
- openpyxl=2.5.5

ci/azure/macos.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
strategy:
1010
maxParallel: 11
1111
matrix:
12-
py35_np_110:
12+
py35_np_120:
1313
ENV_FILE: ci/azure-macos-35.yaml
1414
CONDA_PY: "35"
1515
CONDA_ENV: pandas

ci/azure/windows-py27.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
strategy:
1010
maxParallel: 11
1111
matrix:
12-
py36_np14:
12+
py36_np121:
1313
ENV_FILE: ci/azure-windows-27.yaml
1414
CONDA_PY: "27"
1515
CONDA_ENV: pandas

ci/circle-27-compat.yaml

+5-5
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,18 @@ channels:
33
- defaults
44
- conda-forge
55
dependencies:
6-
- bottleneck=1.0.0
6+
- bottleneck=1.2.0
77
- cython=0.28.2
88
- jinja2=2.8
9-
- numexpr=2.4.4 # we test that we correctly don't use an unsupported numexpr
10-
- numpy=1.9.3
9+
- numexpr=2.6.1
10+
- numpy=1.12.0
1111
- openpyxl=2.5.5
1212
- psycopg2
13-
- pytables=3.2.2
13+
- pytables=3.4.2
1414
- python-dateutil=2.5.0
1515
- python=2.7*
1616
- pytz=2013b
17-
- scipy=0.14.0
17+
- scipy=0.18.1
1818
- sqlalchemy=0.7.8
1919
- xlrd=0.9.2
2020
- xlsxwriter=0.5.2

ci/requirements-optional-conda.txt

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
beautifulsoup4>=4.2.1
22
blosc
3-
bottleneck
3+
bottleneck>=1.2.0
44
fastparquet
55
feather-format
66
gcsfs
@@ -9,17 +9,17 @@ ipython>=5.6.0
99
ipykernel
1010
jinja2
1111
lxml
12-
matplotlib
12+
matplotlib>=2.0.0
1313
nbsphinx
14-
numexpr
14+
numexpr>=2.6.1
1515
openpyxl=2.5.5
1616
pyarrow
1717
pymysql
18-
pytables
18+
pytables>=3.4.2
1919
pytest-cov
2020
pytest-xdist
2121
s3fs
22-
scipy
22+
scipy>=0.18.1
2323
seaborn
2424
sqlalchemy
2525
statsmodels

ci/requirements-optional-pip.txt

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Do not modify directly
33
beautifulsoup4>=4.2.1
44
blosc
5-
bottleneck
5+
bottleneck>=1.2.0
66
fastparquet
77
feather-format
88
gcsfs
@@ -11,17 +11,17 @@ ipython>=5.6.0
1111
ipykernel
1212
jinja2
1313
lxml
14-
matplotlib
14+
matplotlib>=2.0.0
1515
nbsphinx
16-
numexpr
16+
numexpr>=2.6.1
1717
openpyxl==2.5.5
1818
pyarrow
1919
pymysql
2020
tables
2121
pytest-cov
2222
pytest-xdist
2323
s3fs
24-
scipy
24+
scipy>=0.18.1
2525
seaborn
2626
sqlalchemy
2727
statsmodels

ci/travis-27-locale.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ channels:
33
- defaults
44
- conda-forge
55
dependencies:
6-
- bottleneck=1.0.0
6+
- bottleneck=1.2.0
77
- cython=0.28.2
88
- lxml
9-
- matplotlib=1.4.3
10-
- numpy=1.9.3
9+
- matplotlib=2.0.0
10+
- numpy=1.12.0
1111
- openpyxl=2.4.0
1212
- python-dateutil
1313
- python-blosc

ci/travis-27.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ dependencies:
1414
- jemalloc=4.5.0.post
1515
- jinja2=2.8
1616
- lxml
17-
- matplotlib
17+
- matplotlib=2.2.2
1818
- mock
1919
- nomkl
2020
- numexpr

doc/source/install.rst

+6-6
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ Dependencies
225225
------------
226226

227227
* `setuptools <https://setuptools.readthedocs.io/en/latest/>`__: 24.2.0 or higher
228-
* `NumPy <http://www.numpy.org>`__: 1.9.0 or higher
228+
* `NumPy <http://www.numpy.org>`__: 1.12.0 or higher
229229
* `python-dateutil <https://dateutil.readthedocs.io/en/stable/>`__: 2.5.0 or higher
230230
* `pytz <http://pytz.sourceforge.net/>`__
231231

@@ -236,11 +236,11 @@ Recommended Dependencies
236236

237237
* `numexpr <https://github.com/pydata/numexpr>`__: for accelerating certain numerical operations.
238238
``numexpr`` uses multiple cores as well as smart chunking and caching to achieve large speedups.
239-
If installed, must be Version 2.4.6 or higher.
239+
If installed, must be Version 2.6.1 or higher.
240240

241241
* `bottleneck <https://github.com/kwgoodman/bottleneck>`__: for accelerating certain types of ``nan``
242242
evaluations. ``bottleneck`` uses specialized cython routines to achieve large speedups. If installed,
243-
must be Version 1.0.0 or higher.
243+
must be Version 1.2.0 or higher.
244244

245245
.. note::
246246

@@ -255,9 +255,9 @@ Optional Dependencies
255255

256256
* `Cython <http://www.cython.org>`__: Only necessary to build development
257257
version. Version 0.28.2 or higher.
258-
* `SciPy <http://www.scipy.org>`__: miscellaneous statistical functions, Version 0.14.0 or higher
258+
* `SciPy <http://www.scipy.org>`__: miscellaneous statistical functions, Version 0.18.1 or higher
259259
* `xarray <http://xarray.pydata.org>`__: pandas like handling for > 2 dims, needed for converting Panels to xarray objects. Version 0.7.0 or higher is recommended.
260-
* `PyTables <http://www.pytables.org>`__: necessary for HDF5-based storage. Version 3.0.0 or higher required, Version 3.2.1 or higher highly recommended.
260+
* `PyTables <http://www.pytables.org>`__: necessary for HDF5-based storage, Version 3.4.2 or higher
261261
* `Feather Format <https://github.com/wesm/feather>`__: necessary for feather-based storage, version 0.3.1 or higher.
262262
* `Apache Parquet <https://parquet.apache.org/>`__, either `pyarrow <http://arrow.apache.org/docs/python/>`__ (>= 0.4.1) or `fastparquet <https://fastparquet.readthedocs.io/en/latest>`__ (>= 0.0.6) for parquet-based storage. The `snappy <https://pypi.org/project/python-snappy>`__ and `brotli <https://pypi.org/project/brotlipy>`__ are available for compression support.
263263
* `SQLAlchemy <http://www.sqlalchemy.org>`__: for SQL database support. Version 0.8.1 or higher recommended. Besides SQLAlchemy, you also need a database specific driver. You can find an overview of supported drivers for each SQL dialect in the `SQLAlchemy docs <http://docs.sqlalchemy.org/en/latest/dialects/index.html>`__. Some common drivers are:
@@ -266,7 +266,7 @@ Optional Dependencies
266266
* `pymysql <https://github.com/PyMySQL/PyMySQL>`__: for MySQL.
267267
* `SQLite <https://docs.python.org/3/library/sqlite3.html>`__: for SQLite, this is included in Python's standard library by default.
268268

269-
* `matplotlib <http://matplotlib.org/>`__: for plotting, Version 1.4.3 or higher.
269+
* `matplotlib <http://matplotlib.org/>`__: for plotting, Version 2.0.0 or higher.
270270
* For Excel I/O:
271271

272272
* `xlrd/xlwt <http://www.python-excel.org/>`__: Excel reading (xlrd) and writing (xlwt)

doc/source/whatsnew/v0.24.0.txt

+24
Original file line numberDiff line numberDiff line change
@@ -206,8 +206,32 @@ Other Enhancements
206206

207207
Backwards incompatible API changes
208208
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
209+
209210
- A newly constructed empty :class:`DataFrame` with integer as the ``dtype`` will now only be cast to ``float64`` if ``index`` is specified (:issue:`22858`)
210211

212+
.. _whatsnew_0240.api_breaking.deps:
213+
214+
Dependencies have increased minimum versions
215+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
216+
217+
We have updated our minimum supported versions of dependencies (:issue:`21242`).
218+
If installed, we now require:
219+
220+
+-----------------+-----------------+----------+
221+
| Package | Minimum Version | Required |
222+
+=================+=================+==========+
223+
| numpy | 1.12.0 | X |
224+
+-----------------+-----------------+----------+
225+
| bottleneck | 1.2.0 | |
226+
+-----------------+-----------------+----------+
227+
| matplotlib | 2.0.0 | |
228+
+-----------------+-----------------+----------+
229+
| numexpr | 2.6.1 | |
230+
+-----------------+-----------------+----------+
231+
| pytables | 3.4.2 | |
232+
+-----------------+-----------------+----------+
233+
| scipy | 0.18.1 | |
234+
+-----------------+-----------------+----------+
211235

212236
.. _whatsnew_0240.api_breaking.interval_values:
213237

pandas/compat/numpy/__init__.py

+10-21
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,16 @@
99
# numpy versioning
1010
_np_version = np.__version__
1111
_nlv = LooseVersion(_np_version)
12-
_np_version_under1p10 = _nlv < LooseVersion('1.10')
13-
_np_version_under1p11 = _nlv < LooseVersion('1.11')
14-
_np_version_under1p12 = _nlv < LooseVersion('1.12')
1512
_np_version_under1p13 = _nlv < LooseVersion('1.13')
1613
_np_version_under1p14 = _nlv < LooseVersion('1.14')
1714
_np_version_under1p15 = _nlv < LooseVersion('1.15')
1815

1916

20-
if _nlv < '1.9':
17+
if _nlv < '1.12':
2118
raise ImportError('this version of pandas is incompatible with '
22-
'numpy < 1.9.0\n'
19+
'numpy < 1.12.0\n'
2320
'your numpy version is {0}.\n'
24-
'Please upgrade numpy to >= 1.9.0 to use '
21+
'Please upgrade numpy to >= 1.12.0 to use '
2522
'this pandas version'.format(_np_version))
2623

2724

@@ -43,9 +40,7 @@ def np_datetime64_compat(s, *args, **kwargs):
4340
tz-changes in 1.11 that make '2015-01-01 09:00:00Z' show a deprecation
4441
warning, when need to pass '2015-01-01 09:00:00'
4542
"""
46-
47-
if not _np_version_under1p11:
48-
s = tz_replacer(s)
43+
s = tz_replacer(s)
4944
return np.datetime64(s, *args, **kwargs)
5045

5146

@@ -56,23 +51,17 @@ def np_array_datetime64_compat(arr, *args, **kwargs):
5651
tz-changes in 1.11 that make '2015-01-01 09:00:00Z' show a deprecation
5752
warning, when need to pass '2015-01-01 09:00:00'
5853
"""
59-
60-
if not _np_version_under1p11:
61-
62-
# is_list_like
63-
if (hasattr(arr, '__iter__') and
64-
not isinstance(arr, string_and_binary_types)):
65-
arr = [tz_replacer(s) for s in arr]
66-
else:
67-
arr = tz_replacer(arr)
54+
# is_list_like
55+
if (hasattr(arr, '__iter__')
56+
and not isinstance(arr, string_and_binary_types)):
57+
arr = [tz_replacer(s) for s in arr]
58+
else:
59+
arr = tz_replacer(arr)
6860

6961
return np.array(arr, *args, **kwargs)
7062

7163

7264
__all__ = ['np',
73-
'_np_version_under1p10',
74-
'_np_version_under1p11',
75-
'_np_version_under1p12',
7665
'_np_version_under1p13',
7766
'_np_version_under1p14',
7867
'_np_version_under1p15'

pandas/core/algorithms.py

+2-17
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
ensure_platform_int, ensure_object,
3131
ensure_float64, ensure_uint64,
3232
ensure_int64)
33-
from pandas.compat.numpy import _np_version_under1p10
3433
from pandas.core.dtypes.missing import isna, na_value_for_dtype
3534

3635
from pandas.core import common as com
@@ -910,26 +909,12 @@ def checked_add_with_arr(arr, b, arr_mask=None, b_mask=None):
910909
------
911910
OverflowError if any x + y exceeds the maximum or minimum int64 value.
912911
"""
913-
def _broadcast(arr_or_scalar, shape):
914-
"""
915-
Helper function to broadcast arrays / scalars to the desired shape.
916-
"""
917-
if _np_version_under1p10:
918-
if is_scalar(arr_or_scalar):
919-
out = np.empty(shape)
920-
out.fill(arr_or_scalar)
921-
else:
922-
out = arr_or_scalar
923-
else:
924-
out = np.broadcast_to(arr_or_scalar, shape)
925-
return out
926-
927912
# For performance reasons, we broadcast 'b' to the new array 'b2'
928913
# so that it has the same size as 'arr'.
929-
b2 = _broadcast(b, arr.shape)
914+
b2 = np.broadcast_to(b, arr.shape)
930915
if b_mask is not None:
931916
# We do the same broadcasting for b_mask as well.
932-
b2_mask = _broadcast(b_mask, arr.shape)
917+
b2_mask = np.broadcast_to(b_mask, arr.shape)
933918
else:
934919
b2_mask = None
935920

pandas/core/computation/check.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from distutils.version import LooseVersion
33

44
_NUMEXPR_INSTALLED = False
5-
_MIN_NUMEXPR_VERSION = "2.4.6"
5+
_MIN_NUMEXPR_VERSION = "2.6.1"
66

77
try:
88
import numexpr as ne

pandas/core/ops.py

+1-6
Original file line numberDiff line numberDiff line change
@@ -1805,12 +1805,7 @@ def to_series(right):
18051805

18061806
elif right.shape[0] == left.shape[0] and right.shape[1] == 1:
18071807
# Broadcast across columns
1808-
try:
1809-
right = np.broadcast_to(right, left.shape)
1810-
except AttributeError:
1811-
# numpy < 1.10.0
1812-
right = np.tile(right, (1, left.shape[1]))
1813-
1808+
right = np.broadcast_to(right, left.shape)
18141809
right = left._constructor(right,
18151810
index=left.index,
18161811
columns=left.columns)

pandas/plotting/_compat.py

+1-8
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,8 @@ def inner():
1818
return inner
1919

2020

21-
_mpl_ge_1_2_1 = _mpl_version('1.2.1', operator.ge)
22-
_mpl_le_1_2_1 = _mpl_version('1.2.1', operator.le)
23-
_mpl_ge_1_3_1 = _mpl_version('1.3.1', operator.ge)
24-
_mpl_ge_1_4_0 = _mpl_version('1.4.0', operator.ge)
25-
_mpl_ge_1_4_1 = _mpl_version('1.4.1', operator.ge)
26-
_mpl_ge_1_5_0 = _mpl_version('1.5.0', operator.ge)
27-
_mpl_ge_2_0_0 = _mpl_version('2.0.0', operator.ge)
28-
_mpl_le_2_0_0 = _mpl_version('2.0.0', operator.le)
2921
_mpl_ge_2_0_1 = _mpl_version('2.0.1', operator.ge)
3022
_mpl_ge_2_1_0 = _mpl_version('2.1.0', operator.ge)
3123
_mpl_ge_2_2_0 = _mpl_version('2.2.0', operator.ge)
24+
_mpl_ge_2_2_2 = _mpl_version('2.2.2', operator.ge)
3225
_mpl_ge_3_0_0 = _mpl_version('3.0.0', operator.ge)

pandas/plotting/_converter.py

-9
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@
3535
from pandas.tseries.frequencies import FreqGroup
3636
from pandas.core.indexes.period import Period, PeriodIndex
3737

38-
from pandas.plotting._compat import _mpl_le_2_0_0
39-
4038
# constants
4139
HOURS_PER_DAY = 24.
4240
MIN_PER_HOUR = 60.
@@ -371,13 +369,6 @@ def __init__(self, locator, tz=None, defaultfmt='%Y-%m-%d'):
371369
if self._tz is dates.UTC:
372370
self._tz._utcoffset = self._tz.utcoffset(None)
373371

374-
# For mpl > 2.0 the format strings are controlled via rcparams
375-
# so do not mess with them. For mpl < 2.0 change the second
376-
# break point and add a musec break point
377-
if _mpl_le_2_0_0():
378-
self.scaled[1. / SEC_PER_DAY] = '%H:%M:%S'
379-
self.scaled[1. / MUSEC_PER_DAY] = '%H:%M:%S.%f'
380-
381372

382373
class PandasAutoDateLocator(dates.AutoDateLocator):
383374

0 commit comments

Comments
 (0)