numpy 2.0.0
src/umath/loops.c.src File Reference
#include "Python.h"
#include "npy_config.h"
#include "numpy/noprefix.h"
#include "numpy/ufuncobject.h"
#include "numpy/npy_math.h"
#include "numpy/halffloat.h"
#include "numpy/npy_3kcompat.h"
#include "ufunc_object.h"

Defines

#define _UMATHMODULE
#define NPY_NO_DEPRECATED_API
#define IS_BINARY_REDUCE
#define OUTPUT_LOOP
#define UNARY_LOOP
#define UNARY_LOOP_TWO_OUT
#define BINARY_LOOP
#define BINARY_REDUCE_LOOP_INNER
#define BINARY_REDUCE_LOOP(TYPE)
#define BINARY_LOOP_TWO_OUT
#define S   @@TYPE@_floor_divide @S@@TYPE@_divide
#define S   @@TYPE@_fmax @S@@TYPE@_maximum
#define S   @@TYPE@_fmin @S@@TYPE@_minimum
#define TYPE   @_true_divide @TYPE@_divide
#define _HALF_LOGICAL_AND(a, b)   (!npy_half_iszero(a) && !npy_half_iszero(b))
#define _HALF_LOGICAL_OR(a, b)   (!npy_half_iszero(a) || !npy_half_iszero(b))
#define HALF_true_divide   HALF_divide
#define CGE(xr, xi, yr, yi)
#define CLE(xr, xi, yr, yi)
#define CGT(xr, xi, yr, yi)
#define CLT(xr, xi, yr, yi)
#define CEQ(xr, xi, yr, yi)   (xr == yr && xi == yi)
#define CNE(xr, xi, yr, yi)   (xr != yr || xi != yi)
#define C   @TYPE@_true_divide C@TYPE@_divide

Typedefs

typedef float halfUnaryFunc (npy_half x)
typedef float floatUnaryFunc (float x)
typedef double doubleUnaryFunc (double x)
typedef longdouble longdoubleUnaryFunc (longdouble x)
typedef npy_half halfBinaryFunc (npy_half x, npy_half y)
typedef float floatBinaryFunc (float x, float y)
typedef double doubleBinaryFunc (double x, double y)
typedef longdouble longdoubleBinaryFunc (longdouble x, longdouble y)
typedef void cdoubleUnaryFunc (cdouble *x, cdouble *r)
typedef void cfloatUnaryFunc (cfloat *x, cfloat *r)
typedef void clongdoubleUnaryFunc (clongdouble *x, clongdouble *r)
typedef void cdoubleBinaryFunc (cdouble *x, cdouble *y, cdouble *r)
typedef void cfloatBinaryFunc (cfloat *x, cfloat *y, cfloat *r)
typedef void clongdoubleBinaryFunc (clongdouble *x, clongdouble *y, clongdouble *r)

Functions

