Changes in python/ext/py-cvec.c [4deb255:6d8ae981]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
python/ext/py-cvec.c
r4deb255 r6d8ae981 20 20 } Py_cvec; 21 21 22 static char Py_cvec_doc[] = "cvec object"; 22 static char Py_cvec_doc[] = "" 23 "cvec(size)\n" 24 "\n" 25 "A container holding spectral data.\n" 26 "\n" 27 "Create one `cvec` to store the spectral information of a window\n" 28 "of `size` points. The data will be stored in two vectors,\n" 29 ":attr:`phas` and :attr:`norm`, each of shape (:attr:`length`,),\n" 30 "with `length = size // 2 + 1`.\n" 31 "\n" 32 "Parameters\n" 33 "----------\n" 34 "size: int\n" 35 " Size of spectrum to create.\n" 36 "\n" 37 "Examples\n" 38 "--------\n" 39 ">>> c = aubio.cvec(1024)\n" 40 ">>> c\n" 41 "aubio cvec of 513 elements\n" 42 ">>> c.length\n" 43 "513\n" 44 ">>> c.norm.dtype, c.phas.dtype\n" 45 "(dtype('float32'), dtype('float32'))\n" 46 ">>> c.norm.shape, c.phas.shape\n" 47 "((513,), (513,))\n" 48 "\n" 49 "See Also\n" 50 "--------\n" 51 "fvec, fft, pvoc\n" 52 ""; 23 53 24 54 … … 183 213 // TODO remove READONLY flag and define getter/setter 184 214 {"length", T_INT, offsetof (Py_cvec, length), READONLY, 185 " length attribute"},215 "int: Length of `norm` and `phas` vectors."}, 186 216 {NULL} /* Sentinel */ 187 217 }; … … 192 222 193 223 static PyGetSetDef Py_cvec_getseters[] = { 194 {"norm", (getter)Py_cvec_get_norm, (setter)Py_cvec_set_norm, 195 " Numpy vector of shape (length,) containing the magnitude",224 {"norm", (getter)Py_cvec_get_norm, (setter)Py_cvec_set_norm, 225 "numpy.ndarray: Vector of shape `(length,)` containing the magnitude.", 196 226 NULL}, 197 {"phas", (getter)Py_cvec_get_phas, (setter)Py_cvec_set_phas, 198 " Numpy vector of shape (length,) containing the phase",227 {"phas", (getter)Py_cvec_get_phas, (setter)Py_cvec_set_phas, 228 "numpy.ndarray: Vector of shape `(length,)` containing the phase.", 199 229 NULL}, 200 230 {NULL} /* sentinel */
Note: See TracChangeset
for help on using the changeset viewer.