Changeset 92948ab
 Timestamp:
 Oct 26, 2018, 9:12:00 PM (14 months ago)
 Branches:
 feature/autosink, feature/constantq, feature/pitchshift, feature/pydocstrings, feature/timestretch, master
 Children:
 81abf91
 Parents:
 0629356
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

python/ext/pycvec.c
r0629356 r92948ab 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 "Data structure to hold spectral vectors.\n" 26 "\n" 27 "A vector holding spectral data in two vectors, :attr:`phas`\n" 28 "and :attr:`norm`. Each vector is a :class:`numpy.ndarray`\n" 29 "of shape `(length,)`, where `length = size // 2 + 1`.\n" 30 "\n" 31 "Parameters\n" 32 "\n" 33 "size: int\n" 34 " Size of spectrum to create.\n" 35 "\n" 36 "Examples\n" 37 "\n" 38 ">>> c = aubio.cvec(1024)\n" 39 ">>> c\n" 40 "aubio cvec of 513 elements\n" 41 ">>> c.length\n" 42 "513\n" 43 ">>> c.norm.dtype, c.phas.dtype\n" 44 "(dtype('float32'), dtype('float32'))\n" 45 ">>> c.norm.shape, c.phas.shape\n" 46 "((513,), (513,))\n" 47 "\n" 48 "See Also\n" 49 "\n" 50 "fft, pvoc\n" 51 ""; 23 52 24 53 … … 183 212 // TODO remove READONLY flag and define getter/setter 184 213 {"length", T_INT, offsetof (Py_cvec, length), READONLY, 185 " length attribute"},214 "int: Length of `norm` and `phas` vectors."}, 186 215 {NULL} /* Sentinel */ 187 216 }; … … 192 221 193 222 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",223 {"norm", (getter)Py_cvec_get_norm, (setter)Py_cvec_set_norm, 224 "numpy.ndarray: Vector of shape `(length,)` containing the magnitude.", 196 225 NULL}, 197 {"phas", (getter)Py_cvec_get_phas, (setter)Py_cvec_set_phas, 198 " Numpy vector of shape (length,) containing the phase",226 {"phas", (getter)Py_cvec_get_phas, (setter)Py_cvec_set_phas, 227 "numpy.ndarray: Vector of shape `(length,)` containing the phase.", 199 228 NULL}, 200 229 {NULL} /* sentinel */
Note: See TracChangeset
for help on using the changeset viewer.