SourceForge logo
SourceForge logo
Menu

matplotlib-checkins — Commit notification. DO NOT POST to this list, just subscribe to it.

You can subscribe to this list here.

2007 Jan
Feb
Mar
Apr
May
Jun
Jul
(115)
Aug
(120)
Sep
(137)
Oct
(170)
Nov
(461)
Dec
(263)
2008 Jan
(120)
Feb
(74)
Mar
(35)
Apr
(74)
May
(245)
Jun
(356)
Jul
(240)
Aug
(115)
Sep
(78)
Oct
(225)
Nov
(98)
Dec
(271)
2009 Jan
(132)
Feb
(84)
Mar
(74)
Apr
(56)
May
(90)
Jun
(79)
Jul
(83)
Aug
(296)
Sep
(214)
Oct
(76)
Nov
(82)
Dec
(66)
2010 Jan
(46)
Feb
(58)
Mar
(51)
Apr
(77)
May
(58)
Jun
(126)
Jul
(128)
Aug
(64)
Sep
(50)
Oct
(44)
Nov
(48)
Dec
(54)
2011 Jan
(68)
Feb
(52)
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
(1)
2018 Jan
Feb
Mar
Apr
May
(1)
Jun
Jul
Aug
Sep
Oct
Nov
Dec
S M T W T F S




1
(1)
2
(8)
3
(2)
4
5
(6)
6
(27)
7
(7)
8
(5)
9
(3)
10
11
(1)
12
13
(2)
14
(9)
15
(7)
16
(5)
17
(2)
18
19
20
(2)
21
22
23
(5)
24
(2)
25
(2)
26
(4)
27
(4)
28
(7)
29
(5)
30
(6)
31
(6)

Showing 5 results of 5

From: <js...@us...> - 2010年07月08日 15:59:45
Revision: 8536
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8536&view=rev
Author: jswhit
Date: 2010年07月08日 15:59:38 +0000 (2010年7月08日)
Log Message:
-----------
update
Added Paths:
-----------
 trunk/toolkits/natgrid/Changelog
Added: trunk/toolkits/natgrid/Changelog
===================================================================
--- trunk/toolkits/natgrid/Changelog	 (rev 0)
+++ trunk/toolkits/natgrid/Changelog	2010年07月08日 15:59:38 UTC (rev 8536)
@@ -0,0 +1,5 @@
+version 0.2:
+* updated c code from NCL 5.2.0. Now automatically removes duplicate points.
+version 0.1:
+* initial release. c source code from NCL 5.0.0.
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <js...@us...> - 2010年07月08日 14:23:52
Revision: 8535
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8535&view=rev
Author: jswhit
Date: 2010年07月08日 14:23:46 +0000 (2010年7月08日)
Log Message:
-----------
bump version number to 0.2
Modified Paths:
--------------
 trunk/toolkits/natgrid/lib/mpl_toolkits/natgrid/__init__.py
 trunk/toolkits/natgrid/setup.py
Modified: trunk/toolkits/natgrid/lib/mpl_toolkits/natgrid/__init__.py
===================================================================
--- trunk/toolkits/natgrid/lib/mpl_toolkits/natgrid/__init__.py	2010年07月08日 14:22:44 UTC (rev 8534)
+++ trunk/toolkits/natgrid/lib/mpl_toolkits/natgrid/__init__.py	2010年07月08日 14:23:46 UTC (rev 8535)
@@ -1,4 +1,4 @@
-__version__ = '0.1'
+__version__ = '0.2'
 __doc__ = """
 Python interface to NCAR natgrid library. If installed, used
 by matplotlib griddata function. Not intended to be accessed directly by users."""