NPY_NO_EXPORT void PyUFunc_e_e (char **args, npy_intp *dimensions, npy_intp *steps, void *func)
NPY_NO_EXPORT void PyUFunc_e_e_As_f_f (char **args, npy_intp *dimensions, npy_intp *steps, void *func)
NPY_NO_EXPORT void PyUFunc_e_e_As_d_d (char **args, npy_intp *dimensions, npy_intp *steps, void *func)
NPY_NO_EXPORT void PyUFunc_f_f (char **args, npy_intp *dimensions, npy_intp *steps, void *func)
NPY_NO_EXPORT void PyUFunc_f_f_As_d_d (char **args, npy_intp *dimensions, npy_intp *steps, void *func)
NPY_NO_EXPORT void PyUFunc_ee_e (char **args, npy_intp *dimensions, npy_intp *steps, void *func)
NPY_NO_EXPORT void PyUFunc_ee_e_As_ff_f (char **args, npy_intp *dimensions, npy_intp *steps, void *func)
NPY_NO_EXPORT void PyUFunc_ee_e_As_dd_d (char **args, npy_intp *dimensions, npy_intp *steps, void *func)
NPY_NO_EXPORT void PyUFunc_ff_f (char **args, npy_intp *dimensions, npy_intp *steps, void *func)
NPY_NO_EXPORT void PyUFunc_ff_f_As_dd_d (char **args, npy_intp *dimensions, npy_intp *steps, void *func)
NPY_NO_EXPORT void PyUFunc_d_d (char **args, npy_intp *dimensions, npy_intp *steps, void *func)
NPY_NO_EXPORT void PyUFunc_dd_d (char **args, npy_intp *dimensions, npy_intp *steps, void *func)
NPY_NO_EXPORT void PyUFunc_g_g (char **args, npy_intp *dimensions, npy_intp *steps, void *func)
NPY_NO_EXPORT void PyUFunc_gg_g (char **args, npy_intp *dimensions, npy_intp *steps, void *func)
NPY_NO_EXPORT void PyUFunc_F_F (char **args, npy_intp *dimensions, npy_intp *steps, void *func)
NPY_NO_EXPORT void PyUFunc_F_F_As_D_D (char **args, npy_intp *dimensions, npy_intp *steps, void *func)
NPY_NO_EXPORT void PyUFunc_FF_F (char **args, npy_intp *dimensions, npy_intp *steps, void *func)
NPY_NO_EXPORT void PyUFunc_FF_F_As_DD_D (char **args, npy_intp *dimensions, npy_intp *steps, void *func)
NPY_NO_EXPORT void PyUFunc_D_D (char **args, npy_intp *dimensions, npy_intp *steps, void *func)
NPY_NO_EXPORT void PyUFunc_DD_D (char **args, npy_intp *dimensions, npy_intp *steps, void *func)
NPY_NO_EXPORT void PyUFunc_G_G (char **args, npy_intp *dimensions, npy_intp *steps, void *func)
NPY_NO_EXPORT void PyUFunc_GG_G (char **args, npy_intp *dimensions, npy_intp *steps, void *func)
NPY_NO_EXPORT void PyUFunc_O_O (char **args, npy_intp *dimensions, npy_intp *steps, void *func)
NPY_NO_EXPORT void PyUFunc_O_O_method (char **args, npy_intp *dimensions, npy_intp *steps, void *func)
NPY_NO_EXPORT void PyUFunc_OO_O (char **args, npy_intp *dimensions, npy_intp *steps, void *func)
NPY_NO_EXPORT void PyUFunc_OO_O_method (char **args, npy_intp *dimensions, npy_intp *steps, void *func)
NPY_NO_EXPORT void PyUFunc_On_Om (char **args, npy_intp *dimensions, npy_intp *steps, void *func)
NPY_NO_EXPORT void BOOL_ kind (char **args, npy_intp *dimensions, npy_intp *steps, void *NPY_UNUSED(func))
NPY_NO_EXPORT void BOOL_logical_xor (char **args, npy_intp *dimensions, npy_intp *steps, void *NPY_UNUSED(func))
NPY_NO_EXPORT void BOOL_ones_like (char **args, npy_intp *dimensions, npy_intp *steps, void *NPY_UNUSED(data))
NPY_NO_EXPORT void S TYPE _ones_like (char **args, npy_intp *dimensions, npy_intp *steps, void *NPY_UNUSED(data))
NPY_NO_EXPORT void S TYPE _square (char **args, npy_intp *dimensions, npy_intp *steps, void *NPY_UNUSED(data))
NPY_NO_EXPORT void S TYPE _reciprocal (char **args, npy_intp *dimensions, npy_intp *steps, void *NPY_UNUSED(data))
NPY_NO_EXPORT void S TYPE _conjugate (char **args, npy_intp *dimensions, npy_intp *steps, void *NPY_UNUSED(func))
NPY_NO_EXPORT void S TYPE _negative (char **args, npy_intp *dimensions, npy_intp *steps, void *NPY_UNUSED(func))
NPY_NO_EXPORT void S TYPE _logical_not (char **args, npy_intp *dimensions, npy_intp *steps, void *NPY_UNUSED(func))
NPY_NO_EXPORT void S TYPE _invert (char **args, npy_intp *dimensions, npy_intp *steps, void *NPY_UNUSED(func))
NPY_NO_EXPORT void S TYPE _logical_xor (char **args, npy_intp *dimensions, npy_intp *steps, void *NPY_UNUSED(func))
NPY_NO_EXPORT void S TYPE _true_divide (char **args, npy_intp *dimensions, npy_intp *steps, void *NPY_UNUSED(func))
NPY_NO_EXPORT void S TYPE _power (char **args, npy_intp *dimensions, npy_intp *steps, void *NPY_UNUSED(func))
NPY_NO_EXPORT void S TYPE _fmod (char **args, npy_intp *dimensions, npy_intp *steps, void *NPY_UNUSED(func))
NPY_NO_EXPORT void U TYPE _absolute (char **args, npy_intp *dimensions, npy_intp *steps, void *NPY_UNUSED(func))
NPY_NO_EXPORT void U TYPE _sign (char **args, npy_intp *dimensions, npy_intp *steps, void *NPY_UNUSED(func))
NPY_NO_EXPORT void TYPE _divide (char **args, npy_intp *dimensions, npy_intp *steps, void *NPY_UNUSED(func))
NPY_NO_EXPORT void TYPE _remainder (char **args, npy_intp *dimensions, npy_intp *steps, void *NPY_UNUSED(func))
NPY_NO_EXPORT void TIMEDELTA_negative (char **args, npy_intp *dimensions, npy_intp *steps, void *NPY_UNUSED(func))
NPY_NO_EXPORT void TIMEDELTA_absolute (char **args, npy_intp *dimensions, npy_intp *steps, void *NPY_UNUSED(func))
NPY_NO_EXPORT void TIMEDELTA_sign (char **args, npy_intp *dimensions, npy_intp *steps, void *NPY_UNUSED(func))
NPY_NO_EXPORT void DATETIME_Mm_M_add (char **args, npy_intp *dimensions, npy_intp *steps, void *NPY_UNUSED(data))
NPY_NO_EXPORT void DATETIME_mM_M_add (char **args, npy_intp *dimensions, npy_intp *steps, void *NPY_UNUSED(func))
NPY_NO_EXPORT void TIMEDELTA_mm_m_add (char **args, npy_intp *dimensions, npy_intp *steps, void *NPY_UNUSED(func))
NPY_NO_EXPORT void DATETIME_Mm_M_subtract (char **args, npy_intp *dimensions, npy_intp *steps, void *NPY_UNUSED(func))
NPY_NO_EXPORT void DATETIME_MM_m_subtract (char **args, npy_intp *dimensions, npy_intp *steps, void *NPY_UNUSED(func))
NPY_NO_EXPORT void TIMEDELTA_mm_m_subtract (char **args, npy_intp *dimensions, npy_intp *steps, void *NPY_UNUSED(func))
NPY_NO_EXPORT void TIMEDELTA_mq_m_multiply (char **args, npy_intp *dimensions, npy_intp *steps, void *NPY_UNUSED(func))
NPY_NO_EXPORT void TIMEDELTA_qm_m_multiply (char **args, npy_intp *dimensions, npy_intp *steps, void *NPY_UNUSED(func))
NPY_NO_EXPORT void TIMEDELTA_md_m_multiply (char **args, npy_intp *dimensions, npy_intp *steps, void *NPY_UNUSED(func))
NPY_NO_EXPORT void TIMEDELTA_dm_m_multiply (char **args, npy_intp *dimensions, npy_intp *steps, void *NPY_UNUSED(func))
NPY_NO_EXPORT void TIMEDELTA_mq_m_divide (char **args, npy_intp *dimensions, npy_intp *steps, void *NPY_UNUSED(func))
NPY_NO_EXPORT void TIMEDELTA_md_m_divide (char **args, npy_intp *dimensions, npy_intp *steps, void *NPY_UNUSED(func))
NPY_NO_EXPORT void TIMEDELTA_mm_d_divide (char **args, npy_intp *dimensions, npy_intp *steps, void *NPY_UNUSED(func))
NPY_NO_EXPORT void TYPE _spacing (char **args, npy_intp *dimensions, npy_intp *steps, void *NPY_UNUSED(func))
NPY_NO_EXPORT void TYPE _copysign (char **args, npy_intp *dimensions, npy_intp *steps, void *NPY_UNUSED(func))
NPY_NO_EXPORT void TYPE _nextafter (char **args, npy_intp *dimensions, npy_intp *steps, void *NPY_UNUSED(func))
NPY_NO_EXPORT void TYPE _floor_divide (char **args, npy_intp *dimensions, npy_intp *steps, void *NPY_UNUSED(func))
NPY_NO_EXPORT void TYPE _modf (char **args, npy_intp *dimensions, npy_intp *steps, void *NPY_UNUSED(func))
NPY_NO_EXPORT void HALF_logical_xor (char **args, npy_intp *dimensions, npy_intp *steps, void *NPY_UNUSED(func))
NPY_NO_EXPORT void HALF_logical_not (char **args, npy_intp *dimensions, npy_intp *steps, void *NPY_UNUSED(func))
NPY_NO_EXPORT void HALF_spacing (char **args, npy_intp *dimensions, npy_intp *steps, void *NPY_UNUSED(func))
NPY_NO_EXPORT void HALF_copysign (char **args, npy_intp *dimensions, npy_intp *steps, void *NPY_UNUSED(func))
NPY_NO_EXPORT void HALF_nextafter (char **args, npy_intp *dimensions, npy_intp *steps, void *NPY_UNUSED(func))
NPY_NO_EXPORT void HALF_floor_divide (char **args, npy_intp *dimensions, npy_intp *steps, void *NPY_UNUSED(func))
NPY_NO_EXPORT void HALF_remainder (char **args, npy_intp *dimensions, npy_intp *steps, void *NPY_UNUSED(func))
NPY_NO_EXPORT void HALF_square (char **args, npy_intp *dimensions, npy_intp *steps, void *NPY_UNUSED(data))
NPY_NO_EXPORT void HALF_reciprocal (char **args, npy_intp *dimensions, npy_intp *steps, void *NPY_UNUSED(data))
NPY_NO_EXPORT void HALF_ones_like (char **args, npy_intp *dimensions, npy_intp *steps, void *NPY_UNUSED(data))
NPY_NO_EXPORT void HALF_conjugate (char **args, npy_intp *dimensions, npy_intp *steps, void *NPY_UNUSED(func))
NPY_NO_EXPORT void HALF_absolute (char **args, npy_intp *dimensions, npy_intp *steps, void *NPY_UNUSED(func))
NPY_NO_EXPORT void HALF_negative (char **args, npy_intp *dimensions, npy_intp *steps, void *NPY_UNUSED(func))
NPY_NO_EXPORT void HALF_sign (char **args, npy_intp *dimensions, npy_intp *steps, void *NPY_UNUSED(func))
NPY_NO_EXPORT void HALF_modf (char **args, npy_intp *dimensions, npy_intp *steps, void *NPY_UNUSED(func))
NPY_NO_EXPORT void C TYPE _multiply (char **args, npy_intp *dimensions, npy_intp *steps, void *NPY_UNUSED(func))
NPY_NO_EXPORT void C TYPE __arg (char **args, npy_intp *dimensions, npy_intp *steps, void *NPY_UNUSED(func))
NPY_NO_EXPORT void OBJECT_sign (char **args, npy_intp *dimensions, npy_intp *steps, void *NPY_UNUSED(func))

