8000 Build docs with oldest numpy on 2.7. · phobson/matplotlib@5d64f54 · GitHub
[go: up one dir, main page]

Skip to content

Commit 5d64f54

Browse files
committed
Build docs with oldest numpy on 2.7.
Some examples needed to be fixed to build on python2.7+numpy1.7. Delete examples/misc/rec_join_demo.py which is not working on numpy 1.7.1 -- not fixing it, as rec_join is arguably better provided by pandas-style librairies anyways.
1 parent 269dabc commit 5d64f54

File tree

3 files changed

+6
-36
lines changed

3 files changed

+6
-36
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ matrix:
5454
- python: 2.7
5555
env: MOCK=mock NUMPY=numpy==1.7.1 PANDAS=pandas
5656
- python: 2.7
57-
env: BUILD_DOCS=true
57+
env: NUMPY=numpy==1.7.1 BUILD_DOCS=true
5858
- python: 3.4
5959
env: PYTHON_ARGS=-OO
6060
- python: 3.5

examples/misc/rec_join_demo.py

Lines changed: 0 additions & 30 deletions
This file was deleted.

examples/showcase/mandelbrot.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@
1414

1515

1616
def mandelbrot_set(xmin, xmax, ymin, ymax, xn, yn, maxiter, horizon=2.0):
17-
X = np.linspace(xmin, xmax, xn, dtype=np.float32)
18-
Y = np.linspace(ymin, ymax, yn, dtype=np.float32)
19-
C = X + Y[:, None]*1j
20-
N = np.zeros(C.shape, dtype=int)
21-
Z = np.zeros(C.shape, np.complex64)
17+
X = np.linspace(xmin, xmax, xn).astype(np.float32)
18+
Y = np.linspace(ymin, ymax, yn).astype(np.float32)
19+
C = X + Y[:, None] * 1j
20+
N = np.zeros_like(C, dtype=int)
21+
Z = np.zeros_like(C)
2222
for n in range(maxiter):
2323
I = np.less(abs(Z), horizon)
2424
N[I] = n

0 commit comments

Comments
 (0)
< 2F88 /div>
0