Modified: trunk/toolkits/natgrid/setup.py
===================================================================
--- trunk/toolkits/natgrid/setup.py	2010年07月08日 14:22:44 UTC (rev 8534)
+++ trunk/toolkits/natgrid/setup.py	2010年07月08日 14:23:46 UTC (rev 8535)
@@ -6,7 +6,7 @@
 extensions = [Extension("mpl_toolkits.natgrid._natgrid",deps,include_dirs = ['src'],)]
 setup(
 name = "natgrid",
- version = "0.1",
+ version = "0.2",
 description = "Python interface to NCAR natgrid library",
 url = "http://matplotlib.sourceforge.net/toolkits.html",
 download_url = "http://sourceforge.net/projects/matplotlib",
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <js...@us...> - 2010年07月08日 14:22:51
Revision: 8534
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8534&view=rev
Author: jswhit
Date: 2010年07月08日 14:22:44 +0000 (2010年7月08日)
Log Message:
-----------
updates from ncl 4.2.0
Modified Paths:
--------------
 trunk/toolkits/natgrid/src/_natgrid.c
 trunk/toolkits/natgrid/src/natgrid.c
 trunk/toolkits/natgrid/src/natgridd.c
 trunk/toolkits/natgrid/src/natgrids.c
 trunk/toolkits/natgrid/src/nnchead.h
 trunk/toolkits/natgrid/src/nncheadd.h
 trunk/toolkits/natgrid/src/nncheads.h
 trunk/toolkits/natgrid/src/nncrunch.c
 trunk/toolkits/natgrid/src/nncrunchd.c
 trunk/toolkits/natgrid/src/nncrunchs.c
 trunk/toolkits/natgrid/src/nnexver.h
 trunk/toolkits/natgrid/src/nnghead.h
 trunk/toolkits/natgrid/src/nngheadd.h
 trunk/toolkits/natgrid/src/nngheads.h
 trunk/toolkits/natgrid/src/nnmhead.h
 trunk/toolkits/natgrid/src/nntpvrs.h
 trunk/toolkits/natgrid/src/nntypes.h
 trunk/toolkits/natgrid/src/nnuhead.h
 trunk/toolkits/natgrid/src/nnuheadd.h
 trunk/toolkits/natgrid/src/nnuheads.h
 trunk/toolkits/natgrid/src/nnuser.c
 trunk/toolkits/natgrid/src/nnuserd.c
 trunk/toolkits/natgrid/src/nnusers.c
Modified: trunk/toolkits/natgrid/src/_natgrid.c
===================================================================
--- trunk/toolkits/natgrid/src/_natgrid.c	2010年07月08日 14:22:11 UTC (rev 8533)
+++ trunk/toolkits/natgrid/src/_natgrid.c	2010年07月08日 14:22:44 UTC (rev 8534)
@@ -1,73 +1,260 @@
-/* Generated by Cython 0.9.6.12 on Sun Jul 20 11:01:12 2008 */
+/* Generated by Cython 0.12.1 on Thu Jul 8 07:56:49 2010 */
 
 #define PY_SSIZE_T_CLEAN
 #include "Python.h"
 #include "structmember.h"
+#ifndef Py_PYTHON_H
+ #error Python headers needed to compile C extensions, please install development version of Python.
+#else
+
 #ifndef PY_LONG_LONG
 #define PY_LONG_LONG LONG_LONG
 #endif
+#ifndef DL_EXPORT
+ #define DL_EXPORT(t) t
+#endif
+#if PY_VERSION_HEX < 0x02040000
+ #define METH_COEXIST 0
+ #define PyDict_CheckExact(op) (Py_TYPE(op) == &PyDict_Type)
+ #define PyDict_Contains(d,o) PySequence_Contains(d,o)
+#endif
+
 #if PY_VERSION_HEX < 0x02050000
 typedef int Py_ssize_t;
 #define PY_SSIZE_T_MAX INT_MAX
 #define PY_SSIZE_T_MIN INT_MIN
+ #define PY_FORMAT_SIZE_T ""
 #define PyInt_FromSsize_t(z) PyInt_FromLong(z)
 #define PyInt_AsSsize_t(o) PyInt_AsLong(o)
 #define PyNumber_Index(o) PyNumber_Int(o)
 #define PyIndex_Check(o) PyNumber_Check(o)
+ #define PyErr_WarnEx(category, message, stacklevel) PyErr_Warn(category, message)
 #endif
-#if PY_VERSION_HEX < 0x02040000
- #define METH_COEXIST 0
+
+#if PY_VERSION_HEX < 0x02060000
+ #define Py_REFCNT(ob) (((PyObject*)(ob))->ob_refcnt)
+ #define Py_TYPE(ob) (((PyObject*)(ob))->ob_type)
+ #define Py_SIZE(ob) (((PyVarObject*)(ob))->ob_size)
+ #define PyVarObject_HEAD_INIT(type, size) \
+ PyObject_HEAD_INIT(type) size,
+ #define PyType_Modified(t)
+
+ typedef struct {
+ void *buf;
+ PyObject *obj;
+ Py_ssize_t len;
+ Py_ssize_t itemsize;
+ int readonly;
+ int ndim;
+ char *format;
+ Py_ssize_t *shape;
+ Py_ssize_t *strides;
+ Py_ssize_t *suboffsets;
+ void *internal;
+ } Py_buffer;
+
+ #define PyBUF_SIMPLE 0
+ #define PyBUF_WRITABLE 0x0001
+ #define PyBUF_FORMAT 0x0004
+ #define PyBUF_ND 0x0008
+ #define PyBUF_STRIDES (0x0010 | PyBUF_ND)
+ #define PyBUF_C_CONTIGUOUS (0x0020 | PyBUF_STRIDES)
+ #define PyBUF_F_CONTIGUOUS (0x0040 | PyBUF_STRIDES)
+ #define PyBUF_ANY_CONTIGUOUS (0x0080 | PyBUF_STRIDES)
+ #define PyBUF_INDIRECT (0x0100 | PyBUF_STRIDES)
+
 #endif
-#ifndef WIN32
- #define __stdcall
- #define __cdecl
+
+#if PY_MAJOR_VERSION < 3
+ #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
+#else
+ #define __Pyx_BUILTIN_MODULE_NAME "builtins"
 #endif
+
+#if PY_MAJOR_VERSION >= 3
+ #define Py_TPFLAGS_CHECKTYPES 0
+ #define Py_TPFLAGS_HAVE_INDEX 0
+#endif
+
+#if (PY_VERSION_HEX < 0x02060000) || (PY_MAJOR_VERSION >= 3)
+ #define Py_TPFLAGS_HAVE_NEWBUFFER 0
+#endif
+
+#if PY_MAJOR_VERSION >= 3
+ #define PyBaseString_Type PyUnicode_Type
+ #define PyString_Type PyUnicode_Type
+ #define PyString_CheckExact PyUnicode_CheckExact
+#else
+ #define PyBytes_Type PyString_Type
+ #define PyBytes_CheckExact PyString_CheckExact
+#endif
+
+#if PY_MAJOR_VERSION >= 3
+ #define PyInt_Type PyLong_Type
+ #define PyInt_Check(op) PyLong_Check(op)
+ #define PyInt_CheckExact(op) PyLong_CheckExact(op)
+ #define PyInt_FromString PyLong_FromString
+ #define PyInt_FromUnicode PyLong_FromUnicode
+ #define PyInt_FromLong PyLong_FromLong
+ #define PyInt_FromSize_t PyLong_FromSize_t
+ #define PyInt_FromSsize_t PyLong_FromSsize_t
+ #define PyInt_AsLong PyLong_AsLong
+ #define PyInt_AS_LONG PyLong_AS_LONG
+ #define PyInt_AsSsize_t PyLong_AsSsize_t
+ #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask
+ #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
+ #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y)
+ #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y)
+#else
+ #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y)
+ #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y)
+
+#endif
+
+#if PY_MAJOR_VERSION >= 3
+ #define PyMethod_New(func, self, klass) PyInstanceMethod_New(func)
+#endif
+
+#if !defined(WIN32) && !defined(MS_WINDOWS)
+ #ifndef __stdcall
+ #define __stdcall
+ #endif
+ #ifndef __cdecl
+ #define __cdecl
+ #endif
+ #ifndef __fastcall
+ #define __fastcall
+ #endif
+#else
+ #define _USE_MATH_DEFINES
+#endif
+
+#if PY_VERSION_HEX < 0x02050000
+ #define __Pyx_GetAttrString(o,n) PyObject_GetAttrString((o),((char *)(n)))
+ #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),((char *)(n)),(a))
+ #define __Pyx_DelAttrString(o,n) PyObject_DelAttrString((o),((char *)(n)))
+#else
+ #define __Pyx_GetAttrString(o,n) PyObject_GetAttrString((o),(n))
+ #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),(n),(a))
+ #define __Pyx_DelAttrString(o,n) PyObject_DelAttrString((o),(n))
+#endif
+
+#if PY_VERSION_HEX < 0x02050000
+ #define __Pyx_NAMESTR(n) ((char *)(n))
+ #define __Pyx_DOCSTR(n) ((char *)(n))
+#else
+ #define __Pyx_NAMESTR(n) (n)
+ #define __Pyx_DOCSTR(n) (n)
+#endif
 #ifdef __cplusplus
 #define __PYX_EXTERN_C extern "C"
 #else
 #define __PYX_EXTERN_C extern
 #endif
 #include <math.h>
+#define __PYX_HAVE_API___natgrid
 
+#ifndef CYTHON_INLINE
+ #if defined(__GNUC__)
+ #define CYTHON_INLINE __inline__
+ #elif defined(_MSC_VER)
+ #define CYTHON_INLINE __inline
+ #else
+ #define CYTHON_INLINE 
+ #endif
+#endif
 
-#ifdef __GNUC__
-#define INLINE __inline__
-#elif _WIN32
-#define INLINE __inline
+typedef struct {PyObject **p; char *s; const long n; const char* encoding; const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; /*proto*/
+
+
+/* Type Conversion Predeclarations */
+
+#if PY_MAJOR_VERSION < 3
+#define __Pyx_PyBytes_FromString PyString_FromString
+#define __Pyx_PyBytes_FromStringAndSize PyString_FromStringAndSize
+#define __Pyx_PyBytes_AsString PyString_AsString
 #else
-#define INLINE 
+#define __Pyx_PyBytes_FromString PyBytes_FromString
+#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
+#define __Pyx_PyBytes_AsString PyBytes_AsString
 #endif
 
-typedef struct {PyObject **p; char *s;} __Pyx_InternTabEntry; /*proto*/
-typedef struct {PyObject **p; char *s; long n; int is_unicode;} __Pyx_StringTabEntry; /*proto*/
+#define __Pyx_PyBytes_FromUString(s) __Pyx_PyBytes_FromString((char*)s)
+#define __Pyx_PyBytes_AsUString(s) ((unsigned char*) __Pyx_PyBytes_AsString(s))
 
+#define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False))
+static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
+static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x);
 
+#if !defined(T_PYSSIZET)
+#if PY_VERSION_HEX < 0x02050000
+#define T_PYSSIZET T_INT
+#elif !defined(T_LONGLONG)
+#define T_PYSSIZET \
+ ((sizeof(Py_ssize_t) == sizeof(int)) ? T_INT : \
+ ((sizeof(Py_ssize_t) == sizeof(long)) ? T_LONG : -1))
+#else
+#define T_PYSSIZET \
+ ((sizeof(Py_ssize_t) == sizeof(int)) ? T_INT : \
+ ((sizeof(Py_ssize_t) == sizeof(long)) ? T_LONG : \
+ ((sizeof(Py_ssize_t) == sizeof(PY_LONG_LONG)) ? T_LONGLONG : -1)))
+#endif
+#endif
 
-static int __pyx_skip_dispatch = 0;
 
+#if !defined(T_ULONGLONG)
+#define __Pyx_T_UNSIGNED_INT(x) \
+ ((sizeof(x) == sizeof(unsigned char)) ? T_UBYTE : \
+ ((sizeof(x) == sizeof(unsigned short)) ? T_USHORT : \
+ ((sizeof(x) == sizeof(unsigned int)) ? T_UINT : \
+ ((sizeof(x) == sizeof(unsigned long)) ? T_ULONG : -1))))
+#else
+#define __Pyx_T_UNSIGNED_INT(x) \
+ ((sizeof(x) == sizeof(unsigned char)) ? T_UBYTE : \
+ ((sizeof(x) == sizeof(unsigned short)) ? T_USHORT : \
+ ((sizeof(x) == sizeof(unsigned int)) ? T_UINT : \
+ ((sizeof(x) == sizeof(unsigned long)) ? T_ULONG : \
+ ((sizeof(x) == sizeof(unsigned PY_LONG_LONG)) ? T_ULONGLONG : -1)))))
+#endif
+#if !defined(T_LONGLONG)
+#define __Pyx_T_SIGNED_INT(x) \
+ ((sizeof(x) == sizeof(char)) ? T_BYTE : \
+ ((sizeof(x) == sizeof(short)) ? T_SHORT : \
+ ((sizeof(x) == sizeof(int)) ? T_INT : \
+ ((sizeof(x) == sizeof(long)) ? T_LONG : -1))))
+#else
+#define __Pyx_T_SIGNED_INT(x) \
+ ((sizeof(x) == sizeof(char)) ? T_BYTE : \
+ ((sizeof(x) == sizeof(short)) ? T_SHORT : \
+ ((sizeof(x) == sizeof(int)) ? T_INT : \
+ ((sizeof(x) == sizeof(long)) ? T_LONG : \
+ ((sizeof(x) == sizeof(PY_LONG_LONG)) ? T_LONGLONG : -1)))))
+#endif
 
-/* Type Conversion Predeclarations */
+#define __Pyx_T_FLOATING(x) \
+ ((sizeof(x) == sizeof(float)) ? T_FLOAT : \
+ ((sizeof(x) == sizeof(double)) ? T_DOUBLE : -1))
 
-#define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False))
-static INLINE int __Pyx_PyObject_IsTrue(PyObject* x);
-static INLINE PY_LONG_LONG __pyx_PyInt_AsLongLong(PyObject* x);
-static INLINE unsigned PY_LONG_LONG __pyx_PyInt_AsUnsignedLongLong(PyObject* x);
-static INLINE Py_ssize_t __pyx_PyIndex_AsSsize_t(PyObject* b);
+#if !defined(T_SIZET)
+#if !defined(T_ULONGLONG)
+#define T_SIZET \
+ ((sizeof(size_t) == sizeof(unsigned int)) ? T_UINT : \
+ ((sizeof(size_t) == sizeof(unsigned long)) ? T_ULONG : -1))
+#else
+#define T_SIZET \
+ ((sizeof(size_t) == sizeof(unsigned int)) ? T_UINT : \
+ ((sizeof(size_t) == sizeof(unsigned long)) ? T_ULONG : \
+ ((sizeof(size_t) == sizeof(unsigned PY_LONG_LONG)) ? T_ULONGLONG : -1)))
+#endif
+#endif
 
-#define __pyx_PyInt_AsLong(x) (PyInt_CheckExact(x) ? PyInt_AS_LONG(x) : PyInt_AsLong(x))
+static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
+static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
+static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*);
+
 #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
 
-static INLINE unsigned char __pyx_PyInt_unsigned_char(PyObject* x);
-static INLINE unsigned short __pyx_PyInt_unsigned_short(PyObject* x);
-static INLINE char __pyx_PyInt_char(PyObject* x);
-static INLINE short __pyx_PyInt_short(PyObject* x);
-static INLINE int __pyx_PyInt_int(PyObject* x);
-static INLINE long __pyx_PyInt_long(PyObject* x);
-static INLINE signed char __pyx_PyInt_signed_char(PyObject* x);
-static INLINE signed short __pyx_PyInt_signed_short(PyObject* x);
-static INLINE signed int __pyx_PyInt_signed_int(PyObject* x);
-static INLINE signed long __pyx_PyInt_signed_long(PyObject* x);
-static INLINE long double __pyx_PyInt_long_double(PyObject* x);
+
 #ifdef __GNUC__
 /* Test for GCC > 2.95 */
 #if __GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)) 
@@ -85,35 +272,158 @@
 static PyObject *__pyx_m;
 static PyObject *__pyx_b;
 static PyObject *__pyx_empty_tuple;
