diff options
author | wfspotz@sandia.gov <wfspotz@sandia.gov@localhost> | 2007-04-13 20:38:36 +0000 |
---|---|---|
committer | wfspotz@sandia.gov <wfspotz@sandia.gov@localhost> | 2007-04-13 20:38:36 +0000 |
commit | ee95f34a29e4e39804f0cedd6a2fadfda9143a57 (patch) | |
tree | 632c84ce3cb7c411c155905035d358be33cedd87 /numpy/doc/swig/numpy_swig.html | |
parent | cfb606b1a0849895c12e2ecf99deca3d04a2a2f3 (diff) | |
download | numpy-ee95f34a29e4e39804f0cedd6a2fadfda9143a57.tar.gz |
Reformatted numpy.i routines descriptions
Diffstat (limited to 'numpy/doc/swig/numpy_swig.html')
-rw-r--r-- | numpy/doc/swig/numpy_swig.html | 204 |
1 files changed, 154 insertions, 50 deletions
diff --git a/numpy/doc/swig/numpy_swig.html b/numpy/doc/swig/numpy_swig.html index 5348c5fbf..eadfc3f3a 100644 --- a/numpy/doc/swig/numpy_swig.html +++ b/numpy/doc/swig/numpy_swig.html @@ -745,56 +745,160 @@ order. Equivalent to <tt class="docutils literal"><span class="pre">(PyArray_IS <div class="section"> <h2><a class="toc-backref" href="#id12" id="routines" name="routines">Routines</a></h2> <blockquote> -<dl class="docutils"> -<dt><strong>char* pytype_string(PyObject* py_obj)</strong></dt> -<dd>Given a <tt class="docutils literal"><span class="pre">PyObject*</span></tt>, return a string describing its type.</dd> -<dt><strong>char* typecode_string(int typecode)</strong></dt> -<dd>Given a <a class="reference" href="http://numpy.scipy.org">NumPy</a> integer typecode, return a string describing the type.</dd> -<dt><strong>int type_match(int actual_type, int desired_type)</strong></dt> -<dd>Make sure input has correct <a class="reference" href="http://numpy.scipy.org">NumPy</a> type. Allow character and -byte to match. Also allow int and long to match. This is -deprecated . You should use <tt class="docutils literal"><span class="pre">PyArray_EquivTypenums()</span></tt> instead.</dd> -<dt><strong>PyArrayObject* obj_to_array_no_conversion(PyObject* input, int typecode)</strong></dt> -<dd>Given a <tt class="docutils literal"><span class="pre">PyObject*</span></tt>, cast it to a <tt class="docutils literal"><span class="pre">PyArrayObject*</span></tt> if legal. -If not, set the python error string appropriately and return -<tt class="docutils literal"><span class="pre">NULL</span></tt>.</dd> -<dt><strong>PyArrayObject* obj_to_array_allow_conversion(PyObject* input, int typecode, int* is_new_object)</strong></dt> -<dd>Convert the given <tt class="docutils literal"><span class="pre">PyObject*</span></tt> to a <a class="reference" href="http://numpy.scipy.org">NumPy</a> array with the given -typecode. On Success, return a valid <tt class="docutils literal"><span class="pre">PyArrayObject*</span></tt> with the -correct type. On failure, the python error string will be set and -the routine returns <tt class="docutils literal"><span class="pre">NULL</span></tt>.</dd> -<dt><strong>PyArrayObject* make_contiguous(PyArrayObject* ary, int* is_new_object, int min_dims, int max_dims)</strong></dt> -<dd>Given a <tt class="docutils literal"><span class="pre">PyArrayObject*</span></tt>, check to see if it is contiguous. If -so, return the input pointer and flag it as not a new object. If -it is not contiguous, create a new <tt class="docutils literal"><span class="pre">PyArrayObject*</span></tt> using the -original data, flag it as a new object and return the pointer.</dd> -<dt><strong>PyArrayObject* obj_to_array_contiguous_allow_conversion(PyObject* input, int typecode, int* is_new_object)</strong></dt> -<dd>Convert a given <tt class="docutils literal"><span class="pre">PyObject*</span></tt> to a contiguous <tt class="docutils literal"><span class="pre">PyArrayObject*</span></tt> -of the specified type. If the input object is not a contiguous +<p><strong>pytype_string()</strong></p> +<blockquote> +<p>Return type: <tt class="docutils literal"><span class="pre">char*</span></tt></p> +<p>Arguments:</p> +<ul class="simple"> +<li><tt class="docutils literal"><span class="pre">PyObject*</span> <span class="pre">py_obj</span></tt>, a general python object.</li> +</ul> +<p>Return a string describing the type of <tt class="docutils literal"><span class="pre">py_obj</span></tt>.</p> +</blockquote> +<p><strong>typecode_string()</strong></p> +<blockquote> +<p>Return type: <tt class="docutils literal"><span class="pre">char*</span></tt></p> +<p>Arguments:</p> +<ul class="simple"> +<li><tt class="docutils literal"><span class="pre">int</span> <span class="pre">typecode</span></tt>, a <a class="reference" href="http://numpy.scipy.org">NumPy</a> integer typecode.</li> +</ul> +<p>Return a string describing the type corresponding to the <a class="reference" href="http://numpy.scipy.org">NumPy</a> +<tt class="docutils literal"><span class="pre">typecode</span></tt>.</p> +</blockquote> +<p><strong>type_match()</strong></p> +<blockquote> +<p>Return type: <tt class="docutils literal"><span class="pre">int</span></tt></p> +<p>Arguments:</p> +<ul class="simple"> +<li><tt class="docutils literal"><span class="pre">int</span> <span class="pre">actual_type</span></tt>, the <a class="reference" href="http://numpy.scipy.org">NumPy</a> typecode of a <a class="reference" href="http://numpy.scipy.org">NumPy</a> array.</li> +<li><tt class="docutils literal"><span class="pre">int</span> <span class="pre">desired_type</span></tt>, the desired <a class="reference" href="http://numpy.scipy.org">NumPy</a> typecode.</li> +</ul> +<p>Make sure that <tt class="docutils literal"><span class="pre">actual_type</span></tt> is compatible with +<tt class="docutils literal"><span class="pre">desired_type</span></tt>. For example, this allows character and +byte types, or int and long types, to match. This is now +equivalent to <tt class="docutils literal"><span class="pre">PyArray_EquivTypenums()</span></tt>.</p> +</blockquote> +<p><strong>obj_to_array_no_conversion()</strong></p> +<blockquote> +<p>Return type: <tt class="docutils literal"><span class="pre">PyArrayObject*</span></tt></p> +<p>Arguments:</p> +<ul class="simple"> +<li><tt class="docutils literal"><span class="pre">PyObject*</span> <span class="pre">input</span></tt>, a general python object.</li> +<li><tt class="docutils literal"><span class="pre">int</span> <span class="pre">typecode</span></tt>, the desired <a class="reference" href="http://numpy.scipy.org">NumPy</a> typecode.</li> +</ul> +<p>Cast <tt class="docutils literal"><span class="pre">input</span></tt> to a <tt class="docutils literal"><span class="pre">PyArrayObject*</span></tt> if legal, and ensure that +it is of type <tt class="docutils literal"><span class="pre">typecode</span></tt>. If <tt class="docutils literal"><span class="pre">input</span></tt> cannot be cast, or the +<tt class="docutils literal"><span class="pre">typecode</span></tt> is wrong, set a python error and return <tt class="docutils literal"><span class="pre">NULL</span></tt>.</p> +</blockquote> +<p><strong>obj_to_array_allow_conversion()</strong></p> +<blockquote> +<p>Return type: <tt class="docutils literal"><span class="pre">PyArrayObject*</span></tt></p> +<p>Arguments:</p> +<ul class="simple"> +<li><tt class="docutils literal"><span class="pre">PyObject*</span> <span class="pre">input</span></tt>, a general python object.</li> +<li><tt class="docutils literal"><span class="pre">int</span> <span class="pre">typecode</span></tt>, the desired <a class="reference" href="http://numpy.scipy.org">NumPy</a> typecode of the resulting +array.</li> +<li><tt class="docutils literal"><span class="pre">int*</span> <span class="pre">is_new_object</span></tt>, returns a value of 0 if no conversion +performed, else 1.</li> +</ul> +<p>Convert <tt class="docutils literal"><span class="pre">input</span></tt> to a <a class="reference" href="http://numpy.scipy.org">NumPy</a> array with the given <tt class="docutils literal"><span class="pre">typecode</span></tt>. +On success, return a valid <tt class="docutils literal"><span class="pre">PyArrayObject*</span></tt> with the correct +type. On failure, the python error string will be set and the +routine returns <tt class="docutils literal"><span class="pre">NULL</span></tt>.</p> +</blockquote> +<p><strong>make_contiguous()</strong></p> +<blockquote> +<p>Return type: <tt class="docutils literal"><span class="pre">PyArrayObject*</span></tt></p> +<p>Arguments:</p> +<ul class="simple"> +<li><tt class="docutils literal"><span class="pre">PyArrayObject*</span> <span class="pre">ary</span></tt>, a <a class="reference" href="http://numpy.scipy.org">NumPy</a> array.</li> +<li><tt class="docutils literal"><span class="pre">int*</span> <span class="pre">is_new_object</span></tt>, returns a value of 0 if no conversion +performed, else 1.</li> +<li><tt class="docutils literal"><span class="pre">int</span> <span class="pre">min_dims</span></tt>, minimum allowable dimensions.</li> +<li><tt class="docutils literal"><span class="pre">int</span> <span class="pre">max_dims</span></tt>, maximum allowable dimensions.</li> +</ul> +<p>Check to see if <tt class="docutils literal"><span class="pre">ary</span></tt> is contiguous. If so, return the input +pointer and flag it as not a new object. If it is not contiguous, +create a new <tt class="docutils literal"><span class="pre">PyArrayObject*</span></tt> using the original data, flag it +as a new object and return the pointer.</p> +</blockquote> +<p><strong>obj_to_array_contiguous_allow_conversion()</strong></p> +<blockquote> +<p>Return type: <tt class="docutils literal"><span class="pre">PyArrayObject*</span></tt></p> +<p>Arguments:</p> +<ul class="simple"> +<li><tt class="docutils literal"><span class="pre">PyObject*</span> <span class="pre">input</span></tt>, a general python object.</li> +<li><tt class="docutils literal"><span class="pre">int</span> <span class="pre">typecode</span></tt>, the desired <a class="reference" href="http://numpy.scipy.org">NumPy</a> typecode of the resulting +array.</li> +<li><tt class="docutils literal"><span class="pre">int*</span> <span class="pre">is_new_object</span></tt>, returns a value of 0 if no conversion +performed, else 1.</li> +</ul> +<p>Convert <tt class="docutils literal"><span class="pre">input</span></tt> to a contiguous <tt class="docutils literal"><span class="pre">PyArrayObject*</span></tt> of the +specified type. If the input object is not a contiguous <tt class="docutils literal"><span class="pre">PyArrayObject*</span></tt>, a new one will be created and the new object -flag will be set.</dd> -<dt><strong>int require_contiguous(PyArrayObject* ary)</strong></dt> -<dd>Test whether a <tt class="docutils literal"><span class="pre">PyArrayObject*</span></tt> is contiguous. If array is -contiguous, return 1. Otherwise, set the python error string and -return 0.</dd> -<dt><strong>int require_native(PyArray_Object* ary)</strong></dt> -<dd>Require that a numpy array is not byte-swapped. If the array is -not byte-swapped, return 1. Otherwise, set the python error string -and return 0.</dd> -<dt><strong>int require_dimensions(PyArrayObject* ary, int exact_dimensions)</strong></dt> -<dd>Require the given <tt class="docutils literal"><span class="pre">PyArrayObject*</span></tt> to have a specified number of -dimensions. If the array has the specified number of dimensions, -return 1. Otherwise, set the python error string and return 0.</dd> -<dt><strong>int require_dimensions_n(PyArrayObject* ary, int* exact_dimensions, int n)</strong></dt> -<dd>Require the given <tt class="docutils literal"><span class="pre">PyArrayObject*</span></tt> to have one of a list of -specified number of dimensions. If the array has one of the -specified number of dimensions, return 1. Otherwise, set the -python error string and return 0.</dd> -<dt><strong>int require_size(PyArrayObject* ary, int* size, int n)</strong></dt> -<dd>Require the given <tt class="docutils literal"><span class="pre">PyArrayObject*</span></tt> to have a specified shape. -If the array has the specified shape, return 1. Otherwise, set -the python error string and return 0.</dd> -</dl> +flag will be set.</p> +</blockquote> +<p><strong>require_contiguous()</strong></p> +<blockquote> +<p>Return type: <tt class="docutils literal"><span class="pre">int</span></tt></p> +<p>Arguments:</p> +<ul class="simple"> +<li><tt class="docutils literal"><span class="pre">PyArrayObject*</span> <span class="pre">ary</span></tt>, a <a class="reference" href="http://numpy.scipy.org">NumPy</a> array.</li> +</ul> +<p>Test whether <tt class="docutils literal"><span class="pre">ary</span></tt> is contiguous. If so, return 1. Otherwise, +set a python error and return 0.</p> +</blockquote> +<p><strong>require_native()</strong></p> +<blockquote> +<p>Return type: <tt class="docutils literal"><span class="pre">int</span></tt></p> +<p>Arguments:</p> +<ul class="simple"> +<li><tt class="docutils literal"><span class="pre">PyArray_Object*</span> <span class="pre">ary</span></tt>, a <a class="reference" href="http://numpy.scipy.org">NumPy</a> array.</li> +</ul> +<p>Require that <tt class="docutils literal"><span class="pre">ary</span></tt> is not byte-swapped. If the array is not +byte-swapped, return 1. Otherwise, set a python error and return +0.</p> +</blockquote> +<p><strong>require_dimensions()</strong></p> +<blockquote> +<p>Return type: <tt class="docutils literal"><span class="pre">int</span></tt></p> +<p>Arguments:</p> +<ul class="simple"> +<li><tt class="docutils literal"><span class="pre">PyArrayObject*</span> <span class="pre">ary</span></tt>, a <a class="reference" href="http://numpy.scipy.org">NumPy</a> array.</li> +<li><tt class="docutils literal"><span class="pre">int</span> <span class="pre">exact_dimensions</span></tt>, the desired number of dimensions.</li> +</ul> +<p>Require <tt class="docutils literal"><span class="pre">ary</span></tt> to have a specified number of dimensions. If the +array has the specified number of dimensions, return 1. +Otherwise, set a python error and return 0.</p> +</blockquote> +<p><strong>require_dimensions_n()</strong></p> +<blockquote> +<p>Return type: <tt class="docutils literal"><span class="pre">int</span></tt></p> +<p>Arguments:</p> +<ul class="simple"> +<li><tt class="docutils literal"><span class="pre">PyArrayObject*</span> <span class="pre">ary</span></tt>, a <a class="reference" href="http://numpy.scipy.org">NumPy</a> array.</li> +<li><tt class="docutils literal"><span class="pre">int*</span> <span class="pre">exact_dimensions</span></tt>, an array of integers representing +acceptable numbers of dimensions.</li> +<li><tt class="docutils literal"><span class="pre">int</span> <span class="pre">n</span></tt>, the length of <tt class="docutils literal"><span class="pre">exact_dimensions</span></tt>.</li> +</ul> +<p>Require <tt class="docutils literal"><span class="pre">ary</span></tt> to have one of a list of specified number of +dimensions. If the array has one of the specified number of +dimensions, return 1. Otherwise, set the python error string and +return 0.</p> +</blockquote> +<p><strong>require_size()</strong></p> +<blockquote> +<p>Return type: <tt class="docutils literal"><span class="pre">int</span></tt></p> +<p>Arguments:</p> +<ul class="simple"> +<li><tt class="docutils literal"><span class="pre">PyArrayObject*</span> <span class="pre">ary</span></tt>, a <a class="reference" href="http://numpy.scipy.org">NumPy</a> array.</li> +<li><tt class="docutils literal"><span class="pre">npy_int*</span> <span class="pre">size</span></tt>, an array representing the desired lengths of +each dimension.</li> +<li><tt class="docutils literal"><span class="pre">int</span> <span class="pre">n</span></tt>, the length of <tt class="docutils literal"><span class="pre">size</span></tt>.</li> +</ul> +<p>Require <tt class="docutils literal"><span class="pre">ary</span></tt> to have a specified shape. If the array has the +specified shape, return 1. Otherwise, set the python error string +and return 0.</p> +</blockquote> </blockquote> </div> </div> @@ -948,7 +1052,7 @@ possible.</p> </div> <div class="footer"> <hr class="footer" /> -Generated on: 2007-04-13 17:02 UTC. +Generated on: 2007-04-13 20:37 UTC. Generated by <a class="reference" href="http://docutils.sourceforge.net/">Docutils</a> from <a class="reference" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> source. </div> |