Showing the changes to python/ext (1 of 1 file). Show all
Unified · Split
| @@ -156,33 +156,69 @@ static char Py_aubio_level_detection_doc[] = "" · 155 unmodified lines | ||
| 156 | 156 | PyObject * Py_aubio_level_detection(PyObject *self, PyObject *args); |
| 157 | 157 | |
| 158 | 158 | static char Py_aubio_shift_doc[] = "" |
| 159 | −"Swap left and right partitions of a vector\n" | |
| 159 | +"shift(vec)\n" | |
| 160 | 160 | "\n" |
| 161 | −"Returns the swapped vector. The input vector is also modified.\n" | |
| 161 | +"Swap left and right partitions of a vector, in-place.\n" | |
| 162 | +"\n" | |
| 163 | +"Parameters\n" | |
| 164 | +"----------\n" | |
| 165 | +"vec : fvec\n" | |
| 166 | +" input vector to shift\n" | |
| 167 | +"\n" | |
| 168 | +"Returns\n" | |
| 169 | +"-------\n" | |
| 170 | +"fvec\n" | |
| 171 | +" The swapped vector.\n" | |
| 172 | +"\n" | |
| 173 | +"Notes\n" | |
| 174 | +"-----\n" | |
| 175 | +"The input vector is also modified.\n" | |
| 162 | 176 | "\n" |
| 163 | 177 | "For a vector of length N, the partition is split at index N - N//2.\n" |
| 164 | 178 | "\n" |
| 165 | 179 | "Example\n" |
| 166 | 180 | "-------\n" |
| 167 | 181 | "\n" |
| 168 | −">>> import numpy\n" | |
| 169 | −">>> shift(numpy.arange(3, dtype=aubio.float_type))\n" | |
| 170 | −"array([2., 0., 1.], dtype=" AUBIO_NPY_SMPL_STR ")"; | |
| 182 | +">>> aubio.shift(aubio.fvec(np.arange(3)))\n" | |
| 183 | +"array([2., 0., 1.], dtype=" AUBIO_NPY_SMPL_STR ")\n" | |
| 184 | +"\n" | |
| 185 | +"See Also\n" | |
| 186 | +"--------\n" | |
| 187 | +"ishift\n" | |
| 188 | +""; | |
| 171 | 189 | PyObject * Py_aubio_shift(PyObject *self, PyObject *args); |
| 172 | 190 | |
| 173 | 191 | static char Py_aubio_ishift_doc[] = "" |
| 174 | −"Swap right and left partitions of a vector\n" | |
| 192 | +"ishift(vec)\n" | |
| 175 | 193 | "\n" |
| 176 | −"Returns the swapped vector. The input vector is also modified.\n" | |
| 194 | +"Swap right and left partitions of a vector, in-place.\n" | |
| 177 | 195 | "\n" |
| 178 | −"Unlike with shift(), the partition is split at index N//2.\n" | |
| 196 | +"Parameters\n" | |
| 197 | +"----------\n" | |
| 198 | +"vec : fvec\n" | |
| 199 | +" input vector to shift\n" | |
| 200 | +"\n" | |
| 201 | +"Returns\n" | |
| 202 | +"-------\n" | |
| 203 | +"fvec\n" | |
| 204 | +" The swapped vector.\n" | |
| 205 | +"\n" | |
| 206 | +"Notes\n" | |
| 207 | +"-----\n" | |
| 208 | +"The input vector is also modified.\n" | |
| 209 | +"\n" | |
| 210 | +"Unlike with :py:func:`shift`, the partition is split at index N//2.\n" | |
| 179 | 211 | "\n" |
| 180 | 212 | "Example\n" |
| 181 | 213 | "-------\n" |
| 182 | 214 | "\n" |
| 183 | −">>> import numpy\n" | |
| 184 | −">>> ishift(numpy.arange(3, dtype=aubio.float_type))\n" | |
| 185 | −"array([1., 2., 0.], dtype=" AUBIO_NPY_SMPL_STR ")"; | |
| 215 | +">>> aubio.ishift(aubio.fvec(np.arange(3)))\n" | |
| 216 | +"array([1., 2., 0.], dtype=" AUBIO_NPY_SMPL_STR ")\n" | |
| 217 | +"\n" | |
| 218 | +"See Also\n" | |
| 219 | +"--------\n" | |
| 220 | +"shift\n" | |
| 221 | +""; | |
| 186 | 222 | PyObject * Py_aubio_ishift(PyObject *self, PyObject *args); |
| 187 | 223 | |
| 188 | 224 | #endif /* PY_AUBIO_MUSICUTILS_H */ |