Define Documentation

#define _HALF_LOGICAL_AND (   a,
 
)    (!npy_half_iszero(a) && !npy_half_iszero(b))
end repeat*
#define _HALF_LOGICAL_OR (   a,
 
)    (!npy_half_iszero(a) || !npy_half_iszero(b))
#define _UMATHMODULE
#define BINARY_LOOP
Value:
char *ip1 = args[0], *ip2 = args[1], *op1 = args[2];\
    npy_intp is1 = steps[0], is2 = steps[1], os1 = steps[2];\
    npy_intp n = dimensions[0];\
    npy_intp i;\
    for(i = 0; i < n; i++, ip1 += is1, ip2 += is2, op1 += os1)

Referenced by _nextafter(), HALF_logical_xor(), HALF_nextafter(), PyUFunc_ee_e_As_dd_d(), PyUFunc_ee_e_As_ff_f(), PyUFunc_FF_F_As_DD_D(), TIMEDELTA_dm_m_multiply(), TIMEDELTA_md_m_multiply(), TIMEDELTA_mm_d_divide(), and TIMEDELTA_sign().

#define BINARY_LOOP_TWO_OUT
Value:
char *ip1 = args[0], *ip2 = args[1], *op1 = args[2], *op2 = args[3];\
    npy_intp is1 = steps[0], is2 = steps[1], os1 = steps[2], os2 = steps[3];\
    npy_intp n = dimensions[0];\
    npy_intp i;\
    for(i = 0; i < n; i++, ip1 += is1, ip2 += is2, op1 += os1, op2 += os2)
