Permalink
Browse files

ENH: core: Start einsum function, add copyright notices to files

  • Loading branch information...
1 parent 27987d2 commit a41de3adf9dbbff9d9f2f50fe0ac59d6eabd43cf @mwiebe mwiebe committed Jan 23, 2011
View
@@ -47,6 +47,8 @@ Roberto de Almeida for the buffered array iterator.
Alan McIntyre for updating the NumPy test framework to use nose, improve
the test coverage, and enhancing the test system documentation.
Joe Harrington for administering the 2008 Documentation Sprint.
+Mark Wiebe for the new NumPy iterator, the float16 data type, improved
+ low-level data type operations, and other NumPy core improvements.
NumPy is based on the Numeric (Jim Hugunin, Paul Dubois, Konrad
Hinsen, and David Ascher) and NumArray (Perry Greenfield, J Todd
@@ -46,6 +46,7 @@
join('multiarray', 'datetime.c'),
join('multiarray', 'new_iterator.c.src'),
join('multiarray', 'new_iterator_pywrap.c'),
+ join('multiarray', 'einsum.c.src'),
join('umath', 'ufunc_object.c'),
join('umath', 'loops.c.src'),
]
@@ -300,6 +300,7 @@
'PyArray_ResultType': 265,
'PyArray_CanCastArrayTo': 266,
'PyArray_CanCastTypeTo': 267,
+ 'PyArray_EinsteinSum': 268,
}
ufunc_types_api = {
View
@@ -6,7 +6,7 @@
'can_cast', 'promote_types', 'min_scalar_type', 'result_type',
'asarray', 'asanyarray', 'ascontiguousarray', 'asfortranarray',
'isfortran', 'empty_like', 'zeros_like',
- 'correlate', 'convolve', 'inner', 'dot', 'outer', 'vdot',
+ 'correlate', 'convolve', 'inner', 'dot', 'einsum', 'outer', 'vdot',
'alterdot', 'restoredot', 'roll', 'rollaxis', 'cross', 'tensordot',
'array2string', 'get_printoptions', 'set_printoptions',
'array_repr', 'array_str', 'set_string_function',
@@ -218,6 +218,7 @@ def extend_all(module):
lexsort = multiarray.lexsort
compare_chararrays = multiarray.compare_chararrays
putmask = multiarray.putmask
+einsum = multiarray.einsum
def asarray(a, dtype=None, order=None):
"""
View
@@ -602,7 +602,8 @@ def generate_multiarray_templated_sources(ext, build_dir):
sources = [join(local_dir, subpath, 'scalartypes.c.src'),
join(local_dir, subpath, 'arraytypes.c.src'),
join(local_dir, subpath, 'new_iterator.c.src'),
- join(local_dir, subpath, 'lowlevel_strided_loops.c.src')]
+ join(local_dir, subpath, 'lowlevel_strided_loops.c.src'),
+ join(local_dir, subpath, 'einsum.c.src')]
# numpy.distutils generate .c from .c.src in weird directories, we have
# to add them there as they depend on the build_dir
@@ -771,7 +772,8 @@ def get_mathlib_info(*args):
join('src', 'multiarray', 'new_iterator.c.src'),
join('src', 'multiarray', 'lowlevel_strided_loops.c.src'),
join('src', 'multiarray', 'dtype_transfer.c'),
- join('src', 'multiarray', 'new_iterator_pywrap.c')]
+ join('src', 'multiarray', 'new_iterator_pywrap.c'),
+ join('src', 'multiarray', 'einsum.c.src')]
if PYTHON_HAS_UNICODE_WIDE:
multiarray_src.append(join('src', 'multiarray', 'ucsnarrow.c'))
@@ -2,6 +2,12 @@
* This file contains low-level loops for data type transfers.
* In particular the function PyArray_GetDTypeTransferFunction is
* implemented here.
+ *
+ * Copyright (c) 2010 by Mark Wiebe (mwwiebe@gmail.com)
+ * The Univerity of British Columbia
+ *
+ * See LICENSE.txt for the license.
+
*/
#define PY_SSIZE_T_CLEAN
Oops, something went wrong.

0 comments on commit a41de3a

Please sign in to comment.