summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
authorMark Wiebe <mwiebe@enthought.com>2011-07-21 15:50:38 -0500
committerCharles Harris <charlesr.harris@gmail.com>2011-08-27 07:26:46 -0600
commit6d946cddb1ea7ded51f59bf4262d1169db51fed2 (patch)
tree4d38b30bd7d88d6ac4c0a0b2dc8370b2dd77df30 /numpy
parent263df0ccb21e7ccb53ea3b6654387eb85feec932 (diff)
downloadnumpy-6d946cddb1ea7ded51f59bf4262d1169db51fed2.tar.gz
ENH: Create NA singleton file
Diffstat (limited to 'numpy')
-rw-r--r--numpy/core/src/multiarray/na_singleton.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/numpy/core/src/multiarray/na_singleton.c b/numpy/core/src/multiarray/na_singleton.c
new file mode 100644
index 000000000..8ad2122d1
--- /dev/null
+++ b/numpy/core/src/multiarray/na_singleton.c
@@ -0,0 +1,22 @@
+/*
+ * This file implements the missing value NA singleton object for NumPy.
+ *
+ * Written by Mark Wiebe (mwwiebe@gmail.com)
+ * Copyright (c) 2011 by Enthought, Inc.
+ *
+ * See LICENSE.txt for the license.
+ */
+
+/*
+ * Initializes the numpy.NA singleton object. Just like None in CPython,
+ * the type of NA is not exposed, and there is no NpyNA_Check() function.
+ *
+ * Some behaviors of the NA singleton:
+ * - np.NA(payload=None, dtype=None) creates a zero-dimensional
+ * ndarray containing a single NA. If dtype is an NA dtype, it's
+ * an ndarray without an NA mask, otherwise it does have an NA mask.
+ */
+NPY_NO_EXPORT void
+numpy_na_singleton_init()
+{
+}