Sophie

Sophie

distrib > Mageia > 7 > aarch64 > by-pkgid > 6debd223f76e3f43fd43d56c2a8ea18f > files > 60

python3-pywavelets-doc-1.0.1-2.mga7.noarch.rpm

.. _reg-gotchas:

.. currentmodule:: pywt


=======
Gotchas
=======

PyWavelets utilizes ``NumPy`` under the hood. That's why handling the data
containing ``None`` values can be surprising. ``None`` values are converted to
'not a number' (``numpy.NaN``) values:

    >>> import numpy, pywt
    >>> x = [None, None]
    >>> mode = 'symmetric'
    >>> wavelet = 'db1'
    >>> cA, cD = pywt.dwt(x, wavelet, mode)
    >>> numpy.all(numpy.isnan(cA))
    True
    >>> numpy.all(numpy.isnan(cD))
    True
    >>> rec = pywt.idwt(cA, cD, wavelet, mode)
    >>> numpy.all(numpy.isnan(rec))
    True