~ubuntu-branches/ubuntu/saucy/python-scipy/saucy

« back to all changes in this revision

Viewing changes to scipy/sandbox/timeseries/src/cseries.c

  • Committer: Bazaar Package Importer
  • Author(s): Ondrej Certik
  • Date: 2008-06-16 22:58:01 UTC
  • mfrom: (2.1.24 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080616225801-irdhrpcwiocfbcmt
Tags: 0.6.0-12
* The description updated to match the current SciPy (Closes: #489149).
* Standards-Version bumped to 3.8.0 (no action needed)
* Build-Depends: netcdf-dev changed to libnetcdf-dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#include "c_lib.h"
 
2
#include "c_tdates.h"
 
3
#include "c_tseries.h"
 
4
 
 
5
static PyMethodDef cseries_methods[] = {
 
6
 
 
7
    {"MA_mov_sum", (PyCFunction)MaskedArray_mov_sum,
 
8
     METH_VARARGS | METH_KEYWORDS, ""},
 
9
    {"MA_mov_median", (PyCFunction)MaskedArray_mov_median,
 
10
     METH_VARARGS | METH_KEYWORDS, ""},
 
11
    {"MA_mov_average", (PyCFunction)MaskedArray_mov_average,
 
12
     METH_VARARGS | METH_KEYWORDS, ""},
 
13
    {"MA_mov_stddev", (PyCFunction)MaskedArray_mov_stddev,
 
14
     METH_VARARGS | METH_KEYWORDS, ""},
 
15
 
 
16
    {"TS_convert", (PyCFunction)TimeSeries_convert,
 
17
     METH_VARARGS, ""},
 
18
 
 
19
    {"DA_asfreq", (PyCFunction)DateArray_asfreq,
 
20
     METH_VARARGS, ""},
 
21
    {"DA_getDateInfo", (PyCFunction)DateArray_getDateInfo,
 
22
     METH_VARARGS, ""},
 
23
 
 
24
 
 
25
    {"thisday", (PyCFunction)c_tdates_thisday,
 
26
     METH_VARARGS,
 
27
        "Returns today's date, at the given frequency\n\n"
 
28
        ":Parameters:\n"
 
29
        "   - freq : string/int\n"
 
30
        "       Frequency to convert the Date to. Accepts any valid frequency\n"
 
31
        "       specification (string or integer)\n"},
 
32
 
 
33
    {"check_freq", (PyCFunction)c_tdates_check_freq,
 
34
     METH_VARARGS,
 
35
        "translate user specified frequency into frequency constant"},
 
36
 
 
37
    {"check_freq_str", (PyCFunction)c_tdates_check_freq_str,
 
38
     METH_VARARGS,
 
39
        "translate user specified frequency into standard string representation"},
 
40
 
 
41
    {"get_freq_group", (PyCFunction)c_tdates_get_freq_group,
 
42
     METH_VARARGS,
 
43
        "translate user specified frequency into frequency group constant"},
 
44
 
 
45
 
 
46
    {"set_callback_DateFromString", (PyCFunction)set_callback_DateFromString,
 
47
     METH_VARARGS, ""},
 
48
    {"set_callback_DateTimeFromString", (PyCFunction)set_callback_DateTimeFromString,
 
49
     METH_VARARGS, ""},
 
50
 
 
51
    {NULL, NULL}
 
52
};
 
53
 
 
54
PyMODINIT_FUNC
 
55
initcseries(void)
 
56
{
 
57
    PyObject *m;
 
58
 
 
59
    m = Py_InitModule("cseries", cseries_methods);
 
60
    if (m == NULL)
 
61
      return;
 
62
 
 
63
    import_c_lib(m);
 
64
    import_c_tdates(m);
 
65
    import_c_tseries(m);
 
66
 
 
67
}