numpy
2.0.0
|
#include <Python.h>
#include <numpy/arrayobject.h>
#include "npy_config.h"
#include "npy_pycompat.h"
#include "numpy/arrayscalars.h"
#include "lowlevel_strided_loops.h"
#include "_datetime.h"
#include "datetime_busday.h"
#include "datetime_busdaycal.h"
Defines | |
#define | PY_SSIZE_T_CLEAN |
#define | NPY_NO_DEPRECATED_API NPY_API_VERSION |
#define | _MULTIARRAYMODULE |
Functions | |
static int | get_day_of_week (npy_datetime date) |
static int | is_holiday (npy_datetime date, npy_datetime *holidays_begin, npy_datetime *holidays_end) |
static npy_datetime * | find_earliest_holiday_on_or_after (npy_datetime date, npy_datetime *holidays_begin, npy_datetime *holidays_end) |
static npy_datetime * | find_earliest_holiday_after (npy_datetime date, npy_datetime *holidays_begin, npy_datetime *holidays_end) |
static int | apply_business_day_roll (npy_datetime date, npy_datetime *out, int *out_day_of_week, NPY_BUSDAY_ROLL roll, npy_bool *weekmask, npy_datetime *holidays_begin, npy_datetime *holidays_end) |
static int | apply_business_day_offset (npy_datetime date, npy_int64 offset, npy_datetime *out, NPY_BUSDAY_ROLL roll, npy_bool *weekmask, int busdays_in_weekmask, npy_datetime *holidays_begin, npy_datetime *holidays_end) |
static int | apply_business_day_count (npy_datetime date_begin, npy_datetime date_end, npy_int64 *out, npy_bool *weekmask, int busdays_in_weekmask, npy_datetime *holidays_begin, npy_datetime *holidays_end) |
NPY_NO_EXPORT PyArrayObject * | business_day_offset (PyArrayObject *dates, PyArrayObject *offsets, PyArrayObject *out, NPY_BUSDAY_ROLL roll, npy_bool *weekmask, int busdays_in_weekmask, npy_datetime *holidays_begin, npy_datetime *holidays_end) |
NPY_NO_EXPORT PyArrayObject * | business_day_count (PyArrayObject *dates_begin, PyArrayObject *dates_end, PyArrayObject *out, npy_bool *weekmask, int busdays_in_weekmask, npy_datetime *holidays_begin, npy_datetime *holidays_end) |
NPY_NO_EXPORT PyArrayObject * | is_business_day (PyArrayObject *dates, PyArrayObject *out, npy_bool *weekmask, int busdays_in_weekmask, npy_datetime *holidays_begin, npy_datetime *holidays_end) |
static int | PyArray_BusDayRollConverter (PyObject *roll_in, NPY_BUSDAY_ROLL *roll) |
NPY_NO_EXPORT PyObject * | array_busday_offset (PyObject *NPY_UNUSED(self), PyObject *args, PyObject *kwds) |
NPY_NO_EXPORT PyObject * | array_busday_count (PyObject *NPY_UNUSED(self), PyObject *args, PyObject *kwds) |
NPY_NO_EXPORT PyObject * | array_is_busday (PyObject *NPY_UNUSED(self), PyObject *args, PyObject *kwds) |
#define _MULTIARRAYMODULE |
#define NPY_NO_DEPRECATED_API NPY_API_VERSION |
#define PY_SSIZE_T_CLEAN |
static int apply_business_day_count | ( | npy_datetime | date_begin, |
npy_datetime | date_end, | ||
npy_int64 * | out, | ||
npy_bool * | weekmask, | ||
int | busdays_in_weekmask, | ||
npy_datetime * | holidays_begin, | ||
npy_datetime * | holidays_end | ||
) | [static] |
References apply_business_day_offset(), PyArray_DatetimeMetaData::base, create_datetime_dtype(), NPY_DATETIME, NPY_FR_D, NPY_ITER_ALIGNED, NPY_ITER_ALLOCATE, NPY_ITER_BUFFERED, NPY_ITER_EXTERNAL_LOOP, NPY_ITER_READONLY, NPY_ITER_WRITEONLY, NPY_ITER_ZEROSIZE_OK, NPY_KEEPORDER, NPY_SAFE_CASTING, NPY_SUCCEED, NpyIter_Deallocate(), NpyIter_GetDataPtrArray(), NpyIter_GetInnerLoopSizePtr(), NpyIter_GetInnerStrideArray(), NpyIter_GetIterNext(), NpyIter_GetIterSize(), NpyIter_GetOperandArray(), NpyIter_MultiNew(), PyArray_DatetimeMetaData::num, and PyArray_DescrFromType().
Referenced by business_day_offset().
static int apply_business_day_offset | ( | npy_datetime | date, |
npy_int64 | offset, | ||
npy_datetime * | out, | ||
NPY_BUSDAY_ROLL | roll, | ||
npy_bool * | weekmask, | ||
int | busdays_in_weekmask, | ||
npy_datetime * | holidays_begin, | ||
npy_datetime * | holidays_end | ||
) | [static] |
References is_holiday().
Referenced by apply_business_day_count().
static int apply_business_day_roll | ( | npy_datetime | date, |
npy_datetime * | out, | ||
int * | out_day_of_week, | ||
NPY_BUSDAY_ROLL | roll, | ||
npy_bool * | weekmask, | ||
npy_datetime * | holidays_begin, | ||
npy_datetime * | holidays_end | ||
) | [static] |
NPY_NO_EXPORT PyObject* array_busday_count | ( | PyObject * | NPY_UNUSEDself, |
PyObject * | args, | ||
PyObject * | kwds | ||
) |
NPY_NO_EXPORT PyObject* array_busday_offset | ( | PyObject * | NPY_UNUSEDself, |
PyObject * | args, | ||
PyObject * | kwds | ||
) |
Referenced by _PyArray_SigintHandler().
NPY_NO_EXPORT PyObject* array_is_busday | ( | PyObject * | NPY_UNUSEDself, |
PyObject * | args, | ||
PyObject * | kwds | ||
) |
Referenced by _PyArray_GetSigintBuf().
NPY_NO_EXPORT PyArrayObject* business_day_count | ( | PyArrayObject * | dates_begin, |
PyArrayObject * | dates_end, | ||
PyArrayObject * | out, | ||
npy_bool * | weekmask, | ||
int | busdays_in_weekmask, | ||
npy_datetime * | holidays_begin, | ||
npy_datetime * | holidays_end | ||
) |
<blockquote> in which to place the resulting dates.</blockquote>
<blockquote> unit metadata, with any dates falling on a day of the week without weekmask[i] == 1 already filtered out.</blockquote>
NPY_NO_EXPORT PyArrayObject* business_day_offset | ( | PyArrayObject * | dates, |
PyArrayObject * | offsets, | ||
PyArrayObject * | out, | ||
NPY_BUSDAY_ROLL | roll, | ||
npy_bool * | weekmask, | ||
int | busdays_in_weekmask, | ||
npy_datetime * | holidays_begin, | ||
npy_datetime * | holidays_end | ||
) |
<blockquote> in which to place the resulting dates.</blockquote>
<blockquote> for non-business days.</blockquote>
<blockquote> unit metadata, with any dates falling on a day of the week without weekmask[i] == 1 already filtered out.</blockquote>
<blockquote>
</blockquote>
References apply_business_day_count(), PyArray_DatetimeMetaData::base, create_datetime_dtype(), NPY_DATETIME, NPY_FR_D, NPY_ITER_ALIGNED, NPY_ITER_ALLOCATE, NPY_ITER_BUFFERED, NPY_ITER_EXTERNAL_LOOP, NPY_ITER_READONLY, NPY_ITER_WRITEONLY, NPY_ITER_ZEROSIZE_OK, NPY_KEEPORDER, NPY_SAFE_CASTING, NPY_SUCCEED, NpyIter_Deallocate(), NpyIter_GetDataPtrArray(), NpyIter_GetInnerLoopSizePtr(), NpyIter_GetInnerStrideArray(), NpyIter_GetIterNext(), NpyIter_GetIterSize(), NpyIter_GetOperandArray(), NpyIter_MultiNew(), PyArray_DatetimeMetaData::num, and PyArray_DescrFromType().
static npy_datetime* find_earliest_holiday_after | ( | npy_datetime | date, |
npy_datetime * | holidays_begin, | ||
npy_datetime * | holidays_end | ||
) | [static] |
</blockquote>
static npy_datetime* find_earliest_holiday_on_or_after | ( | npy_datetime | date, |
npy_datetime * | holidays_begin, | ||
npy_datetime * | holidays_end | ||
) | [static] |
</blockquote>
static int get_day_of_week | ( | npy_datetime | date | ) | [static] |
NPY_NO_EXPORT PyArrayObject* is_business_day | ( | PyArrayObject * | dates, |
PyArrayObject * | out, | ||
npy_bool * | weekmask, | ||
int | busdays_in_weekmask, | ||
npy_datetime * | holidays_begin, | ||
npy_datetime * | holidays_end | ||
) |
<blockquote> in which to place the resulting dates.</blockquote>
<blockquote> unit metadata, with any dates falling on a day of the week without weekmask[i] == 1 already filtered out.</blockquote>
static int is_holiday | ( | npy_datetime | date, |
npy_datetime * | holidays_begin, | ||
npy_datetime * | holidays_end | ||
) | [static] |
Referenced by apply_business_day_offset().
static int PyArray_BusDayRollConverter | ( | PyObject * | roll_in, |
NPY_BUSDAY_ROLL * | roll | ||
) | [static] |