diff options
author | Pierre de Buyl <pdebuyl@pdebuyl.be> | 2016-09-06 14:42:08 +0200 |
---|---|---|
committer | Pierre de Buyl <pdebuyl@pdebuyl.be> | 2016-09-06 14:42:08 +0200 |
commit | 2a55233b81a6ea18a57d1dd4f7bc5fff9f2fb681 (patch) | |
tree | 1a4a81faf9e59d0cabf9cbace9dc967bad60caa1 /numpy/doc | |
parent | 773e3cad9a71cb9a7849d8e251fb8a99ab35d06b (diff) | |
download | numpy-2a55233b81a6ea18a57d1dd4f7bc5fff9f2fb681.tar.gz |
DOC: change Numpy to NumPy in dosctrings and comments
The strings in error messages were left untouched
Diffstat (limited to 'numpy/doc')
-rw-r--r-- | numpy/doc/basics.py | 10 | ||||
-rw-r--r-- | numpy/doc/constants.py | 12 | ||||
-rw-r--r-- | numpy/doc/creation.py | 6 | ||||
-rw-r--r-- | numpy/doc/glossary.py | 2 | ||||
-rw-r--r-- | numpy/doc/indexing.py | 4 | ||||
-rw-r--r-- | numpy/doc/internals.py | 8 | ||||
-rw-r--r-- | numpy/doc/structured_arrays.py | 4 | ||||
-rw-r--r-- | numpy/doc/subclassing.py | 4 | ||||
-rw-r--r-- | numpy/doc/ufuncs.py | 2 |
9 files changed, 26 insertions, 26 deletions
diff --git a/numpy/doc/basics.py b/numpy/doc/basics.py index 745bff15a..dac236644 100644 --- a/numpy/doc/basics.py +++ b/numpy/doc/basics.py @@ -6,7 +6,7 @@ Array basics Array types and conversions between types ========================================= -Numpy supports a much greater variety of numerical types than Python does. +NumPy supports a much greater variety of numerical types than Python does. This section shows which are available, and how to modify an array's data-type. ========== ========================================================== @@ -43,7 +43,7 @@ complex128 Complex number, represented by two 64-bit floats (real Additionally to ``intc`` the platform dependent C integer types ``short``, ``long``, ``longlong`` and their unsigned versions are defined. -Numpy numerical types are instances of ``dtype`` (data-type) objects, each +NumPy numerical types are instances of ``dtype`` (data-type) objects, each having unique characteristics. Once you have imported NumPy using :: @@ -124,7 +124,7 @@ properties of the type, such as whether it is an integer:: Array Scalars ============= -Numpy generally returns elements of arrays as array scalars (a scalar +NumPy generally returns elements of arrays as array scalars (a scalar with an associated dtype). Array scalars differ from Python scalars, but for the most part they can be used interchangeably (the primary exception is for versions of Python older than v2.x, where integer array @@ -152,12 +152,12 @@ is possible in numpy depends on the hardware and on the development environment: specifically, x86 machines provide hardware floating-point with 80-bit precision, and while most C compilers provide this as their ``long double`` type, MSVC (standard for Windows builds) makes -``long double`` identical to ``double`` (64 bits). Numpy makes the +``long double`` identical to ``double`` (64 bits). NumPy makes the compiler's ``long double`` available as ``np.longdouble`` (and ``np.clongdouble`` for the complex numbers). You can find out what your numpy provides with``np.finfo(np.longdouble)``. -Numpy does not provide a dtype with more precision than C +NumPy does not provide a dtype with more precision than C ``long double``s; in particular, the 128-bit IEEE quad precision data type (FORTRAN's ``REAL*16``) is not available. diff --git a/numpy/doc/constants.py b/numpy/doc/constants.py index 36f94d307..f9fccabfb 100644 --- a/numpy/doc/constants.py +++ b/numpy/doc/constants.py @@ -3,7 +3,7 @@ Constants ========= -Numpy includes several constants: +NumPy includes several constants: %(constant_list)s """ @@ -82,7 +82,7 @@ add_newdoc('numpy', 'NINF', Notes ----- - Numpy uses the IEEE Standard for Binary Floating-Point for Arithmetic + NumPy uses the IEEE Standard for Binary Floating-Point for Arithmetic (IEEE 754). This means that Not a Number is not equivalent to infinity. Also that positive infinity is not equivalent to negative infinity. But infinity is equivalent to positive infinity. @@ -122,7 +122,7 @@ add_newdoc('numpy', 'NZERO', Notes ----- - Numpy uses the IEEE Standard for Binary Floating-Point for Arithmetic + NumPy uses the IEEE Standard for Binary Floating-Point for Arithmetic (IEEE 754). Negative zero is considered to be a finite number. Examples @@ -193,7 +193,7 @@ add_newdoc('numpy', 'PZERO', Notes ----- - Numpy uses the IEEE Standard for Binary Floating-Point for Arithmetic + NumPy uses the IEEE Standard for Binary Floating-Point for Arithmetic (IEEE 754). Positive zero is considered to be a finite number. Examples @@ -253,7 +253,7 @@ add_newdoc('numpy', 'inf', Notes ----- - Numpy uses the IEEE Standard for Binary Floating-Point for Arithmetic + NumPy uses the IEEE Standard for Binary Floating-Point for Arithmetic (IEEE 754). This means that Not a Number is not equivalent to infinity. Also that positive infinity is not equivalent to negative infinity. But infinity is equivalent to positive infinity. @@ -298,7 +298,7 @@ add_newdoc('numpy', 'nan', Notes ----- - Numpy uses the IEEE Standard for Binary Floating-Point for Arithmetic + NumPy uses the IEEE Standard for Binary Floating-Point for Arithmetic (IEEE 754). This means that Not a Number is not equivalent to infinity. `NaN` and `NAN` are aliases of `nan`. diff --git a/numpy/doc/creation.py b/numpy/doc/creation.py index b10d45d48..8480858d4 100644 --- a/numpy/doc/creation.py +++ b/numpy/doc/creation.py @@ -19,7 +19,7 @@ This section will not cover means of replicating, joining, or otherwise expanding or mutating existing arrays. Nor will it cover creating object arrays or structured arrays. Both of those are covered in their own sections. -Converting Python array_like Objects to Numpy Arrays +Converting Python array_like Objects to NumPy Arrays ==================================================== In general, numerical data arranged in an array-like structure in Python can @@ -38,10 +38,10 @@ Examples: :: and types >>> x = np.array([[ 1.+0.j, 2.+0.j], [ 0.+0.j, 0.+0.j], [ 1.+1.j, 3.+0.j]]) -Intrinsic Numpy Array Creation +Intrinsic NumPy Array Creation ============================== -Numpy has built-in functions for creating arrays from scratch: +NumPy has built-in functions for creating arrays from scratch: zeros(shape) will create an array filled with 0 values with the specified shape. The default dtype is float64. diff --git a/numpy/doc/glossary.py b/numpy/doc/glossary.py index 91cd74651..97b7b3362 100644 --- a/numpy/doc/glossary.py +++ b/numpy/doc/glossary.py @@ -305,7 +305,7 @@ Glossary [1, 2, 3, 4, 5, 6] Row-major order is also known as the C order, as the C programming - language uses it. New Numpy arrays are by default in row-major order. + language uses it. New NumPy arrays are by default in row-major order. self Often seen in method signatures, ``self`` refers to the instance diff --git a/numpy/doc/indexing.py b/numpy/doc/indexing.py index 33e9de3c4..3e3e95641 100644 --- a/numpy/doc/indexing.py +++ b/numpy/doc/indexing.py @@ -65,7 +65,7 @@ inefficient as a new temporary array is created after the first index that is subsequently indexed by 2. Note to those used to IDL or Fortran memory order as it relates to -indexing. Numpy uses C-order indexing. That means that the last +indexing. NumPy uses C-order indexing. That means that the last index usually represents the most rapidly changing memory location, unlike Fortran or IDL, where the first index represents the most rapidly changing location in memory. This difference represents a @@ -111,7 +111,7 @@ specific function. Index arrays ============ -Numpy arrays may be indexed with other arrays (or any other sequence- +NumPy arrays may be indexed with other arrays (or any other sequence- like object that can be converted to an array, such as lists, with the exception of tuples; see the end of this document for why this is). The use of index arrays ranges from simple, straightforward cases to diff --git a/numpy/doc/internals.py b/numpy/doc/internals.py index c25872bc0..a14fee7c2 100644 --- a/numpy/doc/internals.py +++ b/numpy/doc/internals.py @@ -6,13 +6,13 @@ Array Internals Internal organization of numpy arrays ===================================== -It helps to understand a bit about how numpy arrays are handled under the covers to help understand numpy better. This section will not go into great detail. Those wishing to understand the full details are referred to Travis Oliphant's book "Guide to Numpy". +It helps to understand a bit about how numpy arrays are handled under the covers to help understand numpy better. This section will not go into great detail. Those wishing to understand the full details are referred to Travis Oliphant's book "Guide to NumPy". -Numpy arrays consist of two major components, the raw array data (from now on, +NumPy arrays consist of two major components, the raw array data (from now on, referred to as the data buffer), and the information about the raw array data. The data buffer is typically what people think of as arrays in C or Fortran, a contiguous (and fixed) block of memory containing fixed sized data items. -Numpy also contains a significant set of data that describes how to interpret +NumPy also contains a significant set of data that describes how to interpret the data in the data buffer. This extra information contains (among other things): 1) The basic data element's size in bytes @@ -109,7 +109,7 @@ The situation with numpy makes this issue yet more complicated. The internal machinery of numpy arrays is flexible enough to accept any ordering of indices. One can simply reorder indices by manipulating the internal stride information for arrays -without reordering the data at all. Numpy will know how to map the new index +without reordering the data at all. NumPy will know how to map the new index order to the data without moving the data. So if this is true, why not choose diff --git a/numpy/doc/structured_arrays.py b/numpy/doc/structured_arrays.py index 1135c1395..5289e6d0b 100644 --- a/numpy/doc/structured_arrays.py +++ b/numpy/doc/structured_arrays.py @@ -6,7 +6,7 @@ Structured Arrays Introduction ============ -Numpy provides powerful capabilities to create arrays of structured datatype. +NumPy provides powerful capabilities to create arrays of structured datatype. These arrays permit one to manipulate the data by named fields. A simple example will show what is meant.: :: @@ -79,7 +79,7 @@ The type specifiers can take 4 different forms: :: Don't use these in new code! d) Single character type specifiers (e.g H for unsigned short ints). Avoid using these unless you must. Details can be found in the - Numpy book + NumPy book These different styles can be mixed within the same string (but why would you want to do that?). Furthermore, each type specifier can be prefixed diff --git a/numpy/doc/subclassing.py b/numpy/doc/subclassing.py index 40522bb9c..9a339430b 100644 --- a/numpy/doc/subclassing.py +++ b/numpy/doc/subclassing.py @@ -97,7 +97,7 @@ Implications for subclassing If we subclass ndarray, we need to deal not only with explicit construction of our array type, but also :ref:`view-casting` or -:ref:`new-from-template`. Numpy has the machinery to do this, and this +:ref:`new-from-template`. NumPy has the machinery to do this, and this machinery that makes subclassing slightly non-standard. There are two aspects to the machinery that ndarray uses to support @@ -523,7 +523,7 @@ Extra gotchas - custom ``__del__`` methods and ndarray.base One of the problems that ndarray solves is keeping track of memory ownership of ndarrays and their views. Consider the case where we have created an ndarray, ``arr`` and have taken a slice with ``v = arr[1:]``. -The two objects are looking at the same memory. Numpy keeps track of +The two objects are looking at the same memory. NumPy keeps track of where the data came from for a particular array or view, with the ``base`` attribute: diff --git a/numpy/doc/ufuncs.py b/numpy/doc/ufuncs.py index 0132202ad..a112e559c 100644 --- a/numpy/doc/ufuncs.py +++ b/numpy/doc/ufuncs.py @@ -6,7 +6,7 @@ Universal Functions Ufuncs are, generally speaking, mathematical functions or operations that are applied element-by-element to the contents of an array. That is, the result in each output array element only depends on the value in the corresponding -input array (or arrays) and on no other array elements. Numpy comes with a +input array (or arrays) and on no other array elements. NumPy comes with a large suite of ufuncs, and scipy extends that suite substantially. The simplest example is the addition operator: :: |