#define BINARY_REDUCE_LOOP (   TYPE)
Value:
char *iop1 = args[0]; \
    TYPE io1 = *(TYPE *)iop1; \
    BINARY_REDUCE_LOOP_INNER

Referenced by TIMEDELTA_dm_m_multiply().

#define BINARY_REDUCE_LOOP_INNER
Value:
char *ip2 = args[1]; \
    npy_intp is2 = steps[1]; \
    npy_intp n = dimensions[0]; \
    npy_intp i; \
    for(i = 0; i < n; i++, ip2 += is2)

Referenced by _nextafter().

#define C   @TYPE@_true_divide C@TYPE@_divide
end repeat1*
#define CEQ (   xr,
  xi,
  yr,
  yi 
)    (xr == yr && xi == yi)
#define CGE (   xr,
  xi,
  yr,
  yi 
)
Value:
((xr > yr && !npy_isnan(xi) && !npy_isnan(yi)) \
                          || (xr == yr && xi >= yi))

* COMPLEX LOOPS **

#define CGT (   xr,
  xi,
  yr,
  yi 
)
Value:
((xr > yr && !npy_isnan(xi) && !npy_isnan(yi)) \
                          || (xr == yr && xi > yi))
#define CLE (   xr,
  xi,
  yr,
  yi 
)
Value:
((xr < yr && !npy_isnan(xi) && !npy_isnan(yi)) \
                          || (xr == yr && xi <= yi))
#define CLT (   xr,
  xi,
  yr,
  yi 
)
Value:
((xr < yr && !npy_isnan(xi) && !npy_isnan(yi)) \
                          || (xr == yr && xi < yi))
#define CNE (   xr,
  xi,
  yr,
  yi 
)    (xr != yr || xi != yi)
#define HALF_true_divide   HALF_divide
#define IS_BINARY_REDUCE
Value:
((args[0] == args[2])\
        && (steps[0] == steps[2])\
        && (steps[0] == 0))

* UFUNC LOOPS **

Referenced by _nextafter(), and TIMEDELTA_dm_m_multiply().

#define NPY_NO_DEPRECATED_API
#define OUTPUT_LOOP
Value:
char *op1 = args[1];\
    npy_intp os1 = steps[1];\
    npy_intp n = dimensions[0];\
    npy_intp i;\
    for(i = 0; i < n; i++, op1 += os1)
#define S   @@TYPE@_fmax @S@@TYPE@_maximum

* INTEGER LOOPS

begin repeat
type = byte, short, int, long, longlong# TYPE = BYTE, SHORT, INT, LONG, LONGLONG# #ftype = float, float, double, double, double#
begin repeat1
both signed and unsigned integer types #s = , u# S = , U#
#define S   @@TYPE@_fmin @S@@TYPE@_minimum

* INTEGER LOOPS

begin repeat
type = byte, short, int, long, longlong# TYPE = BYTE, SHORT, INT, LONG, LONGLONG# #ftype = float, float, double, double, double#
begin repeat1
both signed and unsigned integer types #s = , u# S = , U#
#define S   @@TYPE@_floor_divide @S@@TYPE@_divide

* INTEGER LOOPS

begin repeat
type = byte, short, int, long, longlong# TYPE = BYTE, SHORT, INT, LONG, LONGLONG# #ftype = float, float, double, double, double#
begin repeat1
both signed and unsigned integer types #s = , u# S = , U#
#define TYPE   @_true_divide @TYPE@_divide

Referenced by suff().

#define UNARY_LOOP
Value:
char *ip1 = args[0], *op1 = args[1];\
    npy_intp is1 = steps[0], os1 = steps[1];\
    npy_intp n = dimensions[0];\
    npy_intp i;\
    for(i = 0; i < n; i++, ip1 += is1, op1 += os1)

Referenced by _power(), BOOL_logical_xor(), HALF_modf(), HALF_ones_like(), HALF_reciprocal(), HALF_remainder(), PyUFunc_D_D(), PyUFunc_DD_D(), PyUFunc_e_e(), PyUFunc_e_e_As_f_f(), PyUFunc_gg_g(), and TIMEDELTA_mq_m_multiply().

#define UNARY_LOOP_TWO_OUT
Value:
char *ip1 = args[0], *op1 = args[1], *op2 = args[2];\
    npy_intp is1 = steps[0], os1 = steps[1], os2 = steps[2];\
    npy_intp n = dimensions[0];\
    npy_intp i;\
    for(i = 0; i < n; i++, ip1 += is1, op1 += os1, op2 += os2)

Typedef Documentation

typedef void cdoubleBinaryFunc(cdouble *x, cdouble *y, cdouble *r)
typedef void cdoubleUnaryFunc(cdouble *x, cdouble *r)
System Message: SEVERE/4 (<string>, line 1)
Title overline & underline mismatch.

                          GENERIC COMPLEX LOOPS                           **
 
typedef void cfloatBinaryFunc(cfloat *x, cfloat *y, cfloat *r)
typedef void cfloatUnaryFunc(cfloat *x, cfloat *r)
typedef void clongdoubleBinaryFunc(clongdouble *x, clongdouble *y, clongdouble *r)
typedef void clongdoubleUnaryFunc(clongdouble *x, clongdouble *r)
typedef double doubleBinaryFunc(double x, double y)
typedef double doubleUnaryFunc(double x)
typedef float floatBinaryFunc(float x, float y)
typedef float floatUnaryFunc(float x)
typedef float halfUnaryFunc(npy_half x)
System Message: SEVERE/4 (<string>, line 1)
Title overline & underline mismatch.

                          GENERIC FLOAT LOOPS                             **
 
