[source] simplify and avoid unrequired checks
[aubio.git] / doc / py_datatypes.rst
1 .. default-domain:: py
2 .. currentmodule:: aubio
3
4 Data-types
5 ----------
6
7 This section contains the documentation for :data:`float_type`,
8 :class:`fvec`, and :class:`cvec`.
9
10 .. defined in rst only
11
12 .. data:: float_type
13
14     A string constant describing the floating-point representation used in
15     :class:`fvec`, :class:`cvec`, and elsewhere in this module.
16
17     Defaults to `"float32"`.
18
19     If `aubio` was built specifically with the option `--enable-double`, this
20     string will be defined to `"float64"`. See :ref:`py-doubleprecision` in
21     :ref:`python-install` for more details on building aubio in double
22     precision mode.
23
24     .. rubric:: Examples
25
26     >>> aubio.float_type
27     'float32'
28     >>> numpy.zeros(10).dtype
29     'float64'
30     >>> aubio.fvec(10).dtype
31     'float32'
32     >>> np.arange(10, dtype=aubio.float_type).dtype
33     'float32'
34
35 .. defined in `python/lib/aubio/__init__.py`
36
37 .. autoclass:: fvec
38   :members:
39
40 .. defined in `python/ext/py-cvec.h`
41
42 .. autoclass:: cvec
43   :members: