8000 Merge pull request #15698 from anntzer/numpy115 · matplotlib/matplotlib@fbb4214 · GitHub
[go: up one dir, main page]

Skip to content

Commit fbb4214

Browse files
authored
Merge pull request #15698 from anntzer/numpy115
API: Bump numpy dependency to >=1.15.
2 parents 0ea2013 + 3a29928 commit fbb4214

File tree

6 files changed

+8
-32
lines changed

6 files changed

+8
-32
lines changed

INSTALL.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ Dependencies
108108
Matplotlib requires the following dependencies:
109109

110110
* `Python <https://www.python.org/downloads/>`_ (>= 3.6)
111-
* `NumPy <http://www.numpy.org>`_ (>= 1.12)
111+
* `NumPy <http://www.numpy.org>`_ (>= 1.15)
112112
* `setuptools <https://setuptools.readthedocs.io/en/latest/>`_
113113
* `cycler <http://matplotlib.org/cycler/>`_ (>= 0.10.0)
114114
* `dateutil <https://pypi.org/project/python-dateutil>`_ (>= 2.1)

doc/api/next_api_changes/development.rst

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

4-
Matplotlib now requires numpy>=1.12
4+
Matplotlib now requires numpy>=1.15
55
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
66

77
Matplotlib now uses Pillow to save and read pngs

lib/matplotlib/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ def _check_versions():
194194
("cycler", "0.10"),
195195
("dateutil", "2.1"),
196196
("kiwisolver", "1.0.1"),
197-
("numpy", "1.12"),
197+
("numpy", "1.15"),
198198
("pyparsing", "2.0.1"),
199199
]:
200200
module = importlib.import_module(modname)

lib/matplotlib/axes/_axes.py

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -35,30 +35,6 @@
3535
from matplotlib.axes._secondary_axes import SecondaryAxis
3636
from matplotlib.container import BarContainer, ErrorbarContainer, StemContainer
3737

38-
try:
39-
from numpy.lib.histograms import (
40-
histogram_bin_edges as _histogram_bin_edges)
41-
except ImportError:
42-
# this function is new in np 1.15
43-
def _histogram_bin_edges(arr, bins, range=None, weights=None):
44-
# this in True for 1D arrays, and False for None and str
45-
if np.ndim(bins) == 1:
46-
return bins
47-
48-
if isinstance(bins, str):
49-
# rather than backporting the internals, just do the full
50-
# computation. If this is too slow for users, they can
51-
# update numpy, or pick a manual number of bins
52-
return np.histogram(arr, bins, range, weights)[1]
53-
else:
54-
if bins is None:
55-
# hard-code numpy's default
56-
bins = 10
57-
if range is None:
58-
range = np.min(arr), np.max(arr)
59-
60-
return np.linspace(*range, bins + 1)
61-
6238

6339
_log = logging.getLogger(__name__)
6440

@@ -6698,8 +6674,8 @@ def hist(self, x, bins=None, range=None, density=False, weights=None,
66986674
_w = np.concatenate(w)
66996675
else:
67006676
_w = None
6701-
6702-
bins = _histogram_bin_edges(np.concatenate(x), bins, bin_range, _w)
6677+
bins = np.histogram_bin_edges(
6678+
np.concatenate(x), bins, bin_range, _w)
67036679
else:
67046680
hist_kwargs['range'] = bin_range
67056681

requirements/testing/travis36minver.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22

33
cycler==0.10
44
python-dateutil==2.1
5-
numpy==1.12.0
5+
numpy==1.15.0
66
pyparsing==2.0.1

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,12 +255,12 @@ def run(self):
255255

256256
python_requires='>={}'.format('.'.join(str(n) for n in min_version)),
257257
setup_requires=[
258-
"numpy>=1.12",
258+
"numpy>=1.15",
259259
],
260260
install_requires=[
261261
"cycler>=0.10",
262262
"kiwisolver>=1.0.1",
263-
"numpy>=1.12",
263+
"numpy>=1.15",
264264
"pillow>=6.2.0",
265265
"pyparsing>=2.0.1,!=2.0.4,!=2.1.2,!=2.1.6",
266266
"python-dateutil>=2.1",

0 commit comments

Comments
 (0)
0