typedef longdouble longdoubleBinaryFunc(longdouble x, longdouble y)
typedef longdouble longdoubleUnaryFunc(longdouble x)

Function Documentation

NPY_NO_EXPORT void C TYPE __arg ( char **  args,
npy_intp dimensions,
npy_intp steps,
void *  NPY_UNUSEDfunc 
)
NPY_NO_EXPORT void C TYPE _absolute ( char **  args,
npy_intp dimensions,
npy_intp steps,
void *  NPY_UNUSEDfunc 
)
end repeat1*

add 0 to clear -0.0

NPY_NO_EXPORT void C TYPE _conjugate ( char **  args,
npy_intp dimensions,
npy_intp steps,
void *  NPY_UNUSEDfunc 
)
NPY_NO_EXPORT void TYPE _copysign ( char **  args,
npy_intp dimensions,
npy_intp steps,
void *  NPY_UNUSEDfunc 
)
NPY_NO_EXPORT void C TYPE _divide ( char **  args,
npy_intp dimensions,
npy_intp steps,
void *  NPY_UNUSEDfunc 
)

FIXME: On x86 at least, dividing the smallest representable integer by -1 causes a SIFGPE (division overflow). We treat this case here (to avoid a SIGFPE crash at python level), but a good solution would be to treat integer division problems separately from FPU exceptions (i.e. a different approach than npy_set_floatstatus_divbyzero()).
divide by zero should yield a complex inf or nan

NPY_NO_EXPORT void C TYPE _floor_divide ( char **  args,
npy_intp dimensions,
npy_intp steps,
void *  NPY_UNUSEDfunc 
)
end repeat1*
NPY_NO_EXPORT void S TYPE _fmod ( char **  args,
npy_intp dimensions,
npy_intp steps,
void *  NPY_UNUSEDfunc 
)

Referenced by _ctype_power().

NPY_NO_EXPORT void S TYPE _invert ( char **  args,
npy_intp dimensions,
npy_intp steps,
void *  NPY_UNUSEDfunc 
)
NPY_NO_EXPORT void C TYPE _logical_not ( char **  args,
npy_intp dimensions,
npy_intp steps,
void *  NPY_UNUSEDfunc 
)
NPY_NO_EXPORT void C TYPE _logical_xor ( char **  args,
npy_intp dimensions,
npy_intp steps,
void *  NPY_UNUSEDfunc 
)
end repeat2*
end repeat1*
NPY_NO_EXPORT void TYPE _modf ( char **  args,
npy_intp dimensions,
npy_intp steps,
void *  NPY_UNUSEDfunc 
)
NPY_NO_EXPORT void C TYPE _multiply ( char **  args,
npy_intp dimensions,
npy_intp steps,
void *  NPY_UNUSEDfunc 
)
end repeat1*
NPY_NO_EXPORT void TYPE _negative ( char **  args,
npy_intp dimensions,
npy_intp steps,
void *  NPY_UNUSEDfunc 
)
NPY_NO_EXPORT void TYPE _nextafter ( char **  args,
npy_intp dimensions,
npy_intp steps,
void *  NPY_UNUSEDfunc 
)
NPY_NO_EXPORT void TYPE _ones_like ( char **  args,
npy_intp dimensions,
npy_intp steps,
void *  NPY_UNUSEDdata 
)
begin repeat
type = datetime, timedelta# TYPE = DATETIME, TIMEDELTA#
NPY_NO_EXPORT void S TYPE _power ( char **  args,
npy_intp dimensions,
npy_intp steps,
void *  NPY_UNUSEDfunc 
)

References NPY_DATETIME_NAT, and UNARY_LOOP.

NPY_NO_EXPORT void C TYPE _reciprocal ( char **  args,
npy_intp dimensions,
npy_intp steps,
void *  NPY_UNUSEDdata 
)
NPY_NO_EXPORT void TYPE _remainder ( char **  args,
npy_intp dimensions,
npy_intp steps,
void *  NPY_UNUSEDfunc 
)

handle mixed case the way Python does

NPY_NO_EXPORT void C TYPE _sign ( char **  args,
npy_intp dimensions,
npy_intp steps,
void *  NPY_UNUSEDfunc 
)

Sign of nan is nan
fixme: sign of nan is currently 0

NPY_NO_EXPORT void TYPE _spacing ( char **  args,
npy_intp dimensions,
npy_intp steps,
void *  NPY_UNUSEDfunc 
)
end repeat1*
NPY_NO_EXPORT void C TYPE _square ( char **  args,
npy_intp dimensions,
npy_intp steps,
void *  NPY_UNUSEDdata 
)
end repeat1*
NPY_NO_EXPORT void S TYPE _true_divide ( char **  args,
npy_intp dimensions,
npy_intp steps,
void *  NPY_UNUSEDfunc 
)
end repeat2*
NPY_NO_EXPORT void BOOL_logical_xor ( char **  args,
npy_intp dimensions,
npy_intp steps,
void *  NPY_UNUSEDfunc 
)
end repeat*

References type(), and UNARY_LOOP.

NPY_NO_EXPORT void BOOL_ones_like ( char **  args,
npy_intp dimensions,
npy_intp steps,
void *  NPY_UNUSEDdata 
)
end repeat*

References type().

