Menu

[r3770]: / branches / mathtext_mgd / src / _isnan.c  Maximize  Restore  History

Download this file

33 lines (27 with data), 555 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#include "Python.h"
#include "MPL_isnan.h"
static PyObject *
isnan64(PyObject *self, PyObject *args)
{
double input;
if (!PyArg_ParseTuple(args, "d",
&input))
return NULL;
if (MPL_isnan64(input)) {
Py_INCREF(Py_True);
return Py_True;
}
Py_INCREF(Py_False);
return Py_False;
}
static PyMethodDef _isnan_functions[] = {
{ "isnan64", (PyCFunction)isnan64, METH_VARARGS },
{ NULL, NULL, 0 }
};
DL_EXPORT(void)
init_isnan(void)
{
PyObject *mod;
mod = Py_InitModule("matplotlib._isnan",
_isnan_functions);
}
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.