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
public_repos/datetime/numpy/dual.py
""" Aliases for functions which may be accelerated by Scipy. Scipy_ can be built to use accelerated or otherwise improved libraries for FFTs, linear algebra, and special functions. This module allows developers to transparently support these accelerated functions when scipy is available but still support users who hav...
0
public_repos/datetime
public_repos/datetime/numpy/setup.py
#!/usr/bin/env python def configuration(parent_package='',top_path=None): from numpy.distutils.misc_util import Configuration config = Configuration('numpy',parent_package,top_path) config.add_subpackage('distutils') config.add_subpackage('testing') config.add_subpackage('f2py') config.add_subp...
0
public_repos/datetime
public_repos/datetime/numpy/add_newdocs.py
# This is only meant to add docs to objects defined in C-extension modules. # The purpose is to allow easier editing of the docstrings without # requiring a re-compile. # NOTE: Many of the methods of ndarray have corresponding functions. # If you update these docstrings, please keep also the ones in # core...
0
public_repos/datetime
public_repos/datetime/numpy/matlib.py
import numpy as np from numpy.matrixlib.defmatrix import matrix, asmatrix # need * as we're copying the numpy namespace from numpy import * __version__ = np.__version__ __all__ = np.__all__[:] # copy numpy namespace __all__ += ['rand', 'randn', 'repmat'] def empty(shape, dtype=None, order='C'): """ Return a ...
0
public_repos/datetime
public_repos/datetime/numpy/setupscons.py
#!/usr/bin/env python from os.path import join as pjoin def configuration(parent_package='', top_path=None): from numpy.distutils.misc_util import Configuration from numpy.distutils.misc_util import scons_generate_config_py pkgname = 'numpy' config = Configuration(pkgname, parent_package, top_path, ...
0
public_repos/datetime
public_repos/datetime/numpy/ctypeslib.py
""" ============================ ``ctypes`` Utility Functions ============================ See Also --------- load_library : Load a C library. ndpointer : Array restype/argtype with verification. as_ctypes : Create a ctypes array from an ndarray. as_array : Create an ndarray from a ctypes array. References ----------...
0
public_repos/datetime
public_repos/datetime/numpy/__init__.py
""" NumPy ===== Provides 1. An array object of arbitrary homogeneous items 2. Fast mathematical operations over arrays 3. Linear Algebra, Fourier Transforms, Random Number Generation How to use the documentation ---------------------------- Documentation is available in two forms: docstrings provided with the c...
0
public_repos/datetime/numpy
public_repos/datetime/numpy/random/setup.py
from os.path import join, split, dirname import os import sys from distutils.dep_util import newer from distutils.msvccompiler import get_build_version as get_msvc_build_version def needs_mingw_ftime_workaround(): # We need the mingw workaround for _ftime if the msvc runtime version is # 7.1 or above and we bu...
0
public_repos/datetime/numpy
public_repos/datetime/numpy/random/setupscons.py
import glob from os.path import join, split def configuration(parent_package='',top_path=None): from numpy.distutils.misc_util import Configuration, get_mathlibs config = Configuration('random',parent_package,top_path) source_files = [join('mtrand', i) for i in ['mtrand.c', ...
0
public_repos/datetime/numpy
public_repos/datetime/numpy/random/info.py
""" ======================== Random Number Generation ======================== ==================== ========================================================= Utility functions ============================================================================== random Uniformly distributed values of a given sha...
0
public_repos/datetime/numpy
public_repos/datetime/numpy/random/SConscript
# Last Change: Wed Nov 19 09:00 PM 2008 J # vim:syntax=python import os from numscons import GetNumpyEnvironment, scons_get_mathlib from setup import needs_mingw_ftime_workaround def CheckWincrypt(context): from copy import deepcopy src = """\ /* check to see if _WIN32 is defined */ int main(int argc, char *...
0
public_repos/datetime/numpy
public_repos/datetime/numpy/random/SConstruct
from numscons import GetInitEnvironment GetInitEnvironment(ARGUMENTS).DistutilsSConscript('SConscript')
0
public_repos/datetime/numpy
public_repos/datetime/numpy/random/__init__.py
""" ======================== Random Number Generation ======================== ==================== ========================================================= Utility functions ============================================================================== random Uniformly distributed values of a given sha...
0
public_repos/datetime/numpy/random
public_repos/datetime/numpy/random/mtrand/initarray.c
/* * These function have been adapted from Python 2.4.1's _randommodule.c * * The following changes have been made to it in 2005 by Robert Kern: * * * init_by_array has been declared extern, has a void return, and uses the * rk_state structure to hold its data. * * The original file has the following ver...
0
public_repos/datetime/numpy/random
public_repos/datetime/numpy/random/mtrand/distributions.c
/* 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/datetime/numpy/random
public_repos/datetime/numpy/random/mtrand/randomkit.c
/* Random kit 1.3 */ /* * Copyright (c) 2003-2005, Jean-Sebastien Roy (js@jeannot.org) * * The rk_random and rk_seed functions algorithms and the original design of * the Mersenne Twister RNG: * * Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura, * All rights reserved. * * Redistribution...
0
public_repos/datetime/numpy/random
public_repos/datetime/numpy/random/mtrand/randomkit.h
/* Random kit 1.3 */ /* * Copyright (c) 2003-2005, Jean-Sebastien Roy (js@jeannot.org) * * 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 limita...
0
public_repos/datetime/numpy/random
public_repos/datetime/numpy/random/mtrand/mtrand.pyx
# mtrand.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/datetime/numpy/random
public_repos/datetime/numpy/random/mtrand/initarray.h
#include "randomkit.h" extern void init_by_array(rk_state *self, unsigned long init_key[], unsigned long key_length);
0
public_repos/datetime/numpy/random
public_repos/datetime/numpy/random/mtrand/mtrand.c
/* Generated by Cython 0.12 on Mon Feb 22 20:43:03 2010 */ #define PY_SSIZE_T_CLEAN #include "Python.h" #include "structmember.h" #ifndef Py_PYTHON_H #error Python headers needed to compile C extensions, please install development version of Python. #else #ifndef PY_LONG_LONG #define PY_LONG_LONG LONG_LONG #endi...
0
public_repos/datetime/numpy/random
public_repos/datetime/numpy/random/mtrand/numpy.pxi
# :Author: Travis Oliphant cdef extern from "numpy/arrayobject.h": cdef enum NPY_TYPES: NPY_BOOL NPY_BYTE NPY_UBYTE NPY_SHORT NPY_USHORT NPY_INT NPY_UINT NPY_LONG NPY_ULONG NPY_LONGLONG NPY_ULONGLONG NPY_FLOAT ...
0
public_repos/datetime/numpy/random
public_repos/datetime/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/datetime/numpy/random
public_repos/datetime/numpy/random/mtrand/mtrand_py_helper.h
#ifndef _MTRAND_PY_HELPER_H_ #define _MTRAND_PY_HELPER_H_ #include <Python.h> static PyObject *empty_py_bytes(unsigned long length, void **bytes) { PyObject *b; #if PY_MAJOR_VERSION >= 3 b = PyBytes_FromStringAndSize(NULL, length); if (b) { *bytes = PyBytes_AS_STRING(b); } #else b = PyStri...
0
public_repos/datetime/numpy/random
public_repos/datetime/numpy/random/mtrand/Python.pxi
# :Author: Robert Kern # :Copyright: 2004, Enthought, Inc. # :License: BSD Style cdef extern from "Python.h": # Not part of the Python API, but we might as well define it here. # Note that the exact type doesn't actually matter for Pyrex. ctypedef int size_t # String API char* PyString_AsStr...
0
public_repos/datetime/numpy/random
public_repos/datetime/numpy/random/mtrand/generate_mtrand_c.py
#!/usr/bin/env python import sys import re import os unused_internal_funcs = ['__Pyx_PrintItem', '__Pyx_PrintNewline', '__Pyx_ReRaise', #'__Pyx_GetExcValue', '__Pyx_ArgTypeTest', '__Pyx_SetVtabl...
0
public_repos/datetime/numpy/random
public_repos/datetime/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/datetime/numpy
public_repos/datetime/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/datetime/numpy
public_repos/datetime/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/datetime/numpy
public_repos/datetime/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/datetime/numpy
public_repos/datetime/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/datetime/numpy
public_repos/datetime/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/datetime/numpy
public_repos/datetime/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/datetime/numpy
public_repos/datetime/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/datetime/numpy
public_repos/datetime/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/datetime/numpy
public_repos/datetime/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/datetime/numpy
public_repos/datetime/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/datetime/numpy
public_repos/datetime/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/datetime/numpy
public_repos/datetime/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/datetime/numpy
public_repos/datetime/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/datetime/numpy
public_repos/datetime/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/datetime/numpy
public_repos/datetime/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/datetime/numpy
public_repos/datetime/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/datetime/numpy
public_repos/datetime/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/datetime/numpy
public_repos/datetime/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/datetime/numpy
public_repos/datetime/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/datetime/numpy
public_repos/datetime/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/datetime/numpy
public_repos/datetime/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/datetime/numpy
public_repos/datetime/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/datetime/numpy
public_repos/datetime/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/datetime/numpy/oldnumeric
public_repos/datetime/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/datetime/numpy/oldnumeric
public_repos/datetime/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/datetime/numpy
public_repos/datetime/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/datetime/numpy
public_repos/datetime/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/datetime/numpy
public_repos/datetime/numpy/core/setup.py
import imp import os import sys import shutil from os.path import join from numpy.distutils import log from distutils.dep_util import newer from distutils.sysconfig import get_config_var import warnings import re from setup_common import * # Set to True to enable multiple file compilations (experimental) try: os....
0
public_repos/datetime/numpy
public_repos/datetime/numpy/core/_internal.py
#A place for code to be called from C-code # that implements more complicated stuff. import re import sys from numpy.compat import asbytes, bytes if (sys.byteorder == 'little'): _nbo = asbytes('<') else: _nbo = asbytes('>') def _makenames_list(adict): from multiarray import dtype allfields = [] ...
0
public_repos/datetime/numpy
public_repos/datetime/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/datetime/numpy
public_repos/datetime/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/datetime/numpy
public_repos/datetime/numpy/core/shape_base.py
__all__ = ['atleast_1d','atleast_2d','atleast_3d','vstack','hstack'] import numeric as _nx from numeric import array, asarray, 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 inputs...
0
public_repos/datetime/numpy
public_repos/datetime/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/datetime/numpy
public_repos/datetime/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/datetime/numpy
public_repos/datetime/numpy/core/numeric.py
__all__ = ['newaxis', 'ndarray', 'flatiter', 'ufunc', 'arange', 'array', 'zeros', 'empty', 'broadcast', 'dtype', 'fromstring', 'fromfile', 'frombuffer', 'int_asbuffer', 'where', 'argwhere', 'concatenate', 'fastCopyAndTranspose', 'lexsort', 'set_numeric_ops', 'can_c...
0
public_repos/datetime/numpy
public_repos/datetime/numpy/core/memmap.py
__all__ = ['memmap'] import warnings from numeric import uint8, ndarray, dtype import sys from numpy.compat import asbytes dtypedescr = dtype valid_filemodes = ["r", "c", "r+", "w+"] writeable_filemodes = ["r+","w+"] mode_equivalents = { "readonly":"r", "copyonwrite":"c", "readwrite":"r+", "write":"...
0
public_repos/datetime/numpy
public_repos/datetime/numpy/core/fromnumeric.py
# 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', 'r...
0
public_repos/datetime/numpy
public_repos/datetime/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/datetime/numpy
public_repos/datetime/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/datetime/numpy
public_repos/datetime/numpy/core/SConscript
# Last Change: Sun Apr 26 05:00 PM 2009 J # vim:syntax=python import os import sys from os.path import join as pjoin, basename as pbasename, dirname as pdirname from copy import deepcopy from numscons import get_pythonlib_dir from numscons import GetNumpyEnvironment from numscons import CheckCBLAS from numscons import...
0
public_repos/datetime/numpy
public_repos/datetime/numpy/core/npymath.ini.in
[meta] Name=npymath Description=Portable, core math library implementing C99 standard Version=0.1 [variables] pkgname=@pkgname@ prefix=${pkgdir} libdir=${prefix}@sep@lib includedir=${prefix}@sep@include [default] Libs=-L${libdir} -lnpymath Cflags=-I${includedir} Requires=mlib [msvc] Libs=/LIBPATH:${libdir} npymath.l...
0
public_repos/datetime/numpy
public_repos/datetime/numpy/core/scons_support.py
#! Last Change: Sun Apr 26 05:00 PM 2009 J """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_generat...
0
public_repos/datetime/numpy
public_repos/datetime/numpy/core/SConstruct
from numscons import GetInitEnvironment GetInitEnvironment(ARGUMENTS).DistutilsSConscript('SConscript')
0
public_repos/datetime/numpy
public_repos/datetime/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/datetime/numpy
public_repos/datetime/numpy/core/__init__.py
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) import _sort from numeric import * from fromnumeric import * import defchararray as char import records as re...
0
public_repos/datetime/numpy
public_repos/datetime/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/datetime/numpy
public_repos/datetime/numpy/core/setup_common.py
# Code shared by distutils and scons builds import sys from os.path import join import warnings import copy import binascii from distutils.ccompiler import CompileError #------------------- # Versioning support #------------------- # How to change C_API_VERSION ? # - increase C_API_VERSION value # - record the ha...
0
public_repos/datetime/numpy/core/include
public_repos/datetime/numpy/core/include/numpy/arrayobject.h
/* This expects the following variables to be defined (besides the usual ones from pyconfig.h SIZEOF_LONG_DOUBLE -- sizeof(long double) or sizeof(double) if no long double is present on platform. CHAR_BIT -- number of bits in a char (usually 8) (sho...
0
public_repos/datetime/numpy/core/include
public_repos/datetime/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/datetime/numpy/core/include
public_repos/datetime/numpy/core/include/numpy/arrayscalars.h
#ifndef _NPY_ARRAYSCALARS_H_ #define _NPY_ARRAYSCALARS_H_ #ifndef _MULTIARRAYMODULE typedef struct { PyObject_HEAD npy_bool obval; } PyBoolScalarObject; #endif typedef struct { PyObject_HEAD signed char obval; } PyByteScalarObject; typedef struct { PyObject_HEAD shor...
0
public_repos/datetime/numpy/core/include
public_repos/datetime/numpy/core/include/numpy/npy_os.h
#ifndef _NPY_OS_H_ #define _NPY_OS_H_ #if defined(linux) || defined(__linux) || defined(__linux__) #define NPY_OS_LINUX #elif defined(__FreeBSD__) || defined(__NetBSD__) || \ defined(__OpenBSD__) || defined(__DragonFly__) #define NPY_OS_BSD #ifdef __FreeBSD__ #define NPY_OS_FREEBSD ...
0
public_repos/datetime/numpy/core/include
public_repos/datetime/numpy/core/include/numpy/npy_math.h
#ifndef __NPY_MATH_C99_H_ #define __NPY_MATH_C99_H_ #include <math.h> #include <numpy/npy_common.h> /* * NAN and INFINITY like macros (same behavior as glibc for NAN, same as C99 * for INFINITY) * * XXX: I should test whether INFINITY and NAN are available on the platform */ NPY_INLINE static float __npy_inff(vo...
0
public_repos/datetime/numpy/core/include
public_repos/datetime/numpy/core/include/numpy/ufuncobject.h
#ifndef Py_UFUNCOBJECT_H #define Py_UFUNCOBJECT_H #ifdef __cplusplus extern "C" { #endif typedef void (*PyUFuncGenericFunction) (char **, npy_intp *, npy_intp *, void *); typedef struct { PyObject_HEAD int nin, nout, nargs; int identity; PyUFuncGenericFunction *functions; void ...
0
public_repos/datetime/numpy/core/include
public_repos/datetime/numpy/core/include/numpy/noprefix.h
#ifndef NPY_NOPREFIX_H #define NPY_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 longd...
0
public_repos/datetime/numpy/core/include
public_repos/datetime/numpy/core/include/numpy/npy_common.h
#ifndef _NPY_COMMON_H_ #define _NPY_COMMON_H_ /* This is auto-generated */ #include "numpyconfig.h" #if defined(_MSC_VER) #define NPY_INLINE __inline #elif defined(__GNUC__) #define NPY_INLINE inline #else #define NPY_INLINE #endif /* enums for detected endianness */ enum { NPY_CPU_UN...
0
public_repos/datetime/numpy/core/include
public_repos/datetime/numpy/core/include/numpy/ndarraytypes.h
#ifndef NDARRAYTYPES_H #define NDARRAYTYPES_H /* This is auto-generated by the installer */ #include "numpyconfig.h" #include "npy_common.h" #include "npy_endian.h" #include "utils.h" #ifdef NPY_ENABLE_SEPARATE_COMPILATION #define NPY_NO_EXPORT NPY_VISIBILITY_HIDDEN #else #define NPY_NO_EXPORT static...
0
public_repos/datetime/numpy/core/include
public_repos/datetime/numpy/core/include/numpy/npy_endian.h
#ifndef _NPY_ENDIAN_H_ #define _NPY_ENDIAN_H_ /* * NPY_BYTE_ORDER is set to the same value as BYTE_ORDER set by glibc in * endian.h */ #ifdef NPY_HAVE_ENDIAN_H /* Use endian.h if available */ #include <endian.h> #define NPY_BYTE_ORDER __BYTE_ORDER #define NPY_LITTLE_ENDIAN __LITTLE_ENDIAN #def...
0
public_repos/datetime/numpy/core/include
public_repos/datetime/numpy/core/include/numpy/npy_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 Pytho...
0
public_repos/datetime/numpy/core/include
public_repos/datetime/numpy/core/include/numpy/npy_cpu.h
/* * This set (target) cpu specific macros: * - Possible values: * NPY_CPU_X86 * NPY_CPU_AMD64 * NPY_CPU_PPC * NPY_CPU_PPC64 * NPY_CPU_SPARC * NPY_CPU_S390 * NPY_CPU_IA64 * NPY_CPU_HPPA * ...
0
public_repos/datetime/numpy/core/include
public_repos/datetime/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_PRIORITY #define PyArray_NUM_FLOATTYPE NPY_NUM_FLOATTYPE #define NPY_MAX PyArray_M...
0
public_repos/datetime/numpy/core/include
public_repos/datetime/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/datetime/numpy/core/include
public_repos/datetime/numpy/core/include/numpy/numpyconfig.h
#ifndef _NPY_NUMPYCONFIG_H_ #define _NPY_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_I...
0
public_repos/datetime/numpy/core/include
public_repos/datetime/numpy/core/include/numpy/_neighborhood_iterator_imp.h
#ifndef _NPY_INCLUDE_NEIGHBORHOOD_IMP #error You should not include this header directly #endif /* * Private API (here for inline) */ static NPY_INLINE int _PyArrayNeighborhoodIter_IncrCoord(PyArrayNeighborhoodIterObject* iter); /* * Update to next item of the iterator * * Note: this simply increment the coordina...
0
public_repos/datetime/numpy/core/include
public_repos/datetime/numpy/core/include/numpy/_numpyconfig.h.in
#ifndef _NPY_NUMPYCONFIG_H_ #error this header should not be included directly, always include numpyconfig.h instead #endif #define NPY_SIZEOF_SHORT @SIZEOF_SHORT@ #define NPY_SIZEOF_INT @SIZEOF_INT@ #define NPY_SIZEOF_LONG @SIZEOF_LONG@ #define NPY_SIZEOF_FLOAT @SIZEOF_FLOAT@ #define NP...
0
public_repos/datetime/numpy/core/include
public_repos/datetime/numpy/core/include/numpy/utils.h
#ifndef __NUMPY_UTILS_HEADER__ #define __NUMPY_UTILS_HEADER__ #ifndef __COMP_NPY_UNUSED #if defined(__GNUC__) #define __COMP_NPY_UNUSED __attribute__ ((__unused__)) # elif defined(__ICC) #define __COMP_NPY_UNUSED __attribute__ ((__unused__)) #else ...
0
public_repos/datetime/numpy/core/include/numpy
public_repos/datetime/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/datetime/numpy/core/include/numpy
public_repos/datetime/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/datetime/numpy/core
public_repos/datetime/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 "numpy/noprefix.h" #include "numpy/ufuncobject.h" #include "numpy/arrayscalars.h" #include "npy_3kcompat.h" /** nu...
0
public_repos/datetime/numpy/core
public_repos/datetime/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/datetime/numpy/core/src
public_repos/datetime/numpy/core/src/npymath/npy_math_complex.c.src
/* * Implement some C99-compatible complex math functions * * Most of the code is taken from the msun library in FreeBSD (HEAD @ 30th June * 2009), under the following license: * * Copyright (c) 2007 David Schultz <das@FreeBSD.ORG> * All rights reserved. * * Redistribution and use in source and binary forms, w...
0
public_repos/datetime/numpy/core/src
public_repos/datetime/numpy/core/src/npymath/_signbit.c
/* Adapted from cephes */ int _npy_signbit_d(double x) { union { double d; short s[4]; int i[2]; } u; u.d = x; #if SIZEOF_INT == 4 #ifdef WORDS_BIGENDIAN /* defined in pyconfig.h */ return u.i[0] < 0; #else return u.i[1] < 0; #endif #else /* SIZEOF_INT != 4 */ #ifd...
0
public_repos/datetime/numpy/core/src
public_repos/datetime/numpy/core/src/npymath/npy_math_private.h
/* * * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. * * Developed at SunPro, a Sun Microsystems, Inc. business. * Permission to use, copy, modify, and distribute this * software is freely granted, provided that this notice * is preserve...
0
public_repos/datetime/numpy/core/src
public_repos/datetime/numpy/core/src/npymath/ieee754.c.src
/* -*- c -*- */ /* * vim:syntax=c * * Low-level routines related to IEEE-754 format */ #include "npy_math_common.h" #include "npy_math_private.h" #ifndef HAVE_COPYSIGN double npy_copysign(double x, double y) { npy_uint32 hx, hy; GET_HIGH_WORD(hx, x); GET_HIGH_WORD(hy, y); SET_HIGH_WORD(x, (hx & 0x7...
0
public_repos/datetime/numpy/core/src
public_repos/datetime/numpy/core/src/npymath/npy_math.c.src
/* * vim:syntax=c * A small module to implement missing C99 math capabilities required by numpy * * Please keep this independant of python ! Only basic types (npy_longdouble) * can be used, otherwise, pure C, without any use of Python facilities * * How to add a function to this section * ----------------------...
0