NPY_NO_EXPORT void DATETIME_Mm_M_add ( char **  args,
npy_intp dimensions,
npy_intp steps,
void *  NPY_UNUSEDdata 
)
end repeat1*
end repeat*
NPY_NO_EXPORT void DATETIME_mM_M_add ( char **  args,
npy_intp dimensions,
npy_intp steps,
void *  NPY_UNUSEDfunc 
)
NPY_NO_EXPORT void DATETIME_Mm_M_subtract ( char **  args,
npy_intp dimensions,
npy_intp steps,
void *  NPY_UNUSEDfunc 
)
NPY_NO_EXPORT void DATETIME_MM_m_subtract ( char **  args,
npy_intp dimensions,
npy_intp steps,
void *  NPY_UNUSEDfunc 
)
NPY_NO_EXPORT void HALF_absolute ( char **  args,
npy_intp dimensions,
npy_intp steps,
void *  NPY_UNUSEDfunc 
)
NPY_NO_EXPORT void HALF_conjugate ( char **  args,
npy_intp dimensions,
npy_intp steps,
void *  NPY_UNUSEDfunc 
)
NPY_NO_EXPORT void HALF_copysign ( char **  args,
npy_intp dimensions,
npy_intp steps,
void *  NPY_UNUSEDfunc 
)
NPY_NO_EXPORT void HALF_floor_divide ( char **  args,
npy_intp dimensions,
npy_intp steps,
void *  NPY_UNUSEDfunc 
)
end repeat*
NPY_NO_EXPORT void HALF_logical_not ( char **  args,
npy_intp dimensions,
npy_intp steps,
void *  NPY_UNUSEDfunc 
)
NPY_NO_EXPORT void HALF_logical_xor ( char **  args,
npy_intp dimensions,
npy_intp steps,
void *  NPY_UNUSEDfunc 
)
end repeat*

References BINARY_LOOP.

NPY_NO_EXPORT void HALF_modf ( char **  args,
npy_intp dimensions,
npy_intp steps,
void *  NPY_UNUSEDfunc 
)

References c, npy_atan2(), and UNARY_LOOP.

NPY_NO_EXPORT void HALF_negative ( char **  args,
npy_intp dimensions,
npy_intp steps,
void *  NPY_UNUSEDfunc 
)
NPY_NO_EXPORT void HALF_nextafter ( char **  args,
npy_intp dimensions,
npy_intp steps,
void *  NPY_UNUSEDfunc 
)

References BINARY_LOOP, c, npy_fabs(), and npy_floor().

NPY_NO_EXPORT void HALF_ones_like ( char **  args,
npy_intp dimensions,
npy_intp steps,
void *  NPY_UNUSEDdata 
)

References c, npy_fabs(), and UNARY_LOOP.

NPY_NO_EXPORT void HALF_reciprocal ( char **  args,
npy_intp dimensions,
npy_intp steps,
void *  NPY_UNUSEDdata 
)

References UNARY_LOOP.

NPY_NO_EXPORT void HALF_remainder ( char **  args,
npy_intp dimensions,
npy_intp steps,
void *  NPY_UNUSEDfunc 
)

References Bool, and UNARY_LOOP.

NPY_NO_EXPORT void HALF_sign ( char **  args,
npy_intp dimensions,
npy_intp steps,
void *  NPY_UNUSEDfunc 
)

Sign of nan is nan

NPY_NO_EXPORT void HALF_spacing ( char **  args,
npy_intp dimensions,
npy_intp steps,
void *  NPY_UNUSEDfunc 
)
end repeat*
NPY_NO_EXPORT void HALF_square ( char **  args,
npy_intp dimensions,
npy_intp steps,
void *  NPY_UNUSEDdata 
)

References Bool.

NPY_NO_EXPORT void OBJECT_ kind ( char **  args,
npy_intp dimensions,
npy_intp steps,
void *  NPY_UNUSEDfunc 
)

* BOOLEAN LOOPS **

begin repeat
kind = equal, not_equal, greater, greater_equal, less, less_equal# #OP = ==, !=, >, >=, <, <=#
end repeat*
begin repeat
kind = logical_and, logical_or# #OP = &&, ||# #SC = ==, !=#
begin repeat
kind = maximum, minimum# #OP = >, <#
end repeat*
begin repeat
kind = absolute, logical_not# #OP = !=, ==#
begin repeat2

Arithmetic kind = add, subtract, multiply, bitwise_and, bitwise_or, bitwise_xor,

System Message: ERROR/3 (<string>, line 4) Unexpected indentation.

<blockquote> left_shift, right_shift#</blockquote>

System Message: WARNING/2 (<string>, line 5) Block quote ends without a blank line; unexpected unindent.

#OP = +, -,*, &, |, ^, <<, >>#

System Message: WARNING/2 (<string>, line 5); backlink Inline substitution_reference start-string without end-string.
end repeat2*
begin repeat2
kind = equal, not_equal, greater, greater_equal, less, less_equal,
logical_and, logical_or#
System Message: WARNING/2 (<string>, line 4) Definition list ends without a blank line; unexpected unindent.

#OP = ==, !=, >, >=, <, <=, &&, ||#

begin repeat2
kind = maximum, minimum# #OP = >, <#
begin repeat1
kind = equal, not_equal, greater, greater_equal, less, less_equal# #OP = ==, !=, >, >=, <, <=#
end repeat1*
begin repeat1
kind = maximum, minimum# #OP = >, <#

* FLOAT LOOPS **

begin repeat
Float types
type = float, double, longdouble# TYPE = FLOAT, DOUBLE, LONGDOUBLE# c = f, , l# C = F, , L#
begin repeat1

Arithmetic # kind = add, subtract, multiply, divide# # OP = +, -, *, /#

System Message: WARNING/2 (<string>, line 2); backlink Inline emphasis start-string without end-string.
end repeat1*
begin repeat1
kind = equal, not_equal, less, less_equal, greater, greater_equal,
logical_and, logical_or#
System Message: WARNING/2 (<string>, line 4) Definition list ends without a blank line; unexpected unindent.