+static PyObject *__pyx_empty_bytes;
 static int __pyx_lineno;
-static char *__pyx_filename;
-static char **__pyx_f;
+static int __pyx_clineno = 0;
+static const char * __pyx_cfilenm= __FILE__;
+static const char *__pyx_filename;
+static const char **__pyx_f;
 
-static char __pyx_mdoc[] = "\nPyrex wrapper for NCAR natgrid library for interpolation\nof irregularly spaced data to a grid.\n\ncopyright (c) 2007 by Jeffrey Whitaker.\n\nPermission to use, copy, modify, and distribute this software and its\ndocumentation for any purpose and without fee is hereby granted,\nprovided that the above copyright notices appear in all copies and that\nboth the copyright notices and this permission notice appear in\nsupporting documentation.\nTHE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,\nINCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO\nEVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT OR\nCONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF\nUSE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n";
 
+/* Type declarations */
+
+#ifndef CYTHON_REFNANNY
+ #define CYTHON_REFNANNY 0
+#endif
+
+#if CYTHON_REFNANNY
+ typedef struct {
+ void (*INCREF)(void*, PyObject*, int);
+ void (*DECREF)(void*, PyObject*, int);
+ void (*GOTREF)(void*, PyObject*, int);
+ void (*GIVEREF)(void*, PyObject*, int);
+ void* (*SetupContext)(const char*, int, const char*);
+ void (*FinishContext)(void**);
+ } __Pyx_RefNannyAPIStruct;
+ static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
+ static __Pyx_RefNannyAPIStruct * __Pyx_RefNannyImportAPI(const char *modname) {
+ PyObject *m = NULL, *p = NULL;
+ void *r = NULL;
+ m = PyImport_ImportModule((char *)modname);
+ if (!m) goto end;
+ p = PyObject_GetAttrString(m, (char *)"RefNannyAPI");
+ if (!p) goto end;
+ r = PyLong_AsVoidPtr(p);
+ end:
+ Py_XDECREF(p);
+ Py_XDECREF(m);
+ return (__Pyx_RefNannyAPIStruct *)r;
+ }
+ #define __Pyx_RefNannySetupContext(name) void *__pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
+ #define __Pyx_RefNannyFinishContext() __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
+ #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
+ #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
+ #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
+ #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
+ #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r);} } while(0)
+#else
+ #define __Pyx_RefNannySetupContext(name)
+ #define __Pyx_RefNannyFinishContext()
+ #define __Pyx_INCREF(r) Py_INCREF(r)
+ #define __Pyx_DECREF(r) Py_DECREF(r)
+ #define __Pyx_GOTREF(r)
+ #define __Pyx_GIVEREF(r)
+ #define __Pyx_XDECREF(r) Py_XDECREF(r)
+#endif /* CYTHON_REFNANNY */
+#define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);} } while(0)
+#define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r);} } while(0)
+
+static void __Pyx_RaiseDoubleKeywordsError(
+ const char* func_name, PyObject* kw_name); /*proto*/
+
+static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
+ Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); /*proto*/
+
+static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[], PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, const char* function_name); /*proto*/
+
+static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t, Py_ssize_t); /* proto */
+
 static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/
 
+static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
+static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
+
 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
 
-static int __Pyx_InternStrings(__Pyx_InternTabEntry *t); /*proto*/
+static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject *);
 
-static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/
+static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject *);
 
-static void __Pyx_AddTraceback(char *funcname); /*proto*/
+static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject *);
 
-/* Declarations from _natgrid */
+static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject *);
 
+static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject *);
+
+static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject *);
+
+static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject *);
+
+static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject *);
+
+static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject *);
+
+static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject *);
+
+static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject *);
+
+static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject *);
+
+static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject *);
+
+static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject *);
+
+static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject *);
+
+static void __Pyx_AddTraceback(const char *funcname); /*proto*/
+
+static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/
+/* Module declarations from _natgrid */
+
 __PYX_EXTERN_C DL_EXPORT(void) c_nnseti(char *, int); /*proto*/
 __PYX_EXTERN_C DL_EXPORT(double) *c_natgridd(int, double *, double *, double *, int, int, double *, double *, int *); /*proto*/
 __PYX_EXTERN_C DL_EXPORT(void) c_nnsetr(char *, float); /*proto*/
+#define __Pyx_MODULE_NAME "_natgrid"
+int __pyx_module_is_main__natgrid = 0;
 
-
 /* Implementation of _natgrid */
+static PyObject *__pyx_builtin_RuntimeError;
+static char __pyx_k_1[] = "error getting buffer for x";
+static char __pyx_k_2[] = "error getting buffer for y";
+static char __pyx_k_3[] = "error getting buffer for z";
+static char __pyx_k_4[] = "error in natgridd - ier =";
+static char __pyx_k_5[] = "\nPyrex wrapper for NCAR natgrid library for interpolation\nof irregularly spaced data to a grid.\n\ncopyright (c) 2007 by Jeffrey Whitaker.\n\nPermission to use, copy, modify, and distribute this software and its\ndocumentation for any purpose and without fee is hereby granted,\nprovided that the above copyright notices appear in all copies and that\nboth the copyright notices and this permission notice appear in\nsupporting documentation.\nTHE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,\nINCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO\nEVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT OR\nCONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF\nUSE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n";
+static char __pyx_k__x[] = "x";
+static char __pyx_k__y[] = "y";
+static char __pyx_k__z[] = "z";
+static char __pyx_k__xo[] = "xo";
+static char __pyx_k__yo[] = "yo";
+static char __pyx_k__zo[] = "zo";
+static char __pyx_k__name[] = "name";
+static char __pyx_k__value[] = "value";
+static char __pyx_k____main__[] = "__main__";
+static char __pyx_k____test__[] = "__test__";
+static char __pyx_k__RuntimeError[] = "RuntimeError";
+static PyObject *__pyx_kp_s_1;
+static PyObject *__pyx_kp_s_2;
+static PyObject *__pyx_kp_s_3;
+static PyObject *__pyx_kp_s_4;
+static PyObject *__pyx_n_s__RuntimeError;
+static PyObject *__pyx_n_s____main__;
+static PyObject *__pyx_n_s____test__;
+static PyObject *__pyx_n_s__name;
+static PyObject *__pyx_n_s__value;
+static PyObject *__pyx_n_s__x;
+static PyObject *__pyx_n_s__xo;
+static PyObject *__pyx_n_s__y;
+static PyObject *__pyx_n_s__yo;
+static PyObject *__pyx_n_s__z;
+static PyObject *__pyx_n_s__zo;
 
-/* "/Users/jwhitaker/python/matplotlib/lib/natgrid/src/_natgrid.pyx":32
+/* "/Users/jsw/python/natgrid/src/_natgrid.pyx":32
 * char *PyString_AsString(object)
 * 
- * def seti(name, value): # <<<<<<<<<<<<<< 
+ * def seti(name, value): # <<<<<<<<<<<<<<
 * cdef char *pnam
 * cdef int ival
 */
@@ -124,60 +434,88 @@
 PyObject *__pyx_v_value = 0;
 char *__pyx_v_pnam;
 int __pyx_v_ival;
- PyObject *__pyx_r;
- char *__pyx_1;
- int __pyx_2;
- static char *__pyx_argnames[] = {"name","value",0};
- if (likely(!__pyx_kwds) && likely(PyTuple_GET_SIZE(__pyx_args) == 2)) {
+ PyObject *__pyx_r = NULL;
+ char *__pyx_t_1;
+ int __pyx_t_2;
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__name,&__pyx_n_s__value,0};
+ __Pyx_RefNannySetupContext("seti");
+ __pyx_self = __pyx_self;
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
+ PyObject* values[2] = {0,0};
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+ case 0:
+ values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__name);
+ if (likely(values[0])) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ case 1:
+ values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__value);
+ if (likely(values[1])) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("seti", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "seti") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ __pyx_v_name = values[0];
+ __pyx_v_value = values[1];
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
 __pyx_v_name = PyTuple_GET_ITEM(__pyx_args, 0);
 __pyx_v_value = PyTuple_GET_ITEM(__pyx_args, 1);
 }
