ufunc_api.txt 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321
  1. =================
  2. Numpy Ufunc C-API
  3. =================
  4. ::
  5. PyObject *
  6. PyUFunc_FromFuncAndData(PyUFuncGenericFunction *func, void
  7. **data, char *types, int ntypes, int nin, int
  8. nout, int identity, const char *name, const
  9. char *doc, int unused)
  10. ::
  11. int
  12. PyUFunc_RegisterLoopForType(PyUFuncObject *ufunc, int
  13. usertype, PyUFuncGenericFunction
  14. function, int *arg_types, void *data)
  15. ::
  16. int
  17. PyUFunc_GenericFunction(PyUFuncObject *ufunc, PyObject *args, PyObject
  18. *kwds, PyArrayObject **op)
  19. This generic function is called with the ufunc object, the arguments to it,
  20. and an array of (pointers to) PyArrayObjects which are NULL.
  21. 'op' is an array of at least NPY_MAXARGS PyArrayObject *.
  22. ::
  23. void
  24. PyUFunc_f_f_As_d_d(char **args, npy_intp *dimensions, npy_intp
  25. *steps, void *func)
  26. ::
  27. void
  28. PyUFunc_d_d(char **args, npy_intp *dimensions, npy_intp *steps, void
  29. *func)
  30. ::
  31. void
  32. PyUFunc_f_f(char **args, npy_intp *dimensions, npy_intp *steps, void
  33. *func)
  34. ::
  35. void
  36. PyUFunc_g_g(char **args, npy_intp *dimensions, npy_intp *steps, void
  37. *func)
  38. ::
  39. void
  40. PyUFunc_F_F_As_D_D(char **args, npy_intp *dimensions, npy_intp
  41. *steps, void *func)
  42. ::
  43. void
  44. PyUFunc_F_F(char **args, npy_intp *dimensions, npy_intp *steps, void
  45. *func)
  46. ::
  47. void
  48. PyUFunc_D_D(char **args, npy_intp *dimensions, npy_intp *steps, void
  49. *func)
  50. ::
  51. void
  52. PyUFunc_G_G(char **args, npy_intp *dimensions, npy_intp *steps, void
  53. *func)
  54. ::
  55. void
  56. PyUFunc_O_O(char **args, npy_intp *dimensions, npy_intp *steps, void
  57. *func)
  58. ::
  59. void
  60. PyUFunc_ff_f_As_dd_d(char **args, npy_intp *dimensions, npy_intp
  61. *steps, void *func)
  62. ::
  63. void
  64. PyUFunc_ff_f(char **args, npy_intp *dimensions, npy_intp *steps, void
  65. *func)
  66. ::
  67. void
  68. PyUFunc_dd_d(char **args, npy_intp *dimensions, npy_intp *steps, void
  69. *func)
  70. ::
  71. void
  72. PyUFunc_gg_g(char **args, npy_intp *dimensions, npy_intp *steps, void
  73. *func)
  74. ::
  75. void
  76. PyUFunc_FF_F_As_DD_D(char **args, npy_intp *dimensions, npy_intp
  77. *steps, void *func)
  78. ::
  79. void
  80. PyUFunc_DD_D(char **args, npy_intp *dimensions, npy_intp *steps, void
  81. *func)
  82. ::
  83. void
  84. PyUFunc_FF_F(char **args, npy_intp *dimensions, npy_intp *steps, void
  85. *func)
  86. ::
  87. void
  88. PyUFunc_GG_G(char **args, npy_intp *dimensions, npy_intp *steps, void
  89. *func)
  90. ::
  91. void
  92. PyUFunc_OO_O(char **args, npy_intp *dimensions, npy_intp *steps, void
  93. *func)
  94. ::
  95. void
  96. PyUFunc_O_O_method(char **args, npy_intp *dimensions, npy_intp
  97. *steps, void *func)
  98. ::
  99. void
  100. PyUFunc_OO_O_method(char **args, npy_intp *dimensions, npy_intp
  101. *steps, void *func)
  102. ::
  103. void
  104. PyUFunc_On_Om(char **args, npy_intp *dimensions, npy_intp *steps, void
  105. *func)
  106. ::
  107. int
  108. PyUFunc_GetPyValues(char *name, int *bufsize, int *errmask, PyObject
  109. **errobj)
  110. On return, if errobj is populated with a non-NULL value, the caller
  111. owns a new reference to errobj.
  112. ::
  113. int
  114. PyUFunc_checkfperr(int errmask, PyObject *errobj, int *first)
  115. ::
  116. void
  117. PyUFunc_clearfperr()
  118. ::
  119. int
  120. PyUFunc_getfperr(void )
  121. ::
  122. int
  123. PyUFunc_handlefperr(int errmask, PyObject *errobj, int retstatus, int
  124. *first)
  125. ::
  126. int
  127. PyUFunc_ReplaceLoopBySignature(PyUFuncObject
  128. *func, PyUFuncGenericFunction
  129. newfunc, int
  130. *signature, PyUFuncGenericFunction
  131. *oldfunc)
  132. ::
  133. PyObject *
  134. PyUFunc_FromFuncAndDataAndSignature(PyUFuncGenericFunction *func, void
  135. **data, char *types, int
  136. ntypes, int nin, int nout, int
  137. identity, const char *name, const
  138. char *doc, int unused, const char
  139. *signature)
  140. ::
  141. int
  142. PyUFunc_SetUsesArraysAsData(void **data, size_t i)
  143. ::
  144. void
  145. PyUFunc_e_e(char **args, npy_intp *dimensions, npy_intp *steps, void
  146. *func)
  147. ::
  148. void
  149. PyUFunc_e_e_As_f_f(char **args, npy_intp *dimensions, npy_intp
  150. *steps, void *func)
  151. ::
  152. void
  153. PyUFunc_e_e_As_d_d(char **args, npy_intp *dimensions, npy_intp
  154. *steps, void *func)
  155. ::
  156. void
  157. PyUFunc_ee_e(char **args, npy_intp *dimensions, npy_intp *steps, void
  158. *func)
  159. ::
  160. void
  161. PyUFunc_ee_e_As_ff_f(char **args, npy_intp *dimensions, npy_intp
  162. *steps, void *func)
  163. ::
  164. void
  165. PyUFunc_ee_e_As_dd_d(char **args, npy_intp *dimensions, npy_intp
  166. *steps, void *func)
  167. ::
  168. int
  169. PyUFunc_DefaultTypeResolver(PyUFuncObject *ufunc, NPY_CASTING
  170. casting, PyArrayObject
  171. **operands, PyObject
  172. *type_tup, PyArray_Descr **out_dtypes)
  173. This function applies the default type resolution rules
  174. for the provided ufunc.
  175. Returns 0 on success, -1 on error.
  176. ::
  177. int
  178. PyUFunc_ValidateCasting(PyUFuncObject *ufunc, NPY_CASTING
  179. casting, PyArrayObject
  180. **operands, PyArray_Descr **dtypes)
  181. Validates that the input operands can be cast to
  182. the input types, and the output types can be cast to
  183. the output operands where provided.
  184. Returns 0 on success, -1 (with exception raised) on validation failure.
  185. ::
  186. int
  187. PyUFunc_RegisterLoopForDescr(PyUFuncObject *ufunc, PyArray_Descr
  188. *user_dtype, PyUFuncGenericFunction
  189. function, PyArray_Descr
  190. **arg_dtypes, void *data)