Changes in python/ext/py-cvec.c [6d8ae981:4deb255]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
python/ext/py-cvec.c
r6d8ae981 r4deb255 20 20 } Py_cvec; 21 21 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 ""; 22 static char Py_cvec_doc[] = "cvec object"; 53 23 54 24 … … 213 183 // TODO remove READONLY flag and define getter/setter 214 184 {"length", T_INT, offsetof (Py_cvec, length), READONLY, 215 " int: Length of `norm` and `phas` vectors."},185 "length attribute"}, 216 186 {NULL} /* Sentinel */ 217 187 }; … … 222 192 223 193 static PyGetSetDef Py_cvec_getseters[] = { 224 {"norm", (getter)Py_cvec_get_norm, (setter)Py_cvec_set_norm, 225 " numpy.ndarray: Vector of shape `(length,)` containing the magnitude.",194 {"norm", (getter)Py_cvec_get_norm, (setter)Py_cvec_set_norm, 195 "Numpy vector of shape (length,) containing the magnitude", 226 196 NULL}, 227 {"phas", (getter)Py_cvec_get_phas, (setter)Py_cvec_set_phas, 228 " numpy.ndarray: Vector of shape `(length,)` containing the phase.",197 {"phas", (getter)Py_cvec_get_phas, (setter)Py_cvec_set_phas, 198 "Numpy vector of shape (length,) containing the phase", 229 199 NULL}, 230 200 {NULL} /* sentinel */
Note: See TracChangeset
for help on using the changeset viewer.