summaryrefslogtreecommitdiff
path: root/numpy/doc
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2013-02-27 13:26:58 -0700
committerCharles Harris <charlesr.harris@gmail.com>2013-03-01 11:22:47 -0700
commit6aa264c4bad9c89ccdd9ecd5a1cb5ef10643ec51 (patch)
tree15cad18dacf1ef03380c957ed9af4f39b94c5012 /numpy/doc
parent3c13c0a925276130d66be490eed4ae337712cce2 (diff)
downloadnumpy-6aa264c4bad9c89ccdd9ecd5a1cb5ef10643ec51.tar.gz
2to3: Put `from __future__ import division in every python file.
This should be harmless, as we already are division clean. However, placement of this import takes some care. In the future a script can be used to append new features without worry, at least until such time as it exceeds a single line. Having that ability will make it easier to deal with absolute imports and printing updates.
Diffstat (limited to 'numpy/doc')
-rw-r--r--numpy/doc/__init__.py2
-rw-r--r--numpy/doc/basics.py2
-rw-r--r--numpy/doc/broadcasting.py2
-rw-r--r--numpy/doc/byteswapping.py6
-rw-r--r--numpy/doc/constants.py2
-rw-r--r--numpy/doc/creation.py2
-rw-r--r--numpy/doc/glossary.py2
-rw-r--r--numpy/doc/howtofind.py2
-rw-r--r--numpy/doc/indexing.py2
-rw-r--r--numpy/doc/internals.py2
-rw-r--r--numpy/doc/io.py2
-rw-r--r--numpy/doc/jargon.py2
-rw-r--r--numpy/doc/methods_vs_functions.py2
-rw-r--r--numpy/doc/misc.py2
-rw-r--r--numpy/doc/performance.py2
-rw-r--r--numpy/doc/structured_arrays.py2
-rw-r--r--numpy/doc/subclassing.py2
-rw-r--r--numpy/doc/ufuncs.py2
18 files changed, 38 insertions, 2 deletions
diff --git a/numpy/doc/__init__.py b/numpy/doc/__init__.py
index 6589b5492..19b3d87db 100644
--- a/numpy/doc/__init__.py
+++ b/numpy/doc/__init__.py
@@ -1,3 +1,5 @@
+from __future__ import division
+
import os
ref_dir = os.path.join(os.path.dirname(__file__))
diff --git a/numpy/doc/basics.py b/numpy/doc/basics.py
index 1d0f183e3..d50388282 100644
--- a/numpy/doc/basics.py
+++ b/numpy/doc/basics.py
@@ -136,3 +136,5 @@ value is inside an array or not. NumPy scalars also have many of the same
methods arrays do.
"""
+from __future__ import division
+
diff --git a/numpy/doc/broadcasting.py b/numpy/doc/broadcasting.py
index 7b6179663..be6cde0bd 100644
--- a/numpy/doc/broadcasting.py
+++ b/numpy/doc/broadcasting.py
@@ -175,3 +175,5 @@ See `this article <http://www.scipy.org/EricsBroadcastingDoc>`_
for illustrations of broadcasting concepts.
"""
+from __future__ import division
+
diff --git a/numpy/doc/byteswapping.py b/numpy/doc/byteswapping.py
index 23e7d7f6e..395c858ed 100644
--- a/numpy/doc/byteswapping.py
+++ b/numpy/doc/byteswapping.py
@@ -1,4 +1,4 @@
-'''
+"""
=============================
Byteswapping and byte order
@@ -134,4 +134,6 @@ the previous operations:
>>> swapped_end_arr.tostring() == big_end_str
False
-'''
+"""
+from __future__ import division
+
diff --git a/numpy/doc/constants.py b/numpy/doc/constants.py
index 722147dd8..10f41a7ba 100644
--- a/numpy/doc/constants.py
+++ b/numpy/doc/constants.py
@@ -10,6 +10,8 @@ Numpy includes several constants:
#
# Note: the docstring is autogenerated.
#
+from __future__ import division
+
import textwrap, re
# Maintain same format as in numpy.add_newdocs
diff --git a/numpy/doc/creation.py b/numpy/doc/creation.py
index 9a204e252..f14b163e6 100644
--- a/numpy/doc/creation.py
+++ b/numpy/doc/creation.py
@@ -141,3 +141,5 @@ random values, and some utility functions to generate special matrices (e.g.
diagonal).
"""
+from __future__ import division
+
diff --git a/numpy/doc/glossary.py b/numpy/doc/glossary.py
index 883100491..35adfc820 100644
--- a/numpy/doc/glossary.py
+++ b/numpy/doc/glossary.py
@@ -415,3 +415,5 @@ Glossary
and f2py (which wraps Fortran).
"""
+from __future__ import division
+
diff --git a/numpy/doc/howtofind.py b/numpy/doc/howtofind.py
index 29ad05318..8e6793c48 100644
--- a/numpy/doc/howtofind.py
+++ b/numpy/doc/howtofind.py
@@ -7,3 +7,5 @@ How to Find Stuff
How to find things in NumPy.
"""
+from __future__ import division
+
diff --git a/numpy/doc/indexing.py b/numpy/doc/indexing.py
index 99def8889..84f300dcd 100644
--- a/numpy/doc/indexing.py
+++ b/numpy/doc/indexing.py
@@ -405,3 +405,5 @@ converted to an array as a list would be. As an example: ::
40
"""
+from __future__ import division
+
diff --git a/numpy/doc/internals.py b/numpy/doc/internals.py
index a74429368..d7b6d3c93 100644
--- a/numpy/doc/internals.py
+++ b/numpy/doc/internals.py
@@ -160,3 +160,5 @@ when accessing elements of an array. Granted, it goes against the grain, but
it is more in line with Python semantics and the natural order of the data.
"""
+from __future__ import division
+
diff --git a/numpy/doc/io.py b/numpy/doc/io.py
index 3cde40bd0..4ee4c7c2f 100644
--- a/numpy/doc/io.py
+++ b/numpy/doc/io.py
@@ -7,3 +7,5 @@ Array I/O
Placeholder for array I/O documentation.
"""
+from __future__ import division
+
diff --git a/numpy/doc/jargon.py b/numpy/doc/jargon.py
index e13ff5686..3bf4d5070 100644
--- a/numpy/doc/jargon.py
+++ b/numpy/doc/jargon.py
@@ -7,3 +7,5 @@ Jargon
Placeholder for computer science, engineering and other jargon.
"""
+from __future__ import division
+
diff --git a/numpy/doc/methods_vs_functions.py b/numpy/doc/methods_vs_functions.py
index 22eadccf7..902ec54d0 100644
--- a/numpy/doc/methods_vs_functions.py
+++ b/numpy/doc/methods_vs_functions.py
@@ -7,3 +7,5 @@ Methods vs. Functions
Placeholder for Methods vs. Functions documentation.
"""
+from __future__ import division
+
diff --git a/numpy/doc/misc.py b/numpy/doc/misc.py
index 8fa3f8a31..9195ebb5a 100644
--- a/numpy/doc/misc.py
+++ b/numpy/doc/misc.py
@@ -226,3 +226,5 @@ Interfacing to C++:
5) SIP (used mainly in PyQT)
"""
+from __future__ import division
+
diff --git a/numpy/doc/performance.py b/numpy/doc/performance.py
index 1429e232f..711dd3153 100644
--- a/numpy/doc/performance.py
+++ b/numpy/doc/performance.py
@@ -7,3 +7,5 @@ Performance
Placeholder for Improving Performance documentation.
"""
+from __future__ import division
+
diff --git a/numpy/doc/structured_arrays.py b/numpy/doc/structured_arrays.py
index af777efa4..eeb8a949f 100644
--- a/numpy/doc/structured_arrays.py
+++ b/numpy/doc/structured_arrays.py
@@ -221,3 +221,5 @@ You can find some more information on recarrays and structured arrays
<http://www.scipy.org/Cookbook/Recarray>`_.
"""
+from __future__ import division
+
diff --git a/numpy/doc/subclassing.py b/numpy/doc/subclassing.py
index de0338060..19bdd425f 100644
--- a/numpy/doc/subclassing.py
+++ b/numpy/doc/subclassing.py
@@ -557,3 +557,5 @@ how this can work, have a look at the ``memmap`` class in
"""
+from __future__ import division
+
diff --git a/numpy/doc/ufuncs.py b/numpy/doc/ufuncs.py
index e85b47763..d566ee98a 100644
--- a/numpy/doc/ufuncs.py
+++ b/numpy/doc/ufuncs.py
@@ -135,3 +135,5 @@ results in an error. There are two alternatives:
a convenient way to apply these operators.
"""
+from __future__ import division
+