- else {
- if (unlikely(!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_name, &__pyx_v_value))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; goto __pyx_L2;}
- }
- goto __pyx_L3;
- __pyx_L2:;
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("seti", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("_natgrid.seti");
 return NULL;
- __pyx_L3:;
- Py_INCREF(__pyx_v_name);
- Py_INCREF(__pyx_v_value);
+ __pyx_L4_argument_unpacking_done:;
 
- /* "/Users/jwhitaker/python/matplotlib/lib/natgrid/src/_natgrid.pyx":35
+ /* "/Users/jsw/python/natgrid/src/_natgrid.pyx":35
 * cdef char *pnam
 * cdef int ival
- * pnam = name; ival = value # <<<<<<<<<<<<<< 
+ * pnam = name; ival = value # <<<<<<<<<<<<<<
 * c_nnseti(pnam, ival)
 * 
 */
- __pyx_1 = PyString_AsString(__pyx_v_name); if (unlikely((!__pyx_1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; goto __pyx_L1;}
- __pyx_v_pnam = __pyx_1;
- __pyx_2 = __pyx_PyInt_int(__pyx_v_value); if (unlikely((__pyx_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; goto __pyx_L1;}
- __pyx_v_ival = __pyx_2;
+ __pyx_t_1 = __Pyx_PyBytes_AsString(__pyx_v_name); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_v_pnam = __pyx_t_1;
+ __pyx_t_2 = __Pyx_PyInt_AsInt(__pyx_v_value); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_v_ival = __pyx_t_2;
 
- /* "/Users/jwhitaker/python/matplotlib/lib/natgrid/src/_natgrid.pyx":36
+ /* "/Users/jsw/python/natgrid/src/_natgrid.pyx":36
 * cdef int ival
 * pnam = name; ival = value
- * c_nnseti(pnam, ival) # <<<<<<<<<<<<<< 
+ * c_nnseti(pnam, ival) # <<<<<<<<<<<<<<
 * 
 * def setr(name, value):
 */
 c_nnseti(__pyx_v_pnam, __pyx_v_ival);
 
- __pyx_r = Py_None; Py_INCREF(Py_None);
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
 goto __pyx_L0;
- __pyx_L1:;
+ __pyx_L1_error:;
 __Pyx_AddTraceback("_natgrid.seti");
 __pyx_r = NULL;
 __pyx_L0:;
- Py_DECREF(__pyx_v_name);
- Py_DECREF(__pyx_v_value);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
 return __pyx_r;
 }
 
-/* "/Users/jwhitaker/python/matplotlib/lib/natgrid/src/_natgrid.pyx":38
+/* "/Users/jsw/python/natgrid/src/_natgrid.pyx":38
 * c_nnseti(pnam, ival)
 * 
- * def setr(name, value): # <<<<<<<<<<<<<< 
+ * def setr(name, value): # <<<<<<<<<<<<<<
 * cdef char *pnam
 * cdef float fval
 */
@@ -188,84 +526,92 @@
 PyObject *__pyx_v_value = 0;
 char *__pyx_v_pnam;
 float __pyx_v_fval;
- PyObject *__pyx_r;
- char *__pyx_1;
- float __pyx_2;
- static char *__pyx_argnames[] = {"name","value",0};
- if (likely(!__pyx_kwds) && likely(PyTuple_GET_SIZE(__pyx_args) == 2)) {
+ PyObject *__pyx_r = NULL;
+ char *__pyx_t_1;
+ float __pyx_t_2;
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__name,&__pyx_n_s__value,0};
+ __Pyx_RefNannySetupContext("setr");
+ __pyx_self = __pyx_self;
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
+ PyObject* values[2] = {0,0};
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+ case 0:
+ values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__name);
+ if (likely(values[0])) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ case 1:
+ values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__value);
+ if (likely(values[1])) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("setr", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "setr") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ __pyx_v_name = values[0];
+ __pyx_v_value = values[1];
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
 __pyx_v_name = PyTuple_GET_ITEM(__pyx_args, 0);
 __pyx_v_value = PyTuple_GET_ITEM(__pyx_args, 1);
 }
- else {
- if (unlikely(!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_name, &__pyx_v_value))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; goto __pyx_L2;}
- }
- goto __pyx_L3;
- __pyx_L2:;
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("setr", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("_natgrid.setr");
 return NULL;
- __pyx_L3:;
- Py_INCREF(__pyx_v_name);
- Py_INCREF(__pyx_v_value);
+ __pyx_L4_argument_unpacking_done:;
 
- /* "/Users/jwhitaker/python/matplotlib/lib/natgrid/src/_natgrid.pyx":41
+ /* "/Users/jsw/python/natgrid/src/_natgrid.pyx":41
 * cdef char *pnam
 * cdef float fval
- * pnam = name; fval = value # <<<<<<<<<<<<<< 
+ * pnam = name; fval = value # <<<<<<<<<<<<<<
 * c_nnsetr(pnam, fval)
 * 
 */
- __pyx_1 = PyString_AsString(__pyx_v_name); if (unlikely((!__pyx_1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; goto __pyx_L1;}
- __pyx_v_pnam = __pyx_1;
- __pyx_2 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; goto __pyx_L1;}
- __pyx_v_fval = __pyx_2;
+ __pyx_t_1 = __Pyx_PyBytes_AsString(__pyx_v_name); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_v_pnam = __pyx_t_1;
+ __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_2 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_v_fval = __pyx_t_2;
 
- /* "/Users/jwhitaker/python/matplotlib/lib/natgrid/src/_natgrid.pyx":42
+ /* "/Users/jsw/python/natgrid/src/_natgrid.pyx":42
 * cdef float fval
 * pnam = name; fval = value
- * c_nnsetr(pnam, fval) # <<<<<<<<<<<<<< 
+ * c_nnsetr(pnam, fval) # <<<<<<<<<<<<<<
 * 
 * def natgridd(x, y, z, xo, yo, zo):
 */
 c_nnsetr(__pyx_v_pnam, __pyx_v_fval);
 
- __pyx_r = Py_None; Py_INCREF(Py_None);
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
 goto __pyx_L0;
- __pyx_L1:;
+ __pyx_L1_error:;
 __Pyx_AddTraceback("_natgrid.setr");
 __pyx_r = NULL;
 __pyx_L0:;
- Py_DECREF(__pyx_v_name);
- Py_DECREF(__pyx_v_value);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
 return __pyx_r;
 }
 
-/* "/Users/jwhitaker/python/matplotlib/lib/natgrid/src/_natgrid.pyx":44
+/* "/Users/jsw/python/natgrid/src/_natgrid.pyx":44
 * c_nnsetr(pnam, fval)
 * 
- * def natgridd(x, y, z, xo, yo, zo): # <<<<<<<<<<<<<< 
+ * def natgridd(x, y, z, xo, yo, zo): # <<<<<<<<<<<<<<
 * cdef int npnts, numxout, numyout, ier
 * cdef Py_ssize_t buflenx, bufleny, buflenz, buflenxo, buflenyo, buflenzo
 */
 
-static PyObject *__pyx_n_RuntimeError;
-
-static PyObject *__pyx_k_1p;
-static PyObject *__pyx_k_2p;
-static PyObject *__pyx_k_3p;
-static PyObject *__pyx_k_4p;
-static PyObject *__pyx_k_5p;
-static PyObject *__pyx_k_6p;
-static PyObject *__pyx_k_7p;
-
-static PyObject *__pyx_builtin_RuntimeError;
-
-static char __pyx_k_1[] = "error getting buffer for x";
-static char __pyx_k_2[] = "error getting buffer for y";
-static char __pyx_k_3[] = "error getting buffer for z";
-static char __pyx_k_4[] = "error getting buffer for x";
-static char __pyx_k_5[] = "error getting buffer for y";
-static char __pyx_k_6[] = "error getting buffer for z";
-static char __pyx_k_7[] = "error in natgridd - ier =";
-
 static PyObject *__pyx_pf_8_natgrid_natgridd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
 static PyObject *__pyx_pf_8_natgrid_natgridd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
 PyObject *__pyx_v_x = 0;
@@ -298,16 +644,78 @@
 double *__pyx_v_zod;
 double *__pyx_v_out;
 PyObject *__pyx_v_i;
- PyObject *__pyx_r;
- Py_ssize_t __pyx_1 = 0;
- int __pyx_2;
- PyObject *__pyx_3 = 0;
- PyObject *__pyx_4 = 0;
- long __pyx_5;
- Py_ssize_t __pyx_6 = 0;
- Py_ssize_t __pyx_7 = 0;
- static char *__pyx_argnames[] = {"x","y","z","xo","yo","zo",0};
- if (likely(!__pyx_kwds) && likely(PyTuple_GET_SIZE(__pyx_args) == 6)) {
+ PyObject *__pyx_r = NULL;
+ Py_ssize_t __pyx_t_1;
+ int __pyx_t_2;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ Py_ssize_t __pyx_t_5;
+ Py_ssize_t __pyx_t_6;
+ Py_ssize_t __pyx_t_7;
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__x,&__pyx_n_s__y,&__pyx_n_s__z,&__pyx_n_s__xo,&__pyx_n_s__yo,&__pyx_n_s__zo,0};
+ __Pyx_RefNannySetupContext("natgridd");
+ __pyx_self = __pyx_self;
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
+ PyObject* values[6] = {0,0,0,0,0,0};
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+ case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+ case 0:
+ values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__x);
+ if (likely(values[0])) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ case 1:
+ values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__y);
+ if (likely(values[1])) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("natgridd", 1, 6, 6, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ case 2:
+ values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__z);
+ if (likely(values[2])) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("natgridd", 1, 6, 6, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ case 3:
+ values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__xo);
+ if (likely(values[3])) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("natgridd", 1, 6, 6, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ case 4:
+ values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__yo);
+ if (likely(values[4])) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("natgridd", 1, 6, 6, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ case 5:
+ values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__zo);
+ if (likely(values[5])) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("natgridd", 1, 6, 6, 5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "natgridd") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ __pyx_v_x = values[0];
+ __pyx_v_y = values[1];
+ __pyx_v_z = values[2];
+ __pyx_v_xo = values[3];
+ __pyx_v_yo = values[4];
+ __pyx_v_zo = values[5];
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 6) {
+ goto __pyx_L5_argtuple_error;
+ } else {
 __pyx_v_x = PyTuple_GET_ITEM(__pyx_args, 0);
 __pyx_v_y = PyTuple_GET_ITEM(__pyx_args, 1);
 __pyx_v_z = PyTuple_GET_ITEM(__pyx_args, 2);
@@ -315,424 +723,545 @@
 __pyx_v_yo = PyTuple_GET_ITEM(__pyx_args, 4);
 __pyx_v_zo = PyTuple_GET_ITEM(__pyx_args, 5);
 }