#OP = ==, !=, <, <=, >, >=, &&, ||#

begin repeat1
kind = isnan, isinf, isfinite, signbit# #func = npy_isnan, npy_isinf, npy_isfinite, npy_signbit#
begin repeat1
kind = maximum, minimum# #OP = >=, <=#
end repeat1*
begin repeat1
kind = fmax, fmin# #OP = >=, <=#
end repeat*

* HALF-FLOAT LOOPS **

begin repeat

Arithmetic # kind = add, subtract, multiply, divide# # OP = +, -, *, /#

System Message: WARNING/2 (<string>, line 2); backlink Inline emphasis start-string without end-string.
begin repeat
kind = equal, not_equal, less, less_equal, greater, greater_equal,
logical_and, logical_or#
System Message: WARNING/2 (<string>, line 4) Definition list ends without a blank line; unexpected unindent.

#OP = npy_half_eq, npy_half_ne, npy_half_lt, npy_half_le, npy_half_gt, npy_half_ge, _HALF_LOGICAL_AND, _HALF_LOGICAL_OR#

begin repeat
kind = isnan, isinf, isfinite, signbit# #func = npy_half_isnan, npy_half_isinf, npy_half_isfinite, npy_half_signbit#
begin repeat
kind = maximum, minimum# #OP = npy_half_ge, npy_half_le#
end repeat*
begin repeat
kind = fmax, fmin# #OP = npy_half_ge, npy_half_le#
begin repeat
complex types type = float, double, longdouble# TYPE = FLOAT, DOUBLE, LONGDOUBLE# c = f, , l# C = F, , L#
begin repeat1
arithmetic kind = add, subtract# #OP = +, -#
begin repeat1
kind= greater, greater_equal, less, less_equal, equal, not_equal# #OP = CGT, CGE, CLT, CLE, CEQ, CNE#
end repeat1*
begin repeat1
kind = logical_and, logical_or# #OP1 = ||, ||# #OP2 = &&, ||#
begin repeat1
kind = isnan, isinf, isfinite# #func = npy_isnan, npy_isinf, npy_isfinite# #OP = ||, ||, &&#
begin repeat1
kind = maximum, minimum# #OP = CGE, CLE#
end repeat1*
begin repeat1
kind = fmax, fmin# #OP = CGE, CLE#
end repeat*

* OBJECT LOOPS **

begin repeat
kind = equal, not_equal, greater, greater_equal, less, less_equal# #OP = EQ, NE, GT, GE, LT, LE#
end repeat*
begin repeat
kind = maximum, minimum# #OP = >, <#
end repeat*

* FLOAT LOOPS **

begin repeat
Float types
type = npy_half, float, double, longdouble# TYPE = HALF, FLOAT, DOUBLE, LONGDOUBLE# c = f, f, , l# C = F, F, , L#
begin repeat1

Arithmetic # kind = add, subtract, multiply, divide# # OP = +, -, *, /#

System Message: WARNING/2 (<string>, line 2); backlink Inline emphasis start-string without end-string.
begin repeat1
kind = isnan, isinf, isfinite, signbit, copysign, nextafter, spacing# #func = npy_isnan, npy_isinf, npy_isfinite, npy_signbit, npy_copysign, nextafter, spacing#
end repeat1*
begin repeat1
kind = maximum, minimum# #OP = >=, <=#

* OBJECT LOOPS **

begin repeat
kind = equal, not_equal, greater, greater_equal, less, less_equal# #OP = EQ, NE, GT, GE, LT, LE#

NPY_NO_EXPORT void OBJECT_sign ( char **  args,
npy_intp dimensions,
npy_intp steps,
void *  NPY_UNUSEDfunc 
)
end repeat*
NPY_NO_EXPORT void PyUFunc_D_D ( char **  args,
npy_intp dimensions,
npy_intp steps,
void *  func 
)

References UNARY_LOOP.

NPY_NO_EXPORT void PyUFunc_d_d ( char **  args,
npy_intp dimensions,
npy_intp steps,
void *  func 
)
NPY_NO_EXPORT void PyUFunc_DD_D ( char **  args,
npy_intp dimensions,
npy_intp steps,
void *  func 
)

References UNARY_LOOP.

NPY_NO_EXPORT void PyUFunc_dd_d ( char **  args,
npy_intp dimensions,
npy_intp steps,
void *  func 
)
NPY_NO_EXPORT void PyUFunc_e_e ( char **  args,
npy_intp dimensions,
npy_intp steps,
void *  func 
)
NPY_NO_EXPORT void PyUFunc_e_e_As_d_d ( char **  args,
npy_intp dimensions,
npy_intp steps,
void *  func 
)
NPY_NO_EXPORT void PyUFunc_e_e_As_f_f ( char **  args,
npy_intp dimensions,
npy_intp steps,
void *  func 
)
NPY_NO_EXPORT void PyUFunc_ee_e ( char **  args,
npy_intp dimensions,
npy_intp steps,
void *  func 
)
NPY_NO_EXPORT void PyUFunc_ee_e_As_dd_d ( char **  args,
npy_intp dimensions,
npy_intp steps,
void *  func 
)

References BINARY_LOOP.

NPY_NO_EXPORT void PyUFunc_ee_e_As_ff_f ( char **  args,
npy_intp dimensions,
npy_intp steps,
void *  func 
)

References BINARY_LOOP.

