Search is not available for this dataset
repo_id
stringlengths
12
110
file_path
stringlengths
24
164
content
stringlengths
3
89.3M
__index_level_0__
int64
0
0
public_repos/datetime/numpy/core/src
public_repos/datetime/numpy/core/src/npymath/npy_math_common.h
/* * Common headers needed by every npy math compilation unit */ #include <Python.h> #include <math.h> #include <float.h> #include "npy_config.h" #include "numpy/npy_math.h"
0
public_repos/datetime/numpy/core/src
public_repos/datetime/numpy/core/src/umath/ufunc_object.c
/* * Python Universal Functions Object -- Math for all types, plus fast * arrays math * * Full description * * This supports mathematical (and Boolean) functions on arrays and other python * objects. Math on large arrays of basic C types is rather efficient. * * Travis E. Oliphant 2005, 2006 oliphant@ee.byu....
0
public_repos/datetime/numpy/core/src
public_repos/datetime/numpy/core/src/umath/umathmodule.c.src
/* -*- c -*- */ /* * vim:syntax=c */ /* ***************************************************************************** ** INCLUDES ** ***************************************************************************** */ /* * _UMATHMODULE IS needed in __...
0
public_repos/datetime/numpy/core/src
public_repos/datetime/numpy/core/src/umath/loops.c.src
/* -*- c -*- */ #define _UMATHMODULE #include "Python.h" #include "npy_config.h" #ifdef ENABLE_SEPARATE_COMPILATION #define PY_ARRAY_UNIQUE_SYMBOL _npy_umathmodule_ARRAY_API #define NO_IMPORT_ARRAY #endif #include "numpy/noprefix.h" #include "numpy/ufuncobject.h" #include "numpy/npy_math.h" #include "npy_3kcompat...
0
public_repos/datetime/numpy/core/src
public_repos/datetime/numpy/core/src/umath/funcs.inc.src
/* -*- c -*- */ /* * This file is for the definitions of the non-c99 functions used in ufuncs. * All the complex ufuncs are defined here along with a smattering of real and * object functions. */ #include "npy_3kcompat.h" /* ***************************************************************************** ** ...
0
public_repos/datetime/numpy/core/src
public_repos/datetime/numpy/core/src/umath/loops.h
/* ***************************************************************************** ** This file was autogenerated from a template DO NOT EDIT!!!! ** ** Changes should be made to the original source (.src) file ** ***************************************************************************** ...
0
public_repos/datetime/numpy/core/src
public_repos/datetime/numpy/core/src/umath/ufunc_object.h
#ifndef _NPY_UMATH_UFUNC_OBJECT_H_ #define _NPY_UMATH_UFUNC_OBJECT_H_ NPY_NO_EXPORT PyObject * ufunc_geterr(PyObject *NPY_UNUSED(dummy), PyObject *args); NPY_NO_EXPORT PyObject * ufunc_seterr(PyObject *NPY_UNUSED(dummy), PyObject *args); #endif
0
public_repos/datetime/numpy/core/src
public_repos/datetime/numpy/core/src/umath/umathmodule_onefile.c
#include "loops.c" #include "ufunc_object.c" #include "umathmodule.c"
0
public_repos/datetime/numpy/core/src
public_repos/datetime/numpy/core/src/umath/umath_tests.c.src
/* -*- c -*- */ /* ***************************************************************************** ** INCLUDES ** ***************************************************************************** */ #include "Python.h" #include "numpy/arrayobject.h" #include...
0
public_repos/datetime/numpy/core/src
public_repos/datetime/numpy/core/src/umath/loops.h.src
/* -*- c -*- */ /* * vim:syntax=c */ #ifndef _NPY_UMATH_LOOPS_H_ #define _NPY_UMATH_LOOPS_H_ #define BOOL_invert BOOL_logical_not #define BOOL_negative BOOL_logical_not #define BOOL_add BOOL_logical_or #define BOOL_bitwise_and BOOL_logical_and #define BOOL_bitwise_or BOOL_logical_or #define BOOL_bitwise_xor BOOL_lo...
0
public_repos/datetime/numpy/core/src
public_repos/datetime/numpy/core/src/private/npy_config.h
#ifndef _NPY_NPY_CONFIG_H_ #define _NPY_NPY_CONFIG_H_ #include "config.h" /* Disable broken MS math functions */ #if defined(_MSC_VER) || defined(__MINGW32_VERSION) #undef HAVE_ATAN2 #undef HAVE_HYPOT #endif /* Disable broken Sun Workshop Pro math functions */ #ifdef __SUNPRO_C #undef HAVE_ATAN2 #endif /* * On Ma...
0
public_repos/datetime/numpy/core/src
public_repos/datetime/numpy/core/src/private/npy_fpmath.h
#ifndef _NPY_NPY_FPMATH_H_ #define _NPY_NPY_FPMATH_H_ #include "npy_config.h" #include "numpy/npy_os.h" #include "numpy/npy_cpu.h" #include "numpy/npy_common.h" #ifdef NPY_OS_DARWIN /* This hardcoded logic is fragile, but universal builds makes it * difficult to detect arch-specific features */ /* MAC ...
0
public_repos/datetime/numpy/core/src
public_repos/datetime/numpy/core/src/private/npy_3kcompat.h
#ifndef _NPY_3KCOMPAT_H_ #define _NPY_3KCOMPAT_H_ #include <Python.h> #include <stdio.h> #include "npy_config.h" #include "numpy/npy_common.h" #include "numpy/ndarrayobject.h" /* * PyInt -> PyLong */ #if defined(NPY_PY3K) /* Return True only if the long fits in a C long */ static NPY_INLINE int PyInt_Check(PyObje...
0
public_repos/datetime/numpy/core/src
public_repos/datetime/numpy/core/src/multiarray/multiarraymodule_onefile.c
/* * This file includes all the .c files needed for a complete multiarray module. * This is used in the case where separate compilation is not enabled * * Note that the order of the includs matters */ #include "common.c" #include "scalartypes.c" #include "scalarapi.c" #include "datetime.c" #include "arraytypes....
0
public_repos/datetime/numpy/core/src
public_repos/datetime/numpy/core/src/multiarray/calculation.h
#ifndef _NPY_CALCULATION_H_ #define _NPY_CALCULATION_H_ NPY_NO_EXPORT PyObject* PyArray_ArgMax(PyArrayObject* self, int axis, PyArrayObject *out); NPY_NO_EXPORT PyObject* PyArray_ArgMin(PyArrayObject* self, int axis, PyArrayObject *out); NPY_NO_EXPORT PyObject* PyArray_Max(PyArrayObject* self, int axis, PyArrayObjec...
0
public_repos/datetime/numpy/core/src
public_repos/datetime/numpy/core/src/multiarray/descriptor.h
#ifndef _NPY_ARRAYDESCR_H_ #define _NPY_ARRAYDESCR_H_ NPY_NO_EXPORT PyObject *arraydescr_protocol_typestr_get(PyArray_Descr *); NPY_NO_EXPORT PyObject *arraydescr_protocol_descr_get(PyArray_Descr *self); NPY_NO_EXPORT PyObject * array_set_typeDict(PyObject *NPY_UNUSED(ignored), PyObject *args); NPY_NO_EXPORT PyArray...
0
public_repos/datetime/numpy/core/src
public_repos/datetime/numpy/core/src/multiarray/scalartypes.c.src
/* -*- c -*- */ #define PY_SSIZE_T_CLEAN #include "Python.h" #include "structmember.h" #ifndef _MULTIARRAYMODULE #define _MULTIARRAYMODULE #endif #define NPY_NO_PREFIX #include "numpy/arrayobject.h" #include "numpy/npy_math.h" #include "numpy/arrayscalars.h" #include "npy_3kcompat.h" #include "npy_config.h" #include...
0
public_repos/datetime/numpy/core/src
public_repos/datetime/numpy/core/src/multiarray/descriptor.c
/* Array Descr Object */ #define PY_SSIZE_T_CLEAN #include <Python.h> #include "structmember.h" #define _MULTIARRAYMODULE #define NPY_NO_PREFIX #include "numpy/arrayobject.h" #include "numpy/arrayscalars.h" #include "npy_config.h" #include "npy_3kcompat.h" #include "common.h" #define _chk_byteorder(arg) (arg == '...
0
public_repos/datetime/numpy/core/src
public_repos/datetime/numpy/core/src/multiarray/common.c
#define PY_SSIZE_T_CLEAN #include <Python.h> #define _MULTIARRAYMODULE #define NPY_NO_PREFIX #include "numpy/arrayobject.h" #include "npy_config.h" #include "npy_3kcompat.h" #include "usertypes.h" #include "common.h" #include "buffer.h" /* * new reference * doesn't alter refcount of chktype or mintype --- * unl...
0
public_repos/datetime/numpy/core/src
public_repos/datetime/numpy/core/src/multiarray/arraytypes.h
#ifndef _NPY_ARRAYTYPES_H_ #define _NPY_ARRAYTYPES_H_ #ifdef NPY_ENABLE_SEPARATE_COMPILATION extern NPY_NO_EXPORT PyArray_Descr LONGLONG_Descr; extern NPY_NO_EXPORT PyArray_Descr LONG_Descr; extern NPY_NO_EXPORT PyArray_Descr INT_Descr; #endif NPY_NO_EXPORT int set_typeinfo(PyObject *dict); #endif
0
public_repos/datetime/numpy/core/src
public_repos/datetime/numpy/core/src/multiarray/arrayobject.h
#ifndef _NPY_INTERNAL_ARRAYOBJECT_H_ #define _NPY_INTERNAL_ARRAYOBJECT_H_ #ifndef _MULTIARRAYMODULE #error You should not include this #endif NPY_NO_EXPORT PyObject * _strings_richcompare(PyArrayObject *self, PyArrayObject *other, int cmp_op, int rstrip); NPY_NO_EXPORT PyObject * array_richcompa...
0
public_repos/datetime/numpy/core/src
public_repos/datetime/numpy/core/src/multiarray/_datetime.h
#ifndef _NPY_PRIVATE__DATETIME_H_ #define _NPY_PRIVATE__DATETIME_H_ NPY_NO_EXPORT void PyArray_DatetimeToDatetimeStruct(npy_datetime val, NPY_DATETIMEUNIT fr, npy_datetimestruct *result); NPY_NO_EXPORT void PyArray_TimedeltaToTimedeltaStruct(npy_timedelta val, NPY_DATETIMEUNIT fr, ...
0
public_repos/datetime/numpy/core/src
public_repos/datetime/numpy/core/src/multiarray/testcalcs.py
from scipy import weave class YMD(object): year = 0 month = 0 days = 0 month_offset = [ [ 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365 ], [ 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366 ] ] days_in_month = [ [ 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 ], ...
0
public_repos/datetime/numpy/core/src
public_repos/datetime/numpy/core/src/multiarray/multiarraymodule.h
#ifndef _NPY_MULTIARRAY_H_ #define _NPY_MULTIARRAY_H_ #endif
0
public_repos/datetime/numpy/core/src
public_repos/datetime/numpy/core/src/multiarray/usertypes.c
/* Provide multidimensional arrays as a basic object type in python. Based on Original Numeric implementation Copyright (c) 1995, 1996, 1997 Jim Hugunin, hugunin@mit.edu with contributions from many Numeric Python developers 1995-2004 Heavily modified in 2005 with inspiration from Numarray by Travis ...
0
public_repos/datetime/numpy/core/src
public_repos/datetime/numpy/core/src/multiarray/calculation.c
#define PY_SSIZE_T_CLEAN #include <Python.h> #include "structmember.h" #define _MULTIARRAYMODULE #define NPY_NO_PREFIX #include "numpy/arrayobject.h" #include "npy_config.h" #include "npy_3kcompat.h" #include "common.h" #include "number.h" #include "calculation.h" /* FIXME: just remove _check_axis ? */ #define _c...
0
public_repos/datetime/numpy/core/src
public_repos/datetime/numpy/core/src/multiarray/flagsobject.c
/* Array Flags Object */ #define PY_SSIZE_T_CLEAN #include <Python.h> #include "structmember.h" #define _MULTIARRAYMODULE #define NPY_NO_PREFIX #include "numpy/arrayobject.h" #include "numpy/arrayscalars.h" #include "npy_config.h" #include "npy_3kcompat.h" #include "common.h" static int _IsContiguous(PyArrayObjec...
0
public_repos/datetime/numpy/core/src
public_repos/datetime/numpy/core/src/multiarray/convert.h
#ifndef _NPY_ARRAYOBJECT_CONVERT_H_ #define _NPY_ARRAYOBJECT_CONVERT_H_ #endif
0
public_repos/datetime/numpy/core/src
public_repos/datetime/numpy/core/src/multiarray/buffer.c
#define PY_SSIZE_T_CLEAN #include <Python.h> #include "structmember.h" #define _MULTIARRAYMODULE #define NPY_NO_PREFIX #include "numpy/arrayobject.h" #include "numpy/arrayscalars.h" #include "npy_config.h" #include "npy_3kcompat.h" #include "buffer.h" #include "numpyos.h" /*****************************************...
0
public_repos/datetime/numpy/core/src
public_repos/datetime/numpy/core/src/multiarray/getset.h
#ifndef _NPY_ARRAY_GETSET_H_ #define _NPY_ARRAY_GETSET_H_ #ifdef NPY_ENABLE_SEPARATE_COMPILATION extern NPY_NO_EXPORT PyGetSetDef array_getsetlist[]; #endif #endif
0
public_repos/datetime/numpy/core/src
public_repos/datetime/numpy/core/src/multiarray/shape.c
#define PY_SSIZE_T_CLEAN #include <Python.h> #include "structmember.h" #define _MULTIARRAYMODULE #define NPY_NO_PREFIX #include "numpy/arrayobject.h" #include "numpy/arrayscalars.h" #include "numpy/npy_math.h" #include "npy_config.h" #include "npy_3kcompat.h" #include "ctors.h" #include "shape.h" #define PyAO Py...
0
public_repos/datetime/numpy/core/src
public_repos/datetime/numpy/core/src/multiarray/arraytypes.c.src
/* -*- c -*- */ #define PY_SSIZE_T_CLEAN #include "Python.h" #include "datetime.h" #include "structmember.h" #define _MULTIARRAYMODULE #define NPY_NO_PREFIX #include "numpy/arrayobject.h" #include "numpy/arrayscalars.h" #include "npy_3kcompat.h" #include "numpy/npy_math.h" #include "common.h" #include "ctors.h" #in...
0
public_repos/datetime/numpy/core/src
public_repos/datetime/numpy/core/src/multiarray/multiarraymodule.c
/* Python Multiarray Module -- A useful collection of functions for creating and using ndarrays Original file Copyright (c) 1995, 1996, 1997 Jim Hugunin, hugunin@mit.edu Modified for numpy in 2005 Travis E. Oliphant oliphant@ee.byu.edu Brigham Young University */ /* $Id: multiarraymodule.c,v 1.36 20...
0
public_repos/datetime/numpy/core/src
public_repos/datetime/numpy/core/src/multiarray/conversion_utils.h
#ifndef _NPY_PRIVATE_CONVERSION_UTILS_H_ #define _NPY_PRIVATE_CONVERSION_UTILS_H_ NPY_NO_EXPORT int PyArray_Converter(PyObject *object, PyObject **address); NPY_NO_EXPORT int PyArray_OutputConverter(PyObject *object, PyArrayObject **address); NPY_NO_EXPORT int PyArray_IntpConverter(PyObject *obj, PyArray_Dims *seq);...
0
public_repos/datetime/numpy/core/src
public_repos/datetime/numpy/core/src/multiarray/datetime.c
#define PY_SSIZE_T_CLEAN #include <Python.h> #include <datetime.h> #include <time.h> #define _MULTIARRAYMODULE #define NPY_NO_PREFIX #include <numpy/ndarrayobject.h> #include "npy_config.h" #include "npy_3kcompat.h" #include "_datetime.h" /* For defaults and errors */ #define NPY_FR_ERR -1 /* Offset for number ...
0
public_repos/datetime/numpy/core/src
public_repos/datetime/numpy/core/src/multiarray/conversion_utils.c
#define PY_SSIZE_T_CLEAN #include <Python.h> #include "structmember.h" #define _MULTIARRAYMODULE #define NPY_NO_PREFIX #include "numpy/arrayobject.h" #include "numpy/arrayscalars.h" #include "npy_config.h" #include "npy_3kcompat.h" #include "common.h" #include "arraytypes.h" #include "conversion_utils.h" /********...
0
public_repos/datetime/numpy/core/src
public_repos/datetime/numpy/core/src/multiarray/ctors.h
#ifndef _NPY_ARRAY_CTORS_H_ #define _NPY_ARRAY_CTORS_H_ NPY_NO_EXPORT PyObject * PyArray_NewFromDescr(PyTypeObject *subtype, PyArray_Descr *descr, int nd, intp *dims, intp *strides, void *data, int flags, PyObject *obj); NPY_NO_EXPORT PyObject *PyArray_New(PyTypeObject *, int...
0
public_repos/datetime/numpy/core/src
public_repos/datetime/numpy/core/src/multiarray/methods.h
#ifndef _NPY_ARRAY_METHODS_H_ #define _NPY_ARRAY_METHODS_H_ #ifdef NPY_ENABLE_SEPARATE_COMPILATION extern NPY_NO_EXPORT PyMethodDef array_methods[]; #endif #endif
0
public_repos/datetime/numpy/core/src
public_repos/datetime/numpy/core/src/multiarray/methods.c
#define PY_SSIZE_T_CLEAN #include <stdarg.h> #include <Python.h> #include "structmember.h" #define _MULTIARRAYMODULE #define NPY_NO_PREFIX #include "numpy/arrayobject.h" #include "numpy/arrayscalars.h" #include "npy_config.h" #include "npy_3kcompat.h" #include "common.h" #include "ctors.h" #include "calculation.h" ...
0
public_repos/datetime/numpy/core/src
public_repos/datetime/numpy/core/src/multiarray/convert.c
#define PY_SSIZE_T_CLEAN #include <Python.h> #include "structmember.h" #define _MULTIARRAYMODULE #define NPY_NO_PREFIX #include "numpy/arrayobject.h" #include "numpy/arrayscalars.h" #include "npy_config.h" #include "npy_3kcompat.h" #include "arrayobject.h" #include "mapping.h" #include "convert.h" /*NUMPY_API * ...
0
public_repos/datetime/numpy/core/src
public_repos/datetime/numpy/core/src/multiarray/convert_datatype.c
#define PY_SSIZE_T_CLEAN #include <Python.h> #include "structmember.h" #define _MULTIARRAYMODULE #define NPY_NO_PREFIX #include "numpy/arrayobject.h" #include "numpy/arrayscalars.h" #include "npy_config.h" #include "npy_3kcompat.h" #include "common.h" #include "scalartypes.h" #include "mapping.h" #include "convert...
0
public_repos/datetime/numpy/core/src
public_repos/datetime/numpy/core/src/multiarray/refcount.c
/* * This module corresponds to the `Special functions for PyArray_OBJECT` * section in the numpy reference for C-API. */ #define PY_SSIZE_T_CLEAN #include <Python.h> #include "structmember.h" #define _MULTIARRAYMODULE #define NPY_NO_PREFIX #include "numpy/arrayobject.h" #include "numpy/arrayscalars.h" #include "...
0
public_repos/datetime/numpy/core/src
public_repos/datetime/numpy/core/src/multiarray/common.h
#ifndef _NPY_PRIVATE_COMMON_H_ #define _NPY_PRIVATE_COMMON_H_ #define error_converting(x) (((x) == -1) && PyErr_Occurred()) NPY_NO_EXPORT PyArray_Descr * _array_find_type(PyObject *op, PyArray_Descr *minitype, int max); NPY_NO_EXPORT PyArray_Descr * _array_small_type(PyArray_Descr *chktype, PyArray_Descr* mintype);...
0
public_repos/datetime/numpy/core/src
public_repos/datetime/numpy/core/src/multiarray/iterators.h
#ifndef _NPY_ARRAYITERATORS_H_ #define _NPY_ARRAYITERATORS_H_ NPY_NO_EXPORT intp parse_subindex(PyObject *op, intp *step_size, intp *n_steps, intp max); NPY_NO_EXPORT int parse_index(PyArrayObject *self, PyObject *op, intp *dimensions, intp *strides, intp *offset_ptr); NPY_NO_EXPORT PyObject *iter_subscr...
0
public_repos/datetime/numpy/core/src
public_repos/datetime/numpy/core/src/multiarray/number.c
#define PY_SSIZE_T_CLEAN #include <Python.h> #include "structmember.h" /*#include <stdio.h>*/ #define _MULTIARRAYMODULE #define NPY_NO_PREFIX #include "numpy/arrayobject.h" #include "npy_config.h" #include "npy_3kcompat.h" #include "number.h" /***********************************************************************...
0
public_repos/datetime/numpy/core/src
public_repos/datetime/numpy/core/src/multiarray/buffer.h
#ifndef _NPY_PRIVATE_BUFFER_H_ #define _NPY_PRIVATE_BUFFER_H_ #ifdef NPY_ENABLE_SEPARATE_COMPILATION extern NPY_NO_EXPORT PyBufferProcs array_as_buffer; #else NPY_NO_EXPORT PyBufferProcs array_as_buffer; #endif NPY_NO_EXPORT void _array_dealloc_buffer_info(PyArrayObject *self); NPY_NO_EXPORT PyArray_Descr* _descript...
0
public_repos/datetime/numpy/core/src
public_repos/datetime/numpy/core/src/multiarray/refcount.h
#ifndef _NPY_PRIVATE_REFCOUNT_H_ #define _NPY_PRIVATE_REFCOUNT_H_ NPY_NO_EXPORT void PyArray_Item_INCREF(char *data, PyArray_Descr *descr); NPY_NO_EXPORT void PyArray_Item_XDECREF(char *data, PyArray_Descr *descr); NPY_NO_EXPORT int PyArray_INCREF(PyArrayObject *mp); NPY_NO_EXPORT int PyArray_XDECREF(PyArrayObject ...
0
public_repos/datetime/numpy/core/src
public_repos/datetime/numpy/core/src/multiarray/numpyos.c
#define PY_SSIZE_T_CLEAN #include <Python.h> #include <locale.h> #include <stdio.h> #define _MULTIARRAYMODULE #define NPY_NO_PREFIX #include "numpy/arrayobject.h" #include "numpy/npy_math.h" #include "npy_config.h" #include "npy_3kcompat.h" /* * From the C99 standard, section 7.19.6: The exponent always contains ...
0
public_repos/datetime/numpy/core/src
public_repos/datetime/numpy/core/src/multiarray/numpymemoryview.c
/* * Simple PyMemoryView'ish object for Python 2.6 compatibility. * * On Python >= 2.7, we can use the actual PyMemoryView objects. * * Some code copied from the CPython implementation. */ #define PY_SSIZE_T_CLEAN #include <Python.h> #include "structmember.h" #define _MULTIARRAYMODULE #define NPY_NO_PREFIX #inc...
0
public_repos/datetime/numpy/core/src
public_repos/datetime/numpy/core/src/multiarray/ucsnarrow.c
#define PY_SSIZE_T_CLEAN #include <Python.h> #include <locale.h> #include <stdio.h> #define _MULTIARRAYMODULE #define NPY_NO_PREFIX #include "numpy/arrayobject.h" #include "numpy/npy_math.h" #include "npy_config.h" #include "npy_3kcompat.h" /* Functions only needed on narrow builds of Python for converting back...
0
public_repos/datetime/numpy/core/src
public_repos/datetime/numpy/core/src/multiarray/arrayobject.c
/* Provide multidimensional arrays as a basic object type in python. Based on Original Numeric implementation Copyright (c) 1995, 1996, 1997 Jim Hugunin, hugunin@mit.edu with contributions from many Numeric Python developers 1995-2004 Heavily modified in 2005 with inspiration from Numarray by Travis ...
0
public_repos/datetime/numpy/core/src
public_repos/datetime/numpy/core/src/multiarray/ctors.c
#define PY_SSIZE_T_CLEAN #include <Python.h> #include "structmember.h" #define _MULTIARRAYMODULE #define NPY_NO_PREFIX #include "numpy/arrayobject.h" #include "numpy/arrayscalars.h" #include "numpy/npy_math.h" #include "npy_config.h" #include "npy_3kcompat.h" #include "common.h" #include "ctors.h" #include "buff...
0
public_repos/datetime/numpy/core/src
public_repos/datetime/numpy/core/src/multiarray/ucsnarrow.h
#ifndef _NPY_UCSNARROW_H_ #define _NPY_UCSNARROW_H_ #ifdef Py_UNICODE_WIDE #error this should not be included if Py_UNICODE_WIDE is defined int int int; #endif NPY_NO_EXPORT int PyUCS2Buffer_FromUCS4(Py_UNICODE *ucs2, PyArray_UCS4 *ucs4, int ucs4length); NPY_NO_EXPORT int PyUCS2Buffer_AsUCS4(Py_UNICODE *ucs2, PyArra...
0
public_repos/datetime/numpy/core/src
public_repos/datetime/numpy/core/src/multiarray/iterators.c
#define PY_SSIZE_T_CLEAN #include <Python.h> #include "structmember.h" #define _MULTIARRAYMODULE #define NPY_NO_PREFIX #include "numpy/arrayobject.h" #include "numpy/arrayscalars.h" #include "npy_config.h" #include "npy_3kcompat.h" #include "arrayobject.h" #include "iterators.h" #include "ctors.h" #include "common....
0
public_repos/datetime/numpy/core/src
public_repos/datetime/numpy/core/src/multiarray/shape.h
#ifndef _NPY_ARRAY_SHAPE_H_ #define _NPY_ARRAY_SHAPE_H_ #endif
0
public_repos/datetime/numpy/core/src
public_repos/datetime/numpy/core/src/multiarray/multiarray_tests.c.src
#include <Python.h> #include "numpy/ndarrayobject.h" #include "npy_3kcompat.h" /* * TODO: * - Handle mode */ /**begin repeat * #type = double, int# * #typenum = NPY_DOUBLE, NPY_INT# */ static int copy_@type@(PyArrayIterObject *itx, PyArrayNeighborhoodIterObject *niterx, npy_intp *bounds, PyObj...
0
public_repos/datetime/numpy/core/src
public_repos/datetime/numpy/core/src/multiarray/item_selection.c
#define PY_SSIZE_T_CLEAN #include <Python.h> #include "structmember.h" #define _MULTIARRAYMODULE #define NPY_NO_PREFIX #include "numpy/arrayobject.h" #include "numpy/arrayscalars.h" #include "numpy/npy_math.h" #include "npy_config.h" #include "npy_3kcompat.h" #include "common.h" #include "ctors.h" #define PyAO Py...
0
public_repos/datetime/numpy/core/src
public_repos/datetime/numpy/core/src/multiarray/sequence.c
#define PY_SSIZE_T_CLEAN #include <Python.h> #include "structmember.h" #define _MULTIARRAYMODULE #define NPY_NO_PREFIX #include "numpy/arrayobject.h" #include "numpy/arrayscalars.h" #include "npy_config.h" #include "npy_3kcompat.h" #include "common.h" #include "mapping.h" #include "sequence.h" static int array_an...
0
public_repos/datetime/numpy/core/src
public_repos/datetime/numpy/core/src/multiarray/hashdescr.h
#ifndef _NPY_HASHDESCR_H_ #define _NPY_HASHDESCR_H_ NPY_NO_EXPORT long PyArray_DescrHash(PyObject* odescr); #endif
0
public_repos/datetime/numpy/core/src
public_repos/datetime/numpy/core/src/multiarray/numpymemoryview.h
#ifndef _NPY_PRIVATE_NUMPYMEMORYVIEW_H_ #define _NPY_PRIVATE_NUMPYMEMORYVIEW_H_ /* * Memoryview is introduced to 2.x series only in 2.7, so for supporting 2.6, * we need to have a minimal implementation here. */ #if (PY_VERSION_HEX >= 0x02060000) && (PY_VERSION_HEX < 0x02070000) typedef struct { PyObject_HEAD ...
0
public_repos/datetime/numpy/core/src
public_repos/datetime/numpy/core/src/multiarray/number.h
#ifndef _NPY_ARRAY_NUMBER_H_ #define _NPY_ARRAY_NUMBER_H_ typedef struct { PyObject *add; PyObject *subtract; PyObject *multiply; PyObject *divide; PyObject *remainder; PyObject *power; PyObject *square; PyObject *reciprocal; PyObject *ones_like; PyObject *sqrt; PyObject *ne...
0
public_repos/datetime/numpy/core/src
public_repos/datetime/numpy/core/src/multiarray/getset.c
/* Array Descr Object */ #define PY_SSIZE_T_CLEAN #include <Python.h> #include "structmember.h" #define _MULTIARRAYMODULE #define NPY_NO_PREFIX #include "numpy/arrayobject.h" #include "npy_config.h" #include "npy_3kcompat.h" #include "common.h" #include "scalartypes.h" #include "descriptor.h" #include "getset.h" ...
0
public_repos/datetime/numpy/core/src
public_repos/datetime/numpy/core/src/multiarray/hashdescr.c
#define PY_SSIZE_T_CLEAN #include <Python.h> #define _MULTIARRAYMODULE #include <numpy/ndarrayobject.h> #include "npy_config.h" #include "npy_3kcompat.h" #include "hashdescr.h" /* * How does this work ? The hash is computed from a list which contains all the * information specific to a type. The hard work is to b...
0
public_repos/datetime/numpy/core/src
public_repos/datetime/numpy/core/src/multiarray/numpyos.h
#ifndef _NPY_NUMPYOS_H_ #define _NPY_NUMPYOS_H_ NPY_NO_EXPORT char* NumPyOS_ascii_formatd(char *buffer, size_t buf_size, const char *format, double val, int decimal); NPY_NO_EXPORT char* NumPyOS_ascii_formatf(char *buffer, size_t buf_size, const char *...
0
public_repos/datetime/numpy/core/src
public_repos/datetime/numpy/core/src/multiarray/mapping.h
#ifndef _NPY_ARRAYMAPPING_H_ #define _NPY_ARRAYMAPPING_H_ #ifdef NPY_ENABLE_SEPARATE_COMPILATION extern NPY_NO_EXPORT PyMappingMethods array_as_mapping; #else NPY_NO_EXPORT PyMappingMethods array_as_mapping; #endif NPY_NO_EXPORT PyObject * array_big_item(PyArrayObject *self, intp i); NPY_NO_EXPORT Py_ssize_t array_l...
0
public_repos/datetime/numpy/core/src
public_repos/datetime/numpy/core/src/multiarray/sequence.h
#ifndef _NPY_ARRAY_SEQUENCE_H_ #define _NPY_ARRAY_SEQUENCE_H_ #ifdef NPY_ENABLE_SEPARATE_COMPILATION extern NPY_NO_EXPORT PySequenceMethods array_as_sequence; #else NPY_NO_EXPORT PySequenceMethods array_as_sequence; #endif #endif
0
public_repos/datetime/numpy/core/src
public_repos/datetime/numpy/core/src/multiarray/convert_datatype.h
#ifndef _NPY_ARRAY_CONVERT_DATATYPE_H_ #define _NPY_ARRAY_CONVERT_DATATYPE_H_ NPY_NO_EXPORT PyObject * PyArray_CastToType(PyArrayObject *mp, PyArray_Descr *at, int fortran); NPY_NO_EXPORT int PyArray_CastTo(PyArrayObject *out, PyArrayObject *mp); NPY_NO_EXPORT PyArray_VectorUnaryFunc * PyArray_GetCastFunc(PyArray_De...
0
public_repos/datetime/numpy/core/src
public_repos/datetime/numpy/core/src/multiarray/scalarapi.c
#define PY_SSIZE_T_CLEAN #include <Python.h> #include "structmember.h" #define _MULTIARRAYMODULE #define NPY_NO_PREFIX #include "numpy/arrayobject.h" #include "numpy/arrayscalars.h" #include "numpy/npy_math.h" #include "npy_config.h" #include "npy_3kcompat.h" #include "ctors.h" #include "descriptor.h" #include "sc...
0
public_repos/datetime/numpy/core/src
public_repos/datetime/numpy/core/src/multiarray/usertypes.h
#ifndef _NPY_PRIVATE_USERTYPES_H_ #define _NPY_PRIVATE_USERTYPES_H_ #ifdef NPY_ENABLE_SEPARATE_COMPILATION extern NPY_NO_EXPORT PyArray_Descr **userdescrs; #else NPY_NO_EXPORT PyArray_Descr **userdescrs; #endif NPY_NO_EXPORT void PyArray_InitArrFuncs(PyArray_ArrFuncs *f); NPY_NO_EXPORT int PyArray_RegisterCanCast(Py...
0
public_repos/datetime/numpy/core/src
public_repos/datetime/numpy/core/src/multiarray/scalartypes.h
#ifndef _NPY_SCALARTYPES_H_ #define _NPY_SCALARTYPES_H_ NPY_NO_EXPORT void initialize_numeric_types(void); NPY_NO_EXPORT void format_longdouble(char *buf, size_t buflen, longdouble val, unsigned int prec); #if PY_VERSION_HEX >= 0x02070000 NPY_NO_EXPORT void gentype_struct_free(PyObject *ptr); #else NPY_NO_EXPORT voi...
0
public_repos/datetime/numpy/core/src
public_repos/datetime/numpy/core/src/multiarray/mapping.c
#define PY_SSIZE_T_CLEAN #include <Python.h> #include "structmember.h" /*#include <stdio.h>*/ #define _MULTIARRAYMODULE #define NPY_NO_PREFIX #include "numpy/arrayobject.h" #include "npy_config.h" #include "npy_3kcompat.h" #include "common.h" #include "iterators.h" #include "mapping.h" #define SOBJ_NOTFANCY 0 #def...
0
public_repos/datetime/numpy/core
public_repos/datetime/numpy/core/code_generators/cversions.py
"""Simple script to compute the api hash of the current API as defined by numpy_api_order and ufunc_api_order.""" from os.path import join, dirname from genapi import fullapi_hash import numpy_api if __name__ == '__main__': curdir = dirname(__file__) print fullapi_hash(numpy_api.full_api)
0
public_repos/datetime/numpy/core
public_repos/datetime/numpy/core/code_generators/generate_ufunc_api.py
import os import genapi import numpy_api from genapi import \ TypeApi, GlobalVarApi, FunctionApi, BoolValuesApi h_template = r""" #ifdef _UMATHMODULE #ifdef NPY_ENABLE_SEPARATE_COMPILATION extern NPY_NO_EXPORT PyTypeObject PyUFunc_Type; #else NPY_NO_EXPORT PyTypeObject PyUFunc_Type; #endif %s #else #if d...
0
public_repos/datetime/numpy/core
public_repos/datetime/numpy/core/code_generators/numpy_api.py
"""Here we define the exported functions, types, etc... which need to be exported through a global C pointer. Each dictionary contains name -> index pair. Whenever you change one index, you break the ABI (and the ABI version number should be incremented). Whenever you add an item to one of the dict, the API needs to ...
0
public_repos/datetime/numpy/core
public_repos/datetime/numpy/core/code_generators/generate_umath.py
import os import re import struct import sys import textwrap sys.path.insert(0, os.path.dirname(__file__)) import ufunc_docstrings as docstrings sys.path.pop(0) Zero = "PyUFunc_Zero" One = "PyUFunc_One" None_ = "PyUFunc_None" # Sentinel value to specify that the loop for the given TypeDescription uses the # pointer ...
0
public_repos/datetime/numpy/core
public_repos/datetime/numpy/core/code_generators/ufunc_docstrings.py
# Docstrings for generated ufuncs docdict = {} def get(name): return docdict.get(name) def add_newdoc(place, name, doc): docdict['.'.join((place, name))] = doc add_newdoc('numpy.core.umath', 'absolute', """ Calculate the absolute value element-wise. Parameters ---------- x : array_like...
0
public_repos/datetime/numpy/core
public_repos/datetime/numpy/core/code_generators/cversions.txt
# hash below were defined from numpy_api_order.txt and ufunc_api_order.txt 0x00000001 = 603580d224763e58c5e7147f804dc0f5 0x00000002 = 8ecb29306758515ae69749c803a75da1 0x00000003 = bf22c0d05b31625d2a7015988d61ce5a # Starting from here, the hash is defined from numpy_api.full_api dict # version 4 added neighborhood itera...
0
public_repos/datetime/numpy/core
public_repos/datetime/numpy/core/code_generators/genapi.py
""" Get API information encoded in C files. See ``find_function`` for how functions should be formatted, and ``read_order`` for how the order of the functions should be specified. """ import sys, os, re try: import hashlib md5new = hashlib.md5 except ImportError: import md5 md5new = md5.new if sys.vers...
0
public_repos/datetime/numpy/core
public_repos/datetime/numpy/core/code_generators/generate_numpy_api.py
import os import genapi from genapi import \ TypeApi, GlobalVarApi, FunctionApi, BoolValuesApi import numpy_api h_template = r""" #ifdef _MULTIARRAYMODULE typedef struct { PyObject_HEAD npy_bool obval; } PyBoolScalarObject; #ifdef NPY_ENABLE_SEPARATE_COMPILATION extern NPY_NO_EXPORT PyTypeO...
0
public_repos/datetime/numpy/core
public_repos/datetime/numpy/core/tests/test_umath_complex.py
from numpy.testing import * import numpy.core.umath as ncu import numpy as np # TODO: branch cuts (use Pauli code) # TODO: conj 'symmetry' # TODO: FPU exceptions class TestCexp(object): def test_simple(self): check = check_complex_value f = np.exp yield check, f, 1, 0, np.exp(1), 0, False...
0
public_repos/datetime/numpy/core
public_repos/datetime/numpy/core/tests/test_shape_base.py
from numpy.testing import * from numpy.core import array, atleast_1d, atleast_2d, atleast_3d, vstack, \ hstack, newaxis class TestAtleast1d(TestCase): def test_0D_array(self): a = array(1); b = array(2); res=map(atleast_1d,[a,b]) desired = [array([1]),array([2])] assert_arra...
0
public_repos/datetime/numpy/core
public_repos/datetime/numpy/core/tests/test_blasdot.py
from numpy.core import zeros, float64 from numpy.testing import TestCase, assert_almost_equal from numpy.core.multiarray import inner as inner_ DECPREC = 14 class TestInner(TestCase): def test_vecself(self): """Ticket 844.""" # Inner product of a vector with itself segfaults or give meaningless ...
0
public_repos/datetime/numpy/core
public_repos/datetime/numpy/core/tests/test_unicode.py
import sys from numpy.testing import * from numpy.core import * from numpy.compat import asbytes # Guess the UCS length for this python interpreter if sys.version_info[0] >= 3: import array as _array ucs4 = (_array.array('u').itemsize == 4) def buffer_length(arr): if isinstance(arr, unicode): ...
0
public_repos/datetime/numpy/core
public_repos/datetime/numpy/core/tests/test_print.py
import numpy as np from numpy.testing import * import nose import locale import sys from StringIO import StringIO _REF = {np.inf: 'inf', -np.inf: '-inf', np.nan: 'nan'} def check_float_type(tp): for x in [0, 1,-1, 1e20] : assert_equal(str(tp(x)), str(float(x)), err_msg='Failed str f...
0
public_repos/datetime/numpy/core
public_repos/datetime/numpy/core/tests/test_regression.py
from StringIO import StringIO import pickle import sys import gc import copy from os import path from numpy.testing import * from numpy.testing.utils import _assert_valid_refcount from numpy.compat import asbytes, asunicode, asbytes_nested import numpy as np if sys.version_info[0] >= 3: import io StringIO = io...
0
public_repos/datetime/numpy/core
public_repos/datetime/numpy/core/tests/test_scalarmath.py
import sys from numpy.testing import * import numpy as np types = [np.bool_, np.byte, np.ubyte, np.short, np.ushort, np.intc, np.uintc, np.int_, np.uint, np.longlong, np.ulonglong, np.single, np.double, np.longdouble, np.csingle, np.cdouble, np.clongdouble] # This compares scalarmath agains...
0
public_repos/datetime/numpy/core
public_repos/datetime/numpy/core/tests/test_function_base.py
from numpy.testing import * from numpy import logspace, linspace class TestLogspace(TestCase): def test_basic(self): y = logspace(0,6) assert(len(y)==50) y = logspace(0,6,num=100) assert(y[-1] == 10**6) y = logspace(0,6,endpoint=0) assert(y[-1] < 10**6) y = ...
0
public_repos/datetime/numpy/core
public_repos/datetime/numpy/core/tests/test_multiarray.py
import tempfile import sys import os import numpy as np from numpy.testing import * from numpy.core import * from numpy.core.multiarray_tests import test_neighborhood_iterator, test_neighborhood_iterator_oob from numpy.compat import asbytes, getexception, strchar from test_print import in_foreign_locale class TestFl...
0
public_repos/datetime/numpy/core
public_repos/datetime/numpy/core/tests/test_records.py
from os import path import numpy as np from numpy.testing import * from numpy.compat import asbytes, asunicode class TestFromrecords(TestCase): def test_fromrecords(self): r = np.rec.fromrecords([[456, 'dbe', 1.2], [2, 'de', 1.3]], names='col1,col2,col3') assert_equal(r[...
0
public_repos/datetime/numpy/core
public_repos/datetime/numpy/core/tests/test_umath.py
import sys from numpy.testing import * import numpy.core.umath as ncu import numpy as np class TestDivision(TestCase): def test_division_int(self): # int division should follow Python x = np.array([5, 10, 90, 100, -5, -10, -90, -100, -120]) if 5 / 10 == 0.5: assert_equal(x / 1...
0
public_repos/datetime/numpy/core
public_repos/datetime/numpy/core/tests/test_getlimits.py
""" Test functions for limits module. """ from numpy.testing import * import numpy.lib try: reload(numpy.lib) except NameError: # Py3K import imp imp.reload(numpy.lib) from numpy.core import finfo, iinfo from numpy import single,double,longdouble import numpy as np ##################################...
0
public_repos/datetime/numpy/core
public_repos/datetime/numpy/core/tests/test_machar.py
from numpy.testing import * from numpy.core.machar import MachAr import numpy.core.numerictypes as ntypes from numpy import seterr, array class TestMachAr(TestCase): def _run_machar_highprec(self): # Instanciate MachAr instance with high enough precision to cause # underflow try: ...
0
public_repos/datetime/numpy/core
public_repos/datetime/numpy/core/tests/test_dtype.py
import numpy as np from numpy.testing import * class TestBuiltin(TestCase): def test_run(self): """Only test hash runs at all.""" for t in [np.int, np.float, np.complex, np.int32, np.str, np.object, np.unicode]: dt = np.dtype(t) hash(dt) class TestRecord(Tes...
0
public_repos/datetime/numpy/core
public_repos/datetime/numpy/core/tests/test_numerictypes.py
import sys from numpy.testing import * from numpy.compat import asbytes, asunicode import numpy as np # This is the structure of the table used for plain objects: # # +-+-+-+ # |x|y|z| # +-+-+-+ # Structure of a plain array description: Pdescr = [ ('x', 'i4', (2,)), ('y', 'f8', (2, 2)), ('z', 'u1')] # A ...
0
public_repos/datetime/numpy/core
public_repos/datetime/numpy/core/tests/test_defchararray.py
from numpy.testing import * from numpy.core import * import numpy as np import sys from numpy.core.multiarray import _vec_string from numpy.compat import asbytes, asbytes_nested kw_unicode_true = {'unicode': True} # make 2to3 work properly kw_unicode_false = {'unicode': False} class TestBasic(TestCase): def test...
0
public_repos/datetime/numpy/core
public_repos/datetime/numpy/core/tests/test_memmap.py
from tempfile import NamedTemporaryFile, mktemp import os import warnings from numpy import memmap from numpy import arange, allclose from numpy.testing import * class TestMemmap(TestCase): def setUp(self): self.tmpfp = NamedTemporaryFile(prefix='mmap') self.shape = (3,4) self.dtype = 'flo...
0
public_repos/datetime/numpy/core
public_repos/datetime/numpy/core/tests/test_datetime.py
from os import path import numpy as np from numpy.testing import * import datetime class TestDateTime(TestCase): def test_creation(self): for unit in ['Y', 'M', 'W', 'B', 'D', 'h', 'm', 's', 'ms', 'us', 'ns', 'ps', 'fs', 'as']: dt1 = np.dtype('M8[750%s]...
0
public_repos/datetime/numpy/core
public_repos/datetime/numpy/core/tests/test_errstate.py
# The following exec statement (or something like it) is needed to # prevent SyntaxError on Python < 2.5. Even though this is a test, # SyntaxErrors are not acceptable; on Debian systems, they block # byte-compilation during install and thus cause the package to fail # to install. import sys if sys.version_info[:2] >=...
0
public_repos/datetime/numpy/core
public_repos/datetime/numpy/core/tests/test_numeric.py
import sys from decimal import Decimal import numpy as np from numpy.core import * from numpy.random import rand, randint, randn from numpy.testing import * from numpy.core.multiarray import dot as dot_ class Vec: def __init__(self,sequence=None): if sequence is None: sequence=[] self....
0
public_repos/datetime/numpy/core
public_repos/datetime/numpy/core/tests/test_ufunc.py
import sys import numpy as np from numpy.testing import * import numpy.core.umath_tests as umt class TestUfunc(TestCase): def test_reduceat_shifting_sum(self) : L = 6 x = np.arange(L) idx = np.array(zip(np.arange(L-2), np.arange(L-2)+2)).ravel() assert_array_equal(np.add.reduceat(x...
0