Skip to content

Commit

Permalink
Updated the docs to reflect the wisdom functions.
Browse files Browse the repository at this point in the history
  • Loading branch information
hgomersall committed Apr 8, 2012
1 parent 1e7c33f commit f602f2b
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 13 deletions.
23 changes: 23 additions & 0 deletions index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Welcome to pyFFTW's documentation!
==================================

* :ref:`FFTW Class <FFTW_class>`
* :ref:`Wisdom Functions <WisdomFunctions>`
* :ref:`Utility Functions <UtilityFunctions>`

pyFFTW is a pythonic wrapper around `FFTW <http://www.fftw.org/>`_, the
Expand Down Expand Up @@ -71,6 +72,28 @@ FFTW Class

.. automethod:: pyfftw.FFTW.execute()

.. _WisdomFunctions:

Wisdom Functions
----------------

Functions for dealing with FFTW's ability to export and restore plans,
referred to as *wisdom*. For further information, refer to the `FFTW
wisdom documentation <http://www.fftw.org/fftw3_doc/Words-of-Wisdom_002dSaving-Plans.html#Words-of-Wisdom_002dSaving-Plans>`_.

.. _export_wisdom:

.. autofunction:: pyfftw.export_wisdom

.. _import_wisdom:

.. autofunction:: pyfftw.import_wisdom

.. _forget_wisdom:

.. autofunction:: pyfftw.forget_wisdom


.. _UtilityFunctions:

Utility Functions
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
libraries=libraries,
library_dirs=library_dirs)]

version = '0.7.0'
version = '0.8.0'

long_description = '''
pyFFTW is a pythonic wrapper around `FFTW <http://www.fftw.org/>`_, the
Expand Down
24 changes: 12 additions & 12 deletions test/test_pyfftw_wisdom.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,24 +21,29 @@
export_wisdom, import_wisdom, forget_wisdom)

import numpy
import cPickle

import unittest

class FFTWWisdomTest(unittest.TestCase):

def test_export(self):

forget_wisdom()

before_wisdom = export_wisdom()

def generate_wisdom(self):
for each_dtype in (numpy.complex128, numpy.complex64,
numpy.clongdouble):

a = n_byte_align_empty((1,1024), 16, each_dtype)
b = n_byte_align_empty(a.shape, 16, dtype=a.dtype)
fft = FFTW(a,b)


def test_export(self):

forget_wisdom()

before_wisdom = export_wisdom()

self.generate_wisdom()

after_wisdom = export_wisdom()

for n in range(0,2):
Expand All @@ -48,12 +53,7 @@ def test_import(self):

forget_wisdom()

for each_dtype in (numpy.complex128, numpy.complex64,
numpy.clongdouble):

a = n_byte_align_empty((1,1024), 16, each_dtype)
b = n_byte_align_empty(a.shape, 16, dtype=a.dtype)
fft = FFTW(a,b)
self.generate_wisdom()

after_wisdom = export_wisdom()

Expand Down

0 comments on commit f602f2b

Please sign in to comment.