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/distutils | public_repos/datetime/numpy/distutils/fcompiler/mips.py | from numpy.distutils.cpuinfo import cpu
from numpy.distutils.fcompiler import FCompiler
compilers = ['MIPSFCompiler']
class MIPSFCompiler(FCompiler):
compiler_type = 'mips'
description = 'MIPSpro Fortran Compiler'
version_pattern = r'MIPSpro Compilers: Version (?P<version>[^\s*,]*)'
executables = {... | 0 |
public_repos/datetime/numpy/distutils | public_repos/datetime/numpy/distutils/fcompiler/compaq.py |
#http://www.compaq.com/fortran/docs/
import os
import sys
from numpy.distutils.fcompiler import FCompiler
from numpy.distutils.compat import get_exception
from distutils.errors import DistutilsPlatformError
compilers = ['CompaqFCompiler']
if os.name != 'posix' or sys.platform[:6] == 'cygwin' :
# Otherwise we'd ... | 0 |
public_repos/datetime/numpy/distutils | public_repos/datetime/numpy/distutils/fcompiler/ibm.py | import os
import re
import sys
from numpy.distutils.fcompiler import FCompiler
from numpy.distutils.exec_command import exec_command, find_executable
from numpy.distutils.misc_util import make_temp_file
from distutils import log
compilers = ['IBMFCompiler']
class IBMFCompiler(FCompiler):
compiler_type = 'ibm'
... | 0 |
public_repos/datetime/numpy/distutils | public_repos/datetime/numpy/distutils/fcompiler/vast.py | import os
from numpy.distutils.fcompiler.gnu import GnuFCompiler
compilers = ['VastFCompiler']
class VastFCompiler(GnuFCompiler):
compiler_type = 'vast'
compiler_aliases = ()
description = 'Pacific-Sierra Research Fortran 90 Compiler'
version_pattern = r'\s*Pacific-Sierra Research vf90 '\
... | 0 |
public_repos/datetime/numpy/distutils | public_repos/datetime/numpy/distutils/fcompiler/none.py |
from numpy.distutils.fcompiler import FCompiler
compilers = ['NoneFCompiler']
class NoneFCompiler(FCompiler):
compiler_type = 'none'
description = 'Fake Fortran compiler'
executables = {'compiler_f77' : None,
'compiler_f90' : None,
'compiler_fix' : None,
... | 0 |
public_repos/datetime/numpy/distutils | public_repos/datetime/numpy/distutils/fcompiler/lahey.py | import os
from numpy.distutils.fcompiler import FCompiler
compilers = ['LaheyFCompiler']
class LaheyFCompiler(FCompiler):
compiler_type = 'lahey'
description = 'Lahey/Fujitsu Fortran 95 Compiler'
version_pattern = r'Lahey/Fujitsu Fortran 95 Compiler Release (?P<version>[^\s*]*)'
executables = {
... | 0 |
public_repos/datetime/numpy/distutils | public_repos/datetime/numpy/distutils/fcompiler/sun.py | from numpy.distutils.ccompiler import simple_version_match
from numpy.distutils.fcompiler import FCompiler
compilers = ['SunFCompiler']
class SunFCompiler(FCompiler):
compiler_type = 'sun'
description = 'Sun or Forte Fortran 95 Compiler'
# ex:
# f90: Sun WorkShop 6 update 2 Fortran 95 6.2 Patch 11169... | 0 |
public_repos/datetime/numpy/distutils | public_repos/datetime/numpy/distutils/fcompiler/hpux.py | from numpy.distutils.fcompiler import FCompiler
compilers = ['HPUXFCompiler']
class HPUXFCompiler(FCompiler):
compiler_type = 'hpux'
description = 'HP Fortran 90 Compiler'
version_pattern = r'HP F90 (?P<version>[^\s*,]*)'
executables = {
'version_cmd' : ["<F90>", "+version"],
'comp... | 0 |
public_repos/datetime/numpy/distutils | public_repos/datetime/numpy/distutils/fcompiler/g95.py | # http://g95.sourceforge.net/
from numpy.distutils.fcompiler import FCompiler
compilers = ['G95FCompiler']
class G95FCompiler(FCompiler):
compiler_type = 'g95'
description = 'G95 Fortran Compiler'
# version_pattern = r'G95 \((GCC (?P<gccversion>[\d.]+)|.*?) \(g95!\) (?P<version>.*)\).*'
# $ g95 --ver... | 0 |
public_repos/datetime/numpy/distutils | public_repos/datetime/numpy/distutils/fcompiler/nag.py | import sys
from numpy.distutils.fcompiler import FCompiler
compilers = ['NAGFCompiler']
class NAGFCompiler(FCompiler):
compiler_type = 'nag'
description = 'NAGWare Fortran 95 Compiler'
version_pattern = r'NAGWare Fortran 95 compiler Release (?P<version>[^\s]*)'
executables = {
'version_cmd'... | 0 |
public_repos/datetime/numpy/distutils | public_repos/datetime/numpy/distutils/fcompiler/absoft.py |
# http://www.absoft.com/literature/osxuserguide.pdf
# http://www.absoft.com/documentation.html
# Notes:
# - when using -g77 then use -DUNDERSCORE_G77 to compile f2py
# generated extension modules (works for f2py v2.45.241_1936 and up)
import os
from numpy.distutils.cpuinfo import cpu
from numpy.distutils.fcompile... | 0 |
public_repos/datetime/numpy/distutils | public_repos/datetime/numpy/distutils/fcompiler/intel.py | # http://developer.intel.com/software/products/compilers/flin/
import sys
from numpy.distutils.cpuinfo import cpu
from numpy.distutils.ccompiler import simple_version_match
from numpy.distutils.fcompiler import FCompiler, dummy_fortran_file
compilers = ['IntelFCompiler', 'IntelVisualFCompiler',
'IntelIt... | 0 |
public_repos/datetime/numpy/distutils | public_repos/datetime/numpy/distutils/fcompiler/__init__.py | """numpy.distutils.fcompiler
Contains FCompiler, an abstract base class that defines the interface
for the numpy.distutils Fortran compiler abstraction model.
Terminology:
To be consistent, where the term 'executable' is used, it means the single
file, like 'gcc', that is executed, and should be a string. In contras... | 0 |
public_repos/datetime/numpy/distutils | public_repos/datetime/numpy/distutils/tests/setup.py | #!/usr/bin/env python
def configuration(parent_package='',top_path=None):
from numpy.distutils.misc_util import Configuration
config = Configuration('testnumpydistutils',parent_package,top_path)
config.add_subpackage('pyrex_ext')
config.add_subpackage('f2py_ext')
#config.add_subpackage('f2py_f90_ext... | 0 |
public_repos/datetime/numpy/distutils | public_repos/datetime/numpy/distutils/tests/test_npy_pkg_config.py | import os
from tempfile import mkstemp
from numpy.testing import *
from numpy.distutils.npy_pkg_config import read_config, parse_flags
simple = """\
[meta]
Name = foo
Description = foo lib
Version = 0.1
[default]
cflags = -I/usr/include
libs = -L/usr/lib
"""
simple_d = {'cflags': '-I/usr/include', 'libflags': '-L/us... | 0 |
public_repos/datetime/numpy/distutils | public_repos/datetime/numpy/distutils/tests/test_misc_util.py | #!/usr/bin/env python
from numpy.testing import *
from numpy.distutils.misc_util import appendpath, minrelpath, gpaths, rel_path
from os.path import join, sep, dirname
ajoin = lambda *paths: join(*((sep,)+paths))
class TestAppendpath(TestCase):
def test_1(self):
assert_equal(appendpath('prefix','name'),... | 0 |
public_repos/datetime/numpy/distutils | public_repos/datetime/numpy/distutils/tests/test_fcompiler_gnu.py | from numpy.testing import *
import numpy.distutils.fcompiler
g77_version_strings = [
('GNU Fortran 0.5.25 20010319 (prerelease)', '0.5.25'),
('GNU Fortran (GCC 3.2) 3.2 20020814 (release)', '3.2'),
('GNU Fortran (GCC) 3.3.3 20040110 (prerelease) (Debian)', '3.3.3'),
('GNU Fortran (GCC) 3.3.3 (Debian 2... | 0 |
public_repos/datetime/numpy/distutils/tests | public_repos/datetime/numpy/distutils/tests/f2py_f90_ext/setup.py | #!/usr/bin/env python
def configuration(parent_package='',top_path=None):
from numpy.distutils.misc_util import Configuration
config = Configuration('f2py_f90_ext',parent_package,top_path)
config.add_extension('foo',
['src/foo_free.f90'],
include_dirs=['incl... | 0 |
public_repos/datetime/numpy/distutils/tests/f2py_f90_ext | public_repos/datetime/numpy/distutils/tests/f2py_f90_ext/include/body.f90 | subroutine bar13(a)
!f2py intent(out) a
integer a
a = 13
end subroutine bar13
| 0 |
public_repos/datetime/numpy/distutils/tests/f2py_f90_ext | public_repos/datetime/numpy/distutils/tests/f2py_f90_ext/src/foo_free.f90 | module foo_free
contains
include "body.f90"
end module foo_free
| 0 |
public_repos/datetime/numpy/distutils/tests/f2py_f90_ext | public_repos/datetime/numpy/distutils/tests/f2py_f90_ext/tests/test_foo.py | import sys
from numpy.testing import *
from f2py_f90_ext import foo
class TestFoo(TestCase):
def test_foo_free(self):
assert_equal(foo.foo_free.bar13(),13)
if __name__ == "__main__":
run_module_suite()
| 0 |
public_repos/datetime/numpy/distutils/tests | public_repos/datetime/numpy/distutils/tests/f2py_ext/setup.py | #!/usr/bin/env python
def configuration(parent_package='',top_path=None):
from numpy.distutils.misc_util import Configuration
config = Configuration('f2py_ext',parent_package,top_path)
config.add_extension('fib2', ['src/fib2.pyf','src/fib1.f'])
config.add_data_dir('tests')
return config
if __name__... | 0 |
public_repos/datetime/numpy/distutils/tests/f2py_ext | public_repos/datetime/numpy/distutils/tests/f2py_ext/src/fib1.f | C FILE: FIB1.F
SUBROUTINE FIB(A,N)
C
C CALCULATE FIRST N FIBONACCI NUMBERS
C
INTEGER N
REAL*8 A(N)
DO I=1,N
IF (I.EQ.1) THEN
A(I) = 0.0D0
ELSEIF (I.EQ.2) THEN
A(I) = 1.0D0
ELSE
A(I) = A(I-1) + A(I-2)
ENDIF
ENDDO
... | 0 |
public_repos/datetime/numpy/distutils/tests/f2py_ext | public_repos/datetime/numpy/distutils/tests/f2py_ext/src/fib2.pyf | ! -*- f90 -*-
python module fib2
interface
subroutine fib(a,n)
real*8 dimension(n),intent(out),depend(n) :: a
integer intent(in) :: n
end subroutine fib
end interface
end python module fib2
| 0 |
public_repos/datetime/numpy/distutils/tests/f2py_ext | public_repos/datetime/numpy/distutils/tests/f2py_ext/tests/test_fib2.py | import sys
from numpy.testing import *
from f2py_ext import fib2
class TestFib2(TestCase):
def test_fib(self):
assert_array_equal(fib2.fib(6),[0,1,1,2,3,5])
if __name__ == "__main__":
run_module_suite()
| 0 |
public_repos/datetime/numpy/distutils/tests | public_repos/datetime/numpy/distutils/tests/pyrex_ext/setup.py | #!/usr/bin/env python
def configuration(parent_package='',top_path=None):
from numpy.distutils.misc_util import Configuration
config = Configuration('pyrex_ext',parent_package,top_path)
config.add_extension('primes',
['primes.pyx'])
config.add_data_dir('tests')
return config... | 0 |
public_repos/datetime/numpy/distutils/tests | public_repos/datetime/numpy/distutils/tests/pyrex_ext/primes.pyx | #
# Calculate prime numbers
#
def primes(int kmax):
cdef int n, k, i
cdef int p[1000]
result = []
if kmax > 1000:
kmax = 1000
k = 0
n = 2
while k < kmax:
i = 0
while i < k and n % p[i] <> 0:
i = i + 1
if i == k:
p[k] = n
k = k + 1
result.append(n)
n = n + 1
... | 0 |
public_repos/datetime/numpy/distutils/tests/pyrex_ext | public_repos/datetime/numpy/distutils/tests/pyrex_ext/tests/test_primes.py | import sys
from numpy.testing import *
from pyrex_ext.primes import primes
class TestPrimes(TestCase):
def test_simple(self, level=1):
l = primes(10)
assert_equal(l, [2, 3, 5, 7, 11, 13, 17, 19, 23, 29])
if __name__ == "__main__":
run_module_suite()
| 0 |
public_repos/datetime/numpy/distutils/tests | public_repos/datetime/numpy/distutils/tests/swig_ext/setup.py | #!/usr/bin/env python
def configuration(parent_package='',top_path=None):
from numpy.distutils.misc_util import Configuration
config = Configuration('swig_ext',parent_package,top_path)
config.add_extension('_example',
['src/example.i','src/example.c']
)
... | 0 |
public_repos/datetime/numpy/distutils/tests/swig_ext | public_repos/datetime/numpy/distutils/tests/swig_ext/src/zoo.h |
class Zoo{
int n;
char animals[10][50];
public:
Zoo();
void shut_up(char *animal);
void display();
};
| 0 |
public_repos/datetime/numpy/distutils/tests/swig_ext | public_repos/datetime/numpy/distutils/tests/swig_ext/src/example.c | /* File : example.c */
double My_variable = 3.0;
/* Compute factorial of n */
int fact(int n) {
if (n <= 1) return 1;
else return n*fact(n-1);
}
/* Compute n mod m */
int my_mod(int n, int m) {
return(n % m);
}
| 0 |
public_repos/datetime/numpy/distutils/tests/swig_ext | public_repos/datetime/numpy/distutils/tests/swig_ext/src/zoo.cc | #include "zoo.h"
#include <cstdio>
#include <cstring>
Zoo::Zoo()
{
n = 0;
}
void Zoo::shut_up(char *animal)
{
if (n < 10) {
strcpy(animals[n], animal);
n++;
}
}
void Zoo::display()
{
int i;
for(i = 0; i < n; i++)
printf("%s\n", animals[i]);
}
| 0 |
public_repos/datetime/numpy/distutils/tests/swig_ext | public_repos/datetime/numpy/distutils/tests/swig_ext/src/zoo.i | // -*- c++ -*-
// Example copied from http://linuxgazette.net/issue49/pramode.html
%module example2
%{
#include "zoo.h"
%}
%include "zoo.h"
| 0 |
public_repos/datetime/numpy/distutils/tests/swig_ext | public_repos/datetime/numpy/distutils/tests/swig_ext/src/example.i | /* -*- c -*- */
/* File : example.i */
%module example
%{
/* Put headers and other declarations here */
extern double My_variable;
extern int fact(int);
extern int my_mod(int n, int m);
%}
extern double My_variable;
extern int fact(int);
extern int my_mod(int n, int m);
| 0 |
public_repos/datetime/numpy/distutils/tests/swig_ext | public_repos/datetime/numpy/distutils/tests/swig_ext/tests/test_example2.py | import sys
from numpy.testing import *
from swig_ext import example2
class TestExample2(TestCase):
def test_zoo(self):
z = example2.Zoo()
z.shut_up('Tiger')
z.shut_up('Lion')
z.display()
if __name__ == "__main__":
run_module_suite()
| 0 |
public_repos/datetime/numpy/distutils/tests/swig_ext | public_repos/datetime/numpy/distutils/tests/swig_ext/tests/test_example.py | import sys
from numpy.testing import *
from swig_ext import example
class TestExample(TestCase):
def test_fact(self):
assert_equal(example.fact(10),3628800)
def test_cvar(self):
assert_equal(example.cvar.My_variable,3.0)
example.cvar.My_variable = 5
assert_equal(example.cvar.My... | 0 |
public_repos/datetime/numpy/distutils/tests | public_repos/datetime/numpy/distutils/tests/gen_ext/setup.py | #!/usr/bin/env python
fib3_f = '''
C FILE: FIB3.F
SUBROUTINE FIB(A,N)
C
C CALCULATE FIRST N FIBONACCI NUMBERS
C
INTEGER N
REAL*8 A(N)
Cf2py intent(in) n
Cf2py intent(out) a
Cf2py depend(n) a
DO I=1,N
IF (I.EQ.1) THEN
A(I) = 0.0D0
ELSEIF (I.EQ.2) THEN
... | 0 |
public_repos/datetime/numpy/distutils/tests/gen_ext | public_repos/datetime/numpy/distutils/tests/gen_ext/tests/test_fib3.py | import sys
from numpy.testing import *
from gen_ext import fib3
class TestFib3(TestCase):
def test_fib(self):
assert_array_equal(fib3.fib(6),[0,1,1,2,3,5])
if __name__ == "__main__":
run_module_suite()
| 0 |
public_repos/datetime/numpy/distutils | public_repos/datetime/numpy/distutils/mingw/gfortran_vs2003_hack.c | int _get_output_format(void)
{
return 0;
}
int _imp____lc_codepage = 0;
| 0 |
public_repos/datetime/numpy | public_repos/datetime/numpy/numarray/mlab.py |
from numpy.oldnumeric.mlab import *
import numpy.oldnumeric.mlab as nom
__all__ = nom.__all__
del nom
| 0 |
public_repos/datetime/numpy | public_repos/datetime/numpy/numarray/functions.py | # missing Numarray defined names (in from numarray import *)
##__all__ = ['ClassicUnpickler', 'Complex32_fromtype',
## 'Complex64_fromtype', 'ComplexArray', 'Error',
## 'MAX_ALIGN', 'MAX_INT_SIZE', 'MAX_LINE_WIDTH',
## 'NDArray', 'NewArray', 'NumArray',
## 'NumError', 'PRECISION'... | 0 |
public_repos/datetime/numpy | public_repos/datetime/numpy/numarray/image.py | try:
from stsci.image import *
except ImportError:
try:
from scipy.stsci.image import *
except ImportError:
msg = \
"""The image package is not installed
It can be downloaded by checking out the latest source from
http://svn.scipy.org/svn/scipy/trunk/Lib/stsci or by downloading and
installi... | 0 |
public_repos/datetime/numpy | public_repos/datetime/numpy/numarray/matrix.py |
__all__ = ['Matrix']
from numpy import matrix as _matrix
def Matrix(data, typecode=None, copy=1, savespace=0):
return _matrix(data, typecode, copy=copy)
| 0 |
public_repos/datetime/numpy | public_repos/datetime/numpy/numarray/alter_code1.py | """
This module converts code written for numarray to run with numpy
Makes the following changes:
* Changes import statements
import numarray.package
--> import numpy.numarray.package as numarray_package
with all numarray.package in code changed to numarray_package
import numarray --> import... | 0 |
public_repos/datetime/numpy | public_repos/datetime/numpy/numarray/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
Numeric type objects:
Bool
Int8 Int16 Int32 Int64
UInt8 UInt16 UInt32 UInt64
Fl... | 0 |
public_repos/datetime/numpy | public_repos/datetime/numpy/numarray/ma.py |
from numpy.oldnumeric.ma import *
| 0 |
public_repos/datetime/numpy | public_repos/datetime/numpy/numarray/convolve.py | try:
from stsci.convolve import *
except ImportError:
try:
from scipy.stsci.convolve import *
except ImportError:
msg = \
"""The convolve package is not installed.
It can be downloaded by checking out the latest source from
http://svn.scipy.org/svn/scipy/trunk/Lib/stsci or by downloading an... | 0 |
public_repos/datetime/numpy | public_repos/datetime/numpy/numarray/setup.py | from os.path import join
def configuration(parent_package='',top_path=None):
from numpy.distutils.misc_util import Configuration
config = Configuration('numarray',parent_package,top_path)
config.add_data_files('include/numpy/*')
config.add_extension('_capi',
sources=['_capi.c... | 0 |
public_repos/datetime/numpy | public_repos/datetime/numpy/numarray/setupscons.py | from os.path import join
def configuration(parent_package='',top_path=None):
from numpy.distutils.misc_util import Configuration
config = Configuration('numarray',parent_package,top_path)
config.add_data_files('include/numpy/')
config.add_sconscript('SConstruct', source_files = ['_capi.c'])
retur... | 0 |
public_repos/datetime/numpy | public_repos/datetime/numpy/numarray/linear_algebra.py |
from numpy.oldnumeric.linear_algebra import *
import numpy.oldnumeric.linear_algebra as nol
__all__ = list(nol.__all__)
__all__ += ['qr_decomposition']
from numpy.linalg import qr as _qr
def qr_decomposition(a, mode='full'):
res = _qr(a, mode)
if mode == 'full':
return res
return (None, res)
| 0 |
public_repos/datetime/numpy | public_repos/datetime/numpy/numarray/ufuncs.py |
__all__ = ['abs', 'absolute', 'add', 'arccos', 'arccosh', 'arcsin', 'arcsinh',
'arctan', 'arctan2', 'arctanh', 'bitwise_and', 'bitwise_not',
'bitwise_or', 'bitwise_xor', 'ceil', 'cos', 'cosh', 'divide',
'equal', 'exp', 'fabs', 'floor', 'floor_divide',
'fmod', 'greater', 'gre... | 0 |
public_repos/datetime/numpy | public_repos/datetime/numpy/numarray/random_array.py |
__all__ = ['ArgumentError', 'F', 'beta', 'binomial', 'chi_square',
'exponential', 'gamma', 'get_seed', 'multinomial',
'multivariate_normal', 'negative_binomial', 'noncentral_F',
'noncentral_chi_square', 'normal', 'permutation', 'poisson',
'randint', 'random', 'random_integer... | 0 |
public_repos/datetime/numpy | public_repos/datetime/numpy/numarray/session.py | """ This module contains a "session saver" which saves the state of a
NumPy session to a file. At a later time, a different Python
process can be started and the saved session can be restored using
load().
The session saver relies on the Python pickle protocol to save and
restore objects. Objects which are not thems... | 0 |
public_repos/datetime/numpy | public_repos/datetime/numpy/numarray/_capi.c | #include <Python.h>
#define _libnumarray_MODULE
#include "include/numpy/libnumarray.h"
#include "npy_config.h"
#include <float.h>
#if (defined(__unix__) || defined(unix)) && !defined(USG)
#include <sys/param.h>
#endif
#if defined(__GLIBC__) || defined(__APPLE__) || defined(__MINGW32__) || (defined(__FreeBSD__) && (_... | 0 |
public_repos/datetime/numpy | public_repos/datetime/numpy/numarray/util.py | import os
import numpy as np
__all__ = ['MathDomainError', 'UnderflowError', 'NumOverflowError',
'handleError', 'get_numarray_include_dirs']
class MathDomainError(ArithmeticError):
pass
class UnderflowError(ArithmeticError):
pass
class NumOverflowError(OverflowError, ArithmeticError):
pass
... | 0 |
public_repos/datetime/numpy | public_repos/datetime/numpy/numarray/compat.py |
__all__ = ['NewAxis', 'ArrayType']
from numpy import newaxis as NewAxis, ndarray as ArrayType
| 0 |
public_repos/datetime/numpy | public_repos/datetime/numpy/numarray/fft.py |
from numpy.oldnumeric.fft import *
import numpy.oldnumeric.fft as nof
__all__ = nof.__all__
del nof
| 0 |
public_repos/datetime/numpy | public_repos/datetime/numpy/numarray/SConscript | # Last Change: Thu Jun 12 06:00 PM 2008 J
# vim:syntax=python
from numscons import GetNumpyEnvironment
env = GetNumpyEnvironment(ARGUMENTS)
env.Prepend(CPPPATH=['numpy', "#$build_prefix/numpy/core/src/private"])
env.NumpyPythonExtension('_capi', source = ['_capi.c'])
| 0 |
public_repos/datetime/numpy | public_repos/datetime/numpy/numarray/nd_image.py | try:
from ndimage import *
except ImportError:
try:
from scipy.ndimage import *
except ImportError:
msg = \
"""The nd_image package is not installed
It can be downloaded by checking out the latest source from
http://svn.scipy.org/svn/scipy/trunk/Lib/ndimage or by downloading and
installing ... | 0 |
public_repos/datetime/numpy | public_repos/datetime/numpy/numarray/SConstruct | from numscons import GetInitEnvironment
GetInitEnvironment(ARGUMENTS).DistutilsSConscript('SConscript')
| 0 |
public_repos/datetime/numpy | public_repos/datetime/numpy/numarray/alter_code2.py | """
This module converts code written for numpy.numarray to work
with numpy
FIXME: finish this.
"""
#__all__ = ['convertfile', 'convertall', 'converttree']
__all__ = []
import warnings
warnings.warn("numpy.numarray.alter_code2 is not working yet.")
import sys
import os
import glob
def makenewfile(name, filestr):
... | 0 |
public_repos/datetime/numpy | public_repos/datetime/numpy/numarray/__init__.py | from util import *
from numerictypes import *
from functions import *
from ufuncs import *
from compat import *
from session import *
import util
import numerictypes
import functions
import ufuncs
import compat
import session
__all__ = ['session', 'numerictypes']
__all__ += util.__all__
__all__ += numerictypes.__all_... | 0 |
public_repos/datetime/numpy/numarray/include | public_repos/datetime/numpy/numarray/include/numpy/numcomplex.h | /* See numarray.h for Complex32, Complex64:
typedef struct { Float32 r, i; } Complex32;
typedef struct { Float64 r, i; } Complex64;
*/
typedef struct { Float32 a, theta; } PolarComplex32;
typedef struct { Float64 a, theta; } PolarComplex64;
#define NUM_SQ(x) ((x)*(x))
#define NUM_CABSSQ(p) (NUM_SQ((p).r... | 0 |
public_repos/datetime/numpy/numarray/include | public_repos/datetime/numpy/numarray/include/numpy/libnumarray.h | /* Compatibility with numarray. Do not use in new code.
*/
#ifndef NUMPY_LIBNUMARRAY_H
#define NUMPY_LIBNUMARRAY_H
#include "numpy/arrayobject.h"
#include "arraybase.h"
#include "nummacro.h"
#include "numcomplex.h"
#include "ieeespecial.h"
#include "cfunc.h"
#ifdef __cplusplus
extern "C" {
#endif
/* Header file f... | 0 |
public_repos/datetime/numpy/numarray/include | public_repos/datetime/numpy/numarray/include/numpy/arraybase.h | #if !defined(__arraybase_h)
#define _arraybase_h 1
#define SZ_BUF 79
#define MAXDIM NPY_MAXDIMS
#define MAXARGS 18
typedef npy_intp maybelong;
typedef npy_bool Bool;
typedef npy_int8 Int8;
typedef npy_uint8 UInt8;
typedef npy_int16 Int16;
typedef npy_uint16 UInt16;
typedef npy_int32 Int32;
typedef npy_uint32 UInt32;... | 0 |
public_repos/datetime/numpy/numarray/include | public_repos/datetime/numpy/numarray/include/numpy/ieeespecial.h | /* 32-bit special value ranges */
#if defined(_MSC_VER)
#define MKINT(x) (x##UL)
#define MKINT64(x) (x##Ui64)
#define BIT(x) (1Ui64 << (x))
#else
#define MKINT(x) (x##U)
#define MKINT64(x) (x##ULL)
#define BIT(x) (1ULL << (x))
#endif
#define NEG_QUIET_NAN_MIN32 MKINT(0xFFC00001)
#define NEG_QUIET_NAN_MAX32 MKI... | 0 |
public_repos/datetime/numpy/numarray/include | public_repos/datetime/numpy/numarray/include/numpy/nummacro.h | /* Primarily for compatibility with numarray C-API */
#if !defined(_ndarraymacro)
#define _ndarraymacro
/* The structs defined here are private implementation details of numarray
which are subject to change w/o notice.
*/
#define PY_BOOL_CHAR "b"
#define PY_INT8_CHAR "b"
#define PY_INT16_CHAR "h"
#define PY_INT32_C... | 0 |
public_repos/datetime/numpy/numarray/include | public_repos/datetime/numpy/numarray/include/numpy/cfunc.h | #if !defined(__cfunc__)
#define __cfunc__ 1
typedef PyObject *(*CFUNCasPyValue)(void *);
typedef int (*UFUNC)(long, long, long, void **, long*);
/* typedef void (*CFUNC_2ARG)(long, void *, void *); */
/* typedef void (*CFUNC_3ARG)(long, void *, void *, void *); */
typedef int (*CFUNCfromPyValue)(PyObject *, void *);
t... | 0 |
public_repos/datetime/numpy | public_repos/datetime/numpy/compat/setup.py | #!/usr/bin/env python
def configuration(parent_package='',top_path=None):
from numpy.distutils.misc_util import Configuration
config = Configuration('compat',parent_package,top_path)
return config
if __name__ == '__main__':
from numpy.distutils.core import setup
setup(configuration=configurat... | 0 |
public_repos/datetime/numpy | public_repos/datetime/numpy/compat/setupscons.py | #!/usr/bin/env python
import os.path
def configuration(parent_package='',top_path=None):
from numpy.distutils.misc_util import Configuration
config = Configuration('compat',parent_package,top_path)
return config
if __name__ == '__main__':
from numpy.distutils.core import setup
setup(configura... | 0 |
public_repos/datetime/numpy | public_repos/datetime/numpy/compat/_inspect.py | """Subset of inspect module from upstream python
We use this instead of upstream because upstream inspect is slow to import, and
significanly contributes to numpy import times. Importing this copy has almost
no overhead.
"""
import types
__all__ = ['getargspec', 'formatargspec']
# ----------------------------------... | 0 |
public_repos/datetime/numpy | public_repos/datetime/numpy/compat/py3k.py | """
Python 3 compatibility tools.
"""
__all__ = ['bytes', 'asbytes', 'isfileobj', 'getexception', 'strchar',
'unicode', 'asunicode', 'asbytes_nested', 'asunicode_nested',
'asstr', 'open_latin1']
import sys
if sys.version_info[0] >= 3:
import io
bytes = bytes
unicode = str
asuni... | 0 |
public_repos/datetime/numpy | public_repos/datetime/numpy/compat/__init__.py | """
Compatibility module.
This module contains duplicated code from Python itself or 3rd party
extensions, which may be included for the following reasons:
* compatibility
* we may only need a small subset of the copied library/module
"""
import _inspect
import py3k
from _inspect import getargspec, formatargspec... | 0 |
public_repos/datetime/numpy | public_repos/datetime/numpy/doc/basics.py | """
============
Array basics
============
Array types and conversions between types
=========================================
Numpy supports a much greater variety of numerical types than Python does.
This section shows which are available, and how to modify an array's data-type.
========== =======================... | 0 |
public_repos/datetime/numpy | public_repos/datetime/numpy/doc/structured_arrays.py | """
=====================================
Structured Arrays (aka Record Arrays)
=====================================
Introduction
============
Numpy provides powerful capabilities to create arrays of structs or records.
These arrays permit one to manipulate the data by the structs or by fields of
the struct. A simpl... | 0 |
public_repos/datetime/numpy | public_repos/datetime/numpy/doc/misc.py | """
=============
Miscellaneous
=============
IEEE 754 Floating Point Special Values:
-----------------------------------------------
Special values defined in numpy: nan, inf,
NaNs can be used as a poor-man's mask (if you don't care what the
original value was)
Note: cannot use equality to test NaNs. E.g.: ::
>>... | 0 |
public_repos/datetime/numpy | public_repos/datetime/numpy/doc/byteswapping.py | '''
=============================
Byteswapping and byte order
=============================
Introduction to byte ordering and ndarrays
==========================================
The ``ndarray`` is an object that provide a python array interface to data
in memory.
It often happens that the memory that you want to v... | 0 |
public_repos/datetime/numpy | public_repos/datetime/numpy/doc/constants.py | """
=========
Constants
=========
Numpy includes several constants:
%(constant_list)s
"""
#
# Note: the docstring is autogenerated.
#
import textwrap, re
# Maintain same format as in numpy.add_newdocs
constants = []
def add_newdoc(module, name, doc):
constants.append((name, doc))
add_newdoc('numpy', 'Inf',
... | 0 |
public_repos/datetime/numpy | public_repos/datetime/numpy/doc/performance.py | """
===========
Performance
===========
Placeholder for Improving Performance documentation.
"""
| 0 |
public_repos/datetime/numpy | public_repos/datetime/numpy/doc/indexing.py | """
==============
Array indexing
==============
Array indexing refers to any use of the square brackets ([]) to index
array values. There are many options to indexing, which give numpy
indexing great power, but with power comes some complexity and the
potential for confusion. This section is just an overview of the
v... | 0 |
public_repos/datetime/numpy | public_repos/datetime/numpy/doc/methods_vs_functions.py | """
=====================
Methods vs. Functions
=====================
Placeholder for Methods vs. Functions documentation.
"""
| 0 |
public_repos/datetime/numpy | public_repos/datetime/numpy/doc/creation.py | """
==============
Array Creation
==============
Introduction
============
There are 5 general mechanisms for creating arrays:
1) Conversion from other Python structures (e.g., lists, tuples)
2) Intrinsic numpy array array creation objects (e.g., arange, ones, zeros,
etc.)
3) Reading arrays from disk, either from... | 0 |
public_repos/datetime/numpy | public_repos/datetime/numpy/doc/broadcasting.py | """
========================
Broadcasting over arrays
========================
The term broadcasting describes how numpy treats arrays with different
shapes during arithmetic operations. Subject to certain constraints,
the smaller array is "broadcast" across the larger array so that they
have compatible shapes. Broadc... | 0 |
public_repos/datetime/numpy | public_repos/datetime/numpy/doc/subclassing.py | """
=============================
Subclassing ndarray in python
=============================
Credits
-------
This page is based with thanks on the wiki page on subclassing by Pierre
Gerard-Marchant - http://www.scipy.org/Subclasses.
Introduction
------------
Subclassing ndarray is relatively simple, but it has som... | 0 |
public_repos/datetime/numpy | public_repos/datetime/numpy/doc/ufuncs.py | """
===================
Universal Functions
===================
Ufuncs are, generally speaking, mathematical functions or operations that are
applied element-by-element to the contents of an array. That is, the result
in each output array element only depends on the value in the corresponding
input array (or arrays) a... | 0 |
public_repos/datetime/numpy | public_repos/datetime/numpy/doc/howtofind.py | """
=================
How to Find Stuff
=================
How to find things in NumPy.
"""
| 0 |
public_repos/datetime/numpy | public_repos/datetime/numpy/doc/jargon.py | """
======
Jargon
======
Placeholder for computer science, engineering and other jargon.
"""
| 0 |
public_repos/datetime/numpy | public_repos/datetime/numpy/doc/io.py | """
=========
Array I/O
=========
Placeholder for array I/O documentation.
"""
| 0 |
public_repos/datetime/numpy | public_repos/datetime/numpy/doc/internals.py | """
===============
Array Internals
===============
Internal organization of numpy arrays
=====================================
It helps to understand a bit about how numpy arrays are handled under the covers to help understand numpy better. This section will not go into great detail. Those wishing to understand the ... | 0 |
public_repos/datetime/numpy | public_repos/datetime/numpy/doc/glossary.py | """
========
Glossary
========
along an axis
Axes are defined for arrays with more than one dimension. A
2-dimensional array has two corresponding axes: the first running
vertically downwards across rows (axis 0), and the second running
horizontally across columns (axis 1).
Many operation can tak... | 0 |
public_repos/datetime/numpy | public_repos/datetime/numpy/doc/__init__.py | import os
ref_dir = os.path.join(os.path.dirname(__file__))
__all__ = [f[:-3] for f in os.listdir(ref_dir) if f.endswith('.py') and
not f.startswith('__')]
__all__.sort()
for f in __all__:
__import__(__name__ + '.' + f)
del f, ref_dir
__doc__ = """\
Topical documentation
=====================
The f... | 0 |
public_repos/datetime/numpy | public_repos/datetime/numpy/linalg/lapack_litemodule.c | /*This module contributed by Doug Heisterkamp
Modified by Jim Hugunin
More modifications by Jeff Whitaker
*/
#include "Python.h"
#include "numpy/noprefix.h"
#ifdef NO_APPEND_FORTRAN
# define FNAME(x) x
#else
# define FNAME(x) x##_
#endif
typedef struct { float r, i; } f2c_complex;
typedef struct { double r, i; } f2c... | 0 |
public_repos/datetime/numpy | public_repos/datetime/numpy/linalg/dlamch.c | #include <stdio.h>
#include "f2c.h"
/* If config.h is available, we only need dlamc3 */
#ifndef HAVE_CONFIG
doublereal dlamch_(char *cmach)
{
/* -- LAPACK auxiliary routine (version 3.0) --
Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
Courant Institute, Argonne National Lab, and Ric... | 0 |
public_repos/datetime/numpy | public_repos/datetime/numpy/linalg/blas_lite.c | /*
NOTE: This is generated code. Look in Misc/lapack_lite for information on
remaking this file.
*/
#include "f2c.h"
#ifdef HAVE_CONFIG
#include "config.h"
#else
extern doublereal dlamch_(char *);
#define EPSILON dlamch_("Epsilon")
#define SAFEMINIMUM dlamch_("Safe minimum")
#define PRECISION dlamch_("Precision"... | 0 |
public_repos/datetime/numpy | public_repos/datetime/numpy/linalg/setup.py |
import sys
def configuration(parent_package='',top_path=None):
from numpy.distutils.misc_util import Configuration
from numpy.distutils.system_info import get_info
config = Configuration('linalg',parent_package,top_path)
config.add_data_dir('tests')
# Configure lapack_lite
lapack_info = get_... | 0 |
public_repos/datetime/numpy | public_repos/datetime/numpy/linalg/setupscons.py |
def configuration(parent_package='',top_path=None):
from numpy.distutils.misc_util import Configuration
from numpy.distutils.system_info import get_info
config = Configuration('linalg',parent_package,top_path)
config.add_data_dir('tests')
config.add_sconscript('SConstruct',
... | 0 |
public_repos/datetime/numpy | public_repos/datetime/numpy/linalg/info.py | """\
Core Linear Algebra Tools
-------------------------
Linear algebra basics:
- norm Vector or matrix norm
- inv Inverse of a square matrix
- solve Solve a linear system of equations
- det Determinant of a square matrix
- lstsq Solve linear least-squares problem... | 0 |
public_repos/datetime/numpy | public_repos/datetime/numpy/linalg/python_xerbla.c | #include "Python.h"
#include "f2c.h"
/*
From the original manpage:
--------------------------
XERBLA is an error handler for the LAPACK routines.
It is called by an LAPACK routine if an input parameter has an invalid value.
A message is printed and execution stops.
Instead of printing a message and stoppi... | 0 |
public_repos/datetime/numpy | public_repos/datetime/numpy/linalg/f2c.h | /* f2c.h -- Standard Fortran to C header file */
/** barf [ba:rf] 2. "He suggested using FORTRAN, and everybody barfed."
- From The Shogakukan DICTIONARY OF NEW ENGLISH (Second edition) */
#ifndef F2C_INCLUDE
#define F2C_INCLUDE
typedef int integer;
typedef char *address;
typedef short int shortint;
typedef ... | 0 |
public_repos/datetime/numpy | public_repos/datetime/numpy/linalg/f2c_lite.c | #include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "f2c.h"
extern void s_wsfe(cilist *f) {;}
extern void e_wsfe(void) {;}
extern void do_fio(integer *c, char *s, ftnlen l) {;}
/* You'll want this if you redo the *_lite.c files with the -C option
* to f2c for checking array subscri... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.