summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorTravis Oliphant <oliphant@enthought.com>2005-10-09 08:07:32 +0000
committerTravis Oliphant <oliphant@enthought.com>2005-10-09 08:07:32 +0000
commit4a11f5530e5dfb8c8be9a0a41d0fe74ecd5af6b6 (patch)
treec28a97a86c794caf551af5559c44a8fbb3181983 /doc
parent6f56244252f151aa2bd5ff1c6e3b7fd2051e5bdf (diff)
downloadnumpy-4a11f5530e5dfb8c8be9a0a41d0fe74ecd5af6b6.tar.gz
Fixed loop->bufcnt for 64-bit fixes.
Diffstat (limited to 'doc')
-rw-r--r--doc/CAPI.txt27
1 files changed, 24 insertions, 3 deletions
diff --git a/doc/CAPI.txt b/doc/CAPI.txt
index edb58efc7..e889ddc91 100644
--- a/doc/CAPI.txt
+++ b/doc/CAPI.txt
@@ -21,6 +21,11 @@ of the API) that will need to be changed:
get the itemsize of an object (for flexible arrays descr->elsize
is 0).
+ * If you passed array->dimensions and array->strides around to
+ functions. These are now, intp* pointers. On 32-bit systems
+ there won't be a problem. However, on 64-bit systems, you will
+ need to make changes.
+
The header files arrayobject.h and ufuncobject.h contain many defines
that you may find useful. The files __ufunc_api.h and
@@ -35,7 +40,8 @@ All of these headers are installed to
Getting arrays in C-code
=========================
-All new arrays can be created using PyArray_New.
+All new arrays can be created using PyArray_New. A simple interface
+equivalent to PyArray_FromDims is PyArray_SimpleNew(nd, dims, typenum)
This is a very flexible function.
@@ -103,10 +109,25 @@ obj : If subtypes is &PyArray_Type or &PyBigArray_Type, this
Note: The returned array object will be unitialized unless the type is
PyArray_OBJECT.
+PyArray_SimpleNew(nd, dims, typenum) is a drop-in replacement for
+PyArray_FromDims (except it takes intp* dims instead of int* dims which
+ matters on 64-bit systems).
+
+PyArray_SimpleNew is just a macro for PyArray_New with default arguments.
+
+
The PyArray_FromDims and family of functions are still available and
-are loose wrappers around this function.
+are loose wrappers around this function. These functions still take
+int * arguments. This should be fine on 32-bit systems, but on 64-bit
+systems you may run into trouble if you frequently passed
+PyArray_FromDims the dimensions member of the old PyArrayObject structure
+because sizeof(intp) != sizeof(int).
+
+
+Getting an arrayobject from an arbitrary Python object
+==============================================================
-Getting an arrayobject from an arbitrary Python object: PyArray_FromAny
+PyArray_FromAny(...)
This function replaces PyArray_ContiguousFromObject and friends (those
function calls still remain but they are loose wrappers around the