- else {
- if (unlikely(!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OOOOOO", __pyx_argnames, &__pyx_v_x, &__pyx_v_y, &__pyx_v_z, &__pyx_v_xo, &__pyx_v_yo, &__pyx_v_zo))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; goto __pyx_L2;}
- }
- goto __pyx_L3;
- __pyx_L2:;
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("natgridd", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("_natgrid.natgridd");
 return NULL;
- __pyx_L3:;
- Py_INCREF(__pyx_v_x);
- Py_INCREF(__pyx_v_y);
- Py_INCREF(__pyx_v_z);
- Py_INCREF(__pyx_v_xo);
- Py_INCREF(__pyx_v_yo);
- Py_INCREF(__pyx_v_zo);
- __pyx_v_i = Py_None; Py_INCREF(Py_None);
+ __pyx_L4_argument_unpacking_done:;
+ __Pyx_INCREF(__pyx_v_x);
+ __Pyx_INCREF(__pyx_v_y);
+ __Pyx_INCREF(__pyx_v_z);
+ __Pyx_INCREF(__pyx_v_xo);
+ __Pyx_INCREF(__pyx_v_yo);
+ __Pyx_INCREF(__pyx_v_zo);
+ __pyx_v_i = Py_None; __Pyx_INCREF(Py_None);
 
- /* "/Users/jwhitaker/python/matplotlib/lib/natgrid/src/_natgrid.pyx":49
+ /* "/Users/jsw/python/natgrid/src/_natgrid.pyx":49
 * cdef void *xp, *yp, *zp, *xop, *yop, *zop
 * cdef double *xd, *yd, *zd, *xod, *yod, *zod, *out
- * npnts = len(x) # <<<<<<<<<<<<<< 
+ * npnts = len(x) # <<<<<<<<<<<<<<
 * numxout = len(xo)
 * numyout = len(yo)
 */
- __pyx_1 = PyObject_Length(__pyx_v_x); if (unlikely(__pyx_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; goto __pyx_L1;}
- __pyx_v_npnts = __pyx_1;
+ __pyx_t_1 = PyObject_Length(__pyx_v_x); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_v_npnts = __pyx_t_1;
 
- /* "/Users/jwhitaker/python/matplotlib/lib/natgrid/src/_natgrid.pyx":50
+ /* "/Users/jsw/python/natgrid/src/_natgrid.pyx":50
 * cdef double *xd, *yd, *zd, *xod, *yod, *zod, *out
 * npnts = len(x)
- * numxout = len(xo) # <<<<<<<<<<<<<< 
+ * numxout = len(xo) # <<<<<<<<<<<<<<
 * numyout = len(yo)
 * if PyObject_AsWriteBuffer(x, &xp, &buflenx) <> 0:
 */
- __pyx_1 = PyObject_Length(__pyx_v_xo); if (unlikely(__pyx_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; goto __pyx_L1;}
- __pyx_v_numxout = __pyx_1;
+ __pyx_t_1 = PyObject_Length(__pyx_v_xo); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_v_numxout = __pyx_t_1;
 
- /* "/Users/jwhitaker/python/matplotlib/lib/natgrid/src/_natgrid.pyx":51
+ /* "/Users/jsw/python/natgrid/src/_natgrid.pyx":51
 * npnts = len(x)
 * numxout = len(xo)
- * numyout = len(yo) # <<<<<<<<<<<<<< 
+ * numyout = len(yo) # <<<<<<<<<<<<<<
 * if PyObject_AsWriteBuffer(x, &xp, &buflenx) <> 0:
 * raise RuntimeError('error getting buffer for x')
 */
- __pyx_1 = PyObject_Length(__pyx_v_yo); if (unlikely(__pyx_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; goto __pyx_L1;}
- __pyx_v_numyout = __pyx_1;
+ __pyx_t_1 = PyObject_Length(__pyx_v_yo); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_v_numyout = __pyx_t_1;
 
- /* "/Users/jwhitaker/python/matplotlib/lib/natgrid/src/_natgrid.pyx":52
+ /* "/Users/jsw/python/natgrid/src/_natgrid.pyx":52
 * numxout = len(xo)
 * numyout = len(yo)
- * if PyObject_AsWriteBuffer(x, &xp, &buflenx) <> 0: # <<<<<<<<<<<<<< 
+ * if PyObject_AsWriteBuffer(x, &xp, &buflenx) <> 0: # <<<<<<<<<<<<<<
 * raise RuntimeError('error getting buffer for x')
 * if PyObject_AsWriteBuffer(y, &yp, &bufleny) <> 0:
 */
- __pyx_2 = (PyObject_AsWriteBuffer(__pyx_v_x, (&__pyx_v_xp), (&__pyx_v_buflenx)) != 0);
- if (__pyx_2) {
+ __pyx_t_2 = (PyObject_AsWriteBuffer(__pyx_v_x, (&__pyx_v_xp), (&__pyx_v_buflenx)) != 0);
+ if (__pyx_t_2) {
 
- /* "/Users/jwhitaker/python/matplotlib/lib/natgrid/src/_natgrid.pyx":53
+ /* "/Users/jsw/python/natgrid/src/_natgrid.pyx":53
 * numyout = len(yo)
 * if PyObject_AsWriteBuffer(x, &xp, &buflenx) <> 0:
- * raise RuntimeError('error getting buffer for x') # <<<<<<<<<<<<<< 
+ * raise RuntimeError('error getting buffer for x') # <<<<<<<<<<<<<<
 * if PyObject_AsWriteBuffer(y, &yp, &bufleny) <> 0:
 * raise RuntimeError('error getting buffer for y')
 */
- __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; goto __pyx_L1;}
- Py_INCREF(__pyx_k_1p);
- PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k_1p);
- __pyx_4 = PyObject_Call(__pyx_builtin_RuntimeError, __pyx_3, NULL); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; goto __pyx_L1;}
- Py_DECREF(__pyx_3); __pyx_3 = 0;
- __Pyx_Raise(__pyx_4, 0, 0);
- Py_DECREF(__pyx_4); __pyx_4 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; goto __pyx_L1;}
- goto __pyx_L4;
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_INCREF(((PyObject *)__pyx_kp_s_1));
+ PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_kp_s_1));
+ __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_1));
+ __pyx_t_4 = PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_Raise(__pyx_t_4, 0, 0);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ goto __pyx_L6;
 }
- __pyx_L4:;
+ __pyx_L6:;
 
- /* "/Users/jwhitaker/python/matplotlib/lib/natgrid/src/_natgrid.pyx":54
+ /* "/Users/jsw/python/natgrid/src/_natgrid.pyx":54
 * if PyObject_AsWriteBuffer(x, &xp, &buflenx) <> 0:
 * raise RuntimeError('error getting buffer for x')
- * if PyObject_AsWriteBuffer(y, &yp, &bufleny) <> 0: # <<<<<<<<<<<<<< 
+ * if PyObject_AsWriteBuffer(y, &yp, &bufleny) <> 0: # <<<<<<<<<<<<<<
 * raise RuntimeError('error getting buffer for y')
 * if PyObject_AsWriteBuffer(z, &zp, &buflenz) <> 0:
 */
- __pyx_2 = (PyObject_AsWriteBuffer(__pyx_v_y, (&__pyx_v_yp), (&__pyx_v_bufleny)) != 0);
- if (__pyx_2) {
+ __pyx_t_2 = (PyObject_AsWriteBuffer(__pyx_v_y, (&__pyx_v_yp), (&__pyx_v_bufleny)) != 0);
+ if (__pyx_t_2) {
 
- /* "/Users/jwhitaker/python/matplotlib/lib/natgrid/src/_natgrid.pyx":55
+ /* "/Users/jsw/python/natgrid/src/_natgrid.pyx":55
 * raise RuntimeError('error getting buffer for x')
 * if PyObject_AsWriteBuffer(y, &yp, &bufleny) <> 0:
- * raise RuntimeError('error getting buffer for y') # <<<<<<<<<<<<<< 
+ * raise RuntimeError('error getting buffer for y') # <<<<<<<<<<<<<<
 * if PyObject_AsWriteBuffer(z, &zp, &buflenz) <> 0:
 * raise RuntimeError('error getting buffer for z')
 */
- __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; goto __pyx_L1;}
- Py_INCREF(__pyx_k_2p);
- PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k_2p);
- __pyx_4 = PyObject_Call(__pyx_builtin_RuntimeError, __pyx_3, NULL); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; goto __pyx_L1;}
- Py_DECREF(__pyx_3); __pyx_3 = 0;
- __Pyx_Raise(__pyx_4, 0, 0);
- Py_DECREF(__pyx_4); __pyx_4 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; goto __pyx_L1;}
- goto __pyx_L5;
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_INCREF(((PyObject *)__pyx_kp_s_2));
+ PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_kp_s_2));
+ __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_2));
+ __pyx_t_3 = PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_Raise(__pyx_t_3, 0, 0);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ goto __pyx_L7;
 }
- __pyx_L5:;
+ __pyx_L7:;
 
- /* "/Users/jwhitaker/python/matplotlib/lib/natgrid/src/_natgrid.pyx":56
+ /* "/Users/jsw/python/natgrid/src/_natgrid.pyx":56
 * if PyObject_AsWriteBuffer(y, &yp, &bufleny) <> 0:
 * raise RuntimeError('error getting buffer for y')
- * if PyObject_AsWriteBuffer(z, &zp, &buflenz) <> 0: # <<<<<<<<<<<<<< 
+ * if PyObject_AsWriteBuffer(z, &zp, &buflenz) <> 0: # <<<<<<<<<<<<<<
 * raise RuntimeError('error getting buffer for z')
 * xd = <double *>xp
 */
- __pyx_2 = (PyObject_AsWriteBuffer(__pyx_v_z, (&__pyx_v_zp), (&__pyx_v_buflenz)) != 0);
- if (__pyx_2) {
+ __pyx_t_2 = (PyObject_AsWriteBuffer(__pyx_v_z, (&__pyx_v_zp), (&__pyx_v_buflenz)) != 0);
+ if (__pyx_t_2) {
 
- /* "/Users/jwhitaker/python/matplotlib/lib/natgrid/src/_natgrid.pyx":57
+ /* "/Users/jsw/python/natgrid/src/_natgrid.pyx":57
 * raise RuntimeError('error getting buffer for y')
 * if PyObject_AsWriteBuffer(z, &zp, &buflenz) <> 0:
- * raise RuntimeError('error getting buffer for z') # <<<<<<<<<<<<<< 
+ * raise RuntimeError('error getting buffer for z') # <<<<<<<<<<<<<<
 * xd = <double *>xp
 * yd = <double *>yp
 */
- __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; goto __pyx_L1;}
- Py_INCREF(__pyx_k_3p);
- PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k_3p);
- __pyx_4 = PyObject_Call(__pyx_builtin_RuntimeError, __pyx_3, NULL); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; goto __pyx_L1;}
- Py_DECREF(__pyx_3); __pyx_3 = 0;
- __Pyx_Raise(__pyx_4, 0, 0);
- Py_DECREF(__pyx_4); __pyx_4 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; goto __pyx_L1;}
- goto __pyx_L6;
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_INCREF(((PyObject *)__pyx_kp_s_3));
+ PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_kp_s_3));
+ __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_3));
+ __pyx_t_4 = PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_Raise(__pyx_t_4, 0, 0);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ goto __pyx_L8;
 }
