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/f2py/docs | public_repos/numpy-refactor/numpy/f2py/docs/usersguide/default.css | /*
:Author: David Goodger
:Contact: goodger@users.sourceforge.net
:date: $Date: 2002/12/07 23:59:33 $
:version: $Revision: 1.2 $
:copyright: This stylesheet has been placed in the public domain.
Default cascading style sheet for the HTML output of Docutils.
*/
body {
background: #FFFFFF ;
color: #000000
}
a.foot... | 0 |
public_repos/numpy-refactor/numpy/f2py/docs | public_repos/numpy-refactor/numpy/f2py/docs/usersguide/callback.f | C FILE: CALLBACK.F
SUBROUTINE FOO(FUN,R)
EXTERNAL FUN
INTEGER I
REAL*8 R
Cf2py intent(out) r
R = 0D0
DO I=-5,5
R = R + FUN(I)
ENDDO
END
C END OF FILE CALLBACK.F
| 0 |
public_repos/numpy-refactor/numpy/f2py/docs | public_repos/numpy-refactor/numpy/f2py/docs/usersguide/calculate.f | subroutine calculate(x,n)
cf2py intent(callback) func
external func
c The following lines define the signature of func for F2PY:
cf2py real*8 y
cf2py y = func(y)
c
cf2py intent(in,out,copy) x
integer n,i
real*8 x(n)
do i=1,n
x(i) = func(x(i))
end do
end
| 0 |
public_repos/numpy-refactor/numpy/f2py/docs | public_repos/numpy-refactor/numpy/f2py/docs/usersguide/string_session.dat | >>> import mystring
>>> print mystring.foo.__doc__
foo - Function signature:
foo(a,b,c,d)
Required arguments:
a : input string(len=5)
b : in/output rank-0 array(string(len=5),'c')
c : input string(len=-1)
d : in/output rank-0 array(string(len=-1),'c')
>>> import Numeric
>>> a=Numeric.array('123')
>>> b=Numer... | 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/ma/timer_comparison.py | import timeit
import sys
import numpy as np
from numpy import float_
import np.core.fromnumeric as fromnumeric
from np.testing.utils import build_err_msg
np.seterr(all='ignore')
pi = np.pi
if sys.version_info[0] >= 3:
from functools import reduce
class moduletester:
def __init__(self, module):
sel... | 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/ma/API_CHANGES.txt | .. -*- rest -*-
==================================================
API changes in the new masked array implementation
==================================================
Masked arrays are subclasses of ndarray
---------------------------------------
Contrary to the original implementation, masked arrays are now regul... | 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/ma/README.txt | ==================================
A Guide to Masked Arrays in NumPy
==================================
.. Contents::
See http://www.scipy.org/scipy/numpy/wiki/MaskedArray
for updates of this document.
History
-------
As a regular user of MaskedArray, I (Pierre G.F. Gerard-Marchant) became
increasingly frustrated ... | 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/ma/setup.py | #!/usr/bin/env python
__author__ = "Pierre GF Gerard-Marchant ($Author: jarrod.millman $)"
__version__ = '1.0'
__revision__ = "$Revision: 3473 $"
__date__ = '$Date: 2007-10-29 17:18:13 +0200 (Mon, 29 Oct 2007) $'
import os
def configuration(parent_package='',top_path=None):
from numpy.distutils.misc_util impo... | 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/ma/setupscons.py | #!/usr/bin/env python
__author__ = "Pierre GF Gerard-Marchant ($Author: jarrod.millman $)"
__version__ = '1.0'
__revision__ = "$Revision: 3473 $"
__date__ = '$Date: 2007-10-29 17:18:13 +0200 (Mon, 29 Oct 2007) $'
import os
def configuration(parent_package='',top_path=None):
from numpy.distutils.misc_util impo... | 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/ma/core.py | """
numpy.ma : a package to handle missing or invalid values.
This package was initially written for numarray by Paul F. Dubois
at Lawrence Livermore National Laboratory.
In 2006, the package was completely rewritten by Pierre Gerard-Marchant
(University of Georgia) to make the MaskedArray class a subclass of ndarray,... | 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/ma/bench.py | #! python
# encoding: utf-8
import timeit
#import IPython.ipapi
#ip = IPython.ipapi.get()
#from IPython import ipmagic
import numpy
#from numpy import ma
#from numpy.ma import filled
#from numpy.ma.testutils import assert_equal
#####---------------------------------------------------------------------------
#---- --... | 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/ma/testutils.py | """Miscellaneous functions for testing masked arrays and subclasses
:author: Pierre Gerard-Marchant
:contact: pierregm_at_uga_dot_edu
:version: $Id: testutils.py 3529 2007-11-13 08:01:14Z jarrod.millman $
"""
__author__ = "Pierre GF Gerard-Marchant ($Author: jarrod.millman $)"
__version__ = "1.0"
__revision__ = "$Revi... | 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/ma/version.py | """Version number"""
version = '1.00'
release = False
if not release:
import core
import extras
revision = [core.__revision__.split(':')[-1][:-1].strip(),
extras.__revision__.split(':')[-1][:-1].strip(),]
version += '.dev%04i' % max([int(rev) for rev in revision])
| 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/ma/LICENSE | * Copyright (c) 2006, University of Georgia and Pierre G.F. Gerard-Marchant
* All rights reserved.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright
*... | 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/ma/mrecords.py | """:mod:`numpy.ma..mrecords`
Defines the equivalent of :class:`numpy.recarrays` for masked arrays,
where fields can be accessed as attributes.
Note that :class:`numpy.ma.MaskedArray` already supports structured datatypes
and the masking of individual fields.
:author: Pierre Gerard-Marchant
"""
#!!!: * We should make ... | 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/ma/extras.py | """
Masked arrays add-ons.
A collection of utilities for `numpy.ma`.
:author: Pierre Gerard-Marchant
:contact: pierregm_at_uga_dot_edu
:version: $Id: extras.py 3473 2007-10-29 15:18:13Z jarrod.millman $
"""
__author__ = "Pierre GF Gerard-Marchant ($Author: jarrod.millman $)"
__version__ = '1.0'
__revision__ = "$Revi... | 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/ma/__init__.py | """
=============
Masked Arrays
=============
Arrays sometimes contain invalid or missing data. When doing operations
on such arrays, we wish to suppress invalid values, which is the purpose masked
arrays fulfill (an example of typical use is given below).
For example, examine the following array:
>>> x = np.array(... | 0 |
public_repos/numpy-refactor/numpy/ma | public_repos/numpy-refactor/numpy/ma/tests/test_extras.py | # pylint: disable-msg=W0611, W0612, W0511
"""Tests suite for MaskedArray.
Adapted from the original test_ma by Pierre Gerard-Marchant
:author: Pierre Gerard-Marchant
:contact: pierregm_at_uga_dot_edu
:version: $Id: test_extras.py 3473 2007-10-29 15:18:13Z jarrod.millman $
"""
__author__ = "Pierre GF Gerard-Marchant ($... | 0 |
public_repos/numpy-refactor/numpy/ma | public_repos/numpy-refactor/numpy/ma/tests/test_mrecords.py | # pylint: disable-msg=W0611, W0612, W0511,R0201
"""Tests suite for mrecords.
:author: Pierre Gerard-Marchant
:contact: pierregm_at_uga_dot_edu
"""
__author__ = "Pierre GF Gerard-Marchant ($Author: jarrod.millman $)"
__revision__ = "$Revision: 3473 $"
__date__ = '$Date: 2007-10-29 17:18:13 +0200 (Mon, 29 Oct 2007) ... | 0 |
public_repos/numpy-refactor/numpy/ma | public_repos/numpy-refactor/numpy/ma/tests/test_regression.py | from numpy.testing import *
import numpy as np
rlevel = 1
class TestRegression(TestCase):
def test_masked_array_create(self,level=rlevel):
"""Ticket #17"""
x = np.ma.masked_array([0,1,2,3,0,4,5,6],mask=[0,0,0,1,1,1,0,0])
assert_array_equal(np.ma.nonzero(x),[[1,2,6,7]])
def test_masked... | 0 |
public_repos/numpy-refactor/numpy/ma | public_repos/numpy-refactor/numpy/ma/tests/test_core.py | # pylint: disable-msg=W0401,W0511,W0611,W0612,W0614,R0201,E1102
"""Tests suite for MaskedArray & subclassing.
:author: Pierre Gerard-Marchant
:contact: pierregm_at_uga_dot_edu
"""
__author__ = "Pierre GF Gerard-Marchant"
import types
import warnings
import numpy as np
import numpy.core.fromnumeric as fromnumeric
fr... | 0 |
public_repos/numpy-refactor/numpy/ma | public_repos/numpy-refactor/numpy/ma/tests/test_old_ma.py | import numpy
import types
from numpy.ma import *
from numpy.core.numerictypes import float32
from numpy.ma.core import umath
from numpy.testing import *
import sys
if sys.version_info[0] >= 3:
from functools import reduce
pi = numpy.pi
def eq(v, w, msg=''):
result = allclose(v, w)
if not result:
p... | 0 |
public_repos/numpy-refactor/numpy/ma | public_repos/numpy-refactor/numpy/ma/tests/test_subclassing.py | # pylint: disable-msg=W0611, W0612, W0511,R0201
"""Tests suite for MaskedArray & subclassing.
:author: Pierre Gerard-Marchant
:contact: pierregm_at_uga_dot_edu
:version: $Id: test_subclassing.py 3473 2007-10-29 15:18:13Z jarrod.millman $
"""
__author__ = "Pierre GF Gerard-Marchant ($Author: jarrod.millman $)"
__versio... | 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/distutils/line_endings.py | """ Functions for converting from DOS to UNIX line endings
"""
import sys, re, os
def dos2unix(file):
"Replace CRLF with LF in argument files. Print names of changed files."
if os.path.isdir(file):
print file, "Directory!"
return
data = open(file, "rb").read()
if '\0' in data:
... | 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/distutils/mingw32ccompiler.py | """
Support code for building Python extensions on Windows.
# NT stuff
# 1. Make sure libpython<version>.a exists for gcc. If not, build it.
# 2. Force windows to use gcc (we're struggling with MSVC and g77 support)
# 3. Force windows to use g77
"""
import os
import subprocess
import sys
import subp... | 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/distutils/log.py | # Colored log, requires Python 2.3 or up.
import sys
from distutils.log import *
from distutils.log import Log as old_Log
from distutils.log import _global_log
if sys.version_info[0] < 3:
from misc_util import red_text, default_text, cyan_text, green_text, is_sequence, is_string
else:
from numpy.distutils.mis... | 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/distutils/intelccompiler.py |
from distutils.unixccompiler import UnixCCompiler
from numpy.distutils.exec_command import find_executable
class IntelCCompiler(UnixCCompiler):
""" A modified Intel compiler compatible with an gcc built Python.
"""
compiler_type = 'intel'
cc_exe = 'icc'
def __init__ (self, verbose=0, dry_run=0,... | 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/distutils/setup.py | #!/usr/bin/env python
def configuration(parent_package='',top_path=None):
from numpy.distutils.misc_util import Configuration
config = Configuration('distutils',parent_package,top_path)
config.add_subpackage('command')
config.add_subpackage('fcompiler')
config.add_data_dir('tests')
config.add_d... | 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/distutils/__version__.py | major = 0
minor = 4
micro = 0
version = '%(major)d.%(minor)d.%(micro)d' % (locals())
| 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/distutils/ccompiler.py | import re
import os
import sys
import types
from copy import copy
from distutils.ccompiler import *
from distutils import ccompiler
from distutils.errors import DistutilsExecError, DistutilsModuleError, \
DistutilsPlatformError
from distutils.sysconfig import customize_compiler
from distut... | 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/distutils/interactive.py | import os
import sys
from pprint import pformat
__all__ = ['interactive_sys_argv']
def show_information(*args):
print 'Python',sys.version
for a in ['platform','prefix','byteorder','path']:
print 'sys.%s = %s' % (a,pformat(getattr(sys,a)))
for a in ['name']:
print 'os.%s = %s' % (a,pformat... | 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/distutils/conv_template.py | #!/usr/bin/python
"""
takes templated file .xxx.src and produces .xxx file where .xxx is
.i or .c or .h, using the following template rules
/**begin repeat -- on a line by itself marks the start of a repeated code
segment
/**end repeat**/ -- on a line by itself marks it's end
After the /**begin ... | 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/distutils/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('distutils',parent_package,top_path)
config.add_subpackage('command')
config.add_subpackage('fcompiler')
config.add_data_dir('tests')
... | 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/distutils/info.py | """
Enhanced distutils with Fortran compilers support and more.
"""
postpone_import = True
| 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/distutils/lib2def.py | import re
import sys
import os
import subprocess
__doc__ = """This module generates a DEF file from the symbols in
an MSVC-compiled DLL import library. It correctly discriminates between
data and functions. The data is collected from the output of the program
nm(1).
Usage:
python lib2def.py [libname.lib] [outpu... | 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/distutils/core.py |
import sys
from distutils.core import *
if 'setuptools' in sys.modules:
have_setuptools = True
from setuptools import setup as old_setup
# easy_install imports math, it may be picked up from cwd
from setuptools.command import easy_install
try:
# very old versions of setuptools don't have t... | 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/distutils/numpy_distribution.py | # XXX: Handle setuptools ?
from distutils.core import Distribution
# This class is used because we add new files (sconscripts, and so on) with the
# scons command
class NumpyDistribution(Distribution):
def __init__(self, attrs = None):
# A list of (sconscripts, pre_hook, post_hook, src, parent_names)
... | 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/distutils/exec_command.py | #!/usr/bin/env python
"""
exec_command
Implements exec_command function that is (almost) equivalent to
commands.getstatusoutput function but on NT, DOS systems the
returned status is actually correct (though, the returned status
values may be different by a factor). In addition, exec_command
takes keyword arguments fo... | 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/distutils/unixccompiler.py | """
unixccompiler - can handle very long argument lists for ar.
"""
import os
from distutils.errors import DistutilsExecError, CompileError
from distutils.unixccompiler import *
from numpy.distutils.ccompiler import replace_method
from numpy.distutils.compat import get_exception
if sys.version_info[0] < 3:
impor... | 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/distutils/compat.py | """Small modules to cope with python 2 vs 3 incompatibilities inside
numpy.distutils
"""
import sys
def get_exception():
return sys.exc_info()[1]
| 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/distutils/npy_pkg_config.py | import sys
if sys.version_info[0] < 3:
from ConfigParser import SafeConfigParser, NoOptionError
else:
from configparser import SafeConfigParser, NoOptionError
import re
import os
import shlex
__all__ = ['FormatError', 'PkgNotFound', 'LibraryInfo', 'VariableSet',
'read_config', 'parse_flags']
_VAR = re... | 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/distutils/misc_util.py | import os
import re
import sys
import imp
import copy
import glob
import atexit
import tempfile
import subprocess
import shutil
from distutils.errors import DistutilsError
try:
set
except NameError:
from sets import Set as set
from numpy.distutils.compat import get_exception
__all__ = ['Configuration', 'get... | 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/distutils/system_info.py | #!/bin/env python
"""
This file defines a set of system_info classes for getting
information about various resources (libraries, library directories,
include directories, etc.) in the system. Currently, the following
classes are available:
ndarray_info
atlas_info
atlas_threads_info
atlas_blas_info
atlas_blas... | 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/distutils/environment.py | import os
from distutils.dist import Distribution
__metaclass__ = type
class EnvironmentConfig:
def __init__(self, distutils_section='ALL', **kw):
self._distutils_section = distutils_section
self._conf_keys = kw
self._conf = None
self._hook_handler = None
def dump_variable(sel... | 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/distutils/__init__.py | import sys
if sys.version_info[0] < 3:
from __version__ import version as __version__
# Must import local ccompiler ASAP in order to get
# customized CCompiler.spawn effective.
import ccompiler
import unixccompiler
from info import __doc__
from npy_pkg_config import *
try:
imp... | 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/distutils/extension.py | """distutils.extension
Provides the Extension class, used to describe C/C++ extension
modules in setup scripts.
Overridden to support f2py.
"""
__revision__ = "$Id: extension.py,v 1.1 2005/04/09 19:29:34 pearu Exp $"
from distutils.extension import Extension as old_Extension
import re
cxx_ext_re = re.compile(r'.*[... | 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/distutils/from_template.py | #!/usr/bin/python
"""
process_file(filename)
takes templated file .xxx.src and produces .xxx file where .xxx
is .pyf .f90 or .f using the following template rules:
'<..>' denotes a template.
All function and subroutine blocks in a source file with names that
contain '<..>' will be replicated according to ... | 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/distutils/cpuinfo.py | #!/usr/bin/env python
"""
cpuinfo
Copyright 2002 Pearu Peterson all rights reserved,
Pearu Peterson <pearu@cens.ioc.ee>
Permission to use, modify, and distribute this software is given under the
terms of the NumPy (BSD style) license. See LICENSE.txt that came with
this distribution for specifics.
NO WARRANTY IS EXP... | 0 |
public_repos/numpy-refactor/numpy/distutils | public_repos/numpy-refactor/numpy/distutils/command/build_clib.py | """ Modified version of build_clib that handles fortran source files.
"""
import os
from glob import glob
import shutil
from distutils.command.build_clib import build_clib as old_build_clib
from distutils.errors import DistutilsSetupError, DistutilsError, \
DistutilsFileError
from numpy.distutils import log
from... | 0 |
public_repos/numpy-refactor/numpy/distutils | public_repos/numpy-refactor/numpy/distutils/command/build_ext.py | """ Modified version of build_ext that handles fortran source files.
"""
import os
import sys
from glob import glob
from distutils.dep_util import newer_group
from distutils.command.build_ext import build_ext as old_build_ext
from distutils.errors import DistutilsFileError, DistutilsSetupError,\
DistutilsError
f... | 0 |
public_repos/numpy-refactor/numpy/distutils | public_repos/numpy-refactor/numpy/distutils/command/build_src.py | """ Build swig, f2py, pyrex sources.
"""
import os
import re
import sys
import shlex
import copy
from distutils.command import build_ext
from distutils.dep_util import newer_group, newer
from distutils.util import get_platform
from distutils.errors import DistutilsError, DistutilsSetupError
def have_pyrex():
try... | 0 |
public_repos/numpy-refactor/numpy/distutils | public_repos/numpy-refactor/numpy/distutils/command/install_data.py | import sys
have_setuptools = ('setuptools' in sys.modules)
from distutils.command.install_data import install_data as old_install_data
#data installer with improved intelligence over distutils
#data files are copied into the project directory instead
#of willy-nilly
class install_data (old_install_data):
def run... | 0 |
public_repos/numpy-refactor/numpy/distutils | public_repos/numpy-refactor/numpy/distutils/command/scons.py | import os
import sys
import os.path
from os.path import join as pjoin, dirname as pdirname
from distutils.errors import DistutilsPlatformError
from distutils.errors import DistutilsExecError, DistutilsSetupError
from numpy.distutils.command.build_ext import build_ext as old_build_ext
from numpy.distutils.ccompiler im... | 0 |
public_repos/numpy-refactor/numpy/distutils | public_repos/numpy-refactor/numpy/distutils/command/install_headers.py | import os
from distutils.command.install_headers import install_headers as old_install_headers
class install_headers (old_install_headers):
def run (self):
headers = self.distribution.headers
if not headers:
return
prefix = os.path.dirname(self.install_dir)
for header ... | 0 |
public_repos/numpy-refactor/numpy/distutils | public_repos/numpy-refactor/numpy/distutils/command/config_compiler.py | from distutils.core import Command
from numpy.distutils import log
#XXX: Linker flags
def show_fortran_compilers(_cache=[]):
# Using cache to prevent infinite recursion
if _cache: return
_cache.append(1)
from numpy.distutils.fcompiler import show_fcompilers
import distutils.core
dist = distuti... | 0 |
public_repos/numpy-refactor/numpy/distutils | public_repos/numpy-refactor/numpy/distutils/command/config.py | # Added Fortran compiler support to config. Currently useful only for
# try_compile call. try_run works but is untested for most of Fortran
# compilers (they must define linker_exe first).
# Pearu Peterson
import os, signal
import warnings
import sys
from distutils.command.config import config as old_config
from dist... | 0 |
public_repos/numpy-refactor/numpy/distutils | public_repos/numpy-refactor/numpy/distutils/command/egg_info.py | from setuptools.command.egg_info import egg_info as _egg_info
class egg_info(_egg_info):
def run(self):
# We need to ensure that build_src has been executed in order to give
# setuptools' egg_info command real filenames instead of functions which
# generate files.
self.run_command("... | 0 |
public_repos/numpy-refactor/numpy/distutils | public_repos/numpy-refactor/numpy/distutils/command/build_py.py |
from distutils.command.build_py import build_py as old_build_py
from numpy.distutils.misc_util import is_string
class build_py(old_build_py):
def run(self):
build_src = self.get_finalized_command('build_src')
if build_src.py_modules_dict and self.packages is None:
self.packages = buil... | 0 |
public_repos/numpy-refactor/numpy/distutils | public_repos/numpy-refactor/numpy/distutils/command/bdist_rpm.py | import os
import sys
if 'setuptools' in sys.modules:
from setuptools.command.bdist_rpm import bdist_rpm as old_bdist_rpm
else:
from distutils.command.bdist_rpm import bdist_rpm as old_bdist_rpm
class bdist_rpm(old_bdist_rpm):
def _make_spec_file(self):
spec_file = old_bdist_rpm._make_spec_file(sel... | 0 |
public_repos/numpy-refactor/numpy/distutils | public_repos/numpy-refactor/numpy/distutils/command/install.py | import sys
if 'setuptools' in sys.modules:
import setuptools.command.install as old_install_mod
have_setuptools = True
else:
import distutils.command.install as old_install_mod
have_setuptools = False
old_install = old_install_mod.install
from distutils.file_util import write_file
class install(old_ins... | 0 |
public_repos/numpy-refactor/numpy/distutils | public_repos/numpy-refactor/numpy/distutils/command/install_clib.py | import os
from distutils.core import Command
from distutils.ccompiler import new_compiler
from numpy.distutils.misc_util import get_cmd
class install_clib(Command):
description = "Command to install installable C libraries"
user_options = []
def initialize_options(self):
self.install_dir = None
... | 0 |
public_repos/numpy-refactor/numpy/distutils | public_repos/numpy-refactor/numpy/distutils/command/develop.py | """ Override the develop command from setuptools so we can ensure that our
generated files (from build_src or build_scripts) are properly converted to real
files with filenames.
"""
from setuptools.command.develop import develop as old_develop
class develop(old_develop):
__doc__ = old_develop.__doc__
def inst... | 0 |
public_repos/numpy-refactor/numpy/distutils | public_repos/numpy-refactor/numpy/distutils/command/build_scripts.py | """ Modified version of build_scripts that handles building scripts from functions.
"""
from distutils.command.build_scripts import build_scripts as old_build_scripts
from numpy.distutils import log
from numpy.distutils.misc_util import is_string
class build_scripts(old_build_scripts):
def generate_scripts(self,... | 0 |
public_repos/numpy-refactor/numpy/distutils | public_repos/numpy-refactor/numpy/distutils/command/sdist.py | import sys
if 'setuptools' in sys.modules:
from setuptools.command.sdist import sdist as old_sdist
else:
from distutils.command.sdist import sdist as old_sdist
from numpy.distutils.misc_util import get_data_files
class sdist(old_sdist):
def add_defaults (self):
old_sdist.add_defaults(self)
... | 0 |
public_repos/numpy-refactor/numpy/distutils | public_repos/numpy-refactor/numpy/distutils/command/autodist.py | """This module implements additional tests ala autoconf which can be useful."""
# We put them here since they could be easily reused outside numpy.distutils
def check_inline(cmd):
"""Return the inline identifier (may be empty)."""
cmd._check_compiler()
body = """
#ifndef __cplusplus
static %(inline)s int ... | 0 |
public_repos/numpy-refactor/numpy/distutils | public_repos/numpy-refactor/numpy/distutils/command/__init__.py | """distutils.command
Package containing implementation of all the standard Distutils
commands."""
__revision__ = "$Id: __init__.py,v 1.3 2005/05/16 11:08:49 pearu Exp $"
distutils_all = [ #'build_py',
'clean',
'install_clib',
'install_scripts',
... | 0 |
public_repos/numpy-refactor/numpy/distutils | public_repos/numpy-refactor/numpy/distutils/command/build.py | import os
import sys
from distutils.command.build import build as old_build
from distutils.util import get_platform
from numpy.distutils.command.config_compiler import show_fortran_compilers
class build(old_build):
sub_commands = [('config_cc', lambda *args: True),
('config_fc', lambda... | 0 |
public_repos/numpy-refactor/numpy/distutils | public_repos/numpy-refactor/numpy/distutils/fcompiler/pg.py |
# http://www.pgroup.com
from numpy.distutils.fcompiler import FCompiler
from sys import platform
compilers = ['PGroupFCompiler']
class PGroupFCompiler(FCompiler):
compiler_type = 'pg'
description = 'Portland Group Fortran Compiler'
version_pattern = r'\s*pg(f77|f90|hpf) (?P<version>[\d.-]+).*'
if... | 0 |
public_repos/numpy-refactor/numpy/distutils | public_repos/numpy-refactor/numpy/distutils/fcompiler/gnu.py | import re
import os
import sys
import warnings
import platform
import tempfile
from subprocess import Popen, PIPE, STDOUT
from numpy.distutils.cpuinfo import cpu
from numpy.distutils.fcompiler import FCompiler
from numpy.distutils.exec_command import exec_command
from numpy.distutils.misc_util import msvc_runtime_libr... | 0 |
public_repos/numpy-refactor/numpy/distutils | public_repos/numpy-refactor/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/numpy-refactor/numpy/distutils | public_repos/numpy-refactor/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/numpy-refactor/numpy/distutils | public_repos/numpy-refactor/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/numpy-refactor/numpy/distutils | public_repos/numpy-refactor/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/numpy-refactor/numpy/distutils | public_repos/numpy-refactor/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/numpy-refactor/numpy/distutils | public_repos/numpy-refactor/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/numpy-refactor/numpy/distutils | public_repos/numpy-refactor/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/numpy-refactor/numpy/distutils | public_repos/numpy-refactor/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/numpy-refactor/numpy/distutils | public_repos/numpy-refactor/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/numpy-refactor/numpy/distutils | public_repos/numpy-refactor/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/numpy-refactor/numpy/distutils | public_repos/numpy-refactor/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/numpy-refactor/numpy/distutils | public_repos/numpy-refactor/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/numpy-refactor/numpy/distutils | public_repos/numpy-refactor/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/numpy-refactor/numpy/distutils | public_repos/numpy-refactor/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/numpy-refactor/numpy/distutils | public_repos/numpy-refactor/numpy/distutils/tests/test_npy_pkg_config.py | import sys
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', 'libfla... | 0 |
public_repos/numpy-refactor/numpy/distutils | public_repos/numpy-refactor/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/numpy-refactor/numpy/distutils | public_repos/numpy-refactor/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/numpy-refactor/numpy/distutils/tests | public_repos/numpy-refactor/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/numpy-refactor/numpy/distutils/tests/f2py_f90_ext | public_repos/numpy-refactor/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/numpy-refactor/numpy/distutils/tests/f2py_f90_ext | public_repos/numpy-refactor/numpy/distutils/tests/f2py_f90_ext/src/foo_free.f90 | module foo_free
contains
include "body.f90"
end module foo_free
| 0 |
public_repos/numpy-refactor/numpy/distutils/tests/f2py_f90_ext | public_repos/numpy-refactor/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/numpy-refactor/numpy/distutils/tests | public_repos/numpy-refactor/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/numpy-refactor/numpy/distutils/tests/f2py_ext | public_repos/numpy-refactor/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/numpy-refactor/numpy/distutils/tests/f2py_ext | public_repos/numpy-refactor/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/numpy-refactor/numpy/distutils/tests/f2py_ext | public_repos/numpy-refactor/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/numpy-refactor/numpy/distutils/tests | public_repos/numpy-refactor/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/numpy-refactor/numpy/distutils/tests | public_repos/numpy-refactor/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/numpy-refactor/numpy/distutils/tests/pyrex_ext | public_repos/numpy-refactor/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/numpy-refactor/numpy/distutils/tests | public_repos/numpy-refactor/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/numpy-refactor/numpy/distutils/tests/swig_ext | public_repos/numpy-refactor/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/numpy-refactor/numpy/distutils/tests/swig_ext | public_repos/numpy-refactor/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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.