summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Cournapeau <cournape@gmail.com>2009-04-30 08:42:26 +0000
committerDavid Cournapeau <cournape@gmail.com>2009-04-30 08:42:26 +0000
commita77eaf94e297531b59c7c63d8528aac65054e0e8 (patch)
treedff6800c6337d4c3f363f15790071da61aec80b7
parent1f37ab2935d98654a57f139bb5ef8ee8fb0f9832 (diff)
downloadnumpy-a77eaf94e297531b59c7c63d8528aac65054e0e8.tar.gz
Put multiarray modul sources into separate directory.
-rw-r--r--numpy/core/SConscript35
-rw-r--r--numpy/core/code_generators/genapi.py34
-rw-r--r--numpy/core/setup.py47
-rw-r--r--numpy/core/src/multiarray/arrayobject.c (renamed from numpy/core/src/arrayobject.c)26
-rw-r--r--numpy/core/src/multiarray/arrayobject.h (renamed from numpy/core/src/arrayobject.h)6
-rw-r--r--numpy/core/src/multiarray/arraytypes.c.src (renamed from numpy/core/src/arraytypes.c.src)4
-rw-r--r--numpy/core/src/multiarray/convert.c (renamed from numpy/core/src/arrayconvert.c)3
-rw-r--r--numpy/core/src/multiarray/convert.h (renamed from numpy/core/src/arrayconvert.h)0
-rw-r--r--numpy/core/src/multiarray/convert_datatype.c (renamed from numpy/core/src/arrayconvert_datatype.c)3
-rw-r--r--numpy/core/src/multiarray/convert_datatype.h (renamed from numpy/core/src/arrayconvert_datatype.h)0
-rw-r--r--numpy/core/src/multiarray/ctors.c (renamed from numpy/core/src/arrayctors.c)3
-rw-r--r--numpy/core/src/multiarray/ctors.h (renamed from numpy/core/src/arrayctors.h)0
-rw-r--r--numpy/core/src/multiarray/descriptor.c (renamed from numpy/core/src/arraydescr.c)1
-rw-r--r--numpy/core/src/multiarray/descriptor.h (renamed from numpy/core/src/arraydescr.h)0
-rw-r--r--numpy/core/src/multiarray/flagsobject.c (renamed from numpy/core/src/arrayflagsobject.c)1
-rw-r--r--numpy/core/src/multiarray/getset.c (renamed from numpy/core/src/arraygetset.c)4
-rw-r--r--numpy/core/src/multiarray/getset.h (renamed from numpy/core/src/arraygetset.h)0
-rw-r--r--numpy/core/src/multiarray/global.c1
-rw-r--r--numpy/core/src/multiarray/hashdescr.c (renamed from numpy/core/src/hashdescr.c)0
-rw-r--r--numpy/core/src/multiarray/hashdescr.h (renamed from numpy/core/src/hashdescr.h)0
-rw-r--r--numpy/core/src/multiarray/item_selection.c (renamed from numpy/core/src/array_item_selection.c)1
-rw-r--r--numpy/core/src/multiarray/iterators.c (renamed from numpy/core/src/arrayiterators.c)3
-rw-r--r--numpy/core/src/multiarray/iterators.h (renamed from numpy/core/src/arrayiterators.h)0
-rw-r--r--numpy/core/src/multiarray/mapping.c (renamed from numpy/core/src/arraymapping.c)4
-rw-r--r--numpy/core/src/multiarray/mapping.h (renamed from numpy/core/src/arraymapping.h)0
-rw-r--r--numpy/core/src/multiarray/methods.c (renamed from numpy/core/src/arraymethods.c)3
-rw-r--r--numpy/core/src/multiarray/methods.h (renamed from numpy/core/src/arraymethods.h)0
-rw-r--r--numpy/core/src/multiarray/multiarraymodule.c (renamed from numpy/core/src/multiarraymodule.c)6
-rw-r--r--numpy/core/src/multiarray/number.c (renamed from numpy/core/src/arraynumber.c)2
-rw-r--r--numpy/core/src/multiarray/number.h (renamed from numpy/core/src/arraynumber.h)0
-rw-r--r--numpy/core/src/multiarray/numpyos.c (renamed from numpy/core/src/numpyos.c)0
-rw-r--r--numpy/core/src/multiarray/numpyos.h (renamed from numpy/core/src/numpyos.h)0
-rw-r--r--numpy/core/src/multiarray/scalartypes.c.src (renamed from numpy/core/src/scalartypes.c.src)4
-rw-r--r--numpy/core/src/multiarray/sequence.c (renamed from numpy/core/src/arraysequence.c)5
-rw-r--r--numpy/core/src/multiarray/sequence.h (renamed from numpy/core/src/arraysequence.h)0
-rw-r--r--numpy/core/src/multiarray/shape.c (renamed from numpy/core/src/arrayshape.c)3
-rw-r--r--numpy/core/src/multiarray/shape.h (renamed from numpy/core/src/arrayshape.h)0
-rw-r--r--numpy/core/src/multiarray/ucsnarrow.c (renamed from numpy/core/src/ucsnarrow.c)0
-rw-r--r--numpy/core/src/multiarray/ucsnarrow.h (renamed from numpy/core/src/ucsnarrow.h)0
39 files changed, 106 insertions, 93 deletions
diff --git a/numpy/core/SConscript b/numpy/core/SConscript
index 5334f441f..90090ae5c 100644
--- a/numpy/core/SConscript
+++ b/numpy/core/SConscript
@@ -1,4 +1,4 @@
-# Last Change: Thu Apr 23 08:00 PM 2009 J
+# Last Change: Thu Apr 23 09:00 PM 2009 J
# vim:syntax=python
import os
import sys
@@ -252,10 +252,12 @@ env.Append(BUILDERS = {'GenerateMultiarrayApi' : array_api_gen_bld,
#------------------------
# Generate generated code
#------------------------
-scalartypes_src = env.GenerateFromTemplate(pjoin('src', 'scalartypes.c.src'))
+scalartypes_src = env.GenerateFromTemplate(
+ pjoin('src', 'multiarray', 'scalartypes.c.src'))
umath_funcs_src = env.GenerateFromTemplate(pjoin('src', 'umath_funcs.inc.src'))
umath_loops_src = env.GenerateFromTemplate(pjoin('src', 'umath_loops.c.src'))
-arraytypes_src = env.GenerateFromTemplate(pjoin('src', 'arraytypes.c.src'))
+arraytypes_src = env.GenerateFromTemplate(
+ pjoin('src', 'multiarray', 'arraytypes.c.src'))
sortmodule_src = env.GenerateFromTemplate(pjoin('src', '_sortmodule.c.src'))
umathmodule_src = env.GenerateFromTemplate(pjoin('src', 'umathmodule.c.src'))
umath_tests_src = env.GenerateFromTemplate(pjoin('src', 'umath_tests.c.src'))
@@ -282,16 +284,23 @@ env.Prepend(LIBPATH=["."])
#-----------------
# Build multiarray
#-----------------
-multiarray_src = [pjoin('src', 'multiarraymodule.c'),
- pjoin('src', 'ucsnarrow.c'),
- pjoin('src', 'hashdescr.c'), pjoin('src', 'arrayobject.c'),
- pjoin('src', 'numpyos.c'), pjoin('src', 'arrayflagsobject.c'),
- pjoin('src', 'arraydescr.c'), pjoin('src', 'arrayiterators.c'),
- pjoin('src', 'arraymapping.c'), pjoin('src', 'arraynumber.c'),
- pjoin('src', 'arraygetset.c'), pjoin('src', 'arraysequence.c'),
- pjoin('src', 'arraymethods.c'), pjoin('src', 'arrayctors.c'),
- pjoin('src', 'arrayconvert_datatype.c'), pjoin('src', 'arrayconvert.c'),
- pjoin('src', 'arrayshape.c'), pjoin('src', 'array_item_selection.c')]
+multiarray_src = [pjoin('src', 'multiarray', 'multiarraymodule.c'),
+ pjoin('src', 'multiarray', 'hashdescr.c'),
+ pjoin('src', 'multiarray', 'arrayobject.c'),
+ pjoin('src', 'multiarray', 'numpyos.c'),
+ pjoin('src', 'multiarray', 'flagsobject.c'),
+ pjoin('src', 'multiarray', 'descriptor.c'),
+ pjoin('src', 'multiarray', 'iterators.c'),
+ pjoin('src', 'multiarray', 'mapping.c'),
+ pjoin('src', 'multiarray', 'number.c'),
+ pjoin('src', 'multiarray', 'getset.c'),
+ pjoin('src', 'multiarray', 'sequence.c'),
+ pjoin('src', 'multiarray', 'methods.c'),
+ pjoin('src', 'multiarray', 'ctors.c'),
+ pjoin('src', 'multiarray', 'convert_datatype.c'),
+ pjoin('src', 'multiarray', 'convert.c'),
+ pjoin('src', 'multiarray', 'shape.c'),
+ pjoin('src', 'multiarray', 'item_selection.c')]
multiarray_src.extend(arraytypes_src)
multiarray_src.extend(scalartypes_src)
multiarray = env.DistutilsPythonExtension('multiarray', source = multiarray_src)
diff --git a/numpy/core/code_generators/genapi.py b/numpy/core/code_generators/genapi.py
index a5852b512..6d7d0d25e 100644
--- a/numpy/core/code_generators/genapi.py
+++ b/numpy/core/code_generators/genapi.py
@@ -9,25 +9,27 @@ import sys, os, re
import md5
import textwrap
+from os.path import join
+
__docformat__ = 'restructuredtext'
# The files under src/ that are scanned for API functions
-API_FILES = ['arraymethods.c',
- 'arrayobject.c',
- 'arrayflagsobject.c',
- 'arraydescr.c',
- 'arrayiterators.c',
- 'arraygetset.c',
- 'arraynumber.c',
- 'arraysequence.c',
- 'arrayctors.c',
- 'arrayconvert.c',
- 'arrayshape.c',
- 'array_item_selection.c',
- 'arrayconvert_datatype.c',
- 'arraytypes.c.src',
- 'multiarraymodule.c',
- 'scalartypes.c.src',
+API_FILES = [join('multiarray', 'methods.c'),
+ join('multiarray', 'arrayobject.c'),
+ join('multiarray', 'flagsobject.c'),
+ join('multiarray', 'descriptor.c'),
+ join('multiarray', 'iterators.c'),
+ join('multiarray', 'getset.c'),
+ join('multiarray', 'number.c'),
+ join('multiarray', 'sequence.c'),
+ join('multiarray', 'ctors.c'),
+ join('multiarray', 'convert.c'),
+ join('multiarray', 'shape.c'),
+ join('multiarray', 'item_selection.c'),
+ join('multiarray', 'convert_datatype.c'),
+ join('multiarray', 'arraytypes.c.src'),
+ join('multiarray', 'multiarraymodule.c'),
+ join('multiarray', 'scalartypes.c.src'),
'umath_ufunc_object.c',
'umath_loops.c.src'
]
diff --git a/numpy/core/setup.py b/numpy/core/setup.py
index 972872b47..4d36fcb57 100644
--- a/numpy/core/setup.py
+++ b/numpy/core/setup.py
@@ -453,12 +453,7 @@ def configuration(parent_package='',top_path=None):
config.numpy_include_dirs.extend(config.paths('include'))
- deps = [join('src','arrayobject.h'),
- join('src','arrayiterators.h'),
- join('src','arraydescr.h'),
- join('src','numpyos.h'),
- join('src','_signbit.c'),
- join('src','ucsnarrow.c'),
+ deps = [join('src','_signbit.c'),
join('include','numpy','*object.h'),
'include/numpy/fenv/fenv.c',
'include/numpy/fenv/fenv.h',
@@ -488,32 +483,32 @@ def configuration(parent_package='',top_path=None):
depends=[])
config.add_extension('multiarray',
- sources = [join('src','multiarraymodule.c'),
+ sources = [join('src','multiarray','multiarraymodule.c'),
generate_config_h,
generate_numpyconfig_h,
generate_numpy_api,
- join('src','scalartypes.c.src'),
- join('src','arraytypes.c.src'),
- join('src', 'hashdescr.c'),
- join('src','arrayobject.c'),
- join('src','arrayflagsobject.c'),
- join('src','arraydescr.c'),
- join('src','arrayiterators.c'),
- join('src','arraymapping.c'),
- join('src','arraynumber.c'),
- join('src','arraygetset.c'),
- join('src','arraysequence.c'),
- join('src','arraymethods.c'),
- join('src','arrayctors.c'),
- join('src','arrayconvert_datatype.c'),
- join('src','arrayconvert.c'),
- join('src','arrayshape.c'),
- join('src','array_item_selection.c'),
- join('src','numpyos.c'),
+ join('src','multiarray','scalartypes.c.src'),
+ join('src','multiarray','arraytypes.c.src'),
+ join('src','multiarray', 'hashdescr.c'),
+ join('src','multiarray','arrayobject.c'),
+ join('src','multiarray','flagsobject.c'),
+ join('src','multiarray','descriptor.c'),
+ join('src','multiarray','iterators.c'),
+ join('src','multiarray','mapping.c'),
+ join('src','multiarray','number.c'),
+ join('src','multiarray','getset.c'),
+ join('src','multiarray','sequence.c'),
+ join('src','multiarray','methods.c'),
+ join('src','multiarray','ctors.c'),
+ join('src','multiarray','convert_datatype.c'),
+ join('src','multiarray','convert.c'),
+ join('src','multiarray','shape.c'),
+ join('src','multiarray','item_selection.c'),
+ join('src','multiarray','numpyos.c'),
join(codegen_dir,'generate_numpy_api.py'),
join('*.py')
],
- depends = deps + [join('src', 'arraymethods.c')],
+ depends = deps,
libraries=['npymath'],
)
diff --git a/numpy/core/src/arrayobject.c b/numpy/core/src/multiarray/arrayobject.c
index 076547a8c..b9e45f951 100644
--- a/numpy/core/src/arrayobject.c
+++ b/numpy/core/src/multiarray/arrayobject.c
@@ -30,20 +30,15 @@ maintainer email: oliphant.travis@ieee.org
#include "numpy/arrayobject.h"
#include "numpy/arrayscalars.h"
-#include "arrayobject.h"
-#include "arrayctors.h"
-#include "arraymethods.h"
-#include "arraydescr.h"
-#include "arrayiterators.h"
-#include "arraymapping.h"
-#include "arraygetset.h"
-#include "arraysequence.h"
-
-#ifndef Py_UNICODE_WIDE
-#include "ucsnarrow.h"
-#endif
-
+#include "arrayobject.h"
+#include "ctors.h"
+#include "methods.h"
+#include "descriptor.h"
+#include "iterators.h"
+#include "mapping.h"
+#include "getset.h"
+#include "sequence.h"
/*NUMPY_API
* Get Priority from object
@@ -256,6 +251,11 @@ PyArray_XDECREF(PyArrayObject *mp)
return 0;
}
+#ifndef Py_UNICODE_WIDE
+#include "ucsnarrow.c"
+#endif
+
+
NPY_NO_EXPORT PyArray_Descr **userdescrs=NULL;
diff --git a/numpy/core/src/arrayobject.h b/numpy/core/src/multiarray/arrayobject.h
index 9156ea721..21e787721 100644
--- a/numpy/core/src/arrayobject.h
+++ b/numpy/core/src/multiarray/arrayobject.h
@@ -165,12 +165,12 @@ extern NPY_NO_EXPORT PyArray_Descr LONG_Descr;
extern NPY_NO_EXPORT PyArray_Descr INT_Descr;
/* Number protocol */
-#include "arraynumber.h"
+#include "number.h"
/* Converting data types API */
-#include "arrayconvert_datatype.h"
+#include "convert_datatype.h"
/* Object Conversion API */
-#include "arrayconvert.h"
+#include "convert.h"
#endif
diff --git a/numpy/core/src/arraytypes.c.src b/numpy/core/src/multiarray/arraytypes.c.src
index f1231d29e..4ca0ff429 100644
--- a/numpy/core/src/arraytypes.c.src
+++ b/numpy/core/src/multiarray/arraytypes.c.src
@@ -8,14 +8,12 @@
#include "numpy/arrayobject.h"
#include "numpy/arrayscalars.h"
+
#include "numpy/npy_math.h"
#include "arrayobject.h"
#include "config.h"
#include "numpyos.h"
-#ifndef Py_UNICODE_WIDE
-#include "ucsnarrow.h"
-#endif
static double
MyPyFloat_AsDouble(PyObject *obj)
diff --git a/numpy/core/src/arrayconvert.c b/numpy/core/src/multiarray/convert.c
index 9321a05cb..79555e5f4 100644
--- a/numpy/core/src/arrayconvert.c
+++ b/numpy/core/src/multiarray/convert.c
@@ -7,9 +7,10 @@
#include "numpy/arrayobject.h"
#include "numpy/arrayscalars.h"
+
#include "arrayobject.h"
-#include "arrayconvert.h"
+#include "convert.h"
/*NUMPY_API
* To List
diff --git a/numpy/core/src/arrayconvert.h b/numpy/core/src/multiarray/convert.h
index de24e27cf..de24e27cf 100644
--- a/numpy/core/src/arrayconvert.h
+++ b/numpy/core/src/multiarray/convert.h
diff --git a/numpy/core/src/arrayconvert_datatype.c b/numpy/core/src/multiarray/convert_datatype.c
index 921bb1a4e..ab30656e0 100644
--- a/numpy/core/src/arrayconvert_datatype.c
+++ b/numpy/core/src/multiarray/convert_datatype.c
@@ -7,9 +7,10 @@
#include "numpy/arrayobject.h"
#include "numpy/arrayscalars.h"
+
#include "arrayobject.h"
-#include "arrayconvert_datatype.h"
+#include "convert_datatype.h"
/*NUMPY_API
* For backward compatibility
diff --git a/numpy/core/src/arrayconvert_datatype.h b/numpy/core/src/multiarray/convert_datatype.h
index e7a736fcf..e7a736fcf 100644
--- a/numpy/core/src/arrayconvert_datatype.h
+++ b/numpy/core/src/multiarray/convert_datatype.h
diff --git a/numpy/core/src/arrayctors.c b/numpy/core/src/multiarray/ctors.c
index 7ff22441a..9cb8cec1c 100644
--- a/numpy/core/src/arrayctors.c
+++ b/numpy/core/src/multiarray/ctors.c
@@ -6,11 +6,12 @@
#define NPY_NO_PREFIX
#include "numpy/arrayobject.h"
#include "numpy/arrayscalars.h"
+
#include "numpy/npy_math.h"
#include "arrayobject.h"
-#include "arrayctors.h"
+#include "ctors.h"
/*
* Reading from a file or a string.
diff --git a/numpy/core/src/arrayctors.h b/numpy/core/src/multiarray/ctors.h
index 318d71471..318d71471 100644
--- a/numpy/core/src/arrayctors.h
+++ b/numpy/core/src/multiarray/ctors.h
diff --git a/numpy/core/src/arraydescr.c b/numpy/core/src/multiarray/descriptor.c
index a36640cb3..b6652e2a6 100644
--- a/numpy/core/src/arraydescr.c
+++ b/numpy/core/src/multiarray/descriptor.c
@@ -9,6 +9,7 @@
#include "numpy/arrayobject.h"
#include "numpy/arrayscalars.h"
+
#include "arrayobject.h"
#define _chk_byteorder(arg) (arg == '>' || arg == '<' || \
diff --git a/numpy/core/src/arraydescr.h b/numpy/core/src/multiarray/descriptor.h
index 005f55aa1..005f55aa1 100644
--- a/numpy/core/src/arraydescr.h
+++ b/numpy/core/src/multiarray/descriptor.h
diff --git a/numpy/core/src/arrayflagsobject.c b/numpy/core/src/multiarray/flagsobject.c
index acd5ebea4..227ead335 100644
--- a/numpy/core/src/arrayflagsobject.c
+++ b/numpy/core/src/multiarray/flagsobject.c
@@ -9,6 +9,7 @@
#include "numpy/arrayobject.h"
#include "numpy/arrayscalars.h"
+
#include "arrayobject.h"
/*NUMPY_API
diff --git a/numpy/core/src/arraygetset.c b/numpy/core/src/multiarray/getset.c
index 2d69f29ba..6526b9589 100644
--- a/numpy/core/src/arraygetset.c
+++ b/numpy/core/src/multiarray/getset.c
@@ -9,8 +9,8 @@
#include "numpy/arrayobject.h"
#include "arrayobject.h"
-#include "arraydescr.h"
-#include "arraygetset.h"
+#include "descriptor.h"
+#include "getset.h"
/******************* array attribute get and set routines ******************/
diff --git a/numpy/core/src/arraygetset.h b/numpy/core/src/multiarray/getset.h
index 4f1209de5..4f1209de5 100644
--- a/numpy/core/src/arraygetset.h
+++ b/numpy/core/src/multiarray/getset.h
diff --git a/numpy/core/src/multiarray/global.c b/numpy/core/src/multiarray/global.c
new file mode 100644
index 000000000..70110f473
--- /dev/null
+++ b/numpy/core/src/multiarray/global.c
@@ -0,0 +1 @@
+NPY_NO_EXPORT int NPY_NUMUSERTYPES = 0;
diff --git a/numpy/core/src/hashdescr.c b/numpy/core/src/multiarray/hashdescr.c
index 101d5afbb..101d5afbb 100644
--- a/numpy/core/src/hashdescr.c
+++ b/numpy/core/src/multiarray/hashdescr.c
diff --git a/numpy/core/src/hashdescr.h b/numpy/core/src/multiarray/hashdescr.h
index af0ec13b9..af0ec13b9 100644
--- a/numpy/core/src/hashdescr.h
+++ b/numpy/core/src/multiarray/hashdescr.h
diff --git a/numpy/core/src/array_item_selection.c b/numpy/core/src/multiarray/item_selection.c
index 5ca01f73c..ea9c5795d 100644
--- a/numpy/core/src/array_item_selection.c
+++ b/numpy/core/src/multiarray/item_selection.c
@@ -6,6 +6,7 @@
#define NPY_NO_PREFIX
#include "numpy/arrayobject.h"
#include "numpy/arrayscalars.h"
+
#include "numpy/npy_math.h"
#include "arrayobject.h"
diff --git a/numpy/core/src/arrayiterators.c b/numpy/core/src/multiarray/iterators.c
index d7a2f15ed..43a92c8b5 100644
--- a/numpy/core/src/arrayiterators.c
+++ b/numpy/core/src/multiarray/iterators.c
@@ -7,8 +7,9 @@
#include "numpy/arrayobject.h"
#include "numpy/arrayscalars.h"
+
#include "arrayobject.h"
-#include "arrayiterators.h"
+#include "iterators.h"
#define PseudoIndex -1
#define RubberIndex -2
diff --git a/numpy/core/src/arrayiterators.h b/numpy/core/src/multiarray/iterators.h
index f45094ab4..f45094ab4 100644
--- a/numpy/core/src/arrayiterators.h
+++ b/numpy/core/src/multiarray/iterators.h
diff --git a/numpy/core/src/arraymapping.c b/numpy/core/src/multiarray/mapping.c
index 3c4520e94..bb2297f8e 100644
--- a/numpy/core/src/arraymapping.c
+++ b/numpy/core/src/multiarray/mapping.c
@@ -8,8 +8,8 @@
#include "numpy/arrayobject.h"
#include "arrayobject.h"
-#include "arrayiterators.h"
-#include "arraymapping.h"
+#include "iterators.h"
+#include "mapping.h"
/*************************************************************************
**************** Implement Mapping Protocol ***************************
diff --git a/numpy/core/src/arraymapping.h b/numpy/core/src/multiarray/mapping.h
index 0b9b712fe..0b9b712fe 100644
--- a/numpy/core/src/arraymapping.h
+++ b/numpy/core/src/multiarray/mapping.h
diff --git a/numpy/core/src/arraymethods.c b/numpy/core/src/multiarray/methods.c
index 9d1f27fde..f27050d8e 100644
--- a/numpy/core/src/arraymethods.c
+++ b/numpy/core/src/multiarray/methods.c
@@ -7,9 +7,10 @@
#include "numpy/arrayobject.h"
#include "numpy/arrayscalars.h"
+
#include "arrayobject.h"
-#include "arraymethods.h"
+#include "methods.h"
/* Should only be used if x is known to be an nd-array */
#define _ARET(x) PyArray_Return((PyArrayObject *)(x))
diff --git a/numpy/core/src/arraymethods.h b/numpy/core/src/multiarray/methods.h
index 698a6f558..698a6f558 100644
--- a/numpy/core/src/arraymethods.h
+++ b/numpy/core/src/multiarray/methods.h
diff --git a/numpy/core/src/multiarraymodule.c b/numpy/core/src/multiarray/multiarraymodule.c
index 0ec8c4485..a06b20483 100644
--- a/numpy/core/src/multiarraymodule.c
+++ b/numpy/core/src/multiarray/multiarraymodule.c
@@ -25,14 +25,14 @@
#include "numpy/npy_math.h"
+#include "global.c"
+
#define PyAO PyArrayObject
/* Internal APIs */
#include "arrayobject.h"
#include "hashdescr.h"
-#include "arraydescr.h"
-
-NPY_NO_EXPORT int NPY_NUMUSERTYPES = 0;
+#include "descriptor.h"
NPY_NO_EXPORT PyArray_Descr *
_arraydescr_fromobj(PyObject *obj)
diff --git a/numpy/core/src/arraynumber.c b/numpy/core/src/multiarray/number.c
index aa3e250cb..c18971ffe 100644
--- a/numpy/core/src/arraynumber.c
+++ b/numpy/core/src/multiarray/number.c
@@ -8,7 +8,7 @@
#include "numpy/arrayobject.h"
#include "arrayobject.h"
-#include "arraynumber.h"
+#include "number.h"
/*************************************************************************
**************** Implement Number Protocol ****************************
diff --git a/numpy/core/src/arraynumber.h b/numpy/core/src/multiarray/number.h
index 8c004a198..8c004a198 100644
--- a/numpy/core/src/arraynumber.h
+++ b/numpy/core/src/multiarray/number.h
diff --git a/numpy/core/src/numpyos.c b/numpy/core/src/multiarray/numpyos.c
index 4d7b70a33..4d7b70a33 100644
--- a/numpy/core/src/numpyos.c
+++ b/numpy/core/src/multiarray/numpyos.c
diff --git a/numpy/core/src/numpyos.h b/numpy/core/src/multiarray/numpyos.h
index edc6df66b..edc6df66b 100644
--- a/numpy/core/src/numpyos.h
+++ b/numpy/core/src/multiarray/numpyos.h
diff --git a/numpy/core/src/scalartypes.c.src b/numpy/core/src/multiarray/scalartypes.c.src
index a320417c4..8bc8a532c 100644
--- a/numpy/core/src/scalartypes.c.src
+++ b/numpy/core/src/multiarray/scalartypes.c.src
@@ -11,12 +11,10 @@
#include "numpy/npy_math.h"
#include "numpy/arrayscalars.h"
+
#include "config.h"
#include "arrayobject.h"
#include "numpyos.h"
-#ifndef Py_UNICODE_WIDE
-#include "ucsnarrow.h"
-#endif
NPY_NO_EXPORT PyBoolScalarObject _PyArrayScalar_BoolValues[2] = {
{PyObject_HEAD_INIT(&PyBoolArrType_Type) 0},
diff --git a/numpy/core/src/arraysequence.c b/numpy/core/src/multiarray/sequence.c
index e4e48c06a..9192125c4 100644
--- a/numpy/core/src/arraysequence.c
+++ b/numpy/core/src/multiarray/sequence.c
@@ -7,10 +7,11 @@
#include "numpy/arrayobject.h"
#include "numpy/arrayscalars.h"
+
#include "arrayobject.h"
-#include "arraymapping.h"
+#include "mapping.h"
-#include "arraysequence.h"
+#include "sequence.h"
/*************************************************************************
**************** Implement Sequence Protocol **************************
diff --git a/numpy/core/src/arraysequence.h b/numpy/core/src/multiarray/sequence.h
index b28c50d97..b28c50d97 100644
--- a/numpy/core/src/arraysequence.h
+++ b/numpy/core/src/multiarray/sequence.h
diff --git a/numpy/core/src/arrayshape.c b/numpy/core/src/multiarray/shape.c
index 0800371cd..90e240057 100644
--- a/numpy/core/src/arrayshape.c
+++ b/numpy/core/src/multiarray/shape.c
@@ -6,11 +6,12 @@
#define NPY_NO_PREFIX
#include "numpy/arrayobject.h"
#include "numpy/arrayscalars.h"
+
#include "numpy/npy_math.h"
#include "arrayobject.h"
-#include "arrayshape.h"
+#include "shape.h"
#define PyAO PyArrayObject
diff --git a/numpy/core/src/arrayshape.h b/numpy/core/src/multiarray/shape.h
index 1a5991a50..1a5991a50 100644
--- a/numpy/core/src/arrayshape.h
+++ b/numpy/core/src/multiarray/shape.h
diff --git a/numpy/core/src/ucsnarrow.c b/numpy/core/src/multiarray/ucsnarrow.c
index 5183e560b..5183e560b 100644
--- a/numpy/core/src/ucsnarrow.c
+++ b/numpy/core/src/multiarray/ucsnarrow.c
diff --git a/numpy/core/src/ucsnarrow.h b/numpy/core/src/multiarray/ucsnarrow.h
index 4b0e0c111..4b0e0c111 100644
--- a/numpy/core/src/ucsnarrow.h
+++ b/numpy/core/src/multiarray/ucsnarrow.h