pgarrinter.h 1.0 KB

1234567891011121314151617181920212223242526
  1. /* array structure interface version 3 declarations */
  2. #if !defined(PG_ARRAYINTER_HEADER)
  3. #define PG_ARRAYINTER_HEADER
  4. static const int PAI_CONTIGUOUS = 0x01;
  5. static const int PAI_FORTRAN = 0x02;
  6. static const int PAI_ALIGNED = 0x100;
  7. static const int PAI_NOTSWAPPED = 0x200;
  8. static const int PAI_WRITEABLE = 0x400;
  9. static const int PAI_ARR_HAS_DESCR = 0x800;
  10. typedef struct {
  11. int two; /* contains the integer 2 -- simple sanity check */
  12. int nd; /* number of dimensions */
  13. char typekind; /* kind in array -- character code of typestr */
  14. int itemsize; /* size of each element */
  15. int flags; /* flags indicating how the data should be */
  16. /* interpreted */
  17. Py_intptr_t *shape; /* A length-nd array of shape information */
  18. Py_intptr_t *strides; /* A length-nd array of stride information */
  19. void *data; /* A pointer to the first element of the array */
  20. PyObject *descr; /* NULL or a data-description */
  21. } PyArrayInterface;
  22. #endif