- __pyx_L6:;
+ __pyx_L8:;
 
- /* "/Users/jwhitaker/python/matplotlib/lib/natgrid/src/_natgrid.pyx":58
+ /* "/Users/jsw/python/natgrid/src/_natgrid.pyx":58
 * if PyObject_AsWriteBuffer(z, &zp, &buflenz) <> 0:
 * raise RuntimeError('error getting buffer for z')
- * xd = <double *>xp # <<<<<<<<<<<<<< 
+ * xd = <double *>xp # <<<<<<<<<<<<<<
 * yd = <double *>yp
 * zd = <double *>zp
 */
 __pyx_v_xd = ((double *)__pyx_v_xp);
 
- /* "/Users/jwhitaker/python/matplotlib/lib/natgrid/src/_natgrid.pyx":59
+ /* "/Users/jsw/python/natgrid/src/_natgrid.pyx":59
 * raise RuntimeError('error getting buffer for z')
 * xd = <double *>xp
- * yd = <double *>yp # <<<<<<<<<<<<<< 
+ * yd = <double *>yp # <<<<<<<<<<<<<<
 * zd = <double *>zp
 * if PyObject_AsWriteBuffer(xo, &xop, &buflenxo) <> 0:
 */
 __pyx_v_yd = ((double *)__pyx_v_yp);
 
- /* "/Users/jwhitaker/python/matplotlib/lib/natgrid/src/_natgrid.pyx":60
+ /* "/Users/jsw/python/natgrid/src/_natgrid.pyx":60
 * xd = <double *>xp
 * yd = <double *>yp
- * zd = <double *>zp # <<<<<<<<<<<<<< 
+ * zd = <double *>zp # <<<<<<<<<<<<<<
 * if PyObject_AsWriteBuffer(xo, &xop, &buflenxo) <> 0:
 * raise RuntimeError('error getting buffer for x')
 */
 __pyx_v_zd = ((double *)__pyx_v_zp);
 
- /* "/Users/jwhitaker/python/matplotlib/lib/natgrid/src/_natgrid.pyx":61
+ /* "/Users/jsw/python/natgrid/src/_natgrid.pyx":61
 * yd = <double *>yp
 * zd = <double *>zp
- * if PyObject_AsWriteBuffer(xo, &xop, &buflenxo) <> 0: # <<<<<<<<<<<<<< 
+ * if PyObject_AsWriteBuffer(xo, &xop, &buflenxo) <> 0: # <<<<<<<<<<<<<<
 * raise RuntimeError('error getting buffer for x')
 * if PyObject_AsWriteBuffer(yo, &yop, &buflenyo) <> 0:
 */
- __pyx_2 = (PyObject_AsWriteBuffer(__pyx_v_xo, (&__pyx_v_xop), (&__pyx_v_buflenxo)) != 0);
- if (__pyx_2) {
+ __pyx_t_2 = (PyObject_AsWriteBuffer(__pyx_v_xo, (&__pyx_v_xop), (&__pyx_v_buflenxo)) != 0);
+ if (__pyx_t_2) {
 
- /* "/Users/jwhitaker/python/matplotlib/lib/natgrid/src/_natgrid.pyx":62
+ /* "/Users/jsw/python/natgrid/src/_natgrid.pyx":62
 * zd = <double *>zp
 * if PyObject_AsWriteBuffer(xo, &xop, &buflenxo) <> 0:
- * raise RuntimeError('error getting buffer for x') # <<<<<<<<<<<<<< 
+ * raise RuntimeError('error getting buffer for x') # <<<<<<<<<<<<<<
 * if PyObject_AsWriteBuffer(yo, &yop, &buflenyo) <> 0:
 * raise RuntimeError('error getting buffer for y')
 */
- __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; goto __pyx_L1;}
- Py_INCREF(__pyx_k_4p);
- PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k_4p);
- __pyx_4 = PyObject_Call(__pyx_builtin_RuntimeError, __pyx_3, NULL); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; goto __pyx_L1;}
- Py_DECREF(__pyx_3); __pyx_3 = 0;
- __Pyx_Raise(__pyx_4, 0, 0);
- Py_DECREF(__pyx_4); __pyx_4 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; goto __pyx_L1;}
- goto __pyx_L7;
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_INCREF(((PyObject *)__pyx_kp_s_1));
+ PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_kp_s_1));
+ __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_1));
+ __pyx_t_3 = PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_Raise(__pyx_t_3, 0, 0);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ goto __pyx_L9;
 }
- __pyx_L7:;
+ __pyx_L9:;
 
- /* "/Users/jwhitaker/python/matplotlib/lib/natgrid/src/_natgrid.pyx":63
+ /* "/Users/jsw/python/natgrid/src/_natgrid.pyx":63
 * if PyObject_AsWriteBuffer(xo, &xop, &buflenxo) <> 0:
 * raise RuntimeError('error getting buffer for x')
- * if PyObject_AsWriteBuffer(yo, &yop, &buflenyo) <> 0: # <<<<<<<<<<<<<< 
+ * if PyObject_AsWriteBuffer(yo, &yop, &buflenyo) <> 0: # <<<<<<<<<<<<<<
 * raise RuntimeError('error getting buffer for y')
 * if PyObject_AsWriteBuffer(zo, &zop, &buflenzo) <> 0:
 */
- __pyx_2 = (PyObject_AsWriteBuffer(__pyx_v_yo, (&__pyx_v_yop), (&__pyx_v_buflenyo)) != 0);
- if (__pyx_2) {
+ __pyx_t_2 = (PyObject_AsWriteBuffer(__pyx_v_yo, (&__pyx_v_yop), (&__pyx_v_buflenyo)) != 0);
+ if (__pyx_t_2) {
 
- /* "/Users/jwhitaker/python/matplotlib/lib/natgrid/src/_natgrid.pyx":64
+ /* "/Users/jsw/python/natgrid/src/_natgrid.pyx":64
 * raise RuntimeError('error getting buffer for x')
 * if PyObject_AsWriteBuffer(yo, &yop, &buflenyo) <> 0:
- * raise RuntimeError('error getting buffer for y') # <<<<<<<<<<<<<< 
+ * raise RuntimeError('error getting buffer for y') # <<<<<<<<<<<<<<
 * if PyObject_AsWriteBuffer(zo, &zop, &buflenzo) <> 0:
 * raise RuntimeError('error getting buffer for z')
 */
- __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; goto __pyx_L1;}
- Py_INCREF(__pyx_k_5p);
- PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k_5p);
- __pyx_4 = PyObject_Call(__pyx_builtin_RuntimeError, __pyx_3, NULL); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; goto __pyx_L1;}
- Py_DECREF(__pyx_3); __pyx_3 = 0;
- __Pyx_Raise(__pyx_4, 0, 0);
- Py_DECREF(__pyx_4); __pyx_4 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; goto __pyx_L1;}
- goto __pyx_L8;
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_INCREF(((PyObject *)__pyx_kp_s_2));
+ PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_kp_s_2));
+ __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_2));
+ __pyx_t_4 = PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_Raise(__pyx_t_4, 0, 0);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ goto __pyx_L10;
 }
- __pyx_L8:;
+ __pyx_L10:;
 
- /* "/Users/jwhitaker/python/matplotlib/lib/natgrid/src/_natgrid.pyx":65
+ /* "/Users/jsw/python/natgrid/src/_natgrid.pyx":65
 * if PyObject_AsWriteBuffer(yo, &yop, &buflenyo) <> 0:
 * raise RuntimeError('error getting buffer for y')
- * if PyObject_AsWriteBuffer(zo, &zop, &buflenzo) <> 0: # <<<<<<<<<<<<<< 
+ * if PyObject_AsWriteBuffer(zo, &zop, &buflenzo) <> 0: # <<<<<<<<<<<<<<
 * raise RuntimeError('error getting buffer for z')
 * xod = <double *>xop
 */
- __pyx_2 = (PyObject_AsWriteBuffer(__pyx_v_zo, (&__pyx_v_zop), (&__pyx_v_buflenzo)) != 0);
- if (__pyx_2) {
+ __pyx_t_2 = (PyObject_AsWriteBuffer(__pyx_v_zo, (&__pyx_v_zop), (&__pyx_v_buflenzo)) != 0);
+ if (__pyx_t_2) {
 
- /* "/Users/jwhitaker/python/matplotlib/lib/natgrid/src/_natgrid.pyx":66
+ /* "/Users/jsw/python/natgrid/src/_natgrid.pyx":66
 * raise RuntimeError('error getting buffer for y')
 * if PyObject_AsWriteBuffer(zo, &zop, &buflenzo) <> 0:
- * raise RuntimeError('error getting buffer for z') # <<<<<<<<<<<<<< 
+ * raise RuntimeError('error getting buffer for z') # <<<<<<<<<<<<<<
 * xod = <double *>xop
 * yod = <double *>yop
 */
- __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; goto __pyx_L1;}
- Py_INCREF(__pyx_k_6p);
- PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k_6p);
- __pyx_4 = PyObject_Call(__pyx_builtin_RuntimeError, __pyx_3, NULL); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; goto __pyx_L1;}
- Py_DECREF(__pyx_3); __pyx_3 = 0;
- __Pyx_Raise(__pyx_4, 0, 0);
- Py_DECREF(__pyx_4); __pyx_4 = 0;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; goto __pyx_L1;}
- goto __pyx_L9;
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_INCREF(((PyObject *)__pyx_kp_s_3));
+ PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_kp_s_3));
+ __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_3));
+ __pyx_t_3 = PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_Raise(__pyx_t_3, 0, 0);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ goto __pyx_L11;
 }
