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 | public_repos/numpy-refactor/numpy/NumpyDotNet/NpyIndexes.cs | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;
using Microsoft.Scripting.Runtime;
namespace NumpyDotNet
{
internal class NpyIndexes : IDisposable
{
public NpyIndexes()
{
indexes = Marshal.AllocCoTaskMem(... | 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/NumpyDotNet/shape.cs | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using IronPython.Runtime;
namespace NumpyDotNet
{
public partial class ndarray {
internal ndarray Flatten(NpyDefs.NPY_ORDER order) {
return NpyCoreApi.Flatten(this, order);
}
internal ndarra... | 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/NumpyDotNet/NpyDescr.cs | using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Numerics;
using IronPython.Runtime;
using IronPython.Runtime.Types;
using IronPython.Runtime.Operations;
using IronPython.Modules;
using Microsoft.Scripting;
namespace NumpyDotNet ... | 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/NumpyDotNet/NpyCoreApi.cs | using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Security;
using System.Text;
using System.Runtime.InteropServices;
using System.Runtime.CompilerServices;
using System.Threading;
using IronPython.Runtime;
using IronPython.Runtime.Types;
using IronPython.Runtime.O... | 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/NumpyDotNet/umath.cs | using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Runtime.CompilerServices;
using System.Text;
using IronPython.Runtime;
using IronPython.Modules;
using IronPython.Runtime.Exceptions;
using IronPython.Runtime.Types;
using IronPython.Runtime.Operations... | 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/NumpyDotNet/UMathModule.cs | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;
using IronPython.Runtime;
using IronPython.Modules;
using Microsoft.Scripting;
using NumpyDotNet;
namespace NumpyDotNet
{
/// <summary>
/// Provides access to the core for ufunc and nu... | 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/NumpyDotNet/item_selection.cs | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;
using IronPython.Runtime;
using IronPython.Runtime.Operations;
namespace NumpyDotNet
{
public partial class ndarray : IEnumerable<object>
{
internal ndarray TakeFrom(ndarray indi... | 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/NumpyDotNet/convert.cs | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;
using IronPython.Runtime;
using IronPython.Runtime.Operations;
namespace NumpyDotNet
{
public partial class ndarray
{
internal Bytes ToString(NpyDefs.NPY_ORDER order = NpyDefs.NP... | 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/NumpyDotNet/broadcast.cs | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;
using IronPython.Runtime;
using IronPython.Runtime.Operations;
namespace NumpyDotNet
{
/// <summary>
/// A multi-array iterator.
/// </summary>
public class broadcast : Wrapper, ... | 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/NumpyDotNet/ufunc.cs | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;
using System.Runtime.CompilerServices;
using IronPython.Runtime;
using IronPython.Runtime.Operations;
using IronPython.Runtime.Types;
using IronPython.Modules;
using Microsoft.Scripting;
using Nu... | 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/NumpyDotNet/NumericOps.cs | using System;
using System.Collections.Generic;
using System.Linq;
using System.Numerics;
using System.Runtime.InteropServices;
using System.Runtime.CompilerServices;
using System.Text;
using IronPython.Modules;
using IronPython.Runtime;
using IronPython.Runtime.Types;
using IronPython.Runtime.Operations;
using Micros... | 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/NumpyDotNet/NumpyDotNet.sln |
Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NumpyDotNet", "NumpyDotNet.csproj", "{9D8FA516-085C-40B2-93CA-F3A419B2FCED}"
ProjectSection(ProjectDependencies) = postProject
{B5C0DD2F-2814-4A09-B3AC-96782C38C6EC} = {B5C0DD2F-281... | 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/NumpyDotNet/IArray.cs | using System;
using System.Collections.Generic;
using IronPython.Runtime;
using Microsoft.Scripting;
namespace NumpyDotNet
{
interface IArray
{
object all(object axis = null, ndarray @out = null);
object any(object axis = null, ndarray @out = null);
object argmax(object axis = null, nd... | 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/NumpyDotNet/benchmark.py |
import sys
import time
from numpy import *
UsingIronPython = False
if sys.subversion[0] == 'IronPython':
import System
UsingIronPython = True
#import numbers
#from random import random
class Complex(object):
def __init__(self, r, i):
self.__r = r
self.__i = i
def __eq__(self, oth... | 0 |
public_repos/numpy-refactor/numpy | public_repos/numpy-refactor/numpy/NumpyDotNet/NumpyDotNet.csproj | <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
... | 0 |
public_repos/numpy-refactor/numpy/NumpyDotNet | public_repos/numpy-refactor/numpy/NumpyDotNet/NpyAccessLib/Npy_UFunc_Access.cpp | #include <assert.h>
extern "C" {
#include <npy_api.h>
#include <npy_defs.h>
#include <npy_loops.h>
#include <npy_number.h>
#include <npy_math.h>
#include <npy_funcs.h>
#include <npy_ufunc_object.h>
}
typedef void *(*unaryfunc)(void *);
typedef void *(*binaryfunc)(void *, void *);
typedef int (*cmpfunc)(void *, void... | 0 |
public_repos/numpy-refactor/numpy/NumpyDotNet | public_repos/numpy-refactor/numpy/NumpyDotNet/NpyAccessLib/Npy_Array_Access.cpp | #include <assert.h>
extern "C" {
#include <npy_api.h>
#include <npy_defs.h>
#include <npy_os.h>
#include <npy_buffer.h>
#include <npy_arrayobject.h>
#include <npy_descriptor.h>
#include <npy_object.h>
#include <npy_dict.h>
#include <npy_ufunc_object.h>
#include <npy_iterators.h>
}
///
/// This library provides a set... | 0 |
public_repos/numpy-refactor/numpy/NumpyDotNet | public_repos/numpy-refactor/numpy/NumpyDotNet/NpyAccessLib/generate_code.bat | @echo off
"%IRONPYTHON_HOME%/ipy.exe" ..\..\core\code_generators\generate_umath.py
| 0 |
public_repos/numpy-refactor/numpy/NumpyDotNet | public_repos/numpy-refactor/numpy/NumpyDotNet/NpyAccessLib/NpyAccessLib.vcxproj | <?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>... | 0 |
public_repos/numpy-refactor/numpy/NumpyDotNet | public_repos/numpy-refactor/numpy/NumpyDotNet/NpyAccessLib/NpyAccessLib.vcxproj.filters | <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx... | 0 |
public_repos/numpy-refactor/numpy/NumpyDotNet | public_repos/numpy-refactor/numpy/NumpyDotNet/NpyAccessLib/NpyAccessLib.vcxproj.user | <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
</Project> | 0 |
public_repos/numpy-refactor/numpy/NumpyDotNet | public_repos/numpy-refactor/numpy/NumpyDotNet/Properties/AssemblyInfo.cs | using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Do... | 0 |
public_repos/numpy-refactor/numpy/NumpyDotNet | public_repos/numpy-refactor/numpy/NumpyDotNet/tests/test_multiarray.py |
import numpy as np
from numpy.core import *
from numpy.testing import *
from unittest import TestCase
import unittest
import random
import tempfile
import os
import warnings
from numpy.compat import asbytes, getexception, strchar
class TestFlags(TestCase):
def setUp(self):
self.a = arange(10)
def te... | 0 |
public_repos/numpy-refactor/numpy/NumpyDotNet | public_repos/numpy-refactor/numpy/NumpyDotNet/tests/test_dtype.py | import numpy as np
from numpy.testing import *
class TestBuiltin(TestCase):
def test_run(self):
"""Only test hash runs at all."""
for t in [np.int, np.float, np.complex, np.int32, np.str, np.object,
np.unicode]:
dt = np.dtype(t)
hash(dt)
class TestRecord(Tes... | 0 |
public_repos/numpy-refactor | public_repos/numpy-refactor/benchmarks/sorting.py | from benchmark import Benchmark
modules = ['numpy','Numeric','numarray']
b = Benchmark(modules,runs=3,reps=100)
N = 10000
b.title = 'Sorting %d elements' % N
b['numarray'] = ('a=np.array(None,shape=%d,typecode="i");a.sort()'%N,'')
b['numpy'] = ('a=np.empty(shape=%d, dtype="i");a.sort()'%N,'')
b['Numeric'] = ('a=np.em... | 0 |
public_repos/numpy-refactor | public_repos/numpy-refactor/benchmarks/casting.py | from benchmark import Benchmark
modules = ['numpy','Numeric','numarray']
b = Benchmark(modules,
title='Casting a (10,10) integer array to float.',
runs=3,reps=10000)
N = [10,10]
b['numpy'] = ('b = a.astype(int)',
'a=numpy.zeros(shape=%s,dtype=float)' % N)
b['Numeric'] = ('b ... | 0 |
public_repos/numpy-refactor | public_repos/numpy-refactor/benchmarks/creating.py | from benchmark import Benchmark
modules = ['numpy','Numeric','numarray']
N = [10,10]
b = Benchmark(modules,
title='Creating %s zeros.' % N,
runs=3,reps=10000)
b['numpy'] = ('a=np.zeros(shape,type)', 'shape=%s;type=float' % N)
b['Numeric'] = ('a=np.zeros(shape,type)', 'shape=%s;type=np.Flo... | 0 |
public_repos/numpy-refactor | public_repos/numpy-refactor/benchmarks/simpleindex.py | import timeit
# This is to show that NumPy is a poorer choice than nested Python lists
# if you are writing nested for loops.
# This is slower than Numeric was but Numeric was slower than Python lists were
# in the first place.
N = 30
code2 = r"""
for k in xrange(%d):
for l in xrange(%d):
res = a[k,l]... | 0 |
public_repos/numpy-refactor | public_repos/numpy-refactor/benchmarks/benchmark.py | from timeit import Timer
class Benchmark(dict):
"""Benchmark a feature in different modules."""
def __init__(self,modules,title='',runs=3,reps=1000):
self.module_test = dict((m,'') for m in modules)
self.runs = runs
self.reps = reps
self.title = title
def __setitem__(self,... | 0 |
public_repos/numpy-refactor | public_repos/numpy-refactor/tools/commitstats.py |
# Run svn log -l <some number>
import re
import numpy as np
import os
names = re.compile(r'r\d+\s[|]\s(.*)\s[|]\s200')
def get_count(filename, repo):
mystr = open(filename).read()
result = names.findall(mystr)
u = np.unique(result)
count = [(x,result.count(x),repo) for x in u]
return count
... | 0 |
public_repos/numpy-refactor | public_repos/numpy-refactor/tools/nptool | #!/usr/bin/env python
#
# This tool helps with various tasks that arise in numpy development and
# testing.
import nptool
import sys
tool = nptool.nptool()
tool.cmd( sys.argv[1:] )
| 0 |
public_repos/numpy-refactor | public_repos/numpy-refactor/tools/py3tool.py | #!/usr/bin/env python3
# -*- python -*-
"""
%prog SUBMODULE...
Hack to pipe submodules of Numpy through 2to3 and build them in-place
one-by-one.
Example usage:
python3 tools/py3tool.py testing distutils core
This will copy files to _py3k/numpy, add a dummy __init__.py and
version.py on the top level, and copy a... | 0 |
public_repos/numpy-refactor | public_repos/numpy-refactor/tools/nptool.py | """nptool - A tool to assist with numpy development and testing.
More documentation here.
"""
import sys
import os
import re
import shutil
from subprocess import *
from np_suppressions import suppressions
def is_suppressed( file, func ):
"Check to see if file:func matches a registered suppression."
# Iterat... | 0 |
public_repos/numpy-refactor | public_repos/numpy-refactor/tools/np_suppressions.py | suppressions = [
# This one cannot be covered by any Python language test because there is
# no code pathway to it. But it is part of the C API, so must not be
# excised from the code.
[ r".*/multiarray/mapping\.", "PyArray_MapIterReset" ],
# PyArray_Std trivially forwards to and appears to be sup... | 0 |
public_repos/numpy-refactor/tools | public_repos/numpy-refactor/tools/numpy-macosx-installer/README.txt | This is a set of scripts used to build the new numpy .dmg installer with
documentation.
The actual content of the dmg is to be put in content: documentation go into
the Documentation subdir, and the .mpkg installer for numpuy itself in the
content directory. The name of the installer should match exactly the one in
th... | 0 |
public_repos/numpy-refactor/tools | public_repos/numpy-refactor/tools/numpy-macosx-installer/new-create-dmg | #! /bin/bash
SRC_FOLDER=content
VOLUME_NAME=numpy
DMG_TEMP_NAME=numpy.tmp.dmg
title="${VOLUME_NAME}"
applicationName=numpy-1.4.0.dev-py2.6.mpkg
finalDMGName=numpy.dmg
backgroundPictureName=dmgbackground.png
WINX=100
WINY=100
WINW=600
WINH=600
ICON_SIZE=128
BACKGROUND_FILE=art/dmgbackground.png
NUMPY_MPKG=""
while te... | 0 |
public_repos/numpy-refactor/tools/numpy-macosx-installer | public_repos/numpy-refactor/tools/numpy-macosx-installer/art/dmgbackground.svg | <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 51448) -->
<svg
xmlns:i="http://ns.adobe.com/AdobeIllustrator/10.0/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf=... | 0 |
public_repos/numpy-refactor/tools | public_repos/numpy-refactor/tools/win32build/README.txt | This directory contains various scripts and code to build binaries installers for
windows.
It can:
- prepare a bootstrap environment to build binary in a self-contained
directory
- build binaries for different architectures using different site.cfg
- prepare a nsis-based installer whi... | 0 |
public_repos/numpy-refactor/tools | public_repos/numpy-refactor/tools/win32build/doall.py | import subprocess
import os
if __name__ == '__main__':
from optparse import OptionParser
parser = OptionParser()
parser.add_option("-p", "--pyver", dest="pyver",
help = "Python version (2.4, 2.5, etc...)")
opts, args = parser.parse_args()
pyver = opts.pyver
if not pyver:... | 0 |
public_repos/numpy-refactor/tools | public_repos/numpy-refactor/tools/win32build/prepare_bootstrap.py | import os
import subprocess
import shutil
from os.path import join as pjoin, split as psplit, dirname
from zipfile import ZipFile
import re
def get_sdist_tarball():
"""Return the name of the installer built by wininst command."""
# Yeah, the name logic is harcoded in distutils. We have to reproduce it
# he... | 0 |
public_repos/numpy-refactor/tools | public_repos/numpy-refactor/tools/win32build/build.py | """Python script to build windows binaries to be fed to the "superpack".
The script is pretty dumb: it assumes python executables are installed the
standard way, and the location for blas/lapack/atlas is harcoded."""
# TODO:
# - integrate the x86analysis script to check built binaries
# - make the config configurab... | 0 |
public_repos/numpy-refactor/tools/win32build | public_repos/numpy-refactor/tools/win32build/misc/x86analysis.py | #! /usr/bin/env python
# Last Change: Sat Mar 28 02:00 AM 2009 J
# Try to identify instruction set used in binary (x86 only). This works by
# checking the assembly for instructions specific to sse, etc... Obviously,
# this won't work all the times (for example, if some instructions are used
# only after proper detecti... | 0 |
public_repos/numpy-refactor/tools/win32build/misc | public_repos/numpy-refactor/tools/win32build/misc/msvcrt90/yop.sh | PATH=/cygdive/c/Mingw-w64/bin:$PATH
gcc -DRUNTIME=msvcr90 -D__msvcr90__=1 -D__MSVCRT__ -C -E -P -xc-header msvcrt.def.in > msvcr90.def
dlltool --as=as -k --dllname msvcr90.dll --output-lib libmsvcr90.a --def msvcr90.def
for key in printf fprintf sprintf vprintf vfprintf vsprintf; do
src=`nm libmsvcr90.a | sed -n -e ... | 0 |
public_repos/numpy-refactor/tools/win32build/misc | public_repos/numpy-refactor/tools/win32build/misc/msvcrt90/msvcrt.def.in | ;
; __FILENAME__
; created from msvcrt.def.in
;* This file has no copyright assigned and is placed in the Public Domain.
;* This file is a part of the mingw-runtime package.
;* No warranty is given; refer to the file DISCLAIMER within the package.
;
; Exports from msvcrt.dll, msvcr70.dll, msvcr71.dll, msvcr80.dll a... | 0 |
public_repos/numpy-refactor/tools/win32build | public_repos/numpy-refactor/tools/win32build/nsis_scripts/numpy-superinstaller.nsi.in | ;--------------------------------
;Include Modern UI
!include "MUI2.nsh"
;SetCompress off ; Useful to disable compression under development
SetCompressor /Solid LZMA ; Useful to disable compression under development
; Include FileFunc for command line parsing options
!include "FileFunc.nsh"
!insertmacro GetParameter... | 0 |
public_repos/numpy-refactor/tools/win32build | public_repos/numpy-refactor/tools/win32build/cpuid/test.c | #include <stdio.h>
#include "cpuid.h"
int main()
{
cpu_caps_t *cpuinfo;
cpuinfo = malloc(sizeof(*cpuinfo));
if (cpuinfo == NULL) {
fprintf(stderr, "Error allocating\n");
}
cpuid_get_caps(cpuinfo);
printf("This cpu string is %s\n", cpuinfo->vendor);
if (cpuinfo->has_mmx) {
printf("This cpu has mmx instr... | 0 |
public_repos/numpy-refactor/tools/win32build | public_repos/numpy-refactor/tools/win32build/cpuid/cpuid.h | #ifndef _GABOU_CPUID_H
#define _GABOU_CPUID_H
#include <stdlib.h>
#define CPUID_VENDOR_STRING_LEN 12
struct _cpu_caps {
int has_cpuid;
int has_mmx;
int has_sse;
int has_sse2;
int has_sse3;
char vendor[CPUID_VENDOR_STRING_LEN+1];
};
typedef struct _cpu_caps cpu_caps_t;
int cpuid_get_caps(cpu_caps_t *cpuinfo... | 0 |
public_repos/numpy-refactor/tools/win32build | public_repos/numpy-refactor/tools/win32build/cpuid/SConstruct | env = Environment(tools = ['mingw'])
#libcpuid = env.SharedLibrary('cpuid', source = ['cpuid.c'])
#test = env.Program('test', source = ['test.c'], LIBS = libcpuid, RPATH = ['.'])
test = env.Program('test', source = ['test.c', 'cpuid.c'])
| 0 |
public_repos/numpy-refactor/tools/win32build | public_repos/numpy-refactor/tools/win32build/cpuid/cpuid.c | /*
* TODO:
* - test for cpuid availability
* - test for OS support (tricky)
*/
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include "cpuid.h"
#ifndef __GNUC__
#error "Sorry, this code can only be compiled with gcc for now"
#endif
/*
* SIMD: SSE 1, 2 and 3, MMX
*/
#define CPUID_FLAG_MMX 1 <<... | 0 |
public_repos/numpy-refactor/tools/win32build | public_repos/numpy-refactor/tools/win32build/cpucaps/cpucaps_main.h | #ifndef _EXDLL_H_
#define _EXDLL_H_
#include <windows.h>
#if defined(__GNUC__)
#define UNUSED __attribute__((unused))
#else
#define UNUSED
#endif
// only include this file from one place in your DLL.
// (it is all static, if you use it in two places it will fail)
#define EXDLL_INIT() { \
g_string... | 0 |
public_repos/numpy-refactor/tools/win32build | public_repos/numpy-refactor/tools/win32build/cpucaps/cpucaps_main.c | #include <stdio.h>
#include <windows.h>
#include "cpucaps_main.h"
#include "cpuid.h"
HINSTANCE g_hInstance;
HWND g_hwndParent;
#define CPUID_FAILED "Unknown"
/*
* if val is true, str is the "Y" string, otherwise the "N" string
*/
static int _set_bool_str(int val, char* str)
{
if (val) {
str[0] = 'Y';
} el... | 0 |
public_repos/numpy-refactor/tools/win32build | public_repos/numpy-refactor/tools/win32build/cpucaps/SConstruct | env = Environment(tools = ['mingw'])
env.Append(CPPPATH = ['../cpuid'])
env.Append(CFLAGS = ['-W', '-Wall'])
cpuplug = env.SharedLibrary('cpucaps', source = ['cpucaps_main.c', '../cpuid/cpuid.c'])
cpuplug_install = env.InstallAs('C:\Program Files\NSIS\Plugins\CpuCaps.dll', cpuplug[0])
env.Alias('install', cpuplug_ins... | 0 |
public_repos/numpy-refactor/tools | public_repos/numpy-refactor/tools/c_coverage/HOWTO_C_COVERAGE.txt | ===============
C coverage tool
===============
This directory contains a tool to generate C code-coverage reports
using valgrind's callgrind tool.
Prerequisites
-------------
* `Valgrind <http://www.valgrind.org/>`_ (3.5.0 tested, earlier
versions may work)
* `Pygments <http://www.pygments.org/>`_ (0.11 or la... | 0 |
public_repos/numpy-refactor/tools | public_repos/numpy-refactor/tools/c_coverage/c_coverage_report.py | #!/usr/bin/env python
"""
A script to create C code-coverage reports based on the output of
valgrind's callgrind tool.
"""
import optparse
import os
import re
import sys
from xml.sax.saxutils import quoteattr, escape
try:
import pygments
if tuple([int(x) for x in pygments.__version__.split('.')]) < (0, 11):
... | 0 |
public_repos/numpy-refactor/tools | public_repos/numpy-refactor/tools/c_coverage/c_coverage_collect.sh | #!/usr/bin/env bash
valgrind --tool=callgrind --compress-strings=no --compress-pos=no --collect-jumps=yes "$@"
| 0 |
public_repos/numpy-refactor/tools | public_repos/numpy-refactor/tools/osxbuild/README.txt | ==================================
Building an OSX binary for numpy
==================================
This directory contains the scripts to build a universal binary for
OSX. The binaries work on OSX 10.4 and 10.5.
The docstring in build.py may contain more current details.
Requirements
============
* bdist_mpkg... | 0 |
public_repos/numpy-refactor/tools | public_repos/numpy-refactor/tools/osxbuild/install_and_test.py | #!/usr/bin/env python
"""Install the built package and run the tests."""
import os
# FIXME: Should handle relative import better!
#from .build import DIST_DIR
from build import SRC_DIR, DIST_DIR, shellcmd
clrgreen = '\033[0;32m'
clrnull = '\033[0m'
# print '\033[0;32m foobar \033[0m'
def color_print(msg):
"""Add... | 0 |
public_repos/numpy-refactor/tools | public_repos/numpy-refactor/tools/osxbuild/build.py | """Python script to build the OSX universal binaries.
This is a simple script, most of the heavy lifting is done in bdist_mpkg.
To run this script: 'python build.py'
Requires a svn version of numpy is installed, svn is used to revert
file changes made to the docs for the end-user install. Installer is
built using ... | 0 |
public_repos/numpy-refactor/tools/osxbuild | public_repos/numpy-refactor/tools/osxbuild/docs/README.txt | NumPy is the fundamental package needed for scientific computing with Python.
This package contains:
* a powerful N-dimensional array object
* sophisticated (broadcasting) functions
* tools for integrating C/C++ and Fortran code
* useful linear algebra, Fourier transform, and random number capabilitie... | 0 |
public_repos/numpy-refactor | public_repos/numpy-refactor/libndarray/autogen.sh | autoreconf --force --verbose --install
| 0 |
public_repos/numpy-refactor | public_repos/numpy-refactor/libndarray/config.h.in | /* config.h.in. Generated from configure.ac by autoheader. */
/* Enables threads IF npy_enable_threads, npy_disable_threads
provided during initialization. */
#define ALLOW_THREADS 1
/* Core library ABI version */
#undef ABI_VERSION
/* Define if building universal (internal helper macro) */
#undef AC_APPLE_UNIV... | 0 |
public_repos/numpy-refactor | public_repos/numpy-refactor/libndarray/configure.ac | # -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.61])
AC_INIT([libndarray], [1.0], [info@enthought.com])
AM_INIT_AUTOMAKE([foreign subdir-objects])
AC_CONFIG_FILES([Makefile])
AC_CONFIG_SRCDIR([src/npy_arrayobject.c])
AC_CONF... | 0 |
public_repos/numpy-refactor | public_repos/numpy-refactor/libndarray/config.guess | #! /bin/sh
# Attempt to guess a canonical system name.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
# Free Software Foundation, Inc.
timestamp='2009-04-27'
# This file is free software; you can redistribute it and/or modify it
# under the... | 0 |
public_repos/numpy-refactor | public_repos/numpy-refactor/libndarray/missing | #! /bin/sh
# Common stub for a few missing GNU programs while installing.
scriptversion=2009-04-28.21; # UTC
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
# 2008, 2009 Free Software Foundation, Inc.
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
# This program is free softw... | 0 |
public_repos/numpy-refactor | public_repos/numpy-refactor/libndarray/README.txt | The ndarray library
===================
This directory contains the core ndarray library,
which is written in pure C and is independent of
the Python C-API.
Building:
---------
On Unix systems, this library follows the configure,
make, make install pattern.
On Windows, the 'windows' directory s used to build
Pytho... | 0 |
public_repos/numpy-refactor | public_repos/numpy-refactor/libndarray/ltmain.sh | # Generated from ltmain.m4sh.
# ltmain.sh (GNU libtool) 2.2.6
# Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 2008 Free Software Foundation, Inc.
# This is free software; see the source for copying conditions. There is NO
# w... | 0 |
public_repos/numpy-refactor | public_repos/numpy-refactor/libndarray/config.sub | #! /bin/sh
# Configuration validation subroutine script.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
# Free Software Foundation, Inc.
timestamp='2009-04-17'
# This file is (in principle) common to ALL GNU software.
# The presence of a ma... | 0 |
public_repos/numpy-refactor | public_repos/numpy-refactor/libndarray/aclocal.m4 | # generated automatically by aclocal 1.11 -*- Autoconf -*-
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or... | 0 |
public_repos/numpy-refactor | public_repos/numpy-refactor/libndarray/configure | #! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.63 for libndarray 1.0.
#
# Report bugs to <info@enthought.com>.
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
#... | 0 |
public_repos/numpy-refactor | public_repos/numpy-refactor/libndarray/Makefile.in | # Makefile.in generated by automake 1.10 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or dis... | 0 |
public_repos/numpy-refactor | public_repos/numpy-refactor/libndarray/install-sh | #!/bin/sh
# install - install a program, script, or datafile
scriptversion=2009-04-28.21; # UTC
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
# following copyright and license.
#
# Copyright (C) 1994 X Consortium
#
# Permission is ... | 0 |
public_repos/numpy-refactor | public_repos/numpy-refactor/libndarray/redo | #!/bin/bash
make clean
rm -rf src/npy_config.h
rm -rf src/.deps src/.dirstamp stamp-h1 autom4te.cache aclocal.m4
rm -rf tools/.deps tools/.dirstamp Makefile Makefile.in
autoreconf -fvi
bash configure --disable-static
make
| 0 |
public_repos/numpy-refactor | public_repos/numpy-refactor/libndarray/Makefile.am | AUTOMAKE_OPTIONS = foreign
# Headers which are installed to support the library
INSTINCLUDES = \
src/npy_neighbor_imp.h \
src/npy_api.h \
src/npy_arrayobject.h \
src/npy_buffer.h \
src/npy_calculation.h \
src/npy_common.h \
src/npy_config.h \
src/npy_cpu... | 0 |
public_repos/numpy-refactor | public_repos/numpy-refactor/libndarray/depcomp | #! /bin/sh
# depcomp - compile a program generating dependencies as side-effects
scriptversion=2009-04-28.21; # UTC
# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free
# Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU Ge... | 0 |
public_repos/numpy-refactor/libndarray | public_repos/numpy-refactor/libndarray/windows/npy_config.h | /* npy_config.h NOT Generated automatically by configure.
This is a manually maintained version used for the Watcom,
Borland and Microsoft Visual C++ compilers. It is a
standard part of the distribution.
*/
#ifdef _WIN64
#define NPY_SIZEOF_DOUBLE 8
#define NPY_SIZEOF_COMPLEX_DOUBLE 16
#define NPY_SIZEOF_FLOAT 4
#d... | 0 |
public_repos/numpy-refactor/libndarray | public_repos/numpy-refactor/libndarray/windows/msvc2010.sln |
Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ndarray", "msvc2008.vcxproj", "{CF7AC3D1-E2DF-41D2-BEA6-1E2756CDEA26}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Release|Win32 = Release|Win32
... | 0 |
public_repos/numpy-refactor/libndarray | public_repos/numpy-refactor/libndarray/windows/msvc2008.vcproj | <?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9.00"
Name="ndarray"
ProjectGUID="{CF7AC3D1-E2DF-41D2-BEA6-1E2756CDEA26}"
RootNamespace="ndarray"
TargetFrameworkVersion="131072"
>
<Platforms>
<Platform
Name="Win32"
/>
<Platform
Name="x64"
/>
</... | 0 |
public_repos/numpy-refactor/libndarray | public_repos/numpy-refactor/libndarray/windows/ndarray.def | LIBRARY
EXPORTS
npy_BOOL_absolute
npy_BOOL_equal
npy_BOOL_greater
npy_BOOL_greater_equal
npy_BOOL_less
npy_BOOL_less_equal
npy_BOOL_logical_and
npy_BOOL_logical_not
npy_BOOL_logical_or
npy_BOOL_logical_xor
npy_BOOL_maximum
npy_BOOL_minimum
npy_BOOL_not_equal
npy_BOOL_ones_like
npy_BYTE_absolute
npy_BYTE_add
npy_BYTE_b... | 0 |
public_repos/numpy-refactor/libndarray | public_repos/numpy-refactor/libndarray/windows/msvc2008.vcxproj.user | <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
</Project> | 0 |
public_repos/numpy-refactor/libndarray | public_repos/numpy-refactor/libndarray/windows/msvc2008.vcxproj.filters | <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Include">
<UniqueIdentifier>{f46baab8-6e40-4be1-84d6-6824c8a8b218}</UniqueIdentifier>
</Filter>
<Filter Include="Core">
<UniqueIdentifie... | 0 |
public_repos/numpy-refactor/libndarray | public_repos/numpy-refactor/libndarray/windows/msvc2008.vcxproj | <?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>... | 0 |
public_repos/numpy-refactor/libndarray | public_repos/numpy-refactor/libndarray/windows/build.py | import os
import sys
import shutil
from glob import glob
from os.path import expanduser, join
sys.path.insert(0, r'..\tools')
from conv_template import process_file
from mk_config import check_long_double_repr
src_dir = r'..\src'
def write_config():
os.system(r"cl ..\\tools\\long_double.c")
data = open('n... | 0 |
public_repos/numpy-refactor/libndarray/windows | public_repos/numpy-refactor/libndarray/windows/test/main.c | #include <stdio.h>
#include "npy_math.h"
main (void)
{
double x, y;
x = 2.0;
y = npy_sqrt(x);
printf("sqrt(2) = %f\n", y);
return 0;
}
| 0 |
public_repos/numpy-refactor/libndarray/windows | public_repos/numpy-refactor/libndarray/windows/test/do.sh | rm -f main.exe main.obj
cl /c "/IC:\\Documents and Settings\\builder\\usr\\include" main.c
link /nologo /OUT:main.exe \
"/LIBPATH:C:\\Documents and Settings\\builder\\usr\\lib" \
main.obj ndarray.lib
./main.exe
| 0 |
public_repos/numpy-refactor/libndarray | public_repos/numpy-refactor/libndarray/tools/long_double.c | /*
"before" is 16 bytes to ensure there's no padding between it and "x".
We're not expecting any "long double" bigger than 16 bytes or with
alignment requirements stricter than 16 bytes.
*/
typedef long double test_type;
struct {
char before[16];
test_type x;
char aft... | 0 |
public_repos/numpy-refactor/libndarray | public_repos/numpy-refactor/libndarray/tools/conv_template.py | """
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 repeat and before ... | 0 |
public_repos/numpy-refactor/libndarray | public_repos/numpy-refactor/libndarray/tools/mk_config.py | import re
import sys
DEFINE_MAP = {
'VERSION': 'DUMMY_VERSION',
'HAVE_LONG_LONG_INT': 'NPY_HAVE_LONGLONG',
'SIZEOF_LONG_DOUBLE': 'NPY_SIZEOF_LONGDOUBLE',
'SIZEOF_LONG_LONG': 'NPY_SIZEOF_LONGLONG',
'SIZEOF_VOID_P': 'NPY_SIZEOF_PTR',
'SI... | 0 |
public_repos/numpy-refactor/libndarray | public_repos/numpy-refactor/libndarray/src/npy_iterators.h | #ifndef _NPY_ITERATORS_H_
#define _NPY_ITERATORS_H_
#include "npy_object.h"
#include "npy_index.h"
#if defined(__cplusplus)
extern "C" {
#endif
typedef struct NpyArrayIterObject NpyArrayIterObject;
/*
* type of the function which translates a set of coordinates to a
* pointer to the data
*/
typedef char* (*npy_i... | 0 |
public_repos/numpy-refactor/libndarray | public_repos/numpy-refactor/libndarray/src/npy_mapping.c | #include <stdlib.h>
#include <memory.h>
#include "npy_config.h"
#include "npy_api.h"
#include "npy_iterators.h"
#include "npy_arrayobject.h"
#include "npy_index.h"
#include "npy_internal.h"
#include "npy_dict.h"
static void
arraymapiter_dealloc(NpyArrayMapIterObject *mit);
int
NpyArray_IndexExpandBool(NpyIndex *ind... | 0 |
public_repos/numpy-refactor/libndarray | public_repos/numpy-refactor/libndarray/src/npy_multiarray.c | /*
* npy_multiarray.c -
*
*/
#include <stdlib.h>
#include <string.h>
#include <memory.h>
#include "npy_config.h"
#include "npy_api.h"
#include "npy_arrayobject.h"
#include "npy_calculation.h"
#include "npy_dict.h"
#include "npy_internal.h"
#include "npy_iterators.h"
#include "npy_os.h"
#include "npy_calculation.h... | 0 |
public_repos/numpy-refactor/libndarray | public_repos/numpy-refactor/libndarray/src/npy_ieee754.c.src | /*
* Low-level routines related to IEEE-754 format
*/
#include <math.h>
#include <float.h>
#include "npy_config.h"
#include "npy_math.h"
#include "npy_math_private.h"
#if !NPY_HAVE_DECL_COPYSIGN
double npy_copysign(double x, double y)
{
npy_uint32 hx, hy;
GET_HIGH_WORD(hx, x);
GET_HIGH_WORD(hy, y);
... | 0 |
public_repos/numpy-refactor/libndarray | public_repos/numpy-refactor/libndarray/src/npy_object.h | #ifndef _NPY_OBJECT_H_
#define _NPY_OBJECT_H_
#if defined(_WIN32)
#include <Windows.h>
#endif
#include <assert.h>
#include "npy_defs.h"
#if defined(__cplusplus)
extern "C" {
#endif
/* Simple object model for numpy objects.
This is similar to the Python object model. */
typedef struct _NpyObject _NpyObject;
typ... | 0 |
public_repos/numpy-refactor/libndarray | public_repos/numpy-refactor/libndarray/src/npy_descriptor.c | /*
* npy_descriptor.c -
*
*/
#include <stdlib.h>
#include <string.h>
#include <memory.h>
#include "npy_config.h"
#include "npy_api.h"
#include "npy_object.h"
#include "npy_arrayobject.h"
#include "npy_dict.h"
#include "npy_internal.h"
#include "npy_os.h"
#if !defined(MAX)
#define MAX(x,y) (((x)>=(y)) ? (x) : (y... | 0 |
public_repos/numpy-refactor/libndarray | public_repos/numpy-refactor/libndarray/src/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/numpy-refactor/libndarray | public_repos/numpy-refactor/libndarray/src/npy_calculation.c | /*
* npy_calculation.c -
*
*/
#include "npy_config.h"
#include "npy_api.h"
#include "npy_arrayobject.h"
#include "npy_ufunc_object.h"
NDARRAY_API NpyArray *
NpyArray_ArgMax(NpyArray *op, int axis, NpyArray *out)
{
NpyArray *ap = NULL, *rp = NULL;
NpyArray_ArgFunc *arg_func;
char *ip;
npy_intp *r... | 0 |
public_repos/numpy-refactor/libndarray | public_repos/numpy-refactor/libndarray/src/npy_neighbor_imp.h | #ifndef _NPY_INCLUDE_NEIGHBORHOOD_IMP
#error You should not include this header directly
#endif
#ifndef _NEIGHBORHOOD_ITERATOR_IMP_H_
#define _NEIGHBORHOOD_ITERATOR_IMP_H_
#include "npy_iterators.h"
/*
* Private API (here for inline)
*/
static NPY_INLINE int
_NpyArrayNeighborhoodIter_IncrCoord(NpyArrayNeighborhood... | 0 |
public_repos/numpy-refactor/libndarray | public_repos/numpy-refactor/libndarray/src/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 preserved.
... | 0 |
public_repos/numpy-refactor/libndarray | public_repos/numpy-refactor/libndarray/src/npy_utils.h | #ifndef _NPY_UTILS_H_
#define _NPY_UTILS_H_
#ifndef __COMP_NPY_UNUSED
#if defined(__GNUC__)
#define __COMP_NPY_UNUSED __attribute__ ((__unused__))
# elif defined(__ICC)
#define __COMP_NPY_UNUSED __attribute__ ((__unused__))
#else
#define __COMP_NP... | 0 |
public_repos/numpy-refactor/libndarray | public_repos/numpy-refactor/libndarray/src/npy_os.h | #ifndef _NPY_OS_H_
#define _NPY_OS_H_
#include <stdlib.h>
#include <stdio.h>
#if defined(__cplusplus)
extern "C" {
#endif
#if defined(linux) || defined(__linux) || defined(__linux__)
#define NPY_OS_LINUX
#elif defined(__FreeBSD__) || defined(__NetBSD__) || \
defined(__OpenBSD__) || defined(__Dragon... | 0 |
public_repos/numpy-refactor/libndarray | public_repos/numpy-refactor/libndarray/src/npy_arraytypes.c.src | /* -*- c -*- */
#include <stdlib.h>
#include <string.h>
#include <memory.h>
#include "npy_api.h"
#include "npy_object.h"
#include "npy_arrayobject.h"
#include "npy_os.h"
#include "npy_dict.h"
#include "npy_internal.h"
#include "npy_math.h"
#include "npy_utils.h"
#define longlong npy_longlong
#define ulonglong ... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.