NPY_NO_EXPORT void PyUFunc_f_f ( char **  args,
npy_intp dimensions,
npy_intp steps,
void *  func 
)
NPY_NO_EXPORT void PyUFunc_F_F ( char **  args,
npy_intp dimensions,
npy_intp steps,
void *  func 
)
NPY_NO_EXPORT void PyUFunc_F_F_As_D_D ( char **  args,
npy_intp dimensions,
npy_intp steps,
void *  func 
)
NPY_NO_EXPORT void PyUFunc_f_f_As_d_d ( char **  args,
npy_intp dimensions,
npy_intp steps,
void *  func 
)
NPY_NO_EXPORT void PyUFunc_ff_f ( char **  args,
npy_intp dimensions,
npy_intp steps,
void *  func 
)
NPY_NO_EXPORT void PyUFunc_FF_F ( char **  args,
npy_intp dimensions,
npy_intp steps,
void *  func 
)
NPY_NO_EXPORT void PyUFunc_ff_f_As_dd_d ( char **  args,
npy_intp dimensions,
npy_intp steps,
void *  func 
)
NPY_NO_EXPORT void PyUFunc_FF_F_As_DD_D ( char **  args,
npy_intp dimensions,
npy_intp steps,
void *  func 
)

References BINARY_LOOP, and clongdouble.

NPY_NO_EXPORT void PyUFunc_G_G ( char **  args,
npy_intp dimensions,
npy_intp steps,
void *  func 
)
NPY_NO_EXPORT void PyUFunc_g_g ( char **  args,
npy_intp dimensions,
npy_intp steps,
void *  func 
)
NPY_NO_EXPORT void PyUFunc_GG_G ( char **  args,
npy_intp dimensions,
npy_intp steps,
void *  func 
)
NPY_NO_EXPORT void PyUFunc_gg_g ( char **  args,
npy_intp dimensions,
npy_intp steps,
void *  func 
)

References cdouble, and UNARY_LOOP.

NPY_NO_EXPORT void PyUFunc_O_O ( char **  args,
npy_intp dimensions,
npy_intp steps,
void *  func 
)
System Message: SEVERE/4 (<string>, line 1)
Title overline & underline mismatch.

                         GENERIC OBJECT lOOPS                             **
 

References PyUFunc_PyFuncData::callable, PyUFunc_PyFuncData::nin, PyUFunc_PyFuncData::nout, and NPY_MAXARGS.

NPY_NO_EXPORT void PyUFunc_O_O_method ( char **  args,
npy_intp dimensions,
npy_intp steps,
void *  func 
)
NPY_NO_EXPORT void PyUFunc_On_Om ( char **  args,
npy_intp dimensions,
npy_intp steps,
void *  func 
)
A general-purpose ufunc that deals with general-purpose Python callable. func is a structure with nin, nout, and a Python callable function
NPY_NO_EXPORT void PyUFunc_OO_O ( char **  args,
npy_intp dimensions,
npy_intp steps,
void *  func 
)
NPY_NO_EXPORT void PyUFunc_OO_O_method ( char **  args,
npy_intp dimensions,
npy_intp steps,
void *  func 
)
NPY_NO_EXPORT void TIMEDELTA_absolute ( char **  args,
npy_intp dimensions,
npy_intp steps,
void *  NPY_UNUSEDfunc 
)

References NPY_DATETIME_NAT, and timedelta.

NPY_NO_EXPORT void TIMEDELTA_dm_m_multiply ( char **  args,
npy_intp dimensions,
npy_intp steps,
void *  NPY_UNUSEDfunc 
)
NPY_NO_EXPORT void TIMEDELTA_md_m_divide ( char **  args,
npy_intp dimensions,
npy_intp steps,
void *  NPY_UNUSEDfunc 
)
NPY_NO_EXPORT void TIMEDELTA_md_m_multiply ( char **  args,
npy_intp dimensions,
npy_intp steps,
void *  NPY_UNUSEDfunc 
)

References BINARY_LOOP, c, and npy_nextafter().

NPY_NO_EXPORT void TIMEDELTA_mm_d_divide ( char **  args,
npy_intp dimensions,
npy_intp steps,
void *  NPY_UNUSEDfunc 
)

References BINARY_LOOP, c, and npy_fmod().

NPY_NO_EXPORT void TIMEDELTA_mm_m_add ( char **  args,
npy_intp dimensions,
npy_intp steps,
void *  NPY_UNUSEDfunc 
)
NPY_NO_EXPORT void TIMEDELTA_mm_m_subtract ( char **  args,
npy_intp dimensions,
npy_intp steps,
void *  NPY_UNUSEDfunc 
)
NPY_NO_EXPORT void TIMEDELTA_mq_m_divide ( char **  args,
npy_intp dimensions,
npy_intp steps,
void *  NPY_UNUSEDfunc 
)
Note: Assuming 'q' == NPY_LONGLONG
NPY_NO_EXPORT void TIMEDELTA_mq_m_multiply ( char **  args,
npy_intp dimensions,
npy_intp steps,
void *  NPY_UNUSEDfunc 
)
Note: Assuming 'q' == NPY_LONGLONG

References Bool, and UNARY_LOOP.

NPY_NO_EXPORT void TIMEDELTA_negative ( char **  args,
npy_intp dimensions,
npy_intp steps,
void *  NPY_UNUSEDfunc 
)
end repeat*

* DATETIME LOOPS **

References NPY_DATETIME_NAT.

NPY_NO_EXPORT void TIMEDELTA_qm_m_multiply ( char **  args,
npy_intp dimensions,
npy_intp steps,
void *  NPY_UNUSEDfunc 
)
Note: Assuming 'q' == NPY_LONGLONG
NPY_NO_EXPORT void TIMEDELTA_sign ( char **  args,
npy_intp dimensions,
npy_intp steps,
void *  NPY_UNUSEDfunc 
)

References BINARY_LOOP, and NPY_DATETIME_NAT.