- __pyx_L9:;
+ __pyx_L11:;
 
- /* "/Users/jwhitaker/python/matplotlib/lib/natgrid/src/_natgrid.pyx":67
+ /* "/Users/jsw/python/natgrid/src/_natgrid.pyx":67
 * if PyObject_AsWriteBuffer(zo, &zop, &buflenzo) <> 0:
 * raise RuntimeError('error getting buffer for z')
- * xod = <double *>xop # <<<<<<<<<<<<<< 
+ * xod = <double *>xop # <<<<<<<<<<<<<<
 * yod = <double *>yop
 * zod = <double *>zop
 */
 __pyx_v_xod = ((double *)__pyx_v_xop);
 
- /* "/Users/jwhitaker/python/matplotlib/lib/natgrid/src/_natgrid.pyx":68
+ /* "/Users/jsw/python/natgrid/src/_natgrid.pyx":68
 * raise RuntimeError('error getting buffer for z')
 * xod = <double *>xop
- * yod = <double *>yop # <<<<<<<<<<<<<< 
+ * yod = <double *>yop # <<<<<<<<<<<<<<
 * zod = <double *>zop
 * # output overwrites zo.
 */
 __pyx_v_yod = ((double *)__pyx_v_yop);
 
- /* "/Users/jwhitaker/python/matplotlib/lib/natgrid/src/_natgrid.pyx":69
+ /* "/Users/jsw/python/natgrid/src/_natgrid.pyx":69
 * xod = <double *>xop
 * yod = <double *>yop
- * zod = <double *>zop # <<<<<<<<<<<<<< 
+ * zod = <double *>zop # <<<<<<<<<<<<<<
 * # output overwrites zo.
 * out = c_natgridd(npnts, yd, xd, zd, numyout, numxout, yod, xod, &ier)
 */
 __pyx_v_zod = ((double *)__pyx_v_zop);
 
- /* "/Users/jwhitaker/python/matplotlib/lib/natgrid/src/_natgrid.pyx":71
+ /* "/Users/jsw/python/natgrid/src/_natgrid.pyx":71
 * zod = <double *>zop
 * # output overwrites zo.
- * out = c_natgridd(npnts, yd, xd, zd, numyout, numxout, yod, xod, &ier) # <<<<<<<<<<<<<< 
+ * out = c_natgridd(npnts, yd, xd, zd, numyout, numxout, yod, xod, &ier) # <<<<<<<<<<<<<<
 * for i from 0 <= i < buflenzo/8:
 * zod[i] = out[i]
 */
 __pyx_v_out = c_natgridd(__pyx_v_npnts, __pyx_v_yd, __pyx_v_xd, __pyx_v_zd, __pyx_v_numyout, __pyx_v_numxout, __pyx_v_yod, __pyx_v_xod, (&__pyx_v_ier));
 
- /* "/Users/jwhitaker/python/matplotlib/lib/natgrid/src/_natgrid.pyx":72
+ /* "/Users/jsw/python/natgrid/src/_natgrid.pyx":72
 * # output overwrites zo.
 * out = c_natgridd(npnts, yd, xd, zd, numyout, numxout, yod, xod, &ier)
- * for i from 0 <= i < buflenzo/8: # <<<<<<<<<<<<<< 
+ * for i from 0 <= i < buflenzo/8: # <<<<<<<<<<<<<<
 * zod[i] = out[i]
 * if ier != 0:
 */
- __pyx_1 = (__pyx_v_buflenzo / 8);
- for (__pyx_5 = 0; __pyx_5 < __pyx_1; __pyx_5++) {
- __pyx_3 = PyInt_FromLong(__pyx_5); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; goto __pyx_L1;}
- Py_DECREF(__pyx_v_i);
- __pyx_v_i = __pyx_3;
- __pyx_3 = 0;
+ __pyx_t_1 = __Pyx_div_Py_ssize_t(__pyx_v_buflenzo, 8);
+ for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_1; __pyx_t_5++) {
+ __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_v_i);
+ __pyx_v_i = __pyx_t_3;
+ __pyx_t_3 = 0;
 
- /* "/Users/jwhitaker/python/matplotlib/lib/natgrid/src/_natgrid.pyx":73
+ /* "/Users/jsw/python/natgrid/src/_natgrid.pyx":73
 * out = c_natgridd(npnts, yd, xd, zd, numyout, numxout, yod, xod, &ier)
 * for i from 0 <= i < buflenzo/8:
- * zod[i] = out[i] # <<<<<<<<<<<<<< 
+ * zod[i] = out[i] # <<<<<<<<<<<<<<
 * if ier != 0:
 * raise RuntimeError('error in natgridd - ier ='%ier)
 */
- __pyx_6 = __pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; goto __pyx_L1;}
- __pyx_7 = __pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_7 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; goto __pyx_L1;}
- (__pyx_v_zod[__pyx_7]) = (__pyx_v_out[__pyx_6]);
+ __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __p...
 
[truncated message content]
From: <js...@us...> - 2010年07月08日 14:22:18
Revision: 8533
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8533&view=rev
Author: jswhit
Date: 2010年07月08日 14:22:11 +0000 (2010年7月08日)
Log Message:
-----------
new files from ncl 4.2.0 version.
Added Paths:
-----------
 trunk/toolkits/natgrid/src/ncarg/
 trunk/toolkits/natgrid/src/ncarg/ngmath.h
 trunk/toolkits/natgrid/src/nnculld.c
 trunk/toolkits/natgrid/src/nnculls.c
