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/numpy-refactor/numpy/random | public_repos/numpy-refactor/numpy/random/mtrand/mtrand.pyx | # mtrad.pyx -- A Pyrex wrapper of Jean-Sebastien Roy's RandomKit
#
# Copyright 2005 Robert Kern (robert.kern@gmail.com)
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, ... | 0 |
public_repos/numpy-refactor/numpy/random | public_repos/numpy-refactor/numpy/random/mtrand/initarray.h | #include "randomkit.h"
#ifdef __cplusplus
extern "C" {
#endif
extern void
init_by_array(rk_state *self, unsigned long init_key[],
unsigned long key_length);
#ifdef __cplusplus
}
#endif | 0 |
public_repos/numpy-refactor/numpy/random | public_repos/numpy-refactor/numpy/random/mtrand/mtrand.vcxproj | <?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>... | 0 |
public_repos/numpy-refactor/numpy/random | public_repos/numpy-refactor/numpy/random/mtrand/mtrand.pyx.net | # mtrad.pyx -- A Pyrex wrapper of Jean-Sebastien Roy's RandomKit
#
# Copyright 2005 Robert Kern (robert.kern@gmail.com)
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, ... | 0 |
public_repos/numpy-refactor/numpy/random | public_repos/numpy-refactor/numpy/random/mtrand/mtrand.c | /* Generated by Cython 0.13 on Tue Nov 9 12:02:15 2010 */
#define PY_SSIZE_T_CLEAN
#include "Python.h"
#ifndef Py_PYTHON_H
#error Python headers needed to compile C extensions, please install development version of Python.
#else
#include <stddef.h> /* For offsetof */
#ifndef offsetof
#define offsetof(type, membe... | 0 |
public_repos/numpy-refactor/numpy/random | public_repos/numpy-refactor/numpy/random/mtrand/numpy.pxi | # :Author: Travis Oliphant
cdef extern from "npy_defs.h":
cdef enum NPY_TYPES:
NPY_LONG
NPY_DOUBLE
ctypedef int npy_intp
cdef extern from "npy_arrayobject.h":
ctypedef struct NpyArray:
char *data
int nd
npy_intp *dimensions
npy_intp *strides
... | 0 |
public_repos/numpy-refactor/numpy/random | public_repos/numpy-refactor/numpy/random/mtrand/distributions.h | /* Copyright 2005 Robert Kern (robert.kern@gmail.com)
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modif... | 0 |
public_repos/numpy-refactor/numpy/random | public_repos/numpy-refactor/numpy/random/mtrand/mtrand.cpp | /* Cython code section 'h_code' */
#define PY_LONG_LONG long long
using namespace System::Collections;
using namespace System::Numerics;
using namespace System::Reflection;
using namespace System::Runtime::CompilerServices;
using namespace System::Runtime;
using namespace System::Security::Permissions;
using namespa... | 0 |
public_repos/numpy-refactor/numpy/random | public_repos/numpy-refactor/numpy/random/mtrand/generate_mtrand_c.py | import re
import subprocess
def remove_long_path():
path = 'mtrand.c'
pat = re.compile(r'"[^"]*mtrand\.pyx"')
code = open(path).read()
code = pat.sub(r'"mtrand.pyx"', code)
open(path, 'w').write(code)
def main():
subprocess.check_call(['cython', 'mtrand.pyx'])
remove_long_path()
if __n... | 0 |
public_repos/numpy-refactor/numpy/random | public_repos/numpy-refactor/numpy/random/tests/test_random.py | from numpy.testing import *
from numpy import random
import numpy as np
class TestRegression(TestCase):
def test_VonMises_range(self):
"""Make sure generated random variables are in [-pi, pi].
Regression test for ticket #986.
"""
for mu in np.linspace(-7., 7., 5):
r = ... | 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/oldnumeric/rng.py | # This module re-creates the RNG interface from Numeric
# Replace import RNG with import numpy.oldnumeric.rng as RNG
#
# It is for backwards compatibility only.
__all__ = ['CreateGenerator','ExponentialDistribution','LogNormalDistribution',
'NormalDistribution', 'UniformDistribution', 'error', 'ranf',
... | 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/oldnumeric/mlab.py | # This module is for compatibility only. All functions are defined elsewhere.
__all__ = ['rand', 'tril', 'trapz', 'hanning', 'rot90', 'triu', 'diff', 'angle',
'roots', 'ptp', 'kaiser', 'randn', 'cumprod', 'diag', 'msort',
'LinearAlgebra', 'RandomArray', 'prod', 'std', 'hamming', 'flipud',
... | 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/oldnumeric/functions.py | # Functions that should behave the same as Numeric and need changing
import numpy as np
import numpy.core.multiarray as mu
import numpy.core.numeric as nn
from typeconv import convtypecode, convtypecode2
__all__ = ['take', 'repeat', 'sum', 'product', 'sometrue', 'alltrue',
'cumsum', 'cumproduct', 'compress... | 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/oldnumeric/user_array.py |
from numpy.oldnumeric import *
from numpy.lib.user_array import container as UserArray
import numpy.oldnumeric as nold
__all__ = nold.__all__[:]
__all__ += ['UserArray']
del nold
| 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/oldnumeric/matrix.py | # This module is for compatibility only.
__all__ = ['UserArray', 'squeeze', 'Matrix', 'asarray', 'dot', 'k', 'Numeric', 'LinearAlgebra', 'identity', 'multiply', 'types', 'string']
import types
from user_array import UserArray, asarray
import numpy.oldnumeric as Numeric
from numpy.oldnumeric import dot, identity, mult... | 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/oldnumeric/alter_code1.py | """
This module converts code written for Numeric to run with numpy
Makes the following changes:
* Changes import statements (warns of use of from Numeric import *)
* Changes import statements (using numerix) ...
* Makes search and replace changes to:
- .typecode()
- .iscontiguous()
- .byteswapped()
- .... | 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/oldnumeric/ma.py | """MA: a facility for dealing with missing observations
MA is generally used as a numpy.array look-alike.
by Paul F. Dubois.
Copyright 1999, 2000, 2001 Regents of the University of California.
Released for unlimited redistribution.
Adapted for numpy_core 2005 by Travis Oliphant and
(mainly) Paul Dubois.
"""
import ty... | 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/oldnumeric/misc.py | # Functions that already have the correct syntax or miscellaneous functions
__all__ = ['sort', 'copy_reg', 'clip', 'rank',
'sign', 'shape', 'types', 'allclose', 'size',
'choose', 'swapaxes', 'array_str',
'pi', 'math', 'concatenate', 'putmask', 'put',
'around', 'vdot', 'tran... | 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/oldnumeric/setup.py |
def configuration(parent_package='',top_path=None):
from numpy.distutils.misc_util import Configuration
config = Configuration('oldnumeric',parent_package,top_path)
config.add_data_dir('tests')
return config
if __name__ == '__main__':
from numpy.distutils.core import setup
setup(configuration=... | 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/oldnumeric/setupscons.py |
def configuration(parent_package='',top_path=None):
from numpy.distutils.misc_util import Configuration
return Configuration('oldnumeric',parent_package,top_path)
if __name__ == '__main__':
from numpy.distutils.core import setup
setup(configuration=configuration)
| 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/oldnumeric/fix_default_axis.py | """
This module adds the default axis argument to code which did not specify it
for the functions where the default was changed in NumPy.
The functions changed are
add -1 ( all second argument)
======
nansum
nanmax
nanmin
nanargmax
nanargmin
argmax
argmin
compress 3
add 0
======
take 3
repeat 3
sum #... | 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/oldnumeric/typeconv.py | __all__ = ['oldtype2dtype', 'convtypecode', 'convtypecode2', 'oldtypecodes']
import numpy as np
oldtype2dtype = {'1': np.dtype(np.byte),
's': np.dtype(np.short),
# 'i': np.dtype(np.intc),
# 'l': np.dtype(int),
# 'b': np.dtype(np.ubyte),
... | 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/oldnumeric/arrayfns.py | """Backward compatible with arrayfns from Numeric
"""
__all__ = ['array_set', 'construct3', 'digitize', 'error', 'find_mask',
'histogram', 'index_sort', 'interp', 'nz', 'reverse', 'span',
'to_corners', 'zmin_zmax']
import numpy as np
from numpy import asarray
class error(Exception):
pass
d... | 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/oldnumeric/precision.py | # Lifted from Precision.py. This is for compatibility only.
#
# The character strings are still for "new" NumPy
# which is the only Incompatibility with Numeric
__all__ = ['Character', 'Complex', 'Float',
'PrecisionError', 'PyObject', 'Int', 'UInt',
'UnsignedInt', 'UnsignedInteger', 'string',... | 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/oldnumeric/linear_algebra.py | """Backward compatible with LinearAlgebra from Numeric
"""
# This module is a lite version of the linalg.py module in SciPy which contains
# high-level Python interface to the LAPACK library. The lite version
# only accesses the following LAPACK functions: dgesv, zgesv, dgeev,
# zgeev, dgesdd, zgesdd, dgelsd, zgelsd, ... | 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/oldnumeric/ufuncs.py | __all__ = ['less', 'cosh', 'arcsinh', 'add', 'ceil', 'arctan2', 'floor_divide',
'fmod', 'hypot', 'logical_and', 'power', 'sinh', 'remainder', 'cos',
'equal', 'arccos', 'less_equal', 'divide', 'bitwise_or',
'bitwise_and', 'logical_xor', 'log', 'subtract', 'invert',
'negative',... | 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/oldnumeric/random_array.py | # Backward compatible module for RandomArray
__all__ = ['ArgumentError','F','beta','binomial','chi_square', 'exponential',
'gamma', 'get_seed', 'mean_var_test', 'multinomial',
'multivariate_normal', 'negative_binomial', 'noncentral_F',
'noncentral_chi_square', 'normal', 'permutation', ... | 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/oldnumeric/rng_stats.py |
__all__ = ['average', 'histogram', 'standardDeviation', 'variance']
import numpy.oldnumeric as Numeric
def average(data):
data = Numeric.array(data)
return Numeric.add.reduce(data)/len(data)
def variance(data):
data = Numeric.array(data)
return Numeric.add.reduce((data-average(data,axis=0))**2)/(len... | 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/oldnumeric/compat.py | # Compatibility module containing deprecated names
__all__ = ['NewAxis',
'UFuncType', 'UfuncType', 'ArrayType', 'arraytype',
'LittleEndian', 'arrayrange', 'matrixmultiply',
'array_constructor', 'pickle_array',
'DumpArray', 'LoadArray', 'multiarray',
# from cPickle... | 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/oldnumeric/array_printer.py |
__all__ = ['array2string']
from numpy import array2string as _array2string
def array2string(a, max_line_width=None, precision=None,
suppress_small=None, separator=' ',
array_output=0):
if array_output:
prefix="array("
style=repr
else:
prefix = ""
... | 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/oldnumeric/fft.py |
__all__ = ['fft', 'fft2d', 'fftnd', 'hermite_fft', 'inverse_fft',
'inverse_fft2d', 'inverse_fftnd',
'inverse_hermite_fft', 'inverse_real_fft',
'inverse_real_fft2d', 'inverse_real_fftnd',
'real_fft', 'real_fft2d', 'real_fftnd']
from numpy.fft import fft
from numpy.fft import... | 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/oldnumeric/alter_code2.py | """
This module converts code written for numpy.oldnumeric to work
with numpy
FIXME: Flesh this out.
Makes the following changes:
* Converts typecharacters '1swu' to 'bhHI' respectively
when used as typecodes
* Changes import statements
* Change typecode= to dtype=
* Eliminates savespace=xxx keyword arguments... | 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/oldnumeric/__init__.py | # Don't add these to the __all__ variable though
from numpy import *
def _move_axis_to_0(a, axis):
if axis == 0:
return a
n = len(a.shape)
if axis < 0:
axis += n
axes = range(1, axis+1) + [0,] + range(axis+1, n)
return transpose(a, axes)
# Add these
from compat import *
from functi... | 0 |
public_repos/numpy-refactor/numpy/oldnumeric | public_repos/numpy-refactor/numpy/oldnumeric/tests/test_regression.py | from numpy.testing import *
rlevel = 1
class TestRegression(TestCase):
def test_numeric_random(self, level=rlevel):
"""Ticket #552"""
from numpy.oldnumeric.random_array import randint
randint(0,50,[2,3])
| 0 |
public_repos/numpy-refactor/numpy/oldnumeric | public_repos/numpy-refactor/numpy/oldnumeric/tests/test_oldnumeric.py | import unittest
from numpy.testing import *
from numpy import array
from numpy.oldnumeric import *
from numpy.core.numeric import float32, float64, complex64, complex128, int8, \
int16, int32, int64, uint, uint8, uint16, uint32, uint64
class test_oldtypes(unittest.TestCase):
def test_oldtypes(self, level... | 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/core/numerictypes.py | """
numerictypes: Define the numeric type objects
This module is designed so "from numerictypes import \\*" is safe.
Exported symbols include:
Dictionary with all registered number types (including aliases):
typeDict
Type objects (not all will be available, depends on platform):
see variable sctypes fo... | 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/core/machar.py | """
Machine arithmetics - determine the parameters of the
floating-point arithmetic system
"""
# Author: Pearu Peterson, September 2003
__all__ = ['MachAr']
from numpy.core.fromnumeric import any
from numpy.core.numeric import seterr
# Need to speed this up...especially for longfloat
class MachAr(object):
"""
... | 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/core/setup.py | import imp
import os
import sys
import warnings
from os.path import dirname, exists, join, isdir
from distutils.dep_util import newer
from distutils.sysconfig import get_config_var
from numpy.distutils import log
from numpy.distutils.system_info import get_info
from setup_common import is_released
# XXX: ugly, we u... | 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/core/_internal.py | #A place for code to be called from C-code
# that implements more complicated stuff.
import re
import sys
import warnings
from numpy.compat import asbytes, bytes
if (sys.byteorder == 'little'):
_nbo = asbytes('<')
else:
_nbo = asbytes('>')
def _makenames_list(adict):
from numpy.core import dtype
al... | 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/core/setupscons.py | import os
import sys
import glob
from os.path import join, basename
from numpy.distutils import log
from numscons import get_scons_build_dir
def configuration(parent_package='',top_path=None):
from numpy.distutils.misc_util import Configuration,dot_join
from numpy.distutils.command.scons import get_scons_pkg... | 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/core/info.py | __doc__ = """Defines a multi-dimensional array and useful procedures for Numerical computation.
Functions
- array - NumPy Array construction
- zeros - Return an array of all zeros
- empty - Return an unitialized array
- shape ... | 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/core/shape_base.py | __all__ = ['atleast_1d','atleast_2d','atleast_3d','vstack','hstack']
import numeric as _nx
from numeric import array, asanyarray, newaxis
def atleast_1d(*arys):
"""
Convert inputs to arrays with at least one dimension.
Scalar inputs are converted to 1-dimensional arrays, whilst
higher-dimensional inp... | 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/core/umath_clr.py |
import sys
if sys.platform == 'cli':
import clr
import math
clr.AddReference("NumpyDotNet")
import NumpyDotNet
NumpyDotNet.umath.__init__()
pi = math.pi
e = math.e
from NumpyDotNet.umath import *
| 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/core/defchararray.py | """
This module contains a set of functions for vectorized string
operations and methods.
.. note::
The `chararray` class exists for backwards compatibility with
Numarray, it is not recommended for new development. Starting from numpy
1.4, if one needs arrays of strings, it is recommended to use arrays of
... | 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/core/records.py | """
Record Arrays
=============
Record arrays expose the fields of structured arrays as properties.
Most commonly, ndarrays contain elements of a single type, e.g. floats, integers,
bools etc. However, it is possible for elements to be combinations of these,
such as::
>>> a = np.array([(1, 2.0), (1, 2.0)], dtype=[... | 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/core/numeric.py | import sys
import warnings
__all__ = ['newaxis', 'ndarray', 'flatiter', 'ufunc',
'arange', 'array', 'zeros', 'empty', 'broadcast', 'dtype',
'fromstring', 'fromfile', 'frombuffer',
'int_asbuffer', 'where', 'argwhere',
'concatenate', 'fastCopyAndTranspose', 'lexsort',
... | 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/core/memmap.py | import sys
import warnings
__all__ = ['memmap']
if sys.platform == 'cli':
from numeric import ndarray, dtype
uint8 = None
else:
from numeric import uint8, ndarray, dtype
from numpy.compat import asbytes
dtypedescr = dtype
valid_filemodes = ["r", "c", "r+", "w+"]
writeable_filemodes = ["r+","w+"]
mode_e... | 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/core/multiarray_clr.py |
import sys
if sys.platform == 'cli':
import clr
clr.AddReference("NumpyDotNet");
from NumpyDotNet import *
ModuleMethods.__init__()
from NumpyDotNet.ModuleMethods import *
import NumpyDotNet.ModuleMethods as NDNMM
typeinfo = NDNMM.typeinfo
_flagdict = NDNMM._flagdict
| 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/core/fromnumeric.py | import sys
# Module containing non-deprecated functions borrowed from Numeric.
__docformat__ = "restructuredtext en"
# functions that are now methods
__all__ = ['take', 'reshape', 'choose', 'repeat', 'put',
'swapaxes', 'transpose', 'sort', 'argsort', 'argmax', 'argmin',
'searchsorted', 'alen',
... | 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/core/function_base.py | __all__ = ['logspace', 'linspace']
import numeric as _nx
from numeric import array
def linspace(start, stop, num=50, endpoint=True, retstep=False):
"""
Return evenly spaced numbers over a specified interval.
Returns `num` evenly spaced samples, calculated over the
interval [`start`, `stop` ].
Th... | 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/core/mlib.ini.in | [meta]
Name = mlib
Description = Math library used with this version of numpy
Version = 1.0
[default]
Libs=@posix_mathlib@
Cflags=
[msvc]
Libs=@msvc_mathlib@
Cflags=
| 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/core/SConscript | import os
import sys
from os.path import join as pjoin
from numscons import get_pythonlib_dir
from numscons import GetNumpyEnvironment
from numscons import CheckCBLAS
from numscons import write_info
from code_generators.numpy_api import \
multiarray_api as multiarray_api_dict, \
ufunc_api as ufunc_api_dict
f... | 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/core/scons_support.py | """Code to support special facilities to scons which are only useful for
numpy.core, hence not put into numpy.distutils.scons"""
import sys
import os
from os.path import join as pjoin, dirname as pdirname, basename as pbasename
from copy import deepcopy
import code_generators
from code_generators.generate_numpy_api ... | 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/core/SConstruct | from numscons import GetInitEnvironment
GetInitEnvironment(ARGUMENTS).DistutilsSConscript('SConscript')
| 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/core/arrayprint.py | """Array printing function
$Id: arrayprint.py,v 1.9 2005/09/13 13:58:44 teoliphant Exp $
"""
__all__ = ["array2string", "set_printoptions", "get_printoptions"]
__docformat__ = 'restructuredtext'
#
# Written by Konrad Hinsen <hinsenk@ere.umontreal.ca>
# last revision: 1996-3-13
# modified by Jim Hugunin 1997-3-3 for r... | 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/core/__init__.py | import sys
from info import __doc__
from numpy.version import version as __version__
import multiarray
import umath
import _internal # for freeze programs
import numerictypes as nt
multiarray.set_typeDict(nt.sctypeDict)
if sys.platform == 'cli':
multiarray.InitializeScalars()
else:
import _sort
from numeri... | 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/core/getlimits.py | """ Machine limits for Float32 and Float64 and (long double) if available...
"""
__all__ = ['finfo','iinfo']
from machar import MachAr
import numeric
import numerictypes as ntypes
from numeric import array
def _frz(a):
"""fix rank-0 --> rank-1"""
if a.ndim == 0: a.shape = (1,)
return a
_convert_to_float... | 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/core/setup_common.py | # Code shared by distutils and scons builds
import sys
from os.path import join
import warnings
#-------------------
# Versioning support
#-------------------
# How to change C_API_VERSION ?
# - increase C_API_VERSION value
# - record the hash for the new C API with the script cversions.py
# and add the hash to ... | 0 |
public_repos/numpy-refactor/numpy/core/include | public_repos/numpy-refactor/numpy/core/include/numpy/arrayobject.h | #ifndef _ARRAYOBJECT_H_
#define _ARRAYOBJECT_H_
/* This expects the following variables to be defined (besides
the usual ones from pyconfig.h
NPY_SIZEOF_LONG_DOUBLE -- sizeof(long double) or sizeof(double) if no
long double is present on platform.
CHAR_BIT -- number... | 0 |
public_repos/numpy-refactor/numpy/core/include | public_repos/numpy-refactor/numpy/core/include/numpy/oldnumeric.h | #include "arrayobject.h"
#ifndef REFCOUNT
# define REFCOUNT NPY_REFCOUNT
# define MAX_ELSIZE 16
#endif
#define PyArray_UNSIGNED_TYPES
#define PyArray_SBYTE PyArray_BYTE
#define PyArray_CopyArray PyArray_CopyInto
#define _PyArray_multiply_list PyArray_MultiplyIntList
#define PyArray_ISSPACESAVER(m) NPY_FALSE
#define... | 0 |
public_repos/numpy-refactor/numpy/core/include | public_repos/numpy-refactor/numpy/core/include/numpy/arrayscalars.h | #ifndef _NPY_ARRAYSCALARS_H_
#define _NPY_ARRAYSCALARS_H_
#include "npy_api.h"
#include "npy_descriptor.h"
#include "ndarraytypes.h"
#ifndef _MULTIARRAYMODULE
typedef struct {
PyObject_HEAD
npy_bool obval;
} PyBoolScalarObject;
#endif
typedef struct {
PyObject_HEAD
signed char obval;... | 0 |
public_repos/numpy-refactor/numpy/core/include | public_repos/numpy-refactor/numpy/core/include/numpy/interrupt.h | /* Signal handling:
This header file defines macros that allow your code to handle
interrupts received during processing. Interrupts that
could reasonably be handled:
SIGINT, SIGABRT, SIGALRM, SIGSEGV
****Warning***************
Do not allow code that creates temporary memory or increases reference
counts of Python... | 0 |
public_repos/numpy-refactor/numpy/core/include | public_repos/numpy-refactor/numpy/core/include/numpy/npy_3kcompat.h | /*
* This is a convenience header file providing compatibility utilities
* for supporting Python 2 and Python 3 in the same code base.
*
* If you want to use this for your own projects, it's recommended to make a
* copy of it. Although the stuff below is unlikely to change, we don't provide
* strong backwards com... | 0 |
public_repos/numpy-refactor/numpy/core/include | public_repos/numpy-refactor/numpy/core/include/numpy/ufuncobject.h | #ifndef _UFUNCOBJECT_H_
#define _UFUNCOBJECT_H_
#include "npy_defs.h"
#include "npy_ufunc_object.h"
#ifdef __cplusplus
extern "C" {
#endif
extern PyTypeObject PyUFunc_Type;
typedef struct {
PyObject_HEAD
int magic_number;
struct NpyUFuncObject *ufunc;
PyObject *func_obj; /* Used for managin... | 0 |
public_repos/numpy-refactor/numpy/core/include | public_repos/numpy-refactor/numpy/core/include/numpy/noprefix.h | #ifndef _NOPREFIX_H_
#define _NOPREFIX_H_
/* You can directly include noprefix.h as a backward
compatibility measure*/
#ifndef NPY_NO_PREFIX
#include "ndarrayobject.h"
#endif
#define MAX_DIMS NPY_MAXDIMS
#define longlong npy_longlong
#define ulonglong npy_ulonglong
#define Bool npy_bool
#define longdoubl... | 0 |
public_repos/numpy-refactor/numpy/core/include | public_repos/numpy-refactor/numpy/core/include/numpy/ndarraytypes.h | #ifndef _NDARRAYTYPES_H_
#define _NDARRAYTYPES_H_
#include <assert.h>
#include <Python.h>
/* This is auto-generated by the installer */
#include "numpyconfig.h"
#include "npy_api.h"
#include "npy_utils.h"
#include "npy_arrayobject.h"
#define NPY_NO_EXPORT NPY_VISIBILITY_HIDDEN
/* Only use thread if configured in... | 0 |
public_repos/numpy-refactor/numpy/core/include | public_repos/numpy-refactor/numpy/core/include/numpy/old_defines.h | #define NDARRAY_VERSION NPY_VERSION
#define PyArray_MIN_BUFSIZE NPY_MIN_BUFSIZE
#define PyArray_MAX_BUFSIZE NPY_MAX_BUFSIZE
#define PyArray_BUFSIZE NPY_BUFSIZE
#define PyArray_PRIORITY NPY_PRIORITY
#define PyArray_SUBTYPE_PRIORITY NPY_SUBTYPE_PRIORITY
#define PyArray_NUM_FLOATTYPE NPY_NUM_FLOATTYPE
#define NPY_MAX P... | 0 |
public_repos/numpy-refactor/numpy/core/include | public_repos/numpy-refactor/numpy/core/include/numpy/ndarrayobject.h | /*
* DON'T INCLUDE THIS DIRECTLY.
*/
#ifndef NPY_NDARRAYOBJECT_H
#define NPY_NDARRAYOBJECT_H
#ifdef __cplusplus
#define CONFUSE_EMACS {
#define CONFUSE_EMACS2 }
extern "C" CONFUSE_EMACS
#undef CONFUSE_EMACS
#undef CONFUSE_EMACS2
/* ... otherwise a semi-smart identer (like emacs) tries to indent
everything whe... | 0 |
public_repos/numpy-refactor/numpy/core/include | public_repos/numpy-refactor/numpy/core/include/numpy/numpyconfig.h | #ifndef _NUMPYCONFIG_H_
#define _NUMPYCONFIG_H_
#include "_numpyconfig.h"
/*
* On Mac OS X, because there is only one configuration stage for all the archs
* in universal builds, any macro which depends on the arch needs to be
* harcoded
*/
#ifdef __APPLE__
#undef NPY_SIZEOF_LONG
#undef NPY_SIZEOF_PY_INTPTR_T
... | 0 |
public_repos/numpy-refactor/numpy/core/include | public_repos/numpy-refactor/numpy/core/include/numpy/_numpyconfig.h.in | #ifndef _NUMPYCONFIG_H_
#error this header should not be included directly, always include numpyconfig.h instead
#endif
@DEFINE_NPY_NO_SIGNAL@
#define NPY_NO_SMP @NPY_NO_SMP@
#define NPY_VISIBILITY_HIDDEN @VISIBILITY_HIDDEN@
@DEFINE_NPY_USE_C99_FORMATS@
@DEFINE_NPY_HAVE_ENDIAN_H@
/* Ugly, but we can't test this ... | 0 |
public_repos/numpy-refactor/numpy/core/include/numpy | public_repos/numpy-refactor/numpy/core/include/numpy/fenv/fenv.h | /*-
* Copyright (c) 2004 David Schultz <das@FreeBSD.ORG>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, ... | 0 |
public_repos/numpy-refactor/numpy/core/include/numpy | public_repos/numpy-refactor/numpy/core/include/numpy/fenv/fenv.c | /*-
* Copyright (c) 2004 David Schultz <das@FreeBSD.ORG>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, ... | 0 |
public_repos/numpy-refactor/numpy/core | public_repos/numpy-refactor/numpy/core/src/scalarmathmodule.c.src | /* -*- c -*- */
/* The purpose of this module is to add faster math for array scalars
that does not go through the ufunc machinery
but still supports error-modes.
*/
#include "Python.h"
#include "npy_api.h"
#include "npy_ufunc_object.h"
#include "npy_scalarmath.h"
#include "numpy/noprefix.h"
#include "numpy/uf... | 0 |
public_repos/numpy-refactor/numpy/core | public_repos/numpy-refactor/numpy/core/src/_sortmodule.c.src | /* -*- c -*- */
/*
* The purpose of this module is to add faster sort functions
* that are type-specific. This is done by altering the
* function table for the builtin descriptors.
*
* These sorting functions are copied almost directly from numarray
* with a few modifications (complex comparisons compare the im... | 0 |
public_repos/numpy-refactor/numpy/core/src | public_repos/numpy-refactor/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/numpy-refactor/numpy/core/src | public_repos/numpy-refactor/numpy/core/src/umath/umathmodule.c.src | /* -*- c -*- */
/*
* vim:syntax=c
*/
/*
*****************************************************************************
** INCLUDES **
*****************************************************************************
*/
/*
* _UMATHMODULE IS needed in __... | 0 |
public_repos/numpy-refactor/numpy/core/src | public_repos/numpy-refactor/numpy/core/src/umath/loops.c.src |
#include <Python.h>
#include "numpy/npy_3kcompat.h"
#include <npy_common.h>
#include <npy_defs.h>
#include <npy_loops.h>
#include <npy_ufunc_object.h>
void
NpyUFunc_O_O(char **args, npy_intp *dimensions, npy_intp *steps, void *func);
void
NpyUFunc_O_O_method(char **args, npy_intp *dimensions, npy_intp *steps, void... | 0 |
public_repos/numpy-refactor/numpy/core/src | public_repos/numpy-refactor/numpy/core/src/umath/ufunc_object.h | #ifndef _UMATH_OBJECT_H_
#define _UMATH_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/numpy-refactor/numpy/core/src | public_repos/numpy-refactor/numpy/core/src/umath/umath_tests.c.src | /* -*- c -*- */
/*
*****************************************************************************
** INCLUDES **
*****************************************************************************
*/
#include "Python.h"
#include "numpy/arrayobject.h"
#include... | 0 |
public_repos/numpy-refactor/numpy/core/src | public_repos/numpy-refactor/numpy/core/src/private/numpy_config.h | #ifndef _NUMPY_CONFIG_H_
#define _NUMPY_CONFIG_H_
#include "config.h"
/* Disable broken Sun Workshop Pro math functions */
#ifdef __SUNPRO_C
#undef HAVE_ATAN2
#endif
/*
* On Mac OS X, because there is only one configuration stage for all the archs
* in universal builds, any macro which depends on the arch needs t... | 0 |
public_repos/numpy-refactor/numpy/core/src | public_repos/numpy-refactor/numpy/core/src/multiarray/calculation.h | #ifndef _CALCULATION_H_
#define _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, PyArrayObject* out);... | 0 |
public_repos/numpy-refactor/numpy/core/src | public_repos/numpy-refactor/numpy/core/src/multiarray/descriptor.h | #ifndef _NPY_ARRAYDESCR_H_
#define _NPY_ARRAYDESCR_H_
#include "npy_dict.h"
#include "npy_api.h"
NPY_NO_EXPORT PyObject *npy_arraydescr_protocol_typestr_get(NpyArray_Descr *);
NPY_NO_EXPORT PyObject *arraydescr_protocol_typestr_get(PyArray_Descr *);
NPY_NO_EXPORT PyObject *npy_arraydescr_protocol_descr_get(NpyArray_... | 0 |
public_repos/numpy-refactor/numpy/core/src | public_repos/numpy-refactor/numpy/core/src/multiarray/scalartypes.c.src | /* -*- c -*- */
#define PY_SSIZE_T_CLEAN
#include "Python.h"
#include "structmember.h"
#include "numpy/ndarraytypes.h"
#ifndef _MULTIARRAYMODULE
#define _MULTIARRAYMODULE
#endif
#define NPY_NO_PREFIX
#include "npy_os.h"
#include "npy_math.h"
#include "npy_api.h"
#include "npy_dict.h"
#include "numpy/arrayobject.h"
#in... | 0 |
public_repos/numpy-refactor/numpy/core/src | public_repos/numpy-refactor/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 "npy_descriptor.h"
#include "numpy/arrayobject.h"
#include "numpy/arrayscalars.h"
#include "npy_api.h"
#include "descriptor.h"
#include "npy_config.h"
#include "n... | 0 |
public_repos/numpy-refactor/numpy/core/src | public_repos/numpy-refactor/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_api.h"
#include "npy_config.h"
#include "numpy/npy_3kcompat.h"
#include "usertypes.h"
#include "common.h"
#include "buffer.h"
/*
* new reference
* doesn't alter refcount of ch... | 0 |
public_repos/numpy-refactor/numpy/core/src | public_repos/numpy-refactor/numpy/core/src/multiarray/arraytypes.h | #ifndef _NPY_ARRAYTYPES_H_
#define _NPY_ARRAYTYPES_H_
NDARRAY_API extern NpyArray_Descr npy_LONGLONG_Descr;
NDARRAY_API extern NpyArray_Descr npy_LONG_Descr;
NDARRAY_API extern NpyArray_Descr npy_INT_Descr;
NPY_NO_EXPORT int
set_typeinfo(PyObject *dict);
#endif
| 0 |
public_repos/numpy-refactor/numpy/core/src | public_repos/numpy-refactor/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/numpy-refactor/numpy/core/src | public_repos/numpy-refactor/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/numpy-refactor/numpy/core/src | public_repos/numpy-refactor/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/numpy-refactor/numpy/core/src | public_repos/numpy-refactor/numpy/core/src/multiarray/multiarraymodule.h | #ifndef _NPY_MULTIARRAY_H_
#define _NPY_MULTIARRAY_H_
#endif
| 0 |
public_repos/numpy-refactor/numpy/core/src | public_repos/numpy-refactor/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/numpy-refactor/numpy/core/src | public_repos/numpy-refactor/numpy/core/src/multiarray/calculation.c | #define PY_SSIZE_T_CLEAN
#include <Python.h>
#include "structmember.h"
#define _MULTIARRAYMODULE
#define NPY_NO_PREFIX
#include <npy_api.h>
#include <npy_calculation.h>
#include <npy_ufunc_object.h>
#include "numpy/arrayobject.h"
#include "npy_config.h"
#include "numpy/npy_3kcompat.h"
#include "common.h"
#include ... | 0 |
public_repos/numpy-refactor/numpy/core/src | public_repos/numpy-refactor/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_api.h"
#include "npy_config.h"
#include "numpy/npy_3kcompat.h"
#include "common.h"
/*NUMPY_AP... | 0 |
public_repos/numpy-refactor/numpy/core/src | public_repos/numpy-refactor/numpy/core/src/multiarray/buffer.c | #define PY_SSIZE_T_CLEAN
#include <Python.h>
#include "structmember.h"
#define _MULTIARRAYMODULE
#define NPY_NO_PREFIX
#include "npy_api.h"
#include "npy_dict.h"
#include "npy_buffer.h"
#include "numpy/arrayobject.h"
#include "numpy/arrayscalars.h"
#include "npy_config.h"
#include "numpy/npy_3kcompat.h"
#include "b... | 0 |
public_repos/numpy-refactor/numpy/core/src | public_repos/numpy-refactor/numpy/core/src/multiarray/getset.h | #ifndef _NPY_ARRAY_GETSET_H_
#define _NPY_ARRAY_GETSET_H_
extern NPY_NO_EXPORT PyGetSetDef array_getsetlist[];
#endif
| 0 |
public_repos/numpy-refactor/numpy/core/src | public_repos/numpy-refactor/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/ndarraytypes.h"
#include "npy_math.h"
#include "npy_api.h"
#include "npy_dict.h"
#include "numpy/arrayobject.h"
#include "numpy/arrayscalars.h"
#include "npy_config.h"
#include "num... | 0 |
public_repos/numpy-refactor/numpy/core/src | public_repos/numpy-refactor/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 "npy_api.h"
#include "npy_dict.h"
#include "npy_math.h"
#include "npy_config.h"
#include "numpy/arrayobject.h"
#include "numpy/arrayscalars.h"
#include... | 0 |
public_repos/numpy-refactor/numpy/core/src | public_repos/numpy-refactor/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/numpy-refactor/numpy/core/src | public_repos/numpy-refactor/numpy/core/src/multiarray/conversion_utils.h | #ifndef _NPY_PRIVATE_CONVERSION_UTILS_H_
#define _NPY_PRIVATE_CONVERSION_UTILS_H_
#include "npy_index.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 *... | 0 |
public_repos/numpy-refactor/numpy/core/src | public_repos/numpy-refactor/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_api.h>
#include "npy_config.h"
#include "numpy/npy_3kcompat.h"
#include "_datetime.h"
/* For defaults and errors */
#define NPY_FR_ERR... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.