Skip to content

Commit 2698288

Browse files
anntzertimhoffm
authored andcommitted
Bump oldest supported numpy to 1.11. (matplotlib#12858)
1 parent 96522ff commit 2698288

File tree

12 files changed

+27
-651
lines changed

12 files changed

+27
-651
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ jobs:
134134
- run:
135135
<<: *deps-install
136136
environment:
137-
NUMPY_VERSION: "==1.10.0"
137+
NUMPY_VERSION: "==1.11.0"
138138
- run: *mpl-install
139139

140140
- run: *doc-build

INSTALL.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ Matplotlib requires the following dependencies:
136136
* `Python <https://www.python.org/downloads/>`_ (>= 3.5)
137137
* `FreeType <https://www.freetype.org/>`_ (>= 2.3)
138138
* `libpng <http://www.libpng.org>`_ (>= 1.2)
139-
* `NumPy <http://www.numpy.org>`_ (>= 1.10.0)
139+
* `NumPy <http://www.numpy.org>`_ (>= 1.11)
140140
* `setuptools <https://setuptools.readthedocs.io/en/latest/>`_
141141
* `cycler <http://matplotlib.org/cycler/>`_ (>= 0.10.0)
142142
* `dateutil <https://pypi.org/project/python-dateutil>`_ (>= 2.1)
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Numpy minimum version bump
2+
``````````````````````````
3+
Matplotlib 3.1 requires numpy>=1.11.

lib/matplotlib/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ def _check_versions():
191191
("cycler", "0.10"),
192192
("dateutil", "2.1"),
193193
("kiwisolver", "1.0.1"),
194-
("numpy", "1.10"),
194+
("numpy", "1.11"),
195195
("pyparsing", "2.0.1"),
196196
]:
197197
module = importlib.import_module(modname)

lib/matplotlib/dates.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -254,10 +254,8 @@ def _dt64_to_ordinalf(d):
254254

255255
# the "extra" ensures that we at least allow the dynamic range out to
256256
# seconds. That should get out to +/-2e11 years.
257-
# NOTE: First cast truncates; second cast back is for NumPy 1.10.
258-
extra = d - d.astype('datetime64[s]').astype(d.dtype)
259-
extra = extra.astype('timedelta64[ns]')
260-
t0 = np.datetime64('0001-01-01T00:00:00').astype('datetime64[s]')
257+
extra = (d - d.astype('datetime64[s]')).astype('timedelta64[ns]')
258+
t0 = np.datetime64('0001-01-01T00:00:00', 's')
261259
dt = (d.astype('datetime64[s]') - t0).astype(np.float64)
262260
dt += extra.astype(np.float64) / 1.0e9
263261
dt = dt / SEC_PER_DAY + 1.0
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)