Added: trunk/toolkits/natgrid/src/ncarg/ngmath.h
===================================================================
--- trunk/toolkits/natgrid/src/ncarg/ngmath.h	 (rev 0)
+++ trunk/toolkits/natgrid/src/ncarg/ngmath.h	2010年07月08日 14:22:11 UTC (rev 8533)
@@ -0,0 +1,94 @@
+/* 
+ * $Id: ngmath.h.sed,v 1.3 2008年07月27日 04:02:35 haley Exp $
+ */
+/************************************************************************
+* *
+* Copyright (C) 2000 *
+* University Corporation for Atmospheric Research *
+* All Rights Reserved *
+* *
+* The use of this Software is governed by a License Agreement. *
+* *
+************************************************************************/
+
+
+/*
+ * This file contains some system includes used by Ngmath functions,
+ * a source for the NGCALLF macro, the function prototypes for all 
+ * user entry points in the Ngmath library, and some specific defines.
+ */
+#include <stdio.h>
+#include <stddef.h>
+#include <string.h>
+#include <stdlib.h>
+#include <math.h>
+
+/*
+ * Fortran function macro. This macro is used to provide the appropriate
+ * system-specific C function name for it to be Fortran callable.
+ */
+
+/*
+ * Function prototypes for the natgrid package.
+ */
+
+/* was duplicated in nnuhead.h */
+void c_nnseti(char *, int);
+void c_nngeti(char *, int *);
+void c_nnsetr(char *, float);
+void c_nngetr(char *, float *);
+
+/* was duplicated in nnuheads.h */
+void c_nnsetc(char *, char *);
+void c_nngetc(char *, char *);
+float *c_natgrids(int, float [], float [], float [],
+ int, int, float [], float [], int *);
+
+/* was duplicated in nncheads.h */
+void c_nngetslopes(int, int, float *, int *);
+void c_nngetaspects(int, int, float *, int *);
+void c_nnpntinits(int, float [], float [], float []);
+void c_nnpnts(float, float, float *);
+void c_nnpntend();
+void c_nngetwts(int *, int *, float *, float *, float *, float *);
+
+/* was duplicated in nnuheadd.h */
+void c_nnsetrd(char *, double);
+void c_nngetrd(char *, double *);
+double *c_natgridd(int, double [], double [], double [],
+ int, int, double [], double [], int *);
+
+/* was duplicated in nncheadd.h */
+void c_nngetsloped(int, int, double *, int *);
+void c_nngetaspectd(int, int, double *, int *);
+void c_nnpntinitd(int, double [], double [], double []);
+void c_nnpntd(double, double, double *);
+void c_nnpntendd();
+void c_nngetwtsd(int *, int *, double *, double *, double *, double *);
+
+#ifdef UNICOS
+#include <fortran.h>
+#define NGstring _fcd
+#define NGCstrToFstr(cstr,len) ((cstr)?_cptofcd((char *)cstr,len):_cptofcd("",0)
+)
+#define NGFstrToCstr(fstr) (_fcdtocp(fstr))
+#define NGFlgclToClgcl(flog) (_ltob(&flog))
+#define NGClgclToFlgcl(clog) (_btol(clog))
+float *c_natgrids(int, float [], float [], float [],
+float *c_natgrids(int, float [], float [], float [],
+float *c_natgrids(int, float [], float [], float [],
+float *c_natgrids(int, float [], float [], float [],
+ int, int, float [], float [], int *);
+ int, int, float [], float [], int *);
+ int, int, float [], float [], int *);
+ int, int, float [], float [], int *);
+#else
+#define NGstring char *
+#define NGCstrToFstr(cstr,len) (char *)cstr
+#define NGFstrToCstr(fstr) fstr
+#define NGFlgclToClgcl(flog) flog
+#define NGClgclToFlgcl(clog) clog
+#endif
+
+#define NGSTRLEN(cstr) ((cstr)?strlen(cstr):0)
+ 
Added: trunk/toolkits/natgrid/src/nnculld.c
===================================================================
--- trunk/toolkits/natgrid/src/nnculld.c	 (rev 0)
+++ trunk/toolkits/natgrid/src/nnculld.c	2010年07月08日 14:22:11 UTC (rev 8533)
@@ -0,0 +1,124 @@
+#include <stdio.h>
+#include <string.h>
+#include <ncarg/ngmath.h>
+
+extern int maxmsg;
+
+/*
+ * Comparison function for qsort to sort double precision triples.
+ */
+int comp_dtriples(const void *q1, const void *q2)
+{
+ double *p1, *p2;
+
+ p1 = (double *) q1;
+ p2 = (double *) q2;
+
+ if (p1[0] < p2[0]) {
+ return (-1);
+ }
+ else if (p1[0] > p2[0]) {
+ return (1);
+ }
+ else {
+ if (p1[1] < p2[1]) {
+ return (-1);
+ }
+ else if (p1[1] > p2[1]) {
+ return (1);
+ }
+ else {
+ if (p1[2] != p2[2]) {
+ printf("\n Natgrid - two input triples have the same x/y coordinates");
+ printf("\n but different data values: \n\n");
+ printf(" First triple: %f %f %f\n",p1[0],p1[1],p1[2]);
+ printf(" Second triple: %f %f %f\n",p2[0],p2[1],p2[2]);
+ printf("\n\n");
+ exit(1);
+ }
+ }
+ }
+}
+
+/*
+ * This function culls duplicate double precision triples 
+ * from an array of "tnum" such in "data". The triples
+ * in "data" are assumed to have been sorted into
+ * ascending order. The number of distinct triples
+ * is returned and the distinct triples themselves
+ * are stored back in data.
+ */ 
+int cull_dtriples(int tnum, double *data) {
+ int i, ic, icm1, kout=0, msgmx=0, fmsg=0;
+ double *out,*xtmp; 
+
+ ic = 3*sizeof(double);
+ icm1 = 2*sizeof(double);
+ out = (double *) malloc(tnum*ic);
+
+/*
+ * Copy over the first data triple.
+ */
+ kout++;
+ memcpy( (void *) out, (void *) data, ic);
+ 
+/*
+ * Test for duplicate points and copy non-duplicates to out. All
+ * full duplicates (coordinates plus data values) will be culled,
+ * but duplicate coordinates having different data values will 
+ * produce a fatal error.
+ */
+ for (i = 1; i < tnum; i++) {
+/*
+ * Test for duplicate triples - do not copy them to "out".
+ */
+ if (memcmp((void *)(data+3*(i-1)), (void *)(data+3*i), ic) == 0) {
+ if (msgmx >= maxmsg && fmsg == 0 && maxmsg > 0) {
+ printf("Natgrid - maximum number of messages about duplicate input coordinates \n");
+ printf(" has been reached - no more such messages will be issued\n");
+ printf(" for this Natgrid call.\n");
+ fmsg = 1;
+ } 
+ else if (msgmx < maxmsg && fmsg == 0) {
+ printf("Natgrid info message - duplicate coordinate found, and culled,\n");
+ printf(" in the input data for coordinate (%f,%f)\n",
+ data[3*(i-1)], data[3*(i-1)+1]);
+ msgmx++;
+ }
+ }
+
+/*
+ * In the case of Natgrid the test for duplicate coordinates with 
+ * different data values has already been done in the call to
+ * qsort using the compare function comp_triples. If this were 
+ * not the case, the following commented lines would be appropriate 
+ * to uncomment.
+ * 
+ * else if ( (memcmp((void *)(data+3*(i-1)), 
+ * (void *)(data+3*i), 
+ * 2*sizeof(double);) == 0) &&
+ * (memcmp((void *)(data+3*(i-1)), 
+ * (void *)(data+3*i), 
+ * ic ) != 0) ) {
+ * printf("Error: duplicate coordinates found in the input data, at \
+ * coordinate (%f,%f), having different data values.", \
+ * data[i*ic],data[i*ic+1]);
+ * }
+ */
+
+/*
+ * Copy non-duplicate value to output.
+ */
+ else {
+ memcpy((void *)(out+3*kout), (void *)(data+3*i), ic);
+ kout++;
+ }
+ }
+
+/* 
+ * Copy unique values back to the input array and free memory.
+ */
+ memcpy((void *)data, (void *)out, kout*ic);
+ free (out);
+ return kout;
+}
Added: trunk/toolkits/natgrid/src/nnculls.c
===================================================================
--- trunk/toolkits/natgrid/src/nnculls.c	 (rev 0)
+++ trunk/toolkits/natgrid/src/nnculls.c	2010年07月08日 14:22:11 UTC (rev 8533)
@@ -0,0 +1,123 @@
+#include <stdio.h>
+#include <string.h>
+#include <ncarg/ngmath.h>
+
+extern int maxmsg;
+
+/*
+ * Comparison function for qsort to sort single precision triples.
+ */
+int comp_striples(const void *q1, const void *q2)
+{
+ float *p1, *p2;
+
+ p1 = (float *) q1;
+ p2 = (float *) q2;
+
+ if (p1[0] < p2[0]) {
+ return (-1);
+ }
+ else if (p1[0] > p2[0]) {
+ return (1);
+ }
+ else {
+ if (p1[1] < p2[1]) {
+ return (-1);
+ }
+ else if (p1[1] > p2[1]) {
+ return (1);
+ }
+ else {
+ if (p1[2] != p2[2]) {
+ printf("\n Natgrid - two input triples have the same x/y coordinates");
+ printf("\n but different data values: \n\n");
+ printf(" First triple: %f %f %f\n",p1[0],p1[1],p1[2]);
+ printf(" Second triple: %f %f %f\n",p2[0],p2[1],p2[2]);
+ printf("\n\n");
+ exit(1);
+ }
+ }
+ }
+}
+
+/*
+ * This function culls duplicate single precision triples 
+ * from an array of "tnum" such in "data". The triples
+ * in "data" are assumed to have been sorted into
+ * ascending order. The number of distinct triples
+ * is returned and the distinct triples themselves
+ * are stored back in data.
+ */ 
+int cull_striples(int tnum, float *data) {
+ int i,ic,icm1,kout=0,msgmx=0,fmsg=0;
+ float *out,*xtmp; 
+
+ ic = 3*sizeof(float);
+ icm1 = 2*sizeof(float);
+ out = (float *) malloc(tnum*ic);
+
+/*
+ * Copy over the first data triple.
+ */
+ kout++;
+ memcpy( (void *) out, (void *) data, ic);
+ 
+/*
+ * Test for duplicate points and copy non-duplicates to out. All
+ * full duplicates (coordinates plus data values) will be culled,
+ * but duplicate coordinates having different data values will 
+ * produce a fatal error.
+ */
+ for (i = 1; i < tnum; i++) {
+/*
+ * Test for duplicate triples - do not copy them to "out".
+ */
+ if (memcmp((void *)(data+3*(i-1)), (void *)(data+3*i), ic) == 0) {
+ if (msgmx >= maxmsg && fmsg == 0 && maxmsg > 0) {
+ printf("Natgrid - maximum number of messages about duplicate input coordinates \n");
+ printf(" has been reached - no more such messages will be issued\n");
+ printf(" for this Natgrid call.\n");
+ fmsg = 1;
+ } 
+ else if (msgmx < maxmsg && fmsg == 0) {
+ printf("Natgrid info message - duplicate coordinate found, and culled,\n");
+ printf(" in the input data for coordinate (%f,%f)\n",
+ data[3*(i-1)], data[3*(i-1)+1]);
+ msgmx++;
+ }
+ }
+
+/*
+ * In the case of Natgrid the test for duplicate coordinates with 
+ * different data values has already been done in the call to
+ * qsort_triples. If this were not the case, the following 
+ * commented lines would be appropriate to uncomment.
+ * 
+ * else if ( (memcmp((void *)(data+3*(i-1)), 
+ * (void *)(data+3*i), 
+ * 2*sizeof(float);) == 0) &&
+ * (memcmp((void *)(data+3*(i-1)), 
+ * (void *)(data+3*i), 
+ * ic ) != 0) ) {
+ * printf("Error: duplicate coordinates found in the input data, at \
+ * coordinate (%f,%f), having different data values.", \
+ * data[i*ic],data[i*ic+1]);
+ * }
+ */
+
+/*
+ * Copy non-duplicate value to output.
+ */
+ else {
+ memcpy((void *)(out+3*kout), (void *)(data+3*i), ic);
+ kout++;
+ }
+ }
+
+/* 
+ * Copy unique values back to the input array and free memory.
+ */
+ memcpy((void *)data, (void *)out, kout*ic);
+ free (out);
+ return kout;
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <js...@us...> - 2010年07月08日 13:31:31
Revision: 8532
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8532&view=rev
Author: jswhit
Date: 2010年07月08日 13:31:25 +0000 (2010年7月08日)
Log Message:
-----------
update from ncl 5.2.0
Modified Paths:
--------------
 trunk/toolkits/natgrid/src/nnerror.c
Modified: trunk/toolkits/natgrid/src/nnerror.c
===================================================================
--- trunk/toolkits/natgrid/src/nnerror.c	2010年07月07日 15:22:38 UTC (rev 8531)
+++ trunk/toolkits/natgrid/src/nnerror.c	2010年07月08日 13:31:25 UTC (rev 8532)
@@ -1,7 +1,20 @@
+/*
+ * $Id: nnerror.c,v 1.10 2010年04月08日 05:32:30 fred Exp $
+ */
+/************************************************************************
+* *
+* Copyright (C) 2000 *
+* University Corporation for Atmospheric Research *
+* All Rights Reserved *
+* *
+* The use of this Software is governed by a License Agreement. *
+* *
+************************************************************************/
+
 #include <stdio.h>
 #include <stdlib.h>
 
-#define MAX_ERROR 31
+#define MAX_ERROR 33
 
 void ErrorLog(int, char *, FILE *, char *);
 char *ErrMsg(int);
@@ -28,6 +41,7 @@
 error_status = error;
 }
 fprintf(efile,"%s",smsg);
+ Terminate();
 }
 
 char *ErrMsg(int i)
@@ -123,10 +137,12 @@
 "Fortran DOUBLE PRECISION entries are not supported on UNICOS.",
 
 /* #030 */
- "Error number out of range."
+ "Error number out of range.",
 
 /* #031 */
- "Weights can be returned only for linear interpolation when in \n single point mode."
+ "Weights can be returned only for linear interpolation when in \n single point mode.",
+/* #032 */
+ "Single point mode terminated without its ever having been initialized."
 };
 
 if (i >= MAX_ERROR) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.

Showing 5 results of 5

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /