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/doc/source
public_repos/datetime/doc/source/reference/c-api.config.rst
System configuration ==================== .. sectionauthor:: Travis E. Oliphant When NumPy is built, information about system configuration is recorded, and is made available for extension modules using Numpy's C API. These are mostly defined in ``numpyconfig.h`` (included in ``ndarrayobject.h``). The public symbols...
0
public_repos/datetime/doc/source
public_repos/datetime/doc/source/reference/arrays.rst
.. _arrays: ************* Array objects ************* .. currentmodule:: numpy NumPy provides an N-dimensional array type, the :ref:`ndarray <arrays.ndarray>`, which describes a collection of "items" of the same type. The items can be :ref:`indexed <arrays.indexing>` using for example N integers. All ndarrays are :...
0
public_repos/datetime/doc/source
public_repos/datetime/doc/source/reference/routines.sort.rst
Sorting and searching ===================== .. currentmodule:: numpy Sorting ------- .. autosummary:: :toctree: generated/ sort lexsort argsort ndarray.sort msort sort_complex Searching --------- .. autosummary:: :toctree: generated/ argmax nanargmax argmin nanargmin argwhere...
0
public_repos/datetime/doc/source
public_repos/datetime/doc/source/reference/arrays.classes.rst
######################### Standard array subclasses ######################### .. currentmodule:: numpy The :class:`ndarray` in NumPy is a "new-style" Python built-in-type. Therefore, it can be inherited from (in Python or in C) if desired. Therefore, it can form a foundation for many useful classes. Often whether to ...
0
public_repos/datetime/doc/source
public_repos/datetime/doc/source/reference/routines.ma.rst
.. _routines.ma: Masked array operations *********************** .. currentmodule:: numpy Constants ========= .. autosummary:: :toctree: generated/ ma.MaskType Creation ======== From existing data ~~~~~~~~~~~~~~~~~~ .. autosummary:: :toctree: generated/ ma.masked_array ma.array ma.copy m...
0
public_repos/datetime/doc/source
public_repos/datetime/doc/source/reference/routines.functional.rst
Functional programming ********************** .. currentmodule:: numpy .. autosummary:: :toctree: generated/ apply_along_axis apply_over_axes vectorize frompyfunc piecewise
0
public_repos/datetime/doc/source
public_repos/datetime/doc/source/reference/maskedarray.baseclass.rst
.. currentmodule:: numpy.ma .. _numpy.ma.constants: Constants of the :mod:`numpy.ma` module ======================================= In addition to the :class:`MaskedArray` class, the :mod:`numpy.ma` module defines several constants. .. data:: masked The :attr:`masked` constant is a special case of :class:`Mask...
0
public_repos/datetime/doc/source
public_repos/datetime/doc/source/reference/arrays.interface.rst
.. index:: pair: array; interface pair: array; protocol .. _arrays.interface: ******************* The Array Interface ******************* .. warning:: This page describes the old, deprecated array interface. Everything still works as described as of numpy 1.2 and on into the foreseeable future, but n...
0
public_repos/datetime/doc/source
public_repos/datetime/doc/source/reference/internals.code-explanations.rst
.. currentmodule:: numpy ************************* Numpy C Code Explanations ************************* Fanaticism consists of redoubling your efforts when you have forgotten your aim. --- *George Santayana* An authority is a person who can tell you more about something than you really care to kno...
0
public_repos/datetime/doc/source
public_repos/datetime/doc/source/reference/routines.poly.rst
Polynomials *********** .. currentmodule:: numpy Basics ------ .. autosummary:: :toctree: generated/ poly1d polyval poly roots Fitting ------- .. autosummary:: :toctree: generated/ polyfit Calculus -------- .. autosummary:: :toctree: generated/ polyder polyint Arithmetic ----------...
0
public_repos/datetime/doc/source
public_repos/datetime/doc/source/reference/routines.array-manipulation.rst
Array manipulation routines *************************** .. currentmodule:: numpy Changing array shape ==================== .. autosummary:: :toctree: generated/ reshape ravel ndarray.flat ndarray.flatten Transpose-like operations ========================= .. autosummary:: :toctree: generated/ ...
0
public_repos/datetime/doc/source/reference
public_repos/datetime/doc/source/reference/figures/threefundamental.fig
#FIG 3.2 Landscape Center Inches Letter 100.00 Single -2 1200 2 6 1950 2850 4350 3450 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 1950 2850 4350 2850 4350 3450 1950 3450 1950 2850 2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 2550 2850 2550 3450 2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 3150 2850 3150 3450 2 1 0 1 0 7 50 -...
0
public_repos/datetime/doc/source
public_repos/datetime/doc/source/user/basics.indexing.rst
.. _basics.indexing: ******** Indexing ******** .. seealso:: :ref:`Indexing routines <routines.indexing>` .. automodule:: numpy.doc.indexing
0
public_repos/datetime/doc/source
public_repos/datetime/doc/source/user/basics.subclassing.rst
.. _basics.subclassing: ******************* Subclassing ndarray ******************* .. automodule:: numpy.doc.subclassing
0
public_repos/datetime/doc/source
public_repos/datetime/doc/source/user/basics.types.rst
********** Data types ********** .. seealso:: :ref:`Data type objects <arrays.dtypes>` .. automodule:: numpy.doc.basics
0
public_repos/datetime/doc/source
public_repos/datetime/doc/source/user/basics.broadcasting.rst
************ Broadcasting ************ .. seealso:: :class:`numpy.broadcast` .. automodule:: numpy.doc.broadcasting
0
public_repos/datetime/doc/source
public_repos/datetime/doc/source/user/c-info.python-as-glue.rst
******************** Using Python as glue ******************** | There is no conversation more boring than the one where everybody | agrees. | --- *Michel de Montaigne* | Duct tape is like the force. It has a light side, and a dark side, and | it holds the universe together. | --- *Carl Zwanzig* Ma...
0
public_repos/datetime/doc/source
public_repos/datetime/doc/source/user/c-info.rst
################# Using Numpy C-API ################# .. toctree:: c-info.how-to-extend c-info.python-as-glue c-info.beyond-basics
0
public_repos/datetime/doc/source
public_repos/datetime/doc/source/user/basics.byteswapping.rst
************ Broadcasting ************ .. automodule:: numpy.doc.byteswapping
0
public_repos/datetime/doc/source
public_repos/datetime/doc/source/user/basics.rst
************ Numpy basics ************ .. toctree:: :maxdepth: 2 basics.types basics.creation basics.io basics.indexing basics.broadcasting basics.byteswapping basics.rec basics.subclassing
0
public_repos/datetime/doc/source
public_repos/datetime/doc/source/user/install.rst
***************************** Building and installing NumPy ***************************** Binary installers ================= In most use cases the best way to install NumPy on your system is by using an installable binary package for your operating system. Windows ------- Good solutions for Windows are, The Enthou...
0
public_repos/datetime/doc/source
public_repos/datetime/doc/source/user/index.rst
.. _user: ################ NumPy User Guide ################ This guide is intended as an introductory overview of NumPy and explains how to install and make use of the most important features of NumPy. For detailed reference documentation of the functions and classes contained in the package, see the :ref:`reference...
0
public_repos/datetime/doc/source
public_repos/datetime/doc/source/user/introduction.rst
************ Introduction ************ .. toctree:: whatisnumpy install howtofind
0
public_repos/datetime/doc/source
public_repos/datetime/doc/source/user/performance.rst
*********** Performance *********** .. automodule:: numpy.doc.performance
0
public_repos/datetime/doc/source
public_repos/datetime/doc/source/user/basics.io.genfromtxt.rst
.. sectionauthor:: Pierre Gerard-Marchant <pierregmcode@gmail.com> ********************************************* Importing data with :func:`~numpy.genfromtxt` ********************************************* Numpy provides several functions to create arrays from tabular data. We focus here on the :func:`~numpy.genfromtx...
0
public_repos/datetime/doc/source
public_repos/datetime/doc/source/user/misc.rst
************* Miscellaneous ************* .. automodule:: numpy.doc.misc .. automodule:: numpy.doc.methods_vs_functions
0
public_repos/datetime/doc/source
public_repos/datetime/doc/source/user/c-info.how-to-extend.rst
******************* How to extend NumPy ******************* | That which is static and repetitive is boring. That which is dynamic | and random is confusing. In between lies art. | --- *John A. Locke* | Science is a differential equation. Religion is a boundary condition. | --- *Alan Turing* .. _`sec...
0
public_repos/datetime/doc/source
public_repos/datetime/doc/source/user/whatisnumpy.rst
************** What is NumPy? ************** NumPy is the fundamental package for scientific computing in Python. It is a Python library that provides a multidimensional array object, various derived objects (such as masked arrays and matrices), and an assortment of routines for fast operations on arrays, including ma...
0
public_repos/datetime/doc/source
public_repos/datetime/doc/source/user/basics.rec.rst
.. _structured_arrays: *************************************** Structured arrays (aka "Record arrays") *************************************** .. automodule:: numpy.doc.structured_arrays
0
public_repos/datetime/doc/source
public_repos/datetime/doc/source/user/howtofind.rst
************************* How to find documentation ************************* .. seealso:: :ref:`Numpy-specific help functions <routines.help>` .. automodule:: numpy.doc.howtofind
0
public_repos/datetime/doc/source
public_repos/datetime/doc/source/user/basics.creation.rst
.. _arrays.creation: ************** Array creation ************** .. seealso:: :ref:`Array creation routines <routines.array-creation>` .. automodule:: numpy.doc.creation
0
public_repos/datetime/doc/source
public_repos/datetime/doc/source/user/c-info.beyond-basics.rst
***************** Beyond the Basics ***************** | The voyage of discovery is not in seeking new landscapes but in having | new eyes. | --- *Marcel Proust* | Discovery is seeing what everyone else has seen and thinking what no | one else has thought. | --- *Albert Szent-Gyorgi* Iterating over...
0
public_repos/datetime/doc/source
public_repos/datetime/doc/source/user/basics.io.rst
************** I/O with Numpy ************** .. toctree:: :maxdepth: 2 basics.io.genfromtxt
0
public_repos/datetime/doc/source
public_repos/datetime/doc/source/_templates/indexsidebar.html
<h3>Resources</h3> <ul> <li><a href="http://scipy.org/">Scipy.org website</a></li> <li>&nbsp;</li> </ul>
0
public_repos/datetime/doc/source
public_repos/datetime/doc/source/_templates/indexcontent.html
{% extends "defindex.html" %} {% block tables %} <p><strong>Parts of the documentation:</strong></p> <table class="contentstable" align="center"><tr> <td width="50%"> <p class="biglink"><a class="biglink" href="{{ pathto("user/index") }}">Numpy User Guide</a><br/> <span class="linkdescr">start he...
0
public_repos/datetime/doc/source
public_repos/datetime/doc/source/_templates/layout.html
{% extends "!layout.html" %} {% block rootrellink %} <li><a href="{{ pathto('index') }}">{{ shorttitle }}</a>{{ reldelim1 }}</li> {% endblock %} {% block sidebarsearch %} {%- if sourcename %} <ul class="this-page-menu"> {%- if 'reference/generated' in sourcename %} <li><a href="/numpy/docs/{{ sourcename.replace('ref...
0
public_repos/datetime/doc/source/_templates
public_repos/datetime/doc/source/_templates/autosummary/class.rst
{% extends "!autosummary/class.rst" %} {% block methods %} {% if methods %} .. HACK .. autosummary:: :toctree: {% for item in methods %} {{ name }}.{{ item }} {%- endfor %} {% endif %} {% endblock %} {% block attributes %} {% if attributes %} .. HACK .. autosummary:: ...
0
public_repos/datetime/doc/source
public_repos/datetime/doc/source/_static/scipy.css
@import "default.css"; /** * Spacing fixes */ div.body p, div.body dd, div.body li { line-height: 125%; } ul.simple { margin-top: 0; margin-bottom: 0; padding-top: 0; padding-bottom: 0; } /* spacing around blockquoted fields in parameters/attributes/returns */ td.field-body > blockquote { m...
0
public_repos/datetime/doc
public_repos/datetime/doc/neps/newbugtracker.rst
Some release managers of both numpy and scipy are becoming more and more disatisfied with the current development workflow, in particular for bug tracking. This document is a tentative to explain some problematic scenario, current trac limitations, and what can be done about it. Scenario ======== new release --------...
0
public_repos/datetime/doc
public_repos/datetime/doc/neps/npy-format.txt
Title: A Simple File Format for NumPy Arrays Discussions-To: numpy-discussion@mail.scipy.org Version: $Revision$ Last-Modified: $Date$ Author: Robert Kern <robert.kern@gmail.com> Status: Draft Type: Standards Track Content-Type: text/plain Created: 20-Dec-2007 Abstract We propose a standard binary file format (N...
0
public_repos/datetime/doc
public_repos/datetime/doc/neps/pep_buffer.txt
:PEP: 3118 :Title: Revising the buffer protocol :Version: $Revision$ :Last-Modified: $Date$ :Authors: Travis Oliphant <oliphant@ee.byu.edu>, Carl Banks <pythondev@aerojockey.com> :Status: Draft :Type: Standards Track :Content-Type: text/x-rst :Created: 28-Aug-2006 :Python-Version: 3000 Abstract ======== This PEP prop...
0
public_repos/datetime/doc
public_repos/datetime/doc/neps/math_config_clean.txt
=========================================================== Cleaning the math configuration of numpy.core =========================================================== :Author: David Cournapeau :Contact: david@ar.media.kyoto-u.ac.jp :Date: 2008-09-04 Executive summary ================= Before building numpy.core, we u...
0
public_repos/datetime/doc
public_repos/datetime/doc/neps/datetime-proposal.rst
==================================================================== A proposal for implementing some date/time types in NumPy ==================================================================== :Author: Travis Oliphant :Contact: oliphant@enthought.com :Date: 2009-06-09 Revised only slightly from the third proposal...
0
public_repos/datetime/doc
public_repos/datetime/doc/neps/structured_array_extensions.txt
1. Create with-style context that makes "named-columns" available as names in the namespace. with np.columns(array): price = unit * quantityt 2. Allow structured arrays to be sliced by their column (i.e. one additional indexing option for structured arrays) so that a[:4, 'foo':'bar'] would be allowed....
0
public_repos/datetime/doc
public_repos/datetime/doc/neps/datetime-proposal3.rst
==================================================================== A (third) proposal for implementing some date/time types in NumPy ==================================================================== :Author: Francesc Alted i Abad :Contact: faltet@pytables.com :Author: Ivan Vilata i Balaguer :Contact: ivan@selido...
0
public_repos/datetime/doc
public_repos/datetime/doc/neps/groupby_additions.rst
==================================================================== A proposal for adding groupby functionality to NumPy ==================================================================== :Author: Travis Oliphant :Contact: oliphant@enthought.com :Date: 2010-04-27 Executive summary ================= NumPy provid...
0
public_repos/datetime/doc
public_repos/datetime/doc/neps/generalized-ufuncs.rst
=============================== Generalized Universal Functions =============================== There is a general need for looping over not only functions on scalars but also over functions on vectors (or arrays), as explained on http://scipy.org/scipy/numpy/wiki/GeneralLoopingFunctions. We propose to realize this c...
0
public_repos/datetime/doc
public_repos/datetime/doc/neps/warnfix.txt
=========================================================== A proposal to build numpy without warning with a big set of warning flags =========================================================== :Author: David Cournapeau :Contact: david@ar.media.kyoto-u.ac.jp :Date: 2008-09-04 Executive summary ================= When...
0
public_repos/datetime/doc
public_repos/datetime/doc/sphinxext/traitsdoc.py
""" ========= traitsdoc ========= Sphinx extension that handles docstrings in the Numpy standard format, [1] and support Traits [2]. This extension can be used as a replacement for ``numpydoc`` when support for Traits is required. .. [1] http://projects.scipy.org/numpy/wiki/CodingStyleGuidelines#docstring-standard ....
0
public_repos/datetime/doc
public_repos/datetime/doc/sphinxext/MANIFEST.in
recursive-include tests *.py include *.txt
0
public_repos/datetime/doc
public_repos/datetime/doc/sphinxext/compiler_unparse.py
""" Turn compiler.ast structures back into executable python code. The unparse method takes a compiler.ast tree and transforms it back into valid python code. It is incomplete and currently only works for import statements, function calls, function definitions, assignments, and basic expressions. ...
0
public_repos/datetime/doc
public_repos/datetime/doc/sphinxext/docscrape_sphinx.py
import re, inspect, textwrap, pydoc import sphinx from docscrape import NumpyDocString, FunctionDoc, ClassDoc class SphinxDocString(NumpyDocString): def __init__(self, docstring, config={}): self.use_plots = config.get('use_plots', False) NumpyDocString.__init__(self, docstring, config=config) ...
0
public_repos/datetime/doc
public_repos/datetime/doc/sphinxext/LICENSE.txt
------------------------------------------------------------------------------- The files - numpydoc.py - autosummary.py - autosummary_generate.py - docscrape.py - docscrape_sphinx.py - phantom_import.py have the following license: Copyright (C) 2008 Stefan van der Walt <stefan@mentat.z...
0
public_repos/datetime/doc
public_repos/datetime/doc/sphinxext/README.txt
===================================== numpydoc -- Numpy's Sphinx extensions ===================================== Numpy's documentation uses several custom extensions to Sphinx. These are shipped in this ``numpydoc`` package, in case you want to make use of them in third-party projects. The following extensions are ...
0
public_repos/datetime/doc
public_repos/datetime/doc/sphinxext/phantom_import.py
""" ============== phantom_import ============== Sphinx extension to make directives from ``sphinx.ext.autodoc`` and similar extensions to use docstrings loaded from an XML file. This extension loads an XML file in the Pydocweb format [1] and creates a dummy module that contains the specified docstrings. This can be ...
0
public_repos/datetime/doc
public_repos/datetime/doc/sphinxext/setup.py
from distutils.core import setup import setuptools import sys, os version = "0.3.dev" setup( name="numpydoc", packages=["numpydoc"], package_dir={"numpydoc": ""}, version=version, description="Sphinx extension to support docstrings in Numpy format", # classifiers from http://pypi.python.org/py...
0
public_repos/datetime/doc
public_repos/datetime/doc/sphinxext/plot_directive.py
""" A special directive for generating a matplotlib plot. .. warning:: This is a hacked version of plot_directive.py from Matplotlib. It's very much subject to change! Usage ----- Can be used like this:: .. plot:: examples/example.py .. plot:: import matplotlib.pyplot as plt plt.plot...
0
public_repos/datetime/doc
public_repos/datetime/doc/sphinxext/autosummary_generate.py
#!/usr/bin/env python r""" autosummary_generate.py OPTIONS FILES Generate automatic RST source files for items referred to in autosummary:: directives. Each generated RST file contains a single auto*:: directive which extracts the docstring of the referred item. Example Makefile rule:: generate: ./e...
0
public_repos/datetime/doc
public_repos/datetime/doc/sphinxext/only_directives.py
# # A pair of directives for inserting content that will only appear in # either html or latex. # from docutils.nodes import Body, Element from docutils.writers.html4css1 import HTMLTranslator try: from sphinx.latexwriter import LaTeXTranslator except ImportError: from sphinx.writers.latex import LaTeXTranslat...
0
public_repos/datetime/doc
public_repos/datetime/doc/sphinxext/autosummary.py
""" =========== autosummary =========== Sphinx extension that adds an autosummary:: directive, which can be used to generate function/method/attribute/etc. summary lists, similar to those output eg. by Epydoc and other API doc generation tools. An :autolink: role is also provided. autosummary directive -------------...
0
public_repos/datetime/doc
public_repos/datetime/doc/sphinxext/comment_eater.py
from cStringIO import StringIO import compiler import inspect import textwrap import tokenize from compiler_unparse import unparse class Comment(object): """ A comment block. """ is_comment = True def __init__(self, start_lineno, end_lineno, text): # int : The first line number in the block. ...
0
public_repos/datetime/doc
public_repos/datetime/doc/sphinxext/docscrape.py
"""Extract reference documentation from the NumPy source tree. """ import inspect import textwrap import re import pydoc from StringIO import StringIO from warnings import warn class Reader(object): """A line-based string reader. """ def __init__(self, data): """ Parameters -----...
0
public_repos/datetime/doc
public_repos/datetime/doc/sphinxext/__init__.py
from numpydoc import setup
0
public_repos/datetime/doc
public_repos/datetime/doc/sphinxext/numpydoc.py
""" ======== numpydoc ======== Sphinx extension that handles docstrings in the Numpy standard format. [1] It will: - Convert Parameters etc. sections to field lists. - Convert See Also section to a See also entry. - Renumber references. - Extract the signature from the docstring, if it can't be determined otherwise....
0
public_repos/datetime/doc/sphinxext
public_repos/datetime/doc/sphinxext/tests/test_docscrape.py
# -*- encoding:utf-8 -*- import sys, os sys.path.append(os.path.join(os.path.dirname(__file__), '..')) from docscrape import NumpyDocString, FunctionDoc, ClassDoc from docscrape_sphinx import SphinxDocString, SphinxClassDoc from nose.tools import * doc_txt = '''\ numpy.multivariate_normal(mean, cov, shape=None) ...
0
public_repos/datetime/doc
public_repos/datetime/doc/release/2.0.0-notes.rst
========================= NumPy 2.0.0 Release Notes ========================= Plans ===== This release has the following aims: * Python 3 compatibility * :pep:`3118` compatibility Highlights ========== New features ============ Warning on casting complex to real ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Numpy now em...
0
public_repos/datetime/doc
public_repos/datetime/doc/release/time_based_proposal.rst
.. vim:syntax=rst Introduction ============ This document proposes some enhancements for numpy and scipy releases. Successive numpy and scipy releases are too far apart from a time point of view - some people who are in the numpy release team feel that it cannot improve without a bit more formal release process. The ...
0
public_repos/datetime/doc
public_repos/datetime/doc/release/1.4.0-notes.rst
========================= NumPy 1.4.0 Release Notes ========================= This minor includes numerous bug fixes, as well as a few new features. It is backward compatible with 1.3.0 release. Highlights ========== * New datetime dtype support to deal with dates in arrays * Faster import time * Extended array wr...
0
public_repos/datetime/doc
public_repos/datetime/doc/release/1.3.0-notes.rst
========================= NumPy 1.3.0 Release Notes ========================= This minor includes numerous bug fixes, official python 2.6 support, and several new features such as generalized ufuncs. Highlights ========== Python 2.6 support ~~~~~~~~~~~~~~~~~~ Python 2.6 is now supported on all previously supported ...
0
public_repos/datetime/doc
public_repos/datetime/doc/newdtype_example/setup.py
from numpy.distutils.core import setup def configuration(parent_package = '', top_path=None): from numpy.distutils.misc_util import Configuration config = Configuration('floatint',parent_package,top_path) config.add_extension('floatint', sources = ['floatint.c']); return conf...
0
public_repos/datetime/doc
public_repos/datetime/doc/newdtype_example/example.py
import floatint.floatint as ff import numpy as np # Setting using array is hard because # The parser doesn't stop at tuples always # So, the setitem code will be called with scalars on the # wrong shaped array. # But we can get a view as an ndarray of the given type: g = np.array([1,2,3,4,5,6,7,8]).view(ff.floatint...
0
public_repos/datetime/doc
public_repos/datetime/doc/newdtype_example/floatint.c
#include "Python.h" #include "structmember.h" /* for offsetof macro if needed */ #include "numpy/arrayobject.h" /* Use a Python float as the cannonical type being added */ typedef struct _floatint { PyObject_HEAD npy_int32 first; npy_int32 last; } PyFloatIntObject; static PyTypeObject PyFloatInt_Type =...
0
public_repos/datetime/doc
public_repos/datetime/doc/pyrex/numpyx.c
/* Generated by Pyrex 0.9.5.1 on Wed Jan 31 11:57:10 2007 */ #include "Python.h" #include "structmember.h" #ifndef PY_LONG_LONG #define PY_LONG_LONG LONG_LONG #endif #ifdef __cplusplus #define __PYX_EXTERN_C extern "C" #else #define __PYX_EXTERN_C extern #endif __PYX_EXTERN_C double pow(double, double); #include "st...
0
public_repos/datetime/doc
public_repos/datetime/doc/pyrex/README.txt
WARNING: this code is deprecated and slated for removal soon. See the doc/cython directory for the replacement, which uses Cython (the actively maintained version of Pyrex).
0
public_repos/datetime/doc
public_repos/datetime/doc/pyrex/setup.py
#!/usr/bin/env python """ WARNING: this code is deprecated and slated for removal soon. See the doc/cython directory for the replacement, which uses Cython (the actively maintained version of Pyrex). Install file for example on how to use Pyrex with Numpy. For more details, see: http://www.scipy.org/Cookbook/Pyrex_...
0
public_repos/datetime/doc
public_repos/datetime/doc/pyrex/Makefile
all: python setup.py build_ext --inplace test: all python run_test.py .PHONY: clean clean: rm -rf *~ *.so *.c *.o build
0
public_repos/datetime/doc
public_repos/datetime/doc/pyrex/c_numpy.pxd
# :Author: Travis Oliphant cdef extern from "numpy/arrayobject.h": cdef enum NPY_TYPES: NPY_BOOL NPY_BYTE NPY_UBYTE NPY_SHORT NPY_USHORT NPY_INT NPY_UINT NPY_LONG NPY_ULONG NPY_LONGLONG NPY_ULONGLONG NPY_FLOAT ...
0
public_repos/datetime/doc
public_repos/datetime/doc/pyrex/c_python.pxd
# -*- Mode: Python -*- Not really, but close enough # Expose as much of the Python C API as we need here cdef extern from "stdlib.h": ctypedef int size_t cdef extern from "Python.h": ctypedef int Py_intptr_t void* PyMem_Malloc(size_t) void* PyMem_Realloc(void *p, size_t n) void PyMem_Free(vo...
0
public_repos/datetime/doc
public_repos/datetime/doc/pyrex/notes
- cimport with a .pxd file vs 'include foo.pxi'? - the need to repeat: pyrex does NOT parse C headers.
0
public_repos/datetime/doc
public_repos/datetime/doc/pyrex/run_test.py
#!/usr/bin/env python from numpyx import test test()
0
public_repos/datetime/doc
public_repos/datetime/doc/pyrex/numpyx.pyx
# -*- Mode: Python -*- Not really, but close enough """WARNING: this code is deprecated and slated for removal soon. See the doc/cython directory for the replacement, which uses Cython (the actively maintained version of Pyrex). """ cimport c_python cimport c_numpy import numpy # Numpy must be initialized c_numpy.i...
0
public_repos/datetime/doc
public_repos/datetime/doc/pyrex/MANIFEST
numpyx.pyx setup.py
0
public_repos/datetime/doc
public_repos/datetime/doc/swig/README
Notes for the numpy/doc/swig directory ====================================== This set of files is for developing and testing file numpy.i, which is intended to be a set of typemaps for helping SWIG interface between C and C++ code that uses C arrays and the python module NumPy. It is ultimately hoped that numpy.i wi...
0
public_repos/datetime/doc
public_repos/datetime/doc/swig/Makefile
# List all of the subdirectories here for recursive make SUBDIRS = test doc # Default target .PHONY : default default: @echo "There is no default make target for this Makefile" @echo "Valid make targets are:" @echo " test - Compile and run tests of numpy.i" @echo " doc - Generate numpy.i...
0
public_repos/datetime/doc
public_repos/datetime/doc/swig/numpy.i
/* -*- C -*- (not really, but good for syntax highlighting) */ #ifdef SWIGPYTHON %{ #ifndef SWIG_FILE_WITH_INIT # define NO_IMPORT_ARRAY #endif #include "stdio.h" #include <numpy/arrayobject.h> %} /**********************************************************************/ %fragment("NumPy_Backward_Compatibility", "he...
0
public_repos/datetime/doc
public_repos/datetime/doc/swig/pyfragments.swg
/*-*- C -*-*/ /**********************************************************************/ /* For numpy versions prior to 1.0, the names of certain data types * are different than in later versions. This fragment provides macro * substitutions that allow us to support old and new versions of * numpy. */ %fragment("...
0
public_repos/datetime/doc/swig
public_repos/datetime/doc/swig/test/Matrix.cxx
#include <stdlib.h> #include <math.h> #include <iostream> #include "Matrix.h" // The following macro defines a family of functions that work with 2D // arrays with the forms // // TYPE SNAMEDet( TYPE matrix[2][2]); // TYPE SNAMEMax( TYPE * matrix, int rows, int cols); // TYPE SNAMEMin( int rows, i...
0
public_repos/datetime/doc/swig
public_repos/datetime/doc/swig/test/Fortran.i
// -*- c++ -*- %module Fortran %{ #define SWIG_FILE_WITH_INIT #include "Fortran.h" %} // Get the NumPy typemaps %include "../numpy.i" %init %{ import_array(); %} %define %apply_numpy_typemaps(TYPE) %apply (TYPE* IN_FARRAY2, int DIM1, int DIM2) {(TYPE* matrix, int rows, int cols)}; %enddef /* %apply_numpy_typ...
0
public_repos/datetime/doc/swig
public_repos/datetime/doc/swig/test/Array1.cxx
#include "Array1.h" #include <iostream> #include <sstream> // Default/length/array constructor Array1::Array1(int length, long* data) : _ownData(false), _length(0), _buffer(0) { resize(length, data); } // Copy constructor Array1::Array1(const Array1 & source) : _length(source._length) { allocateMemory(); *t...
0
public_repos/datetime/doc/swig
public_repos/datetime/doc/swig/test/Tensor.cxx
#include <stdlib.h> #include <math.h> #include <iostream> #include "Tensor.h" // The following macro defines a family of functions that work with 3D // arrays with the forms // // TYPE SNAMENorm( TYPE tensor[2][2][2]); // TYPE SNAMEMax( TYPE * tensor, int rows, int cols, int num); // TYPE SNAMEMin( ...
0
public_repos/datetime/doc/swig
public_repos/datetime/doc/swig/test/Vector.i
// -*- c++ -*- %module Vector %{ #define SWIG_FILE_WITH_INIT #include "Vector.h" %} // Get the NumPy typemaps %include "../numpy.i" %init %{ import_array(); %} %define %apply_numpy_typemaps(TYPE) %apply (TYPE IN_ARRAY1[ANY]) {(TYPE vector[3])}; %apply (TYPE* IN_ARRAY1, int DIM1) {(TYPE* series, int size)}; %appl...
0
public_repos/datetime/doc/swig
public_repos/datetime/doc/swig/test/Farray.h
#ifndef FARRAY_H #define FARRAY_H #include <stdexcept> #include <string> class Farray { public: // Size constructor Farray(int nrows, int ncols); // Copy constructor Farray(const Farray & source); // Destructor ~Farray(); // Assignment operator Farray & operator=(const Farray & source); // Equa...
0
public_repos/datetime/doc/swig
public_repos/datetime/doc/swig/test/Farray.cxx
#include "Farray.h" #include <sstream> // Size constructor Farray::Farray(int nrows, int ncols) : _nrows(nrows), _ncols(ncols), _buffer(0) { allocateMemory(); } // Copy constructor Farray::Farray(const Farray & source) : _nrows(source._nrows), _ncols(source._ncols) { allocateMemory(); *this = source; } // ...
0
public_repos/datetime/doc/swig
public_repos/datetime/doc/swig/test/testArray.py
#! /usr/bin/env python # System imports from distutils.util import get_platform import os import sys import unittest # Import NumPy import numpy as np major, minor = [ int(d) for d in np.__version__.split(".")[:2] ] if major == 0: BadListError = TypeError else: BadListError = ValueError import Array #####...
0
public_repos/datetime/doc/swig
public_repos/datetime/doc/swig/test/Tensor.h
#ifndef TENSOR_H #define TENSOR_H // The following macro defines the prototypes for a family of // functions that work with 3D arrays with the forms // // TYPE SNAMENorm( TYPE tensor[2][2][2]); // TYPE SNAMEMax( TYPE * tensor, int rows, int cols, int num); // TYPE SNAMEMin( int rows, int cols, int ...
0
public_repos/datetime/doc/swig
public_repos/datetime/doc/swig/test/setup.py
#! /usr/bin/env python # System imports from distutils.core import * from distutils import sysconfig # Third-party modules - we depend on numpy for everything import numpy # Obtain the numpy include directory. This logic works across numpy versions. try: numpy_include = numpy.get_include() except Attribute...
0
public_repos/datetime/doc/swig
public_repos/datetime/doc/swig/test/Array2.cxx
#include "Array2.h" #include <sstream> // Default constructor Array2::Array2() : _ownData(false), _nrows(0), _ncols(), _buffer(0), _rows(0) { } // Size/array constructor Array2::Array2(int nrows, int ncols, long* data) : _ownData(false), _nrows(0), _ncols(), _buffer(0), _rows(0) { resize(nrows, ncols, data); } ...
0
public_repos/datetime/doc/swig
public_repos/datetime/doc/swig/test/Farray.i
// -*- c++ -*- %module Farray %{ #define SWIG_FILE_WITH_INIT #include "Farray.h" %} // Get the NumPy typemaps %include "../numpy.i" // Get the STL typemaps %include "stl.i" // Handle standard exceptions %include "exception.i" %exception { try { $action } catch (const std::invalid_argument& e) { ...
0
public_repos/datetime/doc/swig
public_repos/datetime/doc/swig/test/Vector.cxx
#include <stdlib.h> #include <math.h> #include <iostream> #include "Vector.h" // The following macro defines a family of functions that work with 1D // arrays with the forms // // TYPE SNAMELength( TYPE vector[3]); // TYPE SNAMEProd( TYPE * series, int size); // TYPE SNAMESum( int size, TYPE * series)...
0
public_repos/datetime/doc/swig
public_repos/datetime/doc/swig/test/Makefile
# SWIG INTERFACES = Array.i Farray.i Vector.i Matrix.i Tensor.i Fortran.i WRAPPERS = $(INTERFACES:.i=_wrap.cxx) PROXIES = $(INTERFACES:.i=.py ) # Default target: build the tests .PHONY : all all: $(WRAPPERS) Array1.cxx Array1.h Farray.cxx Farray.h Vector.cxx Vector.h \ Matrix.cxx Matrix.h Tensor.cxx Tensor....
0