[pyfftw] 01/02: Imported Upstream version 0.9.2

Ghislain Vaillant ghisvail-guest at alioth.debian.org
Thu Nov 7 19:55:51 UTC 2013


This is an automated email from the git hooks/post-receive script.

ghisvail-guest pushed a commit to branch master
in repository pyfftw.

commit 8312fa31ca2a5c831c92aa7a3c2031ca1e358648
Author: Ghislain Vaillant <ghisvail at gmail.com>
Date:   Thu Nov 7 18:57:24 2013 +0000

    Imported Upstream version 0.9.2
---
 COPYING.txt                                    |  675 +
 LICENSE.txt                                    |  683 +
 PKG-INFO                                       |   49 +
 README.rst                                     |  103 +
 docs/html/_static/basic.css                    |  540 +
 docs/html/_static/comment-bright.png           |  Bin 0 -> 3500 bytes
 docs/html/_static/comment-close.png            |  Bin 0 -> 3578 bytes
 docs/html/_static/comment.png                  |  Bin 0 -> 3445 bytes
 docs/html/_static/default.css                  |  256 +
 docs/html/_static/doctools.js                  |  247 +
 docs/html/_static/down-pressed.png             |  Bin 0 -> 368 bytes
 docs/html/_static/down.png                     |  Bin 0 -> 363 bytes
 docs/html/_static/file.png                     |  Bin 0 -> 392 bytes
 docs/html/_static/jquery.js                    | 9404 +++++++++++++
 docs/html/_static/minus.png                    |  Bin 0 -> 199 bytes
 docs/html/_static/plus.png                     |  Bin 0 -> 199 bytes
 docs/html/_static/pygments.css                 |   62 +
 docs/html/_static/searchtools.js               |  567 +
 docs/html/_static/sidebar.js                   |  151 +
 docs/html/_static/underscore.js                | 1221 ++
 docs/html/_static/up-pressed.png               |  Bin 0 -> 372 bytes
 docs/html/_static/up.png                       |  Bin 0 -> 363 bytes
 docs/html/_static/websupport.js                |  808 ++
 docs/html/genindex.html                        |  497 +
 docs/html/index.html                           |  172 +
 docs/html/py-modindex.html                     |  141 +
 docs/html/pyfftw/builders/_utils.html          |  202 +
 docs/html/pyfftw/builders/builders.html        |  442 +
 docs/html/pyfftw/interfaces/interfaces.html    |  379 +
 docs/html/pyfftw/interfaces/numpy_fft.html     |  244 +
 docs/html/pyfftw/interfaces/scipy_fftpack.html |  189 +
 docs/html/pyfftw/pyfftw.html                   |  591 +
 docs/html/search.html                          |  107 +
 docs/html/searchindex.js                       |    1 +
 docs/html/sphinx/api.html                      |  146 +
 docs/html/sphinx/tutorial.html                 |  507 +
 include/cpu.h                                  |   85 +
 include/msvc_2008/stdint.h                     |  259 +
 include/pyfftw_complex.h                       |   38 +
 include/win/fftw3.h                            |  412 +
 pyfftw/__init__.py                             |   31 +
 pyfftw/_version.py                             |    2 +
 pyfftw/builders/__init__.py                    |    7 +
 pyfftw/builders/_utils.py                      |  367 +
 pyfftw/builders/builders.py                    |  497 +
 pyfftw/cpu.pxd                                 |   21 +
 pyfftw/interfaces/__init__.py                  |  225 +
 pyfftw/interfaces/_utils.py                    |  112 +
 pyfftw/interfaces/cache.py                     |  245 +
 pyfftw/interfaces/numpy_fft.py                 |  233 +
 pyfftw/interfaces/scipy_fftpack.py             |  148 +
 pyfftw/np_fft.py                               |   43 +
 pyfftw/pyfftw.c                                |16764 ++++++++++++++++++++++++
 pyfftw/pyfftw.pxd                              |  261 +
 pyfftw/pyfftw.pyx                              | 1639 +++
 pyfftw/utils.pxi                               |  126 +
 requirements.txt                               |    2 +
 setup.py                                       |  180 +
 test/test_pyfftw_base.py                       |  199 +
 test/test_pyfftw_builders.py                   | 1231 ++
 test/test_pyfftw_call.py                       |  389 +
 test/test_pyfftw_class_misc.py                 |  210 +
 test/test_pyfftw_complex.py                    |  731 ++
 test/test_pyfftw_interfaces_cache.py           |  339 +
 test/test_pyfftw_multithreaded.py              |   93 +
 test/test_pyfftw_nbyte_align.py                |  163 +
 test/test_pyfftw_numpy_interface.py            |  566 +
 test/test_pyfftw_real_backward.py              |  330 +
 test/test_pyfftw_real_forward.py               |  145 +
 test/test_pyfftw_scipy_interface.py            |  122 +
 test/test_pyfftw_utils.py                      |   83 +
 test/test_pyfftw_wisdom.py                     |   81 +
 72 files changed, 44763 insertions(+)

diff --git a/COPYING.txt b/COPYING.txt
new file mode 100644
index 0000000..10926e8
--- /dev/null
+++ b/COPYING.txt
@@ -0,0 +1,675 @@
+                    GNU GENERAL PUBLIC LICENSE
+                       Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+                            Preamble
+
+  The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+  The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works.  By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users.  We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors.  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+  To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights.  Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received.  You must make sure that they, too, receive
+or can get the source code.  And you must show them these terms so they
+know their rights.
+
+  Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+  For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software.  For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+  Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so.  This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software.  The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable.  Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products.  If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+  Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary.  To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+                       TERMS AND CONDITIONS
+
+  0. Definitions.
+
+  "This License" refers to version 3 of the GNU General Public License.
+
+  "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+  "The Program" refers to any copyrightable work licensed under this
+License.  Each licensee is addressed as "you".  "Licensees" and
+"recipients" may be individuals or organizations.
+
+  To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy.  The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+  A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+  To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy.  Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+  To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies.  Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+  An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License.  If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+  1. Source Code.
+
+  The "source code" for a work means the preferred form of the work
+for making modifications to it.  "Object code" means any non-source
+form of a work.
+
+  A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+  The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form.  A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+  The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities.  However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work.  For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+  The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+  The Corresponding Source for a work in source code form is that
+same work.
+
+  2. Basic Permissions.
+
+  All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met.  This License explicitly affirms your unlimited
+permission to run the unmodified Program.  The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work.  This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+  You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force.  You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright.  Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+  Conveying under any other circumstances is permitted solely under
+the conditions stated below.  Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+  3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+  No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+  When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+  4. Conveying Verbatim Copies.
+
+  You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+  You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+  5. Conveying Modified Source Versions.
+
+  You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+    a) The work must carry prominent notices stating that you modified
+    it, and giving a relevant date.
+
+    b) The work must carry prominent notices stating that it is
+    released under this License and any conditions added under section
+    7.  This requirement modifies the requirement in section 4 to
+    "keep intact all notices".
+
+    c) You must license the entire work, as a whole, under this
+    License to anyone who comes into possession of a copy.  This
+    License will therefore apply, along with any applicable section 7
+    additional terms, to the whole of the work, and all its parts,
+    regardless of how they are packaged.  This License gives no
+    permission to license the work in any other way, but it does not
+    invalidate such permission if you have separately received it.
+
+    d) If the work has interactive user interfaces, each must display
+    Appropriate Legal Notices; however, if the Program has interactive
+    interfaces that do not display Appropriate Legal Notices, your
+    work need not make them do so.
+
+  A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit.  Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+  6. Conveying Non-Source Forms.
+
+  You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+    a) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by the
+    Corresponding Source fixed on a durable physical medium
+    customarily used for software interchange.
+
+    b) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by a
+    written offer, valid for at least three years and valid for as
+    long as you offer spare parts or customer support for that product
+    model, to give anyone who possesses the object code either (1) a
+    copy of the Corresponding Source for all the software in the
+    product that is covered by this License, on a durable physical
+    medium customarily used for software interchange, for a price no
+    more than your reasonable cost of physically performing this
+    conveying of source, or (2) access to copy the
+    Corresponding Source from a network server at no charge.
+
+    c) Convey individual copies of the object code with a copy of the
+    written offer to provide the Corresponding Source.  This
+    alternative is allowed only occasionally and noncommercially, and
+    only if you received the object code with such an offer, in accord
+    with subsection 6b.
+
+    d) Convey the object code by offering access from a designated
+    place (gratis or for a charge), and offer equivalent access to the
+    Corresponding Source in the same way through the same place at no
+    further charge.  You need not require recipients to copy the
+    Corresponding Source along with the object code.  If the place to
+    copy the object code is a network server, the Corresponding Source
+    may be on a different server (operated by you or a third party)
+    that supports equivalent copying facilities, provided you maintain
+    clear directions next to the object code saying where to find the
+    Corresponding Source.  Regardless of what server hosts the
+    Corresponding Source, you remain obligated to ensure that it is
+    available for as long as needed to satisfy these requirements.
+
+    e) Convey the object code using peer-to-peer transmission, provided
+    you inform other peers where the object code and Corresponding
+    Source of the work are being offered to the general public at no
+    charge under subsection 6d.
+
+  A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+  A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling.  In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage.  For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product.  A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+  "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source.  The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+  If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information.  But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+  The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed.  Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+  Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+  7. Additional Terms.
+
+  "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law.  If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+  When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it.  (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.)  You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+  Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+    a) Disclaiming warranty or limiting liability differently from the
+    terms of sections 15 and 16 of this License; or
+
+    b) Requiring preservation of specified reasonable legal notices or
+    author attributions in that material or in the Appropriate Legal
+    Notices displayed by works containing it; or
+
+    c) Prohibiting misrepresentation of the origin of that material, or
+    requiring that modified versions of such material be marked in
+    reasonable ways as different from the original version; or
+
+    d) Limiting the use for publicity purposes of names of licensors or
+    authors of the material; or
+
+    e) Declining to grant rights under trademark law for use of some
+    trade names, trademarks, or service marks; or
+
+    f) Requiring indemnification of licensors and authors of that
+    material by anyone who conveys the material (or modified versions of
+    it) with contractual assumptions of liability to the recipient, for
+    any liability that these contractual assumptions directly impose on
+    those licensors and authors.
+
+  All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10.  If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term.  If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+  If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+  Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+  8. Termination.
+
+  You may not propagate or modify a covered work except as expressly
+provided under this License.  Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+  However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+  Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+  Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License.  If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+  9. Acceptance Not Required for Having Copies.
+
+  You are not required to accept this License in order to receive or
+run a copy of the Program.  Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance.  However,
+nothing other than this License grants you permission to propagate or
+modify any covered work.  These actions infringe copyright if you do
+not accept this License.  Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+  10. Automatic Licensing of Downstream Recipients.
+
+  Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License.  You are not responsible
+for enforcing compliance by third parties with this License.
+
+  An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations.  If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+  You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License.  For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+  11. Patents.
+
+  A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based.  The
+work thus licensed is called the contributor's "contributor version".
+
+  A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version.  For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+  Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+  In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement).  To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+  If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients.  "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+  If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+  A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License.  You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+  Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+  12. No Surrender of Others' Freedom.
+
+  If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all.  For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+  13. Use with the GNU Affero General Public License.
+
+  Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work.  The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+  14. Revised Versions of this License.
+
+  The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+  Each version is given a distinguishing version number.  If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation.  If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+  If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+  Later license versions may give you additional or different
+permissions.  However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+  15. Disclaimer of Warranty.
+
+  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. Limitation of Liability.
+
+  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+  17. Interpretation of Sections 15 and 16.
+
+  If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+                     END OF TERMS AND CONDITIONS
+
+            How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+  If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+    <program>  Copyright (C) <year>  <name of author>
+    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+  You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+<http://www.gnu.org/licenses/>.
+
+  The GNU General Public License does not permit incorporating your program
+into proprietary programs.  If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library.  If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.  But first, please read
+<http://www.gnu.org/philosophy/why-not-lgpl.html>.
+
diff --git a/LICENSE.txt b/LICENSE.txt
new file mode 100644
index 0000000..10e50ff
--- /dev/null
+++ b/LICENSE.txt
@@ -0,0 +1,683 @@
+Most of the code in this library are released under the GNU GPL 3, the
+license for which is set out below.
+
+Notable exceptions are fftw3.h and stdint.h in include/win/, the licenses,
+which are given inside the files, are the BSD 2- and 3-clause licenses
+respectively.
+
+
+                    GNU GENERAL PUBLIC LICENSE
+                       Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+                            Preamble
+
+  The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+  The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works.  By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users.  We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors.  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+  To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights.  Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received.  You must make sure that they, too, receive
+or can get the source code.  And you must show them these terms so they
+know their rights.
+
+  Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+  For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software.  For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+  Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so.  This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software.  The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable.  Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products.  If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+  Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary.  To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+                       TERMS AND CONDITIONS
+
+  0. Definitions.
+
+  "This License" refers to version 3 of the GNU General Public License.
+
+  "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+  "The Program" refers to any copyrightable work licensed under this
+License.  Each licensee is addressed as "you".  "Licensees" and
+"recipients" may be individuals or organizations.
+
+  To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy.  The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+  A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+  To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy.  Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+  To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies.  Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+  An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License.  If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+  1. Source Code.
+
+  The "source code" for a work means the preferred form of the work
+for making modifications to it.  "Object code" means any non-source
+form of a work.
+
+  A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+  The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form.  A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+  The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities.  However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work.  For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+  The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+  The Corresponding Source for a work in source code form is that
+same work.
+
+  2. Basic Permissions.
+
+  All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met.  This License explicitly affirms your unlimited
+permission to run the unmodified Program.  The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work.  This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+  You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force.  You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright.  Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+  Conveying under any other circumstances is permitted solely under
+the conditions stated below.  Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+  3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+  No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+  When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+  4. Conveying Verbatim Copies.
+
+  You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+  You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+  5. Conveying Modified Source Versions.
+
+  You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+    a) The work must carry prominent notices stating that you modified
+    it, and giving a relevant date.
+
+    b) The work must carry prominent notices stating that it is
+    released under this License and any conditions added under section
+    7.  This requirement modifies the requirement in section 4 to
+    "keep intact all notices".
+
+    c) You must license the entire work, as a whole, under this
+    License to anyone who comes into possession of a copy.  This
+    License will therefore apply, along with any applicable section 7
+    additional terms, to the whole of the work, and all its parts,
+    regardless of how they are packaged.  This License gives no
+    permission to license the work in any other way, but it does not
+    invalidate such permission if you have separately received it.
+
+    d) If the work has interactive user interfaces, each must display
+    Appropriate Legal Notices; however, if the Program has interactive
+    interfaces that do not display Appropriate Legal Notices, your
+    work need not make them do so.
+
+  A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit.  Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+  6. Conveying Non-Source Forms.
+
+  You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+    a) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by the
+    Corresponding Source fixed on a durable physical medium
+    customarily used for software interchange.
+
+    b) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by a
+    written offer, valid for at least three years and valid for as
+    long as you offer spare parts or customer support for that product
+    model, to give anyone who possesses the object code either (1) a
+    copy of the Corresponding Source for all the software in the
+    product that is covered by this License, on a durable physical
+    medium customarily used for software interchange, for a price no
+    more than your reasonable cost of physically performing this
+    conveying of source, or (2) access to copy the
+    Corresponding Source from a network server at no charge.
+
+    c) Convey individual copies of the object code with a copy of the
+    written offer to provide the Corresponding Source.  This
+    alternative is allowed only occasionally and noncommercially, and
+    only if you received the object code with such an offer, in accord
+    with subsection 6b.
+
+    d) Convey the object code by offering access from a designated
+    place (gratis or for a charge), and offer equivalent access to the
+    Corresponding Source in the same way through the same place at no
+    further charge.  You need not require recipients to copy the
+    Corresponding Source along with the object code.  If the place to
+    copy the object code is a network server, the Corresponding Source
+    may be on a different server (operated by you or a third party)
+    that supports equivalent copying facilities, provided you maintain
+    clear directions next to the object code saying where to find the
+    Corresponding Source.  Regardless of what server hosts the
+    Corresponding Source, you remain obligated to ensure that it is
+    available for as long as needed to satisfy these requirements.
+
+    e) Convey the object code using peer-to-peer transmission, provided
+    you inform other peers where the object code and Corresponding
+    Source of the work are being offered to the general public at no
+    charge under subsection 6d.
+
+  A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+  A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling.  In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage.  For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product.  A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+  "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source.  The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+  If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information.  But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+  The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed.  Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+  Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+  7. Additional Terms.
+
+  "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law.  If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+  When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it.  (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.)  You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+  Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+    a) Disclaiming warranty or limiting liability differently from the
+    terms of sections 15 and 16 of this License; or
+
+    b) Requiring preservation of specified reasonable legal notices or
+    author attributions in that material or in the Appropriate Legal
+    Notices displayed by works containing it; or
+
+    c) Prohibiting misrepresentation of the origin of that material, or
+    requiring that modified versions of such material be marked in
+    reasonable ways as different from the original version; or
+
+    d) Limiting the use for publicity purposes of names of licensors or
+    authors of the material; or
+
+    e) Declining to grant rights under trademark law for use of some
+    trade names, trademarks, or service marks; or
+
+    f) Requiring indemnification of licensors and authors of that
+    material by anyone who conveys the material (or modified versions of
+    it) with contractual assumptions of liability to the recipient, for
+    any liability that these contractual assumptions directly impose on
+    those licensors and authors.
+
+  All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10.  If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term.  If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+  If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+  Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+  8. Termination.
+
+  You may not propagate or modify a covered work except as expressly
+provided under this License.  Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+  However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+  Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+  Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License.  If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+  9. Acceptance Not Required for Having Copies.
+
+  You are not required to accept this License in order to receive or
+run a copy of the Program.  Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance.  However,
+nothing other than this License grants you permission to propagate or
+modify any covered work.  These actions infringe copyright if you do
+not accept this License.  Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+  10. Automatic Licensing of Downstream Recipients.
+
+  Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License.  You are not responsible
+for enforcing compliance by third parties with this License.
+
+  An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations.  If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+  You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License.  For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+  11. Patents.
+
+  A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based.  The
+work thus licensed is called the contributor's "contributor version".
+
+  A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version.  For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+  Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+  In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement).  To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+  If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients.  "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+  If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+  A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License.  You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+  Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+  12. No Surrender of Others' Freedom.
+
+  If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all.  For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+  13. Use with the GNU Affero General Public License.
+
+  Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work.  The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+  14. Revised Versions of this License.
+
+  The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+  Each version is given a distinguishing version number.  If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation.  If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+  If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+  Later license versions may give you additional or different
+permissions.  However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+  15. Disclaimer of Warranty.
+
+  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. Limitation of Liability.
+
+  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+  17. Interpretation of Sections 15 and 16.
+
+  If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+                     END OF TERMS AND CONDITIONS
+
+            How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+  If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+    <program>  Copyright (C) <year>  <name of author>
+    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+  You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+<http://www.gnu.org/licenses/>.
+
+  The GNU General Public License does not permit incorporating your program
+into proprietary programs.  If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library.  If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.  But first, please read
+<http://www.gnu.org/philosophy/why-not-lgpl.html>.
+
diff --git a/PKG-INFO b/PKG-INFO
new file mode 100644
index 0000000..d9dce81
--- /dev/null
+++ b/PKG-INFO
@@ -0,0 +1,49 @@
+Metadata-Version: 1.1
+Name: pyFFTW
+Version: 0.9.2
+Summary: A pythonic wrapper around FFTW, the FFT library, presenting a unified interface for all the supported transforms.
+Home-page: http://hgomersall.github.com/pyFFTW/
+Author: Henry Gomersall
+Author-email: heng at kedevelopments.co.uk
+License: UNKNOWN
+Description: 
+        pyFFTW is a pythonic wrapper around `FFTW <http://www.fftw.org/>`_, the
+        speedy FFT library. The ultimate aim is to present a unified interface for all
+        the possible transforms that FFTW can perform.
+        
+        Both the complex DFT and the real DFT are supported, as well as arbitrary
+        axes of abitrary shaped and strided arrays, which makes it almost
+        feature equivalent to standard and real FFT functions of ``numpy.fft`` 
+        (indeed, it supports the ``clongdouble`` dtype which ``numpy.fft`` does not).
+        
+        Operating FFTW in multithreaded mode is supported.
+        
+        A comprehensive unittest suite can be found with the source on the github 
+        repository.
+        
+        To build for windows from source, download the fftw dlls for your system
+        and the header file from here (they're in a zip file):
+        http://www.fftw.org/install/windows.html and place them in the pyfftw
+        directory. The files are libfftw3-3.dll, libfftw3l-3.dll, libfftw3f-3.dll 
+        and libfftw3.h.
+        
+        Under linux, to build from source, the FFTW library must be installed already.
+        This should probably work for OSX, though I've not tried it.
+        
+        Numpy is a dependency for both.
+        
+        The documentation can be found 
+        `here <http://hgomersall.github.com/pyFFTW/>`_, and the source
+        is on `github <https://github.com/hgomersall/pyFFTW>`_.
+        
+Platform: UNKNOWN
+Classifier: Programming Language :: Python
+Classifier: Programming Language :: Python :: 3
+Classifier: Development Status :: 4 - Beta
+Classifier: License :: OSI Approved :: GNU General Public License (GPL)
+Classifier: Operating System :: OS Independent
+Classifier: Intended Audience :: Developers
+Classifier: Intended Audience :: Science/Research
+Classifier: Topic :: Scientific/Engineering
+Classifier: Topic :: Scientific/Engineering :: Mathematics
+Classifier: Topic :: Multimedia :: Sound/Audio :: Analysis
diff --git a/README.rst b/README.rst
new file mode 100644
index 0000000..e0c2d28
--- /dev/null
+++ b/README.rst
@@ -0,0 +1,103 @@
+PyFFTW
+======
+
+pyFFTW is a pythonic wrapper around `FFTW 3 <http://www.fftw.org/>`_, the
+speedy FFT library.  The ultimate aim is to present a unified interface for all the possible transforms that FFTW can perform.
+
+Both the complex DFT and the real DFT are supported, as well as on arbitrary
+axes of abitrary shaped and strided arrays, which makes it almost
+feature equivalent to standard and real FFT functions of ``numpy.fft`` 
+(indeed, it supports the ``clongdouble`` dtype which ``numpy.fft`` does not).
+
+Wisdom import and export now works fairly reliably.
+
+Operating FFTW in multithreaded mode is supported.
+
+pyFFTW implements the numpy and scipy fft interfaces in order for users to
+take advantage of the speed of FFTW with minimal code modifications.
+
+A comprehensive unittest suite can be found with the source on the github 
+repository or with the source distribution on PyPI.
+
+The documentation can be found on 
+`github pages <http://hgomersall.github.com/pyFFTW>`_, the source is 
+on `github <https://github.com/hgomersall/pyFFTW>`_ and the python package 
+index page is `here <http://pypi.python.org/pypi/pyFFTW>`_.
+
+Requirements (i.e. what it was designed for)
+--------------------------------------------
+- Python 2.7 or greater (Python 3 is supported)
+- Numpy 1.6
+- FFTW 3.3 or higher (lower versions *may* work)
+- Cython 0.15 or higher (though the source release on PyPI loses this 
+  dependency)
+
+(install these as much as possible with your preferred package manager).
+
+Installation
+------------
+
+We recommend *not* building from github, but using the release on 
+the python package index with tools such as easy_install or pip::
+
+  pip install pyfftw
+
+or::
+
+  easy_install pyfftw
+
+Installers are on the PyPI page for both 32- and 64-bit Windows, which include
+all the necessary DLLs.
+
+With FFTW installed, the PyPI release should install fine on Linux and Mac OSX. It doesn't mean it won't work anywhere else, just we don't have any information on it.
+
+Read on if you do want to build from source...
+
+Building
+--------
+
+To build in place::
+
+  python setup.py build_ext --inplace
+
+That cythons the python extension and builds it into a shared library
+which is placed in ``pyfftw/``. The directory can then be treated as a python
+package.
+
+After you've run ``setup.py`` with cython available, you then have a 
+normal C extension in the ``pyfftw`` directory. 
+Further building does not depend on cython (as long as the .c file remains).
+
+For more ways of building and installing, see the 
+`distutils documentation <http://docs.python.org/distutils/builtdist.html>`_
+
+Platform specific build info
+----------------------------
+
+Windows
+~~~~~~~
+
+To build for windows from source, download the fftw dlls for your system
+and the header file from `here <http://www.fftw.org/install/windows.html>`_ 
+(they're in a zip file) and place them in the pyfftw
+directory. The files are ``libfftw3-3.dll``, ``libfftw3l-3.dll``, 
+``libfftw3f-3.dll``. If you're using a version of FFTW other than 3.3, it may
+be necessary to copy ``fftw3.h`` into ``include\win``.
+
+The builds on PyPI use mingw for the 32-bit release and the Windows SDK 
+C++ compiler for the 64-bit release. The scripts should handle this 
+automatically. If you want to compile for 64-bit Windows, you have to use
+the MS Visual C++ compiler. Set up your environment as described 
+`here <http://wiki.cython.org/64BitCythonExtensionsOnWindows>`_ and then
+run `setup.py` with the version of python you wish to target and a suitable
+build command.
+
+For using the MS Visual C++ compiler, you'll need to create a set of 
+suitable `.lib` files as described on the 
+`FFTW page <http://www.fftw.org/install/windows.html>`_.
+
+Mac OSX
+~~~~~~~
+
+It has been suggested that FFTW should be installed from `macports <http://www.macports.org/>`_.
+
diff --git a/docs/html/_static/basic.css b/docs/html/_static/basic.css
new file mode 100644
index 0000000..43e8baf
--- /dev/null
+++ b/docs/html/_static/basic.css
@@ -0,0 +1,540 @@
+/*
+ * basic.css
+ * ~~~~~~~~~
+ *
+ * Sphinx stylesheet -- basic theme.
+ *
+ * :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
+ * :license: BSD, see LICENSE for details.
+ *
+ */
+
+/* -- main layout ----------------------------------------------------------- */
+
+div.clearer {
+    clear: both;
+}
+
+/* -- relbar ---------------------------------------------------------------- */
+
+div.related {
+    width: 100%;
+    font-size: 90%;
+}
+
+div.related h3 {
+    display: none;
+}
+
+div.related ul {
+    margin: 0;
+    padding: 0 0 0 10px;
+    list-style: none;
+}
+
+div.related li {
+    display: inline;
+}
+
+div.related li.right {
+    float: right;
+    margin-right: 5px;
+}
+
+/* -- sidebar --------------------------------------------------------------- */
+
+div.sphinxsidebarwrapper {
+    padding: 10px 5px 0 10px;
+}
+
+div.sphinxsidebar {
+    float: left;
+    width: 230px;
+    margin-left: -100%;
+    font-size: 90%;
+}
+
+div.sphinxsidebar ul {
+    list-style: none;
+}
+
+div.sphinxsidebar ul ul,
+div.sphinxsidebar ul.want-points {
+    margin-left: 20px;
+    list-style: square;
+}
+
+div.sphinxsidebar ul ul {
+    margin-top: 0;
+    margin-bottom: 0;
+}
+
+div.sphinxsidebar form {
+    margin-top: 10px;
+}
+
+div.sphinxsidebar input {
+    border: 1px solid #98dbcc;
+    font-family: sans-serif;
+    font-size: 1em;
+}
+
+div.sphinxsidebar #searchbox input[type="text"] {
+    width: 170px;
+}
+
+div.sphinxsidebar #searchbox input[type="submit"] {
+    width: 30px;
+}
+
+img {
+    border: 0;
+}
+
+/* -- search page ----------------------------------------------------------- */
+
+ul.search {
+    margin: 10px 0 0 20px;
+    padding: 0;
+}
+
+ul.search li {
+    padding: 5px 0 5px 20px;
+    background-image: url(file.png);
+    background-repeat: no-repeat;
+    background-position: 0 7px;
+}
+
+ul.search li a {
+    font-weight: bold;
+}
+
+ul.search li div.context {
+    color: #888;
+    margin: 2px 0 0 30px;
+    text-align: left;
+}
+
+ul.keywordmatches li.goodmatch a {
+    font-weight: bold;
+}
+
+/* -- index page ------------------------------------------------------------ */
+
+table.contentstable {
+    width: 90%;
+}
+
+table.contentstable p.biglink {
+    line-height: 150%;
+}
+
+a.biglink {
+    font-size: 1.3em;
+}
+
+span.linkdescr {
+    font-style: italic;
+    padding-top: 5px;
+    font-size: 90%;
+}
+
+/* -- general index --------------------------------------------------------- */
+
+table.indextable {
+    width: 100%;
+}
+
+table.indextable td {
+    text-align: left;
+    vertical-align: top;
+}
+
+table.indextable dl, table.indextable dd {
+    margin-top: 0;
+    margin-bottom: 0;
+}
+
+table.indextable tr.pcap {
+    height: 10px;
+}
+
+table.indextable tr.cap {
+    margin-top: 10px;
+    background-color: #f2f2f2;
+}
+
+img.toggler {
+    margin-right: 3px;
+    margin-top: 3px;
+    cursor: pointer;
+}
+
+div.modindex-jumpbox {
+    border-top: 1px solid #ddd;
+    border-bottom: 1px solid #ddd;
+    margin: 1em 0 1em 0;
+    padding: 0.4em;
+}
+
+div.genindex-jumpbox {
+    border-top: 1px solid #ddd;
+    border-bottom: 1px solid #ddd;
+    margin: 1em 0 1em 0;
+    padding: 0.4em;
+}
+
+/* -- general body styles --------------------------------------------------- */
+
+a.headerlink {
+    visibility: hidden;
+}
+
+h1:hover > a.headerlink,
+h2:hover > a.headerlink,
+h3:hover > a.headerlink,
+h4:hover > a.headerlink,
+h5:hover > a.headerlink,
+h6:hover > a.headerlink,
+dt:hover > a.headerlink {
+    visibility: visible;
+}
+
+div.body p.caption {
+    text-align: inherit;
+}
+
+div.body td {
+    text-align: left;
+}
+
+.field-list ul {
+    padding-left: 1em;
+}
+
+.first {
+    margin-top: 0 !important;
+}
+
+p.rubric {
+    margin-top: 30px;
+    font-weight: bold;
+}
+
+img.align-left, .figure.align-left, object.align-left {
+    clear: left;
+    float: left;
+    margin-right: 1em;
+}
+
+img.align-right, .figure.align-right, object.align-right {
+    clear: right;
+    float: right;
+    margin-left: 1em;
+}
+
+img.align-center, .figure.align-center, object.align-center {
+  display: block;
+  margin-left: auto;
+  margin-right: auto;
+}
+
+.align-left {
+    text-align: left;
+}
+
+.align-center {
+    text-align: center;
+}
+
+.align-right {
+    text-align: right;
+}
+
+/* -- sidebars -------------------------------------------------------------- */
+
+div.sidebar {
+    margin: 0 0 0.5em 1em;
+    border: 1px solid #ddb;
+    padding: 7px 7px 0 7px;
+    background-color: #ffe;
+    width: 40%;
+    float: right;
+}
+
+p.sidebar-title {
+    font-weight: bold;
+}
+
+/* -- topics ---------------------------------------------------------------- */
+
+div.topic {
+    border: 1px solid #ccc;
+    padding: 7px 7px 0 7px;
+    margin: 10px 0 10px 0;
+}
+
+p.topic-title {
+    font-size: 1.1em;
+    font-weight: bold;
+    margin-top: 10px;
+}
+
+/* -- admonitions ----------------------------------------------------------- */
+
+div.admonition {
+    margin-top: 10px;
+    margin-bottom: 10px;
+    padding: 7px;
+}
+
+div.admonition dt {
+    font-weight: bold;
+}
+
+div.admonition dl {
+    margin-bottom: 0;
+}
+
+p.admonition-title {
+    margin: 0px 10px 5px 0px;
+    font-weight: bold;
+}
+
+div.body p.centered {
+    text-align: center;
+    margin-top: 25px;
+}
+
+/* -- tables ---------------------------------------------------------------- */
+
+table.docutils {
+    border: 0;
+    border-collapse: collapse;
+}
+
+table.docutils td, table.docutils th {
+    padding: 1px 8px 1px 5px;
+    border-top: 0;
+    border-left: 0;
+    border-right: 0;
+    border-bottom: 1px solid #aaa;
+}
+
+table.field-list td, table.field-list th {
+    border: 0 !important;
+}
+
+table.footnote td, table.footnote th {
+    border: 0 !important;
+}
+
+th {
+    text-align: left;
+    padding-right: 5px;
+}
+
+table.citation {
+    border-left: solid 1px gray;
+    margin-left: 1px;
+}
+
+table.citation td {
+    border-bottom: none;
+}
+
+/* -- other body styles ----------------------------------------------------- */
+
+ol.arabic {
+    list-style: decimal;
+}
+
+ol.loweralpha {
+    list-style: lower-alpha;
+}
+
+ol.upperalpha {
+    list-style: upper-alpha;
+}
+
+ol.lowerroman {
+    list-style: lower-roman;
+}
+
+ol.upperroman {
+    list-style: upper-roman;
+}
+
+dl {
+    margin-bottom: 15px;
+}
+
+dd p {
+    margin-top: 0px;
+}
+
+dd ul, dd table {
+    margin-bottom: 10px;
+}
+
+dd {
+    margin-top: 3px;
+    margin-bottom: 10px;
+    margin-left: 30px;
+}
+
+dt:target, .highlighted {
+    background-color: #fbe54e;
+}
+
+dl.glossary dt {
+    font-weight: bold;
+    font-size: 1.1em;
+}
+
+.field-list ul {
+    margin: 0;
+    padding-left: 1em;
+}
+
+.field-list p {
+    margin: 0;
+}
+
+.refcount {
+    color: #060;
+}
+
+.optional {
+    font-size: 1.3em;
+}
+
+.versionmodified {
+    font-style: italic;
+}
+
+.system-message {
+    background-color: #fda;
+    padding: 5px;
+    border: 3px solid red;
+}
+
+.footnote:target  {
+    background-color: #ffa;
+}
+
+.line-block {
+    display: block;
+    margin-top: 1em;
+    margin-bottom: 1em;
+}
+
+.line-block .line-block {
+    margin-top: 0;
+    margin-bottom: 0;
+    margin-left: 1.5em;
+}
+
+.guilabel, .menuselection {
+    font-family: sans-serif;
+}
+
+.accelerator {
+    text-decoration: underline;
+}
+
+.classifier {
+    font-style: oblique;
+}
+
+abbr, acronym {
+    border-bottom: dotted 1px;
+    cursor: help;
+}
+
+/* -- code displays --------------------------------------------------------- */
+
+pre {
+    overflow: auto;
+    overflow-y: hidden;  /* fixes display issues on Chrome browsers */
+}
+
+td.linenos pre {
+    padding: 5px 0px;
+    border: 0;
+    background-color: transparent;
+    color: #aaa;
+}
+
+table.highlighttable {
+    margin-left: 0.5em;
+}
+
+table.highlighttable td {
+    padding: 0 0.5em 0 0.5em;
+}
+
+tt.descname {
+    background-color: transparent;
+    font-weight: bold;
+    font-size: 1.2em;
+}
+
+tt.descclassname {
+    background-color: transparent;
+}
+
+tt.xref, a tt {
+    background-color: transparent;
+    font-weight: bold;
+}
+
+h1 tt, h2 tt, h3 tt, h4 tt, h5 tt, h6 tt {
+    background-color: transparent;
+}
+
+.viewcode-link {
+    float: right;
+}
+
+.viewcode-back {
+    float: right;
+    font-family: sans-serif;
+}
+
+div.viewcode-block:target {
+    margin: -1px -10px;
+    padding: 0 10px;
+}
+
+/* -- math display ---------------------------------------------------------- */
+
+img.math {
+    vertical-align: middle;
+}
+
+div.body div.math p {
+    text-align: center;
+}
+
+span.eqno {
+    float: right;
+}
+
+/* -- printout stylesheet --------------------------------------------------- */
+
+ at media print {
+    div.document,
+    div.documentwrapper,
+    div.bodywrapper {
+        margin: 0 !important;
+        width: 100%;
+    }
+
+    div.sphinxsidebar,
+    div.related,
+    div.footer,
+    #top-link {
+        display: none;
+    }
+}
\ No newline at end of file
diff --git a/docs/html/_static/comment-bright.png b/docs/html/_static/comment-bright.png
new file mode 100644
index 0000000..551517b
Binary files /dev/null and b/docs/html/_static/comment-bright.png differ
diff --git a/docs/html/_static/comment-close.png b/docs/html/_static/comment-close.png
new file mode 100644
index 0000000..09b54be
Binary files /dev/null and b/docs/html/_static/comment-close.png differ
diff --git a/docs/html/_static/comment.png b/docs/html/_static/comment.png
new file mode 100644
index 0000000..92feb52
Binary files /dev/null and b/docs/html/_static/comment.png differ
diff --git a/docs/html/_static/default.css b/docs/html/_static/default.css
new file mode 100644
index 0000000..21f3f50
--- /dev/null
+++ b/docs/html/_static/default.css
@@ -0,0 +1,256 @@
+/*
+ * default.css_t
+ * ~~~~~~~~~~~~~
+ *
+ * Sphinx stylesheet -- default theme.
+ *
+ * :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
+ * :license: BSD, see LICENSE for details.
+ *
+ */
+
+ at import url("basic.css");
+
+/* -- page layout ----------------------------------------------------------- */
+
+body {
+    font-family: sans-serif;
+    font-size: 100%;
+    background-color: #11303d;
+    color: #000;
+    margin: 0;
+    padding: 0;
+}
+
+div.document {
+    background-color: #1c4e63;
+}
+
+div.documentwrapper {
+    float: left;
+    width: 100%;
+}
+
+div.bodywrapper {
+    margin: 0 0 0 230px;
+}
+
+div.body {
+    background-color: #ffffff;
+    color: #000000;
+    padding: 0 20px 30px 20px;
+}
+
+div.footer {
+    color: #ffffff;
+    width: 100%;
+    padding: 9px 0 9px 0;
+    text-align: center;
+    font-size: 75%;
+}
+
+div.footer a {
+    color: #ffffff;
+    text-decoration: underline;
+}
+
+div.related {
+    background-color: #133f52;
+    line-height: 30px;
+    color: #ffffff;
+}
+
+div.related a {
+    color: #ffffff;
+}
+
+div.sphinxsidebar {
+}
+
+div.sphinxsidebar h3 {
+    font-family: 'Trebuchet MS', sans-serif;
+    color: #ffffff;
+    font-size: 1.4em;
+    font-weight: normal;
+    margin: 0;
+    padding: 0;
+}
+
+div.sphinxsidebar h3 a {
+    color: #ffffff;
+}
+
+div.sphinxsidebar h4 {
+    font-family: 'Trebuchet MS', sans-serif;
+    color: #ffffff;
+    font-size: 1.3em;
+    font-weight: normal;
+    margin: 5px 0 0 0;
+    padding: 0;
+}
+
+div.sphinxsidebar p {
+    color: #ffffff;
+}
+
+div.sphinxsidebar p.topless {
+    margin: 5px 10px 10px 10px;
+}
+
+div.sphinxsidebar ul {
+    margin: 10px;
+    padding: 0;
+    color: #ffffff;
+}
+
+div.sphinxsidebar a {
+    color: #98dbcc;
+}
+
+div.sphinxsidebar input {
+    border: 1px solid #98dbcc;
+    font-family: sans-serif;
+    font-size: 1em;
+}
+
+
+
+/* -- hyperlink styles ------------------------------------------------------ */
+
+a {
+    color: #355f7c;
+    text-decoration: none;
+}
+
+a:visited {
+    color: #355f7c;
+    text-decoration: none;
+}
+
+a:hover {
+    text-decoration: underline;
+}
+
+
+
+/* -- body styles ----------------------------------------------------------- */
+
+div.body h1,
+div.body h2,
+div.body h3,
+div.body h4,
+div.body h5,
+div.body h6 {
+    font-family: 'Trebuchet MS', sans-serif;
+    background-color: #f2f2f2;
+    font-weight: normal;
+    color: #20435c;
+    border-bottom: 1px solid #ccc;
+    margin: 20px -20px 10px -20px;
+    padding: 3px 0 3px 10px;
+}
+
+div.body h1 { margin-top: 0; font-size: 200%; }
+div.body h2 { font-size: 160%; }
+div.body h3 { font-size: 140%; }
+div.body h4 { font-size: 120%; }
+div.body h5 { font-size: 110%; }
+div.body h6 { font-size: 100%; }
+
+a.headerlink {
+    color: #c60f0f;
+    font-size: 0.8em;
+    padding: 0 4px 0 4px;
+    text-decoration: none;
+}
+
+a.headerlink:hover {
+    background-color: #c60f0f;
+    color: white;
+}
+
+div.body p, div.body dd, div.body li {
+    text-align: justify;
+    line-height: 130%;
+}
+
+div.admonition p.admonition-title + p {
+    display: inline;
+}
+
+div.admonition p {
+    margin-bottom: 5px;
+}
+
+div.admonition pre {
+    margin-bottom: 5px;
+}
+
+div.admonition ul, div.admonition ol {
+    margin-bottom: 5px;
+}
+
+div.note {
+    background-color: #eee;
+    border: 1px solid #ccc;
+}
+
+div.seealso {
+    background-color: #ffc;
+    border: 1px solid #ff6;
+}
+
+div.topic {
+    background-color: #eee;
+}
+
+div.warning {
+    background-color: #ffe4e4;
+    border: 1px solid #f66;
+}
+
+p.admonition-title {
+    display: inline;
+}
+
+p.admonition-title:after {
+    content: ":";
+}
+
+pre {
+    padding: 5px;
+    background-color: #eeffcc;
+    color: #333333;
+    line-height: 120%;
+    border: 1px solid #ac9;
+    border-left: none;
+    border-right: none;
+}
+
+tt {
+    background-color: #ecf0f3;
+    padding: 0 1px 0 1px;
+    font-size: 0.95em;
+}
+
+th {
+    background-color: #ede;
+}
+
+.warning tt {
+    background: #efc2c2;
+}
+
+.note tt {
+    background: #d6d6d6;
+}
+
+.viewcode-back {
+    font-family: sans-serif;
+}
+
+div.viewcode-block:target {
+    background-color: #f4debf;
+    border-top: 1px solid #ac9;
+    border-bottom: 1px solid #ac9;
+}
\ No newline at end of file
diff --git a/docs/html/_static/doctools.js b/docs/html/_static/doctools.js
new file mode 100644
index 0000000..d4619fd
--- /dev/null
+++ b/docs/html/_static/doctools.js
@@ -0,0 +1,247 @@
+/*
+ * doctools.js
+ * ~~~~~~~~~~~
+ *
+ * Sphinx JavaScript utilities for all documentation.
+ *
+ * :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
+ * :license: BSD, see LICENSE for details.
+ *
+ */
+
+/**
+ * select a different prefix for underscore
+ */
+$u = _.noConflict();
+
+/**
+ * make the code below compatible with browsers without
+ * an installed firebug like debugger
+if (!window.console || !console.firebug) {
+  var names = ["log", "debug", "info", "warn", "error", "assert", "dir",
+    "dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace",
+    "profile", "profileEnd"];
+  window.console = {};
+  for (var i = 0; i < names.length; ++i)
+    window.console[names[i]] = function() {};
+}
+ */
+
+/**
+ * small helper function to urldecode strings
+ */
+jQuery.urldecode = function(x) {
+  return decodeURIComponent(x).replace(/\+/g, ' ');
+}
+
+/**
+ * small helper function to urlencode strings
+ */
+jQuery.urlencode = encodeURIComponent;
+
+/**
+ * This function returns the parsed url parameters of the
+ * current request. Multiple values per key are supported,
+ * it will always return arrays of strings for the value parts.
+ */
+jQuery.getQueryParameters = function(s) {
+  if (typeof s == 'undefined')
+    s = document.location.search;
+  var parts = s.substr(s.indexOf('?') + 1).split('&');
+  var result = {};
+  for (var i = 0; i < parts.length; i++) {
+    var tmp = parts[i].split('=', 2);
+    var key = jQuery.urldecode(tmp[0]);
+    var value = jQuery.urldecode(tmp[1]);
+    if (key in result)
+      result[key].push(value);
+    else
+      result[key] = [value];
+  }
+  return result;
+};
+
+/**
+ * small function to check if an array contains
+ * a given item.
+ */
+jQuery.contains = function(arr, item) {
+  for (var i = 0; i < arr.length; i++) {
+    if (arr[i] == item)
+      return true;
+  }
+  return false;
+};
+
+/**
+ * highlight a given string on a jquery object by wrapping it in
+ * span elements with the given class name.
+ */
+jQuery.fn.highlightText = function(text, className) {
+  function highlight(node) {
+    if (node.nodeType == 3) {
+      var val = node.nodeValue;
+      var pos = val.toLowerCase().indexOf(text);
+      if (pos >= 0 && !jQuery(node.parentNode).hasClass(className)) {
+        var span = document.createElement("span");
+        span.className = className;
+        span.appendChild(document.createTextNode(val.substr(pos, text.length)));
+        node.parentNode.insertBefore(span, node.parentNode.insertBefore(
+          document.createTextNode(val.substr(pos + text.length)),
+          node.nextSibling));
+        node.nodeValue = val.substr(0, pos);
+      }
+    }
+    else if (!jQuery(node).is("button, select, textarea")) {
+      jQuery.each(node.childNodes, function() {
+        highlight(this);
+      });
+    }
+  }
+  return this.each(function() {
+    highlight(this);
+  });
+};
+
+/**
+ * Small JavaScript module for the documentation.
+ */
+var Documentation = {
+
+  init : function() {
+    this.fixFirefoxAnchorBug();
+    this.highlightSearchWords();
+    this.initIndexTable();
+  },
+
+  /**
+   * i18n support
+   */
+  TRANSLATIONS : {},
+  PLURAL_EXPR : function(n) { return n == 1 ? 0 : 1; },
+  LOCALE : 'unknown',
+
+  // gettext and ngettext don't access this so that the functions
+  // can safely bound to a different name (_ = Documentation.gettext)
+  gettext : function(string) {
+    var translated = Documentation.TRANSLATIONS[string];
+    if (typeof translated == 'undefined')
+      return string;
+    return (typeof translated == 'string') ? translated : translated[0];
+  },
+
+  ngettext : function(singular, plural, n) {
+    var translated = Documentation.TRANSLATIONS[singular];
+    if (typeof translated == 'undefined')
+      return (n == 1) ? singular : plural;
+    return translated[Documentation.PLURALEXPR(n)];
+  },
+
+  addTranslations : function(catalog) {
+    for (var key in catalog.messages)
+      this.TRANSLATIONS[key] = catalog.messages[key];
+    this.PLURAL_EXPR = new Function('n', 'return +(' + catalog.plural_expr + ')');
+    this.LOCALE = catalog.locale;
+  },
+
+  /**
+   * add context elements like header anchor links
+   */
+  addContextElements : function() {
+    $('div[id] > :header:first').each(function() {
+      $('<a class="headerlink">\u00B6</a>').
+      attr('href', '#' + this.id).
+      attr('title', _('Permalink to this headline')).
+      appendTo(this);
+    });
+    $('dt[id]').each(function() {
+      $('<a class="headerlink">\u00B6</a>').
+      attr('href', '#' + this.id).
+      attr('title', _('Permalink to this definition')).
+      appendTo(this);
+    });
+  },
+
+  /**
+   * workaround a firefox stupidity
+   */
+  fixFirefoxAnchorBug : function() {
+    if (document.location.hash && $.browser.mozilla)
+      window.setTimeout(function() {
+        document.location.href += '';
+      }, 10);
+  },
+
+  /**
+   * highlight the search words provided in the url in the text
+   */
+  highlightSearchWords : function() {
+    var params = $.getQueryParameters();
+    var terms = (params.highlight) ? params.highlight[0].split(/\s+/) : [];
+    if (terms.length) {
+      var body = $('div.body');
+      window.setTimeout(function() {
+        $.each(terms, function() {
+          body.highlightText(this.toLowerCase(), 'highlighted');
+        });
+      }, 10);
+      $('<p class="highlight-link"><a href="javascript:Documentation.' +
+        'hideSearchWords()">' + _('Hide Search Matches') + '</a></p>')
+          .appendTo($('#searchbox'));
+    }
+  },
+
+  /**
+   * init the domain index toggle buttons
+   */
+  initIndexTable : function() {
+    var togglers = $('img.toggler').click(function() {
+      var src = $(this).attr('src');
+      var idnum = $(this).attr('id').substr(7);
+      $('tr.cg-' + idnum).toggle();
+      if (src.substr(-9) == 'minus.png')
+        $(this).attr('src', src.substr(0, src.length-9) + 'plus.png');
+      else
+        $(this).attr('src', src.substr(0, src.length-8) + 'minus.png');
+    }).css('display', '');
+    if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) {
+        togglers.click();
+    }
+  },
+
+  /**
+   * helper function to hide the search marks again
+   */
+  hideSearchWords : function() {
+    $('#searchbox .highlight-link').fadeOut(300);
+    $('span.highlighted').removeClass('highlighted');
+  },
+
+  /**
+   * make the url absolute
+   */
+  makeURL : function(relativeURL) {
+    return DOCUMENTATION_OPTIONS.URL_ROOT + '/' + relativeURL;
+  },
+
+  /**
+   * get the current relative url
+   */
+  getCurrentURL : function() {
+    var path = document.location.pathname;
+    var parts = path.split(/\//);
+    $.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\//), function() {
+      if (this == '..')
+        parts.pop();
+    });
+    var url = parts.join('/');
+    return path.substring(url.lastIndexOf('/') + 1, path.length - 1);
+  }
+};
+
+// quick alias for translations
+_ = Documentation.gettext;
+
+$(document).ready(function() {
+  Documentation.init();
+});
diff --git a/docs/html/_static/down-pressed.png b/docs/html/_static/down-pressed.png
new file mode 100644
index 0000000..6f7ad78
Binary files /dev/null and b/docs/html/_static/down-pressed.png differ
diff --git a/docs/html/_static/down.png b/docs/html/_static/down.png
new file mode 100644
index 0000000..3003a88
Binary files /dev/null and b/docs/html/_static/down.png differ
diff --git a/docs/html/_static/file.png b/docs/html/_static/file.png
new file mode 100644
index 0000000..d18082e
Binary files /dev/null and b/docs/html/_static/file.png differ
diff --git a/docs/html/_static/jquery.js b/docs/html/_static/jquery.js
new file mode 100644
index 0000000..981a8a0
--- /dev/null
+++ b/docs/html/_static/jquery.js
@@ -0,0 +1,9404 @@
+/*!
+ * jQuery JavaScript Library v1.7.2
+ * http://jquery.com/
+ *
+ * Copyright 2011, John Resig
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * Includes Sizzle.js
+ * http://sizzlejs.com/
+ * Copyright 2011, The Dojo Foundation
+ * Released under the MIT, BSD, and GPL Licenses.
+ *
+ * Date: Mon Jun  4 13:11:32 UTC 2012
+ */
+(function( window, undefined ) {
+
+// Use the correct document accordingly with window argument (sandbox)
+var document = window.document,
+	navigator = window.navigator,
+	location = window.location;
+var jQuery = (function() {
+
+// Define a local copy of jQuery
+var jQuery = function( selector, context ) {
+		// The jQuery object is actually just the init constructor 'enhanced'
+		return new jQuery.fn.init( selector, context, rootjQuery );
+	},
+
+	// Map over jQuery in case of overwrite
+	_jQuery = window.jQuery,
+
+	// Map over the $ in case of overwrite
+	_$ = window.$,
+
+	// A central reference to the root jQuery(document)
+	rootjQuery,
+
+	// A simple way to check for HTML strings or ID strings
+	// Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
+	quickExpr = /^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,
+
+	// Check if a string has a non-whitespace character in it
+	rnotwhite = /\S/,
+
+	// Used for trimming whitespace
+	trimLeft = /^\s+/,
+	trimRight = /\s+$/,
+
+	// Match a standalone tag
+	rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>)?$/,
+
+	// JSON RegExp
+	rvalidchars = /^[\],:{}\s]*$/,
+	rvalidescape = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,
+	rvalidtokens = /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
+	rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g,
+
+	// Useragent RegExp
+	rwebkit = /(webkit)[ \/]([\w.]+)/,
+	ropera = /(opera)(?:.*version)?[ \/]([\w.]+)/,
+	rmsie = /(msie) ([\w.]+)/,
+	rmozilla = /(mozilla)(?:.*? rv:([\w.]+))?/,
+
+	// Matches dashed string for camelizing
+	rdashAlpha = /-([a-z]|[0-9])/ig,
+	rmsPrefix = /^-ms-/,
+
+	// Used by jQuery.camelCase as callback to replace()
+	fcamelCase = function( all, letter ) {
+		return ( letter + "" ).toUpperCase();
+	},
+
+	// Keep a UserAgent string for use with jQuery.browser
+	userAgent = navigator.userAgent,
+
+	// For matching the engine and version of the browser
+	browserMatch,
+
+	// The deferred used on DOM ready
+	readyList,
+
+	// The ready event handler
+	DOMContentLoaded,
+
+	// Save a reference to some core methods
+	toString = Object.prototype.toString,
+	hasOwn = Object.prototype.hasOwnProperty,
+	push = Array.prototype.push,
+	slice = Array.prototype.slice,
+	trim = String.prototype.trim,
+	indexOf = Array.prototype.indexOf,
+
+	// [[Class]] -> type pairs
+	class2type = {};
+
+jQuery.fn = jQuery.prototype = {
+	constructor: jQuery,
+	init: function( selector, context, rootjQuery ) {
+		var match, elem, ret, doc;
+
+		// Handle $(""), $(null), or $(undefined)
+		if ( !selector ) {
+			return this;
+		}
+
+		// Handle $(DOMElement)
+		if ( selector.nodeType ) {
+			this.context = this[0] = selector;
+			this.length = 1;
+			return this;
+		}
+
+		// The body element only exists once, optimize finding it
+		if ( selector === "body" && !context && document.body ) {
+			this.context = document;
+			this[0] = document.body;
+			this.selector = selector;
+			this.length = 1;
+			return this;
+		}
+
+		// Handle HTML strings
+		if ( typeof selector === "string" ) {
+			// Are we dealing with HTML string or an ID?
+			if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) {
+				// Assume that strings that start and end with <> are HTML and skip the regex check
+				match = [ null, selector, null ];
+
+			} else {
+				match = quickExpr.exec( selector );
+			}
+
+			// Verify a match, and that no context was specified for #id
+			if ( match && (match[1] || !context) ) {
+
+				// HANDLE: $(html) -> $(array)
+				if ( match[1] ) {
+					context = context instanceof jQuery ? context[0] : context;
+					doc = ( context ? context.ownerDocument || context : document );
+
+					// If a single string is passed in and it's a single tag
+					// just do a createElement and skip the rest
+					ret = rsingleTag.exec( selector );
+
+					if ( ret ) {
+						if ( jQuery.isPlainObject( context ) ) {
+							selector = [ document.createElement( ret[1] ) ];
+							jQuery.fn.attr.call( selector, context, true );
+
+						} else {
+							selector = [ doc.createElement( ret[1] ) ];
+						}
+
+					} else {
+						ret = jQuery.buildFragment( [ match[1] ], [ doc ] );
+						selector = ( ret.cacheable ? jQuery.clone(ret.fragment) : ret.fragment ).childNodes;
+					}
+
+					return jQuery.merge( this, selector );
+
+				// HANDLE: $("#id")
+				} else {
+					elem = document.getElementById( match[2] );
+
+					// Check parentNode to catch when Blackberry 4.6 returns
+					// nodes that are no longer in the document #6963
+					if ( elem && elem.parentNode ) {
+						// Handle the case where IE and Opera return items
+						// by name instead of ID
+						if ( elem.id !== match[2] ) {
+							return rootjQuery.find( selector );
+						}
+
+						// Otherwise, we inject the element directly into the jQuery object
+						this.length = 1;
+						this[0] = elem;
+					}
+
+					this.context = document;
+					this.selector = selector;
+					return this;
+				}
+
+			// HANDLE: $(expr, $(...))
+			} else if ( !context || context.jquery ) {
+				return ( context || rootjQuery ).find( selector );
+
+			// HANDLE: $(expr, context)
+			// (which is just equivalent to: $(context).find(expr)
+			} else {
+				return this.constructor( context ).find( selector );
+			}
+
+		// HANDLE: $(function)
+		// Shortcut for document ready
+		} else if ( jQuery.isFunction( selector ) ) {
+			return rootjQuery.ready( selector );
+		}
+
+		if ( selector.selector !== undefined ) {
+			this.selector = selector.selector;
+			this.context = selector.context;
+		}
+
+		return jQuery.makeArray( selector, this );
+	},
+
+	// Start with an empty selector
+	selector: "",
+
+	// The current version of jQuery being used
+	jquery: "1.7.2",
+
+	// The default length of a jQuery object is 0
+	length: 0,
+
+	// The number of elements contained in the matched element set
+	size: function() {
+		return this.length;
+	},
+
+	toArray: function() {
+		return slice.call( this, 0 );
+	},
+
+	// Get the Nth element in the matched element set OR
+	// Get the whole matched element set as a clean array
+	get: function( num ) {
+		return num == null ?
+
+			// Return a 'clean' array
+			this.toArray() :
+
+			// Return just the object
+			( num < 0 ? this[ this.length + num ] : this[ num ] );
+	},
+
+	// Take an array of elements and push it onto the stack
+	// (returning the new matched element set)
+	pushStack: function( elems, name, selector ) {
+		// Build a new jQuery matched element set
+		var ret = this.constructor();
+
+		if ( jQuery.isArray( elems ) ) {
+			push.apply( ret, elems );
+
+		} else {
+			jQuery.merge( ret, elems );
+		}
+
+		// Add the old object onto the stack (as a reference)
+		ret.prevObject = this;
+
+		ret.context = this.context;
+
+		if ( name === "find" ) {
+			ret.selector = this.selector + ( this.selector ? " " : "" ) + selector;
+		} else if ( name ) {
+			ret.selector = this.selector + "." + name + "(" + selector + ")";
+		}
+
+		// Return the newly-formed element set
+		return ret;
+	},
+
+	// Execute a callback for every element in the matched set.
+	// (You can seed the arguments with an array of args, but this is
+	// only used internally.)
+	each: function( callback, args ) {
+		return jQuery.each( this, callback, args );
+	},
+
+	ready: function( fn ) {
+		// Attach the listeners
+		jQuery.bindReady();
+
+		// Add the callback
+		readyList.add( fn );
+
+		return this;
+	},
+
+	eq: function( i ) {
+		i = +i;
+		return i === -1 ?
+			this.slice( i ) :
+			this.slice( i, i + 1 );
+	},
+
+	first: function() {
+		return this.eq( 0 );
+	},
+
+	last: function() {
+		return this.eq( -1 );
+	},
+
+	slice: function() {
+		return this.pushStack( slice.apply( this, arguments ),
+			"slice", slice.call(arguments).join(",") );
+	},
+
+	map: function( callback ) {
+		return this.pushStack( jQuery.map(this, function( elem, i ) {
+			return callback.call( elem, i, elem );
+		}));
+	},
+
+	end: function() {
+		return this.prevObject || this.constructor(null);
+	},
+
+	// For internal use only.
+	// Behaves like an Array's method, not like a jQuery method.
+	push: push,
+	sort: [].sort,
+	splice: [].splice
+};
+
+// Give the init function the jQuery prototype for later instantiation
+jQuery.fn.init.prototype = jQuery.fn;
+
+jQuery.extend = jQuery.fn.extend = function() {
+	var options, name, src, copy, copyIsArray, clone,
+		target = arguments[0] || {},
+		i = 1,
+		length = arguments.length,
+		deep = false;
+
+	// Handle a deep copy situation
+	if ( typeof target === "boolean" ) {
+		deep = target;
+		target = arguments[1] || {};
+		// skip the boolean and the target
+		i = 2;
+	}
+
+	// Handle case when target is a string or something (possible in deep copy)
+	if ( typeof target !== "object" && !jQuery.isFunction(target) ) {
+		target = {};
+	}
+
+	// extend jQuery itself if only one argument is passed
+	if ( length === i ) {
+		target = this;
+		--i;
+	}
+
+	for ( ; i < length; i++ ) {
+		// Only deal with non-null/undefined values
+		if ( (options = arguments[ i ]) != null ) {
+			// Extend the base object
+			for ( name in options ) {
+				src = target[ name ];
+				copy = options[ name ];
+
+				// Prevent never-ending loop
+				if ( target === copy ) {
+					continue;
+				}
+
+				// Recurse if we're merging plain objects or arrays
+				if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) {
+					if ( copyIsArray ) {
+						copyIsArray = false;
+						clone = src && jQuery.isArray(src) ? src : [];
+
+					} else {
+						clone = src && jQuery.isPlainObject(src) ? src : {};
+					}
+
+					// Never move original objects, clone them
+					target[ name ] = jQuery.extend( deep, clone, copy );
+
+				// Don't bring in undefined values
+				} else if ( copy !== undefined ) {
+					target[ name ] = copy;
+				}
+			}
+		}
+	}
+
+	// Return the modified object
+	return target;
+};
+
+jQuery.extend({
+	noConflict: function( deep ) {
+		if ( window.$ === jQuery ) {
+			window.$ = _$;
+		}
+
+		if ( deep && window.jQuery === jQuery ) {
+			window.jQuery = _jQuery;
+		}
+
+		return jQuery;
+	},
+
+	// Is the DOM ready to be used? Set to true once it occurs.
+	isReady: false,
+
+	// A counter to track how many items to wait for before
+	// the ready event fires. See #6781
+	readyWait: 1,
+
+	// Hold (or release) the ready event
+	holdReady: function( hold ) {
+		if ( hold ) {
+			jQuery.readyWait++;
+		} else {
+			jQuery.ready( true );
+		}
+	},
+
+	// Handle when the DOM is ready
+	ready: function( wait ) {
+		// Either a released hold or an DOMready/load event and not yet ready
+		if ( (wait === true && !--jQuery.readyWait) || (wait !== true && !jQuery.isReady) ) {
+			// Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
+			if ( !document.body ) {
+				return setTimeout( jQuery.ready, 1 );
+			}
+
+			// Remember that the DOM is ready
+			jQuery.isReady = true;
+
+			// If a normal DOM Ready event fired, decrement, and wait if need be
+			if ( wait !== true && --jQuery.readyWait > 0 ) {
+				return;
+			}
+
+			// If there are functions bound, to execute
+			readyList.fireWith( document, [ jQuery ] );
+
+			// Trigger any bound ready events
+			if ( jQuery.fn.trigger ) {
+				jQuery( document ).trigger( "ready" ).off( "ready" );
+			}
+		}
+	},
+
+	bindReady: function() {
+		if ( readyList ) {
+			return;
+		}
+
+		readyList = jQuery.Callbacks( "once memory" );
+
+		// Catch cases where $(document).ready() is called after the
+		// browser event has already occurred.
+		if ( document.readyState === "complete" ) {
+			// Handle it asynchronously to allow scripts the opportunity to delay ready
+			return setTimeout( jQuery.ready, 1 );
+		}
+
+		// Mozilla, Opera and webkit nightlies currently support this event
+		if ( document.addEventListener ) {
+			// Use the handy event callback
+			document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false );
+
+			// A fallback to window.onload, that will always work
+			window.addEventListener( "load", jQuery.ready, false );
+
+		// If IE event model is used
+		} else if ( document.attachEvent ) {
+			// ensure firing before onload,
+			// maybe late but safe also for iframes
+			document.attachEvent( "onreadystatechange", DOMContentLoaded );
+
+			// A fallback to window.onload, that will always work
+			window.attachEvent( "onload", jQuery.ready );
+
+			// If IE and not a frame
+			// continually check to see if the document is ready
+			var toplevel = false;
+
+			try {
+				toplevel = window.frameElement == null;
+			} catch(e) {}
+
+			if ( document.documentElement.doScroll && toplevel ) {
+				doScrollCheck();
+			}
+		}
+	},
+
+	// See test/unit/core.js for details concerning isFunction.
+	// Since version 1.3, DOM methods and functions like alert
+	// aren't supported. They return false on IE (#2968).
+	isFunction: function( obj ) {
+		return jQuery.type(obj) === "function";
+	},
+
+	isArray: Array.isArray || function( obj ) {
+		return jQuery.type(obj) === "array";
+	},
+
+	isWindow: function( obj ) {
+		return obj != null && obj == obj.window;
+	},
+
+	isNumeric: function( obj ) {
+		return !isNaN( parseFloat(obj) ) && isFinite( obj );
+	},
+
+	type: function( obj ) {
+		return obj == null ?
+			String( obj ) :
+			class2type[ toString.call(obj) ] || "object";
+	},
+
+	isPlainObject: function( obj ) {
+		// Must be an Object.
+		// Because of IE, we also have to check the presence of the constructor property.
+		// Make sure that DOM nodes and window objects don't pass through, as well
+		if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) {
+			return false;
+		}
+
+		try {
+			// Not own constructor property must be Object
+			if ( obj.constructor &&
+				!hasOwn.call(obj, "constructor") &&
+				!hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) {
+				return false;
+			}
+		} catch ( e ) {
+			// IE8,9 Will throw exceptions on certain host objects #9897
+			return false;
+		}
+
+		// Own properties are enumerated firstly, so to speed up,
+		// if last one is own, then all properties are own.
+
+		var key;
+		for ( key in obj ) {}
+
+		return key === undefined || hasOwn.call( obj, key );
+	},
+
+	isEmptyObject: function( obj ) {
+		for ( var name in obj ) {
+			return false;
+		}
+		return true;
+	},
+
+	error: function( msg ) {
+		throw new Error( msg );
+	},
+
+	parseJSON: function( data ) {
+		if ( typeof data !== "string" || !data ) {
+			return null;
+		}
+
+		// Make sure leading/trailing whitespace is removed (IE can't handle it)
+		data = jQuery.trim( data );
+
+		// Attempt to parse using the native JSON parser first
+		if ( window.JSON && window.JSON.parse ) {
+			return window.JSON.parse( data );
+		}
+
+		// Make sure the incoming data is actual JSON
+		// Logic borrowed from http://json.org/json2.js
+		if ( rvalidchars.test( data.replace( rvalidescape, "@" )
+			.replace( rvalidtokens, "]" )
+			.replace( rvalidbraces, "")) ) {
+
+			return ( new Function( "return " + data ) )();
+
+		}
+		jQuery.error( "Invalid JSON: " + data );
+	},
+
+	// Cross-browser xml parsing
+	parseXML: function( data ) {
+		if ( typeof data !== "string" || !data ) {
+			return null;
+		}
+		var xml, tmp;
+		try {
+			if ( window.DOMParser ) { // Standard
+				tmp = new DOMParser();
+				xml = tmp.parseFromString( data , "text/xml" );
+			} else { // IE
+				xml = new ActiveXObject( "Microsoft.XMLDOM" );
+				xml.async = "false";
+				xml.loadXML( data );
+			}
+		} catch( e ) {
+			xml = undefined;
+		}
+		if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) {
+			jQuery.error( "Invalid XML: " + data );
+		}
+		return xml;
+	},
+
+	noop: function() {},
+
+	// Evaluates a script in a global context
+	// Workarounds based on findings by Jim Driscoll
+	// http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context
+	globalEval: function( data ) {
+		if ( data && rnotwhite.test( data ) ) {
+			// We use execScript on Internet Explorer
+			// We use an anonymous function so that context is window
+			// rather than jQuery in Firefox
+			( window.execScript || function( data ) {
+				window[ "eval" ].call( window, data );
+			} )( data );
+		}
+	},
+
+	// Convert dashed to camelCase; used by the css and data modules
+	// Microsoft forgot to hump their vendor prefix (#9572)
+	camelCase: function( string ) {
+		return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
+	},
+
+	nodeName: function( elem, name ) {
+		return elem.nodeName && elem.nodeName.toUpperCase() === name.toUpperCase();
+	},
+
+	// args is for internal usage only
+	each: function( object, callback, args ) {
+		var name, i = 0,
+			length = object.length,
+			isObj = length === undefined || jQuery.isFunction( object );
+
+		if ( args ) {
+			if ( isObj ) {
+				for ( name in object ) {
+					if ( callback.apply( object[ name ], args ) === false ) {
+						break;
+					}
+				}
+			} else {
+				for ( ; i < length; ) {
+					if ( callback.apply( object[ i++ ], args ) === false ) {
+						break;
+					}
+				}
+			}
+
+		// A special, fast, case for the most common use of each
+		} else {
+			if ( isObj ) {
+				for ( name in object ) {
+					if ( callback.call( object[ name ], name, object[ name ] ) === false ) {
+						break;
+					}
+				}
+			} else {
+				for ( ; i < length; ) {
+					if ( callback.call( object[ i ], i, object[ i++ ] ) === false ) {
+						break;
+					}
+				}
+			}
+		}
+
+		return object;
+	},
+
+	// Use native String.trim function wherever possible
+	trim: trim ?
+		function( text ) {
+			return text == null ?
+				"" :
+				trim.call( text );
+		} :
+
+		// Otherwise use our own trimming functionality
+		function( text ) {
+			return text == null ?
+				"" :
+				text.toString().replace( trimLeft, "" ).replace( trimRight, "" );
+		},
+
+	// results is for internal usage only
+	makeArray: function( array, results ) {
+		var ret = results || [];
+
+		if ( array != null ) {
+			// The window, strings (and functions) also have 'length'
+			// Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930
+			var type = jQuery.type( array );
+
+			if ( array.length == null || type === "string" || type === "function" || type === "regexp" || jQuery.isWindow( array ) ) {
+				push.call( ret, array );
+			} else {
+				jQuery.merge( ret, array );
+			}
+		}
+
+		return ret;
+	},
+
+	inArray: function( elem, array, i ) {
+		var len;
+
+		if ( array ) {
+			if ( indexOf ) {
+				return indexOf.call( array, elem, i );
+			}
+
+			len = array.length;
+			i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0;
+
+			for ( ; i < len; i++ ) {
+				// Skip accessing in sparse arrays
+				if ( i in array && array[ i ] === elem ) {
+					return i;
+				}
+			}
+		}
+
+		return -1;
+	},
+
+	merge: function( first, second ) {
+		var i = first.length,
+			j = 0;
+
+		if ( typeof second.length === "number" ) {
+			for ( var l = second.length; j < l; j++ ) {
+				first[ i++ ] = second[ j ];
+			}
+
+		} else {
+			while ( second[j] !== undefined ) {
+				first[ i++ ] = second[ j++ ];
+			}
+		}
+
+		first.length = i;
+
+		return first;
+	},
+
+	grep: function( elems, callback, inv ) {
+		var ret = [], retVal;
+		inv = !!inv;
+
+		// Go through the array, only saving the items
+		// that pass the validator function
+		for ( var i = 0, length = elems.length; i < length; i++ ) {
+			retVal = !!callback( elems[ i ], i );
+			if ( inv !== retVal ) {
+				ret.push( elems[ i ] );
+			}
+		}
+
+		return ret;
+	},
+
+	// arg is for internal usage only
+	map: function( elems, callback, arg ) {
+		var value, key, ret = [],
+			i = 0,
+			length = elems.length,
+			// jquery objects are treated as arrays
+			isArray = elems instanceof jQuery || length !== undefined && typeof length === "number" && ( ( length > 0 && elems[ 0 ] && elems[ length -1 ] ) || length === 0 || jQuery.isArray( elems ) ) ;
+
+		// Go through the array, translating each of the items to their
+		if ( isArray ) {
+			for ( ; i < length; i++ ) {
+				value = callback( elems[ i ], i, arg );
+
+				if ( value != null ) {
+					ret[ ret.length ] = value;
+				}
+			}
+
+		// Go through every key on the object,
+		} else {
+			for ( key in elems ) {
+				value = callback( elems[ key ], key, arg );
+
+				if ( value != null ) {
+					ret[ ret.length ] = value;
+				}
+			}
+		}
+
+		// Flatten any nested arrays
+		return ret.concat.apply( [], ret );
+	},
+
+	// A global GUID counter for objects
+	guid: 1,
+
+	// Bind a function to a context, optionally partially applying any
+	// arguments.
+	proxy: function( fn, context ) {
+		if ( typeof context === "string" ) {
+			var tmp = fn[ context ];
+			context = fn;
+			fn = tmp;
+		}
+
+		// Quick check to determine if target is callable, in the spec
+		// this throws a TypeError, but we will just return undefined.
+		if ( !jQuery.isFunction( fn ) ) {
+			return undefined;
+		}
+
+		// Simulated bind
+		var args = slice.call( arguments, 2 ),
+			proxy = function() {
+				return fn.apply( context, args.concat( slice.call( arguments ) ) );
+			};
+
+		// Set the guid of unique handler to the same of original handler, so it can be removed
+		proxy.guid = fn.guid = fn.guid || proxy.guid || jQuery.guid++;
+
+		return proxy;
+	},
+
+	// Mutifunctional method to get and set values to a collection
+	// The value/s can optionally be executed if it's a function
+	access: function( elems, fn, key, value, chainable, emptyGet, pass ) {
+		var exec,
+			bulk = key == null,
+			i = 0,
+			length = elems.length;
+
+		// Sets many values
+		if ( key && typeof key === "object" ) {
+			for ( i in key ) {
+				jQuery.access( elems, fn, i, key[i], 1, emptyGet, value );
+			}
+			chainable = 1;
+
+		// Sets one value
+		} else if ( value !== undefined ) {
+			// Optionally, function values get executed if exec is true
+			exec = pass === undefined && jQuery.isFunction( value );
+
+			if ( bulk ) {
+				// Bulk operations only iterate when executing function values
+				if ( exec ) {
+					exec = fn;
+					fn = function( elem, key, value ) {
+						return exec.call( jQuery( elem ), value );
+					};
+
+				// Otherwise they run against the entire set
+				} else {
+					fn.call( elems, value );
+					fn = null;
+				}
+			}
+
+			if ( fn ) {
+				for (; i < length; i++ ) {
+					fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass );
+				}
+			}
+
+			chainable = 1;
+		}
+
+		return chainable ?
+			elems :
+
+			// Gets
+			bulk ?
+				fn.call( elems ) :
+				length ? fn( elems[0], key ) : emptyGet;
+	},
+
+	now: function() {
+		return ( new Date() ).getTime();
+	},
+
+	// Use of jQuery.browser is frowned upon.
+	// More details: http://docs.jquery.com/Utilities/jQuery.browser
+	uaMatch: function( ua ) {
+		ua = ua.toLowerCase();
+
+		var match = rwebkit.exec( ua ) ||
+			ropera.exec( ua ) ||
+			rmsie.exec( ua ) ||
+			ua.indexOf("compatible") < 0 && rmozilla.exec( ua ) ||
+			[];
+
+		return { browser: match[1] || "", version: match[2] || "0" };
+	},
+
+	sub: function() {
+		function jQuerySub( selector, context ) {
+			return new jQuerySub.fn.init( selector, context );
+		}
+		jQuery.extend( true, jQuerySub, this );
+		jQuerySub.superclass = this;
+		jQuerySub.fn = jQuerySub.prototype = this();
+		jQuerySub.fn.constructor = jQuerySub;
+		jQuerySub.sub = this.sub;
+		jQuerySub.fn.init = function init( selector, context ) {
+			if ( context && context instanceof jQuery && !(context instanceof jQuerySub) ) {
+				context = jQuerySub( context );
+			}
+
+			return jQuery.fn.init.call( this, selector, context, rootjQuerySub );
+		};
+		jQuerySub.fn.init.prototype = jQuerySub.fn;
+		var rootjQuerySub = jQuerySub(document);
+		return jQuerySub;
+	},
+
+	browser: {}
+});
+
+// Populate the class2type map
+jQuery.each("Boolean Number String Function Array Date RegExp Object".split(" "), function(i, name) {
+	class2type[ "[object " + name + "]" ] = name.toLowerCase();
+});
+
+browserMatch = jQuery.uaMatch( userAgent );
+if ( browserMatch.browser ) {
+	jQuery.browser[ browserMatch.browser ] = true;
+	jQuery.browser.version = browserMatch.version;
+}
+
+// Deprecated, use jQuery.browser.webkit instead
+if ( jQuery.browser.webkit ) {
+	jQuery.browser.safari = true;
+}
+
+// IE doesn't match non-breaking spaces with \s
+if ( rnotwhite.test( "\xA0" ) ) {
+	trimLeft = /^[\s\xA0]+/;
+	trimRight = /[\s\xA0]+$/;
+}
+
+// All jQuery objects should point back to these
+rootjQuery = jQuery(document);
+
+// Cleanup functions for the document ready method
+if ( document.addEventListener ) {
+	DOMContentLoaded = function() {
+		document.removeEventListener( "DOMContentLoaded", DOMContentLoaded, false );
+		jQuery.ready();
+	};
+
+} else if ( document.attachEvent ) {
+	DOMContentLoaded = function() {
+		// Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
+		if ( document.readyState === "complete" ) {
+			document.detachEvent( "onreadystatechange", DOMContentLoaded );
+			jQuery.ready();
+		}
+	};
+}
+
+// The DOM ready check for Internet Explorer
+function doScrollCheck() {
+	if ( jQuery.isReady ) {
+		return;
+	}
+
+	try {
+		// If IE is used, use the trick by Diego Perini
+		// http://javascript.nwbox.com/IEContentLoaded/
+		document.documentElement.doScroll("left");
+	} catch(e) {
+		setTimeout( doScrollCheck, 1 );
+		return;
+	}
+
+	// and execute any waiting functions
+	jQuery.ready();
+}
+
+return jQuery;
+
+})();
+
+
+// String to Object flags format cache
+var flagsCache = {};
+
+// Convert String-formatted flags into Object-formatted ones and store in cache
+function createFlags( flags ) {
+	var object = flagsCache[ flags ] = {},
+		i, length;
+	flags = flags.split( /\s+/ );
+	for ( i = 0, length = flags.length; i < length; i++ ) {
+		object[ flags[i] ] = true;
+	}
+	return object;
+}
+
+/*
+ * Create a callback list using the following parameters:
+ *
+ *	flags:	an optional list of space-separated flags that will change how
+ *			the callback list behaves
+ *
+ * By default a callback list will act like an event callback list and can be
+ * "fired" multiple times.
+ *
+ * Possible flags:
+ *
+ *	once:			will ensure the callback list can only be fired once (like a Deferred)
+ *
+ *	memory:			will keep track of previous values and will call any callback added
+ *					after the list has been fired right away with the latest "memorized"
+ *					values (like a Deferred)
+ *
+ *	unique:			will ensure a callback can only be added once (no duplicate in the list)
+ *
+ *	stopOnFalse:	interrupt callings when a callback returns false
+ *
+ */
+jQuery.Callbacks = function( flags ) {
+
+	// Convert flags from String-formatted to Object-formatted
+	// (we check in cache first)
+	flags = flags ? ( flagsCache[ flags ] || createFlags( flags ) ) : {};
+
+	var // Actual callback list
+		list = [],
+		// Stack of fire calls for repeatable lists
+		stack = [],
+		// Last fire value (for non-forgettable lists)
+		memory,
+		// Flag to know if list was already fired
+		fired,
+		// Flag to know if list is currently firing
+		firing,
+		// First callback to fire (used internally by add and fireWith)
+		firingStart,
+		// End of the loop when firing
+		firingLength,
+		// Index of currently firing callback (modified by remove if needed)
+		firingIndex,
+		// Add one or several callbacks to the list
+		add = function( args ) {
+			var i,
+				length,
+				elem,
+				type,
+				actual;
+			for ( i = 0, length = args.length; i < length; i++ ) {
+				elem = args[ i ];
+				type = jQuery.type( elem );
+				if ( type === "array" ) {
+					// Inspect recursively
+					add( elem );
+				} else if ( type === "function" ) {
+					// Add if not in unique mode and callback is not in
+					if ( !flags.unique || !self.has( elem ) ) {
+						list.push( elem );
+					}
+				}
+			}
+		},
+		// Fire callbacks
+		fire = function( context, args ) {
+			args = args || [];
+			memory = !flags.memory || [ context, args ];
+			fired = true;
+			firing = true;
+			firingIndex = firingStart || 0;
+			firingStart = 0;
+			firingLength = list.length;
+			for ( ; list && firingIndex < firingLength; firingIndex++ ) {
+				if ( list[ firingIndex ].apply( context, args ) === false && flags.stopOnFalse ) {
+					memory = true; // Mark as halted
+					break;
+				}
+			}
+			firing = false;
+			if ( list ) {
+				if ( !flags.once ) {
+					if ( stack && stack.length ) {
+						memory = stack.shift();
+						self.fireWith( memory[ 0 ], memory[ 1 ] );
+					}
+				} else if ( memory === true ) {
+					self.disable();
+				} else {
+					list = [];
+				}
+			}
+		},
+		// Actual Callbacks object
+		self = {
+			// Add a callback or a collection of callbacks to the list
+			add: function() {
+				if ( list ) {
+					var length = list.length;
+					add( arguments );
+					// Do we need to add the callbacks to the
+					// current firing batch?
+					if ( firing ) {
+						firingLength = list.length;
+					// With memory, if we're not firing then
+					// we should call right away, unless previous
+					// firing was halted (stopOnFalse)
+					} else if ( memory && memory !== true ) {
+						firingStart = length;
+						fire( memory[ 0 ], memory[ 1 ] );
+					}
+				}
+				return this;
+			},
+			// Remove a callback from the list
+			remove: function() {
+				if ( list ) {
+					var args = arguments,
+						argIndex = 0,
+						argLength = args.length;
+					for ( ; argIndex < argLength ; argIndex++ ) {
+						for ( var i = 0; i < list.length; i++ ) {
+							if ( args[ argIndex ] === list[ i ] ) {
+								// Handle firingIndex and firingLength
+								if ( firing ) {
+									if ( i <= firingLength ) {
+										firingLength--;
+										if ( i <= firingIndex ) {
+											firingIndex--;
+										}
+									}
+								}
+								// Remove the element
+								list.splice( i--, 1 );
+								// If we have some unicity property then
+								// we only need to do this once
+								if ( flags.unique ) {
+									break;
+								}
+							}
+						}
+					}
+				}
+				return this;
+			},
+			// Control if a given callback is in the list
+			has: function( fn ) {
+				if ( list ) {
+					var i = 0,
+						length = list.length;
+					for ( ; i < length; i++ ) {
+						if ( fn === list[ i ] ) {
+							return true;
+						}
+					}
+				}
+				return false;
+			},
+			// Remove all callbacks from the list
+			empty: function() {
+				list = [];
+				return this;
+			},
+			// Have the list do nothing anymore
+			disable: function() {
+				list = stack = memory = undefined;
+				return this;
+			},
+			// Is it disabled?
+			disabled: function() {
+				return !list;
+			},
+			// Lock the list in its current state
+			lock: function() {
+				stack = undefined;
+				if ( !memory || memory === true ) {
+					self.disable();
+				}
+				return this;
+			},
+			// Is it locked?
+			locked: function() {
+				return !stack;
+			},
+			// Call all callbacks with the given context and arguments
+			fireWith: function( context, args ) {
+				if ( stack ) {
+					if ( firing ) {
+						if ( !flags.once ) {
+							stack.push( [ context, args ] );
+						}
+					} else if ( !( flags.once && memory ) ) {
+						fire( context, args );
+					}
+				}
+				return this;
+			},
+			// Call all the callbacks with the given arguments
+			fire: function() {
+				self.fireWith( this, arguments );
+				return this;
+			},
+			// To know if the callbacks have already been called at least once
+			fired: function() {
+				return !!fired;
+			}
+		};
+
+	return self;
+};
+
+
+
+
+var // Static reference to slice
+	sliceDeferred = [].slice;
+
+jQuery.extend({
+
+	Deferred: function( func ) {
+		var doneList = jQuery.Callbacks( "once memory" ),
+			failList = jQuery.Callbacks( "once memory" ),
+			progressList = jQuery.Callbacks( "memory" ),
+			state = "pending",
+			lists = {
+				resolve: doneList,
+				reject: failList,
+				notify: progressList
+			},
+			promise = {
+				done: doneList.add,
+				fail: failList.add,
+				progress: progressList.add,
+
+				state: function() {
+					return state;
+				},
+
+				// Deprecated
+				isResolved: doneList.fired,
+				isRejected: failList.fired,
+
+				then: function( doneCallbacks, failCallbacks, progressCallbacks ) {
+					deferred.done( doneCallbacks ).fail( failCallbacks ).progress( progressCallbacks );
+					return this;
+				},
+				always: function() {
+					deferred.done.apply( deferred, arguments ).fail.apply( deferred, arguments );
+					return this;
+				},
+				pipe: function( fnDone, fnFail, fnProgress ) {
+					return jQuery.Deferred(function( newDefer ) {
+						jQuery.each( {
+							done: [ fnDone, "resolve" ],
+							fail: [ fnFail, "reject" ],
+							progress: [ fnProgress, "notify" ]
+						}, function( handler, data ) {
+							var fn = data[ 0 ],
+								action = data[ 1 ],
+								returned;
+							if ( jQuery.isFunction( fn ) ) {
+								deferred[ handler ](function() {
+									returned = fn.apply( this, arguments );
+									if ( returned && jQuery.isFunction( returned.promise ) ) {
+										returned.promise().then( newDefer.resolve, newDefer.reject, newDefer.notify );
+									} else {
+										newDefer[ action + "With" ]( this === deferred ? newDefer : this, [ returned ] );
+									}
+								});
+							} else {
+								deferred[ handler ]( newDefer[ action ] );
+							}
+						});
+					}).promise();
+				},
+				// Get a promise for this deferred
+				// If obj is provided, the promise aspect is added to the object
+				promise: function( obj ) {
+					if ( obj == null ) {
+						obj = promise;
+					} else {
+						for ( var key in promise ) {
+							obj[ key ] = promise[ key ];
+						}
+					}
+					return obj;
+				}
+			},
+			deferred = promise.promise({}),
+			key;
+
+		for ( key in lists ) {
+			deferred[ key ] = lists[ key ].fire;
+			deferred[ key + "With" ] = lists[ key ].fireWith;
+		}
+
+		// Handle state
+		deferred.done( function() {
+			state = "resolved";
+		}, failList.disable, progressList.lock ).fail( function() {
+			state = "rejected";
+		}, doneList.disable, progressList.lock );
+
+		// Call given func if any
+		if ( func ) {
+			func.call( deferred, deferred );
+		}
+
+		// All done!
+		return deferred;
+	},
+
+	// Deferred helper
+	when: function( firstParam ) {
+		var args = sliceDeferred.call( arguments, 0 ),
+			i = 0,
+			length = args.length,
+			pValues = new Array( length ),
+			count = length,
+			pCount = length,
+			deferred = length <= 1 && firstParam && jQuery.isFunction( firstParam.promise ) ?
+				firstParam :
+				jQuery.Deferred(),
+			promise = deferred.promise();
+		function resolveFunc( i ) {
+			return function( value ) {
+				args[ i ] = arguments.length > 1 ? sliceDeferred.call( arguments, 0 ) : value;
+				if ( !( --count ) ) {
+					deferred.resolveWith( deferred, args );
+				}
+			};
+		}
+		function progressFunc( i ) {
+			return function( value ) {
+				pValues[ i ] = arguments.length > 1 ? sliceDeferred.call( arguments, 0 ) : value;
+				deferred.notifyWith( promise, pValues );
+			};
+		}
+		if ( length > 1 ) {
+			for ( ; i < length; i++ ) {
+				if ( args[ i ] && args[ i ].promise && jQuery.isFunction( args[ i ].promise ) ) {
+					args[ i ].promise().then( resolveFunc(i), deferred.reject, progressFunc(i) );
+				} else {
+					--count;
+				}
+			}
+			if ( !count ) {
+				deferred.resolveWith( deferred, args );
+			}
+		} else if ( deferred !== firstParam ) {
+			deferred.resolveWith( deferred, length ? [ firstParam ] : [] );
+		}
+		return promise;
+	}
+});
+
+
+
+
+jQuery.support = (function() {
+
+	var support,
+		all,
+		a,
+		select,
+		opt,
+		input,
+		fragment,
+		tds,
+		events,
+		eventName,
+		i,
+		isSupported,
+		div = document.createElement( "div" ),
+		documentElement = document.documentElement;
+
+	// Preliminary tests
+	div.setAttribute("className", "t");
+	div.innerHTML = "   <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>";
+
+	all = div.getElementsByTagName( "*" );
+	a = div.getElementsByTagName( "a" )[ 0 ];
+
+	// Can't get basic test support
+	if ( !all || !all.length || !a ) {
+		return {};
+	}
+
+	// First batch of supports tests
+	select = document.createElement( "select" );
+	opt = select.appendChild( document.createElement("option") );
+	input = div.getElementsByTagName( "input" )[ 0 ];
+
+	support = {
+		// IE strips leading whitespace when .innerHTML is used
+		leadingWhitespace: ( div.firstChild.nodeType === 3 ),
+
+		// Make sure that tbody elements aren't automatically inserted
+		// IE will insert them into empty tables
+		tbody: !div.getElementsByTagName("tbody").length,
+
+		// Make sure that link elements get serialized correctly by innerHTML
+		// This requires a wrapper element in IE
+		htmlSerialize: !!div.getElementsByTagName("link").length,
+
+		// Get the style information from getAttribute
+		// (IE uses .cssText instead)
+		style: /top/.test( a.getAttribute("style") ),
+
+		// Make sure that URLs aren't manipulated
+		// (IE normalizes it by default)
+		hrefNormalized: ( a.getAttribute("href") === "/a" ),
+
+		// Make sure that element opacity exists
+		// (IE uses filter instead)
+		// Use a regex to work around a WebKit issue. See #5145
+		opacity: /^0.55/.test( a.style.opacity ),
+
+		// Verify style float existence
+		// (IE uses styleFloat instead of cssFloat)
+		cssFloat: !!a.style.cssFloat,
+
+		// Make sure that if no value is specified for a checkbox
+		// that it defaults to "on".
+		// (WebKit defaults to "" instead)
+		checkOn: ( input.value === "on" ),
+
+		// Make sure that a selected-by-default option has a working selected property.
+		// (WebKit defaults to false instead of true, IE too, if it's in an optgroup)
+		optSelected: opt.selected,
+
+		// Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7)
+		getSetAttribute: div.className !== "t",
+
+		// Tests for enctype support on a form(#6743)
+		enctype: !!document.createElement("form").enctype,
+
+		// Makes sure cloning an html5 element does not cause problems
+		// Where outerHTML is undefined, this still works
+		html5Clone: document.createElement("nav").cloneNode( true ).outerHTML !== "<:nav></:nav>",
+
+		// Will be defined later
+		submitBubbles: true,
+		changeBubbles: true,
+		focusinBubbles: false,
+		deleteExpando: true,
+		noCloneEvent: true,
+		inlineBlockNeedsLayout: false,
+		shrinkWrapBlocks: false,
+		reliableMarginRight: true,
+		pixelMargin: true
+	};
+
+	// jQuery.boxModel DEPRECATED in 1.3, use jQuery.support.boxModel instead
+	jQuery.boxModel = support.boxModel = (document.compatMode === "CSS1Compat");
+
+	// Make sure checked status is properly cloned
+	input.checked = true;
+	support.noCloneChecked = input.cloneNode( true ).checked;
+
+	// Make sure that the options inside disabled selects aren't marked as disabled
+	// (WebKit marks them as disabled)
+	select.disabled = true;
+	support.optDisabled = !opt.disabled;
+
+	// Test to see if it's possible to delete an expando from an element
+	// Fails in Internet Explorer
+	try {
+		delete div.test;
+	} catch( e ) {
+		support.deleteExpando = false;
+	}
+
+	if ( !div.addEventListener && div.attachEvent && div.fireEvent ) {
+		div.attachEvent( "onclick", function() {
+			// Cloning a node shouldn't copy over any
+			// bound event handlers (IE does this)
+			support.noCloneEvent = false;
+		});
+		div.cloneNode( true ).fireEvent( "onclick" );
+	}
+
+	// Check if a radio maintains its value
+	// after being appended to the DOM
+	input = document.createElement("input");
+	input.value = "t";
+	input.setAttribute("type", "radio");
+	support.radioValue = input.value === "t";
+
+	input.setAttribute("checked", "checked");
+
+	// #11217 - WebKit loses check when the name is after the checked attribute
+	input.setAttribute( "name", "t" );
+
+	div.appendChild( input );
+	fragment = document.createDocumentFragment();
+	fragment.appendChild( div.lastChild );
+
+	// WebKit doesn't clone checked state correctly in fragments
+	support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked;
+
+	// Check if a disconnected checkbox will retain its checked
+	// value of true after appended to the DOM (IE6/7)
+	support.appendChecked = input.checked;
+
+	fragment.removeChild( input );
+	fragment.appendChild( div );
+
+	// Technique from Juriy Zaytsev
+	// http://perfectionkills.com/detecting-event-support-without-browser-sniffing/
+	// We only care about the case where non-standard event systems
+	// are used, namely in IE. Short-circuiting here helps us to
+	// avoid an eval call (in setAttribute) which can cause CSP
+	// to go haywire. See: https://developer.mozilla.org/en/Security/CSP
+	if ( div.attachEvent ) {
+		for ( i in {
+			submit: 1,
+			change: 1,
+			focusin: 1
+		}) {
+			eventName = "on" + i;
+			isSupported = ( eventName in div );
+			if ( !isSupported ) {
+				div.setAttribute( eventName, "return;" );
+				isSupported = ( typeof div[ eventName ] === "function" );
+			}
+			support[ i + "Bubbles" ] = isSupported;
+		}
+	}
+
+	fragment.removeChild( div );
+
+	// Null elements to avoid leaks in IE
+	fragment = select = opt = div = input = null;
+
+	// Run tests that need a body at doc ready
+	jQuery(function() {
+		var container, outer, inner, table, td, offsetSupport,
+			marginDiv, conMarginTop, style, html, positionTopLeftWidthHeight,
+			paddingMarginBorderVisibility, paddingMarginBorder,
+			body = document.getElementsByTagName("body")[0];
+
+		if ( !body ) {
+			// Return for frameset docs that don't have a body
+			return;
+		}
+
+		conMarginTop = 1;
+		paddingMarginBorder = "padding:0;margin:0;border:";
+		positionTopLeftWidthHeight = "position:absolute;top:0;left:0;width:1px;height:1px;";
+		paddingMarginBorderVisibility = paddingMarginBorder + "0;visibility:hidden;";
+		style = "style='" + positionTopLeftWidthHeight + paddingMarginBorder + "5px solid #000;";
+		html = "<div " + style + "display:block;'><div style='" + paddingMarginBorder + "0;display:block;overflow:hidden;'></div></div>" +
+			"<table " + style + "' cellpadding='0' cellspacing='0'>" +
+			"<tr><td></td></tr></table>";
+
+		container = document.createElement("div");
+		container.style.cssText = paddingMarginBorderVisibility + "width:0;height:0;position:static;top:0;margin-top:" + conMarginTop + "px";
+		body.insertBefore( container, body.firstChild );
+
+		// Construct the test element
+		div = document.createElement("div");
+		container.appendChild( div );
+
+		// Check if table cells still have offsetWidth/Height when they are set
+		// to display:none and there are still other visible table cells in a
+		// table row; if so, offsetWidth/Height are not reliable for use when
+		// determining if an element has been hidden directly using
+		// display:none (it is still safe to use offsets if a parent element is
+		// hidden; don safety goggles and see bug #4512 for more information).
+		// (only IE 8 fails this test)
+		div.innerHTML = "<table><tr><td style='" + paddingMarginBorder + "0;display:none'></td><td>t</td></tr></table>";
+		tds = div.getElementsByTagName( "td" );
+		isSupported = ( tds[ 0 ].offsetHeight === 0 );
+
+		tds[ 0 ].style.display = "";
+		tds[ 1 ].style.display = "none";
+
+		// Check if empty table cells still have offsetWidth/Height
+		// (IE <= 8 fail this test)
+		support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 );
+
+		// Check if div with explicit width and no margin-right incorrectly
+		// gets computed margin-right based on width of container. For more
+		// info see bug #3333
+		// Fails in WebKit before Feb 2011 nightlies
+		// WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
+		if ( window.getComputedStyle ) {
+			div.innerHTML = "";
+			marginDiv = document.createElement( "div" );
+			marginDiv.style.width = "0";
+			marginDiv.style.marginRight = "0";
+			div.style.width = "2px";
+			div.appendChild( marginDiv );
+			support.reliableMarginRight =
+				( parseInt( ( window.getComputedStyle( marginDiv, null ) || { marginRight: 0 } ).marginRight, 10 ) || 0 ) === 0;
+		}
+
+		if ( typeof div.style.zoom !== "undefined" ) {
+			// Check if natively block-level elements act like inline-block
+			// elements when setting their display to 'inline' and giving
+			// them layout
+			// (IE < 8 does this)
+			div.innerHTML = "";
+			div.style.width = div.style.padding = "1px";
+			div.style.border = 0;
+			div.style.overflow = "hidden";
+			div.style.display = "inline";
+			div.style.zoom = 1;
+			support.inlineBlockNeedsLayout = ( div.offsetWidth === 3 );
+
+			// Check if elements with layout shrink-wrap their children
+			// (IE 6 does this)
+			div.style.display = "block";
+			div.style.overflow = "visible";
+			div.innerHTML = "<div style='width:5px;'></div>";
+			support.shrinkWrapBlocks = ( div.offsetWidth !== 3 );
+		}
+
+		div.style.cssText = positionTopLeftWidthHeight + paddingMarginBorderVisibility;
+		div.innerHTML = html;
+
+		outer = div.firstChild;
+		inner = outer.firstChild;
+		td = outer.nextSibling.firstChild.firstChild;
+
+		offsetSupport = {
+			doesNotAddBorder: ( inner.offsetTop !== 5 ),
+			doesAddBorderForTableAndCells: ( td.offsetTop === 5 )
+		};
+
+		inner.style.position = "fixed";
+		inner.style.top = "20px";
+
+		// safari subtracts parent border width here which is 5px
+		offsetSupport.fixedPosition = ( inner.offsetTop === 20 || inner.offsetTop === 15 );
+		inner.style.position = inner.style.top = "";
+
+		outer.style.overflow = "hidden";
+		outer.style.position = "relative";
+
+		offsetSupport.subtractsBorderForOverflowNotVisible = ( inner.offsetTop === -5 );
+		offsetSupport.doesNotIncludeMarginInBodyOffset = ( body.offsetTop !== conMarginTop );
+
+		if ( window.getComputedStyle ) {
+			div.style.marginTop = "1%";
+			support.pixelMargin = ( window.getComputedStyle( div, null ) || { marginTop: 0 } ).marginTop !== "1%";
+		}
+
+		if ( typeof container.style.zoom !== "undefined" ) {
+			container.style.zoom = 1;
+		}
+
+		body.removeChild( container );
+		marginDiv = div = container = null;
+
+		jQuery.extend( support, offsetSupport );
+	});
+
+	return support;
+})();
+
+
+
+
+var rbrace = /^(?:\{.*\}|\[.*\])$/,
+	rmultiDash = /([A-Z])/g;
+
+jQuery.extend({
+	cache: {},
+
+	// Please use with caution
+	uuid: 0,
+
+	// Unique for each copy of jQuery on the page
+	// Non-digits removed to match rinlinejQuery
+	expando: "jQuery" + ( jQuery.fn.jquery + Math.random() ).replace( /\D/g, "" ),
+
+	// The following elements throw uncatchable exceptions if you
+	// attempt to add expando properties to them.
+	noData: {
+		"embed": true,
+		// Ban all objects except for Flash (which handle expandos)
+		"object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",
+		"applet": true
+	},
+
+	hasData: function( elem ) {
+		elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ];
+		return !!elem && !isEmptyDataObject( elem );
+	},
+
+	data: function( elem, name, data, pvt /* Internal Use Only */ ) {
+		if ( !jQuery.acceptData( elem ) ) {
+			return;
+		}
+
+		var privateCache, thisCache, ret,
+			internalKey = jQuery.expando,
+			getByName = typeof name === "string",
+
+			// We have to handle DOM nodes and JS objects differently because IE6-7
+			// can't GC object references properly across the DOM-JS boundary
+			isNode = elem.nodeType,
+
+			// Only DOM nodes need the global jQuery cache; JS object data is
+			// attached directly to the object so GC can occur automatically
+			cache = isNode ? jQuery.cache : elem,
+
+			// Only defining an ID for JS objects if its cache already exists allows
+			// the code to shortcut on the same path as a DOM node with no cache
+			id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey,
+			isEvents = name === "events";
+
+		// Avoid doing any more work than we need to when trying to get data on an
+		// object that has no data at all
+		if ( (!id || !cache[id] || (!isEvents && !pvt && !cache[id].data)) && getByName && data === undefined ) {
+			return;
+		}
+
+		if ( !id ) {
+			// Only DOM nodes need a new unique ID for each element since their data
+			// ends up in the global cache
+			if ( isNode ) {
+				elem[ internalKey ] = id = ++jQuery.uuid;
+			} else {
+				id = internalKey;
+			}
+		}
+
+		if ( !cache[ id ] ) {
+			cache[ id ] = {};
+
+			// Avoids exposing jQuery metadata on plain JS objects when the object
+			// is serialized using JSON.stringify
+			if ( !isNode ) {
+				cache[ id ].toJSON = jQuery.noop;
+			}
+		}
+
+		// An object can be passed to jQuery.data instead of a key/value pair; this gets
+		// shallow copied over onto the existing cache
+		if ( typeof name === "object" || typeof name === "function" ) {
+			if ( pvt ) {
+				cache[ id ] = jQuery.extend( cache[ id ], name );
+			} else {
+				cache[ id ].data = jQuery.extend( cache[ id ].data, name );
+			}
+		}
+
+		privateCache = thisCache = cache[ id ];
+
+		// jQuery data() is stored in a separate object inside the object's internal data
+		// cache in order to avoid key collisions between internal data and user-defined
+		// data.
+		if ( !pvt ) {
+			if ( !thisCache.data ) {
+				thisCache.data = {};
+			}
+
+			thisCache = thisCache.data;
+		}
+
+		if ( data !== undefined ) {
+			thisCache[ jQuery.camelCase( name ) ] = data;
+		}
+
+		// Users should not attempt to inspect the internal events object using jQuery.data,
+		// it is undocumented and subject to change. But does anyone listen? No.
+		if ( isEvents && !thisCache[ name ] ) {
+			return privateCache.events;
+		}
+
+		// Check for both converted-to-camel and non-converted data property names
+		// If a data property was specified
+		if ( getByName ) {
+
+			// First Try to find as-is property data
+			ret = thisCache[ name ];
+
+			// Test for null|undefined property data
+			if ( ret == null ) {
+
+				// Try to find the camelCased property
+				ret = thisCache[ jQuery.camelCase( name ) ];
+			}
+		} else {
+			ret = thisCache;
+		}
+
+		return ret;
+	},
+
+	removeData: function( elem, name, pvt /* Internal Use Only */ ) {
+		if ( !jQuery.acceptData( elem ) ) {
+			return;
+		}
+
+		var thisCache, i, l,
+
+			// Reference to internal data cache key
+			internalKey = jQuery.expando,
+
+			isNode = elem.nodeType,
+
+			// See jQuery.data for more information
+			cache = isNode ? jQuery.cache : elem,
+
+			// See jQuery.data for more information
+			id = isNode ? elem[ internalKey ] : internalKey;
+
+		// If there is already no cache entry for this object, there is no
+		// purpose in continuing
+		if ( !cache[ id ] ) {
+			return;
+		}
+
+		if ( name ) {
+
+			thisCache = pvt ? cache[ id ] : cache[ id ].data;
+
+			if ( thisCache ) {
+
+				// Support array or space separated string names for data keys
+				if ( !jQuery.isArray( name ) ) {
+
+					// try the string as a key before any manipulation
+					if ( name in thisCache ) {
+						name = [ name ];
+					} else {
+
+						// split the camel cased version by spaces unless a key with the spaces exists
+						name = jQuery.camelCase( name );
+						if ( name in thisCache ) {
+							name = [ name ];
+						} else {
+							name = name.split( " " );
+						}
+					}
+				}
+
+				for ( i = 0, l = name.length; i < l; i++ ) {
+					delete thisCache[ name[i] ];
+				}
+
+				// If there is no data left in the cache, we want to continue
+				// and let the cache object itself get destroyed
+				if ( !( pvt ? isEmptyDataObject : jQuery.isEmptyObject )( thisCache ) ) {
+					return;
+				}
+			}
+		}
+
+		// See jQuery.data for more information
+		if ( !pvt ) {
+			delete cache[ id ].data;
+
+			// Don't destroy the parent cache unless the internal data object
+			// had been the only thing left in it
+			if ( !isEmptyDataObject(cache[ id ]) ) {
+				return;
+			}
+		}
+
+		// Browsers that fail expando deletion also refuse to delete expandos on
+		// the window, but it will allow it on all other JS objects; other browsers
+		// don't care
+		// Ensure that `cache` is not a window object #10080
+		if ( jQuery.support.deleteExpando || !cache.setInterval ) {
+			delete cache[ id ];
+		} else {
+			cache[ id ] = null;
+		}
+
+		// We destroyed the cache and need to eliminate the expando on the node to avoid
+		// false lookups in the cache for entries that no longer exist
+		if ( isNode ) {
+			// IE does not allow us to delete expando properties from nodes,
+			// nor does it have a removeAttribute function on Document nodes;
+			// we must handle all of these cases
+			if ( jQuery.support.deleteExpando ) {
+				delete elem[ internalKey ];
+			} else if ( elem.removeAttribute ) {
+				elem.removeAttribute( internalKey );
+			} else {
+				elem[ internalKey ] = null;
+			}
+		}
+	},
+
+	// For internal use only.
+	_data: function( elem, name, data ) {
+		return jQuery.data( elem, name, data, true );
+	},
+
+	// A method for determining if a DOM node can handle the data expando
+	acceptData: function( elem ) {
+		if ( elem.nodeName ) {
+			var match = jQuery.noData[ elem.nodeName.toLowerCase() ];
+
+			if ( match ) {
+				return !(match === true || elem.getAttribute("classid") !== match);
+			}
+		}
+
+		return true;
+	}
+});
+
+jQuery.fn.extend({
+	data: function( key, value ) {
+		var parts, part, attr, name, l,
+			elem = this[0],
+			i = 0,
+			data = null;
+
+		// Gets all values
+		if ( key === undefined ) {
+			if ( this.length ) {
+				data = jQuery.data( elem );
+
+				if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) {
+					attr = elem.attributes;
+					for ( l = attr.length; i < l; i++ ) {
+						name = attr[i].name;
+
+						if ( name.indexOf( "data-" ) === 0 ) {
+							name = jQuery.camelCase( name.substring(5) );
+
+							dataAttr( elem, name, data[ name ] );
+						}
+					}
+					jQuery._data( elem, "parsedAttrs", true );
+				}
+			}
+
+			return data;
+		}
+
+		// Sets multiple values
+		if ( typeof key === "object" ) {
+			return this.each(function() {
+				jQuery.data( this, key );
+			});
+		}
+
+		parts = key.split( ".", 2 );
+		parts[1] = parts[1] ? "." + parts[1] : "";
+		part = parts[1] + "!";
+
+		return jQuery.access( this, function( value ) {
+
+			if ( value === undefined ) {
+				data = this.triggerHandler( "getData" + part, [ parts[0] ] );
+
+				// Try to fetch any internally stored data first
+				if ( data === undefined && elem ) {
+					data = jQuery.data( elem, key );
+					data = dataAttr( elem, key, data );
+				}
+
+				return data === undefined && parts[1] ?
+					this.data( parts[0] ) :
+					data;
+			}
+
+			parts[1] = value;
+			this.each(function() {
+				var self = jQuery( this );
+
+				self.triggerHandler( "setData" + part, parts );
+				jQuery.data( this, key, value );
+				self.triggerHandler( "changeData" + part, parts );
+			});
+		}, null, value, arguments.length > 1, null, false );
+	},
+
+	removeData: function( key ) {
+		return this.each(function() {
+			jQuery.removeData( this, key );
+		});
+	}
+});
+
+function dataAttr( elem, key, data ) {
+	// If nothing was found internally, try to fetch any
+	// data from the HTML5 data-* attribute
+	if ( data === undefined && elem.nodeType === 1 ) {
+
+		var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase();
+
+		data = elem.getAttribute( name );
+
+		if ( typeof data === "string" ) {
+			try {
+				data = data === "true" ? true :
+				data === "false" ? false :
+				data === "null" ? null :
+				jQuery.isNumeric( data ) ? +data :
+					rbrace.test( data ) ? jQuery.parseJSON( data ) :
+					data;
+			} catch( e ) {}
+
+			// Make sure we set the data so it isn't changed later
+			jQuery.data( elem, key, data );
+
+		} else {
+			data = undefined;
+		}
+	}
+
+	return data;
+}
+
+// checks a cache object for emptiness
+function isEmptyDataObject( obj ) {
+	for ( var name in obj ) {
+
+		// if the public data object is empty, the private is still empty
+		if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) {
+			continue;
+		}
+		if ( name !== "toJSON" ) {
+			return false;
+		}
+	}
+
+	return true;
+}
+
+
+
+
+function handleQueueMarkDefer( elem, type, src ) {
+	var deferDataKey = type + "defer",
+		queueDataKey = type + "queue",
+		markDataKey = type + "mark",
+		defer = jQuery._data( elem, deferDataKey );
+	if ( defer &&
+		( src === "queue" || !jQuery._data(elem, queueDataKey) ) &&
+		( src === "mark" || !jQuery._data(elem, markDataKey) ) ) {
+		// Give room for hard-coded callbacks to fire first
+		// and eventually mark/queue something else on the element
+		setTimeout( function() {
+			if ( !jQuery._data( elem, queueDataKey ) &&
+				!jQuery._data( elem, markDataKey ) ) {
+				jQuery.removeData( elem, deferDataKey, true );
+				defer.fire();
+			}
+		}, 0 );
+	}
+}
+
+jQuery.extend({
+
+	_mark: function( elem, type ) {
+		if ( elem ) {
+			type = ( type || "fx" ) + "mark";
+			jQuery._data( elem, type, (jQuery._data( elem, type ) || 0) + 1 );
+		}
+	},
+
+	_unmark: function( force, elem, type ) {
+		if ( force !== true ) {
+			type = elem;
+			elem = force;
+			force = false;
+		}
+		if ( elem ) {
+			type = type || "fx";
+			var key = type + "mark",
+				count = force ? 0 : ( (jQuery._data( elem, key ) || 1) - 1 );
+			if ( count ) {
+				jQuery._data( elem, key, count );
+			} else {
+				jQuery.removeData( elem, key, true );
+				handleQueueMarkDefer( elem, type, "mark" );
+			}
+		}
+	},
+
+	queue: function( elem, type, data ) {
+		var q;
+		if ( elem ) {
+			type = ( type || "fx" ) + "queue";
+			q = jQuery._data( elem, type );
+
+			// Speed up dequeue by getting out quickly if this is just a lookup
+			if ( data ) {
+				if ( !q || jQuery.isArray(data) ) {
+					q = jQuery._data( elem, type, jQuery.makeArray(data) );
+				} else {
+					q.push( data );
+				}
+			}
+			return q || [];
+		}
+	},
+
+	dequeue: function( elem, type ) {
+		type = type || "fx";
+
+		var queue = jQuery.queue( elem, type ),
+			fn = queue.shift(),
+			hooks = {};
+
+		// If the fx queue is dequeued, always remove the progress sentinel
+		if ( fn === "inprogress" ) {
+			fn = queue.shift();
+		}
+
+		if ( fn ) {
+			// Add a progress sentinel to prevent the fx queue from being
+			// automatically dequeued
+			if ( type === "fx" ) {
+				queue.unshift( "inprogress" );
+			}
+
+			jQuery._data( elem, type + ".run", hooks );
+			fn.call( elem, function() {
+				jQuery.dequeue( elem, type );
+			}, hooks );
+		}
+
+		if ( !queue.length ) {
+			jQuery.removeData( elem, type + "queue " + type + ".run", true );
+			handleQueueMarkDefer( elem, type, "queue" );
+		}
+	}
+});
+
+jQuery.fn.extend({
+	queue: function( type, data ) {
+		var setter = 2;
+
+		if ( typeof type !== "string" ) {
+			data = type;
+			type = "fx";
+			setter--;
+		}
+
+		if ( arguments.length < setter ) {
+			return jQuery.queue( this[0], type );
+		}
+
+		return data === undefined ?
+			this :
+			this.each(function() {
+				var queue = jQuery.queue( this, type, data );
+
+				if ( type === "fx" && queue[0] !== "inprogress" ) {
+					jQuery.dequeue( this, type );
+				}
+			});
+	},
+	dequeue: function( type ) {
+		return this.each(function() {
+			jQuery.dequeue( this, type );
+		});
+	},
+	// Based off of the plugin by Clint Helfers, with permission.
+	// http://blindsignals.com/index.php/2009/07/jquery-delay/
+	delay: function( time, type ) {
+		time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;
+		type = type || "fx";
+
+		return this.queue( type, function( next, hooks ) {
+			var timeout = setTimeout( next, time );
+			hooks.stop = function() {
+				clearTimeout( timeout );
+			};
+		});
+	},
+	clearQueue: function( type ) {
+		return this.queue( type || "fx", [] );
+	},
+	// Get a promise resolved when queues of a certain type
+	// are emptied (fx is the type by default)
+	promise: function( type, object ) {
+		if ( typeof type !== "string" ) {
+			object = type;
+			type = undefined;
+		}
+		type = type || "fx";
+		var defer = jQuery.Deferred(),
+			elements = this,
+			i = elements.length,
+			count = 1,
+			deferDataKey = type + "defer",
+			queueDataKey = type + "queue",
+			markDataKey = type + "mark",
+			tmp;
+		function resolve() {
+			if ( !( --count ) ) {
+				defer.resolveWith( elements, [ elements ] );
+			}
+		}
+		while( i-- ) {
+			if (( tmp = jQuery.data( elements[ i ], deferDataKey, undefined, true ) ||
+					( jQuery.data( elements[ i ], queueDataKey, undefined, true ) ||
+						jQuery.data( elements[ i ], markDataKey, undefined, true ) ) &&
+					jQuery.data( elements[ i ], deferDataKey, jQuery.Callbacks( "once memory" ), true ) )) {
+				count++;
+				tmp.add( resolve );
+			}
+		}
+		resolve();
+		return defer.promise( object );
+	}
+});
+
+
+
+
+var rclass = /[\n\t\r]/g,
+	rspace = /\s+/,
+	rreturn = /\r/g,
+	rtype = /^(?:button|input)$/i,
+	rfocusable = /^(?:button|input|object|select|textarea)$/i,
+	rclickable = /^a(?:rea)?$/i,
+	rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,
+	getSetAttribute = jQuery.support.getSetAttribute,
+	nodeHook, boolHook, fixSpecified;
+
+jQuery.fn.extend({
+	attr: function( name, value ) {
+		return jQuery.access( this, jQuery.attr, name, value, arguments.length > 1 );
+	},
+
+	removeAttr: function( name ) {
+		return this.each(function() {
+			jQuery.removeAttr( this, name );
+		});
+	},
+
+	prop: function( name, value ) {
+		return jQuery.access( this, jQuery.prop, name, value, arguments.length > 1 );
+	},
+
+	removeProp: function( name ) {
+		name = jQuery.propFix[ name ] || name;
+		return this.each(function() {
+			// try/catch handles cases where IE balks (such as removing a property on window)
+			try {
+				this[ name ] = undefined;
+				delete this[ name ];
+			} catch( e ) {}
+		});
+	},
+
+	addClass: function( value ) {
+		var classNames, i, l, elem,
+			setClass, c, cl;
+
+		if ( jQuery.isFunction( value ) ) {
+			return this.each(function( j ) {
+				jQuery( this ).addClass( value.call(this, j, this.className) );
+			});
+		}
+
+		if ( value && typeof value === "string" ) {
+			classNames = value.split( rspace );
+
+			for ( i = 0, l = this.length; i < l; i++ ) {
+				elem = this[ i ];
+
+				if ( elem.nodeType === 1 ) {
+					if ( !elem.className && classNames.length === 1 ) {
+						elem.className = value;
+
+					} else {
+						setClass = " " + elem.className + " ";
+
+						for ( c = 0, cl = classNames.length; c < cl; c++ ) {
+							if ( !~setClass.indexOf( " " + classNames[ c ] + " " ) ) {
+								setClass += classNames[ c ] + " ";
+							}
+						}
+						elem.className = jQuery.trim( setClass );
+					}
+				}
+			}
+		}
+
+		return this;
+	},
+
+	removeClass: function( value ) {
+		var classNames, i, l, elem, className, c, cl;
+
+		if ( jQuery.isFunction( value ) ) {
+			return this.each(function( j ) {
+				jQuery( this ).removeClass( value.call(this, j, this.className) );
+			});
+		}
+
+		if ( (value && typeof value === "string") || value === undefined ) {
+			classNames = ( value || "" ).split( rspace );
+
+			for ( i = 0, l = this.length; i < l; i++ ) {
+				elem = this[ i ];
+
+				if ( elem.nodeType === 1 && elem.className ) {
+					if ( value ) {
+						className = (" " + elem.className + " ").replace( rclass, " " );
+						for ( c = 0, cl = classNames.length; c < cl; c++ ) {
+							className = className.replace(" " + classNames[ c ] + " ", " ");
+						}
+						elem.className = jQuery.trim( className );
+
+					} else {
+						elem.className = "";
+					}
+				}
+			}
+		}
+
+		return this;
+	},
+
+	toggleClass: function( value, stateVal ) {
+		var type = typeof value,
+			isBool = typeof stateVal === "boolean";
+
+		if ( jQuery.isFunction( value ) ) {
+			return this.each(function( i ) {
+				jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal );
+			});
+		}
+
+		return this.each(function() {
+			if ( type === "string" ) {
+				// toggle individual class names
+				var className,
+					i = 0,
+					self = jQuery( this ),
+					state = stateVal,
+					classNames = value.split( rspace );
+
+				while ( (className = classNames[ i++ ]) ) {
+					// check each className given, space seperated list
+					state = isBool ? state : !self.hasClass( className );
+					self[ state ? "addClass" : "removeClass" ]( className );
+				}
+
+			} else if ( type === "undefined" || type === "boolean" ) {
+				if ( this.className ) {
+					// store className if set
+					jQuery._data( this, "__className__", this.className );
+				}
+
+				// toggle whole className
+				this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || "";
+			}
+		});
+	},
+
+	hasClass: function( selector ) {
+		var className = " " + selector + " ",
+			i = 0,
+			l = this.length;
+		for ( ; i < l; i++ ) {
+			if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) > -1 ) {
+				return true;
+			}
+		}
+
+		return false;
+	},
+
+	val: function( value ) {
+		var hooks, ret, isFunction,
+			elem = this[0];
+
+		if ( !arguments.length ) {
+			if ( elem ) {
+				hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ];
+
+				if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) {
+					return ret;
+				}
+
+				ret = elem.value;
+
+				return typeof ret === "string" ?
+					// handle most common string cases
+					ret.replace(rreturn, "") :
+					// handle cases where value is null/undef or number
+					ret == null ? "" : ret;
+			}
+
+			return;
+		}
+
+		isFunction = jQuery.isFunction( value );
+
+		return this.each(function( i ) {
+			var self = jQuery(this), val;
+
+			if ( this.nodeType !== 1 ) {
+				return;
+			}
+
+			if ( isFunction ) {
+				val = value.call( this, i, self.val() );
+			} else {
+				val = value;
+			}
+
+			// Treat null/undefined as ""; convert numbers to string
+			if ( val == null ) {
+				val = "";
+			} else if ( typeof val === "number" ) {
+				val += "";
+			} else if ( jQuery.isArray( val ) ) {
+				val = jQuery.map(val, function ( value ) {
+					return value == null ? "" : value + "";
+				});
+			}
+
+			hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];
+
+			// If set returns undefined, fall back to normal setting
+			if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) {
+				this.value = val;
+			}
+		});
+	}
+});
+
+jQuery.extend({
+	valHooks: {
+		option: {
+			get: function( elem ) {
+				// attributes.value is undefined in Blackberry 4.7 but
+				// uses .value. See #6932
+				var val = elem.attributes.value;
+				return !val || val.specified ? elem.value : elem.text;
+			}
+		},
+		select: {
+			get: function( elem ) {
+				var value, i, max, option,
+					index = elem.selectedIndex,
+					values = [],
+					options = elem.options,
+					one = elem.type === "select-one";
+
+				// Nothing was selected
+				if ( index < 0 ) {
+					return null;
+				}
+
+				// Loop through all the selected options
+				i = one ? index : 0;
+				max = one ? index + 1 : options.length;
+				for ( ; i < max; i++ ) {
+					option = options[ i ];
+
+					// Don't return options that are disabled or in a disabled optgroup
+					if ( option.selected && (jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null) &&
+							(!option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" )) ) {
+
+						// Get the specific value for the option
+						value = jQuery( option ).val();
+
+						// We don't need an array for one selects
+						if ( one ) {
+							return value;
+						}
+
+						// Multi-Selects return an array
+						values.push( value );
+					}
+				}
+
+				// Fixes Bug #2551 -- select.val() broken in IE after form.reset()
+				if ( one && !values.length && options.length ) {
+					return jQuery( options[ index ] ).val();
+				}
+
+				return values;
+			},
+
+			set: function( elem, value ) {
+				var values = jQuery.makeArray( value );
+
+				jQuery(elem).find("option").each(function() {
+					this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0;
+				});
+
+				if ( !values.length ) {
+					elem.selectedIndex = -1;
+				}
+				return values;
+			}
+		}
+	},
+
+	attrFn: {
+		val: true,
+		css: true,
+		html: true,
+		text: true,
+		data: true,
+		width: true,
+		height: true,
+		offset: true
+	},
+
+	attr: function( elem, name, value, pass ) {
+		var ret, hooks, notxml,
+			nType = elem.nodeType;
+
+		// don't get/set attributes on text, comment and attribute nodes
+		if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
+			return;
+		}
+
+		if ( pass && name in jQuery.attrFn ) {
+			return jQuery( elem )[ name ]( value );
+		}
+
+		// Fallback to prop when attributes are not supported
+		if ( typeof elem.getAttribute === "undefined" ) {
+			return jQuery.prop( elem, name, value );
+		}
+
+		notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
+
+		// All attributes are lowercase
+		// Grab necessary hook if one is defined
+		if ( notxml ) {
+			name = name.toLowerCase();
+			hooks = jQuery.attrHooks[ name ] || ( rboolean.test( name ) ? boolHook : nodeHook );
+		}
+
+		if ( value !== undefined ) {
+
+			if ( value === null ) {
+				jQuery.removeAttr( elem, name );
+				return;
+
+			} else if ( hooks && "set" in hooks && notxml && (ret = hooks.set( elem, value, name )) !== undefined ) {
+				return ret;
+
+			} else {
+				elem.setAttribute( name, "" + value );
+				return value;
+			}
+
+		} else if ( hooks && "get" in hooks && notxml && (ret = hooks.get( elem, name )) !== null ) {
+			return ret;
+
+		} else {
+
+			ret = elem.getAttribute( name );
+
+			// Non-existent attributes return null, we normalize to undefined
+			return ret === null ?
+				undefined :
+				ret;
+		}
+	},
+
+	removeAttr: function( elem, value ) {
+		var propName, attrNames, name, l, isBool,
+			i = 0;
+
+		if ( value && elem.nodeType === 1 ) {
+			attrNames = value.toLowerCase().split( rspace );
+			l = attrNames.length;
+
+			for ( ; i < l; i++ ) {
+				name = attrNames[ i ];
+
+				if ( name ) {
+					propName = jQuery.propFix[ name ] || name;
+					isBool = rboolean.test( name );
+
+					// See #9699 for explanation of this approach (setting first, then removal)
+					// Do not do this for boolean attributes (see #10870)
+					if ( !isBool ) {
+						jQuery.attr( elem, name, "" );
+					}
+					elem.removeAttribute( getSetAttribute ? name : propName );
+
+					// Set corresponding property to false for boolean attributes
+					if ( isBool && propName in elem ) {
+						elem[ propName ] = false;
+					}
+				}
+			}
+		}
+	},
+
+	attrHooks: {
+		type: {
+			set: function( elem, value ) {
+				// We can't allow the type property to be changed (since it causes problems in IE)
+				if ( rtype.test( elem.nodeName ) && elem.parentNode ) {
+					jQuery.error( "type property can't be changed" );
+				} else if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) {
+					// Setting the type on a radio button after the value resets the value in IE6-9
+					// Reset value to it's default in case type is set after value
+					// This is for element creation
+					var val = elem.value;
+					elem.setAttribute( "type", value );
+					if ( val ) {
+						elem.value = val;
+					}
+					return value;
+				}
+			}
+		},
+		// Use the value property for back compat
+		// Use the nodeHook for button elements in IE6/7 (#1954)
+		value: {
+			get: function( elem, name ) {
+				if ( nodeHook && jQuery.nodeName( elem, "button" ) ) {
+					return nodeHook.get( elem, name );
+				}
+				return name in elem ?
+					elem.value :
+					null;
+			},
+			set: function( elem, value, name ) {
+				if ( nodeHook && jQuery.nodeName( elem, "button" ) ) {
+					return nodeHook.set( elem, value, name );
+				}
+				// Does not return so that setAttribute is also used
+				elem.value = value;
+			}
+		}
+	},
+
+	propFix: {
+		tabindex: "tabIndex",
+		readonly: "readOnly",
+		"for": "htmlFor",
+		"class": "className",
+		maxlength: "maxLength",
+		cellspacing: "cellSpacing",
+		cellpadding: "cellPadding",
+		rowspan: "rowSpan",
+		colspan: "colSpan",
+		usemap: "useMap",
+		frameborder: "frameBorder",
+		contenteditable: "contentEditable"
+	},
+
+	prop: function( elem, name, value ) {
+		var ret, hooks, notxml,
+			nType = elem.nodeType;
+
+		// don't get/set properties on text, comment and attribute nodes
+		if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
+			return;
+		}
+
+		notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
+
+		if ( notxml ) {
+			// Fix name and attach hooks
+			name = jQuery.propFix[ name ] || name;
+			hooks = jQuery.propHooks[ name ];
+		}
+
+		if ( value !== undefined ) {
+			if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) {
+				return ret;
+
+			} else {
+				return ( elem[ name ] = value );
+			}
+
+		} else {
+			if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) {
+				return ret;
+
+			} else {
+				return elem[ name ];
+			}
+		}
+	},
+
+	propHooks: {
+		tabIndex: {
+			get: function( elem ) {
+				// elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set
+				// http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
+				var attributeNode = elem.getAttributeNode("tabindex");
+
+				return attributeNode && attributeNode.specified ?
+					parseInt( attributeNode.value, 10 ) :
+					rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ?
+						0 :
+						undefined;
+			}
+		}
+	}
+});
+
+// Add the tabIndex propHook to attrHooks for back-compat (different case is intentional)
+jQuery.attrHooks.tabindex = jQuery.propHooks.tabIndex;
+
+// Hook for boolean attributes
+boolHook = {
+	get: function( elem, name ) {
+		// Align boolean attributes with corresponding properties
+		// Fall back to attribute presence where some booleans are not supported
+		var attrNode,
+			property = jQuery.prop( elem, name );
+		return property === true || typeof property !== "boolean" && ( attrNode = elem.getAttributeNode(name) ) && attrNode.nodeValue !== false ?
+			name.toLowerCase() :
+			undefined;
+	},
+	set: function( elem, value, name ) {
+		var propName;
+		if ( value === false ) {
+			// Remove boolean attributes when set to false
+			jQuery.removeAttr( elem, name );
+		} else {
+			// value is true since we know at this point it's type boolean and not false
+			// Set boolean attributes to the same name and set the DOM property
+			propName = jQuery.propFix[ name ] || name;
+			if ( propName in elem ) {
+				// Only set the IDL specifically if it already exists on the element
+				elem[ propName ] = true;
+			}
+
+			elem.setAttribute( name, name.toLowerCase() );
+		}
+		return name;
+	}
+};
+
+// IE6/7 do not support getting/setting some attributes with get/setAttribute
+if ( !getSetAttribute ) {
+
+	fixSpecified = {
+		name: true,
+		id: true,
+		coords: true
+	};
+
+	// Use this for any attribute in IE6/7
+	// This fixes almost every IE6/7 issue
+	nodeHook = jQuery.valHooks.button = {
+		get: function( elem, name ) {
+			var ret;
+			ret = elem.getAttributeNode( name );
+			return ret && ( fixSpecified[ name ] ? ret.nodeValue !== "" : ret.specified ) ?
+				ret.nodeValue :
+				undefined;
+		},
+		set: function( elem, value, name ) {
+			// Set the existing or create a new attribute node
+			var ret = elem.getAttributeNode( name );
+			if ( !ret ) {
+				ret = document.createAttribute( name );
+				elem.setAttributeNode( ret );
+			}
+			return ( ret.nodeValue = value + "" );
+		}
+	};
+
+	// Apply the nodeHook to tabindex
+	jQuery.attrHooks.tabindex.set = nodeHook.set;
+
+	// Set width and height to auto instead of 0 on empty string( Bug #8150 )
+	// This is for removals
+	jQuery.each([ "width", "height" ], function( i, name ) {
+		jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], {
+			set: function( elem, value ) {
+				if ( value === "" ) {
+					elem.setAttribute( name, "auto" );
+					return value;
+				}
+			}
+		});
+	});
+
+	// Set contenteditable to false on removals(#10429)
+	// Setting to empty string throws an error as an invalid value
+	jQuery.attrHooks.contenteditable = {
+		get: nodeHook.get,
+		set: function( elem, value, name ) {
+			if ( value === "" ) {
+				value = "false";
+			}
+			nodeHook.set( elem, value, name );
+		}
+	};
+}
+
+
+// Some attributes require a special call on IE
+if ( !jQuery.support.hrefNormalized ) {
+	jQuery.each([ "href", "src", "width", "height" ], function( i, name ) {
+		jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], {
+			get: function( elem ) {
+				var ret = elem.getAttribute( name, 2 );
+				return ret === null ? undefined : ret;
+			}
+		});
+	});
+}
+
+if ( !jQuery.support.style ) {
+	jQuery.attrHooks.style = {
+		get: function( elem ) {
+			// Return undefined in the case of empty string
+			// Normalize to lowercase since IE uppercases css property names
+			return elem.style.cssText.toLowerCase() || undefined;
+		},
+		set: function( elem, value ) {
+			return ( elem.style.cssText = "" + value );
+		}
+	};
+}
+
+// Safari mis-reports the default selected property of an option
+// Accessing the parent's selectedIndex property fixes it
+if ( !jQuery.support.optSelected ) {
+	jQuery.propHooks.selected = jQuery.extend( jQuery.propHooks.selected, {
+		get: function( elem ) {
+			var parent = elem.parentNode;
+
+			if ( parent ) {
+				parent.selectedIndex;
+
+				// Make sure that it also works with optgroups, see #5701
+				if ( parent.parentNode ) {
+					parent.parentNode.selectedIndex;
+				}
+			}
+			return null;
+		}
+	});
+}
+
+// IE6/7 call enctype encoding
+if ( !jQuery.support.enctype ) {
+	jQuery.propFix.enctype = "encoding";
+}
+
+// Radios and checkboxes getter/setter
+if ( !jQuery.support.checkOn ) {
+	jQuery.each([ "radio", "checkbox" ], function() {
+		jQuery.valHooks[ this ] = {
+			get: function( elem ) {
+				// Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified
+				return elem.getAttribute("value") === null ? "on" : elem.value;
+			}
+		};
+	});
+}
+jQuery.each([ "radio", "checkbox" ], function() {
+	jQuery.valHooks[ this ] = jQuery.extend( jQuery.valHooks[ this ], {
+		set: function( elem, value ) {
+			if ( jQuery.isArray( value ) ) {
+				return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 );
+			}
+		}
+	});
+});
+
+
+
+
+var rformElems = /^(?:textarea|input|select)$/i,
+	rtypenamespace = /^([^\.]*)?(?:\.(.+))?$/,
+	rhoverHack = /(?:^|\s)hover(\.\S+)?\b/,
+	rkeyEvent = /^key/,
+	rmouseEvent = /^(?:mouse|contextmenu)|click/,
+	rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,
+	rquickIs = /^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,
+	quickParse = function( selector ) {
+		var quick = rquickIs.exec( selector );
+		if ( quick ) {
+			//   0  1    2   3
+			// [ _, tag, id, class ]
+			quick[1] = ( quick[1] || "" ).toLowerCase();
+			quick[3] = quick[3] && new RegExp( "(?:^|\\s)" + quick[3] + "(?:\\s|$)" );
+		}
+		return quick;
+	},
+	quickIs = function( elem, m ) {
+		var attrs = elem.attributes || {};
+		return (
+			(!m[1] || elem.nodeName.toLowerCase() === m[1]) &&
+			(!m[2] || (attrs.id || {}).value === m[2]) &&
+			(!m[3] || m[3].test( (attrs[ "class" ] || {}).value ))
+		);
+	},
+	hoverHack = function( events ) {
+		return jQuery.event.special.hover ? events : events.replace( rhoverHack, "mouseenter$1 mouseleave$1" );
+	};
+
+/*
+ * Helper functions for managing events -- not part of the public interface.
+ * Props to Dean Edwards' addEvent library for many of the ideas.
+ */
+jQuery.event = {
+
+	add: function( elem, types, handler, data, selector ) {
+
+		var elemData, eventHandle, events,
+			t, tns, type, namespaces, handleObj,
+			handleObjIn, quick, handlers, special;
+
+		// Don't attach events to noData or text/comment nodes (allow plain objects tho)
+		if ( elem.nodeType === 3 || elem.nodeType === 8 || !types || !handler || !(elemData = jQuery._data( elem )) ) {
+			return;
+		}
+
+		// Caller can pass in an object of custom data in lieu of the handler
+		if ( handler.handler ) {
+			handleObjIn = handler;
+			handler = handleObjIn.handler;
+			selector = handleObjIn.selector;
+		}
+
+		// Make sure that the handler has a unique ID, used to find/remove it later
+		if ( !handler.guid ) {
+			handler.guid = jQuery.guid++;
+		}
+
+		// Init the element's event structure and main handler, if this is the first
+		events = elemData.events;
+		if ( !events ) {
+			elemData.events = events = {};
+		}
+		eventHandle = elemData.handle;
+		if ( !eventHandle ) {
+			elemData.handle = eventHandle = function( e ) {
+				// Discard the second event of a jQuery.event.trigger() and
+				// when an event is called after a page has unloaded
+				return typeof jQuery !== "undefined" && (!e || jQuery.event.triggered !== e.type) ?
+					jQuery.event.dispatch.apply( eventHandle.elem, arguments ) :
+					undefined;
+			};
+			// Add elem as a property of the handle fn to prevent a memory leak with IE non-native events
+			eventHandle.elem = elem;
+		}
+
+		// Handle multiple events separated by a space
+		// jQuery(...).bind("mouseover mouseout", fn);
+		types = jQuery.trim( hoverHack(types) ).split( " " );
+		for ( t = 0; t < types.length; t++ ) {
+
+			tns = rtypenamespace.exec( types[t] ) || [];
+			type = tns[1];
+			namespaces = ( tns[2] || "" ).split( "." ).sort();
+
+			// If event changes its type, use the special event handlers for the changed type
+			special = jQuery.event.special[ type ] || {};
+
+			// If selector defined, determine special event api type, otherwise given type
+			type = ( selector ? special.delegateType : special.bindType ) || type;
+
+			// Update special based on newly reset type
+			special = jQuery.event.special[ type ] || {};
+
+			// handleObj is passed to all event handlers
+			handleObj = jQuery.extend({
+				type: type,
+				origType: tns[1],
+				data: data,
+				handler: handler,
+				guid: handler.guid,
+				selector: selector,
+				quick: selector && quickParse( selector ),
+				namespace: namespaces.join(".")
+			}, handleObjIn );
+
+			// Init the event handler queue if we're the first
+			handlers = events[ type ];
+			if ( !handlers ) {
+				handlers = events[ type ] = [];
+				handlers.delegateCount = 0;
+
+				// Only use addEventListener/attachEvent if the special events handler returns false
+				if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) {
+					// Bind the global event handler to the element
+					if ( elem.addEventListener ) {
+						elem.addEventListener( type, eventHandle, false );
+
+					} else if ( elem.attachEvent ) {
+						elem.attachEvent( "on" + type, eventHandle );
+					}
+				}
+			}
+
+			if ( special.add ) {
+				special.add.call( elem, handleObj );
+
+				if ( !handleObj.handler.guid ) {
+					handleObj.handler.guid = handler.guid;
+				}
+			}
+
+			// Add to the element's handler list, delegates in front
+			if ( selector ) {
+				handlers.splice( handlers.delegateCount++, 0, handleObj );
+			} else {
+				handlers.push( handleObj );
+			}
+
+			// Keep track of which events have ever been used, for event optimization
+			jQuery.event.global[ type ] = true;
+		}
+
+		// Nullify elem to prevent memory leaks in IE
+		elem = null;
+	},
+
+	global: {},
+
+	// Detach an event or set of events from an element
+	remove: function( elem, types, handler, selector, mappedTypes ) {
+
+		var elemData = jQuery.hasData( elem ) && jQuery._data( elem ),
+			t, tns, type, origType, namespaces, origCount,
+			j, events, special, handle, eventType, handleObj;
+
+		if ( !elemData || !(events = elemData.events) ) {
+			return;
+		}
+
+		// Once for each type.namespace in types; type may be omitted
+		types = jQuery.trim( hoverHack( types || "" ) ).split(" ");
+		for ( t = 0; t < types.length; t++ ) {
+			tns = rtypenamespace.exec( types[t] ) || [];
+			type = origType = tns[1];
+			namespaces = tns[2];
+
+			// Unbind all events (on this namespace, if provided) for the element
+			if ( !type ) {
+				for ( type in events ) {
+					jQuery.event.remove( elem, type + types[ t ], handler, selector, true );
+				}
+				continue;
+			}
+
+			special = jQuery.event.special[ type ] || {};
+			type = ( selector? special.delegateType : special.bindType ) || type;
+			eventType = events[ type ] || [];
+			origCount = eventType.length;
+			namespaces = namespaces ? new RegExp("(^|\\.)" + namespaces.split(".").sort().join("\\.(?:.*\\.)?") + "(\\.|$)") : null;
+
+			// Remove matching events
+			for ( j = 0; j < eventType.length; j++ ) {
+				handleObj = eventType[ j ];
+
+				if ( ( mappedTypes || origType === handleObj.origType ) &&
+					 ( !handler || handler.guid === handleObj.guid ) &&
+					 ( !namespaces || namespaces.test( handleObj.namespace ) ) &&
+					 ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) {
+					eventType.splice( j--, 1 );
+
+					if ( handleObj.selector ) {
+						eventType.delegateCount--;
+					}
+					if ( special.remove ) {
+						special.remove.call( elem, handleObj );
+					}
+				}
+			}
+
+			// Remove generic event handler if we removed something and no more handlers exist
+			// (avoids potential for endless recursion during removal of special event handlers)
+			if ( eventType.length === 0 && origCount !== eventType.length ) {
+				if ( !special.teardown || special.teardown.call( elem, namespaces ) === false ) {
+					jQuery.removeEvent( elem, type, elemData.handle );
+				}
+
+				delete events[ type ];
+			}
+		}
+
+		// Remove the expando if it's no longer used
+		if ( jQuery.isEmptyObject( events ) ) {
+			handle = elemData.handle;
+			if ( handle ) {
+				handle.elem = null;
+			}
+
+			// removeData also checks for emptiness and clears the expando if empty
+			// so use it instead of delete
+			jQuery.removeData( elem, [ "events", "handle" ], true );
+		}
+	},
+
+	// Events that are safe to short-circuit if no handlers are attached.
+	// Native DOM events should not be added, they may have inline handlers.
+	customEvent: {
+		"getData": true,
+		"setData": true,
+		"changeData": true
+	},
+
+	trigger: function( event, data, elem, onlyHandlers ) {
+		// Don't do events on text and comment nodes
+		if ( elem && (elem.nodeType === 3 || elem.nodeType === 8) ) {
+			return;
+		}
+
+		// Event object or event type
+		var type = event.type || event,
+			namespaces = [],
+			cache, exclusive, i, cur, old, ontype, special, handle, eventPath, bubbleType;
+
+		// focus/blur morphs to focusin/out; ensure we're not firing them right now
+		if ( rfocusMorph.test( type + jQuery.event.triggered ) ) {
+			return;
+		}
+
+		if ( type.indexOf( "!" ) >= 0 ) {
+			// Exclusive events trigger only for the exact event (no namespaces)
+			type = type.slice(0, -1);
+			exclusive = true;
+		}
+
+		if ( type.indexOf( "." ) >= 0 ) {
+			// Namespaced trigger; create a regexp to match event type in handle()
+			namespaces = type.split(".");
+			type = namespaces.shift();
+			namespaces.sort();
+		}
+
+		if ( (!elem || jQuery.event.customEvent[ type ]) && !jQuery.event.global[ type ] ) {
+			// No jQuery handlers for this event type, and it can't have inline handlers
+			return;
+		}
+
+		// Caller can pass in an Event, Object, or just an event type string
+		event = typeof event === "object" ?
+			// jQuery.Event object
+			event[ jQuery.expando ] ? event :
+			// Object literal
+			new jQuery.Event( type, event ) :
+			// Just the event type (string)
+			new jQuery.Event( type );
+
+		event.type = type;
+		event.isTrigger = true;
+		event.exclusive = exclusive;
+		event.namespace = namespaces.join( "." );
+		event.namespace_re = event.namespace? new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.)?") + "(\\.|$)") : null;
+		ontype = type.indexOf( ":" ) < 0 ? "on" + type : "";
+
+		// Handle a global trigger
+		if ( !elem ) {
+
+			// TODO: Stop taunting the data cache; remove global events and always attach to document
+			cache = jQuery.cache;
+			for ( i in cache ) {
+				if ( cache[ i ].events && cache[ i ].events[ type ] ) {
+					jQuery.event.trigger( event, data, cache[ i ].handle.elem, true );
+				}
+			}
+			return;
+		}
+
+		// Clean up the event in case it is being reused
+		event.result = undefined;
+		if ( !event.target ) {
+			event.target = elem;
+		}
+
+		// Clone any incoming data and prepend the event, creating the handler arg list
+		data = data != null ? jQuery.makeArray( data ) : [];
+		data.unshift( event );
+
+		// Allow special events to draw outside the lines
+		special = jQuery.event.special[ type ] || {};
+		if ( special.trigger && special.trigger.apply( elem, data ) === false ) {
+			return;
+		}
+
+		// Determine event propagation path in advance, per W3C events spec (#9951)
+		// Bubble up to document, then to window; watch for a global ownerDocument var (#9724)
+		eventPath = [[ elem, special.bindType || type ]];
+		if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) {
+
+			bubbleType = special.delegateType || type;
+			cur = rfocusMorph.test( bubbleType + type ) ? elem : elem.parentNode;
+			old = null;
+			for ( ; cur; cur = cur.parentNode ) {
+				eventPath.push([ cur, bubbleType ]);
+				old = cur;
+			}
+
+			// Only add window if we got to document (e.g., not plain obj or detached DOM)
+			if ( old && old === elem.ownerDocument ) {
+				eventPath.push([ old.defaultView || old.parentWindow || window, bubbleType ]);
+			}
+		}
+
+		// Fire handlers on the event path
+		for ( i = 0; i < eventPath.length && !event.isPropagationStopped(); i++ ) {
+
+			cur = eventPath[i][0];
+			event.type = eventPath[i][1];
+
+			handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" );
+			if ( handle ) {
+				handle.apply( cur, data );
+			}
+			// Note that this is a bare JS function and not a jQuery handler
+			handle = ontype && cur[ ontype ];
+			if ( handle && jQuery.acceptData( cur ) && handle.apply( cur, data ) === false ) {
+				event.preventDefault();
+			}
+		}
+		event.type = type;
+
+		// If nobody prevented the default action, do it now
+		if ( !onlyHandlers && !event.isDefaultPrevented() ) {
+
+			if ( (!special._default || special._default.apply( elem.ownerDocument, data ) === false) &&
+				!(type === "click" && jQuery.nodeName( elem, "a" )) && jQuery.acceptData( elem ) ) {
+
+				// Call a native DOM method on the target with the same name name as the event.
+				// Can't use an .isFunction() check here because IE6/7 fails that test.
+				// Don't do default actions on window, that's where global variables be (#6170)
+				// IE<9 dies on focus/blur to hidden element (#1486)
+				if ( ontype && elem[ type ] && ((type !== "focus" && type !== "blur") || event.target.offsetWidth !== 0) && !jQuery.isWindow( elem ) ) {
+
+					// Don't re-trigger an onFOO event when we call its FOO() method
+					old = elem[ ontype ];
+
+					if ( old ) {
+						elem[ ontype ] = null;
+					}
+
+					// Prevent re-triggering of the same event, since we already bubbled it above
+					jQuery.event.triggered = type;
+					elem[ type ]();
+					jQuery.event.triggered = undefined;
+
+					if ( old ) {
+						elem[ ontype ] = old;
+					}
+				}
+			}
+		}
+
+		return event.result;
+	},
+
+	dispatch: function( event ) {
+
+		// Make a writable jQuery.Event from the native event object
+		event = jQuery.event.fix( event || window.event );
+
+		var handlers = ( (jQuery._data( this, "events" ) || {} )[ event.type ] || []),
+			delegateCount = handlers.delegateCount,
+			args = [].slice.call( arguments, 0 ),
+			run_all = !event.exclusive && !event.namespace,
+			special = jQuery.event.special[ event.type ] || {},
+			handlerQueue = [],
+			i, j, cur, jqcur, ret, selMatch, matched, matches, handleObj, sel, related;
+
+		// Use the fix-ed jQuery.Event rather than the (read-only) native event
+		args[0] = event;
+		event.delegateTarget = this;
+
+		// Call the preDispatch hook for the mapped type, and let it bail if desired
+		if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {
+			return;
+		}
+
+		// Determine handlers that should run if there are delegated events
+		// Avoid non-left-click bubbling in Firefox (#3861)
+		if ( delegateCount && !(event.button && event.type === "click") ) {
+
+			// Pregenerate a single jQuery object for reuse with .is()
+			jqcur = jQuery(this);
+			jqcur.context = this.ownerDocument || this;
+
+			for ( cur = event.target; cur != this; cur = cur.parentNode || this ) {
+
+				// Don't process events on disabled elements (#6911, #8165)
+				if ( cur.disabled !== true ) {
+					selMatch = {};
+					matches = [];
+					jqcur[0] = cur;
+					for ( i = 0; i < delegateCount; i++ ) {
+						handleObj = handlers[ i ];
+						sel = handleObj.selector;
+
+						if ( selMatch[ sel ] === undefined ) {
+							selMatch[ sel ] = (
+								handleObj.quick ? quickIs( cur, handleObj.quick ) : jqcur.is( sel )
+							);
+						}
+						if ( selMatch[ sel ] ) {
+							matches.push( handleObj );
+						}
+					}
+					if ( matches.length ) {
+						handlerQueue.push({ elem: cur, matches: matches });
+					}
+				}
+			}
+		}
+
+		// Add the remaining (directly-bound) handlers
+		if ( handlers.length > delegateCount ) {
+			handlerQueue.push({ elem: this, matches: handlers.slice( delegateCount ) });
+		}
+
+		// Run delegates first; they may want to stop propagation beneath us
+		for ( i = 0; i < handlerQueue.length && !event.isPropagationStopped(); i++ ) {
+			matched = handlerQueue[ i ];
+			event.currentTarget = matched.elem;
+
+			for ( j = 0; j < matched.matches.length && !event.isImmediatePropagationStopped(); j++ ) {
+				handleObj = matched.matches[ j ];
+
+				// Triggered event must either 1) be non-exclusive and have no namespace, or
+				// 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace).
+				if ( run_all || (!event.namespace && !handleObj.namespace) || event.namespace_re && event.namespace_re.test( handleObj.namespace ) ) {
+
+					event.data = handleObj.data;
+					event.handleObj = handleObj;
+
+					ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler )
+							.apply( matched.elem, args );
+
+					if ( ret !== undefined ) {
+						event.result = ret;
+						if ( ret === false ) {
+							event.preventDefault();
+							event.stopPropagation();
+						}
+					}
+				}
+			}
+		}
+
+		// Call the postDispatch hook for the mapped type
+		if ( special.postDispatch ) {
+			special.postDispatch.call( this, event );
+		}
+
+		return event.result;
+	},
+
+	// Includes some event props shared by KeyEvent and MouseEvent
+	// *** attrChange attrName relatedNode srcElement  are not normalized, non-W3C, deprecated, will be removed in 1.8 ***
+	props: "attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),
+
+	fixHooks: {},
+
+	keyHooks: {
+		props: "char charCode key keyCode".split(" "),
+		filter: function( event, original ) {
+
+			// Add which for key events
+			if ( event.which == null ) {
+				event.which = original.charCode != null ? original.charCode : original.keyCode;
+			}
+
+			return event;
+		}
+	},
+
+	mouseHooks: {
+		props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),
+		filter: function( event, original ) {
+			var eventDoc, doc, body,
+				button = original.button,
+				fromElement = original.fromElement;
+
+			// Calculate pageX/Y if missing and clientX/Y available
+			if ( event.pageX == null && original.clientX != null ) {
+				eventDoc = event.target.ownerDocument || document;
+				doc = eventDoc.documentElement;
+				body = eventDoc.body;
+
+				event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 );
+				event.pageY = original.clientY + ( doc && doc.scrollTop  || body && body.scrollTop  || 0 ) - ( doc && doc.clientTop  || body && body.clientTop  || 0 );
+			}
+
+			// Add relatedTarget, if necessary
+			if ( !event.relatedTarget && fromElement ) {
+				event.relatedTarget = fromElement === event.target ? original.toElement : fromElement;
+			}
+
+			// Add which for click: 1 === left; 2 === middle; 3 === right
+			// Note: button is not normalized, so don't use it
+			if ( !event.which && button !== undefined ) {
+				event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) );
+			}
+
+			return event;
+		}
+	},
+
+	fix: function( event ) {
+		if ( event[ jQuery.expando ] ) {
+			return event;
+		}
+
+		// Create a writable copy of the event object and normalize some properties
+		var i, prop,
+			originalEvent = event,
+			fixHook = jQuery.event.fixHooks[ event.type ] || {},
+			copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props;
+
+		event = jQuery.Event( originalEvent );
+
+		for ( i = copy.length; i; ) {
+			prop = copy[ --i ];
+			event[ prop ] = originalEvent[ prop ];
+		}
+
+		// Fix target property, if necessary (#1925, IE 6/7/8 & Safari2)
+		if ( !event.target ) {
+			event.target = originalEvent.srcElement || document;
+		}
+
+		// Target should not be a text node (#504, Safari)
+		if ( event.target.nodeType === 3 ) {
+			event.target = event.target.parentNode;
+		}
+
+		// For mouse/key events; add metaKey if it's not there (#3368, IE6/7/8)
+		if ( event.metaKey === undefined ) {
+			event.metaKey = event.ctrlKey;
+		}
+
+		return fixHook.filter? fixHook.filter( event, originalEvent ) : event;
+	},
+
+	special: {
+		ready: {
+			// Make sure the ready event is setup
+			setup: jQuery.bindReady
+		},
+
+		load: {
+			// Prevent triggered image.load events from bubbling to window.load
+			noBubble: true
+		},
+
+		focus: {
+			delegateType: "focusin"
+		},
+		blur: {
+			delegateType: "focusout"
+		},
+
+		beforeunload: {
+			setup: function( data, namespaces, eventHandle ) {
+				// We only want to do this special case on windows
+				if ( jQuery.isWindow( this ) ) {
+					this.onbeforeunload = eventHandle;
+				}
+			},
+
+			teardown: function( namespaces, eventHandle ) {
+				if ( this.onbeforeunload === eventHandle ) {
+					this.onbeforeunload = null;
+				}
+			}
+		}
+	},
+
+	simulate: function( type, elem, event, bubble ) {
+		// Piggyback on a donor event to simulate a different one.
+		// Fake originalEvent to avoid donor's stopPropagation, but if the
+		// simulated event prevents default then we do the same on the donor.
+		var e = jQuery.extend(
+			new jQuery.Event(),
+			event,
+			{ type: type,
+				isSimulated: true,
+				originalEvent: {}
+			}
+		);
+		if ( bubble ) {
+			jQuery.event.trigger( e, null, elem );
+		} else {
+			jQuery.event.dispatch.call( elem, e );
+		}
+		if ( e.isDefaultPrevented() ) {
+			event.preventDefault();
+		}
+	}
+};
+
+// Some plugins are using, but it's undocumented/deprecated and will be removed.
+// The 1.7 special event interface should provide all the hooks needed now.
+jQuery.event.handle = jQuery.event.dispatch;
+
+jQuery.removeEvent = document.removeEventListener ?
+	function( elem, type, handle ) {
+		if ( elem.removeEventListener ) {
+			elem.removeEventListener( type, handle, false );
+		}
+	} :
+	function( elem, type, handle ) {
+		if ( elem.detachEvent ) {
+			elem.detachEvent( "on" + type, handle );
+		}
+	};
+
+jQuery.Event = function( src, props ) {
+	// Allow instantiation without the 'new' keyword
+	if ( !(this instanceof jQuery.Event) ) {
+		return new jQuery.Event( src, props );
+	}
+
+	// Event object
+	if ( src && src.type ) {
+		this.originalEvent = src;
+		this.type = src.type;
+
+		// Events bubbling up the document may have been marked as prevented
+		// by a handler lower down the tree; reflect the correct value.
+		this.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false ||
+			src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse;
+
+	// Event type
+	} else {
+		this.type = src;
+	}
+
+	// Put explicitly provided properties onto the event object
+	if ( props ) {
+		jQuery.extend( this, props );
+	}
+
+	// Create a timestamp if incoming event doesn't have one
+	this.timeStamp = src && src.timeStamp || jQuery.now();
+
+	// Mark it as fixed
+	this[ jQuery.expando ] = true;
+};
+
+function returnFalse() {
+	return false;
+}
+function returnTrue() {
+	return true;
+}
+
+// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
+// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
+jQuery.Event.prototype = {
+	preventDefault: function() {
+		this.isDefaultPrevented = returnTrue;
+
+		var e = this.originalEvent;
+		if ( !e ) {
+			return;
+		}
+
+		// if preventDefault exists run it on the original event
+		if ( e.preventDefault ) {
+			e.preventDefault();
+
+		// otherwise set the returnValue property of the original event to false (IE)
+		} else {
+			e.returnValue = false;
+		}
+	},
+	stopPropagation: function() {
+		this.isPropagationStopped = returnTrue;
+
+		var e = this.originalEvent;
+		if ( !e ) {
+			return;
+		}
+		// if stopPropagation exists run it on the original event
+		if ( e.stopPropagation ) {
+			e.stopPropagation();
+		}
+		// otherwise set the cancelBubble property of the original event to true (IE)
+		e.cancelBubble = true;
+	},
+	stopImmediatePropagation: function() {
+		this.isImmediatePropagationStopped = returnTrue;
+		this.stopPropagation();
+	},
+	isDefaultPrevented: returnFalse,
+	isPropagationStopped: returnFalse,
+	isImmediatePropagationStopped: returnFalse
+};
+
+// Create mouseenter/leave events using mouseover/out and event-time checks
+jQuery.each({
+	mouseenter: "mouseover",
+	mouseleave: "mouseout"
+}, function( orig, fix ) {
+	jQuery.event.special[ orig ] = {
+		delegateType: fix,
+		bindType: fix,
+
+		handle: function( event ) {
+			var target = this,
+				related = event.relatedTarget,
+				handleObj = event.handleObj,
+				selector = handleObj.selector,
+				ret;
+
+			// For mousenter/leave call the handler if related is outside the target.
+			// NB: No relatedTarget if the mouse left/entered the browser window
+			if ( !related || (related !== target && !jQuery.contains( target, related )) ) {
+				event.type = handleObj.origType;
+				ret = handleObj.handler.apply( this, arguments );
+				event.type = fix;
+			}
+			return ret;
+		}
+	};
+});
+
+// IE submit delegation
+if ( !jQuery.support.submitBubbles ) {
+
+	jQuery.event.special.submit = {
+		setup: function() {
+			// Only need this for delegated form submit events
+			if ( jQuery.nodeName( this, "form" ) ) {
+				return false;
+			}
+
+			// Lazy-add a submit handler when a descendant form may potentially be submitted
+			jQuery.event.add( this, "click._submit keypress._submit", function( e ) {
+				// Node name check avoids a VML-related crash in IE (#9807)
+				var elem = e.target,
+					form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined;
+				if ( form && !form._submit_attached ) {
+					jQuery.event.add( form, "submit._submit", function( event ) {
+						event._submit_bubble = true;
+					});
+					form._submit_attached = true;
+				}
+			});
+			// return undefined since we don't need an event listener
+		},
+		
+		postDispatch: function( event ) {
+			// If form was submitted by the user, bubble the event up the tree
+			if ( event._submit_bubble ) {
+				delete event._submit_bubble;
+				if ( this.parentNode && !event.isTrigger ) {
+					jQuery.event.simulate( "submit", this.parentNode, event, true );
+				}
+			}
+		},
+
+		teardown: function() {
+			// Only need this for delegated form submit events
+			if ( jQuery.nodeName( this, "form" ) ) {
+				return false;
+			}
+
+			// Remove delegated handlers; cleanData eventually reaps submit handlers attached above
+			jQuery.event.remove( this, "._submit" );
+		}
+	};
+}
+
+// IE change delegation and checkbox/radio fix
+if ( !jQuery.support.changeBubbles ) {
+
+	jQuery.event.special.change = {
+
+		setup: function() {
+
+			if ( rformElems.test( this.nodeName ) ) {
+				// IE doesn't fire change on a check/radio until blur; trigger it on click
+				// after a propertychange. Eat the blur-change in special.change.handle.
+				// This still fires onchange a second time for check/radio after blur.
+				if ( this.type === "checkbox" || this.type === "radio" ) {
+					jQuery.event.add( this, "propertychange._change", function( event ) {
+						if ( event.originalEvent.propertyName === "checked" ) {
+							this._just_changed = true;
+						}
+					});
+					jQuery.event.add( this, "click._change", function( event ) {
+						if ( this._just_changed && !event.isTrigger ) {
+							this._just_changed = false;
+							jQuery.event.simulate( "change", this, event, true );
+						}
+					});
+				}
+				return false;
+			}
+			// Delegated event; lazy-add a change handler on descendant inputs
+			jQuery.event.add( this, "beforeactivate._change", function( e ) {
+				var elem = e.target;
+
+				if ( rformElems.test( elem.nodeName ) && !elem._change_attached ) {
+					jQuery.event.add( elem, "change._change", function( event ) {
+						if ( this.parentNode && !event.isSimulated && !event.isTrigger ) {
+							jQuery.event.simulate( "change", this.parentNode, event, true );
+						}
+					});
+					elem._change_attached = true;
+				}
+			});
+		},
+
+		handle: function( event ) {
+			var elem = event.target;
+
+			// Swallow native change events from checkbox/radio, we already triggered them above
+			if ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox") ) {
+				return event.handleObj.handler.apply( this, arguments );
+			}
+		},
+
+		teardown: function() {
+			jQuery.event.remove( this, "._change" );
+
+			return rformElems.test( this.nodeName );
+		}
+	};
+}
+
+// Create "bubbling" focus and blur events
+if ( !jQuery.support.focusinBubbles ) {
+	jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) {
+
+		// Attach a single capturing handler while someone wants focusin/focusout
+		var attaches = 0,
+			handler = function( event ) {
+				jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true );
+			};
+
+		jQuery.event.special[ fix ] = {
+			setup: function() {
+				if ( attaches++ === 0 ) {
+					document.addEventListener( orig, handler, true );
+				}
+			},
+			teardown: function() {
+				if ( --attaches === 0 ) {
+					document.removeEventListener( orig, handler, true );
+				}
+			}
+		};
+	});
+}
+
+jQuery.fn.extend({
+
+	on: function( types, selector, data, fn, /*INTERNAL*/ one ) {
+		var origFn, type;
+
+		// Types can be a map of types/handlers
+		if ( typeof types === "object" ) {
+			// ( types-Object, selector, data )
+			if ( typeof selector !== "string" ) { // && selector != null
+				// ( types-Object, data )
+				data = data || selector;
+				selector = undefined;
+			}
+			for ( type in types ) {
+				this.on( type, selector, data, types[ type ], one );
+			}
+			return this;
+		}
+
+		if ( data == null && fn == null ) {
+			// ( types, fn )
+			fn = selector;
+			data = selector = undefined;
+		} else if ( fn == null ) {
+			if ( typeof selector === "string" ) {
+				// ( types, selector, fn )
+				fn = data;
+				data = undefined;
+			} else {
+				// ( types, data, fn )
+				fn = data;
+				data = selector;
+				selector = undefined;
+			}
+		}
+		if ( fn === false ) {
+			fn = returnFalse;
+		} else if ( !fn ) {
+			return this;
+		}
+
+		if ( one === 1 ) {
+			origFn = fn;
+			fn = function( event ) {
+				// Can use an empty set, since event contains the info
+				jQuery().off( event );
+				return origFn.apply( this, arguments );
+			};
+			// Use same guid so caller can remove using origFn
+			fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );
+		}
+		return this.each( function() {
+			jQuery.event.add( this, types, fn, data, selector );
+		});
+	},
+	one: function( types, selector, data, fn ) {
+		return this.on( types, selector, data, fn, 1 );
+	},
+	off: function( types, selector, fn ) {
+		if ( types && types.preventDefault && types.handleObj ) {
+			// ( event )  dispatched jQuery.Event
+			var handleObj = types.handleObj;
+			jQuery( types.delegateTarget ).off(
+				handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType,
+				handleObj.selector,
+				handleObj.handler
+			);
+			return this;
+		}
+		if ( typeof types === "object" ) {
+			// ( types-object [, selector] )
+			for ( var type in types ) {
+				this.off( type, selector, types[ type ] );
+			}
+			return this;
+		}
+		if ( selector === false || typeof selector === "function" ) {
+			// ( types [, fn] )
+			fn = selector;
+			selector = undefined;
+		}
+		if ( fn === false ) {
+			fn = returnFalse;
+		}
+		return this.each(function() {
+			jQuery.event.remove( this, types, fn, selector );
+		});
+	},
+
+	bind: function( types, data, fn ) {
+		return this.on( types, null, data, fn );
+	},
+	unbind: function( types, fn ) {
+		return this.off( types, null, fn );
+	},
+
+	live: function( types, data, fn ) {
+		jQuery( this.context ).on( types, this.selector, data, fn );
+		return this;
+	},
+	die: function( types, fn ) {
+		jQuery( this.context ).off( types, this.selector || "**", fn );
+		return this;
+	},
+
+	delegate: function( selector, types, data, fn ) {
+		return this.on( types, selector, data, fn );
+	},
+	undelegate: function( selector, types, fn ) {
+		// ( namespace ) or ( selector, types [, fn] )
+		return arguments.length == 1? this.off( selector, "**" ) : this.off( types, selector, fn );
+	},
+
+	trigger: function( type, data ) {
+		return this.each(function() {
+			jQuery.event.trigger( type, data, this );
+		});
+	},
+	triggerHandler: function( type, data ) {
+		if ( this[0] ) {
+			return jQuery.event.trigger( type, data, this[0], true );
+		}
+	},
+
+	toggle: function( fn ) {
+		// Save reference to arguments for access in closure
+		var args = arguments,
+			guid = fn.guid || jQuery.guid++,
+			i = 0,
+			toggler = function( event ) {
+				// Figure out which function to execute
+				var lastToggle = ( jQuery._data( this, "lastToggle" + fn.guid ) || 0 ) % i;
+				jQuery._data( this, "lastToggle" + fn.guid, lastToggle + 1 );
+
+				// Make sure that clicks stop
+				event.preventDefault();
+
+				// and execute the function
+				return args[ lastToggle ].apply( this, arguments ) || false;
+			};
+
+		// link all the functions, so any of them can unbind this click handler
+		toggler.guid = guid;
+		while ( i < args.length ) {
+			args[ i++ ].guid = guid;
+		}
+
+		return this.click( toggler );
+	},
+
+	hover: function( fnOver, fnOut ) {
+		return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );
+	}
+});
+
+jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " +
+	"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
+	"change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) {
+
+	// Handle event binding
+	jQuery.fn[ name ] = function( data, fn ) {
+		if ( fn == null ) {
+			fn = data;
+			data = null;
+		}
+
+		return arguments.length > 0 ?
+			this.on( name, null, data, fn ) :
+			this.trigger( name );
+	};
+
+	if ( jQuery.attrFn ) {
+		jQuery.attrFn[ name ] = true;
+	}
+
+	if ( rkeyEvent.test( name ) ) {
+		jQuery.event.fixHooks[ name ] = jQuery.event.keyHooks;
+	}
+
+	if ( rmouseEvent.test( name ) ) {
+		jQuery.event.fixHooks[ name ] = jQuery.event.mouseHooks;
+	}
+});
+
+
+
+/*!
+ * Sizzle CSS Selector Engine
+ *  Copyright 2011, The Dojo Foundation
+ *  Released under the MIT, BSD, and GPL Licenses.
+ *  More information: http://sizzlejs.com/
+ */
+(function(){
+
+var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
+	expando = "sizcache" + (Math.random() + '').replace('.', ''),
+	done = 0,
+	toString = Object.prototype.toString,
+	hasDuplicate = false,
+	baseHasDuplicate = true,
+	rBackslash = /\\/g,
+	rReturn = /\r\n/g,
+	rNonWord = /\W/;
+
+// Here we check if the JavaScript engine is using some sort of
+// optimization where it does not always call our comparision
+// function. If that is the case, discard the hasDuplicate value.
+//   Thus far that includes Google Chrome.
+[0, 0].sort(function() {
+	baseHasDuplicate = false;
+	return 0;
+});
+
+var Sizzle = function( selector, context, results, seed ) {
+	results = results || [];
+	context = context || document;
+
+	var origContext = context;
+
+	if ( context.nodeType !== 1 && context.nodeType !== 9 ) {
+		return [];
+	}
+
+	if ( !selector || typeof selector !== "string" ) {
+		return results;
+	}
+
+	var m, set, checkSet, extra, ret, cur, pop, i,
+		prune = true,
+		contextXML = Sizzle.isXML( context ),
+		parts = [],
+		soFar = selector;
+
+	// Reset the position of the chunker regexp (start from head)
+	do {
+		chunker.exec( "" );
+		m = chunker.exec( soFar );
+
+		if ( m ) {
+			soFar = m[3];
+
+			parts.push( m[1] );
+
+			if ( m[2] ) {
+				extra = m[3];
+				break;
+			}
+		}
+	} while ( m );
+
+	if ( parts.length > 1 && origPOS.exec( selector ) ) {
+
+		if ( parts.length === 2 && Expr.relative[ parts[0] ] ) {
+			set = posProcess( parts[0] + parts[1], context, seed );
+
+		} else {
+			set = Expr.relative[ parts[0] ] ?
+				[ context ] :
+				Sizzle( parts.shift(), context );
+
+			while ( parts.length ) {
+				selector = parts.shift();
+
+				if ( Expr.relative[ selector ] ) {
+					selector += parts.shift();
+				}
+
+				set = posProcess( selector, set, seed );
+			}
+		}
+
+	} else {
+		// Take a shortcut and set the context if the root selector is an ID
+		// (but not if it'll be faster if the inner selector is an ID)
+		if ( !seed && parts.length > 1 && context.nodeType === 9 && !contextXML &&
+				Expr.match.ID.test(parts[0]) && !Expr.match.ID.test(parts[parts.length - 1]) ) {
+
+			ret = Sizzle.find( parts.shift(), context, contextXML );
+			context = ret.expr ?
+				Sizzle.filter( ret.expr, ret.set )[0] :
+				ret.set[0];
+		}
+
+		if ( context ) {
+			ret = seed ?
+				{ expr: parts.pop(), set: makeArray(seed) } :
+				Sizzle.find( parts.pop(), parts.length === 1 && (parts[0] === "~" || parts[0] === "+") && context.parentNode ? context.parentNode : context, contextXML );
+
+			set = ret.expr ?
+				Sizzle.filter( ret.expr, ret.set ) :
+				ret.set;
+
+			if ( parts.length > 0 ) {
+				checkSet = makeArray( set );
+
+			} else {
+				prune = false;
+			}
+
+			while ( parts.length ) {
+				cur = parts.pop();
+				pop = cur;
+
+				if ( !Expr.relative[ cur ] ) {
+					cur = "";
+				} else {
+					pop = parts.pop();
+				}
+
+				if ( pop == null ) {
+					pop = context;
+				}
+
+				Expr.relative[ cur ]( checkSet, pop, contextXML );
+			}
+
+		} else {
+			checkSet = parts = [];
+		}
+	}
+
+	if ( !checkSet ) {
+		checkSet = set;
+	}
+
+	if ( !checkSet ) {
+		Sizzle.error( cur || selector );
+	}
+
+	if ( toString.call(checkSet) === "[object Array]" ) {
+		if ( !prune ) {
+			results.push.apply( results, checkSet );
+
+		} else if ( context && context.nodeType === 1 ) {
+			for ( i = 0; checkSet[i] != null; i++ ) {
+				if ( checkSet[i] && (checkSet[i] === true || checkSet[i].nodeType === 1 && Sizzle.contains(context, checkSet[i])) ) {
+					results.push( set[i] );
+				}
+			}
+
+		} else {
+			for ( i = 0; checkSet[i] != null; i++ ) {
+				if ( checkSet[i] && checkSet[i].nodeType === 1 ) {
+					results.push( set[i] );
+				}
+			}
+		}
+
+	} else {
+		makeArray( checkSet, results );
+	}
+
+	if ( extra ) {
+		Sizzle( extra, origContext, results, seed );
+		Sizzle.uniqueSort( results );
+	}
+
+	return results;
+};
+
+Sizzle.uniqueSort = function( results ) {
+	if ( sortOrder ) {
+		hasDuplicate = baseHasDuplicate;
+		results.sort( sortOrder );
+
+		if ( hasDuplicate ) {
+			for ( var i = 1; i < results.length; i++ ) {
+				if ( results[i] === results[ i - 1 ] ) {
+					results.splice( i--, 1 );
+				}
+			}
+		}
+	}
+
+	return results;
+};
+
+Sizzle.matches = function( expr, set ) {
+	return Sizzle( expr, null, null, set );
+};
+
+Sizzle.matchesSelector = function( node, expr ) {
+	return Sizzle( expr, null, null, [node] ).length > 0;
+};
+
+Sizzle.find = function( expr, context, isXML ) {
+	var set, i, len, match, type, left;
+
+	if ( !expr ) {
+		return [];
+	}
+
+	for ( i = 0, len = Expr.order.length; i < len; i++ ) {
+		type = Expr.order[i];
+
+		if ( (match = Expr.leftMatch[ type ].exec( expr )) ) {
+			left = match[1];
+			match.splice( 1, 1 );
+
+			if ( left.substr( left.length - 1 ) !== "\\" ) {
+				match[1] = (match[1] || "").replace( rBackslash, "" );
+				set = Expr.find[ type ]( match, context, isXML );
+
+				if ( set != null ) {
+					expr = expr.replace( Expr.match[ type ], "" );
+					break;
+				}
+			}
+		}
+	}
+
+	if ( !set ) {
+		set = typeof context.getElementsByTagName !== "undefined" ?
+			context.getElementsByTagName( "*" ) :
+			[];
+	}
+
+	return { set: set, expr: expr };
+};
+
+Sizzle.filter = function( expr, set, inplace, not ) {
+	var match, anyFound,
+		type, found, item, filter, left,
+		i, pass,
+		old = expr,
+		result = [],
+		curLoop = set,
+		isXMLFilter = set && set[0] && Sizzle.isXML( set[0] );
+
+	while ( expr && set.length ) {
+		for ( type in Expr.filter ) {
+			if ( (match = Expr.leftMatch[ type ].exec( expr )) != null && match[2] ) {
+				filter = Expr.filter[ type ];
+				left = match[1];
+
+				anyFound = false;
+
+				match.splice(1,1);
+
+				if ( left.substr( left.length - 1 ) === "\\" ) {
+					continue;
+				}
+
+				if ( curLoop === result ) {
+					result = [];
+				}
+
+				if ( Expr.preFilter[ type ] ) {
+					match = Expr.preFilter[ type ]( match, curLoop, inplace, result, not, isXMLFilter );
+
+					if ( !match ) {
+						anyFound = found = true;
+
+					} else if ( match === true ) {
+						continue;
+					}
+				}
+
+				if ( match ) {
+					for ( i = 0; (item = curLoop[i]) != null; i++ ) {
+						if ( item ) {
+							found = filter( item, match, i, curLoop );
+							pass = not ^ found;
+
+							if ( inplace && found != null ) {
+								if ( pass ) {
+									anyFound = true;
+
+								} else {
+									curLoop[i] = false;
+								}
+
+							} else if ( pass ) {
+								result.push( item );
+								anyFound = true;
+							}
+						}
+					}
+				}
+
+				if ( found !== undefined ) {
+					if ( !inplace ) {
+						curLoop = result;
+					}
+
+					expr = expr.replace( Expr.match[ type ], "" );
+
+					if ( !anyFound ) {
+						return [];
+					}
+
+					break;
+				}
+			}
+		}
+
+		// Improper expression
+		if ( expr === old ) {
+			if ( anyFound == null ) {
+				Sizzle.error( expr );
+
+			} else {
+				break;
+			}
+		}
+
+		old = expr;
+	}
+
+	return curLoop;
+};
+
+Sizzle.error = function( msg ) {
+	throw new Error( "Syntax error, unrecognized expression: " + msg );
+};
+
+/**
+ * Utility function for retreiving the text value of an array of DOM nodes
+ * @param {Array|Element} elem
+ */
+var getText = Sizzle.getText = function( elem ) {
+    var i, node,
+		nodeType = elem.nodeType,
+		ret = "";
+
+	if ( nodeType ) {
+		if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {
+			// Use textContent || innerText for elements
+			if ( typeof elem.textContent === 'string' ) {
+				return elem.textContent;
+			} else if ( typeof elem.innerText === 'string' ) {
+				// Replace IE's carriage returns
+				return elem.innerText.replace( rReturn, '' );
+			} else {
+				// Traverse it's children
+				for ( elem = elem.firstChild; elem; elem = elem.nextSibling) {
+					ret += getText( elem );
+				}
+			}
+		} else if ( nodeType === 3 || nodeType === 4 ) {
+			return elem.nodeValue;
+		}
+	} else {
+
+		// If no nodeType, this is expected to be an array
+		for ( i = 0; (node = elem[i]); i++ ) {
+			// Do not traverse comment nodes
+			if ( node.nodeType !== 8 ) {
+				ret += getText( node );
+			}
+		}
+	}
+	return ret;
+};
+
+var Expr = Sizzle.selectors = {
+	order: [ "ID", "NAME", "TAG" ],
+
+	match: {
+		ID: /#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,
+		CLASS: /\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,
+		NAME: /\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,
+		ATTR: /\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,
+		TAG: /^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,
+		CHILD: /:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,
+		POS: /:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,
+		PSEUDO: /:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/
+	},
+
+	leftMatch: {},
+
+	attrMap: {
+		"class": "className",
+		"for": "htmlFor"
+	},
+
+	attrHandle: {
+		href: function( elem ) {
+			return elem.getAttribute( "href" );
+		},
+		type: function( elem ) {
+			return elem.getAttribute( "type" );
+		}
+	},
+
+	relative: {
+		"+": function(checkSet, part){
+			var isPartStr = typeof part === "string",
+				isTag = isPartStr && !rNonWord.test( part ),
+				isPartStrNotTag = isPartStr && !isTag;
+
+			if ( isTag ) {
+				part = part.toLowerCase();
+			}
+
+			for ( var i = 0, l = checkSet.length, elem; i < l; i++ ) {
+				if ( (elem = checkSet[i]) ) {
+					while ( (elem = elem.previousSibling) && elem.nodeType !== 1 ) {}
+
+					checkSet[i] = isPartStrNotTag || elem && elem.nodeName.toLowerCase() === part ?
+						elem || false :
+						elem === part;
+				}
+			}
+
+			if ( isPartStrNotTag ) {
+				Sizzle.filter( part, checkSet, true );
+			}
+		},
+
+		">": function( checkSet, part ) {
+			var elem,
+				isPartStr = typeof part === "string",
+				i = 0,
+				l = checkSet.length;
+
+			if ( isPartStr && !rNonWord.test( part ) ) {
+				part = part.toLowerCase();
+
+				for ( ; i < l; i++ ) {
+					elem = checkSet[i];
+
+					if ( elem ) {
+						var parent = elem.parentNode;
+						checkSet[i] = parent.nodeName.toLowerCase() === part ? parent : false;
+					}
+				}
+
+			} else {
+				for ( ; i < l; i++ ) {
+					elem = checkSet[i];
+
+					if ( elem ) {
+						checkSet[i] = isPartStr ?
+							elem.parentNode :
+							elem.parentNode === part;
+					}
+				}
+
+				if ( isPartStr ) {
+					Sizzle.filter( part, checkSet, true );
+				}
+			}
+		},
+
+		"": function(checkSet, part, isXML){
+			var nodeCheck,
+				doneName = done++,
+				checkFn = dirCheck;
+
+			if ( typeof part === "string" && !rNonWord.test( part ) ) {
+				part = part.toLowerCase();
+				nodeCheck = part;
+				checkFn = dirNodeCheck;
+			}
+
+			checkFn( "parentNode", part, doneName, checkSet, nodeCheck, isXML );
+		},
+
+		"~": function( checkSet, part, isXML ) {
+			var nodeCheck,
+				doneName = done++,
+				checkFn = dirCheck;
+
+			if ( typeof part === "string" && !rNonWord.test( part ) ) {
+				part = part.toLowerCase();
+				nodeCheck = part;
+				checkFn = dirNodeCheck;
+			}
+
+			checkFn( "previousSibling", part, doneName, checkSet, nodeCheck, isXML );
+		}
+	},
+
+	find: {
+		ID: function( match, context, isXML ) {
+			if ( typeof context.getElementById !== "undefined" && !isXML ) {
+				var m = context.getElementById(match[1]);
+				// Check parentNode to catch when Blackberry 4.6 returns
+				// nodes that are no longer in the document #6963
+				return m && m.parentNode ? [m] : [];
+			}
+		},
+
+		NAME: function( match, context ) {
+			if ( typeof context.getElementsByName !== "undefined" ) {
+				var ret = [],
+					results = context.getElementsByName( match[1] );
+
+				for ( var i = 0, l = results.length; i < l; i++ ) {
+					if ( results[i].getAttribute("name") === match[1] ) {
+						ret.push( results[i] );
+					}
+				}
+
+				return ret.length === 0 ? null : ret;
+			}
+		},
+
+		TAG: function( match, context ) {
+			if ( typeof context.getElementsByTagName !== "undefined" ) {
+				return context.getElementsByTagName( match[1] );
+			}
+		}
+	},
+	preFilter: {
+		CLASS: function( match, curLoop, inplace, result, not, isXML ) {
+			match = " " + match[1].replace( rBackslash, "" ) + " ";
+
+			if ( isXML ) {
+				return match;
+			}
+
+			for ( var i = 0, elem; (elem = curLoop[i]) != null; i++ ) {
+				if ( elem ) {
+					if ( not ^ (elem.className && (" " + elem.className + " ").replace(/[\t\n\r]/g, " ").indexOf(match) >= 0) ) {
+						if ( !inplace ) {
+							result.push( elem );
+						}
+
+					} else if ( inplace ) {
+						curLoop[i] = false;
+					}
+				}
+			}
+
+			return false;
+		},
+
+		ID: function( match ) {
+			return match[1].replace( rBackslash, "" );
+		},
+
+		TAG: function( match, curLoop ) {
+			return match[1].replace( rBackslash, "" ).toLowerCase();
+		},
+
+		CHILD: function( match ) {
+			if ( match[1] === "nth" ) {
+				if ( !match[2] ) {
+					Sizzle.error( match[0] );
+				}
+
+				match[2] = match[2].replace(/^\+|\s*/g, '');
+
+				// parse equations like 'even', 'odd', '5', '2n', '3n+2', '4n-1', '-n+6'
+				var test = /(-?)(\d*)(?:n([+\-]?\d*))?/.exec(
+					match[2] === "even" && "2n" || match[2] === "odd" && "2n+1" ||
+					!/\D/.test( match[2] ) && "0n+" + match[2] || match[2]);
+
+				// calculate the numbers (first)n+(last) including if they are negative
+				match[2] = (test[1] + (test[2] || 1)) - 0;
+				match[3] = test[3] - 0;
+			}
+			else if ( match[2] ) {
+				Sizzle.error( match[0] );
+			}
+
+			// TODO: Move to normal caching system
+			match[0] = done++;
+
+			return match;
+		},
+
+		ATTR: function( match, curLoop, inplace, result, not, isXML ) {
+			var name = match[1] = match[1].replace( rBackslash, "" );
+
+			if ( !isXML && Expr.attrMap[name] ) {
+				match[1] = Expr.attrMap[name];
+			}
+
+			// Handle if an un-quoted value was used
+			match[4] = ( match[4] || match[5] || "" ).replace( rBackslash, "" );
+
+			if ( match[2] === "~=" ) {
+				match[4] = " " + match[4] + " ";
+			}
+
+			return match;
+		},
+
+		PSEUDO: function( match, curLoop, inplace, result, not ) {
+			if ( match[1] === "not" ) {
+				// If we're dealing with a complex expression, or a simple one
+				if ( ( chunker.exec(match[3]) || "" ).length > 1 || /^\w/.test(match[3]) ) {
+					match[3] = Sizzle(match[3], null, null, curLoop);
+
+				} else {
+					var ret = Sizzle.filter(match[3], curLoop, inplace, true ^ not);
+
+					if ( !inplace ) {
+						result.push.apply( result, ret );
+					}
+
+					return false;
+				}
+
+			} else if ( Expr.match.POS.test( match[0] ) || Expr.match.CHILD.test( match[0] ) ) {
+				return true;
+			}
+
+			return match;
+		},
+
+		POS: function( match ) {
+			match.unshift( true );
+
+			return match;
+		}
+	},
+
+	filters: {
+		enabled: function( elem ) {
+			return elem.disabled === false && elem.type !== "hidden";
+		},
+
+		disabled: function( elem ) {
+			return elem.disabled === true;
+		},
+
+		checked: function( elem ) {
+			return elem.checked === true;
+		},
+
+		selected: function( elem ) {
+			// Accessing this property makes selected-by-default
+			// options in Safari work properly
+			if ( elem.parentNode ) {
+				elem.parentNode.selectedIndex;
+			}
+
+			return elem.selected === true;
+		},
+
+		parent: function( elem ) {
+			return !!elem.firstChild;
+		},
+
+		empty: function( elem ) {
+			return !elem.firstChild;
+		},
+
+		has: function( elem, i, match ) {
+			return !!Sizzle( match[3], elem ).length;
+		},
+
+		header: function( elem ) {
+			return (/h\d/i).test( elem.nodeName );
+		},
+
+		text: function( elem ) {
+			var attr = elem.getAttribute( "type" ), type = elem.type;
+			// IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc)
+			// use getAttribute instead to test this case
+			return elem.nodeName.toLowerCase() === "input" && "text" === type && ( attr === type || attr === null );
+		},
+
+		radio: function( elem ) {
+			return elem.nodeName.toLowerCase() === "input" && "radio" === elem.type;
+		},
+
+		checkbox: function( elem ) {
+			return elem.nodeName.toLowerCase() === "input" && "checkbox" === elem.type;
+		},
+
+		file: function( elem ) {
+			return elem.nodeName.toLowerCase() === "input" && "file" === elem.type;
+		},
+
+		password: function( elem ) {
+			return elem.nodeName.toLowerCase() === "input" && "password" === elem.type;
+		},
+
+		submit: function( elem ) {
+			var name = elem.nodeName.toLowerCase();
+			return (name === "input" || name === "button") && "submit" === elem.type;
+		},
+
+		image: function( elem ) {
+			return elem.nodeName.toLowerCase() === "input" && "image" === elem.type;
+		},
+
+		reset: function( elem ) {
+			var name = elem.nodeName.toLowerCase();
+			return (name === "input" || name === "button") && "reset" === elem.type;
+		},
+
+		button: function( elem ) {
+			var name = elem.nodeName.toLowerCase();
+			return name === "input" && "button" === elem.type || name === "button";
+		},
+
+		input: function( elem ) {
+			return (/input|select|textarea|button/i).test( elem.nodeName );
+		},
+
+		focus: function( elem ) {
+			return elem === elem.ownerDocument.activeElement;
+		}
+	},
+	setFilters: {
+		first: function( elem, i ) {
+			return i === 0;
+		},
+
+		last: function( elem, i, match, array ) {
+			return i === array.length - 1;
+		},
+
+		even: function( elem, i ) {
+			return i % 2 === 0;
+		},
+
+		odd: function( elem, i ) {
+			return i % 2 === 1;
+		},
+
+		lt: function( elem, i, match ) {
+			return i < match[3] - 0;
+		},
+
+		gt: function( elem, i, match ) {
+			return i > match[3] - 0;
+		},
+
+		nth: function( elem, i, match ) {
+			return match[3] - 0 === i;
+		},
+
+		eq: function( elem, i, match ) {
+			return match[3] - 0 === i;
+		}
+	},
+	filter: {
+		PSEUDO: function( elem, match, i, array ) {
+			var name = match[1],
+				filter = Expr.filters[ name ];
+
+			if ( filter ) {
+				return filter( elem, i, match, array );
+
+			} else if ( name === "contains" ) {
+				return (elem.textContent || elem.innerText || getText([ elem ]) || "").indexOf(match[3]) >= 0;
+
+			} else if ( name === "not" ) {
+				var not = match[3];
+
+				for ( var j = 0, l = not.length; j < l; j++ ) {
+					if ( not[j] === elem ) {
+						return false;
+					}
+				}
+
+				return true;
+
+			} else {
+				Sizzle.error( name );
+			}
+		},
+
+		CHILD: function( elem, match ) {
+			var first, last,
+				doneName, parent, cache,
+				count, diff,
+				type = match[1],
+				node = elem;
+
+			switch ( type ) {
+				case "only":
+				case "first":
+					while ( (node = node.previousSibling) ) {
+						if ( node.nodeType === 1 ) {
+							return false;
+						}
+					}
+
+					if ( type === "first" ) {
+						return true;
+					}
+
+					node = elem;
+
+					/* falls through */
+				case "last":
+					while ( (node = node.nextSibling) ) {
+						if ( node.nodeType === 1 ) {
+							return false;
+						}
+					}
+
+					return true;
+
+				case "nth":
+					first = match[2];
+					last = match[3];
+
+					if ( first === 1 && last === 0 ) {
+						return true;
+					}
+
+					doneName = match[0];
+					parent = elem.parentNode;
+
+					if ( parent && (parent[ expando ] !== doneName || !elem.nodeIndex) ) {
+						count = 0;
+
+						for ( node = parent.firstChild; node; node = node.nextSibling ) {
+							if ( node.nodeType === 1 ) {
+								node.nodeIndex = ++count;
+							}
+						}
+
+						parent[ expando ] = doneName;
+					}
+
+					diff = elem.nodeIndex - last;
+
+					if ( first === 0 ) {
+						return diff === 0;
+
+					} else {
+						return ( diff % first === 0 && diff / first >= 0 );
+					}
+			}
+		},
+
+		ID: function( elem, match ) {
+			return elem.nodeType === 1 && elem.getAttribute("id") === match;
+		},
+
+		TAG: function( elem, match ) {
+			return (match === "*" && elem.nodeType === 1) || !!elem.nodeName && elem.nodeName.toLowerCase() === match;
+		},
+
+		CLASS: function( elem, match ) {
+			return (" " + (elem.className || elem.getAttribute("class")) + " ")
+				.indexOf( match ) > -1;
+		},
+
+		ATTR: function( elem, match ) {
+			var name = match[1],
+				result = Sizzle.attr ?
+					Sizzle.attr( elem, name ) :
+					Expr.attrHandle[ name ] ?
+					Expr.attrHandle[ name ]( elem ) :
+					elem[ name ] != null ?
+						elem[ name ] :
+						elem.getAttribute( name ),
+				value = result + "",
+				type = match[2],
+				check = match[4];
+
+			return result == null ?
+				type === "!=" :
+				!type && Sizzle.attr ?
+				result != null :
+				type === "=" ?
+				value === check :
+				type === "*=" ?
+				value.indexOf(check) >= 0 :
+				type === "~=" ?
+				(" " + value + " ").indexOf(check) >= 0 :
+				!check ?
+				value && result !== false :
+				type === "!=" ?
+				value !== check :
+				type === "^=" ?
+				value.indexOf(check) === 0 :
+				type === "$=" ?
+				value.substr(value.length - check.length) === check :
+				type === "|=" ?
+				value === check || value.substr(0, check.length + 1) === check + "-" :
+				false;
+		},
+
+		POS: function( elem, match, i, array ) {
+			var name = match[2],
+				filter = Expr.setFilters[ name ];
+
+			if ( filter ) {
+				return filter( elem, i, match, array );
+			}
+		}
+	}
+};
+
+var origPOS = Expr.match.POS,
+	fescape = function(all, num){
+		return "\\" + (num - 0 + 1);
+	};
+
+for ( var type in Expr.match ) {
+	Expr.match[ type ] = new RegExp( Expr.match[ type ].source + (/(?![^\[]*\])(?![^\(]*\))/.source) );
+	Expr.leftMatch[ type ] = new RegExp( /(^(?:.|\r|\n)*?)/.source + Expr.match[ type ].source.replace(/\\(\d+)/g, fescape) );
+}
+// Expose origPOS
+// "global" as in regardless of relation to brackets/parens
+Expr.match.globalPOS = origPOS;
+
+var makeArray = function( array, results ) {
+	array = Array.prototype.slice.call( array, 0 );
+
+	if ( results ) {
+		results.push.apply( results, array );
+		return results;
+	}
+
+	return array;
+};
+
+// Perform a simple check to determine if the browser is capable of
+// converting a NodeList to an array using builtin methods.
+// Also verifies that the returned array holds DOM nodes
+// (which is not the case in the Blackberry browser)
+try {
+	Array.prototype.slice.call( document.documentElement.childNodes, 0 )[0].nodeType;
+
+// Provide a fallback method if it does not work
+} catch( e ) {
+	makeArray = function( array, results ) {
+		var i = 0,
+			ret = results || [];
+
+		if ( toString.call(array) === "[object Array]" ) {
+			Array.prototype.push.apply( ret, array );
+
+		} else {
+			if ( typeof array.length === "number" ) {
+				for ( var l = array.length; i < l; i++ ) {
+					ret.push( array[i] );
+				}
+
+			} else {
+				for ( ; array[i]; i++ ) {
+					ret.push( array[i] );
+				}
+			}
+		}
+
+		return ret;
+	};
+}
+
+var sortOrder, siblingCheck;
+
+if ( document.documentElement.compareDocumentPosition ) {
+	sortOrder = function( a, b ) {
+		if ( a === b ) {
+			hasDuplicate = true;
+			return 0;
+		}
+
+		if ( !a.compareDocumentPosition || !b.compareDocumentPosition ) {
+			return a.compareDocumentPosition ? -1 : 1;
+		}
+
+		return a.compareDocumentPosition(b) & 4 ? -1 : 1;
+	};
+
+} else {
+	sortOrder = function( a, b ) {
+		// The nodes are identical, we can exit early
+		if ( a === b ) {
+			hasDuplicate = true;
+			return 0;
+
+		// Fallback to using sourceIndex (in IE) if it's available on both nodes
+		} else if ( a.sourceIndex && b.sourceIndex ) {
+			return a.sourceIndex - b.sourceIndex;
+		}
+
+		var al, bl,
+			ap = [],
+			bp = [],
+			aup = a.parentNode,
+			bup = b.parentNode,
+			cur = aup;
+
+		// If the nodes are siblings (or identical) we can do a quick check
+		if ( aup === bup ) {
+			return siblingCheck( a, b );
+
+		// If no parents were found then the nodes are disconnected
+		} else if ( !aup ) {
+			return -1;
+
+		} else if ( !bup ) {
+			return 1;
+		}
+
+		// Otherwise they're somewhere else in the tree so we need
+		// to build up a full list of the parentNodes for comparison
+		while ( cur ) {
+			ap.unshift( cur );
+			cur = cur.parentNode;
+		}
+
+		cur = bup;
+
+		while ( cur ) {
+			bp.unshift( cur );
+			cur = cur.parentNode;
+		}
+
+		al = ap.length;
+		bl = bp.length;
+
+		// Start walking down the tree looking for a discrepancy
+		for ( var i = 0; i < al && i < bl; i++ ) {
+			if ( ap[i] !== bp[i] ) {
+				return siblingCheck( ap[i], bp[i] );
+			}
+		}
+
+		// We ended someplace up the tree so do a sibling check
+		return i === al ?
+			siblingCheck( a, bp[i], -1 ) :
+			siblingCheck( ap[i], b, 1 );
+	};
+
+	siblingCheck = function( a, b, ret ) {
+		if ( a === b ) {
+			return ret;
+		}
+
+		var cur = a.nextSibling;
+
+		while ( cur ) {
+			if ( cur === b ) {
+				return -1;
+			}
+
+			cur = cur.nextSibling;
+		}
+
+		return 1;
+	};
+}
+
+// Check to see if the browser returns elements by name when
+// querying by getElementById (and provide a workaround)
+(function(){
+	// We're going to inject a fake input element with a specified name
+	var form = document.createElement("div"),
+		id = "script" + (new Date()).getTime(),
+		root = document.documentElement;
+
+	form.innerHTML = "<a name='" + id + "'/>";
+
+	// Inject it into the root element, check its status, and remove it quickly
+	root.insertBefore( form, root.firstChild );
+
+	// The workaround has to do additional checks after a getElementById
+	// Which slows things down for other browsers (hence the branching)
+	if ( document.getElementById( id ) ) {
+		Expr.find.ID = function( match, context, isXML ) {
+			if ( typeof context.getElementById !== "undefined" && !isXML ) {
+				var m = context.getElementById(match[1]);
+
+				return m ?
+					m.id === match[1] || typeof m.getAttributeNode !== "undefined" && m.getAttributeNode("id").nodeValue === match[1] ?
+						[m] :
+						undefined :
+					[];
+			}
+		};
+
+		Expr.filter.ID = function( elem, match ) {
+			var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id");
+
+			return elem.nodeType === 1 && node && node.nodeValue === match;
+		};
+	}
+
+	root.removeChild( form );
+
+	// release memory in IE
+	root = form = null;
+})();
+
+(function(){
+	// Check to see if the browser returns only elements
+	// when doing getElementsByTagName("*")
+
+	// Create a fake element
+	var div = document.createElement("div");
+	div.appendChild( document.createComment("") );
+
+	// Make sure no comments are found
+	if ( div.getElementsByTagName("*").length > 0 ) {
+		Expr.find.TAG = function( match, context ) {
+			var results = context.getElementsByTagName( match[1] );
+
+			// Filter out possible comments
+			if ( match[1] === "*" ) {
+				var tmp = [];
+
+				for ( var i = 0; results[i]; i++ ) {
+					if ( results[i].nodeType === 1 ) {
+						tmp.push( results[i] );
+					}
+				}
+
+				results = tmp;
+			}
+
+			return results;
+		};
+	}
+
+	// Check to see if an attribute returns normalized href attributes
+	div.innerHTML = "<a href='#'></a>";
+
+	if ( div.firstChild && typeof div.firstChild.getAttribute !== "undefined" &&
+			div.firstChild.getAttribute("href") !== "#" ) {
+
+		Expr.attrHandle.href = function( elem ) {
+			return elem.getAttribute( "href", 2 );
+		};
+	}
+
+	// release memory in IE
+	div = null;
+})();
+
+if ( document.querySelectorAll ) {
+	(function(){
+		var oldSizzle = Sizzle,
+			div = document.createElement("div"),
+			id = "__sizzle__";
+
+		div.innerHTML = "<p class='TEST'></p>";
+
+		// Safari can't handle uppercase or unicode characters when
+		// in quirks mode.
+		if ( div.querySelectorAll && div.querySelectorAll(".TEST").length === 0 ) {
+			return;
+		}
+
+		Sizzle = function( query, context, extra, seed ) {
+			context = context || document;
+
+			// Only use querySelectorAll on non-XML documents
+			// (ID selectors don't work in non-HTML documents)
+			if ( !seed && !Sizzle.isXML(context) ) {
+				// See if we find a selector to speed up
+				var match = /^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec( query );
+
+				if ( match && (context.nodeType === 1 || context.nodeType === 9) ) {
+					// Speed-up: Sizzle("TAG")
+					if ( match[1] ) {
+						return makeArray( context.getElementsByTagName( query ), extra );
+
+					// Speed-up: Sizzle(".CLASS")
+					} else if ( match[2] && Expr.find.CLASS && context.getElementsByClassName ) {
+						return makeArray( context.getElementsByClassName( match[2] ), extra );
+					}
+				}
+
+				if ( context.nodeType === 9 ) {
+					// Speed-up: Sizzle("body")
+					// The body element only exists once, optimize finding it
+					if ( query === "body" && context.body ) {
+						return makeArray( [ context.body ], extra );
+
+					// Speed-up: Sizzle("#ID")
+					} else if ( match && match[3] ) {
+						var elem = context.getElementById( match[3] );
+
+						// Check parentNode to catch when Blackberry 4.6 returns
+						// nodes that are no longer in the document #6963
+						if ( elem && elem.parentNode ) {
+							// Handle the case where IE and Opera return items
+							// by name instead of ID
+							if ( elem.id === match[3] ) {
+								return makeArray( [ elem ], extra );
+							}
+
+						} else {
+							return makeArray( [], extra );
+						}
+					}
+
+					try {
+						return makeArray( context.querySelectorAll(query), extra );
+					} catch(qsaError) {}
+
+				// qSA works strangely on Element-rooted queries
+				// We can work around this by specifying an extra ID on the root
+				// and working up from there (Thanks to Andrew Dupont for the technique)
+				// IE 8 doesn't work on object elements
+				} else if ( context.nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) {
+					var oldContext = context,
+						old = context.getAttribute( "id" ),
+						nid = old || id,
+						hasParent = context.parentNode,
+						relativeHierarchySelector = /^\s*[+~]/.test( query );
+
+					if ( !old ) {
+						context.setAttribute( "id", nid );
+					} else {
+						nid = nid.replace( /'/g, "\\$&" );
+					}
+					if ( relativeHierarchySelector && hasParent ) {
+						context = context.parentNode;
+					}
+
+					try {
+						if ( !relativeHierarchySelector || hasParent ) {
+							return makeArray( context.querySelectorAll( "[id='" + nid + "'] " + query ), extra );
+						}
+
+					} catch(pseudoError) {
+					} finally {
+						if ( !old ) {
+							oldContext.removeAttribute( "id" );
+						}
+					}
+				}
+			}
+
+			return oldSizzle(query, context, extra, seed);
+		};
+
+		for ( var prop in oldSizzle ) {
+			Sizzle[ prop ] = oldSizzle[ prop ];
+		}
+
+		// release memory in IE
+		div = null;
+	})();
+}
+
+(function(){
+	var html = document.documentElement,
+		matches = html.matchesSelector || html.mozMatchesSelector || html.webkitMatchesSelector || html.msMatchesSelector;
+
+	if ( matches ) {
+		// Check to see if it's possible to do matchesSelector
+		// on a disconnected node (IE 9 fails this)
+		var disconnectedMatch = !matches.call( document.createElement( "div" ), "div" ),
+			pseudoWorks = false;
+
+		try {
+			// This should fail with an exception
+			// Gecko does not error, returns false instead
+			matches.call( document.documentElement, "[test!='']:sizzle" );
+
+		} catch( pseudoError ) {
+			pseudoWorks = true;
+		}
+
+		Sizzle.matchesSelector = function( node, expr ) {
+			// Make sure that attribute selectors are quoted
+			expr = expr.replace(/\=\s*([^'"\]]*)\s*\]/g, "='$1']");
+
+			if ( !Sizzle.isXML( node ) ) {
+				try {
+					if ( pseudoWorks || !Expr.match.PSEUDO.test( expr ) && !/!=/.test( expr ) ) {
+						var ret = matches.call( node, expr );
+
+						// IE 9's matchesSelector returns false on disconnected nodes
+						if ( ret || !disconnectedMatch ||
+								// As well, disconnected nodes are said to be in a document
+								// fragment in IE 9, so check for that
+								node.document && node.document.nodeType !== 11 ) {
+							return ret;
+						}
+					}
+				} catch(e) {}
+			}
+
+			return Sizzle(expr, null, null, [node]).length > 0;
+		};
+	}
+})();
+
+(function(){
+	var div = document.createElement("div");
+
+	div.innerHTML = "<div class='test e'></div><div class='test'></div>";
+
+	// Opera can't find a second classname (in 9.6)
+	// Also, make sure that getElementsByClassName actually exists
+	if ( !div.getElementsByClassName || div.getElementsByClassName("e").length === 0 ) {
+		return;
+	}
+
+	// Safari caches class attributes, doesn't catch changes (in 3.2)
+	div.lastChild.className = "e";
+
+	if ( div.getElementsByClassName("e").length === 1 ) {
+		return;
+	}
+
+	Expr.order.splice(1, 0, "CLASS");
+	Expr.find.CLASS = function( match, context, isXML ) {
+		if ( typeof context.getElementsByClassName !== "undefined" && !isXML ) {
+			return context.getElementsByClassName(match[1]);
+		}
+	};
+
+	// release memory in IE
+	div = null;
+})();
+
+function dirNodeCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
+	for ( var i = 0, l = checkSet.length; i < l; i++ ) {
+		var elem = checkSet[i];
+
+		if ( elem ) {
+			var match = false;
+
+			elem = elem[dir];
+
+			while ( elem ) {
+				if ( elem[ expando ] === doneName ) {
+					match = checkSet[elem.sizset];
+					break;
+				}
+
+				if ( elem.nodeType === 1 && !isXML ){
+					elem[ expando ] = doneName;
+					elem.sizset = i;
+				}
+
+				if ( elem.nodeName.toLowerCase() === cur ) {
+					match = elem;
+					break;
+				}
+
+				elem = elem[dir];
+			}
+
+			checkSet[i] = match;
+		}
+	}
+}
+
+function dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
+	for ( var i = 0, l = checkSet.length; i < l; i++ ) {
+		var elem = checkSet[i];
+
+		if ( elem ) {
+			var match = false;
+
+			elem = elem[dir];
+
+			while ( elem ) {
+				if ( elem[ expando ] === doneName ) {
+					match = checkSet[elem.sizset];
+					break;
+				}
+
+				if ( elem.nodeType === 1 ) {
+					if ( !isXML ) {
+						elem[ expando ] = doneName;
+						elem.sizset = i;
+					}
+
+					if ( typeof cur !== "string" ) {
+						if ( elem === cur ) {
+							match = true;
+							break;
+						}
+
+					} else if ( Sizzle.filter( cur, [elem] ).length > 0 ) {
+						match = elem;
+						break;
+					}
+				}
+
+				elem = elem[dir];
+			}
+
+			checkSet[i] = match;
+		}
+	}
+}
+
+if ( document.documentElement.contains ) {
+	Sizzle.contains = function( a, b ) {
+		return a !== b && (a.contains ? a.contains(b) : true);
+	};
+
+} else if ( document.documentElement.compareDocumentPosition ) {
+	Sizzle.contains = function( a, b ) {
+		return !!(a.compareDocumentPosition(b) & 16);
+	};
+
+} else {
+	Sizzle.contains = function() {
+		return false;
+	};
+}
+
+Sizzle.isXML = function( elem ) {
+	// documentElement is verified for cases where it doesn't yet exist
+	// (such as loading iframes in IE - #4833)
+	var documentElement = (elem ? elem.ownerDocument || elem : 0).documentElement;
+
+	return documentElement ? documentElement.nodeName !== "HTML" : false;
+};
+
+var posProcess = function( selector, context, seed ) {
+	var match,
+		tmpSet = [],
+		later = "",
+		root = context.nodeType ? [context] : context;
+
+	// Position selectors must be done after the filter
+	// And so must :not(positional) so we move all PSEUDOs to the end
+	while ( (match = Expr.match.PSEUDO.exec( selector )) ) {
+		later += match[0];
+		selector = selector.replace( Expr.match.PSEUDO, "" );
+	}
+
+	selector = Expr.relative[selector] ? selector + "*" : selector;
+
+	for ( var i = 0, l = root.length; i < l; i++ ) {
+		Sizzle( selector, root[i], tmpSet, seed );
+	}
+
+	return Sizzle.filter( later, tmpSet );
+};
+
+// EXPOSE
+// Override sizzle attribute retrieval
+Sizzle.attr = jQuery.attr;
+Sizzle.selectors.attrMap = {};
+jQuery.find = Sizzle;
+jQuery.expr = Sizzle.selectors;
+jQuery.expr[":"] = jQuery.expr.filters;
+jQuery.unique = Sizzle.uniqueSort;
+jQuery.text = Sizzle.getText;
+jQuery.isXMLDoc = Sizzle.isXML;
+jQuery.contains = Sizzle.contains;
+
+
+})();
+
+
+var runtil = /Until$/,
+	rparentsprev = /^(?:parents|prevUntil|prevAll)/,
+	// Note: This RegExp should be improved, or likely pulled from Sizzle
+	rmultiselector = /,/,
+	isSimple = /^.[^:#\[\.,]*$/,
+	slice = Array.prototype.slice,
+	POS = jQuery.expr.match.globalPOS,
+	// methods guaranteed to produce a unique set when starting from a unique set
+	guaranteedUnique = {
+		children: true,
+		contents: true,
+		next: true,
+		prev: true
+	};
+
+jQuery.fn.extend({
+	find: function( selector ) {
+		var self = this,
+			i, l;
+
+		if ( typeof selector !== "string" ) {
+			return jQuery( selector ).filter(function() {
+				for ( i = 0, l = self.length; i < l; i++ ) {
+					if ( jQuery.contains( self[ i ], this ) ) {
+						return true;
+					}
+				}
+			});
+		}
+
+		var ret = this.pushStack( "", "find", selector ),
+			length, n, r;
+
+		for ( i = 0, l = this.length; i < l; i++ ) {
+			length = ret.length;
+			jQuery.find( selector, this[i], ret );
+
+			if ( i > 0 ) {
+				// Make sure that the results are unique
+				for ( n = length; n < ret.length; n++ ) {
+					for ( r = 0; r < length; r++ ) {
+						if ( ret[r] === ret[n] ) {
+							ret.splice(n--, 1);
+							break;
+						}
+					}
+				}
+			}
+		}
+
+		return ret;
+	},
+
+	has: function( target ) {
+		var targets = jQuery( target );
+		return this.filter(function() {
+			for ( var i = 0, l = targets.length; i < l; i++ ) {
+				if ( jQuery.contains( this, targets[i] ) ) {
+					return true;
+				}
+			}
+		});
+	},
+
+	not: function( selector ) {
+		return this.pushStack( winnow(this, selector, false), "not", selector);
+	},
+
+	filter: function( selector ) {
+		return this.pushStack( winnow(this, selector, true), "filter", selector );
+	},
+
+	is: function( selector ) {
+		return !!selector && (
+			typeof selector === "string" ?
+				// If this is a positional selector, check membership in the returned set
+				// so $("p:first").is("p:last") won't return true for a doc with two "p".
+				POS.test( selector ) ?
+					jQuery( selector, this.context ).index( this[0] ) >= 0 :
+					jQuery.filter( selector, this ).length > 0 :
+				this.filter( selector ).length > 0 );
+	},
+
+	closest: function( selectors, context ) {
+		var ret = [], i, l, cur = this[0];
+
+		// Array (deprecated as of jQuery 1.7)
+		if ( jQuery.isArray( selectors ) ) {
+			var level = 1;
+
+			while ( cur && cur.ownerDocument && cur !== context ) {
+				for ( i = 0; i < selectors.length; i++ ) {
+
+					if ( jQuery( cur ).is( selectors[ i ] ) ) {
+						ret.push({ selector: selectors[ i ], elem: cur, level: level });
+					}
+				}
+
+				cur = cur.parentNode;
+				level++;
+			}
+
+			return ret;
+		}
+
+		// String
+		var pos = POS.test( selectors ) || typeof selectors !== "string" ?
+				jQuery( selectors, context || this.context ) :
+				0;
+
+		for ( i = 0, l = this.length; i < l; i++ ) {
+			cur = this[i];
+
+			while ( cur ) {
+				if ( pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors) ) {
+					ret.push( cur );
+					break;
+
+				} else {
+					cur = cur.parentNode;
+					if ( !cur || !cur.ownerDocument || cur === context || cur.nodeType === 11 ) {
+						break;
+					}
+				}
+			}
+		}
+
+		ret = ret.length > 1 ? jQuery.unique( ret ) : ret;
+
+		return this.pushStack( ret, "closest", selectors );
+	},
+
+	// Determine the position of an element within
+	// the matched set of elements
+	index: function( elem ) {
+
+		// No argument, return index in parent
+		if ( !elem ) {
+			return ( this[0] && this[0].parentNode ) ? this.prevAll().length : -1;
+		}
+
+		// index in selector
+		if ( typeof elem === "string" ) {
+			return jQuery.inArray( this[0], jQuery( elem ) );
+		}
+
+		// Locate the position of the desired element
+		return jQuery.inArray(
+			// If it receives a jQuery object, the first element is used
+			elem.jquery ? elem[0] : elem, this );
+	},
+
+	add: function( selector, context ) {
+		var set = typeof selector === "string" ?
+				jQuery( selector, context ) :
+				jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ),
+			all = jQuery.merge( this.get(), set );
+
+		return this.pushStack( isDisconnected( set[0] ) || isDisconnected( all[0] ) ?
+			all :
+			jQuery.unique( all ) );
+	},
+
+	andSelf: function() {
+		return this.add( this.prevObject );
+	}
+});
+
+// A painfully simple check to see if an element is disconnected
+// from a document (should be improved, where feasible).
+function isDisconnected( node ) {
+	return !node || !node.parentNode || node.parentNode.nodeType === 11;
+}
+
+jQuery.each({
+	parent: function( elem ) {
+		var parent = elem.parentNode;
+		return parent && parent.nodeType !== 11 ? parent : null;
+	},
+	parents: function( elem ) {
+		return jQuery.dir( elem, "parentNode" );
+	},
+	parentsUntil: function( elem, i, until ) {
+		return jQuery.dir( elem, "parentNode", until );
+	},
+	next: function( elem ) {
+		return jQuery.nth( elem, 2, "nextSibling" );
+	},
+	prev: function( elem ) {
+		return jQuery.nth( elem, 2, "previousSibling" );
+	},
+	nextAll: function( elem ) {
+		return jQuery.dir( elem, "nextSibling" );
+	},
+	prevAll: function( elem ) {
+		return jQuery.dir( elem, "previousSibling" );
+	},
+	nextUntil: function( elem, i, until ) {
+		return jQuery.dir( elem, "nextSibling", until );
+	},
+	prevUntil: function( elem, i, until ) {
+		return jQuery.dir( elem, "previousSibling", until );
+	},
+	siblings: function( elem ) {
+		return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem );
+	},
+	children: function( elem ) {
+		return jQuery.sibling( elem.firstChild );
+	},
+	contents: function( elem ) {
+		return jQuery.nodeName( elem, "iframe" ) ?
+			elem.contentDocument || elem.contentWindow.document :
+			jQuery.makeArray( elem.childNodes );
+	}
+}, function( name, fn ) {
+	jQuery.fn[ name ] = function( until, selector ) {
+		var ret = jQuery.map( this, fn, until );
+
+		if ( !runtil.test( name ) ) {
+			selector = until;
+		}
+
+		if ( selector && typeof selector === "string" ) {
+			ret = jQuery.filter( selector, ret );
+		}
+
+		ret = this.length > 1 && !guaranteedUnique[ name ] ? jQuery.unique( ret ) : ret;
+
+		if ( (this.length > 1 || rmultiselector.test( selector )) && rparentsprev.test( name ) ) {
+			ret = ret.reverse();
+		}
+
+		return this.pushStack( ret, name, slice.call( arguments ).join(",") );
+	};
+});
+
+jQuery.extend({
+	filter: function( expr, elems, not ) {
+		if ( not ) {
+			expr = ":not(" + expr + ")";
+		}
+
+		return elems.length === 1 ?
+			jQuery.find.matchesSelector(elems[0], expr) ? [ elems[0] ] : [] :
+			jQuery.find.matches(expr, elems);
+	},
+
+	dir: function( elem, dir, until ) {
+		var matched = [],
+			cur = elem[ dir ];
+
+		while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) {
+			if ( cur.nodeType === 1 ) {
+				matched.push( cur );
+			}
+			cur = cur[dir];
+		}
+		return matched;
+	},
+
+	nth: function( cur, result, dir, elem ) {
+		result = result || 1;
+		var num = 0;
+
+		for ( ; cur; cur = cur[dir] ) {
+			if ( cur.nodeType === 1 && ++num === result ) {
+				break;
+			}
+		}
+
+		return cur;
+	},
+
+	sibling: function( n, elem ) {
+		var r = [];
+
+		for ( ; n; n = n.nextSibling ) {
+			if ( n.nodeType === 1 && n !== elem ) {
+				r.push( n );
+			}
+		}
+
+		return r;
+	}
+});
+
+// Implement the identical functionality for filter and not
+function winnow( elements, qualifier, keep ) {
+
+	// Can't pass null or undefined to indexOf in Firefox 4
+	// Set to 0 to skip string check
+	qualifier = qualifier || 0;
+
+	if ( jQuery.isFunction( qualifier ) ) {
+		return jQuery.grep(elements, function( elem, i ) {
+			var retVal = !!qualifier.call( elem, i, elem );
+			return retVal === keep;
+		});
+
+	} else if ( qualifier.nodeType ) {
+		return jQuery.grep(elements, function( elem, i ) {
+			return ( elem === qualifier ) === keep;
+		});
+
+	} else if ( typeof qualifier === "string" ) {
+		var filtered = jQuery.grep(elements, function( elem ) {
+			return elem.nodeType === 1;
+		});
+
+		if ( isSimple.test( qualifier ) ) {
+			return jQuery.filter(qualifier, filtered, !keep);
+		} else {
+			qualifier = jQuery.filter( qualifier, filtered );
+		}
+	}
+
+	return jQuery.grep(elements, function( elem, i ) {
+		return ( jQuery.inArray( elem, qualifier ) >= 0 ) === keep;
+	});
+}
+
+
+
+
+function createSafeFragment( document ) {
+	var list = nodeNames.split( "|" ),
+	safeFrag = document.createDocumentFragment();
+
+	if ( safeFrag.createElement ) {
+		while ( list.length ) {
+			safeFrag.createElement(
+				list.pop()
+			);
+		}
+	}
+	return safeFrag;
+}
+
+var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|" +
+		"header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",
+	rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g,
+	rleadingWhitespace = /^\s+/,
+	rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,
+	rtagName = /<([\w:]+)/,
+	rtbody = /<tbody/i,
+	rhtml = /<|&#?\w+;/,
+	rnoInnerhtml = /<(?:script|style)/i,
+	rnocache = /<(?:script|object|embed|option|style)/i,
+	rnoshimcache = new RegExp("<(?:" + nodeNames + ")[\\s/>]", "i"),
+	// checked="checked" or checked
+	rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
+	rscriptType = /\/(java|ecma)script/i,
+	rcleanScript = /^\s*<!(?:\[CDATA\[|\-\-)/,
+	wrapMap = {
+		option: [ 1, "<select multiple='multiple'>", "</select>" ],
+		legend: [ 1, "<fieldset>", "</fieldset>" ],
+		thead: [ 1, "<table>", "</table>" ],
+		tr: [ 2, "<table><tbody>", "</tbody></table>" ],
+		td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ],
+		col: [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ],
+		area: [ 1, "<map>", "</map>" ],
+		_default: [ 0, "", "" ]
+	},
+	safeFragment = createSafeFragment( document );
+
+wrapMap.optgroup = wrapMap.option;
+wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
+wrapMap.th = wrapMap.td;
+
+// IE can't serialize <link> and <script> tags normally
+if ( !jQuery.support.htmlSerialize ) {
+	wrapMap._default = [ 1, "div<div>", "</div>" ];
+}
+
+jQuery.fn.extend({
+	text: function( value ) {
+		return jQuery.access( this, function( value ) {
+			return value === undefined ?
+				jQuery.text( this ) :
+				this.empty().append( ( this[0] && this[0].ownerDocument || document ).createTextNode( value ) );
+		}, null, value, arguments.length );
+	},
+
+	wrapAll: function( html ) {
+		if ( jQuery.isFunction( html ) ) {
+			return this.each(function(i) {
+				jQuery(this).wrapAll( html.call(this, i) );
+			});
+		}
+
+		if ( this[0] ) {
+			// The elements to wrap the target around
+			var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true);
+
+			if ( this[0].parentNode ) {
+				wrap.insertBefore( this[0] );
+			}
+
+			wrap.map(function() {
+				var elem = this;
+
+				while ( elem.firstChild && elem.firstChild.nodeType === 1 ) {
+					elem = elem.firstChild;
+				}
+
+				return elem;
+			}).append( this );
+		}
+
+		return this;
+	},
+
+	wrapInner: function( html ) {
+		if ( jQuery.isFunction( html ) ) {
+			return this.each(function(i) {
+				jQuery(this).wrapInner( html.call(this, i) );
+			});
+		}
+
+		return this.each(function() {
+			var self = jQuery( this ),
+				contents = self.contents();
+
+			if ( contents.length ) {
+				contents.wrapAll( html );
+
+			} else {
+				self.append( html );
+			}
+		});
+	},
+
+	wrap: function( html ) {
+		var isFunction = jQuery.isFunction( html );
+
+		return this.each(function(i) {
+			jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html );
+		});
+	},
+
+	unwrap: function() {
+		return this.parent().each(function() {
+			if ( !jQuery.nodeName( this, "body" ) ) {
+				jQuery( this ).replaceWith( this.childNodes );
+			}
+		}).end();
+	},
+
+	append: function() {
+		return this.domManip(arguments, true, function( elem ) {
+			if ( this.nodeType === 1 ) {
+				this.appendChild( elem );
+			}
+		});
+	},
+
+	prepend: function() {
+		return this.domManip(arguments, true, function( elem ) {
+			if ( this.nodeType === 1 ) {
+				this.insertBefore( elem, this.firstChild );
+			}
+		});
+	},
+
+	before: function() {
+		if ( this[0] && this[0].parentNode ) {
+			return this.domManip(arguments, false, function( elem ) {
+				this.parentNode.insertBefore( elem, this );
+			});
+		} else if ( arguments.length ) {
+			var set = jQuery.clean( arguments );
+			set.push.apply( set, this.toArray() );
+			return this.pushStack( set, "before", arguments );
+		}
+	},
+
+	after: function() {
+		if ( this[0] && this[0].parentNode ) {
+			return this.domManip(arguments, false, function( elem ) {
+				this.parentNode.insertBefore( elem, this.nextSibling );
+			});
+		} else if ( arguments.length ) {
+			var set = this.pushStack( this, "after", arguments );
+			set.push.apply( set, jQuery.clean(arguments) );
+			return set;
+		}
+	},
+
+	// keepData is for internal use only--do not document
+	remove: function( selector, keepData ) {
+		for ( var i = 0, elem; (elem = this[i]) != null; i++ ) {
+			if ( !selector || jQuery.filter( selector, [ elem ] ).length ) {
+				if ( !keepData && elem.nodeType === 1 ) {
+					jQuery.cleanData( elem.getElementsByTagName("*") );
+					jQuery.cleanData( [ elem ] );
+				}
+
+				if ( elem.parentNode ) {
+					elem.parentNode.removeChild( elem );
+				}
+			}
+		}
+
+		return this;
+	},
+
+	empty: function() {
+		for ( var i = 0, elem; (elem = this[i]) != null; i++ ) {
+			// Remove element nodes and prevent memory leaks
+			if ( elem.nodeType === 1 ) {
+				jQuery.cleanData( elem.getElementsByTagName("*") );
+			}
+
+			// Remove any remaining nodes
+			while ( elem.firstChild ) {
+				elem.removeChild( elem.firstChild );
+			}
+		}
+
+		return this;
+	},
+
+	clone: function( dataAndEvents, deepDataAndEvents ) {
+		dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
+		deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;
+
+		return this.map( function () {
+			return jQuery.clone( this, dataAndEvents, deepDataAndEvents );
+		});
+	},
+
+	html: function( value ) {
+		return jQuery.access( this, function( value ) {
+			var elem = this[0] || {},
+				i = 0,
+				l = this.length;
+
+			if ( value === undefined ) {
+				return elem.nodeType === 1 ?
+					elem.innerHTML.replace( rinlinejQuery, "" ) :
+					null;
+			}
+
+
+			if ( typeof value === "string" && !rnoInnerhtml.test( value ) &&
+				( jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value ) ) &&
+				!wrapMap[ ( rtagName.exec( value ) || ["", ""] )[1].toLowerCase() ] ) {
+
+				value = value.replace( rxhtmlTag, "<$1></$2>" );
+
+				try {
+					for (; i < l; i++ ) {
+						// Remove element nodes and prevent memory leaks
+						elem = this[i] || {};
+						if ( elem.nodeType === 1 ) {
+							jQuery.cleanData( elem.getElementsByTagName( "*" ) );
+							elem.innerHTML = value;
+						}
+					}
+
+					elem = 0;
+
+				// If using innerHTML throws an exception, use the fallback method
+				} catch(e) {}
+			}
+
+			if ( elem ) {
+				this.empty().append( value );
+			}
+		}, null, value, arguments.length );
+	},
+
+	replaceWith: function( value ) {
+		if ( this[0] && this[0].parentNode ) {
+			// Make sure that the elements are removed from the DOM before they are inserted
+			// this can help fix replacing a parent with child elements
+			if ( jQuery.isFunction( value ) ) {
+				return this.each(function(i) {
+					var self = jQuery(this), old = self.html();
+					self.replaceWith( value.call( this, i, old ) );
+				});
+			}
+
+			if ( typeof value !== "string" ) {
+				value = jQuery( value ).detach();
+			}
+
+			return this.each(function() {
+				var next = this.nextSibling,
+					parent = this.parentNode;
+
+				jQuery( this ).remove();
+
+				if ( next ) {
+					jQuery(next).before( value );
+				} else {
+					jQuery(parent).append( value );
+				}
+			});
+		} else {
+			return this.length ?
+				this.pushStack( jQuery(jQuery.isFunction(value) ? value() : value), "replaceWith", value ) :
+				this;
+		}
+	},
+
+	detach: function( selector ) {
+		return this.remove( selector, true );
+	},
+
+	domManip: function( args, table, callback ) {
+		var results, first, fragment, parent,
+			value = args[0],
+			scripts = [];
+
+		// We can't cloneNode fragments that contain checked, in WebKit
+		if ( !jQuery.support.checkClone && arguments.length === 3 && typeof value === "string" && rchecked.test( value ) ) {
+			return this.each(function() {
+				jQuery(this).domManip( args, table, callback, true );
+			});
+		}
+
+		if ( jQuery.isFunction(value) ) {
+			return this.each(function(i) {
+				var self = jQuery(this);
+				args[0] = value.call(this, i, table ? self.html() : undefined);
+				self.domManip( args, table, callback );
+			});
+		}
+
+		if ( this[0] ) {
+			parent = value && value.parentNode;
+
+			// If we're in a fragment, just use that instead of building a new one
+			if ( jQuery.support.parentNode && parent && parent.nodeType === 11 && parent.childNodes.length === this.length ) {
+				results = { fragment: parent };
+
+			} else {
+				results = jQuery.buildFragment( args, this, scripts );
+			}
+
+			fragment = results.fragment;
+
+			if ( fragment.childNodes.length === 1 ) {
+				first = fragment = fragment.firstChild;
+			} else {
+				first = fragment.firstChild;
+			}
+
+			if ( first ) {
+				table = table && jQuery.nodeName( first, "tr" );
+
+				for ( var i = 0, l = this.length, lastIndex = l - 1; i < l; i++ ) {
+					callback.call(
+						table ?
+							root(this[i], first) :
+							this[i],
+						// Make sure that we do not leak memory by inadvertently discarding
+						// the original fragment (which might have attached data) instead of
+						// using it; in addition, use the original fragment object for the last
+						// item instead of first because it can end up being emptied incorrectly
+						// in certain situations (Bug #8070).
+						// Fragments from the fragment cache must always be cloned and never used
+						// in place.
+						results.cacheable || ( l > 1 && i < lastIndex ) ?
+							jQuery.clone( fragment, true, true ) :
+							fragment
+					);
+				}
+			}
+
+			if ( scripts.length ) {
+				jQuery.each( scripts, function( i, elem ) {
+					if ( elem.src ) {
+						jQuery.ajax({
+							type: "GET",
+							global: false,
+							url: elem.src,
+							async: false,
+							dataType: "script"
+						});
+					} else {
+						jQuery.globalEval( ( elem.text || elem.textContent || elem.innerHTML || "" ).replace( rcleanScript, "/*$0*/" ) );
+					}
+
+					if ( elem.parentNode ) {
+						elem.parentNode.removeChild( elem );
+					}
+				});
+			}
+		}
+
+		return this;
+	}
+});
+
+function root( elem, cur ) {
+	return jQuery.nodeName(elem, "table") ?
+		(elem.getElementsByTagName("tbody")[0] ||
+		elem.appendChild(elem.ownerDocument.createElement("tbody"))) :
+		elem;
+}
+
+function cloneCopyEvent( src, dest ) {
+
+	if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) {
+		return;
+	}
+
+	var type, i, l,
+		oldData = jQuery._data( src ),
+		curData = jQuery._data( dest, oldData ),
+		events = oldData.events;
+
+	if ( events ) {
+		delete curData.handle;
+		curData.events = {};
+
+		for ( type in events ) {
+			for ( i = 0, l = events[ type ].length; i < l; i++ ) {
+				jQuery.event.add( dest, type, events[ type ][ i ] );
+			}
+		}
+	}
+
+	// make the cloned public data object a copy from the original
+	if ( curData.data ) {
+		curData.data = jQuery.extend( {}, curData.data );
+	}
+}
+
+function cloneFixAttributes( src, dest ) {
+	var nodeName;
+
+	// We do not need to do anything for non-Elements
+	if ( dest.nodeType !== 1 ) {
+		return;
+	}
+
+	// clearAttributes removes the attributes, which we don't want,
+	// but also removes the attachEvent events, which we *do* want
+	if ( dest.clearAttributes ) {
+		dest.clearAttributes();
+	}
+
+	// mergeAttributes, in contrast, only merges back on the
+	// original attributes, not the events
+	if ( dest.mergeAttributes ) {
+		dest.mergeAttributes( src );
+	}
+
+	nodeName = dest.nodeName.toLowerCase();
+
+	// IE6-8 fail to clone children inside object elements that use
+	// the proprietary classid attribute value (rather than the type
+	// attribute) to identify the type of content to display
+	if ( nodeName === "object" ) {
+		dest.outerHTML = src.outerHTML;
+
+	} else if ( nodeName === "input" && (src.type === "checkbox" || src.type === "radio") ) {
+		// IE6-8 fails to persist the checked state of a cloned checkbox
+		// or radio button. Worse, IE6-7 fail to give the cloned element
+		// a checked appearance if the defaultChecked value isn't also set
+		if ( src.checked ) {
+			dest.defaultChecked = dest.checked = src.checked;
+		}
+
+		// IE6-7 get confused and end up setting the value of a cloned
+		// checkbox/radio button to an empty string instead of "on"
+		if ( dest.value !== src.value ) {
+			dest.value = src.value;
+		}
+
+	// IE6-8 fails to return the selected option to the default selected
+	// state when cloning options
+	} else if ( nodeName === "option" ) {
+		dest.selected = src.defaultSelected;
+
+	// IE6-8 fails to set the defaultValue to the correct value when
+	// cloning other types of input fields
+	} else if ( nodeName === "input" || nodeName === "textarea" ) {
+		dest.defaultValue = src.defaultValue;
+
+	// IE blanks contents when cloning scripts
+	} else if ( nodeName === "script" && dest.text !== src.text ) {
+		dest.text = src.text;
+	}
+
+	// Event data gets referenced instead of copied if the expando
+	// gets copied too
+	dest.removeAttribute( jQuery.expando );
+
+	// Clear flags for bubbling special change/submit events, they must
+	// be reattached when the newly cloned events are first activated
+	dest.removeAttribute( "_submit_attached" );
+	dest.removeAttribute( "_change_attached" );
+}
+
+jQuery.buildFragment = function( args, nodes, scripts ) {
+	var fragment, cacheable, cacheresults, doc,
+	first = args[ 0 ];
+
+	// nodes may contain either an explicit document object,
+	// a jQuery collection or context object.
+	// If nodes[0] contains a valid object to assign to doc
+	if ( nodes && nodes[0] ) {
+		doc = nodes[0].ownerDocument || nodes[0];
+	}
+
+	// Ensure that an attr object doesn't incorrectly stand in as a document object
+	// Chrome and Firefox seem to allow this to occur and will throw exception
+	// Fixes #8950
+	if ( !doc.createDocumentFragment ) {
+		doc = document;
+	}
+
+	// Only cache "small" (1/2 KB) HTML strings that are associated with the main document
+	// Cloning options loses the selected state, so don't cache them
+	// IE 6 doesn't like it when you put <object> or <embed> elements in a fragment
+	// Also, WebKit does not clone 'checked' attributes on cloneNode, so don't cache
+	// Lastly, IE6,7,8 will not correctly reuse cached fragments that were created from unknown elems #10501
+	if ( args.length === 1 && typeof first === "string" && first.length < 512 && doc === document &&
+		first.charAt(0) === "<" && !rnocache.test( first ) &&
+		(jQuery.support.checkClone || !rchecked.test( first )) &&
+		(jQuery.support.html5Clone || !rnoshimcache.test( first )) ) {
+
+		cacheable = true;
+
+		cacheresults = jQuery.fragments[ first ];
+		if ( cacheresults && cacheresults !== 1 ) {
+			fragment = cacheresults;
+		}
+	}
+
+	if ( !fragment ) {
+		fragment = doc.createDocumentFragment();
+		jQuery.clean( args, doc, fragment, scripts );
+	}
+
+	if ( cacheable ) {
+		jQuery.fragments[ first ] = cacheresults ? fragment : 1;
+	}
+
+	return { fragment: fragment, cacheable: cacheable };
+};
+
+jQuery.fragments = {};
+
+jQuery.each({
+	appendTo: "append",
+	prependTo: "prepend",
+	insertBefore: "before",
+	insertAfter: "after",
+	replaceAll: "replaceWith"
+}, function( name, original ) {
+	jQuery.fn[ name ] = function( selector ) {
+		var ret = [],
+			insert = jQuery( selector ),
+			parent = this.length === 1 && this[0].parentNode;
+
+		if ( parent && parent.nodeType === 11 && parent.childNodes.length === 1 && insert.length === 1 ) {
+			insert[ original ]( this[0] );
+			return this;
+
+		} else {
+			for ( var i = 0, l = insert.length; i < l; i++ ) {
+				var elems = ( i > 0 ? this.clone(true) : this ).get();
+				jQuery( insert[i] )[ original ]( elems );
+				ret = ret.concat( elems );
+			}
+
+			return this.pushStack( ret, name, insert.selector );
+		}
+	};
+});
+
+function getAll( elem ) {
+	if ( typeof elem.getElementsByTagName !== "undefined" ) {
+		return elem.getElementsByTagName( "*" );
+
+	} else if ( typeof elem.querySelectorAll !== "undefined" ) {
+		return elem.querySelectorAll( "*" );
+
+	} else {
+		return [];
+	}
+}
+
+// Used in clean, fixes the defaultChecked property
+function fixDefaultChecked( elem ) {
+	if ( elem.type === "checkbox" || elem.type === "radio" ) {
+		elem.defaultChecked = elem.checked;
+	}
+}
+// Finds all inputs and passes them to fixDefaultChecked
+function findInputs( elem ) {
+	var nodeName = ( elem.nodeName || "" ).toLowerCase();
+	if ( nodeName === "input" ) {
+		fixDefaultChecked( elem );
+	// Skip scripts, get other children
+	} else if ( nodeName !== "script" && typeof elem.getElementsByTagName !== "undefined" ) {
+		jQuery.grep( elem.getElementsByTagName("input"), fixDefaultChecked );
+	}
+}
+
+// Derived From: http://www.iecss.com/shimprove/javascript/shimprove.1-0-1.js
+function shimCloneNode( elem ) {
+	var div = document.createElement( "div" );
+	safeFragment.appendChild( div );
+
+	div.innerHTML = elem.outerHTML;
+	return div.firstChild;
+}
+
+jQuery.extend({
+	clone: function( elem, dataAndEvents, deepDataAndEvents ) {
+		var srcElements,
+			destElements,
+			i,
+			// IE<=8 does not properly clone detached, unknown element nodes
+			clone = jQuery.support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test( "<" + elem.nodeName + ">" ) ?
+				elem.cloneNode( true ) :
+				shimCloneNode( elem );
+
+		if ( (!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) &&
+				(elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) {
+			// IE copies events bound via attachEvent when using cloneNode.
+			// Calling detachEvent on the clone will also remove the events
+			// from the original. In order to get around this, we use some
+			// proprietary methods to clear the events. Thanks to MooTools
+			// guys for this hotness.
+
+			cloneFixAttributes( elem, clone );
+
+			// Using Sizzle here is crazy slow, so we use getElementsByTagName instead
+			srcElements = getAll( elem );
+			destElements = getAll( clone );
+
+			// Weird iteration because IE will replace the length property
+			// with an element if you are cloning the body and one of the
+			// elements on the page has a name or id of "length"
+			for ( i = 0; srcElements[i]; ++i ) {
+				// Ensure that the destination node is not null; Fixes #9587
+				if ( destElements[i] ) {
+					cloneFixAttributes( srcElements[i], destElements[i] );
+				}
+			}
+		}
+
+		// Copy the events from the original to the clone
+		if ( dataAndEvents ) {
+			cloneCopyEvent( elem, clone );
+
+			if ( deepDataAndEvents ) {
+				srcElements = getAll( elem );
+				destElements = getAll( clone );
+
+				for ( i = 0; srcElements[i]; ++i ) {
+					cloneCopyEvent( srcElements[i], destElements[i] );
+				}
+			}
+		}
+
+		srcElements = destElements = null;
+
+		// Return the cloned set
+		return clone;
+	},
+
+	clean: function( elems, context, fragment, scripts ) {
+		var checkScriptType, script, j,
+				ret = [];
+
+		context = context || document;
+
+		// !context.createElement fails in IE with an error but returns typeof 'object'
+		if ( typeof context.createElement === "undefined" ) {
+			context = context.ownerDocument || context[0] && context[0].ownerDocument || document;
+		}
+
+		for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
+			if ( typeof elem === "number" ) {
+				elem += "";
+			}
+
+			if ( !elem ) {
+				continue;
+			}
+
+			// Convert html string into DOM nodes
+			if ( typeof elem === "string" ) {
+				if ( !rhtml.test( elem ) ) {
+					elem = context.createTextNode( elem );
+				} else {
+					// Fix "XHTML"-style tags in all browsers
+					elem = elem.replace(rxhtmlTag, "<$1></$2>");
+
+					// Trim whitespace, otherwise indexOf won't work as expected
+					var tag = ( rtagName.exec( elem ) || ["", ""] )[1].toLowerCase(),
+						wrap = wrapMap[ tag ] || wrapMap._default,
+						depth = wrap[0],
+						div = context.createElement("div"),
+						safeChildNodes = safeFragment.childNodes,
+						remove;
+
+					// Append wrapper element to unknown element safe doc fragment
+					if ( context === document ) {
+						// Use the fragment we've already created for this document
+						safeFragment.appendChild( div );
+					} else {
+						// Use a fragment created with the owner document
+						createSafeFragment( context ).appendChild( div );
+					}
+
+					// Go to html and back, then peel off extra wrappers
+					div.innerHTML = wrap[1] + elem + wrap[2];
+
+					// Move to the right depth
+					while ( depth-- ) {
+						div = div.lastChild;
+					}
+
+					// Remove IE's autoinserted <tbody> from table fragments
+					if ( !jQuery.support.tbody ) {
+
+						// String was a <table>, *may* have spurious <tbody>
+						var hasBody = rtbody.test(elem),
+							tbody = tag === "table" && !hasBody ?
+								div.firstChild && div.firstChild.childNodes :
+
+								// String was a bare <thead> or <tfoot>
+								wrap[1] === "<table>" && !hasBody ?
+									div.childNodes :
+									[];
+
+						for ( j = tbody.length - 1; j >= 0 ; --j ) {
+							if ( jQuery.nodeName( tbody[ j ], "tbody" ) && !tbody[ j ].childNodes.length ) {
+								tbody[ j ].parentNode.removeChild( tbody[ j ] );
+							}
+						}
+					}
+
+					// IE completely kills leading whitespace when innerHTML is used
+					if ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) {
+						div.insertBefore( context.createTextNode( rleadingWhitespace.exec(elem)[0] ), div.firstChild );
+					}
+
+					elem = div.childNodes;
+
+					// Clear elements from DocumentFragment (safeFragment or otherwise)
+					// to avoid hoarding elements. Fixes #11356
+					if ( div ) {
+						div.parentNode.removeChild( div );
+
+						// Guard against -1 index exceptions in FF3.6
+						if ( safeChildNodes.length > 0 ) {
+							remove = safeChildNodes[ safeChildNodes.length - 1 ];
+
+							if ( remove && remove.parentNode ) {
+								remove.parentNode.removeChild( remove );
+							}
+						}
+					}
+				}
+			}
+
+			// Resets defaultChecked for any radios and checkboxes
+			// about to be appended to the DOM in IE 6/7 (#8060)
+			var len;
+			if ( !jQuery.support.appendChecked ) {
+				if ( elem[0] && typeof (len = elem.length) === "number" ) {
+					for ( j = 0; j < len; j++ ) {
+						findInputs( elem[j] );
+					}
+				} else {
+					findInputs( elem );
+				}
+			}
+
+			if ( elem.nodeType ) {
+				ret.push( elem );
+			} else {
+				ret = jQuery.merge( ret, elem );
+			}
+		}
+
+		if ( fragment ) {
+			checkScriptType = function( elem ) {
+				return !elem.type || rscriptType.test( elem.type );
+			};
+			for ( i = 0; ret[i]; i++ ) {
+				script = ret[i];
+				if ( scripts && jQuery.nodeName( script, "script" ) && (!script.type || rscriptType.test( script.type )) ) {
+					scripts.push( script.parentNode ? script.parentNode.removeChild( script ) : script );
+
+				} else {
+					if ( script.nodeType === 1 ) {
+						var jsTags = jQuery.grep( script.getElementsByTagName( "script" ), checkScriptType );
+
+						ret.splice.apply( ret, [i + 1, 0].concat( jsTags ) );
+					}
+					fragment.appendChild( script );
+				}
+			}
+		}
+
+		return ret;
+	},
+
+	cleanData: function( elems ) {
+		var data, id,
+			cache = jQuery.cache,
+			special = jQuery.event.special,
+			deleteExpando = jQuery.support.deleteExpando;
+
+		for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
+			if ( elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()] ) {
+				continue;
+			}
+
+			id = elem[ jQuery.expando ];
+
+			if ( id ) {
+				data = cache[ id ];
+
+				if ( data && data.events ) {
+					for ( var type in data.events ) {
+						if ( special[ type ] ) {
+							jQuery.event.remove( elem, type );
+
+						// This is a shortcut to avoid jQuery.event.remove's overhead
+						} else {
+							jQuery.removeEvent( elem, type, data.handle );
+						}
+					}
+
+					// Null the DOM reference to avoid IE6/7/8 leak (#7054)
+					if ( data.handle ) {
+						data.handle.elem = null;
+					}
+				}
+
+				if ( deleteExpando ) {
+					delete elem[ jQuery.expando ];
+
+				} else if ( elem.removeAttribute ) {
+					elem.removeAttribute( jQuery.expando );
+				}
+
+				delete cache[ id ];
+			}
+		}
+	}
+});
+
+
+
+
+var ralpha = /alpha\([^)]*\)/i,
+	ropacity = /opacity=([^)]*)/,
+	// fixed for IE9, see #8346
+	rupper = /([A-Z]|^ms)/g,
+	rnum = /^[\-+]?(?:\d*\.)?\d+$/i,
+	rnumnonpx = /^-?(?:\d*\.)?\d+(?!px)[^\d\s]+$/i,
+	rrelNum = /^([\-+])=([\-+.\de]+)/,
+	rmargin = /^margin/,
+
+	cssShow = { position: "absolute", visibility: "hidden", display: "block" },
+
+	// order is important!
+	cssExpand = [ "Top", "Right", "Bottom", "Left" ],
+
+	curCSS,
+
+	getComputedStyle,
+	currentStyle;
+
+jQuery.fn.css = function( name, value ) {
+	return jQuery.access( this, function( elem, name, value ) {
+		return value !== undefined ?
+			jQuery.style( elem, name, value ) :
+			jQuery.css( elem, name );
+	}, name, value, arguments.length > 1 );
+};
+
+jQuery.extend({
+	// Add in style property hooks for overriding the default
+	// behavior of getting and setting a style property
+	cssHooks: {
+		opacity: {
+			get: function( elem, computed ) {
+				if ( computed ) {
+					// We should always get a number back from opacity
+					var ret = curCSS( elem, "opacity" );
+					return ret === "" ? "1" : ret;
+
+				} else {
+					return elem.style.opacity;
+				}
+			}
+		}
+	},
+
+	// Exclude the following css properties to add px
+	cssNumber: {
+		"fillOpacity": true,
+		"fontWeight": true,
+		"lineHeight": true,
+		"opacity": true,
+		"orphans": true,
+		"widows": true,
+		"zIndex": true,
+		"zoom": true
+	},
+
+	// Add in properties whose names you wish to fix before
+	// setting or getting the value
+	cssProps: {
+		// normalize float css property
+		"float": jQuery.support.cssFloat ? "cssFloat" : "styleFloat"
+	},
+
+	// Get and set the style property on a DOM Node
+	style: function( elem, name, value, extra ) {
+		// Don't set styles on text and comment nodes
+		if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
+			return;
+		}
+
+		// Make sure that we're working with the right name
+		var ret, type, origName = jQuery.camelCase( name ),
+			style = elem.style, hooks = jQuery.cssHooks[ origName ];
+
+		name = jQuery.cssProps[ origName ] || origName;
+
+		// Check if we're setting a value
+		if ( value !== undefined ) {
+			type = typeof value;
+
+			// convert relative number strings (+= or -=) to relative numbers. #7345
+			if ( type === "string" && (ret = rrelNum.exec( value )) ) {
+				value = ( +( ret[1] + 1) * +ret[2] ) + parseFloat( jQuery.css( elem, name ) );
+				// Fixes bug #9237
+				type = "number";
+			}
+
+			// Make sure that NaN and null values aren't set. See: #7116
+			if ( value == null || type === "number" && isNaN( value ) ) {
+				return;
+			}
+
+			// If a number was passed in, add 'px' to the (except for certain CSS properties)
+			if ( type === "number" && !jQuery.cssNumber[ origName ] ) {
+				value += "px";
+			}
+
+			// If a hook was provided, use that value, otherwise just set the specified value
+			if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value )) !== undefined ) {
+				// Wrapped to prevent IE from throwing errors when 'invalid' values are provided
+				// Fixes bug #5509
+				try {
+					style[ name ] = value;
+				} catch(e) {}
+			}
+
+		} else {
+			// If a hook was provided get the non-computed value from there
+			if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) {
+				return ret;
+			}
+
+			// Otherwise just get the value from the style object
+			return style[ name ];
+		}
+	},
+
+	css: function( elem, name, extra ) {
+		var ret, hooks;
+
+		// Make sure that we're working with the right name
+		name = jQuery.camelCase( name );
+		hooks = jQuery.cssHooks[ name ];
+		name = jQuery.cssProps[ name ] || name;
+
+		// cssFloat needs a special treatment
+		if ( name === "cssFloat" ) {
+			name = "float";
+		}
+
+		// If a hook was provided get the computed value from there
+		if ( hooks && "get" in hooks && (ret = hooks.get( elem, true, extra )) !== undefined ) {
+			return ret;
+
+		// Otherwise, if a way to get the computed value exists, use that
+		} else if ( curCSS ) {
+			return curCSS( elem, name );
+		}
+	},
+
+	// A method for quickly swapping in/out CSS properties to get correct calculations
+	swap: function( elem, options, callback ) {
+		var old = {},
+			ret, name;
+
+		// Remember the old values, and insert the new ones
+		for ( name in options ) {
+			old[ name ] = elem.style[ name ];
+			elem.style[ name ] = options[ name ];
+		}
+
+		ret = callback.call( elem );
+
+		// Revert the old values
+		for ( name in options ) {
+			elem.style[ name ] = old[ name ];
+		}
+
+		return ret;
+	}
+});
+
+// DEPRECATED in 1.3, Use jQuery.css() instead
+jQuery.curCSS = jQuery.css;
+
+if ( document.defaultView && document.defaultView.getComputedStyle ) {
+	getComputedStyle = function( elem, name ) {
+		var ret, defaultView, computedStyle, width,
+			style = elem.style;
+
+		name = name.replace( rupper, "-$1" ).toLowerCase();
+
+		if ( (defaultView = elem.ownerDocument.defaultView) &&
+				(computedStyle = defaultView.getComputedStyle( elem, null )) ) {
+
+			ret = computedStyle.getPropertyValue( name );
+			if ( ret === "" && !jQuery.contains( elem.ownerDocument.documentElement, elem ) ) {
+				ret = jQuery.style( elem, name );
+			}
+		}
+
+		// A tribute to the "awesome hack by Dean Edwards"
+		// WebKit uses "computed value (percentage if specified)" instead of "used value" for margins
+		// which is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values
+		if ( !jQuery.support.pixelMargin && computedStyle && rmargin.test( name ) && rnumnonpx.test( ret ) ) {
+			width = style.width;
+			style.width = ret;
+			ret = computedStyle.width;
+			style.width = width;
+		}
+
+		return ret;
+	};
+}
+
+if ( document.documentElement.currentStyle ) {
+	currentStyle = function( elem, name ) {
+		var left, rsLeft, uncomputed,
+			ret = elem.currentStyle && elem.currentStyle[ name ],
+			style = elem.style;
+
+		// Avoid setting ret to empty string here
+		// so we don't default to auto
+		if ( ret == null && style && (uncomputed = style[ name ]) ) {
+			ret = uncomputed;
+		}
+
+		// From the awesome hack by Dean Edwards
+		// http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291
+
+		// If we're not dealing with a regular pixel number
+		// but a number that has a weird ending, we need to convert it to pixels
+		if ( rnumnonpx.test( ret ) ) {
+
+			// Remember the original values
+			left = style.left;
+			rsLeft = elem.runtimeStyle && elem.runtimeStyle.left;
+
+			// Put in the new values to get a computed value out
+			if ( rsLeft ) {
+				elem.runtimeStyle.left = elem.currentStyle.left;
+			}
+			style.left = name === "fontSize" ? "1em" : ret;
+			ret = style.pixelLeft + "px";
+
+			// Revert the changed values
+			style.left = left;
+			if ( rsLeft ) {
+				elem.runtimeStyle.left = rsLeft;
+			}
+		}
+
+		return ret === "" ? "auto" : ret;
+	};
+}
+
+curCSS = getComputedStyle || currentStyle;
+
+function getWidthOrHeight( elem, name, extra ) {
+
+	// Start with offset property
+	var val = name === "width" ? elem.offsetWidth : elem.offsetHeight,
+		i = name === "width" ? 1 : 0,
+		len = 4;
+
+	if ( val > 0 ) {
+		if ( extra !== "border" ) {
+			for ( ; i < len; i += 2 ) {
+				if ( !extra ) {
+					val -= parseFloat( jQuery.css( elem, "padding" + cssExpand[ i ] ) ) || 0;
+				}
+				if ( extra === "margin" ) {
+					val += parseFloat( jQuery.css( elem, extra + cssExpand[ i ] ) ) || 0;
+				} else {
+					val -= parseFloat( jQuery.css( elem, "border" + cssExpand[ i ] + "Width" ) ) || 0;
+				}
+			}
+		}
+
+		return val + "px";
+	}
+
+	// Fall back to computed then uncomputed css if necessary
+	val = curCSS( elem, name );
+	if ( val < 0 || val == null ) {
+		val = elem.style[ name ];
+	}
+
+	// Computed unit is not pixels. Stop here and return.
+	if ( rnumnonpx.test(val) ) {
+		return val;
+	}
+
+	// Normalize "", auto, and prepare for extra
+	val = parseFloat( val ) || 0;
+
+	// Add padding, border, margin
+	if ( extra ) {
+		for ( ; i < len; i += 2 ) {
+			val += parseFloat( jQuery.css( elem, "padding" + cssExpand[ i ] ) ) || 0;
+			if ( extra !== "padding" ) {
+				val += parseFloat( jQuery.css( elem, "border" + cssExpand[ i ] + "Width" ) ) || 0;
+			}
+			if ( extra === "margin" ) {
+				val += parseFloat( jQuery.css( elem, extra + cssExpand[ i ]) ) || 0;
+			}
+		}
+	}
+
+	return val + "px";
+}
+
+jQuery.each([ "height", "width" ], function( i, name ) {
+	jQuery.cssHooks[ name ] = {
+		get: function( elem, computed, extra ) {
+			if ( computed ) {
+				if ( elem.offsetWidth !== 0 ) {
+					return getWidthOrHeight( elem, name, extra );
+				} else {
+					return jQuery.swap( elem, cssShow, function() {
+						return getWidthOrHeight( elem, name, extra );
+					});
+				}
+			}
+		},
+
+		set: function( elem, value ) {
+			return rnum.test( value ) ?
+				value + "px" :
+				value;
+		}
+	};
+});
+
+if ( !jQuery.support.opacity ) {
+	jQuery.cssHooks.opacity = {
+		get: function( elem, computed ) {
+			// IE uses filters for opacity
+			return ropacity.test( (computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "" ) ?
+				( parseFloat( RegExp.$1 ) / 100 ) + "" :
+				computed ? "1" : "";
+		},
+
+		set: function( elem, value ) {
+			var style = elem.style,
+				currentStyle = elem.currentStyle,
+				opacity = jQuery.isNumeric( value ) ? "alpha(opacity=" + value * 100 + ")" : "",
+				filter = currentStyle && currentStyle.filter || style.filter || "";
+
+			// IE has trouble with opacity if it does not have layout
+			// Force it by setting the zoom level
+			style.zoom = 1;
+
+			// if setting opacity to 1, and no other filters exist - attempt to remove filter attribute #6652
+			if ( value >= 1 && jQuery.trim( filter.replace( ralpha, "" ) ) === "" ) {
+
+				// Setting style.filter to null, "" & " " still leave "filter:" in the cssText
+				// if "filter:" is present at all, clearType is disabled, we want to avoid this
+				// style.removeAttribute is IE Only, but so apparently is this code path...
+				style.removeAttribute( "filter" );
+
+				// if there there is no filter style applied in a css rule, we are done
+				if ( currentStyle && !currentStyle.filter ) {
+					return;
+				}
+			}
+
+			// otherwise, set new filter values
+			style.filter = ralpha.test( filter ) ?
+				filter.replace( ralpha, opacity ) :
+				filter + " " + opacity;
+		}
+	};
+}
+
+jQuery(function() {
+	// This hook cannot be added until DOM ready because the support test
+	// for it is not run until after DOM ready
+	if ( !jQuery.support.reliableMarginRight ) {
+		jQuery.cssHooks.marginRight = {
+			get: function( elem, computed ) {
+				// WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
+				// Work around by temporarily setting element display to inline-block
+				return jQuery.swap( elem, { "display": "inline-block" }, function() {
+					if ( computed ) {
+						return curCSS( elem, "margin-right" );
+					} else {
+						return elem.style.marginRight;
+					}
+				});
+			}
+		};
+	}
+});
+
+if ( jQuery.expr && jQuery.expr.filters ) {
+	jQuery.expr.filters.hidden = function( elem ) {
+		var width = elem.offsetWidth,
+			height = elem.offsetHeight;
+
+		return ( width === 0 && height === 0 ) || (!jQuery.support.reliableHiddenOffsets && ((elem.style && elem.style.display) || jQuery.css( elem, "display" )) === "none");
+	};
+
+	jQuery.expr.filters.visible = function( elem ) {
+		return !jQuery.expr.filters.hidden( elem );
+	};
+}
+
+// These hooks are used by animate to expand properties
+jQuery.each({
+	margin: "",
+	padding: "",
+	border: "Width"
+}, function( prefix, suffix ) {
+
+	jQuery.cssHooks[ prefix + suffix ] = {
+		expand: function( value ) {
+			var i,
+
+				// assumes a single number if not a string
+				parts = typeof value === "string" ? value.split(" ") : [ value ],
+				expanded = {};
+
+			for ( i = 0; i < 4; i++ ) {
+				expanded[ prefix + cssExpand[ i ] + suffix ] =
+					parts[ i ] || parts[ i - 2 ] || parts[ 0 ];
+			}
+
+			return expanded;
+		}
+	};
+});
+
+
+
+
+var r20 = /%20/g,
+	rbracket = /\[\]$/,
+	rCRLF = /\r?\n/g,
+	rhash = /#.*$/,
+	rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, // IE leaves an \r character at EOL
+	rinput = /^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,
+	// #7653, #8125, #8152: local protocol detection
+	rlocalProtocol = /^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,
+	rnoContent = /^(?:GET|HEAD)$/,
+	rprotocol = /^\/\//,
+	rquery = /\?/,
+	rscript = /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,
+	rselectTextarea = /^(?:select|textarea)/i,
+	rspacesAjax = /\s+/,
+	rts = /([?&])_=[^&]*/,
+	rurl = /^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,
+
+	// Keep a copy of the old load method
+	_load = jQuery.fn.load,
+
+	/* Prefilters
+	 * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)
+	 * 2) These are called:
+	 *    - BEFORE asking for a transport
+	 *    - AFTER param serialization (s.data is a string if s.processData is true)
+	 * 3) key is the dataType
+	 * 4) the catchall symbol "*" can be used
+	 * 5) execution will start with transport dataType and THEN continue down to "*" if needed
+	 */
+	prefilters = {},
+
+	/* Transports bindings
+	 * 1) key is the dataType
+	 * 2) the catchall symbol "*" can be used
+	 * 3) selection will start with transport dataType and THEN go to "*" if needed
+	 */
+	transports = {},
+
+	// Document location
+	ajaxLocation,
+
+	// Document location segments
+	ajaxLocParts,
+
+	// Avoid comment-prolog char sequence (#10098); must appease lint and evade compression
+	allTypes = ["*/"] + ["*"];
+
+// #8138, IE may throw an exception when accessing
+// a field from window.location if document.domain has been set
+try {
+	ajaxLocation = location.href;
+} catch( e ) {
+	// Use the href attribute of an A element
+	// since IE will modify it given document.location
+	ajaxLocation = document.createElement( "a" );
+	ajaxLocation.href = "";
+	ajaxLocation = ajaxLocation.href;
+}
+
+// Segment location into parts
+ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || [];
+
+// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport
+function addToPrefiltersOrTransports( structure ) {
+
+	// dataTypeExpression is optional and defaults to "*"
+	return function( dataTypeExpression, func ) {
+
+		if ( typeof dataTypeExpression !== "string" ) {
+			func = dataTypeExpression;
+			dataTypeExpression = "*";
+		}
+
+		if ( jQuery.isFunction( func ) ) {
+			var dataTypes = dataTypeExpression.toLowerCase().split( rspacesAjax ),
+				i = 0,
+				length = dataTypes.length,
+				dataType,
+				list,
+				placeBefore;
+
+			// For each dataType in the dataTypeExpression
+			for ( ; i < length; i++ ) {
+				dataType = dataTypes[ i ];
+				// We control if we're asked to add before
+				// any existing element
+				placeBefore = /^\+/.test( dataType );
+				if ( placeBefore ) {
+					dataType = dataType.substr( 1 ) || "*";
+				}
+				list = structure[ dataType ] = structure[ dataType ] || [];
+				// then we add to the structure accordingly
+				list[ placeBefore ? "unshift" : "push" ]( func );
+			}
+		}
+	};
+}
+
+// Base inspection function for prefilters and transports
+function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR,
+		dataType /* internal */, inspected /* internal */ ) {
+
+	dataType = dataType || options.dataTypes[ 0 ];
+	inspected = inspected || {};
+
+	inspected[ dataType ] = true;
+
+	var list = structure[ dataType ],
+		i = 0,
+		length = list ? list.length : 0,
+		executeOnly = ( structure === prefilters ),
+		selection;
+
+	for ( ; i < length && ( executeOnly || !selection ); i++ ) {
+		selection = list[ i ]( options, originalOptions, jqXHR );
+		// If we got redirected to another dataType
+		// we try there if executing only and not done already
+		if ( typeof selection === "string" ) {
+			if ( !executeOnly || inspected[ selection ] ) {
+				selection = undefined;
+			} else {
+				options.dataTypes.unshift( selection );
+				selection = inspectPrefiltersOrTransports(
+						structure, options, originalOptions, jqXHR, selection, inspected );
+			}
+		}
+	}
+	// If we're only executing or nothing was selected
+	// we try the catchall dataType if not done already
+	if ( ( executeOnly || !selection ) && !inspected[ "*" ] ) {
+		selection = inspectPrefiltersOrTransports(
+				structure, options, originalOptions, jqXHR, "*", inspected );
+	}
+	// unnecessary when only executing (prefilters)
+	// but it'll be ignored by the caller in that case
+	return selection;
+}
+
+// A special extend for ajax options
+// that takes "flat" options (not to be deep extended)
+// Fixes #9887
+function ajaxExtend( target, src ) {
+	var key, deep,
+		flatOptions = jQuery.ajaxSettings.flatOptions || {};
+	for ( key in src ) {
+		if ( src[ key ] !== undefined ) {
+			( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];
+		}
+	}
+	if ( deep ) {
+		jQuery.extend( true, target, deep );
+	}
+}
+
+jQuery.fn.extend({
+	load: function( url, params, callback ) {
+		if ( typeof url !== "string" && _load ) {
+			return _load.apply( this, arguments );
+
+		// Don't do a request if no elements are being requested
+		} else if ( !this.length ) {
+			return this;
+		}
+
+		var off = url.indexOf( " " );
+		if ( off >= 0 ) {
+			var selector = url.slice( off, url.length );
+			url = url.slice( 0, off );
+		}
+
+		// Default to a GET request
+		var type = "GET";
+
+		// If the second parameter was provided
+		if ( params ) {
+			// If it's a function
+			if ( jQuery.isFunction( params ) ) {
+				// We assume that it's the callback
+				callback = params;
+				params = undefined;
+
+			// Otherwise, build a param string
+			} else if ( typeof params === "object" ) {
+				params = jQuery.param( params, jQuery.ajaxSettings.traditional );
+				type = "POST";
+			}
+		}
+
+		var self = this;
+
+		// Request the remote document
+		jQuery.ajax({
+			url: url,
+			type: type,
+			dataType: "html",
+			data: params,
+			// Complete callback (responseText is used internally)
+			complete: function( jqXHR, status, responseText ) {
+				// Store the response as specified by the jqXHR object
+				responseText = jqXHR.responseText;
+				// If successful, inject the HTML into all the matched elements
+				if ( jqXHR.isResolved() ) {
+					// #4825: Get the actual response in case
+					// a dataFilter is present in ajaxSettings
+					jqXHR.done(function( r ) {
+						responseText = r;
+					});
+					// See if a selector was specified
+					self.html( selector ?
+						// Create a dummy div to hold the results
+						jQuery("<div>")
+							// inject the contents of the document in, removing the scripts
+							// to avoid any 'Permission Denied' errors in IE
+							.append(responseText.replace(rscript, ""))
+
+							// Locate the specified elements
+							.find(selector) :
+
+						// If not, just inject the full result
+						responseText );
+				}
+
+				if ( callback ) {
+					self.each( callback, [ responseText, status, jqXHR ] );
+				}
+			}
+		});
+
+		return this;
+	},
+
+	serialize: function() {
+		return jQuery.param( this.serializeArray() );
+	},
+
+	serializeArray: function() {
+		return this.map(function(){
+			return this.elements ? jQuery.makeArray( this.elements ) : this;
+		})
+		.filter(function(){
+			return this.name && !this.disabled &&
+				( this.checked || rselectTextarea.test( this.nodeName ) ||
+					rinput.test( this.type ) );
+		})
+		.map(function( i, elem ){
+			var val = jQuery( this ).val();
+
+			return val == null ?
+				null :
+				jQuery.isArray( val ) ?
+					jQuery.map( val, function( val, i ){
+						return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
+					}) :
+					{ name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
+		}).get();
+	}
+});
+
+// Attach a bunch of functions for handling common AJAX events
+jQuery.each( "ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split( " " ), function( i, o ){
+	jQuery.fn[ o ] = function( f ){
+		return this.on( o, f );
+	};
+});
+
+jQuery.each( [ "get", "post" ], function( i, method ) {
+	jQuery[ method ] = function( url, data, callback, type ) {
+		// shift arguments if data argument was omitted
+		if ( jQuery.isFunction( data ) ) {
+			type = type || callback;
+			callback = data;
+			data = undefined;
+		}
+
+		return jQuery.ajax({
+			type: method,
+			url: url,
+			data: data,
+			success: callback,
+			dataType: type
+		});
+	};
+});
+
+jQuery.extend({
+
+	getScript: function( url, callback ) {
+		return jQuery.get( url, undefined, callback, "script" );
+	},
+
+	getJSON: function( url, data, callback ) {
+		return jQuery.get( url, data, callback, "json" );
+	},
+
+	// Creates a full fledged settings object into target
+	// with both ajaxSettings and settings fields.
+	// If target is omitted, writes into ajaxSettings.
+	ajaxSetup: function( target, settings ) {
+		if ( settings ) {
+			// Building a settings object
+			ajaxExtend( target, jQuery.ajaxSettings );
+		} else {
+			// Extending ajaxSettings
+			settings = target;
+			target = jQuery.ajaxSettings;
+		}
+		ajaxExtend( target, settings );
+		return target;
+	},
+
+	ajaxSettings: {
+		url: ajaxLocation,
+		isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ),
+		global: true,
+		type: "GET",
+		contentType: "application/x-www-form-urlencoded; charset=UTF-8",
+		processData: true,
+		async: true,
+		/*
+		timeout: 0,
+		data: null,
+		dataType: null,
+		username: null,
+		password: null,
+		cache: null,
+		traditional: false,
+		headers: {},
+		*/
+
+		accepts: {
+			xml: "application/xml, text/xml",
+			html: "text/html",
+			text: "text/plain",
+			json: "application/json, text/javascript",
+			"*": allTypes
+		},
+
+		contents: {
+			xml: /xml/,
+			html: /html/,
+			json: /json/
+		},
+
+		responseFields: {
+			xml: "responseXML",
+			text: "responseText"
+		},
+
+		// List of data converters
+		// 1) key format is "source_type destination_type" (a single space in-between)
+		// 2) the catchall symbol "*" can be used for source_type
+		converters: {
+
+			// Convert anything to text
+			"* text": window.String,
+
+			// Text to html (true = no transformation)
+			"text html": true,
+
+			// Evaluate text as a json expression
+			"text json": jQuery.parseJSON,
+
+			// Parse text as xml
+			"text xml": jQuery.parseXML
+		},
+
+		// For options that shouldn't be deep extended:
+		// you can add your own custom options here if
+		// and when you create one that shouldn't be
+		// deep extended (see ajaxExtend)
+		flatOptions: {
+			context: true,
+			url: true
+		}
+	},
+
+	ajaxPrefilter: addToPrefiltersOrTransports( prefilters ),
+	ajaxTransport: addToPrefiltersOrTransports( transports ),
+
+	// Main method
+	ajax: function( url, options ) {
+
+		// If url is an object, simulate pre-1.5 signature
+		if ( typeof url === "object" ) {
+			options = url;
+			url = undefined;
+		}
+
+		// Force options to be an object
+		options = options || {};
+
+		var // Create the final options object
+			s = jQuery.ajaxSetup( {}, options ),
+			// Callbacks context
+			callbackContext = s.context || s,
+			// Context for global events
+			// It's the callbackContext if one was provided in the options
+			// and if it's a DOM node or a jQuery collection
+			globalEventContext = callbackContext !== s &&
+				( callbackContext.nodeType || callbackContext instanceof jQuery ) ?
+						jQuery( callbackContext ) : jQuery.event,
+			// Deferreds
+			deferred = jQuery.Deferred(),
+			completeDeferred = jQuery.Callbacks( "once memory" ),
+			// Status-dependent callbacks
+			statusCode = s.statusCode || {},
+			// ifModified key
+			ifModifiedKey,
+			// Headers (they are sent all at once)
+			requestHeaders = {},
+			requestHeadersNames = {},
+			// Response headers
+			responseHeadersString,
+			responseHeaders,
+			// transport
+			transport,
+			// timeout handle
+			timeoutTimer,
+			// Cross-domain detection vars
+			parts,
+			// The jqXHR state
+			state = 0,
+			// To know if global events are to be dispatched
+			fireGlobals,
+			// Loop variable
+			i,
+			// Fake xhr
+			jqXHR = {
+
+				readyState: 0,
+
+				// Caches the header
+				setRequestHeader: function( name, value ) {
+					if ( !state ) {
+						var lname = name.toLowerCase();
+						name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name;
+						requestHeaders[ name ] = value;
+					}
+					return this;
+				},
+
+				// Raw string
+				getAllResponseHeaders: function() {
+					return state === 2 ? responseHeadersString : null;
+				},
+
+				// Builds headers hashtable if needed
+				getResponseHeader: function( key ) {
+					var match;
+					if ( state === 2 ) {
+						if ( !responseHeaders ) {
+							responseHeaders = {};
+							while( ( match = rheaders.exec( responseHeadersString ) ) ) {
+								responseHeaders[ match[1].toLowerCase() ] = match[ 2 ];
+							}
+						}
+						match = responseHeaders[ key.toLowerCase() ];
+					}
+					return match === undefined ? null : match;
+				},
+
+				// Overrides response content-type header
+				overrideMimeType: function( type ) {
+					if ( !state ) {
+						s.mimeType = type;
+					}
+					return this;
+				},
+
+				// Cancel the request
+				abort: function( statusText ) {
+					statusText = statusText || "abort";
+					if ( transport ) {
+						transport.abort( statusText );
+					}
+					done( 0, statusText );
+					return this;
+				}
+			};
+
+		// Callback for when everything is done
+		// It is defined here because jslint complains if it is declared
+		// at the end of the function (which would be more logical and readable)
+		function done( status, nativeStatusText, responses, headers ) {
+
+			// Called once
+			if ( state === 2 ) {
+				return;
+			}
+
+			// State is "done" now
+			state = 2;
+
+			// Clear timeout if it exists
+			if ( timeoutTimer ) {
+				clearTimeout( timeoutTimer );
+			}
+
+			// Dereference transport for early garbage collection
+			// (no matter how long the jqXHR object will be used)
+			transport = undefined;
+
+			// Cache response headers
+			responseHeadersString = headers || "";
+
+			// Set readyState
+			jqXHR.readyState = status > 0 ? 4 : 0;
+
+			var isSuccess,
+				success,
+				error,
+				statusText = nativeStatusText,
+				response = responses ? ajaxHandleResponses( s, jqXHR, responses ) : undefined,
+				lastModified,
+				etag;
+
+			// If successful, handle type chaining
+			if ( status >= 200 && status < 300 || status === 304 ) {
+
+				// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
+				if ( s.ifModified ) {
+
+					if ( ( lastModified = jqXHR.getResponseHeader( "Last-Modified" ) ) ) {
+						jQuery.lastModified[ ifModifiedKey ] = lastModified;
+					}
+					if ( ( etag = jqXHR.getResponseHeader( "Etag" ) ) ) {
+						jQuery.etag[ ifModifiedKey ] = etag;
+					}
+				}
+
+				// If not modified
+				if ( status === 304 ) {
+
+					statusText = "notmodified";
+					isSuccess = true;
+
+				// If we have data
+				} else {
+
+					try {
+						success = ajaxConvert( s, response );
+						statusText = "success";
+						isSuccess = true;
+					} catch(e) {
+						// We have a parsererror
+						statusText = "parsererror";
+						error = e;
+					}
+				}
+			} else {
+				// We extract error from statusText
+				// then normalize statusText and status for non-aborts
+				error = statusText;
+				if ( !statusText || status ) {
+					statusText = "error";
+					if ( status < 0 ) {
+						status = 0;
+					}
+				}
+			}
+
+			// Set data for the fake xhr object
+			jqXHR.status = status;
+			jqXHR.statusText = "" + ( nativeStatusText || statusText );
+
+			// Success/Error
+			if ( isSuccess ) {
+				deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );
+			} else {
+				deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );
+			}
+
+			// Status-dependent callbacks
+			jqXHR.statusCode( statusCode );
+			statusCode = undefined;
+
+			if ( fireGlobals ) {
+				globalEventContext.trigger( "ajax" + ( isSuccess ? "Success" : "Error" ),
+						[ jqXHR, s, isSuccess ? success : error ] );
+			}
+
+			// Complete
+			completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );
+
+			if ( fireGlobals ) {
+				globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] );
+				// Handle the global AJAX counter
+				if ( !( --jQuery.active ) ) {
+					jQuery.event.trigger( "ajaxStop" );
+				}
+			}
+		}
+
+		// Attach deferreds
+		deferred.promise( jqXHR );
+		jqXHR.success = jqXHR.done;
+		jqXHR.error = jqXHR.fail;
+		jqXHR.complete = completeDeferred.add;
+
+		// Status-dependent callbacks
+		jqXHR.statusCode = function( map ) {
+			if ( map ) {
+				var tmp;
+				if ( state < 2 ) {
+					for ( tmp in map ) {
+						statusCode[ tmp ] = [ statusCode[tmp], map[tmp] ];
+					}
+				} else {
+					tmp = map[ jqXHR.status ];
+					jqXHR.then( tmp, tmp );
+				}
+			}
+			return this;
+		};
+
+		// Remove hash character (#7531: and string promotion)
+		// Add protocol if not provided (#5866: IE7 issue with protocol-less urls)
+		// We also use the url parameter if available
+		s.url = ( ( url || s.url ) + "" ).replace( rhash, "" ).replace( rprotocol, ajaxLocParts[ 1 ] + "//" );
+
+		// Extract dataTypes list
+		s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().split( rspacesAjax );
+
+		// Determine if a cross-domain request is in order
+		if ( s.crossDomain == null ) {
+			parts = rurl.exec( s.url.toLowerCase() );
+			s.crossDomain = !!( parts &&
+				( parts[ 1 ] != ajaxLocParts[ 1 ] || parts[ 2 ] != ajaxLocParts[ 2 ] ||
+					( parts[ 3 ] || ( parts[ 1 ] === "http:" ? 80 : 443 ) ) !=
+						( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? 80 : 443 ) ) )
+			);
+		}
+
+		// Convert data if not already a string
+		if ( s.data && s.processData && typeof s.data !== "string" ) {
+			s.data = jQuery.param( s.data, s.traditional );
+		}
+
+		// Apply prefilters
+		inspectPrefiltersOrTransports( prefilters, s, options, jqXHR );
+
+		// If request was aborted inside a prefilter, stop there
+		if ( state === 2 ) {
+			return false;
+		}
+
+		// We can fire global events as of now if asked to
+		fireGlobals = s.global;
+
+		// Uppercase the type
+		s.type = s.type.toUpperCase();
+
+		// Determine if request has content
+		s.hasContent = !rnoContent.test( s.type );
+
+		// Watch for a new set of requests
+		if ( fireGlobals && jQuery.active++ === 0 ) {
+			jQuery.event.trigger( "ajaxStart" );
+		}
+
+		// More options handling for requests with no content
+		if ( !s.hasContent ) {
+
+			// If data is available, append data to url
+			if ( s.data ) {
+				s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.data;
+				// #9682: remove data so that it's not used in an eventual retry
+				delete s.data;
+			}
+
+			// Get ifModifiedKey before adding the anti-cache parameter
+			ifModifiedKey = s.url;
+
+			// Add anti-cache in url if needed
+			if ( s.cache === false ) {
+
+				var ts = jQuery.now(),
+					// try replacing _= if it is there
+					ret = s.url.replace( rts, "$1_=" + ts );
+
+				// if nothing was replaced, add timestamp to the end
+				s.url = ret + ( ( ret === s.url ) ? ( rquery.test( s.url ) ? "&" : "?" ) + "_=" + ts : "" );
+			}
+		}
+
+		// Set the correct header, if data is being sent
+		if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {
+			jqXHR.setRequestHeader( "Content-Type", s.contentType );
+		}
+
+		// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
+		if ( s.ifModified ) {
+			ifModifiedKey = ifModifiedKey || s.url;
+			if ( jQuery.lastModified[ ifModifiedKey ] ) {
+				jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ ifModifiedKey ] );
+			}
+			if ( jQuery.etag[ ifModifiedKey ] ) {
+				jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ ifModifiedKey ] );
+			}
+		}
+
+		// Set the Accepts header for the server, depending on the dataType
+		jqXHR.setRequestHeader(
+			"Accept",
+			s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ?
+				s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) :
+				s.accepts[ "*" ]
+		);
+
+		// Check for headers option
+		for ( i in s.headers ) {
+			jqXHR.setRequestHeader( i, s.headers[ i ] );
+		}
+
+		// Allow custom headers/mimetypes and early abort
+		if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) {
+				// Abort if not done already
+				jqXHR.abort();
+				return false;
+
+		}
+
+		// Install callbacks on deferreds
+		for ( i in { success: 1, error: 1, complete: 1 } ) {
+			jqXHR[ i ]( s[ i ] );
+		}
+
+		// Get transport
+		transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );
+
+		// If no transport, we auto-abort
+		if ( !transport ) {
+			done( -1, "No Transport" );
+		} else {
+			jqXHR.readyState = 1;
+			// Send global event
+			if ( fireGlobals ) {
+				globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] );
+			}
+			// Timeout
+			if ( s.async && s.timeout > 0 ) {
+				timeoutTimer = setTimeout( function(){
+					jqXHR.abort( "timeout" );
+				}, s.timeout );
+			}
+
+			try {
+				state = 1;
+				transport.send( requestHeaders, done );
+			} catch (e) {
+				// Propagate exception as error if not done
+				if ( state < 2 ) {
+					done( -1, e );
+				// Simply rethrow otherwise
+				} else {
+					throw e;
+				}
+			}
+		}
+
+		return jqXHR;
+	},
+
+	// Serialize an array of form elements or a set of
+	// key/values into a query string
+	param: function( a, traditional ) {
+		var s = [],
+			add = function( key, value ) {
+				// If value is a function, invoke it and return its value
+				value = jQuery.isFunction( value ) ? value() : value;
+				s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value );
+			};
+
+		// Set traditional to true for jQuery <= 1.3.2 behavior.
+		if ( traditional === undefined ) {
+			traditional = jQuery.ajaxSettings.traditional;
+		}
+
+		// If an array was passed in, assume that it is an array of form elements.
+		if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {
+			// Serialize the form elements
+			jQuery.each( a, function() {
+				add( this.name, this.value );
+			});
+
+		} else {
+			// If traditional, encode the "old" way (the way 1.3.2 or older
+			// did it), otherwise encode params recursively.
+			for ( var prefix in a ) {
+				buildParams( prefix, a[ prefix ], traditional, add );
+			}
+		}
+
+		// Return the resulting serialization
+		return s.join( "&" ).replace( r20, "+" );
+	}
+});
+
+function buildParams( prefix, obj, traditional, add ) {
+	if ( jQuery.isArray( obj ) ) {
+		// Serialize array item.
+		jQuery.each( obj, function( i, v ) {
+			if ( traditional || rbracket.test( prefix ) ) {
+				// Treat each array item as a scalar.
+				add( prefix, v );
+
+			} else {
+				// If array item is non-scalar (array or object), encode its
+				// numeric index to resolve deserialization ambiguity issues.
+				// Note that rack (as of 1.0.0) can't currently deserialize
+				// nested arrays properly, and attempting to do so may cause
+				// a server error. Possible fixes are to modify rack's
+				// deserialization algorithm or to provide an option or flag
+				// to force array serialization to be shallow.
+				buildParams( prefix + "[" + ( typeof v === "object" ? i : "" ) + "]", v, traditional, add );
+			}
+		});
+
+	} else if ( !traditional && jQuery.type( obj ) === "object" ) {
+		// Serialize object item.
+		for ( var name in obj ) {
+			buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add );
+		}
+
+	} else {
+		// Serialize scalar item.
+		add( prefix, obj );
+	}
+}
+
+// This is still on the jQuery object... for now
+// Want to move this to jQuery.ajax some day
+jQuery.extend({
+
+	// Counter for holding the number of active queries
+	active: 0,
+
+	// Last-Modified header cache for next request
+	lastModified: {},
+	etag: {}
+
+});
+
+/* Handles responses to an ajax request:
+ * - sets all responseXXX fields accordingly
+ * - finds the right dataType (mediates between content-type and expected dataType)
+ * - returns the corresponding response
+ */
+function ajaxHandleResponses( s, jqXHR, responses ) {
+
+	var contents = s.contents,
+		dataTypes = s.dataTypes,
+		responseFields = s.responseFields,
+		ct,
+		type,
+		finalDataType,
+		firstDataType;
+
+	// Fill responseXXX fields
+	for ( type in responseFields ) {
+		if ( type in responses ) {
+			jqXHR[ responseFields[type] ] = responses[ type ];
+		}
+	}
+
+	// Remove auto dataType and get content-type in the process
+	while( dataTypes[ 0 ] === "*" ) {
+		dataTypes.shift();
+		if ( ct === undefined ) {
+			ct = s.mimeType || jqXHR.getResponseHeader( "content-type" );
+		}
+	}
+
+	// Check if we're dealing with a known content-type
+	if ( ct ) {
+		for ( type in contents ) {
+			if ( contents[ type ] && contents[ type ].test( ct ) ) {
+				dataTypes.unshift( type );
+				break;
+			}
+		}
+	}
+
+	// Check to see if we have a response for the expected dataType
+	if ( dataTypes[ 0 ] in responses ) {
+		finalDataType = dataTypes[ 0 ];
+	} else {
+		// Try convertible dataTypes
+		for ( type in responses ) {
+			if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[0] ] ) {
+				finalDataType = type;
+				break;
+			}
+			if ( !firstDataType ) {
+				firstDataType = type;
+			}
+		}
+		// Or just use first one
+		finalDataType = finalDataType || firstDataType;
+	}
+
+	// If we found a dataType
+	// We add the dataType to the list if needed
+	// and return the corresponding response
+	if ( finalDataType ) {
+		if ( finalDataType !== dataTypes[ 0 ] ) {
+			dataTypes.unshift( finalDataType );
+		}
+		return responses[ finalDataType ];
+	}
+}
+
+// Chain conversions given the request and the original response
+function ajaxConvert( s, response ) {
+
+	// Apply the dataFilter if provided
+	if ( s.dataFilter ) {
+		response = s.dataFilter( response, s.dataType );
+	}
+
+	var dataTypes = s.dataTypes,
+		converters = {},
+		i,
+		key,
+		length = dataTypes.length,
+		tmp,
+		// Current and previous dataTypes
+		current = dataTypes[ 0 ],
+		prev,
+		// Conversion expression
+		conversion,
+		// Conversion function
+		conv,
+		// Conversion functions (transitive conversion)
+		conv1,
+		conv2;
+
+	// For each dataType in the chain
+	for ( i = 1; i < length; i++ ) {
+
+		// Create converters map
+		// with lowercased keys
+		if ( i === 1 ) {
+			for ( key in s.converters ) {
+				if ( typeof key === "string" ) {
+					converters[ key.toLowerCase() ] = s.converters[ key ];
+				}
+			}
+		}
+
+		// Get the dataTypes
+		prev = current;
+		current = dataTypes[ i ];
+
+		// If current is auto dataType, update it to prev
+		if ( current === "*" ) {
+			current = prev;
+		// If no auto and dataTypes are actually different
+		} else if ( prev !== "*" && prev !== current ) {
+
+			// Get the converter
+			conversion = prev + " " + current;
+			conv = converters[ conversion ] || converters[ "* " + current ];
+
+			// If there is no direct converter, search transitively
+			if ( !conv ) {
+				conv2 = undefined;
+				for ( conv1 in converters ) {
+					tmp = conv1.split( " " );
+					if ( tmp[ 0 ] === prev || tmp[ 0 ] === "*" ) {
+						conv2 = converters[ tmp[1] + " " + current ];
+						if ( conv2 ) {
+							conv1 = converters[ conv1 ];
+							if ( conv1 === true ) {
+								conv = conv2;
+							} else if ( conv2 === true ) {
+								conv = conv1;
+							}
+							break;
+						}
+					}
+				}
+			}
+			// If we found no converter, dispatch an error
+			if ( !( conv || conv2 ) ) {
+				jQuery.error( "No conversion from " + conversion.replace(" "," to ") );
+			}
+			// If found converter is not an equivalence
+			if ( conv !== true ) {
+				// Convert with 1 or 2 converters accordingly
+				response = conv ? conv( response ) : conv2( conv1(response) );
+			}
+		}
+	}
+	return response;
+}
+
+
+
+
+var jsc = jQuery.now(),
+	jsre = /(\=)\?(&|$)|\?\?/i;
+
+// Default jsonp settings
+jQuery.ajaxSetup({
+	jsonp: "callback",
+	jsonpCallback: function() {
+		return jQuery.expando + "_" + ( jsc++ );
+	}
+});
+
+// Detect, normalize options and install callbacks for jsonp requests
+jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {
+
+	var inspectData = ( typeof s.data === "string" ) && /^application\/x\-www\-form\-urlencoded/.test( s.contentType );
+
+	if ( s.dataTypes[ 0 ] === "jsonp" ||
+		s.jsonp !== false && ( jsre.test( s.url ) ||
+				inspectData && jsre.test( s.data ) ) ) {
+
+		var responseContainer,
+			jsonpCallback = s.jsonpCallback =
+				jQuery.isFunction( s.jsonpCallback ) ? s.jsonpCallback() : s.jsonpCallback,
+			previous = window[ jsonpCallback ],
+			url = s.url,
+			data = s.data,
+			replace = "$1" + jsonpCallback + "$2";
+
+		if ( s.jsonp !== false ) {
+			url = url.replace( jsre, replace );
+			if ( s.url === url ) {
+				if ( inspectData ) {
+					data = data.replace( jsre, replace );
+				}
+				if ( s.data === data ) {
+					// Add callback manually
+					url += (/\?/.test( url ) ? "&" : "?") + s.jsonp + "=" + jsonpCallback;
+				}
+			}
+		}
+
+		s.url = url;
+		s.data = data;
+
+		// Install callback
+		window[ jsonpCallback ] = function( response ) {
+			responseContainer = [ response ];
+		};
+
+		// Clean-up function
+		jqXHR.always(function() {
+			// Set callback back to previous value
+			window[ jsonpCallback ] = previous;
+			// Call if it was a function and we have a response
+			if ( responseContainer && jQuery.isFunction( previous ) ) {
+				window[ jsonpCallback ]( responseContainer[ 0 ] );
+			}
+		});
+
+		// Use data converter to retrieve json after script execution
+		s.converters["script json"] = function() {
+			if ( !responseContainer ) {
+				jQuery.error( jsonpCallback + " was not called" );
+			}
+			return responseContainer[ 0 ];
+		};
+
+		// force json dataType
+		s.dataTypes[ 0 ] = "json";
+
+		// Delegate to script
+		return "script";
+	}
+});
+
+
+
+
+// Install script dataType
+jQuery.ajaxSetup({
+	accepts: {
+		script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
+	},
+	contents: {
+		script: /javascript|ecmascript/
+	},
+	converters: {
+		"text script": function( text ) {
+			jQuery.globalEval( text );
+			return text;
+		}
+	}
+});
+
+// Handle cache's special case and global
+jQuery.ajaxPrefilter( "script", function( s ) {
+	if ( s.cache === undefined ) {
+		s.cache = false;
+	}
+	if ( s.crossDomain ) {
+		s.type = "GET";
+		s.global = false;
+	}
+});
+
+// Bind script tag hack transport
+jQuery.ajaxTransport( "script", function(s) {
+
+	// This transport only deals with cross domain requests
+	if ( s.crossDomain ) {
+
+		var script,
+			head = document.head || document.getElementsByTagName( "head" )[0] || document.documentElement;
+
+		return {
+
+			send: function( _, callback ) {
+
+				script = document.createElement( "script" );
+
+				script.async = "async";
+
+				if ( s.scriptCharset ) {
+					script.charset = s.scriptCharset;
+				}
+
+				script.src = s.url;
+
+				// Attach handlers for all browsers
+				script.onload = script.onreadystatechange = function( _, isAbort ) {
+
+					if ( isAbort || !script.readyState || /loaded|complete/.test( script.readyState ) ) {
+
+						// Handle memory leak in IE
+						script.onload = script.onreadystatechange = null;
+
+						// Remove the script
+						if ( head && script.parentNode ) {
+							head.removeChild( script );
+						}
+
+						// Dereference the script
+						script = undefined;
+
+						// Callback if not abort
+						if ( !isAbort ) {
+							callback( 200, "success" );
+						}
+					}
+				};
+				// Use insertBefore instead of appendChild  to circumvent an IE6 bug.
+				// This arises when a base node is used (#2709 and #4378).
+				head.insertBefore( script, head.firstChild );
+			},
+
+			abort: function() {
+				if ( script ) {
+					script.onload( 0, 1 );
+				}
+			}
+		};
+	}
+});
+
+
+
+
+var // #5280: Internet Explorer will keep connections alive if we don't abort on unload
+	xhrOnUnloadAbort = window.ActiveXObject ? function() {
+		// Abort all pending requests
+		for ( var key in xhrCallbacks ) {
+			xhrCallbacks[ key ]( 0, 1 );
+		}
+	} : false,
+	xhrId = 0,
+	xhrCallbacks;
+
+// Functions to create xhrs
+function createStandardXHR() {
+	try {
+		return new window.XMLHttpRequest();
+	} catch( e ) {}
+}
+
+function createActiveXHR() {
+	try {
+		return new window.ActiveXObject( "Microsoft.XMLHTTP" );
+	} catch( e ) {}
+}
+
+// Create the request object
+// (This is still attached to ajaxSettings for backward compatibility)
+jQuery.ajaxSettings.xhr = window.ActiveXObject ?
+	/* Microsoft failed to properly
+	 * implement the XMLHttpRequest in IE7 (can't request local files),
+	 * so we use the ActiveXObject when it is available
+	 * Additionally XMLHttpRequest can be disabled in IE7/IE8 so
+	 * we need a fallback.
+	 */
+	function() {
+		return !this.isLocal && createStandardXHR() || createActiveXHR();
+	} :
+	// For all other browsers, use the standard XMLHttpRequest object
+	createStandardXHR;
+
+// Determine support properties
+(function( xhr ) {
+	jQuery.extend( jQuery.support, {
+		ajax: !!xhr,
+		cors: !!xhr && ( "withCredentials" in xhr )
+	});
+})( jQuery.ajaxSettings.xhr() );
+
+// Create transport if the browser can provide an xhr
+if ( jQuery.support.ajax ) {
+
+	jQuery.ajaxTransport(function( s ) {
+		// Cross domain only allowed if supported through XMLHttpRequest
+		if ( !s.crossDomain || jQuery.support.cors ) {
+
+			var callback;
+
+			return {
+				send: function( headers, complete ) {
+
+					// Get a new xhr
+					var xhr = s.xhr(),
+						handle,
+						i;
+
+					// Open the socket
+					// Passing null username, generates a login popup on Opera (#2865)
+					if ( s.username ) {
+						xhr.open( s.type, s.url, s.async, s.username, s.password );
+					} else {
+						xhr.open( s.type, s.url, s.async );
+					}
+
+					// Apply custom fields if provided
+					if ( s.xhrFields ) {
+						for ( i in s.xhrFields ) {
+							xhr[ i ] = s.xhrFields[ i ];
+						}
+					}
+
+					// Override mime type if needed
+					if ( s.mimeType && xhr.overrideMimeType ) {
+						xhr.overrideMimeType( s.mimeType );
+					}
+
+					// X-Requested-With header
+					// For cross-domain requests, seeing as conditions for a preflight are
+					// akin to a jigsaw puzzle, we simply never set it to be sure.
+					// (it can always be set on a per-request basis or even using ajaxSetup)
+					// For same-domain requests, won't change header if already provided.
+					if ( !s.crossDomain && !headers["X-Requested-With"] ) {
+						headers[ "X-Requested-With" ] = "XMLHttpRequest";
+					}
+
+					// Need an extra try/catch for cross domain requests in Firefox 3
+					try {
+						for ( i in headers ) {
+							xhr.setRequestHeader( i, headers[ i ] );
+						}
+					} catch( _ ) {}
+
+					// Do send the request
+					// This may raise an exception which is actually
+					// handled in jQuery.ajax (so no try/catch here)
+					xhr.send( ( s.hasContent && s.data ) || null );
+
+					// Listener
+					callback = function( _, isAbort ) {
+
+						var status,
+							statusText,
+							responseHeaders,
+							responses,
+							xml;
+
+						// Firefox throws exceptions when accessing properties
+						// of an xhr when a network error occured
+						// http://helpful.knobs-dials.com/index.php/Component_returned_failure_code:_0x80040111_(NS_ERROR_NOT_AVAILABLE)
+						try {
+
+							// Was never called and is aborted or complete
+							if ( callback && ( isAbort || xhr.readyState === 4 ) ) {
+
+								// Only called once
+								callback = undefined;
+
+								// Do not keep as active anymore
+								if ( handle ) {
+									xhr.onreadystatechange = jQuery.noop;
+									if ( xhrOnUnloadAbort ) {
+										delete xhrCallbacks[ handle ];
+									}
+								}
+
+								// If it's an abort
+								if ( isAbort ) {
+									// Abort it manually if needed
+									if ( xhr.readyState !== 4 ) {
+										xhr.abort();
+									}
+								} else {
+									status = xhr.status;
+									responseHeaders = xhr.getAllResponseHeaders();
+									responses = {};
+									xml = xhr.responseXML;
+
+									// Construct response list
+									if ( xml && xml.documentElement /* #4958 */ ) {
+										responses.xml = xml;
+									}
+
+									// When requesting binary data, IE6-9 will throw an exception
+									// on any attempt to access responseText (#11426)
+									try {
+										responses.text = xhr.responseText;
+									} catch( _ ) {
+									}
+
+									// Firefox throws an exception when accessing
+									// statusText for faulty cross-domain requests
+									try {
+										statusText = xhr.statusText;
+									} catch( e ) {
+										// We normalize with Webkit giving an empty statusText
+										statusText = "";
+									}
+
+									// Filter status for non standard behaviors
+
+									// If the request is local and we have data: assume a success
+									// (success with no data won't get notified, that's the best we
+									// can do given current implementations)
+									if ( !status && s.isLocal && !s.crossDomain ) {
+										status = responses.text ? 200 : 404;
+									// IE - #1450: sometimes returns 1223 when it should be 204
+									} else if ( status === 1223 ) {
+										status = 204;
+									}
+								}
+							}
+						} catch( firefoxAccessException ) {
+							if ( !isAbort ) {
+								complete( -1, firefoxAccessException );
+							}
+						}
+
+						// Call complete if needed
+						if ( responses ) {
+							complete( status, statusText, responses, responseHeaders );
+						}
+					};
+
+					// if we're in sync mode or it's in cache
+					// and has been retrieved directly (IE6 & IE7)
+					// we need to manually fire the callback
+					if ( !s.async || xhr.readyState === 4 ) {
+						callback();
+					} else {
+						handle = ++xhrId;
+						if ( xhrOnUnloadAbort ) {
+							// Create the active xhrs callbacks list if needed
+							// and attach the unload handler
+							if ( !xhrCallbacks ) {
+								xhrCallbacks = {};
+								jQuery( window ).unload( xhrOnUnloadAbort );
+							}
+							// Add to list of active xhrs callbacks
+							xhrCallbacks[ handle ] = callback;
+						}
+						xhr.onreadystatechange = callback;
+					}
+				},
+
+				abort: function() {
+					if ( callback ) {
+						callback(0,1);
+					}
+				}
+			};
+		}
+	});
+}
+
+
+
+
+var elemdisplay = {},
+	iframe, iframeDoc,
+	rfxtypes = /^(?:toggle|show|hide)$/,
+	rfxnum = /^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,
+	timerId,
+	fxAttrs = [
+		// height animations
+		[ "height", "marginTop", "marginBottom", "paddingTop", "paddingBottom" ],
+		// width animations
+		[ "width", "marginLeft", "marginRight", "paddingLeft", "paddingRight" ],
+		// opacity animations
+		[ "opacity" ]
+	],
+	fxNow;
+
+jQuery.fn.extend({
+	show: function( speed, easing, callback ) {
+		var elem, display;
+
+		if ( speed || speed === 0 ) {
+			return this.animate( genFx("show", 3), speed, easing, callback );
+
+		} else {
+			for ( var i = 0, j = this.length; i < j; i++ ) {
+				elem = this[ i ];
+
+				if ( elem.style ) {
+					display = elem.style.display;
+
+					// Reset the inline display of this element to learn if it is
+					// being hidden by cascaded rules or not
+					if ( !jQuery._data(elem, "olddisplay") && display === "none" ) {
+						display = elem.style.display = "";
+					}
+
+					// Set elements which have been overridden with display: none
+					// in a stylesheet to whatever the default browser style is
+					// for such an element
+					if ( (display === "" && jQuery.css(elem, "display") === "none") ||
+						!jQuery.contains( elem.ownerDocument.documentElement, elem ) ) {
+						jQuery._data( elem, "olddisplay", defaultDisplay(elem.nodeName) );
+					}
+				}
+			}
+
+			// Set the display of most of the elements in a second loop
+			// to avoid the constant reflow
+			for ( i = 0; i < j; i++ ) {
+				elem = this[ i ];
+
+				if ( elem.style ) {
+					display = elem.style.display;
+
+					if ( display === "" || display === "none" ) {
+						elem.style.display = jQuery._data( elem, "olddisplay" ) || "";
+					}
+				}
+			}
+
+			return this;
+		}
+	},
+
+	hide: function( speed, easing, callback ) {
+		if ( speed || speed === 0 ) {
+			return this.animate( genFx("hide", 3), speed, easing, callback);
+
+		} else {
+			var elem, display,
+				i = 0,
+				j = this.length;
+
+			for ( ; i < j; i++ ) {
+				elem = this[i];
+				if ( elem.style ) {
+					display = jQuery.css( elem, "display" );
+
+					if ( display !== "none" && !jQuery._data( elem, "olddisplay" ) ) {
+						jQuery._data( elem, "olddisplay", display );
+					}
+				}
+			}
+
+			// Set the display of the elements in a second loop
+			// to avoid the constant reflow
+			for ( i = 0; i < j; i++ ) {
+				if ( this[i].style ) {
+					this[i].style.display = "none";
+				}
+			}
+
+			return this;
+		}
+	},
+
+	// Save the old toggle function
+	_toggle: jQuery.fn.toggle,
+
+	toggle: function( fn, fn2, callback ) {
+		var bool = typeof fn === "boolean";
+
+		if ( jQuery.isFunction(fn) && jQuery.isFunction(fn2) ) {
+			this._toggle.apply( this, arguments );
+
+		} else if ( fn == null || bool ) {
+			this.each(function() {
+				var state = bool ? fn : jQuery(this).is(":hidden");
+				jQuery(this)[ state ? "show" : "hide" ]();
+			});
+
+		} else {
+			this.animate(genFx("toggle", 3), fn, fn2, callback);
+		}
+
+		return this;
+	},
+
+	fadeTo: function( speed, to, easing, callback ) {
+		return this.filter(":hidden").css("opacity", 0).show().end()
+					.animate({opacity: to}, speed, easing, callback);
+	},
+
+	animate: function( prop, speed, easing, callback ) {
+		var optall = jQuery.speed( speed, easing, callback );
+
+		if ( jQuery.isEmptyObject( prop ) ) {
+			return this.each( optall.complete, [ false ] );
+		}
+
+		// Do not change referenced properties as per-property easing will be lost
+		prop = jQuery.extend( {}, prop );
+
+		function doAnimation() {
+			// XXX 'this' does not always have a nodeName when running the
+			// test suite
+
+			if ( optall.queue === false ) {
+				jQuery._mark( this );
+			}
+
+			var opt = jQuery.extend( {}, optall ),
+				isElement = this.nodeType === 1,
+				hidden = isElement && jQuery(this).is(":hidden"),
+				name, val, p, e, hooks, replace,
+				parts, start, end, unit,
+				method;
+
+			// will store per property easing and be used to determine when an animation is complete
+			opt.animatedProperties = {};
+
+			// first pass over propertys to expand / normalize
+			for ( p in prop ) {
+				name = jQuery.camelCase( p );
+				if ( p !== name ) {
+					prop[ name ] = prop[ p ];
+					delete prop[ p ];
+				}
+
+				if ( ( hooks = jQuery.cssHooks[ name ] ) && "expand" in hooks ) {
+					replace = hooks.expand( prop[ name ] );
+					delete prop[ name ];
+
+					// not quite $.extend, this wont overwrite keys already present.
+					// also - reusing 'p' from above because we have the correct "name"
+					for ( p in replace ) {
+						if ( ! ( p in prop ) ) {
+							prop[ p ] = replace[ p ];
+						}
+					}
+				}
+			}
+
+			for ( name in prop ) {
+				val = prop[ name ];
+				// easing resolution: per property > opt.specialEasing > opt.easing > 'swing' (default)
+				if ( jQuery.isArray( val ) ) {
+					opt.animatedProperties[ name ] = val[ 1 ];
+					val = prop[ name ] = val[ 0 ];
+				} else {
+					opt.animatedProperties[ name ] = opt.specialEasing && opt.specialEasing[ name ] || opt.easing || 'swing';
+				}
+
+				if ( val === "hide" && hidden || val === "show" && !hidden ) {
+					return opt.complete.call( this );
+				}
+
+				if ( isElement && ( name === "height" || name === "width" ) ) {
+					// Make sure that nothing sneaks out
+					// Record all 3 overflow attributes because IE does not
+					// change the overflow attribute when overflowX and
+					// overflowY are set to the same value
+					opt.overflow = [ this.style.overflow, this.style.overflowX, this.style.overflowY ];
+
+					// Set display property to inline-block for height/width
+					// animations on inline elements that are having width/height animated
+					if ( jQuery.css( this, "display" ) === "inline" &&
+							jQuery.css( this, "float" ) === "none" ) {
+
+						// inline-level elements accept inline-block;
+						// block-level elements need to be inline with layout
+						if ( !jQuery.support.inlineBlockNeedsLayout || defaultDisplay( this.nodeName ) === "inline" ) {
+							this.style.display = "inline-block";
+
+						} else {
+							this.style.zoom = 1;
+						}
+					}
+				}
+			}
+
+			if ( opt.overflow != null ) {
+				this.style.overflow = "hidden";
+			}
+
+			for ( p in prop ) {
+				e = new jQuery.fx( this, opt, p );
+				val = prop[ p ];
+
+				if ( rfxtypes.test( val ) ) {
+
+					// Tracks whether to show or hide based on private
+					// data attached to the element
+					method = jQuery._data( this, "toggle" + p ) || ( val === "toggle" ? hidden ? "show" : "hide" : 0 );
+					if ( method ) {
+						jQuery._data( this, "toggle" + p, method === "show" ? "hide" : "show" );
+						e[ method ]();
+					} else {
+						e[ val ]();
+					}
+
+				} else {
+					parts = rfxnum.exec( val );
+					start = e.cur();
+
+					if ( parts ) {
+						end = parseFloat( parts[2] );
+						unit = parts[3] || ( jQuery.cssNumber[ p ] ? "" : "px" );
+
+						// We need to compute starting value
+						if ( unit !== "px" ) {
+							jQuery.style( this, p, (end || 1) + unit);
+							start = ( (end || 1) / e.cur() ) * start;
+							jQuery.style( this, p, start + unit);
+						}
+
+						// If a +=/-= token was provided, we're doing a relative animation
+						if ( parts[1] ) {
+							end = ( (parts[ 1 ] === "-=" ? -1 : 1) * end ) + start;
+						}
+
+						e.custom( start, end, unit );
+
+					} else {
+						e.custom( start, val, "" );
+					}
+				}
+			}
+
+			// For JS strict compliance
+			return true;
+		}
+
+		return optall.queue === false ?
+			this.each( doAnimation ) :
+			this.queue( optall.queue, doAnimation );
+	},
+
+	stop: function( type, clearQueue, gotoEnd ) {
+		if ( typeof type !== "string" ) {
+			gotoEnd = clearQueue;
+			clearQueue = type;
+			type = undefined;
+		}
+		if ( clearQueue && type !== false ) {
+			this.queue( type || "fx", [] );
+		}
+
+		return this.each(function() {
+			var index,
+				hadTimers = false,
+				timers = jQuery.timers,
+				data = jQuery._data( this );
+
+			// clear marker counters if we know they won't be
+			if ( !gotoEnd ) {
+				jQuery._unmark( true, this );
+			}
+
+			function stopQueue( elem, data, index ) {
+				var hooks = data[ index ];
+				jQuery.removeData( elem, index, true );
+				hooks.stop( gotoEnd );
+			}
+
+			if ( type == null ) {
+				for ( index in data ) {
+					if ( data[ index ] && data[ index ].stop && index.indexOf(".run") === index.length - 4 ) {
+						stopQueue( this, data, index );
+					}
+				}
+			} else if ( data[ index = type + ".run" ] && data[ index ].stop ){
+				stopQueue( this, data, index );
+			}
+
+			for ( index = timers.length; index--; ) {
+				if ( timers[ index ].elem === this && (type == null || timers[ index ].queue === type) ) {
+					if ( gotoEnd ) {
+
+						// force the next step to be the last
+						timers[ index ]( true );
+					} else {
+						timers[ index ].saveState();
+					}
+					hadTimers = true;
+					timers.splice( index, 1 );
+				}
+			}
+
+			// start the next in the queue if the last step wasn't forced
+			// timers currently will call their complete callbacks, which will dequeue
+			// but only if they were gotoEnd
+			if ( !( gotoEnd && hadTimers ) ) {
+				jQuery.dequeue( this, type );
+			}
+		});
+	}
+
+});
+
+// Animations created synchronously will run synchronously
+function createFxNow() {
+	setTimeout( clearFxNow, 0 );
+	return ( fxNow = jQuery.now() );
+}
+
+function clearFxNow() {
+	fxNow = undefined;
+}
+
+// Generate parameters to create a standard animation
+function genFx( type, num ) {
+	var obj = {};
+
+	jQuery.each( fxAttrs.concat.apply([], fxAttrs.slice( 0, num )), function() {
+		obj[ this ] = type;
+	});
+
+	return obj;
+}
+
+// Generate shortcuts for custom animations
+jQuery.each({
+	slideDown: genFx( "show", 1 ),
+	slideUp: genFx( "hide", 1 ),
+	slideToggle: genFx( "toggle", 1 ),
+	fadeIn: { opacity: "show" },
+	fadeOut: { opacity: "hide" },
+	fadeToggle: { opacity: "toggle" }
+}, function( name, props ) {
+	jQuery.fn[ name ] = function( speed, easing, callback ) {
+		return this.animate( props, speed, easing, callback );
+	};
+});
+
+jQuery.extend({
+	speed: function( speed, easing, fn ) {
+		var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : {
+			complete: fn || !fn && easing ||
+				jQuery.isFunction( speed ) && speed,
+			duration: speed,
+			easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing
+		};
+
+		opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration :
+			opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default;
+
+		// normalize opt.queue - true/undefined/null -> "fx"
+		if ( opt.queue == null || opt.queue === true ) {
+			opt.queue = "fx";
+		}
+
+		// Queueing
+		opt.old = opt.complete;
+
+		opt.complete = function( noUnmark ) {
+			if ( jQuery.isFunction( opt.old ) ) {
+				opt.old.call( this );
+			}
+
+			if ( opt.queue ) {
+				jQuery.dequeue( this, opt.queue );
+			} else if ( noUnmark !== false ) {
+				jQuery._unmark( this );
+			}
+		};
+
+		return opt;
+	},
+
+	easing: {
+		linear: function( p ) {
+			return p;
+		},
+		swing: function( p ) {
+			return ( -Math.cos( p*Math.PI ) / 2 ) + 0.5;
+		}
+	},
+
+	timers: [],
+
+	fx: function( elem, options, prop ) {
+		this.options = options;
+		this.elem = elem;
+		this.prop = prop;
+
+		options.orig = options.orig || {};
+	}
+
+});
+
+jQuery.fx.prototype = {
+	// Simple function for setting a style value
+	update: function() {
+		if ( this.options.step ) {
+			this.options.step.call( this.elem, this.now, this );
+		}
+
+		( jQuery.fx.step[ this.prop ] || jQuery.fx.step._default )( this );
+	},
+
+	// Get the current size
+	cur: function() {
+		if ( this.elem[ this.prop ] != null && (!this.elem.style || this.elem.style[ this.prop ] == null) ) {
+			return this.elem[ this.prop ];
+		}
+
+		var parsed,
+			r = jQuery.css( this.elem, this.prop );
+		// Empty strings, null, undefined and "auto" are converted to 0,
+		// complex values such as "rotate(1rad)" are returned as is,
+		// simple values such as "10px" are parsed to Float.
+		return isNaN( parsed = parseFloat( r ) ) ? !r || r === "auto" ? 0 : r : parsed;
+	},
+
+	// Start an animation from one number to another
+	custom: function( from, to, unit ) {
+		var self = this,
+			fx = jQuery.fx;
+
+		this.startTime = fxNow || createFxNow();
+		this.end = to;
+		this.now = this.start = from;
+		this.pos = this.state = 0;
+		this.unit = unit || this.unit || ( jQuery.cssNumber[ this.prop ] ? "" : "px" );
+
+		function t( gotoEnd ) {
+			return self.step( gotoEnd );
+		}
+
+		t.queue = this.options.queue;
+		t.elem = this.elem;
+		t.saveState = function() {
+			if ( jQuery._data( self.elem, "fxshow" + self.prop ) === undefined ) {
+				if ( self.options.hide ) {
+					jQuery._data( self.elem, "fxshow" + self.prop, self.start );
+				} else if ( self.options.show ) {
+					jQuery._data( self.elem, "fxshow" + self.prop, self.end );
+				}
+			}
+		};
+
+		if ( t() && jQuery.timers.push(t) && !timerId ) {
+			timerId = setInterval( fx.tick, fx.interval );
+		}
+	},
+
+	// Simple 'show' function
+	show: function() {
+		var dataShow = jQuery._data( this.elem, "fxshow" + this.prop );
+
+		// Remember where we started, so that we can go back to it later
+		this.options.orig[ this.prop ] = dataShow || jQuery.style( this.elem, this.prop );
+		this.options.show = true;
+
+		// Begin the animation
+		// Make sure that we start at a small width/height to avoid any flash of content
+		if ( dataShow !== undefined ) {
+			// This show is picking up where a previous hide or show left off
+			this.custom( this.cur(), dataShow );
+		} else {
+			this.custom( this.prop === "width" || this.prop === "height" ? 1 : 0, this.cur() );
+		}
+
+		// Start by showing the element
+		jQuery( this.elem ).show();
+	},
+
+	// Simple 'hide' function
+	hide: function() {
+		// Remember where we started, so that we can go back to it later
+		this.options.orig[ this.prop ] = jQuery._data( this.elem, "fxshow" + this.prop ) || jQuery.style( this.elem, this.prop );
+		this.options.hide = true;
+
+		// Begin the animation
+		this.custom( this.cur(), 0 );
+	},
+
+	// Each step of an animation
+	step: function( gotoEnd ) {
+		var p, n, complete,
+			t = fxNow || createFxNow(),
+			done = true,
+			elem = this.elem,
+			options = this.options;
+
+		if ( gotoEnd || t >= options.duration + this.startTime ) {
+			this.now = this.end;
+			this.pos = this.state = 1;
+			this.update();
+
+			options.animatedProperties[ this.prop ] = true;
+
+			for ( p in options.animatedProperties ) {
+				if ( options.animatedProperties[ p ] !== true ) {
+					done = false;
+				}
+			}
+
+			if ( done ) {
+				// Reset the overflow
+				if ( options.overflow != null && !jQuery.support.shrinkWrapBlocks ) {
+
+					jQuery.each( [ "", "X", "Y" ], function( index, value ) {
+						elem.style[ "overflow" + value ] = options.overflow[ index ];
+					});
+				}
+
+				// Hide the element if the "hide" operation was done
+				if ( options.hide ) {
+					jQuery( elem ).hide();
+				}
+
+				// Reset the properties, if the item has been hidden or shown
+				if ( options.hide || options.show ) {
+					for ( p in options.animatedProperties ) {
+						jQuery.style( elem, p, options.orig[ p ] );
+						jQuery.removeData( elem, "fxshow" + p, true );
+						// Toggle data is no longer needed
+						jQuery.removeData( elem, "toggle" + p, true );
+					}
+				}
+
+				// Execute the complete function
+				// in the event that the complete function throws an exception
+				// we must ensure it won't be called twice. #5684
+
+				complete = options.complete;
+				if ( complete ) {
+
+					options.complete = false;
+					complete.call( elem );
+				}
+			}
+
+			return false;
+
+		} else {
+			// classical easing cannot be used with an Infinity duration
+			if ( options.duration == Infinity ) {
+				this.now = t;
+			} else {
+				n = t - this.startTime;
+				this.state = n / options.duration;
+
+				// Perform the easing function, defaults to swing
+				this.pos = jQuery.easing[ options.animatedProperties[this.prop] ]( this.state, n, 0, 1, options.duration );
+				this.now = this.start + ( (this.end - this.start) * this.pos );
+			}
+			// Perform the next step of the animation
+			this.update();
+		}
+
+		return true;
+	}
+};
+
+jQuery.extend( jQuery.fx, {
+	tick: function() {
+		var timer,
+			timers = jQuery.timers,
+			i = 0;
+
+		for ( ; i < timers.length; i++ ) {
+			timer = timers[ i ];
+			// Checks the timer has not already been removed
+			if ( !timer() && timers[ i ] === timer ) {
+				timers.splice( i--, 1 );
+			}
+		}
+
+		if ( !timers.length ) {
+			jQuery.fx.stop();
+		}
+	},
+
+	interval: 13,
+
+	stop: function() {
+		clearInterval( timerId );
+		timerId = null;
+	},
+
+	speeds: {
+		slow: 600,
+		fast: 200,
+		// Default speed
+		_default: 400
+	},
+
+	step: {
+		opacity: function( fx ) {
+			jQuery.style( fx.elem, "opacity", fx.now );
+		},
+
+		_default: function( fx ) {
+			if ( fx.elem.style && fx.elem.style[ fx.prop ] != null ) {
+				fx.elem.style[ fx.prop ] = fx.now + fx.unit;
+			} else {
+				fx.elem[ fx.prop ] = fx.now;
+			}
+		}
+	}
+});
+
+// Ensure props that can't be negative don't go there on undershoot easing
+jQuery.each( fxAttrs.concat.apply( [], fxAttrs ), function( i, prop ) {
+	// exclude marginTop, marginLeft, marginBottom and marginRight from this list
+	if ( prop.indexOf( "margin" ) ) {
+		jQuery.fx.step[ prop ] = function( fx ) {
+			jQuery.style( fx.elem, prop, Math.max(0, fx.now) + fx.unit );
+		};
+	}
+});
+
+if ( jQuery.expr && jQuery.expr.filters ) {
+	jQuery.expr.filters.animated = function( elem ) {
+		return jQuery.grep(jQuery.timers, function( fn ) {
+			return elem === fn.elem;
+		}).length;
+	};
+}
+
+// Try to restore the default display value of an element
+function defaultDisplay( nodeName ) {
+
+	if ( !elemdisplay[ nodeName ] ) {
+
+		var body = document.body,
+			elem = jQuery( "<" + nodeName + ">" ).appendTo( body ),
+			display = elem.css( "display" );
+		elem.remove();
+
+		// If the simple way fails,
+		// get element's real default display by attaching it to a temp iframe
+		if ( display === "none" || display === "" ) {
+			// No iframe to use yet, so create it
+			if ( !iframe ) {
+				iframe = document.createElement( "iframe" );
+				iframe.frameBorder = iframe.width = iframe.height = 0;
+			}
+
+			body.appendChild( iframe );
+
+			// Create a cacheable copy of the iframe document on first call.
+			// IE and Opera will allow us to reuse the iframeDoc without re-writing the fake HTML
+			// document to it; WebKit & Firefox won't allow reusing the iframe document.
+			if ( !iframeDoc || !iframe.createElement ) {
+				iframeDoc = ( iframe.contentWindow || iframe.contentDocument ).document;
+				iframeDoc.write( ( jQuery.support.boxModel ? "<!doctype html>" : "" ) + "<html><body>" );
+				iframeDoc.close();
+			}
+
+			elem = iframeDoc.createElement( nodeName );
+
+			iframeDoc.body.appendChild( elem );
+
+			display = jQuery.css( elem, "display" );
+			body.removeChild( iframe );
+		}
+
+		// Store the correct default display
+		elemdisplay[ nodeName ] = display;
+	}
+
+	return elemdisplay[ nodeName ];
+}
+
+
+
+
+var getOffset,
+	rtable = /^t(?:able|d|h)$/i,
+	rroot = /^(?:body|html)$/i;
+
+if ( "getBoundingClientRect" in document.documentElement ) {
+	getOffset = function( elem, doc, docElem, box ) {
+		try {
+			box = elem.getBoundingClientRect();
+		} catch(e) {}
+
+		// Make sure we're not dealing with a disconnected DOM node
+		if ( !box || !jQuery.contains( docElem, elem ) ) {
+			return box ? { top: box.top, left: box.left } : { top: 0, left: 0 };
+		}
+
+		var body = doc.body,
+			win = getWindow( doc ),
+			clientTop  = docElem.clientTop  || body.clientTop  || 0,
+			clientLeft = docElem.clientLeft || body.clientLeft || 0,
+			scrollTop  = win.pageYOffset || jQuery.support.boxModel && docElem.scrollTop  || body.scrollTop,
+			scrollLeft = win.pageXOffset || jQuery.support.boxModel && docElem.scrollLeft || body.scrollLeft,
+			top  = box.top  + scrollTop  - clientTop,
+			left = box.left + scrollLeft - clientLeft;
+
+		return { top: top, left: left };
+	};
+
+} else {
+	getOffset = function( elem, doc, docElem ) {
+		var computedStyle,
+			offsetParent = elem.offsetParent,
+			prevOffsetParent = elem,
+			body = doc.body,
+			defaultView = doc.defaultView,
+			prevComputedStyle = defaultView ? defaultView.getComputedStyle( elem, null ) : elem.currentStyle,
+			top = elem.offsetTop,
+			left = elem.offsetLeft;
+
+		while ( (elem = elem.parentNode) && elem !== body && elem !== docElem ) {
+			if ( jQuery.support.fixedPosition && prevComputedStyle.position === "fixed" ) {
+				break;
+			}
+
+			computedStyle = defaultView ? defaultView.getComputedStyle(elem, null) : elem.currentStyle;
+			top  -= elem.scrollTop;
+			left -= elem.scrollLeft;
+
+			if ( elem === offsetParent ) {
+				top  += elem.offsetTop;
+				left += elem.offsetLeft;
+
+				if ( jQuery.support.doesNotAddBorder && !(jQuery.support.doesAddBorderForTableAndCells && rtable.test(elem.nodeName)) ) {
+					top  += parseFloat( computedStyle.borderTopWidth  ) || 0;
+					left += parseFloat( computedStyle.borderLeftWidth ) || 0;
+				}
+
+				prevOffsetParent = offsetParent;
+				offsetParent = elem.offsetParent;
+			}
+
+			if ( jQuery.support.subtractsBorderForOverflowNotVisible && computedStyle.overflow !== "visible" ) {
+				top  += parseFloat( computedStyle.borderTopWidth  ) || 0;
+				left += parseFloat( computedStyle.borderLeftWidth ) || 0;
+			}
+
+			prevComputedStyle = computedStyle;
+		}
+
+		if ( prevComputedStyle.position === "relative" || prevComputedStyle.position === "static" ) {
+			top  += body.offsetTop;
+			left += body.offsetLeft;
+		}
+
+		if ( jQuery.support.fixedPosition && prevComputedStyle.position === "fixed" ) {
+			top  += Math.max( docElem.scrollTop, body.scrollTop );
+			left += Math.max( docElem.scrollLeft, body.scrollLeft );
+		}
+
+		return { top: top, left: left };
+	};
+}
+
+jQuery.fn.offset = function( options ) {
+	if ( arguments.length ) {
+		return options === undefined ?
+			this :
+			this.each(function( i ) {
+				jQuery.offset.setOffset( this, options, i );
+			});
+	}
+
+	var elem = this[0],
+		doc = elem && elem.ownerDocument;
+
+	if ( !doc ) {
+		return null;
+	}
+
+	if ( elem === doc.body ) {
+		return jQuery.offset.bodyOffset( elem );
+	}
+
+	return getOffset( elem, doc, doc.documentElement );
+};
+
+jQuery.offset = {
+
+	bodyOffset: function( body ) {
+		var top = body.offsetTop,
+			left = body.offsetLeft;
+
+		if ( jQuery.support.doesNotIncludeMarginInBodyOffset ) {
+			top  += parseFloat( jQuery.css(body, "marginTop") ) || 0;
+			left += parseFloat( jQuery.css(body, "marginLeft") ) || 0;
+		}
+
+		return { top: top, left: left };
+	},
+
+	setOffset: function( elem, options, i ) {
+		var position = jQuery.css( elem, "position" );
+
+		// set position first, in-case top/left are set even on static elem
+		if ( position === "static" ) {
+			elem.style.position = "relative";
+		}
+
+		var curElem = jQuery( elem ),
+			curOffset = curElem.offset(),
+			curCSSTop = jQuery.css( elem, "top" ),
+			curCSSLeft = jQuery.css( elem, "left" ),
+			calculatePosition = ( position === "absolute" || position === "fixed" ) && jQuery.inArray("auto", [curCSSTop, curCSSLeft]) > -1,
+			props = {}, curPosition = {}, curTop, curLeft;
+
+		// need to be able to calculate position if either top or left is auto and position is either absolute or fixed
+		if ( calculatePosition ) {
+			curPosition = curElem.position();
+			curTop = curPosition.top;
+			curLeft = curPosition.left;
+		} else {
+			curTop = parseFloat( curCSSTop ) || 0;
+			curLeft = parseFloat( curCSSLeft ) || 0;
+		}
+
+		if ( jQuery.isFunction( options ) ) {
+			options = options.call( elem, i, curOffset );
+		}
+
+		if ( options.top != null ) {
+			props.top = ( options.top - curOffset.top ) + curTop;
+		}
+		if ( options.left != null ) {
+			props.left = ( options.left - curOffset.left ) + curLeft;
+		}
+
+		if ( "using" in options ) {
+			options.using.call( elem, props );
+		} else {
+			curElem.css( props );
+		}
+	}
+};
+
+
+jQuery.fn.extend({
+
+	position: function() {
+		if ( !this[0] ) {
+			return null;
+		}
+
+		var elem = this[0],
+
+		// Get *real* offsetParent
+		offsetParent = this.offsetParent(),
+
+		// Get correct offsets
+		offset       = this.offset(),
+		parentOffset = rroot.test(offsetParent[0].nodeName) ? { top: 0, left: 0 } : offsetParent.offset();
+
+		// Subtract element margins
+		// note: when an element has margin: auto the offsetLeft and marginLeft
+		// are the same in Safari causing offset.left to incorrectly be 0
+		offset.top  -= parseFloat( jQuery.css(elem, "marginTop") ) || 0;
+		offset.left -= parseFloat( jQuery.css(elem, "marginLeft") ) || 0;
+
+		// Add offsetParent borders
+		parentOffset.top  += parseFloat( jQuery.css(offsetParent[0], "borderTopWidth") ) || 0;
+		parentOffset.left += parseFloat( jQuery.css(offsetParent[0], "borderLeftWidth") ) || 0;
+
+		// Subtract the two offsets
+		return {
+			top:  offset.top  - parentOffset.top,
+			left: offset.left - parentOffset.left
+		};
+	},
+
+	offsetParent: function() {
+		return this.map(function() {
+			var offsetParent = this.offsetParent || document.body;
+			while ( offsetParent && (!rroot.test(offsetParent.nodeName) && jQuery.css(offsetParent, "position") === "static") ) {
+				offsetParent = offsetParent.offsetParent;
+			}
+			return offsetParent;
+		});
+	}
+});
+
+
+// Create scrollLeft and scrollTop methods
+jQuery.each( {scrollLeft: "pageXOffset", scrollTop: "pageYOffset"}, function( method, prop ) {
+	var top = /Y/.test( prop );
+
+	jQuery.fn[ method ] = function( val ) {
+		return jQuery.access( this, function( elem, method, val ) {
+			var win = getWindow( elem );
+
+			if ( val === undefined ) {
+				return win ? (prop in win) ? win[ prop ] :
+					jQuery.support.boxModel && win.document.documentElement[ method ] ||
+						win.document.body[ method ] :
+					elem[ method ];
+			}
+
+			if ( win ) {
+				win.scrollTo(
+					!top ? val : jQuery( win ).scrollLeft(),
+					 top ? val : jQuery( win ).scrollTop()
+				);
+
+			} else {
+				elem[ method ] = val;
+			}
+		}, method, val, arguments.length, null );
+	};
+});
+
+function getWindow( elem ) {
+	return jQuery.isWindow( elem ) ?
+		elem :
+		elem.nodeType === 9 ?
+			elem.defaultView || elem.parentWindow :
+			false;
+}
+
+
+
+
+// Create width, height, innerHeight, innerWidth, outerHeight and outerWidth methods
+jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
+	var clientProp = "client" + name,
+		scrollProp = "scroll" + name,
+		offsetProp = "offset" + name;
+
+	// innerHeight and innerWidth
+	jQuery.fn[ "inner" + name ] = function() {
+		var elem = this[0];
+		return elem ?
+			elem.style ?
+			parseFloat( jQuery.css( elem, type, "padding" ) ) :
+			this[ type ]() :
+			null;
+	};
+
+	// outerHeight and outerWidth
+	jQuery.fn[ "outer" + name ] = function( margin ) {
+		var elem = this[0];
+		return elem ?
+			elem.style ?
+			parseFloat( jQuery.css( elem, type, margin ? "margin" : "border" ) ) :
+			this[ type ]() :
+			null;
+	};
+
+	jQuery.fn[ type ] = function( value ) {
+		return jQuery.access( this, function( elem, type, value ) {
+			var doc, docElemProp, orig, ret;
+
+			if ( jQuery.isWindow( elem ) ) {
+				// 3rd condition allows Nokia support, as it supports the docElem prop but not CSS1Compat
+				doc = elem.document;
+				docElemProp = doc.documentElement[ clientProp ];
+				return jQuery.support.boxModel && docElemProp ||
+					doc.body && doc.body[ clientProp ] || docElemProp;
+			}
+
+			// Get document width or height
+			if ( elem.nodeType === 9 ) {
+				// Either scroll[Width/Height] or offset[Width/Height], whichever is greater
+				doc = elem.documentElement;
+
+				// when a window > document, IE6 reports a offset[Width/Height] > client[Width/Height]
+				// so we can't use max, as it'll choose the incorrect offset[Width/Height]
+				// instead we use the correct client[Width/Height]
+				// support:IE6
+				if ( doc[ clientProp ] >= doc[ scrollProp ] ) {
+					return doc[ clientProp ];
+				}
+
+				return Math.max(
+					elem.body[ scrollProp ], doc[ scrollProp ],
+					elem.body[ offsetProp ], doc[ offsetProp ]
+				);
+			}
+
+			// Get width or height on the element
+			if ( value === undefined ) {
+				orig = jQuery.css( elem, type );
+				ret = parseFloat( orig );
+				return jQuery.isNumeric( ret ) ? ret : orig;
+			}
+
+			// Set the width or height on the element
+			jQuery( elem ).css( type, value );
+		}, type, value, arguments.length, null );
+	};
+});
+
+
+
+
+// Expose jQuery to the global object
+window.jQuery = window.$ = jQuery;
+
+// Expose jQuery as an AMD module, but only for AMD loaders that
+// understand the issues with loading multiple versions of jQuery
+// in a page that all might call define(). The loader will indicate
+// they have special allowances for multiple jQuery versions by
+// specifying define.amd.jQuery = true. Register as a named module,
+// since jQuery can be concatenated with other files that may use define,
+// but not use a proper concatenation script that understands anonymous
+// AMD modules. A named AMD is safest and most robust way to register.
+// Lowercase jquery is used because AMD module names are derived from
+// file names, and jQuery is normally delivered in a lowercase file name.
+// Do this after creating the global so that if an AMD module wants to call
+// noConflict to hide this version of jQuery, it will work.
+if ( typeof define === "function" && define.amd && define.amd.jQuery ) {
+	define( "jquery", [], function () { return jQuery; } );
+}
+
+
+
+})( window );
diff --git a/docs/html/_static/minus.png b/docs/html/_static/minus.png
new file mode 100644
index 0000000..da1c562
Binary files /dev/null and b/docs/html/_static/minus.png differ
diff --git a/docs/html/_static/plus.png b/docs/html/_static/plus.png
new file mode 100644
index 0000000..b3cb374
Binary files /dev/null and b/docs/html/_static/plus.png differ
diff --git a/docs/html/_static/pygments.css b/docs/html/_static/pygments.css
new file mode 100644
index 0000000..d79caa1
--- /dev/null
+++ b/docs/html/_static/pygments.css
@@ -0,0 +1,62 @@
+.highlight .hll { background-color: #ffffcc }
+.highlight  { background: #eeffcc; }
+.highlight .c { color: #408090; font-style: italic } /* Comment */
+.highlight .err { border: 1px solid #FF0000 } /* Error */
+.highlight .k { color: #007020; font-weight: bold } /* Keyword */
+.highlight .o { color: #666666 } /* Operator */
+.highlight .cm { color: #408090; font-style: italic } /* Comment.Multiline */
+.highlight .cp { color: #007020 } /* Comment.Preproc */
+.highlight .c1 { color: #408090; font-style: italic } /* Comment.Single */
+.highlight .cs { color: #408090; background-color: #fff0f0 } /* Comment.Special */
+.highlight .gd { color: #A00000 } /* Generic.Deleted */
+.highlight .ge { font-style: italic } /* Generic.Emph */
+.highlight .gr { color: #FF0000 } /* Generic.Error */
+.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
+.highlight .gi { color: #00A000 } /* Generic.Inserted */
+.highlight .go { color: #333333 } /* Generic.Output */
+.highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */
+.highlight .gs { font-weight: bold } /* Generic.Strong */
+.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
+.highlight .gt { color: #0044DD } /* Generic.Traceback */
+.highlight .kc { color: #007020; font-weight: bold } /* Keyword.Constant */
+.highlight .kd { color: #007020; font-weight: bold } /* Keyword.Declaration */
+.highlight .kn { color: #007020; font-weight: bold } /* Keyword.Namespace */
+.highlight .kp { color: #007020 } /* Keyword.Pseudo */
+.highlight .kr { color: #007020; font-weight: bold } /* Keyword.Reserved */
+.highlight .kt { color: #902000 } /* Keyword.Type */
+.highlight .m { color: #208050 } /* Literal.Number */
+.highlight .s { color: #4070a0 } /* Literal.String */
+.highlight .na { color: #4070a0 } /* Name.Attribute */
+.highlight .nb { color: #007020 } /* Name.Builtin */
+.highlight .nc { color: #0e84b5; font-weight: bold } /* Name.Class */
+.highlight .no { color: #60add5 } /* Name.Constant */
+.highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */
+.highlight .ni { color: #d55537; font-weight: bold } /* Name.Entity */
+.highlight .ne { color: #007020 } /* Name.Exception */
+.highlight .nf { color: #06287e } /* Name.Function */
+.highlight .nl { color: #002070; font-weight: bold } /* Name.Label */
+.highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */
+.highlight .nt { color: #062873; font-weight: bold } /* Name.Tag */
+.highlight .nv { color: #bb60d5 } /* Name.Variable */
+.highlight .ow { color: #007020; font-weight: bold } /* Operator.Word */
+.highlight .w { color: #bbbbbb } /* Text.Whitespace */
+.highlight .mf { color: #208050 } /* Literal.Number.Float */
+.highlight .mh { color: #208050 } /* Literal.Number.Hex */
+.highlight .mi { color: #208050 } /* Literal.Number.Integer */
+.highlight .mo { color: #208050 } /* Literal.Number.Oct */
+.highlight .sb { color: #4070a0 } /* Literal.String.Backtick */
+.highlight .sc { color: #4070a0 } /* Literal.String.Char */
+.highlight .sd { color: #4070a0; font-style: italic } /* Literal.String.Doc */
+.highlight .s2 { color: #4070a0 } /* Literal.String.Double */
+.highlight .se { color: #4070a0; font-weight: bold } /* Literal.String.Escape */
+.highlight .sh { color: #4070a0 } /* Literal.String.Heredoc */
+.highlight .si { color: #70a0d0; font-style: italic } /* Literal.String.Interpol */
+.highlight .sx { color: #c65d09 } /* Literal.String.Other */
+.highlight .sr { color: #235388 } /* Literal.String.Regex */
+.highlight .s1 { color: #4070a0 } /* Literal.String.Single */
+.highlight .ss { color: #517918 } /* Literal.String.Symbol */
+.highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */
+.highlight .vc { color: #bb60d5 } /* Name.Variable.Class */
+.highlight .vg { color: #bb60d5 } /* Name.Variable.Global */
+.highlight .vi { color: #bb60d5 } /* Name.Variable.Instance */
+.highlight .il { color: #208050 } /* Literal.Number.Integer.Long */
\ No newline at end of file
diff --git a/docs/html/_static/searchtools.js b/docs/html/_static/searchtools.js
new file mode 100644
index 0000000..11b85cb
--- /dev/null
+++ b/docs/html/_static/searchtools.js
@@ -0,0 +1,567 @@
+/*
+ * searchtools.js_t
+ * ~~~~~~~~~~~~~~~~
+ *
+ * Sphinx JavaScript utilties for the full-text search.
+ *
+ * :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
+ * :license: BSD, see LICENSE for details.
+ *
+ */
+
+/**
+ * helper function to return a node containing the
+ * search summary for a given text. keywords is a list
+ * of stemmed words, hlwords is the list of normal, unstemmed
+ * words. the first one is used to find the occurance, the
+ * latter for highlighting it.
+ */
+
+jQuery.makeSearchSummary = function(text, keywords, hlwords) {
+  var textLower = text.toLowerCase();
+  var start = 0;
+  $.each(keywords, function() {
+    var i = textLower.indexOf(this.toLowerCase());
+    if (i > -1)
+      start = i;
+  });
+  start = Math.max(start - 120, 0);
+  var excerpt = ((start > 0) ? '...' : '') +
+  $.trim(text.substr(start, 240)) +
+  ((start + 240 - text.length) ? '...' : '');
+  var rv = $('<div class="context"></div>').text(excerpt);
+  $.each(hlwords, function() {
+    rv = rv.highlightText(this, 'highlighted');
+  });
+  return rv;
+}
+
+
+/**
+ * Porter Stemmer
+ */
+var Stemmer = function() {
+
+  var step2list = {
+    ational: 'ate',
+    tional: 'tion',
+    enci: 'ence',
+    anci: 'ance',
+    izer: 'ize',
+    bli: 'ble',
+    alli: 'al',
+    entli: 'ent',
+    eli: 'e',
+    ousli: 'ous',
+    ization: 'ize',
+    ation: 'ate',
+    ator: 'ate',
+    alism: 'al',
+    iveness: 'ive',
+    fulness: 'ful',
+    ousness: 'ous',
+    aliti: 'al',
+    iviti: 'ive',
+    biliti: 'ble',
+    logi: 'log'
+  };
+
+  var step3list = {
+    icate: 'ic',
+    ative: '',
+    alize: 'al',
+    iciti: 'ic',
+    ical: 'ic',
+    ful: '',
+    ness: ''
+  };
+
+  var c = "[^aeiou]";          // consonant
+  var v = "[aeiouy]";          // vowel
+  var C = c + "[^aeiouy]*";    // consonant sequence
+  var V = v + "[aeiou]*";      // vowel sequence
+
+  var mgr0 = "^(" + C + ")?" + V + C;                      // [C]VC... is m>0
+  var meq1 = "^(" + C + ")?" + V + C + "(" + V + ")?$";    // [C]VC[V] is m=1
+  var mgr1 = "^(" + C + ")?" + V + C + V + C;              // [C]VCVC... is m>1
+  var s_v   = "^(" + C + ")?" + v;                         // vowel in stem
+
+  this.stemWord = function (w) {
+    var stem;
+    var suffix;
+    var firstch;
+    var origword = w;
+
+    if (w.length < 3)
+      return w;
+
+    var re;
+    var re2;
+    var re3;
+    var re4;
+
+    firstch = w.substr(0,1);
+    if (firstch == "y")
+      w = firstch.toUpperCase() + w.substr(1);
+
+    // Step 1a
+    re = /^(.+?)(ss|i)es$/;
+    re2 = /^(.+?)([^s])s$/;
+
+    if (re.test(w))
+      w = w.replace(re,"$1$2");
+    else if (re2.test(w))
+      w = w.replace(re2,"$1$2");
+
+    // Step 1b
+    re = /^(.+?)eed$/;
+    re2 = /^(.+?)(ed|ing)$/;
+    if (re.test(w)) {
+      var fp = re.exec(w);
+      re = new RegExp(mgr0);
+      if (re.test(fp[1])) {
+        re = /.$/;
+        w = w.replace(re,"");
+      }
+    }
+    else if (re2.test(w)) {
+      var fp = re2.exec(w);
+      stem = fp[1];
+      re2 = new RegExp(s_v);
+      if (re2.test(stem)) {
+        w = stem;
+        re2 = /(at|bl|iz)$/;
+        re3 = new RegExp("([^aeiouylsz])\\1$");
+        re4 = new RegExp("^" + C + v + "[^aeiouwxy]$");
+        if (re2.test(w))
+          w = w + "e";
+        else if (re3.test(w)) {
+          re = /.$/;
+          w = w.replace(re,"");
+        }
+        else if (re4.test(w))
+          w = w + "e";
+      }
+    }
+
+    // Step 1c
+    re = /^(.+?)y$/;
+    if (re.test(w)) {
+      var fp = re.exec(w);
+      stem = fp[1];
+      re = new RegExp(s_v);
+      if (re.test(stem))
+        w = stem + "i";
+    }
+
+    // Step 2
+    re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/;
+    if (re.test(w)) {
+      var fp = re.exec(w);
+      stem = fp[1];
+      suffix = fp[2];
+      re = new RegExp(mgr0);
+      if (re.test(stem))
+        w = stem + step2list[suffix];
+    }
+
+    // Step 3
+    re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/;
+    if (re.test(w)) {
+      var fp = re.exec(w);
+      stem = fp[1];
+      suffix = fp[2];
+      re = new RegExp(mgr0);
+      if (re.test(stem))
+        w = stem + step3list[suffix];
+    }
+
+    // Step 4
+    re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/;
+    re2 = /^(.+?)(s|t)(ion)$/;
+    if (re.test(w)) {
+      var fp = re.exec(w);
+      stem = fp[1];
+      re = new RegExp(mgr1);
+      if (re.test(stem))
+        w = stem;
+    }
+    else if (re2.test(w)) {
+      var fp = re2.exec(w);
+      stem = fp[1] + fp[2];
+      re2 = new RegExp(mgr1);
+      if (re2.test(stem))
+        w = stem;
+    }
+
+    // Step 5
+    re = /^(.+?)e$/;
+    if (re.test(w)) {
+      var fp = re.exec(w);
+      stem = fp[1];
+      re = new RegExp(mgr1);
+      re2 = new RegExp(meq1);
+      re3 = new RegExp("^" + C + v + "[^aeiouwxy]$");
+      if (re.test(stem) || (re2.test(stem) && !(re3.test(stem))))
+        w = stem;
+    }
+    re = /ll$/;
+    re2 = new RegExp(mgr1);
+    if (re.test(w) && re2.test(w)) {
+      re = /.$/;
+      w = w.replace(re,"");
+    }
+
+    // and turn initial Y back to y
+    if (firstch == "y")
+      w = firstch.toLowerCase() + w.substr(1);
+    return w;
+  }
+}
+
+
+/**
+ * Search Module
+ */
+var Search = {
+
+  _index : null,
+  _queued_query : null,
+  _pulse_status : -1,
+
+  init : function() {
+      var params = $.getQueryParameters();
+      if (params.q) {
+          var query = params.q[0];
+          $('input[name="q"]')[0].value = query;
+          this.performSearch(query);
+      }
+  },
+
+  loadIndex : function(url) {
+    $.ajax({type: "GET", url: url, data: null,
+            dataType: "script", cache: true,
+            complete: function(jqxhr, textstatus) {
+              if (textstatus != "success") {
+                document.getElementById("searchindexloader").src = url;
+              }
+            }});
+  },
+
+  setIndex : function(index) {
+    var q;
+    this._index = index;
+    if ((q = this._queued_query) !== null) {
+      this._queued_query = null;
+      Search.query(q);
+    }
+  },
+
+  hasIndex : function() {
+      return this._index !== null;
+  },
+
+  deferQuery : function(query) {
+      this._queued_query = query;
+  },
+
+  stopPulse : function() {
+      this._pulse_status = 0;
+  },
+
+  startPulse : function() {
+    if (this._pulse_status >= 0)
+        return;
+    function pulse() {
+      Search._pulse_status = (Search._pulse_status + 1) % 4;
+      var dotString = '';
+      for (var i = 0; i < Search._pulse_status; i++)
+        dotString += '.';
+      Search.dots.text(dotString);
+      if (Search._pulse_status > -1)
+        window.setTimeout(pulse, 500);
+    };
+    pulse();
+  },
+
+  /**
+   * perform a search for something
+   */
+  performSearch : function(query) {
+    // create the required interface elements
+    this.out = $('#search-results');
+    this.title = $('<h2>' + _('Searching') + '</h2>').appendTo(this.out);
+    this.dots = $('<span></span>').appendTo(this.title);
+    this.status = $('<p style="display: none"></p>').appendTo(this.out);
+    this.output = $('<ul class="search"/>').appendTo(this.out);
+
+    $('#search-progress').text(_('Preparing search...'));
+    this.startPulse();
+
+    // index already loaded, the browser was quick!
+    if (this.hasIndex())
+      this.query(query);
+    else
+      this.deferQuery(query);
+  },
+
+  query : function(query) {
+    var stopwords = ["a","and","are","as","at","be","but","by","for","if","in","into","is","it","near","no","not","of","on","or","such","that","the","their","then","there","these","they","this","to","was","will","with"];
+
+    // Stem the searchterms and add them to the correct list
+    var stemmer = new Stemmer();
+    var searchterms = [];
+    var excluded = [];
+    var hlterms = [];
+    var tmp = query.split(/\s+/);
+    var objectterms = [];
+    for (var i = 0; i < tmp.length; i++) {
+      if (tmp[i] != "") {
+          objectterms.push(tmp[i].toLowerCase());
+      }
+
+      if ($u.indexOf(stopwords, tmp[i]) != -1 || tmp[i].match(/^\d+$/) ||
+          tmp[i] == "") {
+        // skip this "word"
+        continue;
+      }
+      // stem the word
+      var word = stemmer.stemWord(tmp[i]).toLowerCase();
+      // select the correct list
+      if (word[0] == '-') {
+        var toAppend = excluded;
+        word = word.substr(1);
+      }
+      else {
+        var toAppend = searchterms;
+        hlterms.push(tmp[i].toLowerCase());
+      }
+      // only add if not already in the list
+      if (!$.contains(toAppend, word))
+        toAppend.push(word);
+    };
+    var highlightstring = '?highlight=' + $.urlencode(hlterms.join(" "));
+
+    // console.debug('SEARCH: searching for:');
+    // console.info('required: ', searchterms);
+    // console.info('excluded: ', excluded);
+
+    // prepare search
+    var filenames = this._index.filenames;
+    var titles = this._index.titles;
+    var terms = this._index.terms;
+    var fileMap = {};
+    var files = null;
+    // different result priorities
+    var importantResults = [];
+    var objectResults = [];
+    var regularResults = [];
+    var unimportantResults = [];
+    $('#search-progress').empty();
+
+    // lookup as object
+    for (var i = 0; i < objectterms.length; i++) {
+      var others = [].concat(objectterms.slice(0,i),
+                             objectterms.slice(i+1, objectterms.length))
+      var results = this.performObjectSearch(objectterms[i], others);
+      // Assume first word is most likely to be the object,
+      // other words more likely to be in description.
+      // Therefore put matches for earlier words first.
+      // (Results are eventually used in reverse order).
+      objectResults = results[0].concat(objectResults);
+      importantResults = results[1].concat(importantResults);
+      unimportantResults = results[2].concat(unimportantResults);
+    }
+
+    // perform the search on the required terms
+    for (var i = 0; i < searchterms.length; i++) {
+      var word = searchterms[i];
+      // no match but word was a required one
+      if ((files = terms[word]) == null)
+        break;
+      if (files.length == undefined) {
+        files = [files];
+      }
+      // create the mapping
+      for (var j = 0; j < files.length; j++) {
+        var file = files[j];
+        if (file in fileMap)
+          fileMap[file].push(word);
+        else
+          fileMap[file] = [word];
+      }
+    }
+
+    // now check if the files don't contain excluded terms
+    for (var file in fileMap) {
+      var valid = true;
+
+      // check if all requirements are matched
+      if (fileMap[file].length != searchterms.length)
+        continue;
+
+      // ensure that none of the excluded terms is in the
+      // search result.
+      for (var i = 0; i < excluded.length; i++) {
+        if (terms[excluded[i]] == file ||
+            $.contains(terms[excluded[i]] || [], file)) {
+          valid = false;
+          break;
+        }
+      }
+
+      // if we have still a valid result we can add it
+      // to the result list
+      if (valid)
+        regularResults.push([filenames[file], titles[file], '', null]);
+    }
+
+    // delete unused variables in order to not waste
+    // memory until list is retrieved completely
+    delete filenames, titles, terms;
+
+    // now sort the regular results descending by title
+    regularResults.sort(function(a, b) {
+      var left = a[1].toLowerCase();
+      var right = b[1].toLowerCase();
+      return (left > right) ? -1 : ((left < right) ? 1 : 0);
+    });
+
+    // combine all results
+    var results = unimportantResults.concat(regularResults)
+      .concat(objectResults).concat(importantResults);
+
+    // print the results
+    var resultCount = results.length;
+    function displayNextItem() {
+      // results left, load the summary and display it
+      if (results.length) {
+        var item = results.pop();
+        var listItem = $('<li style="display:none"></li>');
+        if (DOCUMENTATION_OPTIONS.FILE_SUFFIX == '') {
+          // dirhtml builder
+          var dirname = item[0] + '/';
+          if (dirname.match(/\/index\/$/)) {
+            dirname = dirname.substring(0, dirname.length-6);
+          } else if (dirname == 'index/') {
+            dirname = '';
+          }
+          listItem.append($('<a/>').attr('href',
+            DOCUMENTATION_OPTIONS.URL_ROOT + dirname +
+            highlightstring + item[2]).html(item[1]));
+        } else {
+          // normal html builders
+          listItem.append($('<a/>').attr('href',
+            item[0] + DOCUMENTATION_OPTIONS.FILE_SUFFIX +
+            highlightstring + item[2]).html(item[1]));
+        }
+        if (item[3]) {
+          listItem.append($('<span> (' + item[3] + ')</span>'));
+          Search.output.append(listItem);
+          listItem.slideDown(5, function() {
+            displayNextItem();
+          });
+        } else if (DOCUMENTATION_OPTIONS.HAS_SOURCE) {
+          $.ajax({url: DOCUMENTATION_OPTIONS.URL_ROOT + '_sources/' + item[0] + '.txt',
+                  dataType: "text",
+                  complete: function(jqxhr, textstatus) {
+                    var data = jqxhr.responseText;
+                    if (data !== '') {
+                      listItem.append($.makeSearchSummary(data, searchterms, hlterms));
+                    }
+                    Search.output.append(listItem);
+                    listItem.slideDown(5, function() {
+                      displayNextItem();
+                    });
+                  }});
+        } else {
+          // no source available, just display title
+          Search.output.append(listItem);
+          listItem.slideDown(5, function() {
+            displayNextItem();
+          });
+        }
+      }
+      // search finished, update title and status message
+      else {
+        Search.stopPulse();
+        Search.title.text(_('Search Results'));
+        if (!resultCount)
+          Search.status.text(_('Your search did not match any documents. Please make sure that all words are spelled correctly and that you\'ve selected enough categories.'));
+        else
+            Search.status.text(_('Search finished, found %s page(s) matching the search query.').replace('%s', resultCount));
+        Search.status.fadeIn(500);
+      }
+    }
+    displayNextItem();
+  },
+
+  performObjectSearch : function(object, otherterms) {
+    var filenames = this._index.filenames;
+    var objects = this._index.objects;
+    var objnames = this._index.objnames;
+    var titles = this._index.titles;
+
+    var importantResults = [];
+    var objectResults = [];
+    var unimportantResults = [];
+
+    for (var prefix in objects) {
+      for (var name in objects[prefix]) {
+        var fullname = (prefix ? prefix + '.' : '') + name;
+        if (fullname.toLowerCase().indexOf(object) > -1) {
+          var match = objects[prefix][name];
+          var objname = objnames[match[1]][2];
+          var title = titles[match[0]];
+          // If more than one term searched for, we require other words to be
+          // found in the name/title/description
+          if (otherterms.length > 0) {
+            var haystack = (prefix + ' ' + name + ' ' +
+                            objname + ' ' + title).toLowerCase();
+            var allfound = true;
+            for (var i = 0; i < otherterms.length; i++) {
+              if (haystack.indexOf(otherterms[i]) == -1) {
+                allfound = false;
+                break;
+              }
+            }
+            if (!allfound) {
+              continue;
+            }
+          }
+          var descr = objname + _(', in ') + title;
+          anchor = match[3];
+          if (anchor == '')
+            anchor = fullname;
+          else if (anchor == '-')
+            anchor = objnames[match[1]][1] + '-' + fullname;
+          result = [filenames[match[0]], fullname, '#'+anchor, descr];
+          switch (match[2]) {
+          case 1: objectResults.push(result); break;
+          case 0: importantResults.push(result); break;
+          case 2: unimportantResults.push(result); break;
+          }
+        }
+      }
+    }
+
+    // sort results descending
+    objectResults.sort(function(a, b) {
+      return (a[1] > b[1]) ? -1 : ((a[1] < b[1]) ? 1 : 0);
+    });
+
+    importantResults.sort(function(a, b) {
+      return (a[1] > b[1]) ? -1 : ((a[1] < b[1]) ? 1 : 0);
+    });
+
+    unimportantResults.sort(function(a, b) {
+      return (a[1] > b[1]) ? -1 : ((a[1] < b[1]) ? 1 : 0);
+    });
+
+    return [importantResults, objectResults, unimportantResults]
+  }
+}
+
+$(document).ready(function() {
+  Search.init();
+});
\ No newline at end of file
diff --git a/docs/html/_static/sidebar.js b/docs/html/_static/sidebar.js
new file mode 100644
index 0000000..a45e192
--- /dev/null
+++ b/docs/html/_static/sidebar.js
@@ -0,0 +1,151 @@
+/*
+ * sidebar.js
+ * ~~~~~~~~~~
+ *
+ * This script makes the Sphinx sidebar collapsible.
+ *
+ * .sphinxsidebar contains .sphinxsidebarwrapper.  This script adds
+ * in .sphixsidebar, after .sphinxsidebarwrapper, the #sidebarbutton
+ * used to collapse and expand the sidebar.
+ *
+ * When the sidebar is collapsed the .sphinxsidebarwrapper is hidden
+ * and the width of the sidebar and the margin-left of the document
+ * are decreased. When the sidebar is expanded the opposite happens.
+ * This script saves a per-browser/per-session cookie used to
+ * remember the position of the sidebar among the pages.
+ * Once the browser is closed the cookie is deleted and the position
+ * reset to the default (expanded).
+ *
+ * :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
+ * :license: BSD, see LICENSE for details.
+ *
+ */
+
+$(function() {
+  // global elements used by the functions.
+  // the 'sidebarbutton' element is defined as global after its
+  // creation, in the add_sidebar_button function
+  var bodywrapper = $('.bodywrapper');
+  var sidebar = $('.sphinxsidebar');
+  var sidebarwrapper = $('.sphinxsidebarwrapper');
+
+  // for some reason, the document has no sidebar; do not run into errors
+  if (!sidebar.length) return;
+
+  // original margin-left of the bodywrapper and width of the sidebar
+  // with the sidebar expanded
+  var bw_margin_expanded = bodywrapper.css('margin-left');
+  var ssb_width_expanded = sidebar.width();
+
+  // margin-left of the bodywrapper and width of the sidebar
+  // with the sidebar collapsed
+  var bw_margin_collapsed = '.8em';
+  var ssb_width_collapsed = '.8em';
+
+  // colors used by the current theme
+  var dark_color = $('.related').css('background-color');
+  var light_color = $('.document').css('background-color');
+
+  function sidebar_is_collapsed() {
+    return sidebarwrapper.is(':not(:visible)');
+  }
+
+  function toggle_sidebar() {
+    if (sidebar_is_collapsed())
+      expand_sidebar();
+    else
+      collapse_sidebar();
+  }
+
+  function collapse_sidebar() {
+    sidebarwrapper.hide();
+    sidebar.css('width', ssb_width_collapsed);
+    bodywrapper.css('margin-left', bw_margin_collapsed);
+    sidebarbutton.css({
+        'margin-left': '0',
+        'height': bodywrapper.height()
+    });
+    sidebarbutton.find('span').text('»');
+    sidebarbutton.attr('title', _('Expand sidebar'));
+    document.cookie = 'sidebar=collapsed';
+  }
+
+  function expand_sidebar() {
+    bodywrapper.css('margin-left', bw_margin_expanded);
+    sidebar.css('width', ssb_width_expanded);
+    sidebarwrapper.show();
+    sidebarbutton.css({
+        'margin-left': ssb_width_expanded-12,
+        'height': bodywrapper.height()
+    });
+    sidebarbutton.find('span').text('«');
+    sidebarbutton.attr('title', _('Collapse sidebar'));
+    document.cookie = 'sidebar=expanded';
+  }
+
+  function add_sidebar_button() {
+    sidebarwrapper.css({
+        'float': 'left',
+        'margin-right': '0',
+        'width': ssb_width_expanded - 28
+    });
+    // create the button
+    sidebar.append(
+        '<div id="sidebarbutton"><span>«</span></div>'
+    );
+    var sidebarbutton = $('#sidebarbutton');
+    light_color = sidebarbutton.css('background-color');
+    // find the height of the viewport to center the '<<' in the page
+    var viewport_height;
+    if (window.innerHeight)
+ 	  viewport_height = window.innerHeight;
+    else
+	  viewport_height = $(window).height();
+    sidebarbutton.find('span').css({
+        'display': 'block',
+        'margin-top': (viewport_height - sidebar.position().top - 20) / 2
+    });
+
+    sidebarbutton.click(toggle_sidebar);
+    sidebarbutton.attr('title', _('Collapse sidebar'));
+    sidebarbutton.css({
+        'color': '#FFFFFF',
+        'border-left': '1px solid ' + dark_color,
+        'font-size': '1.2em',
+        'cursor': 'pointer',
+        'height': bodywrapper.height(),
+        'padding-top': '1px',
+        'margin-left': ssb_width_expanded - 12
+    });
+
+    sidebarbutton.hover(
+      function () {
+          $(this).css('background-color', dark_color);
+      },
+      function () {
+          $(this).css('background-color', light_color);
+      }
+    );
+  }
+
+  function set_position_from_cookie() {
+    if (!document.cookie)
+      return;
+    var items = document.cookie.split(';');
+    for(var k=0; k<items.length; k++) {
+      var key_val = items[k].split('=');
+      var key = key_val[0];
+      if (key == 'sidebar') {
+        var value = key_val[1];
+        if ((value == 'collapsed') && (!sidebar_is_collapsed()))
+          collapse_sidebar();
+        else if ((value == 'expanded') && (sidebar_is_collapsed()))
+          expand_sidebar();
+      }
+    }
+  }
+
+  add_sidebar_button();
+  var sidebarbutton = $('#sidebarbutton');
+  set_position_from_cookie();
+});
diff --git a/docs/html/_static/underscore.js b/docs/html/_static/underscore.js
new file mode 100644
index 0000000..4d83099
--- /dev/null
+++ b/docs/html/_static/underscore.js
@@ -0,0 +1,1221 @@
+//     Underscore.js 1.4.3
+//     http://underscorejs.org
+//     (c) 2009-2012 Jeremy Ashkenas, DocumentCloud Inc.
+//     Underscore may be freely distributed under the MIT license.
+
+(function() {
+
+  // Baseline setup
+  // --------------
+
+  // Establish the root object, `window` in the browser, or `global` on the server.
+  var root = this;
+
+  // Save the previous value of the `_` variable.
+  var previousUnderscore = root._;
+
+  // Establish the object that gets returned to break out of a loop iteration.
+  var breaker = {};
+
+  // Save bytes in the minified (but not gzipped) version:
+  var ArrayProto = Array.prototype, ObjProto = Object.prototype, FuncProto = Function.prototype;
+
+  // Create quick reference variables for speed access to core prototypes.
+  var push             = ArrayProto.push,
+      slice            = ArrayProto.slice,
+      concat           = ArrayProto.concat,
+      toString         = ObjProto.toString,
+      hasOwnProperty   = ObjProto.hasOwnProperty;
+
+  // All **ECMAScript 5** native function implementations that we hope to use
+  // are declared here.
+  var
+    nativeForEach      = ArrayProto.forEach,
+    nativeMap          = ArrayProto.map,
+    nativeReduce       = ArrayProto.reduce,
+    nativeReduceRight  = ArrayProto.reduceRight,
+    nativeFilter       = ArrayProto.filter,
+    nativeEvery        = ArrayProto.every,
+    nativeSome         = ArrayProto.some,
+    nativeIndexOf      = ArrayProto.indexOf,
+    nativeLastIndexOf  = ArrayProto.lastIndexOf,
+    nativeIsArray      = Array.isArray,
+    nativeKeys         = Object.keys,
+    nativeBind         = FuncProto.bind;
+
+  // Create a safe reference to the Underscore object for use below.
+  var _ = function(obj) {
+    if (obj instanceof _) return obj;
+    if (!(this instanceof _)) return new _(obj);
+    this._wrapped = obj;
+  };
+
+  // Export the Underscore object for **Node.js**, with
+  // backwards-compatibility for the old `require()` API. If we're in
+  // the browser, add `_` as a global object via a string identifier,
+  // for Closure Compiler "advanced" mode.
+  if (typeof exports !== 'undefined') {
+    if (typeof module !== 'undefined' && module.exports) {
+      exports = module.exports = _;
+    }
+    exports._ = _;
+  } else {
+    root._ = _;
+  }
+
+  // Current version.
+  _.VERSION = '1.4.3';
+
+  // Collection Functions
+  // --------------------
+
+  // The cornerstone, an `each` implementation, aka `forEach`.
+  // Handles objects with the built-in `forEach`, arrays, and raw objects.
+  // Delegates to **ECMAScript 5**'s native `forEach` if available.
+  var each = _.each = _.forEach = function(obj, iterator, context) {
+    if (obj == null) return;
+    if (nativeForEach && obj.forEach === nativeForEach) {
+      obj.forEach(iterator, context);
+    } else if (obj.length === +obj.length) {
+      for (var i = 0, l = obj.length; i < l; i++) {
+        if (iterator.call(context, obj[i], i, obj) === breaker) return;
+      }
+    } else {
+      for (var key in obj) {
+        if (_.has(obj, key)) {
+          if (iterator.call(context, obj[key], key, obj) === breaker) return;
+        }
+      }
+    }
+  };
+
+  // Return the results of applying the iterator to each element.
+  // Delegates to **ECMAScript 5**'s native `map` if available.
+  _.map = _.collect = function(obj, iterator, context) {
+    var results = [];
+    if (obj == null) return results;
+    if (nativeMap && obj.map === nativeMap) return obj.map(iterator, context);
+    each(obj, function(value, index, list) {
+      results[results.length] = iterator.call(context, value, index, list);
+    });
+    return results;
+  };
+
+  var reduceError = 'Reduce of empty array with no initial value';
+
+  // **Reduce** builds up a single result from a list of values, aka `inject`,
+  // or `foldl`. Delegates to **ECMAScript 5**'s native `reduce` if available.
+  _.reduce = _.foldl = _.inject = function(obj, iterator, memo, context) {
+    var initial = arguments.length > 2;
+    if (obj == null) obj = [];
+    if (nativeReduce && obj.reduce === nativeReduce) {
+      if (context) iterator = _.bind(iterator, context);
+      return initial ? obj.reduce(iterator, memo) : obj.reduce(iterator);
+    }
+    each(obj, function(value, index, list) {
+      if (!initial) {
+        memo = value;
+        initial = true;
+      } else {
+        memo = iterator.call(context, memo, value, index, list);
+      }
+    });
+    if (!initial) throw new TypeError(reduceError);
+    return memo;
+  };
+
+  // The right-associative version of reduce, also known as `foldr`.
+  // Delegates to **ECMAScript 5**'s native `reduceRight` if available.
+  _.reduceRight = _.foldr = function(obj, iterator, memo, context) {
+    var initial = arguments.length > 2;
+    if (obj == null) obj = [];
+    if (nativeReduceRight && obj.reduceRight === nativeReduceRight) {
+      if (context) iterator = _.bind(iterator, context);
+      return initial ? obj.reduceRight(iterator, memo) : obj.reduceRight(iterator);
+    }
+    var length = obj.length;
+    if (length !== +length) {
+      var keys = _.keys(obj);
+      length = keys.length;
+    }
+    each(obj, function(value, index, list) {
+      index = keys ? keys[--length] : --length;
+      if (!initial) {
+        memo = obj[index];
+        initial = true;
+      } else {
+        memo = iterator.call(context, memo, obj[index], index, list);
+      }
+    });
+    if (!initial) throw new TypeError(reduceError);
+    return memo;
+  };
+
+  // Return the first value which passes a truth test. Aliased as `detect`.
+  _.find = _.detect = function(obj, iterator, context) {
+    var result;
+    any(obj, function(value, index, list) {
+      if (iterator.call(context, value, index, list)) {
+        result = value;
+        return true;
+      }
+    });
+    return result;
+  };
+
+  // Return all the elements that pass a truth test.
+  // Delegates to **ECMAScript 5**'s native `filter` if available.
+  // Aliased as `select`.
+  _.filter = _.select = function(obj, iterator, context) {
+    var results = [];
+    if (obj == null) return results;
+    if (nativeFilter && obj.filter === nativeFilter) return obj.filter(iterator, context);
+    each(obj, function(value, index, list) {
+      if (iterator.call(context, value, index, list)) results[results.length] = value;
+    });
+    return results;
+  };
+
+  // Return all the elements for which a truth test fails.
+  _.reject = function(obj, iterator, context) {
+    return _.filter(obj, function(value, index, list) {
+      return !iterator.call(context, value, index, list);
+    }, context);
+  };
+
+  // Determine whether all of the elements match a truth test.
+  // Delegates to **ECMAScript 5**'s native `every` if available.
+  // Aliased as `all`.
+  _.every = _.all = function(obj, iterator, context) {
+    iterator || (iterator = _.identity);
+    var result = true;
+    if (obj == null) return result;
+    if (nativeEvery && obj.every === nativeEvery) return obj.every(iterator, context);
+    each(obj, function(value, index, list) {
+      if (!(result = result && iterator.call(context, value, index, list))) return breaker;
+    });
+    return !!result;
+  };
+
+  // Determine if at least one element in the object matches a truth test.
+  // Delegates to **ECMAScript 5**'s native `some` if available.
+  // Aliased as `any`.
+  var any = _.some = _.any = function(obj, iterator, context) {
+    iterator || (iterator = _.identity);
+    var result = false;
+    if (obj == null) return result;
+    if (nativeSome && obj.some === nativeSome) return obj.some(iterator, context);
+    each(obj, function(value, index, list) {
+      if (result || (result = iterator.call(context, value, index, list))) return breaker;
+    });
+    return !!result;
+  };
+
+  // Determine if the array or object contains a given value (using `===`).
+  // Aliased as `include`.
+  _.contains = _.include = function(obj, target) {
+    if (obj == null) return false;
+    if (nativeIndexOf && obj.indexOf === nativeIndexOf) return obj.indexOf(target) != -1;
+    return any(obj, function(value) {
+      return value === target;
+    });
+  };
+
+  // Invoke a method (with arguments) on every item in a collection.
+  _.invoke = function(obj, method) {
+    var args = slice.call(arguments, 2);
+    return _.map(obj, function(value) {
+      return (_.isFunction(method) ? method : value[method]).apply(value, args);
+    });
+  };
+
+  // Convenience version of a common use case of `map`: fetching a property.
+  _.pluck = function(obj, key) {
+    return _.map(obj, function(value){ return value[key]; });
+  };
+
+  // Convenience version of a common use case of `filter`: selecting only objects
+  // with specific `key:value` pairs.
+  _.where = function(obj, attrs) {
+    if (_.isEmpty(attrs)) return [];
+    return _.filter(obj, function(value) {
+      for (var key in attrs) {
+        if (attrs[key] !== value[key]) return false;
+      }
+      return true;
+    });
+  };
+
+  // Return the maximum element or (element-based computation).
+  // Can't optimize arrays of integers longer than 65,535 elements.
+  // See: https://bugs.webkit.org/show_bug.cgi?id=80797
+  _.max = function(obj, iterator, context) {
+    if (!iterator && _.isArray(obj) && obj[0] === +obj[0] && obj.length < 65535) {
+      return Math.max.apply(Math, obj);
+    }
+    if (!iterator && _.isEmpty(obj)) return -Infinity;
+    var result = {computed : -Infinity, value: -Infinity};
+    each(obj, function(value, index, list) {
+      var computed = iterator ? iterator.call(context, value, index, list) : value;
+      computed >= result.computed && (result = {value : value, computed : computed});
+    });
+    return result.value;
+  };
+
+  // Return the minimum element (or element-based computation).
+  _.min = function(obj, iterator, context) {
+    if (!iterator && _.isArray(obj) && obj[0] === +obj[0] && obj.length < 65535) {
+      return Math.min.apply(Math, obj);
+    }
+    if (!iterator && _.isEmpty(obj)) return Infinity;
+    var result = {computed : Infinity, value: Infinity};
+    each(obj, function(value, index, list) {
+      var computed = iterator ? iterator.call(context, value, index, list) : value;
+      computed < result.computed && (result = {value : value, computed : computed});
+    });
+    return result.value;
+  };
+
+  // Shuffle an array.
+  _.shuffle = function(obj) {
+    var rand;
+    var index = 0;
+    var shuffled = [];
+    each(obj, function(value) {
+      rand = _.random(index++);
+      shuffled[index - 1] = shuffled[rand];
+      shuffled[rand] = value;
+    });
+    return shuffled;
+  };
+
+  // An internal function to generate lookup iterators.
+  var lookupIterator = function(value) {
+    return _.isFunction(value) ? value : function(obj){ return obj[value]; };
+  };
+
+  // Sort the object's values by a criterion produced by an iterator.
+  _.sortBy = function(obj, value, context) {
+    var iterator = lookupIterator(value);
+    return _.pluck(_.map(obj, function(value, index, list) {
+      return {
+        value : value,
+        index : index,
+        criteria : iterator.call(context, value, index, list)
+      };
+    }).sort(function(left, right) {
+      var a = left.criteria;
+      var b = right.criteria;
+      if (a !== b) {
+        if (a > b || a === void 0) return 1;
+        if (a < b || b === void 0) return -1;
+      }
+      return left.index < right.index ? -1 : 1;
+    }), 'value');
+  };
+
+  // An internal function used for aggregate "group by" operations.
+  var group = function(obj, value, context, behavior) {
+    var result = {};
+    var iterator = lookupIterator(value || _.identity);
+    each(obj, function(value, index) {
+      var key = iterator.call(context, value, index, obj);
+      behavior(result, key, value);
+    });
+    return result;
+  };
+
+  // Groups the object's values by a criterion. Pass either a string attribute
+  // to group by, or a function that returns the criterion.
+  _.groupBy = function(obj, value, context) {
+    return group(obj, value, context, function(result, key, value) {
+      (_.has(result, key) ? result[key] : (result[key] = [])).push(value);
+    });
+  };
+
+  // Counts instances of an object that group by a certain criterion. Pass
+  // either a string attribute to count by, or a function that returns the
+  // criterion.
+  _.countBy = function(obj, value, context) {
+    return group(obj, value, context, function(result, key) {
+      if (!_.has(result, key)) result[key] = 0;
+      result[key]++;
+    });
+  };
+
+  // Use a comparator function to figure out the smallest index at which
+  // an object should be inserted so as to maintain order. Uses binary search.
+  _.sortedIndex = function(array, obj, iterator, context) {
+    iterator = iterator == null ? _.identity : lookupIterator(iterator);
+    var value = iterator.call(context, obj);
+    var low = 0, high = array.length;
+    while (low < high) {
+      var mid = (low + high) >>> 1;
+      iterator.call(context, array[mid]) < value ? low = mid + 1 : high = mid;
+    }
+    return low;
+  };
+
+  // Safely convert anything iterable into a real, live array.
+  _.toArray = function(obj) {
+    if (!obj) return [];
+    if (_.isArray(obj)) return slice.call(obj);
+    if (obj.length === +obj.length) return _.map(obj, _.identity);
+    return _.values(obj);
+  };
+
+  // Return the number of elements in an object.
+  _.size = function(obj) {
+    if (obj == null) return 0;
+    return (obj.length === +obj.length) ? obj.length : _.keys(obj).length;
+  };
+
+  // Array Functions
+  // ---------------
+
+  // Get the first element of an array. Passing **n** will return the first N
+  // values in the array. Aliased as `head` and `take`. The **guard** check
+  // allows it to work with `_.map`.
+  _.first = _.head = _.take = function(array, n, guard) {
+    if (array == null) return void 0;
+    return (n != null) && !guard ? slice.call(array, 0, n) : array[0];
+  };
+
+  // Returns everything but the last entry of the array. Especially useful on
+  // the arguments object. Passing **n** will return all the values in
+  // the array, excluding the last N. The **guard** check allows it to work with
+  // `_.map`.
+  _.initial = function(array, n, guard) {
+    return slice.call(array, 0, array.length - ((n == null) || guard ? 1 : n));
+  };
+
+  // Get the last element of an array. Passing **n** will return the last N
+  // values in the array. The **guard** check allows it to work with `_.map`.
+  _.last = function(array, n, guard) {
+    if (array == null) return void 0;
+    if ((n != null) && !guard) {
+      return slice.call(array, Math.max(array.length - n, 0));
+    } else {
+      return array[array.length - 1];
+    }
+  };
+
+  // Returns everything but the first entry of the array. Aliased as `tail` and `drop`.
+  // Especially useful on the arguments object. Passing an **n** will return
+  // the rest N values in the array. The **guard**
+  // check allows it to work with `_.map`.
+  _.rest = _.tail = _.drop = function(array, n, guard) {
+    return slice.call(array, (n == null) || guard ? 1 : n);
+  };
+
+  // Trim out all falsy values from an array.
+  _.compact = function(array) {
+    return _.filter(array, _.identity);
+  };
+
+  // Internal implementation of a recursive `flatten` function.
+  var flatten = function(input, shallow, output) {
+    each(input, function(value) {
+      if (_.isArray(value)) {
+        shallow ? push.apply(output, value) : flatten(value, shallow, output);
+      } else {
+        output.push(value);
+      }
+    });
+    return output;
+  };
+
+  // Return a completely flattened version of an array.
+  _.flatten = function(array, shallow) {
+    return flatten(array, shallow, []);
+  };
+
+  // Return a version of the array that does not contain the specified value(s).
+  _.without = function(array) {
+    return _.difference(array, slice.call(arguments, 1));
+  };
+
+  // Produce a duplicate-free version of the array. If the array has already
+  // been sorted, you have the option of using a faster algorithm.
+  // Aliased as `unique`.
+  _.uniq = _.unique = function(array, isSorted, iterator, context) {
+    if (_.isFunction(isSorted)) {
+      context = iterator;
+      iterator = isSorted;
+      isSorted = false;
+    }
+    var initial = iterator ? _.map(array, iterator, context) : array;
+    var results = [];
+    var seen = [];
+    each(initial, function(value, index) {
+      if (isSorted ? (!index || seen[seen.length - 1] !== value) : !_.contains(seen, value)) {
+        seen.push(value);
+        results.push(array[index]);
+      }
+    });
+    return results;
+  };
+
+  // Produce an array that contains the union: each distinct element from all of
+  // the passed-in arrays.
+  _.union = function() {
+    return _.uniq(concat.apply(ArrayProto, arguments));
+  };
+
+  // Produce an array that contains every item shared between all the
+  // passed-in arrays.
+  _.intersection = function(array) {
+    var rest = slice.call(arguments, 1);
+    return _.filter(_.uniq(array), function(item) {
+      return _.every(rest, function(other) {
+        return _.indexOf(other, item) >= 0;
+      });
+    });
+  };
+
+  // Take the difference between one array and a number of other arrays.
+  // Only the elements present in just the first array will remain.
+  _.difference = function(array) {
+    var rest = concat.apply(ArrayProto, slice.call(arguments, 1));
+    return _.filter(array, function(value){ return !_.contains(rest, value); });
+  };
+
+  // Zip together multiple lists into a single array -- elements that share
+  // an index go together.
+  _.zip = function() {
+    var args = slice.call(arguments);
+    var length = _.max(_.pluck(args, 'length'));
+    var results = new Array(length);
+    for (var i = 0; i < length; i++) {
+      results[i] = _.pluck(args, "" + i);
+    }
+    return results;
+  };
+
+  // Converts lists into objects. Pass either a single array of `[key, value]`
+  // pairs, or two parallel arrays of the same length -- one of keys, and one of
+  // the corresponding values.
+  _.object = function(list, values) {
+    if (list == null) return {};
+    var result = {};
+    for (var i = 0, l = list.length; i < l; i++) {
+      if (values) {
+        result[list[i]] = values[i];
+      } else {
+        result[list[i][0]] = list[i][1];
+      }
+    }
+    return result;
+  };
+
+  // If the browser doesn't supply us with indexOf (I'm looking at you, **MSIE**),
+  // we need this function. Return the position of the first occurrence of an
+  // item in an array, or -1 if the item is not included in the array.
+  // Delegates to **ECMAScript 5**'s native `indexOf` if available.
+  // If the array is large and already in sort order, pass `true`
+  // for **isSorted** to use binary search.
+  _.indexOf = function(array, item, isSorted) {
+    if (array == null) return -1;
+    var i = 0, l = array.length;
+    if (isSorted) {
+      if (typeof isSorted == 'number') {
+        i = (isSorted < 0 ? Math.max(0, l + isSorted) : isSorted);
+      } else {
+        i = _.sortedIndex(array, item);
+        return array[i] === item ? i : -1;
+      }
+    }
+    if (nativeIndexOf && array.indexOf === nativeIndexOf) return array.indexOf(item, isSorted);
+    for (; i < l; i++) if (array[i] === item) return i;
+    return -1;
+  };
+
+  // Delegates to **ECMAScript 5**'s native `lastIndexOf` if available.
+  _.lastIndexOf = function(array, item, from) {
+    if (array == null) return -1;
+    var hasIndex = from != null;
+    if (nativeLastIndexOf && array.lastIndexOf === nativeLastIndexOf) {
+      return hasIndex ? array.lastIndexOf(item, from) : array.lastIndexOf(item);
+    }
+    var i = (hasIndex ? from : array.length);
+    while (i--) if (array[i] === item) return i;
+    return -1;
+  };
+
+  // Generate an integer Array containing an arithmetic progression. A port of
+  // the native Python `range()` function. See
+  // [the Python documentation](http://docs.python.org/library/functions.html#range).
+  _.range = function(start, stop, step) {
+    if (arguments.length <= 1) {
+      stop = start || 0;
+      start = 0;
+    }
+    step = arguments[2] || 1;
+
+    var len = Math.max(Math.ceil((stop - start) / step), 0);
+    var idx = 0;
+    var range = new Array(len);
+
+    while(idx < len) {
+      range[idx++] = start;
+      start += step;
+    }
+
+    return range;
+  };
+
+  // Function (ahem) Functions
+  // ------------------
+
+  // Reusable constructor function for prototype setting.
+  var ctor = function(){};
+
+  // Create a function bound to a given object (assigning `this`, and arguments,
+  // optionally). Binding with arguments is also known as `curry`.
+  // Delegates to **ECMAScript 5**'s native `Function.bind` if available.
+  // We check for `func.bind` first, to fail fast when `func` is undefined.
+  _.bind = function(func, context) {
+    var args, bound;
+    if (func.bind === nativeBind && nativeBind) return nativeBind.apply(func, slice.call(arguments, 1));
+    if (!_.isFunction(func)) throw new TypeError;
+    args = slice.call(arguments, 2);
+    return bound = function() {
+      if (!(this instanceof bound)) return func.apply(context, args.concat(slice.call(arguments)));
+      ctor.prototype = func.prototype;
+      var self = new ctor;
+      ctor.prototype = null;
+      var result = func.apply(self, args.concat(slice.call(arguments)));
+      if (Object(result) === result) return result;
+      return self;
+    };
+  };
+
+  // Bind all of an object's methods to that object. Useful for ensuring that
+  // all callbacks defined on an object belong to it.
+  _.bindAll = function(obj) {
+    var funcs = slice.call(arguments, 1);
+    if (funcs.length == 0) funcs = _.functions(obj);
+    each(funcs, function(f) { obj[f] = _.bind(obj[f], obj); });
+    return obj;
+  };
+
+  // Memoize an expensive function by storing its results.
+  _.memoize = function(func, hasher) {
+    var memo = {};
+    hasher || (hasher = _.identity);
+    return function() {
+      var key = hasher.apply(this, arguments);
+      return _.has(memo, key) ? memo[key] : (memo[key] = func.apply(this, arguments));
+    };
+  };
+
+  // Delays a function for the given number of milliseconds, and then calls
+  // it with the arguments supplied.
+  _.delay = function(func, wait) {
+    var args = slice.call(arguments, 2);
+    return setTimeout(function(){ return func.apply(null, args); }, wait);
+  };
+
+  // Defers a function, scheduling it to run after the current call stack has
+  // cleared.
+  _.defer = function(func) {
+    return _.delay.apply(_, [func, 1].concat(slice.call(arguments, 1)));
+  };
+
+  // Returns a function, that, when invoked, will only be triggered at most once
+  // during a given window of time.
+  _.throttle = function(func, wait) {
+    var context, args, timeout, result;
+    var previous = 0;
+    var later = function() {
+      previous = new Date;
+      timeout = null;
+      result = func.apply(context, args);
+    };
+    return function() {
+      var now = new Date;
+      var remaining = wait - (now - previous);
+      context = this;
+      args = arguments;
+      if (remaining <= 0) {
+        clearTimeout(timeout);
+        timeout = null;
+        previous = now;
+        result = func.apply(context, args);
+      } else if (!timeout) {
+        timeout = setTimeout(later, remaining);
+      }
+      return result;
+    };
+  };
+
+  // Returns a function, that, as long as it continues to be invoked, will not
+  // be triggered. The function will be called after it stops being called for
+  // N milliseconds. If `immediate` is passed, trigger the function on the
+  // leading edge, instead of the trailing.
+  _.debounce = function(func, wait, immediate) {
+    var timeout, result;
+    return function() {
+      var context = this, args = arguments;
+      var later = function() {
+        timeout = null;
+        if (!immediate) result = func.apply(context, args);
+      };
+      var callNow = immediate && !timeout;
+      clearTimeout(timeout);
+      timeout = setTimeout(later, wait);
+      if (callNow) result = func.apply(context, args);
+      return result;
+    };
+  };
+
+  // Returns a function that will be executed at most one time, no matter how
+  // often you call it. Useful for lazy initialization.
+  _.once = function(func) {
+    var ran = false, memo;
+    return function() {
+      if (ran) return memo;
+      ran = true;
+      memo = func.apply(this, arguments);
+      func = null;
+      return memo;
+    };
+  };
+
+  // Returns the first function passed as an argument to the second,
+  // allowing you to adjust arguments, run code before and after, and
+  // conditionally execute the original function.
+  _.wrap = function(func, wrapper) {
+    return function() {
+      var args = [func];
+      push.apply(args, arguments);
+      return wrapper.apply(this, args);
+    };
+  };
+
+  // Returns a function that is the composition of a list of functions, each
+  // consuming the return value of the function that follows.
+  _.compose = function() {
+    var funcs = arguments;
+    return function() {
+      var args = arguments;
+      for (var i = funcs.length - 1; i >= 0; i--) {
+        args = [funcs[i].apply(this, args)];
+      }
+      return args[0];
+    };
+  };
+
+  // Returns a function that will only be executed after being called N times.
+  _.after = function(times, func) {
+    if (times <= 0) return func();
+    return function() {
+      if (--times < 1) {
+        return func.apply(this, arguments);
+      }
+    };
+  };
+
+  // Object Functions
+  // ----------------
+
+  // Retrieve the names of an object's properties.
+  // Delegates to **ECMAScript 5**'s native `Object.keys`
+  _.keys = nativeKeys || function(obj) {
+    if (obj !== Object(obj)) throw new TypeError('Invalid object');
+    var keys = [];
+    for (var key in obj) if (_.has(obj, key)) keys[keys.length] = key;
+    return keys;
+  };
+
+  // Retrieve the values of an object's properties.
+  _.values = function(obj) {
+    var values = [];
+    for (var key in obj) if (_.has(obj, key)) values.push(obj[key]);
+    return values;
+  };
+
+  // Convert an object into a list of `[key, value]` pairs.
+  _.pairs = function(obj) {
+    var pairs = [];
+    for (var key in obj) if (_.has(obj, key)) pairs.push([key, obj[key]]);
+    return pairs;
+  };
+
+  // Invert the keys and values of an object. The values must be serializable.
+  _.invert = function(obj) {
+    var result = {};
+    for (var key in obj) if (_.has(obj, key)) result[obj[key]] = key;
+    return result;
+  };
+
+  // Return a sorted list of the function names available on the object.
+  // Aliased as `methods`
+  _.functions = _.methods = function(obj) {
+    var names = [];
+    for (var key in obj) {
+      if (_.isFunction(obj[key])) names.push(key);
+    }
+    return names.sort();
+  };
+
+  // Extend a given object with all the properties in passed-in object(s).
+  _.extend = function(obj) {
+    each(slice.call(arguments, 1), function(source) {
+      if (source) {
+        for (var prop in source) {
+          obj[prop] = source[prop];
+        }
+      }
+    });
+    return obj;
+  };
+
+  // Return a copy of the object only containing the whitelisted properties.
+  _.pick = function(obj) {
+    var copy = {};
+    var keys = concat.apply(ArrayProto, slice.call(arguments, 1));
+    each(keys, function(key) {
+      if (key in obj) copy[key] = obj[key];
+    });
+    return copy;
+  };
+
+   // Return a copy of the object without the blacklisted properties.
+  _.omit = function(obj) {
+    var copy = {};
+    var keys = concat.apply(ArrayProto, slice.call(arguments, 1));
+    for (var key in obj) {
+      if (!_.contains(keys, key)) copy[key] = obj[key];
+    }
+    return copy;
+  };
+
+  // Fill in a given object with default properties.
+  _.defaults = function(obj) {
+    each(slice.call(arguments, 1), function(source) {
+      if (source) {
+        for (var prop in source) {
+          if (obj[prop] == null) obj[prop] = source[prop];
+        }
+      }
+    });
+    return obj;
+  };
+
+  // Create a (shallow-cloned) duplicate of an object.
+  _.clone = function(obj) {
+    if (!_.isObject(obj)) return obj;
+    return _.isArray(obj) ? obj.slice() : _.extend({}, obj);
+  };
+
+  // Invokes interceptor with the obj, and then returns obj.
+  // The primary purpose of this method is to "tap into" a method chain, in
+  // order to perform operations on intermediate results within the chain.
+  _.tap = function(obj, interceptor) {
+    interceptor(obj);
+    return obj;
+  };
+
+  // Internal recursive comparison function for `isEqual`.
+  var eq = function(a, b, aStack, bStack) {
+    // Identical objects are equal. `0 === -0`, but they aren't identical.
+    // See the Harmony `egal` proposal: http://wiki.ecmascript.org/doku.php?id=harmony:egal.
+    if (a === b) return a !== 0 || 1 / a == 1 / b;
+    // A strict comparison is necessary because `null == undefined`.
+    if (a == null || b == null) return a === b;
+    // Unwrap any wrapped objects.
+    if (a instanceof _) a = a._wrapped;
+    if (b instanceof _) b = b._wrapped;
+    // Compare `[[Class]]` names.
+    var className = toString.call(a);
+    if (className != toString.call(b)) return false;
+    switch (className) {
+      // Strings, numbers, dates, and booleans are compared by value.
+      case '[object String]':
+        // Primitives and their corresponding object wrappers are equivalent; thus, `"5"` is
+        // equivalent to `new String("5")`.
+        return a == String(b);
+      case '[object Number]':
+        // `NaN`s are equivalent, but non-reflexive. An `egal` comparison is performed for
+        // other numeric values.
+        return a != +a ? b != +b : (a == 0 ? 1 / a == 1 / b : a == +b);
+      case '[object Date]':
+      case '[object Boolean]':
+        // Coerce dates and booleans to numeric primitive values. Dates are compared by their
+        // millisecond representations. Note that invalid dates with millisecond representations
+        // of `NaN` are not equivalent.
+        return +a == +b;
+      // RegExps are compared by their source patterns and flags.
+      case '[object RegExp]':
+        return a.source == b.source &&
+               a.global == b.global &&
+               a.multiline == b.multiline &&
+               a.ignoreCase == b.ignoreCase;
+    }
+    if (typeof a != 'object' || typeof b != 'object') return false;
+    // Assume equality for cyclic structures. The algorithm for detecting cyclic
+    // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.
+    var length = aStack.length;
+    while (length--) {
+      // Linear search. Performance is inversely proportional to the number of
+      // unique nested structures.
+      if (aStack[length] == a) return bStack[length] == b;
+    }
+    // Add the first object to the stack of traversed objects.
+    aStack.push(a);
+    bStack.push(b);
+    var size = 0, result = true;
+    // Recursively compare objects and arrays.
+    if (className == '[object Array]') {
+      // Compare array lengths to determine if a deep comparison is necessary.
+      size = a.length;
+      result = size == b.length;
+      if (result) {
+        // Deep compare the contents, ignoring non-numeric properties.
+        while (size--) {
+          if (!(result = eq(a[size], b[size], aStack, bStack))) break;
+        }
+      }
+    } else {
+      // Objects with different constructors are not equivalent, but `Object`s
+      // from different frames are.
+      var aCtor = a.constructor, bCtor = b.constructor;
+      if (aCtor !== bCtor && !(_.isFunction(aCtor) && (aCtor instanceof aCtor) &&
+                               _.isFunction(bCtor) && (bCtor instanceof bCtor))) {
+        return false;
+      }
+      // Deep compare objects.
+      for (var key in a) {
+        if (_.has(a, key)) {
+          // Count the expected number of properties.
+          size++;
+          // Deep compare each member.
+          if (!(result = _.has(b, key) && eq(a[key], b[key], aStack, bStack))) break;
+        }
+      }
+      // Ensure that both objects contain the same number of properties.
+      if (result) {
+        for (key in b) {
+          if (_.has(b, key) && !(size--)) break;
+        }
+        result = !size;
+      }
+    }
+    // Remove the first object from the stack of traversed objects.
+    aStack.pop();
+    bStack.pop();
+    return result;
+  };
+
+  // Perform a deep comparison to check if two objects are equal.
+  _.isEqual = function(a, b) {
+    return eq(a, b, [], []);
+  };
+
+  // Is a given array, string, or object empty?
+  // An "empty" object has no enumerable own-properties.
+  _.isEmpty = function(obj) {
+    if (obj == null) return true;
+    if (_.isArray(obj) || _.isString(obj)) return obj.length === 0;
+    for (var key in obj) if (_.has(obj, key)) return false;
+    return true;
+  };
+
+  // Is a given value a DOM element?
+  _.isElement = function(obj) {
+    return !!(obj && obj.nodeType === 1);
+  };
+
+  // Is a given value an array?
+  // Delegates to ECMA5's native Array.isArray
+  _.isArray = nativeIsArray || function(obj) {
+    return toString.call(obj) == '[object Array]';
+  };
+
+  // Is a given variable an object?
+  _.isObject = function(obj) {
+    return obj === Object(obj);
+  };
+
+  // Add some isType methods: isArguments, isFunction, isString, isNumber, isDate, isRegExp.
+  each(['Arguments', 'Function', 'String', 'Number', 'Date', 'RegExp'], function(name) {
+    _['is' + name] = function(obj) {
+      return toString.call(obj) == '[object ' + name + ']';
+    };
+  });
+
+  // Define a fallback version of the method in browsers (ahem, IE), where
+  // there isn't any inspectable "Arguments" type.
+  if (!_.isArguments(arguments)) {
+    _.isArguments = function(obj) {
+      return !!(obj && _.has(obj, 'callee'));
+    };
+  }
+
+  // Optimize `isFunction` if appropriate.
+  if (typeof (/./) !== 'function') {
+    _.isFunction = function(obj) {
+      return typeof obj === 'function';
+    };
+  }
+
+  // Is a given object a finite number?
+  _.isFinite = function(obj) {
+    return isFinite(obj) && !isNaN(parseFloat(obj));
+  };
+
+  // Is the given value `NaN`? (NaN is the only number which does not equal itself).
+  _.isNaN = function(obj) {
+    return _.isNumber(obj) && obj != +obj;
+  };
+
+  // Is a given value a boolean?
+  _.isBoolean = function(obj) {
+    return obj === true || obj === false || toString.call(obj) == '[object Boolean]';
+  };
+
+  // Is a given value equal to null?
+  _.isNull = function(obj) {
+    return obj === null;
+  };
+
+  // Is a given variable undefined?
+  _.isUndefined = function(obj) {
+    return obj === void 0;
+  };
+
+  // Shortcut function for checking if an object has a given property directly
+  // on itself (in other words, not on a prototype).
+  _.has = function(obj, key) {
+    return hasOwnProperty.call(obj, key);
+  };
+
+  // Utility Functions
+  // -----------------
+
+  // Run Underscore.js in *noConflict* mode, returning the `_` variable to its
+  // previous owner. Returns a reference to the Underscore object.
+  _.noConflict = function() {
+    root._ = previousUnderscore;
+    return this;
+  };
+
+  // Keep the identity function around for default iterators.
+  _.identity = function(value) {
+    return value;
+  };
+
+  // Run a function **n** times.
+  _.times = function(n, iterator, context) {
+    var accum = Array(n);
+    for (var i = 0; i < n; i++) accum[i] = iterator.call(context, i);
+    return accum;
+  };
+
+  // Return a random integer between min and max (inclusive).
+  _.random = function(min, max) {
+    if (max == null) {
+      max = min;
+      min = 0;
+    }
+    return min + (0 | Math.random() * (max - min + 1));
+  };
+
+  // List of HTML entities for escaping.
+  var entityMap = {
+    escape: {
+      '&': '&',
+      '<': '<',
+      '>': '>',
+      '"': '"',
+      "'": '&#x27;',
+      '/': '&#x2F;'
+    }
+  };
+  entityMap.unescape = _.invert(entityMap.escape);
+
+  // Regexes containing the keys and values listed immediately above.
+  var entityRegexes = {
+    escape:   new RegExp('[' + _.keys(entityMap.escape).join('') + ']', 'g'),
+    unescape: new RegExp('(' + _.keys(entityMap.unescape).join('|') + ')', 'g')
+  };
+
+  // Functions for escaping and unescaping strings to/from HTML interpolation.
+  _.each(['escape', 'unescape'], function(method) {
+    _[method] = function(string) {
+      if (string == null) return '';
+      return ('' + string).replace(entityRegexes[method], function(match) {
+        return entityMap[method][match];
+      });
+    };
+  });
+
+  // If the value of the named property is a function then invoke it;
+  // otherwise, return it.
+  _.result = function(object, property) {
+    if (object == null) return null;
+    var value = object[property];
+    return _.isFunction(value) ? value.call(object) : value;
+  };
+
+  // Add your own custom functions to the Underscore object.
+  _.mixin = function(obj) {
+    each(_.functions(obj), function(name){
+      var func = _[name] = obj[name];
+      _.prototype[name] = function() {
+        var args = [this._wrapped];
+        push.apply(args, arguments);
+        return result.call(this, func.apply(_, args));
+      };
+    });
+  };
+
+  // Generate a unique integer id (unique within the entire client session).
+  // Useful for temporary DOM ids.
+  var idCounter = 0;
+  _.uniqueId = function(prefix) {
+    var id = '' + ++idCounter;
+    return prefix ? prefix + id : id;
+  };
+
+  // By default, Underscore uses ERB-style template delimiters, change the
+  // following template settings to use alternative delimiters.
+  _.templateSettings = {
+    evaluate    : /<%([\s\S]+?)%>/g,
+    interpolate : /<%=([\s\S]+?)%>/g,
+    escape      : /<%-([\s\S]+?)%>/g
+  };
+
+  // When customizing `templateSettings`, if you don't want to define an
+  // interpolation, evaluation or escaping regex, we need one that is
+  // guaranteed not to match.
+  var noMatch = /(.)^/;
+
+  // Certain characters need to be escaped so that they can be put into a
+  // string literal.
+  var escapes = {
+    "'":      "'",
+    '\\':     '\\',
+    '\r':     'r',
+    '\n':     'n',
+    '\t':     't',
+    '\u2028': 'u2028',
+    '\u2029': 'u2029'
+  };
+
+  var escaper = /\\|'|\r|\n|\t|\u2028|\u2029/g;
+
+  // JavaScript micro-templating, similar to John Resig's implementation.
+  // Underscore templating handles arbitrary delimiters, preserves whitespace,
+  // and correctly escapes quotes within interpolated code.
+  _.template = function(text, data, settings) {
+    settings = _.defaults({}, settings, _.templateSettings);
+
+    // Combine delimiters into one regular expression via alternation.
+    var matcher = new RegExp([
+      (settings.escape || noMatch).source,
+      (settings.interpolate || noMatch).source,
+      (settings.evaluate || noMatch).source
+    ].join('|') + '|$', 'g');
+
+    // Compile the template source, escaping string literals appropriately.
+    var index = 0;
+    var source = "__p+='";
+    text.replace(matcher, function(match, escape, interpolate, evaluate, offset) {
+      source += text.slice(index, offset)
+        .replace(escaper, function(match) { return '\\' + escapes[match]; });
+
+      if (escape) {
+        source += "'+\n((__t=(" + escape + "))==null?'':_.escape(__t))+\n'";
+      }
+      if (interpolate) {
+        source += "'+\n((__t=(" + interpolate + "))==null?'':__t)+\n'";
+      }
+      if (evaluate) {
+        source += "';\n" + evaluate + "\n__p+='";
+      }
+      index = offset + match.length;
+      return match;
+    });
+    source += "';\n";
+
+    // If a variable is not specified, place data values in local scope.
+    if (!settings.variable) source = 'with(obj||{}){\n' + source + '}\n';
+
+    source = "var __t,__p='',__j=Array.prototype.join," +
+      "print=function(){__p+=__j.call(arguments,'');};\n" +
+      source + "return __p;\n";
+
+    try {
+      var render = new Function(settings.variable || 'obj', '_', source);
+    } catch (e) {
+      e.source = source;
+      throw e;
+    }
+
+    if (data) return render(data, _);
+    var template = function(data) {
+      return render.call(this, data, _);
+    };
+
+    // Provide the compiled function source as a convenience for precompilation.
+    template.source = 'function(' + (settings.variable || 'obj') + '){\n' + source + '}';
+
+    return template;
+  };
+
+  // Add a "chain" function, which will delegate to the wrapper.
+  _.chain = function(obj) {
+    return _(obj).chain();
+  };
+
+  // OOP
+  // ---------------
+  // If Underscore is called as a function, it returns a wrapped object that
+  // can be used OO-style. This wrapper holds altered versions of all the
+  // underscore functions. Wrapped objects may be chained.
+
+  // Helper function to continue chaining intermediate results.
+  var result = function(obj) {
+    return this._chain ? _(obj).chain() : obj;
+  };
+
+  // Add all of the Underscore functions to the wrapper object.
+  _.mixin(_);
+
+  // Add all mutator Array functions to the wrapper.
+  each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) {
+    var method = ArrayProto[name];
+    _.prototype[name] = function() {
+      var obj = this._wrapped;
+      method.apply(obj, arguments);
+      if ((name == 'shift' || name == 'splice') && obj.length === 0) delete obj[0];
+      return result.call(this, obj);
+    };
+  });
+
+  // Add all accessor Array functions to the wrapper.
+  each(['concat', 'join', 'slice'], function(name) {
+    var method = ArrayProto[name];
+    _.prototype[name] = function() {
+      return result.call(this, method.apply(this._wrapped, arguments));
+    };
+  });
+
+  _.extend(_.prototype, {
+
+    // Start chaining a wrapped Underscore object.
+    chain: function() {
+      this._chain = true;
+      return this;
+    },
+
+    // Extracts the result from a wrapped and chained object.
+    value: function() {
+      return this._wrapped;
+    }
+
+  });
+
+}).call(this);
diff --git a/docs/html/_static/up-pressed.png b/docs/html/_static/up-pressed.png
new file mode 100644
index 0000000..8bd587a
Binary files /dev/null and b/docs/html/_static/up-pressed.png differ
diff --git a/docs/html/_static/up.png b/docs/html/_static/up.png
new file mode 100644
index 0000000..b946256
Binary files /dev/null and b/docs/html/_static/up.png differ
diff --git a/docs/html/_static/websupport.js b/docs/html/_static/websupport.js
new file mode 100644
index 0000000..e9bd1b8
--- /dev/null
+++ b/docs/html/_static/websupport.js
@@ -0,0 +1,808 @@
+/*
+ * websupport.js
+ * ~~~~~~~~~~~~~
+ *
+ * sphinx.websupport utilties for all documentation.
+ *
+ * :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
+ * :license: BSD, see LICENSE for details.
+ *
+ */
+
+(function($) {
+  $.fn.autogrow = function() {
+    return this.each(function() {
+    var textarea = this;
+
+    $.fn.autogrow.resize(textarea);
+
+    $(textarea)
+      .focus(function() {
+        textarea.interval = setInterval(function() {
+          $.fn.autogrow.resize(textarea);
+        }, 500);
+      })
+      .blur(function() {
+        clearInterval(textarea.interval);
+      });
+    });
+  };
+
+  $.fn.autogrow.resize = function(textarea) {
+    var lineHeight = parseInt($(textarea).css('line-height'), 10);
+    var lines = textarea.value.split('\n');
+    var columns = textarea.cols;
+    var lineCount = 0;
+    $.each(lines, function() {
+      lineCount += Math.ceil(this.length / columns) || 1;
+    });
+    var height = lineHeight * (lineCount + 1);
+    $(textarea).css('height', height);
+  };
+})(jQuery);
+
+(function($) {
+  var comp, by;
+
+  function init() {
+    initEvents();
+    initComparator();
+  }
+
+  function initEvents() {
+    $('a.comment-close').live("click", function(event) {
+      event.preventDefault();
+      hide($(this).attr('id').substring(2));
+    });
+    $('a.vote').live("click", function(event) {
+      event.preventDefault();
+      handleVote($(this));
+    });
+    $('a.reply').live("click", function(event) {
+      event.preventDefault();
+      openReply($(this).attr('id').substring(2));
+    });
+    $('a.close-reply').live("click", function(event) {
+      event.preventDefault();
+      closeReply($(this).attr('id').substring(2));
+    });
+    $('a.sort-option').live("click", function(event) {
+      event.preventDefault();
+      handleReSort($(this));
+    });
+    $('a.show-proposal').live("click", function(event) {
+      event.preventDefault();
+      showProposal($(this).attr('id').substring(2));
+    });
+    $('a.hide-proposal').live("click", function(event) {
+      event.preventDefault();
+      hideProposal($(this).attr('id').substring(2));
+    });
+    $('a.show-propose-change').live("click", function(event) {
+      event.preventDefault();
+      showProposeChange($(this).attr('id').substring(2));
+    });
+    $('a.hide-propose-change').live("click", function(event) {
+      event.preventDefault();
+      hideProposeChange($(this).attr('id').substring(2));
+    });
+    $('a.accept-comment').live("click", function(event) {
+      event.preventDefault();
+      acceptComment($(this).attr('id').substring(2));
+    });
+    $('a.delete-comment').live("click", function(event) {
+      event.preventDefault();
+      deleteComment($(this).attr('id').substring(2));
+    });
+    $('a.comment-markup').live("click", function(event) {
+      event.preventDefault();
+      toggleCommentMarkupBox($(this).attr('id').substring(2));
+    });
+  }
+
+  /**
+   * Set comp, which is a comparator function used for sorting and
+   * inserting comments into the list.
+   */
+  function setComparator() {
+    // If the first three letters are "asc", sort in ascending order
+    // and remove the prefix.
+    if (by.substring(0,3) == 'asc') {
+      var i = by.substring(3);
+      comp = function(a, b) { return a[i] - b[i]; };
+    } else {
+      // Otherwise sort in descending order.
+      comp = function(a, b) { return b[by] - a[by]; };
+    }
+
+    // Reset link styles and format the selected sort option.
+    $('a.sel').attr('href', '#').removeClass('sel');
+    $('a.by' + by).removeAttr('href').addClass('sel');
+  }
+
+  /**
+   * Create a comp function. If the user has preferences stored in
+   * the sortBy cookie, use those, otherwise use the default.
+   */
+  function initComparator() {
+    by = 'rating'; // Default to sort by rating.
+    // If the sortBy cookie is set, use that instead.
+    if (document.cookie.length > 0) {
+      var start = document.cookie.indexOf('sortBy=');
+      if (start != -1) {
+        start = start + 7;
+        var end = document.cookie.indexOf(";", start);
+        if (end == -1) {
+          end = document.cookie.length;
+          by = unescape(document.cookie.substring(start, end));
+        }
+      }
+    }
+    setComparator();
+  }
+
+  /**
+   * Show a comment div.
+   */
+  function show(id) {
+    $('#ao' + id).hide();
+    $('#ah' + id).show();
+    var context = $.extend({id: id}, opts);
+    var popup = $(renderTemplate(popupTemplate, context)).hide();
+    popup.find('textarea[name="proposal"]').hide();
+    popup.find('a.by' + by).addClass('sel');
+    var form = popup.find('#cf' + id);
+    form.submit(function(event) {
+      event.preventDefault();
+      addComment(form);
+    });
+    $('#s' + id).after(popup);
+    popup.slideDown('fast', function() {
+      getComments(id);
+    });
+  }
+
+  /**
+   * Hide a comment div.
+   */
+  function hide(id) {
+    $('#ah' + id).hide();
+    $('#ao' + id).show();
+    var div = $('#sc' + id);
+    div.slideUp('fast', function() {
+      div.remove();
+    });
+  }
+
+  /**
+   * Perform an ajax request to get comments for a node
+   * and insert the comments into the comments tree.
+   */
+  function getComments(id) {
+    $.ajax({
+     type: 'GET',
+     url: opts.getCommentsURL,
+     data: {node: id},
+     success: function(data, textStatus, request) {
+       var ul = $('#cl' + id);
+       var speed = 100;
+       $('#cf' + id)
+         .find('textarea[name="proposal"]')
+         .data('source', data.source);
+
+       if (data.comments.length === 0) {
+         ul.html('<li>No comments yet.</li>');
+         ul.data('empty', true);
+       } else {
+         // If there are comments, sort them and put them in the list.
+         var comments = sortComments(data.comments);
+         speed = data.comments.length * 100;
+         appendComments(comments, ul);
+         ul.data('empty', false);
+       }
+       $('#cn' + id).slideUp(speed + 200);
+       ul.slideDown(speed);
+     },
+     error: function(request, textStatus, error) {
+       showError('Oops, there was a problem retrieving the comments.');
+     },
+     dataType: 'json'
+    });
+  }
+
+  /**
+   * Add a comment via ajax and insert the comment into the comment tree.
+   */
+  function addComment(form) {
+    var node_id = form.find('input[name="node"]').val();
+    var parent_id = form.find('input[name="parent"]').val();
+    var text = form.find('textarea[name="comment"]').val();
+    var proposal = form.find('textarea[name="proposal"]').val();
+
+    if (text == '') {
+      showError('Please enter a comment.');
+      return;
+    }
+
+    // Disable the form that is being submitted.
+    form.find('textarea,input').attr('disabled', 'disabled');
+
+    // Send the comment to the server.
+    $.ajax({
+      type: "POST",
+      url: opts.addCommentURL,
+      dataType: 'json',
+      data: {
+        node: node_id,
+        parent: parent_id,
+        text: text,
+        proposal: proposal
+      },
+      success: function(data, textStatus, error) {
+        // Reset the form.
+        if (node_id) {
+          hideProposeChange(node_id);
+        }
+        form.find('textarea')
+          .val('')
+          .add(form.find('input'))
+          .removeAttr('disabled');
+	var ul = $('#cl' + (node_id || parent_id));
+        if (ul.data('empty')) {
+          $(ul).empty();
+          ul.data('empty', false);
+        }
+        insertComment(data.comment);
+        var ao = $('#ao' + node_id);
+        ao.find('img').attr({'src': opts.commentBrightImage});
+        if (node_id) {
+          // if this was a "root" comment, remove the commenting box
+          // (the user can get it back by reopening the comment popup)
+          $('#ca' + node_id).slideUp();
+        }
+      },
+      error: function(request, textStatus, error) {
+        form.find('textarea,input').removeAttr('disabled');
+        showError('Oops, there was a problem adding the comment.');
+      }
+    });
+  }
+
+  /**
+   * Recursively append comments to the main comment list and children
+   * lists, creating the comment tree.
+   */
+  function appendComments(comments, ul) {
+    $.each(comments, function() {
+      var div = createCommentDiv(this);
+      ul.append($(document.createElement('li')).html(div));
+      appendComments(this.children, div.find('ul.comment-children'));
+      // To avoid stagnating data, don't store the comments children in data.
+      this.children = null;
+      div.data('comment', this);
+    });
+  }
+
+  /**
+   * After adding a new comment, it must be inserted in the correct
+   * location in the comment tree.
+   */
+  function insertComment(comment) {
+    var div = createCommentDiv(comment);
+
+    // To avoid stagnating data, don't store the comments children in data.
+    comment.children = null;
+    div.data('comment', comment);
+
+    var ul = $('#cl' + (comment.node || comment.parent));
+    var siblings = getChildren(ul);
+
+    var li = $(document.createElement('li'));
+    li.hide();
+
+    // Determine where in the parents children list to insert this comment.
+    for(i=0; i < siblings.length; i++) {
+      if (comp(comment, siblings[i]) <= 0) {
+        $('#cd' + siblings[i].id)
+          .parent()
+          .before(li.html(div));
+        li.slideDown('fast');
+        return;
+      }
+    }
+
+    // If we get here, this comment rates lower than all the others,
+    // or it is the only comment in the list.
+    ul.append(li.html(div));
+    li.slideDown('fast');
+  }
+
+  function acceptComment(id) {
+    $.ajax({
+      type: 'POST',
+      url: opts.acceptCommentURL,
+      data: {id: id},
+      success: function(data, textStatus, request) {
+        $('#cm' + id).fadeOut('fast');
+        $('#cd' + id).removeClass('moderate');
+      },
+      error: function(request, textStatus, error) {
+        showError('Oops, there was a problem accepting the comment.');
+      }
+    });
+  }
+
+  function deleteComment(id) {
+    $.ajax({
+      type: 'POST',
+      url: opts.deleteCommentURL,
+      data: {id: id},
+      success: function(data, textStatus, request) {
+        var div = $('#cd' + id);
+        if (data == 'delete') {
+          // Moderator mode: remove the comment and all children immediately
+          div.slideUp('fast', function() {
+            div.remove();
+          });
+          return;
+        }
+        // User mode: only mark the comment as deleted
+        div
+          .find('span.user-id:first')
+          .text('[deleted]').end()
+          .find('div.comment-text:first')
+          .text('[deleted]').end()
+          .find('#cm' + id + ', #dc' + id + ', #ac' + id + ', #rc' + id +
+                ', #sp' + id + ', #hp' + id + ', #cr' + id + ', #rl' + id)
+          .remove();
+        var comment = div.data('comment');
+        comment.username = '[deleted]';
+        comment.text = '[deleted]';
+        div.data('comment', comment);
+      },
+      error: function(request, textStatus, error) {
+        showError('Oops, there was a problem deleting the comment.');
+      }
+    });
+  }
+
+  function showProposal(id) {
+    $('#sp' + id).hide();
+    $('#hp' + id).show();
+    $('#pr' + id).slideDown('fast');
+  }
+
+  function hideProposal(id) {
+    $('#hp' + id).hide();
+    $('#sp' + id).show();
+    $('#pr' + id).slideUp('fast');
+  }
+
+  function showProposeChange(id) {
+    $('#pc' + id).hide();
+    $('#hc' + id).show();
+    var textarea = $('#pt' + id);
+    textarea.val(textarea.data('source'));
+    $.fn.autogrow.resize(textarea[0]);
+    textarea.slideDown('fast');
+  }
+
+  function hideProposeChange(id) {
+    $('#hc' + id).hide();
+    $('#pc' + id).show();
+    var textarea = $('#pt' + id);
+    textarea.val('').removeAttr('disabled');
+    textarea.slideUp('fast');
+  }
+
+  function toggleCommentMarkupBox(id) {
+    $('#mb' + id).toggle();
+  }
+
+  /** Handle when the user clicks on a sort by link. */
+  function handleReSort(link) {
+    var classes = link.attr('class').split(/\s+/);
+    for (var i=0; i<classes.length; i++) {
+      if (classes[i] != 'sort-option') {
+	by = classes[i].substring(2);
+      }
+    }
+    setComparator();
+    // Save/update the sortBy cookie.
+    var expiration = new Date();
+    expiration.setDate(expiration.getDate() + 365);
+    document.cookie= 'sortBy=' + escape(by) +
+                     ';expires=' + expiration.toUTCString();
+    $('ul.comment-ul').each(function(index, ul) {
+      var comments = getChildren($(ul), true);
+      comments = sortComments(comments);
+      appendComments(comments, $(ul).empty());
+    });
+  }
+
+  /**
+   * Function to process a vote when a user clicks an arrow.
+   */
+  function handleVote(link) {
+    if (!opts.voting) {
+      showError("You'll need to login to vote.");
+      return;
+    }
+
+    var id = link.attr('id');
+    if (!id) {
+      // Didn't click on one of the voting arrows.
+      return;
+    }
+    // If it is an unvote, the new vote value is 0,
+    // Otherwise it's 1 for an upvote, or -1 for a downvote.
+    var value = 0;
+    if (id.charAt(1) != 'u') {
+      value = id.charAt(0) == 'u' ? 1 : -1;
+    }
+    // The data to be sent to the server.
+    var d = {
+      comment_id: id.substring(2),
+      value: value
+    };
+
+    // Swap the vote and unvote links.
+    link.hide();
+    $('#' + id.charAt(0) + (id.charAt(1) == 'u' ? 'v' : 'u') + d.comment_id)
+      .show();
+
+    // The div the comment is displayed in.
+    var div = $('div#cd' + d.comment_id);
+    var data = div.data('comment');
+
+    // If this is not an unvote, and the other vote arrow has
+    // already been pressed, unpress it.
+    if ((d.value !== 0) && (data.vote === d.value * -1)) {
+      $('#' + (d.value == 1 ? 'd' : 'u') + 'u' + d.comment_id).hide();
+      $('#' + (d.value == 1 ? 'd' : 'u') + 'v' + d.comment_id).show();
+    }
+
+    // Update the comments rating in the local data.
+    data.rating += (data.vote === 0) ? d.value : (d.value - data.vote);
+    data.vote = d.value;
+    div.data('comment', data);
+
+    // Change the rating text.
+    div.find('.rating:first')
+      .text(data.rating + ' point' + (data.rating == 1 ? '' : 's'));
+
+    // Send the vote information to the server.
+    $.ajax({
+      type: "POST",
+      url: opts.processVoteURL,
+      data: d,
+      error: function(request, textStatus, error) {
+        showError('Oops, there was a problem casting that vote.');
+      }
+    });
+  }
+
+  /**
+   * Open a reply form used to reply to an existing comment.
+   */
+  function openReply(id) {
+    // Swap out the reply link for the hide link
+    $('#rl' + id).hide();
+    $('#cr' + id).show();
+
+    // Add the reply li to the children ul.
+    var div = $(renderTemplate(replyTemplate, {id: id})).hide();
+    $('#cl' + id)
+      .prepend(div)
+      // Setup the submit handler for the reply form.
+      .find('#rf' + id)
+      .submit(function(event) {
+        event.preventDefault();
+        addComment($('#rf' + id));
+        closeReply(id);
+      })
+      .find('input[type=button]')
+      .click(function() {
+        closeReply(id);
+      });
+    div.slideDown('fast', function() {
+      $('#rf' + id).find('textarea').focus();
+    });
+  }
+
+  /**
+   * Close the reply form opened with openReply.
+   */
+  function closeReply(id) {
+    // Remove the reply div from the DOM.
+    $('#rd' + id).slideUp('fast', function() {
+      $(this).remove();
+    });
+
+    // Swap out the hide link for the reply link
+    $('#cr' + id).hide();
+    $('#rl' + id).show();
+  }
+
+  /**
+   * Recursively sort a tree of comments using the comp comparator.
+   */
+  function sortComments(comments) {
+    comments.sort(comp);
+    $.each(comments, function() {
+      this.children = sortComments(this.children);
+    });
+    return comments;
+  }
+
+  /**
+   * Get the children comments from a ul. If recursive is true,
+   * recursively include childrens' children.
+   */
+  function getChildren(ul, recursive) {
+    var children = [];
+    ul.children().children("[id^='cd']")
+      .each(function() {
+        var comment = $(this).data('comment');
+        if (recursive)
+          comment.children = getChildren($(this).find('#cl' + comment.id), true);
+        children.push(comment);
+      });
+    return children;
+  }
+
+  /** Create a div to display a comment in. */
+  function createCommentDiv(comment) {
+    if (!comment.displayed && !opts.moderator) {
+      return $('<div class="moderate">Thank you!  Your comment will show up '
+               + 'once it is has been approved by a moderator.</div>');
+    }
+    // Prettify the comment rating.
+    comment.pretty_rating = comment.rating + ' point' +
+      (comment.rating == 1 ? '' : 's');
+    // Make a class (for displaying not yet moderated comments differently)
+    comment.css_class = comment.displayed ? '' : ' moderate';
+    // Create a div for this comment.
+    var context = $.extend({}, opts, comment);
+    var div = $(renderTemplate(commentTemplate, context));
+
+    // If the user has voted on this comment, highlight the correct arrow.
+    if (comment.vote) {
+      var direction = (comment.vote == 1) ? 'u' : 'd';
+      div.find('#' + direction + 'v' + comment.id).hide();
+      div.find('#' + direction + 'u' + comment.id).show();
+    }
+
+    if (opts.moderator || comment.text != '[deleted]') {
+      div.find('a.reply').show();
+      if (comment.proposal_diff)
+        div.find('#sp' + comment.id).show();
+      if (opts.moderator && !comment.displayed)
+        div.find('#cm' + comment.id).show();
+      if (opts.moderator || (opts.username == comment.username))
+        div.find('#dc' + comment.id).show();
+    }
+    return div;
+  }
+
+  /**
+   * A simple template renderer. Placeholders such as <%id%> are replaced
+   * by context['id'] with items being escaped. Placeholders such as <#id#>
+   * are not escaped.
+   */
+  function renderTemplate(template, context) {
+    var esc = $(document.createElement('div'));
+
+    function handle(ph, escape) {
+      var cur = context;
+      $.each(ph.split('.'), function() {
+        cur = cur[this];
+      });
+      return escape ? esc.text(cur || "").html() : cur;
+    }
+
+    return template.replace(/<([%#])([\w\.]*)\1>/g, function() {
+      return handle(arguments[2], arguments[1] == '%' ? true : false);
+    });
+  }
+
+  /** Flash an error message briefly. */
+  function showError(message) {
+    $(document.createElement('div')).attr({'class': 'popup-error'})
+      .append($(document.createElement('div'))
+               .attr({'class': 'error-message'}).text(message))
+      .appendTo('body')
+      .fadeIn("slow")
+      .delay(2000)
+      .fadeOut("slow");
+  }
+
+  /** Add a link the user uses to open the comments popup. */
+  $.fn.comment = function() {
+    return this.each(function() {
+      var id = $(this).attr('id').substring(1);
+      var count = COMMENT_METADATA[id];
+      var title = count + ' comment' + (count == 1 ? '' : 's');
+      var image = count > 0 ? opts.commentBrightImage : opts.commentImage;
+      var addcls = count == 0 ? ' nocomment' : '';
+      $(this)
+        .append(
+          $(document.createElement('a')).attr({
+            href: '#',
+            'class': 'sphinx-comment-open' + addcls,
+            id: 'ao' + id
+          })
+            .append($(document.createElement('img')).attr({
+              src: image,
+              alt: 'comment',
+              title: title
+            }))
+            .click(function(event) {
+              event.preventDefault();
+              show($(this).attr('id').substring(2));
+            })
+        )
+        .append(
+          $(document.createElement('a')).attr({
+            href: '#',
+            'class': 'sphinx-comment-close hidden',
+            id: 'ah' + id
+          })
+            .append($(document.createElement('img')).attr({
+              src: opts.closeCommentImage,
+              alt: 'close',
+              title: 'close'
+            }))
+            .click(function(event) {
+              event.preventDefault();
+              hide($(this).attr('id').substring(2));
+            })
+        );
+    });
+  };
+
+  var opts = {
+    processVoteURL: '/_process_vote',
+    addCommentURL: '/_add_comment',
+    getCommentsURL: '/_get_comments',
+    acceptCommentURL: '/_accept_comment',
+    deleteCommentURL: '/_delete_comment',
+    commentImage: '/static/_static/comment.png',
+    closeCommentImage: '/static/_static/comment-close.png',
+    loadingImage: '/static/_static/ajax-loader.gif',
+    commentBrightImage: '/static/_static/comment-bright.png',
+    upArrow: '/static/_static/up.png',
+    downArrow: '/static/_static/down.png',
+    upArrowPressed: '/static/_static/up-pressed.png',
+    downArrowPressed: '/static/_static/down-pressed.png',
+    voting: false,
+    moderator: false
+  };
+
+  if (typeof COMMENT_OPTIONS != "undefined") {
+    opts = jQuery.extend(opts, COMMENT_OPTIONS);
+  }
+
+  var popupTemplate = '\
+    <div class="sphinx-comments" id="sc<%id%>">\
+      <p class="sort-options">\
+        Sort by:\
+        <a href="#" class="sort-option byrating">best rated</a>\
+        <a href="#" class="sort-option byascage">newest</a>\
+        <a href="#" class="sort-option byage">oldest</a>\
+      </p>\
+      <div class="comment-header">Comments</div>\
+      <div class="comment-loading" id="cn<%id%>">\
+        loading comments... <img src="<%loadingImage%>" alt="" /></div>\
+      <ul id="cl<%id%>" class="comment-ul"></ul>\
+      <div id="ca<%id%>">\
+      <p class="add-a-comment">Add a comment\
+        (<a href="#" class="comment-markup" id="ab<%id%>">markup</a>):</p>\
+      <div class="comment-markup-box" id="mb<%id%>">\
+        reStructured text markup: <i>*emph*</i>, <b>**strong**</b>, \
+        <tt>``code``</tt>, \
+        code blocks: <tt>::</tt> and an indented block after blank line</div>\
+      <form method="post" id="cf<%id%>" class="comment-form" action="">\
+        <textarea name="comment" cols="80"></textarea>\
+        <p class="propose-button">\
+          <a href="#" id="pc<%id%>" class="show-propose-change">\
+            Propose a change ▹\
+          </a>\
+          <a href="#" id="hc<%id%>" class="hide-propose-change">\
+            Propose a change ▿\
+          </a>\
+        </p>\
+        <textarea name="proposal" id="pt<%id%>" cols="80"\
+                  spellcheck="false"></textarea>\
+        <input type="submit" value="Add comment" />\
+        <input type="hidden" name="node" value="<%id%>" />\
+        <input type="hidden" name="parent" value="" />\
+      </form>\
+      </div>\
+    </div>';
+
+  var commentTemplate = '\
+    <div id="cd<%id%>" class="sphinx-comment<%css_class%>">\
+      <div class="vote">\
+        <div class="arrow">\
+          <a href="#" id="uv<%id%>" class="vote" title="vote up">\
+            <img src="<%upArrow%>" />\
+          </a>\
+          <a href="#" id="uu<%id%>" class="un vote" title="vote up">\
+            <img src="<%upArrowPressed%>" />\
+          </a>\
+        </div>\
+        <div class="arrow">\
+          <a href="#" id="dv<%id%>" class="vote" title="vote down">\
+            <img src="<%downArrow%>" id="da<%id%>" />\
+          </a>\
+          <a href="#" id="du<%id%>" class="un vote" title="vote down">\
+            <img src="<%downArrowPressed%>" />\
+          </a>\
+        </div>\
+      </div>\
+      <div class="comment-content">\
+        <p class="tagline comment">\
+          <span class="user-id"><%username%></span>\
+          <span class="rating"><%pretty_rating%></span>\
+          <span class="delta"><%time.delta%></span>\
+        </p>\
+        <div class="comment-text comment"><#text#></div>\
+        <p class="comment-opts comment">\
+          <a href="#" class="reply hidden" id="rl<%id%>">reply ▹</a>\
+          <a href="#" class="close-reply" id="cr<%id%>">reply ▿</a>\
+          <a href="#" id="sp<%id%>" class="show-proposal">proposal ▹</a>\
+          <a href="#" id="hp<%id%>" class="hide-proposal">proposal ▿</a>\
+          <a href="#" id="dc<%id%>" class="delete-comment hidden">delete</a>\
+          <span id="cm<%id%>" class="moderation hidden">\
+            <a href="#" id="ac<%id%>" class="accept-comment">accept</a>\
+          </span>\
+        </p>\
+        <pre class="proposal" id="pr<%id%>">\
+<#proposal_diff#>\
+        </pre>\
+          <ul class="comment-children" id="cl<%id%>"></ul>\
+        </div>\
+        <div class="clearleft"></div>\
+      </div>\
+    </div>';
+
+  var replyTemplate = '\
+    <li>\
+      <div class="reply-div" id="rd<%id%>">\
+        <form id="rf<%id%>">\
+          <textarea name="comment" cols="80"></textarea>\
+          <input type="submit" value="Add reply" />\
+          <input type="button" value="Cancel" />\
+          <input type="hidden" name="parent" value="<%id%>" />\
+          <input type="hidden" name="node" value="" />\
+        </form>\
+      </div>\
+    </li>';
+
+  $(document).ready(function() {
+    init();
+  });
+})(jQuery);
+
+$(document).ready(function() {
+  // add comment anchors for all paragraphs that are commentable
+  $('.sphinx-has-comment').comment();
+
+  // highlight search words in search results
+  $("div.context").each(function() {
+    var params = $.getQueryParameters();
+    var terms = (params.q) ? params.q[0].split(/\s+/) : [];
+    var result = $(this);
+    $.each(terms, function() {
+      result.highlightText(this.toLowerCase(), 'highlighted');
+    });
+  });
+
+  // directly open comment window if requested
+  var anchor = document.location.hash;
+  if (anchor.substring(0, 9) == '#comment-') {
+    $('#ao' + anchor.substring(9)).click();
+    document.location.hash = '#s' + anchor.substring(9);
+  }
+});
diff --git a/docs/html/genindex.html b/docs/html/genindex.html
new file mode 100644
index 0000000..901a793
--- /dev/null
+++ b/docs/html/genindex.html
@@ -0,0 +1,497 @@
+
+
+
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    
+    <title>Index — pyFFTW 0.9.2 documentation</title>
+    
+    <link rel="stylesheet" href="_static/default.css" type="text/css" />
+    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
+    
+    <script type="text/javascript">
+      var DOCUMENTATION_OPTIONS = {
+        URL_ROOT:    '',
+        VERSION:     '0.9.2',
+        COLLAPSE_INDEX: false,
+        FILE_SUFFIX: '.html',
+        HAS_SOURCE:  true
+      };
+    </script>
+    <script type="text/javascript" src="_static/jquery.js"></script>
+    <script type="text/javascript" src="_static/underscore.js"></script>
+    <script type="text/javascript" src="_static/doctools.js"></script>
+    <link rel="top" title="pyFFTW 0.9.2 documentation" href="index.html" /> 
+  </head>
+  <body>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="#" title="General Index"
+             accesskey="I">index</a></li>
+        <li class="right" >
+          <a href="py-modindex.html" title="Python Module Index"
+             >modules</a> |</li>
+        <li><a href="index.html">pyFFTW 0.9.2 documentation</a> »</li> 
+      </ul>
+    </div>  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          <div class="body">
+            
+
+<h1 id="index">Index</h1>
+
+<div class="genindex-jumpbox">
+ <a href="#_"><strong>_</strong></a>
+ | <a href="#D"><strong>D</strong></a>
+ | <a href="#E"><strong>E</strong></a>
+ | <a href="#F"><strong>F</strong></a>
+ | <a href="#G"><strong>G</strong></a>
+ | <a href="#I"><strong>I</strong></a>
+ | <a href="#N"><strong>N</strong></a>
+ | <a href="#O"><strong>O</strong></a>
+ | <a href="#P"><strong>P</strong></a>
+ | <a href="#R"><strong>R</strong></a>
+ | <a href="#S"><strong>S</strong></a>
+ | <a href="#U"><strong>U</strong></a>
+ 
+</div>
+<h2 id="_">_</h2>
+<table style="width: 100%" class="indextable genindextable"><tr>
+  <td style="width: 33%" valign="top"><dl>
+      
+  <dt><a href="pyfftw/builders/_utils.html#pyfftw.builders._utils._FFTWWrapper.__call__">__call__() (pyfftw.builders._utils._FFTWWrapper method)</a>
+  </dt>
+
+      <dd><dl>
+        
+  <dt><a href="pyfftw/pyfftw.html#pyfftw.FFTW.__call__">(pyfftw.FFTW method)</a>
+  </dt>
+
+      </dl></dd>
+      
+  <dt><a href="pyfftw/builders/_utils.html#pyfftw.builders._utils._compute_array_shapes">_compute_array_shapes() (in module pyfftw.builders._utils)</a>
+  </dt>
+
+      
+  <dt><a href="pyfftw/builders/_utils.html#pyfftw.builders._utils._cook_nd_args">_cook_nd_args() (in module pyfftw.builders._utils)</a>
+  </dt>
+
+      
+  <dt><a href="pyfftw/builders/_utils.html#pyfftw.builders._utils._FFTWWrapper">_FFTWWrapper (class in pyfftw.builders._utils)</a>
+  </dt>
+
+  </dl></td>
+  <td style="width: 33%" valign="top"><dl>
+      
+  <dt><a href="pyfftw/builders/_utils.html#pyfftw.builders._utils._precook_1d_args">_precook_1d_args() (in module pyfftw.builders._utils)</a>
+  </dt>
+
+      
+  <dt><a href="pyfftw/builders/_utils.html#pyfftw.builders._utils._setup_input_slicers">_setup_input_slicers() (in module pyfftw.builders._utils)</a>
+  </dt>
+
+      
+  <dt><a href="pyfftw/builders/_utils.html#pyfftw.builders._utils._Xfftn">_Xfftn() (in module pyfftw.builders._utils)</a>
+  </dt>
+
+  </dl></td>
+</tr></table>
+
+<h2 id="D">D</h2>
+<table style="width: 100%" class="indextable genindextable"><tr>
+  <td style="width: 33%" valign="top"><dl>
+      
+  <dt><a href="pyfftw/interfaces/interfaces.html#pyfftw.interfaces.cache.disable">disable() (in module pyfftw.interfaces.cache)</a>
+  </dt>
+
+  </dl></td>
+</tr></table>
+
+<h2 id="E">E</h2>
+<table style="width: 100%" class="indextable genindextable"><tr>
+  <td style="width: 33%" valign="top"><dl>
+      
+  <dt><a href="pyfftw/interfaces/interfaces.html#pyfftw.interfaces.cache.enable">enable() (in module pyfftw.interfaces.cache)</a>
+  </dt>
+
+      
+  <dt><a href="pyfftw/pyfftw.html#pyfftw.FFTW.execute">execute() (pyfftw.FFTW method)</a>
+  </dt>
+
+  </dl></td>
+  <td style="width: 33%" valign="top"><dl>
+      
+  <dt><a href="pyfftw/pyfftw.html#pyfftw.export_wisdom">export_wisdom() (in module pyfftw)</a>
+  </dt>
+
+  </dl></td>
+</tr></table>
+
+<h2 id="F">F</h2>
+<table style="width: 100%" class="indextable genindextable"><tr>
+  <td style="width: 33%" valign="top"><dl>
+      
+  <dt><a href="pyfftw/builders/builders.html#pyfftw.builders.fft">fft() (in module pyfftw.builders)</a>
+  </dt>
+
+      <dd><dl>
+        
+  <dt><a href="pyfftw/interfaces/numpy_fft.html#pyfftw.interfaces.numpy_fft.fft">(in module pyfftw.interfaces.numpy_fft)</a>
+  </dt>
+
+        
+  <dt><a href="pyfftw/interfaces/scipy_fftpack.html#pyfftw.interfaces.scipy_fftpack.fft">(in module pyfftw.interfaces.scipy_fftpack)</a>
+  </dt>
+
+      </dl></dd>
+      
+  <dt><a href="pyfftw/builders/builders.html#pyfftw.builders.fft2">fft2() (in module pyfftw.builders)</a>
+  </dt>
+
+      <dd><dl>
+        
+  <dt><a href="pyfftw/interfaces/numpy_fft.html#pyfftw.interfaces.numpy_fft.fft2">(in module pyfftw.interfaces.numpy_fft)</a>
+  </dt>
+
+        
+  <dt><a href="pyfftw/interfaces/scipy_fftpack.html#pyfftw.interfaces.scipy_fftpack.fft2">(in module pyfftw.interfaces.scipy_fftpack)</a>
+  </dt>
+
+      </dl></dd>
+      
+  <dt><a href="pyfftw/builders/builders.html#pyfftw.builders.fftn">fftn() (in module pyfftw.builders)</a>
+  </dt>
+
+      <dd><dl>
+        
+  <dt><a href="pyfftw/interfaces/numpy_fft.html#pyfftw.interfaces.numpy_fft.fftn">(in module pyfftw.interfaces.numpy_fft)</a>
+  </dt>
+
+        
+  <dt><a href="pyfftw/interfaces/scipy_fftpack.html#pyfftw.interfaces.scipy_fftpack.fftn">(in module pyfftw.interfaces.scipy_fftpack)</a>
+  </dt>
+
+      </dl></dd>
+  </dl></td>
+  <td style="width: 33%" valign="top"><dl>
+      
+  <dt><a href="pyfftw/pyfftw.html#pyfftw.FFTW">FFTW (class in pyfftw)</a>
+  </dt>
+
+      
+  <dt><a href="pyfftw/pyfftw.html#pyfftw.FFTW.flags">flags (pyfftw.FFTW attribute)</a>
+  </dt>
+
+      
+  <dt><a href="pyfftw/pyfftw.html#pyfftw.forget_wisdom">forget_wisdom() (in module pyfftw)</a>
+  </dt>
+
+  </dl></td>
+</tr></table>
+
+<h2 id="G">G</h2>
+<table style="width: 100%" class="indextable genindextable"><tr>
+  <td style="width: 33%" valign="top"><dl>
+      
+  <dt><a href="pyfftw/pyfftw.html#pyfftw.FFTW.get_input_array">get_input_array() (pyfftw.FFTW method)</a>
+  </dt>
+
+  </dl></td>
+  <td style="width: 33%" valign="top"><dl>
+      
+  <dt><a href="pyfftw/pyfftw.html#pyfftw.FFTW.get_output_array">get_output_array() (pyfftw.FFTW method)</a>
+  </dt>
+
+  </dl></td>
+</tr></table>
+
+<h2 id="I">I</h2>
+<table style="width: 100%" class="indextable genindextable"><tr>
+  <td style="width: 33%" valign="top"><dl>
+      
+  <dt><a href="pyfftw/builders/builders.html#pyfftw.builders.ifft">ifft() (in module pyfftw.builders)</a>
+  </dt>
+
+      <dd><dl>
+        
+  <dt><a href="pyfftw/interfaces/numpy_fft.html#pyfftw.interfaces.numpy_fft.ifft">(in module pyfftw.interfaces.numpy_fft)</a>
+  </dt>
+
+        
+  <dt><a href="pyfftw/interfaces/scipy_fftpack.html#pyfftw.interfaces.scipy_fftpack.ifft">(in module pyfftw.interfaces.scipy_fftpack)</a>
+  </dt>
+
+      </dl></dd>
+      
+  <dt><a href="pyfftw/builders/builders.html#pyfftw.builders.ifft2">ifft2() (in module pyfftw.builders)</a>
+  </dt>
+
+      <dd><dl>
+        
+  <dt><a href="pyfftw/interfaces/numpy_fft.html#pyfftw.interfaces.numpy_fft.ifft2">(in module pyfftw.interfaces.numpy_fft)</a>
+  </dt>
+
+        
+  <dt><a href="pyfftw/interfaces/scipy_fftpack.html#pyfftw.interfaces.scipy_fftpack.ifft2">(in module pyfftw.interfaces.scipy_fftpack)</a>
+  </dt>
+
+      </dl></dd>
+      
+  <dt><a href="pyfftw/builders/builders.html#pyfftw.builders.ifftn">ifftn() (in module pyfftw.builders)</a>
+  </dt>
+
+      <dd><dl>
+        
+  <dt><a href="pyfftw/interfaces/numpy_fft.html#pyfftw.interfaces.numpy_fft.ifftn">(in module pyfftw.interfaces.numpy_fft)</a>
+  </dt>
+
+        
+  <dt><a href="pyfftw/interfaces/scipy_fftpack.html#pyfftw.interfaces.scipy_fftpack.ifftn">(in module pyfftw.interfaces.scipy_fftpack)</a>
+  </dt>
+
+      </dl></dd>
+      
+  <dt><a href="pyfftw/pyfftw.html#pyfftw.import_wisdom">import_wisdom() (in module pyfftw)</a>
+  </dt>
+
+      
+  <dt><a href="pyfftw/pyfftw.html#pyfftw.FFTW.input_alignment">input_alignment (pyfftw.FFTW attribute)</a>
+  </dt>
+
+  </dl></td>
+  <td style="width: 33%" valign="top"><dl>
+      
+  <dt><a href="pyfftw/builders/builders.html#pyfftw.builders.irfft">irfft() (in module pyfftw.builders)</a>
+  </dt>
+
+      <dd><dl>
+        
+  <dt><a href="pyfftw/interfaces/numpy_fft.html#pyfftw.interfaces.numpy_fft.irfft">(in module pyfftw.interfaces.numpy_fft)</a>
+  </dt>
+
+        
+  <dt><a href="pyfftw/interfaces/scipy_fftpack.html#pyfftw.interfaces.scipy_fftpack.irfft">(in module pyfftw.interfaces.scipy_fftpack)</a>
+  </dt>
+
+      </dl></dd>
+      
+  <dt><a href="pyfftw/builders/builders.html#pyfftw.builders.irfft2">irfft2() (in module pyfftw.builders)</a>
+  </dt>
+
+      <dd><dl>
+        
+  <dt><a href="pyfftw/interfaces/numpy_fft.html#pyfftw.interfaces.numpy_fft.irfft2">(in module pyfftw.interfaces.numpy_fft)</a>
+  </dt>
+
+      </dl></dd>
+      
+  <dt><a href="pyfftw/builders/builders.html#pyfftw.builders.irfftn">irfftn() (in module pyfftw.builders)</a>
+  </dt>
+
+      <dd><dl>
+        
+  <dt><a href="pyfftw/interfaces/numpy_fft.html#pyfftw.interfaces.numpy_fft.irfftn">(in module pyfftw.interfaces.numpy_fft)</a>
+  </dt>
+
+      </dl></dd>
+      
+  <dt><a href="pyfftw/pyfftw.html#pyfftw.is_n_byte_aligned">is_n_byte_aligned() (in module pyfftw)</a>
+  </dt>
+
+  </dl></td>
+</tr></table>
+
+<h2 id="N">N</h2>
+<table style="width: 100%" class="indextable genindextable"><tr>
+  <td style="width: 33%" valign="top"><dl>
+      
+  <dt><a href="pyfftw/pyfftw.html#pyfftw.FFTW.N">N (pyfftw.FFTW attribute)</a>
+  </dt>
+
+      
+  <dt><a href="pyfftw/pyfftw.html#pyfftw.n_byte_align">n_byte_align() (in module pyfftw)</a>
+  </dt>
+
+  </dl></td>
+  <td style="width: 33%" valign="top"><dl>
+      
+  <dt><a href="pyfftw/pyfftw.html#pyfftw.n_byte_align_empty">n_byte_align_empty() (in module pyfftw)</a>
+  </dt>
+
+  </dl></td>
+</tr></table>
+
+<h2 id="O">O</h2>
+<table style="width: 100%" class="indextable genindextable"><tr>
+  <td style="width: 33%" valign="top"><dl>
+      
+  <dt><a href="pyfftw/pyfftw.html#pyfftw.FFTW.output_alignment">output_alignment (pyfftw.FFTW attribute)</a>
+  </dt>
+
+  </dl></td>
+</tr></table>
+
+<h2 id="P">P</h2>
+<table style="width: 100%" class="indextable genindextable"><tr>
+  <td style="width: 33%" valign="top"><dl>
+      
+  <dt><a href="pyfftw/pyfftw.html#module-pyfftw">pyfftw (module)</a>
+  </dt>
+
+      
+  <dt><a href="pyfftw/builders/builders.html#module-pyfftw.builders">pyfftw.builders (module)</a>
+  </dt>
+
+      
+  <dt><a href="pyfftw/builders/_utils.html#module-pyfftw.builders._utils">pyfftw.builders._utils (module)</a>
+  </dt>
+
+      
+  <dt><a href="pyfftw/interfaces/interfaces.html#module-pyfftw.interfaces">pyfftw.interfaces (module)</a>
+  </dt>
+
+  </dl></td>
+  <td style="width: 33%" valign="top"><dl>
+      
+  <dt><a href="pyfftw/interfaces/interfaces.html#module-pyfftw.interfaces.cache">pyfftw.interfaces.cache (module)</a>
+  </dt>
+
+      
+  <dt><a href="pyfftw/interfaces/numpy_fft.html#module-pyfftw.interfaces.numpy_fft">pyfftw.interfaces.numpy_fft (module)</a>
+  </dt>
+
+      
+  <dt><a href="pyfftw/interfaces/scipy_fftpack.html#module-pyfftw.interfaces.scipy_fftpack">pyfftw.interfaces.scipy_fftpack (module)</a>
+  </dt>
+
+      
+  <dt><a href="pyfftw/pyfftw.html#pyfftw.pyfftw.simd_alignment">pyfftw.simd_alignment (in module pyfftw)</a>
+  </dt>
+
+  </dl></td>
+</tr></table>
+
+<h2 id="R">R</h2>
+<table style="width: 100%" class="indextable genindextable"><tr>
+  <td style="width: 33%" valign="top"><dl>
+      
+  <dt><a href="pyfftw/builders/builders.html#pyfftw.builders.rfft">rfft() (in module pyfftw.builders)</a>
+  </dt>
+
+      <dd><dl>
+        
+  <dt><a href="pyfftw/interfaces/numpy_fft.html#pyfftw.interfaces.numpy_fft.rfft">(in module pyfftw.interfaces.numpy_fft)</a>
+  </dt>
+
+        
+  <dt><a href="pyfftw/interfaces/scipy_fftpack.html#pyfftw.interfaces.scipy_fftpack.rfft">(in module pyfftw.interfaces.scipy_fftpack)</a>
+  </dt>
+
+      </dl></dd>
+      
+  <dt><a href="pyfftw/builders/builders.html#pyfftw.builders.rfft2">rfft2() (in module pyfftw.builders)</a>
+  </dt>
+
+      <dd><dl>
+        
+  <dt><a href="pyfftw/interfaces/numpy_fft.html#pyfftw.interfaces.numpy_fft.rfft2">(in module pyfftw.interfaces.numpy_fft)</a>
+  </dt>
+
+      </dl></dd>
+  </dl></td>
+  <td style="width: 33%" valign="top"><dl>
+      
+  <dt><a href="pyfftw/builders/builders.html#pyfftw.builders.rfftn">rfftn() (in module pyfftw.builders)</a>
+  </dt>
+
+      <dd><dl>
+        
+  <dt><a href="pyfftw/interfaces/numpy_fft.html#pyfftw.interfaces.numpy_fft.rfftn">(in module pyfftw.interfaces.numpy_fft)</a>
+  </dt>
+
+      </dl></dd>
+  </dl></td>
+</tr></table>
+
+<h2 id="S">S</h2>
+<table style="width: 100%" class="indextable genindextable"><tr>
+  <td style="width: 33%" valign="top"><dl>
+      
+  <dt><a href="pyfftw/interfaces/interfaces.html#pyfftw.interfaces.cache.set_keepalive_time">set_keepalive_time() (in module pyfftw.interfaces.cache)</a>
+  </dt>
+
+  </dl></td>
+  <td style="width: 33%" valign="top"><dl>
+      
+  <dt><a href="pyfftw/pyfftw.html#pyfftw.FFTW.simd_aligned">simd_aligned (pyfftw.FFTW attribute)</a>
+  </dt>
+
+  </dl></td>
+</tr></table>
+
+<h2 id="U">U</h2>
+<table style="width: 100%" class="indextable genindextable"><tr>
+  <td style="width: 33%" valign="top"><dl>
+      
+  <dt><a href="pyfftw/pyfftw.html#pyfftw.FFTW.update_arrays">update_arrays() (pyfftw.FFTW method)</a>
+  </dt>
+
+  </dl></td>
+</tr></table>
+
+
+
+          </div>
+        </div>
+      </div>
+      <div class="sphinxsidebar">
+        <div class="sphinxsidebarwrapper">
+
+   
+
+<div id="searchbox" style="display: none">
+  <h3>Quick search</h3>
+    <form class="search" action="search.html" method="get">
+      <input type="text" name="q" />
+      <input type="submit" value="Go" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    <p class="searchtip" style="font-size: 90%">
+    Enter search terms or a module, class or function name.
+    </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="#" title="General Index"
+             >index</a></li>
+        <li class="right" >
+          <a href="py-modindex.html" title="Python Module Index"
+             >modules</a> |</li>
+        <li><a href="index.html">pyFFTW 0.9.2 documentation</a> »</li> 
+      </ul>
+    </div>
+    <div class="footer">
+        © Copyright 2013, Henry Gomersall.
+      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
+    </div>
+  </body>
+</html>
\ No newline at end of file
diff --git a/docs/html/index.html b/docs/html/index.html
new file mode 100644
index 0000000..9c14ac4
--- /dev/null
+++ b/docs/html/index.html
@@ -0,0 +1,172 @@
+
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    
+    <title>Welcome to pyFFTW’s documentation! — pyFFTW 0.9.2 documentation</title>
+    
+    <link rel="stylesheet" href="_static/default.css" type="text/css" />
+    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
+    
+    <script type="text/javascript">
+      var DOCUMENTATION_OPTIONS = {
+        URL_ROOT:    '',
+        VERSION:     '0.9.2',
+        COLLAPSE_INDEX: false,
+        FILE_SUFFIX: '.html',
+        HAS_SOURCE:  true
+      };
+    </script>
+    <script type="text/javascript" src="_static/jquery.js"></script>
+    <script type="text/javascript" src="_static/underscore.js"></script>
+    <script type="text/javascript" src="_static/doctools.js"></script>
+    <link rel="top" title="pyFFTW 0.9.2 documentation" href="#" />
+    <link rel="next" title="Overview and A Short Tutorial" href="sphinx/tutorial.html" /> 
+  </head>
+  <body>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="genindex.html" title="General Index"
+             accesskey="I">index</a></li>
+        <li class="right" >
+          <a href="py-modindex.html" title="Python Module Index"
+             >modules</a> |</li>
+        <li class="right" >
+          <a href="sphinx/tutorial.html" title="Overview and A Short Tutorial"
+             accesskey="N">next</a> |</li>
+        <li><a href="#">pyFFTW 0.9.2 documentation</a> »</li> 
+      </ul>
+    </div>  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          <div class="body">
+            
+  <div class="section" id="welcome-to-pyfftw-s-documentation">
+<h1>Welcome to pyFFTW’s documentation!<a class="headerlink" href="#welcome-to-pyfftw-s-documentation" title="Permalink to this headline">¶</a></h1>
+<div class="section" id="introduction">
+<h2>Introduction<a class="headerlink" href="#introduction" title="Permalink to this headline">¶</a></h2>
+<p>pyFFTW is a pythonic wrapper around <a class="reference external" href="http://www.fftw.org/">FFTW</a>, the
+speedy FFT library.  The ultimate aim is to present a unified interface for all
+the possible transforms that FFTW can perform.</p>
+<p>Both the complex DFT and the real DFT are supported, as well as on arbitrary
+axes of abitrary shaped and strided arrays, which makes it almost
+feature equivalent to standard and real FFT functions of <a class="reference external" href="http://docs.scipy.org/doc/numpy/reference/routines.fft.html#numpy.fft" title="(in NumPy v1.7)"><tt class="xref py py-mod docutils literal"><span class="pre">numpy.fft</span></tt></a>
+(indeed, it supports the <tt class="xref py py-attr docutils literal"><span class="pre">clongdouble</span></tt> dtype which
+<tt class="xref py py-mod docutils literal"><span class="pre">numpy.fft</span></tt> does not).</p>
+<p>Operating FFTW in multithreaded mode is supported.</p>
+<p>The core interface is provided by a unified class, <a class="reference internal" href="pyfftw/pyfftw.html#pyfftw.FFTW" title="pyfftw.FFTW"><tt class="xref py py-class docutils literal"><span class="pre">pyfftw.FFTW</span></tt></a>.
+This core interface can be accessed directly, or through a series of helper
+functions, provided by the <a class="reference internal" href="pyfftw/builders/builders.html#module-pyfftw.builders" title="pyfftw.builders"><tt class="xref py py-mod docutils literal"><span class="pre">pyfftw.builders</span></tt></a> module. These helper
+functions provide an interface similar to <a class="reference external" href="http://docs.scipy.org/doc/numpy/reference/routines.fft.html#numpy.fft" title="(in NumPy v1.7)"><tt class="xref py py-mod docutils literal"><span class="pre">numpy.fft</span></tt></a> for ease of use.</p>
+<p>In addition to using <a class="reference internal" href="pyfftw/pyfftw.html#pyfftw.FFTW" title="pyfftw.FFTW"><tt class="xref py py-class docutils literal"><span class="pre">pyfftw.FFTW</span></tt></a>, a convenient series of functions
+are included through <a class="reference internal" href="pyfftw/interfaces/interfaces.html#module-pyfftw.interfaces" title="pyfftw.interfaces"><tt class="xref py py-mod docutils literal"><span class="pre">pyfftw.interfaces</span></tt></a> that make using <a class="reference internal" href="pyfftw/pyfftw.html#module-pyfftw" title="pyfftw"><tt class="xref py py-mod docutils literal"><span class="pre">pyfftw</span></tt></a>
+almost equivalent to <a class="reference external" href="http://docs.scipy.org/doc/numpy/reference/routines.fft.html#numpy.fft" title="(in NumPy v1.7)"><tt class="xref py py-mod docutils literal"><span class="pre">numpy.fft</span></tt></a> or <a class="reference external" href="http://docs.scipy.org/doc/scipy/reference/fftpack.html#scipy.fftpack" title="(in SciPy v0.12)"><tt class="xref py py-mod docutils literal"><span class="pre">scipy.fftpack</span></tt></a>.</p>
+<p>The source can be found in <a class="reference external" href="https://github.com/hgomersall/pyFFTW">github</a> and
+its page in the python package index is <a class="reference external" href="http://pypi.python.org/pypi/pyFFTW">here</a>.</p>
+<p>A comprehensive unittest suite is included with the source on the repository.
+If any aspect of this library is not covered by the test suite, that is a bug
+(please report it!).</p>
+</div>
+<div class="section" id="contents">
+<h2>Contents<a class="headerlink" href="#contents" title="Permalink to this headline">¶</a></h2>
+<div class="toctree-wrapper compound">
+<ul>
+<li class="toctree-l1"><a class="reference internal" href="sphinx/tutorial.html">Overview and A Short Tutorial</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="sphinx/tutorial.html#quick-and-easy-the-pyfftw-interfaces-module">Quick and easy: the <tt class="docutils literal"><span class="pre">pyfftw.interfaces</span></tt> module</a></li>
+<li class="toctree-l2"><a class="reference internal" href="sphinx/tutorial.html#the-workhorse-pyfftw-fftw-class">The workhorse <tt class="docutils literal"><span class="pre">pyfftw.FFTW</span></tt> class</a></li>
+<li class="toctree-l2"><a class="reference internal" href="sphinx/tutorial.html#the-pyfftw-builders-functions">The <tt class="docutils literal"><span class="pre">pyfftw.builders</span></tt> functions</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="sphinx/api.html">API Reference</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="pyfftw/pyfftw.html"><tt class="docutils literal"><span class="pre">pyfftw</span></tt> - The core</a></li>
+<li class="toctree-l2"><a class="reference internal" href="pyfftw/builders/builders.html"><tt class="docutils literal"><span class="pre">pyfftw.builders</span></tt> - Get <tt class="docutils literal"><span class="pre">FFTW</span></tt> objects using a <tt class="xref py py-mod docutils literal"><span class="pre">numpy.fft</span></tt> like interface</a></li>
+<li class="toctree-l2"><a class="reference internal" href="pyfftw/builders/_utils.html"><tt class="docutils literal"><span class="pre">pyfftw.builders._utils</span></tt> - Helper functions for <tt class="docutils literal"><span class="pre">pyfftw.builders</span></tt></a></li>
+<li class="toctree-l2"><a class="reference internal" href="pyfftw/interfaces/interfaces.html"><tt class="docutils literal"><span class="pre">pyfftw.interfaces</span></tt> - Drop in replacements for other FFT implementations</a></li>
+</ul>
+</li>
+</ul>
+</div>
+</div>
+</div>
+<div class="section" id="indices-and-tables">
+<h1>Indices and tables<a class="headerlink" href="#indices-and-tables" title="Permalink to this headline">¶</a></h1>
+<ul class="simple">
+<li><a class="reference internal" href="genindex.html"><em>Index</em></a></li>
+<li><a class="reference internal" href="py-modindex.html"><em>Module Index</em></a></li>
+<li><a class="reference internal" href="search.html"><em>Search Page</em></a></li>
+</ul>
+</div>
+
+
+          </div>
+        </div>
+      </div>
+      <div class="sphinxsidebar">
+        <div class="sphinxsidebarwrapper">
+  <h3><a href="#">Table Of Contents</a></h3>
+  <ul>
+<li><a class="reference internal" href="#">Welcome to pyFFTW’s documentation!</a><ul>
+<li><a class="reference internal" href="#introduction">Introduction</a></li>
+<li><a class="reference internal" href="#contents">Contents</a><ul>
+</ul>
+</li>
+</ul>
+</li>
+<li><a class="reference internal" href="#indices-and-tables">Indices and tables</a></li>
+</ul>
+
+  <h4>Next topic</h4>
+  <p class="topless"><a href="sphinx/tutorial.html"
+                        title="next chapter">Overview and A Short Tutorial</a></p>
+  <h3>This Page</h3>
+  <ul class="this-page-menu">
+    <li><a href="_sources/index.txt"
+           rel="nofollow">Show Source</a></li>
+  </ul>
+<div id="searchbox" style="display: none">
+  <h3>Quick search</h3>
+    <form class="search" action="search.html" method="get">
+      <input type="text" name="q" />
+      <input type="submit" value="Go" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    <p class="searchtip" style="font-size: 90%">
+    Enter search terms or a module, class or function name.
+    </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="genindex.html" title="General Index"
+             >index</a></li>
+        <li class="right" >
+          <a href="py-modindex.html" title="Python Module Index"
+             >modules</a> |</li>
+        <li class="right" >
+          <a href="sphinx/tutorial.html" title="Overview and A Short Tutorial"
+             >next</a> |</li>
+        <li><a href="#">pyFFTW 0.9.2 documentation</a> »</li> 
+      </ul>
+    </div>
+    <div class="footer">
+        © Copyright 2013, Henry Gomersall.
+      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
+    </div>
+  </body>
+</html>
\ No newline at end of file
diff --git a/docs/html/py-modindex.html b/docs/html/py-modindex.html
new file mode 100644
index 0000000..791e001
--- /dev/null
+++ b/docs/html/py-modindex.html
@@ -0,0 +1,141 @@
+
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    
+    <title>Python Module Index — pyFFTW 0.9.2 documentation</title>
+    
+    <link rel="stylesheet" href="_static/default.css" type="text/css" />
+    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
+    
+    <script type="text/javascript">
+      var DOCUMENTATION_OPTIONS = {
+        URL_ROOT:    '',
+        VERSION:     '0.9.2',
+        COLLAPSE_INDEX: false,
+        FILE_SUFFIX: '.html',
+        HAS_SOURCE:  true
+      };
+    </script>
+    <script type="text/javascript" src="_static/jquery.js"></script>
+    <script type="text/javascript" src="_static/underscore.js"></script>
+    <script type="text/javascript" src="_static/doctools.js"></script>
+    <link rel="top" title="pyFFTW 0.9.2 documentation" href="index.html" />
+ 
+
+
+  </head>
+  <body>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="genindex.html" title="General Index"
+             accesskey="I">index</a></li>
+        <li class="right" >
+          <a href="#" title="Python Module Index"
+             >modules</a> |</li>
+        <li><a href="index.html">pyFFTW 0.9.2 documentation</a> »</li> 
+      </ul>
+    </div>  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          <div class="body">
+            
+
+   <h1>Python Module Index</h1>
+
+   <div class="modindex-jumpbox">
+   <a href="#cap-p"><strong>p</strong></a>
+   </div>
+
+   <table class="indextable modindextable" cellspacing="0" cellpadding="2">
+     <tr class="pcap"><td></td><td> </td><td></td></tr>
+     <tr class="cap" id="cap-p"><td></td><td>
+       <strong>p</strong></td><td></td></tr>
+     <tr>
+       <td><img src="_static/minus.png" class="toggler"
+              id="toggle-1" style="display: none" alt="-" /></td>
+       <td>
+       <a href="pyfftw/pyfftw.html#module-pyfftw"><tt class="xref">pyfftw</tt></a></td><td>
+       <em></em></td></tr>
+     <tr class="cg-1">
+       <td></td>
+       <td>   
+       <a href="pyfftw/builders/builders.html#module-pyfftw.builders"><tt class="xref">pyfftw.builders</tt></a></td><td>
+       <em></em></td></tr>
+     <tr class="cg-1">
+       <td></td>
+       <td>   
+       <a href="pyfftw/builders/_utils.html#module-pyfftw.builders._utils"><tt class="xref">pyfftw.builders._utils</tt></a></td><td>
+       <em></em></td></tr>
+     <tr class="cg-1">
+       <td></td>
+       <td>   
+       <a href="pyfftw/interfaces/interfaces.html#module-pyfftw.interfaces"><tt class="xref">pyfftw.interfaces</tt></a></td><td>
+       <em></em></td></tr>
+     <tr class="cg-1">
+       <td></td>
+       <td>   
+       <a href="pyfftw/interfaces/interfaces.html#module-pyfftw.interfaces.cache"><tt class="xref">pyfftw.interfaces.cache</tt></a></td><td>
+       <em></em></td></tr>
+     <tr class="cg-1">
+       <td></td>
+       <td>   
+       <a href="pyfftw/interfaces/numpy_fft.html#module-pyfftw.interfaces.numpy_fft"><tt class="xref">pyfftw.interfaces.numpy_fft</tt></a></td><td>
+       <em></em></td></tr>
+     <tr class="cg-1">
+       <td></td>
+       <td>   
+       <a href="pyfftw/interfaces/scipy_fftpack.html#module-pyfftw.interfaces.scipy_fftpack"><tt class="xref">pyfftw.interfaces.scipy_fftpack</tt></a></td><td>
+       <em></em></td></tr>
+   </table>
+
+
+          </div>
+        </div>
+      </div>
+      <div class="sphinxsidebar">
+        <div class="sphinxsidebarwrapper">
+<div id="searchbox" style="display: none">
+  <h3>Quick search</h3>
+    <form class="search" action="search.html" method="get">
+      <input type="text" name="q" />
+      <input type="submit" value="Go" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    <p class="searchtip" style="font-size: 90%">
+    Enter search terms or a module, class or function name.
+    </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="genindex.html" title="General Index"
+             >index</a></li>
+        <li class="right" >
+          <a href="#" title="Python Module Index"
+             >modules</a> |</li>
+        <li><a href="index.html">pyFFTW 0.9.2 documentation</a> »</li> 
+      </ul>
+    </div>
+    <div class="footer">
+        © Copyright 2013, Henry Gomersall.
+      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
+    </div>
+  </body>
+</html>
\ No newline at end of file
diff --git a/docs/html/pyfftw/builders/_utils.html b/docs/html/pyfftw/builders/_utils.html
new file mode 100644
index 0000000..02b2066
--- /dev/null
+++ b/docs/html/pyfftw/builders/_utils.html
@@ -0,0 +1,202 @@
+
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    
+    <title>pyfftw.builders._utils - Helper functions for pyfftw.builders — pyFFTW 0.9.2 documentation</title>
+    
+    <link rel="stylesheet" href="../../_static/default.css" type="text/css" />
+    <link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
+    
+    <script type="text/javascript">
+      var DOCUMENTATION_OPTIONS = {
+        URL_ROOT:    '../../',
+        VERSION:     '0.9.2',
+        COLLAPSE_INDEX: false,
+        FILE_SUFFIX: '.html',
+        HAS_SOURCE:  true
+      };
+    </script>
+    <script type="text/javascript" src="../../_static/jquery.js"></script>
+    <script type="text/javascript" src="../../_static/underscore.js"></script>
+    <script type="text/javascript" src="../../_static/doctools.js"></script>
+    <link rel="top" title="pyFFTW 0.9.2 documentation" href="../../index.html" />
+    <link rel="up" title="API Reference" href="../../sphinx/api.html" />
+    <link rel="next" title="pyfftw.interfaces - Drop in replacements for other FFT implementations" href="../interfaces/interfaces.html" />
+    <link rel="prev" title="pyfftw.builders - Get FFTW objects using a numpy.fft like interface" href="builders.html" /> 
+  </head>
+  <body>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../../genindex.html" title="General Index"
+             accesskey="I">index</a></li>
+        <li class="right" >
+          <a href="../../py-modindex.html" title="Python Module Index"
+             >modules</a> |</li>
+        <li class="right" >
+          <a href="../interfaces/interfaces.html" title="pyfftw.interfaces - Drop in replacements for other FFT implementations"
+             accesskey="N">next</a> |</li>
+        <li class="right" >
+          <a href="builders.html" title="pyfftw.builders - Get FFTW objects using a numpy.fft like interface"
+             accesskey="P">previous</a> |</li>
+        <li><a href="../../index.html">pyFFTW 0.9.2 documentation</a> »</li>
+          <li><a href="../../sphinx/api.html" accesskey="U">API Reference</a> »</li> 
+      </ul>
+    </div>  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          <div class="body">
+            
+  <div class="section" id="module-pyfftw.builders._utils">
+<span id="pyfftw-builders-utils-helper-functions-for-pyfftw-builders"></span><h1><tt class="docutils literal"><span class="pre">pyfftw.builders._utils</span></tt> - Helper functions for <a class="reference internal" href="builders.html#module-pyfftw.builders" title="pyfftw.builders"><tt class="xref py py-mod docutils literal"><span class="pre">pyfftw.builders</span></tt></a><a class="headerlink" href="#module-pyfftw.builders._utils" title="Permalink to this headline">¶</a></h1>
+<p>A set of utility functions for use with the builders. Users should
+not need to use the functions directly, but they are included here for
+completeness and to aid with understanding of what is happening behind
+the scenes.</p>
+<p>Certainly, users may encounter instances of 
+<a class="reference internal" href="#pyfftw.builders._utils._FFTWWrapper" title="pyfftw.builders._utils._FFTWWrapper"><tt class="xref py py-class docutils literal"><span class="pre">_FFTWWrapper</span></tt></a>.</p>
+<p>These everything documented in this module is <em>not</em> part of the public API 
+and may change in future versions.</p>
+<dl class="class">
+<dt id="pyfftw.builders._utils._FFTWWrapper">
+<em class="property">class </em><tt class="descclassname">pyfftw.builders._utils.</tt><tt class="descname">_FFTWWrapper</tt><big>(</big><em>input_array, output_array, axes=[-1], direction='FFTW_FORWARD', flags=['FFTW_MEASURE'], threads=1, *args, **kwargs</em><big>)</big><a class="headerlink" href="#pyfftw.builders._utils._FFTWWrapper" title="Permalink to this definition">¶</a></dt>
+<dd><p>A class that wraps <a class="reference internal" href="../pyfftw.html#pyfftw.FFTW" title="pyfftw.FFTW"><tt class="xref py py-class docutils literal"><span class="pre">pyfftw.FFTW</span></tt></a>, providing a slicer on the input
+stage during calls to <a class="reference internal" href="#pyfftw.builders._utils._FFTWWrapper.__call__" title="pyfftw.builders._utils._FFTWWrapper.__call__"><tt class="xref py py-meth docutils literal"><span class="pre">__call__()</span></tt></a>.</p>
+<p>The arguments are as per <a class="reference internal" href="../pyfftw.html#pyfftw.FFTW" title="pyfftw.FFTW"><tt class="xref py py-class docutils literal"><span class="pre">pyfftw.FFTW</span></tt></a>, but with the addition
+of 2 keyword arguments: <tt class="docutils literal"><span class="pre">input_array_slicer</span></tt> and
+<tt class="docutils literal"><span class="pre">FFTW_array_slicer</span></tt>.</p>
+<p>These arguments represent 2 slicers: <tt class="docutils literal"><span class="pre">input_array_slicer</span></tt> slices
+the input array that is passed in during a call to instances of this
+class, and <tt class="docutils literal"><span class="pre">FFTW_array_slicer</span></tt> slices the internal array.</p>
+<p>The arrays that are returned from both of these slicing operations
+should be the same size. The data is then copied from the sliced
+input array into the sliced internal array.</p>
+<dl class="method">
+<dt id="pyfftw.builders._utils._FFTWWrapper.__call__">
+<tt class="descname">__call__</tt><big>(</big><em>input_array=None</em>, <em>output_array=None</em>, <em>normalise_idft=True</em><big>)</big><a class="headerlink" href="#pyfftw.builders._utils._FFTWWrapper.__call__" title="Permalink to this definition">¶</a></dt>
+<dd><p>Wrap <a class="reference internal" href="../pyfftw.html#pyfftw.FFTW.__call__" title="pyfftw.FFTW.__call__"><tt class="xref py py-meth docutils literal"><span class="pre">pyfftw.FFTW.__call__()</span></tt></a> by firstly slicing the 
+passed-in input array and then copying it into a sliced version
+of the internal array. These slicers are set at instantiation.</p>
+<p>When input array is not <tt class="docutils literal"><span class="pre">None</span></tt>, this method always results in
+a copy. Consequently, the alignment and dtype are maintained in
+the internal array.</p>
+<p><tt class="docutils literal"><span class="pre">output_array</span></tt> and <tt class="docutils literal"><span class="pre">normalise_idft</span></tt> are passed through to
+<a class="reference internal" href="../pyfftw.html#pyfftw.FFTW.__call__" title="pyfftw.FFTW.__call__"><tt class="xref py py-meth docutils literal"><span class="pre">pyfftw.FFTW.__call__()</span></tt></a> untouched.</p>
+</dd></dl>
+
+</dd></dl>
+
+<dl class="function">
+<dt id="pyfftw.builders._utils._Xfftn">
+<tt class="descclassname">pyfftw.builders._utils.</tt><tt class="descname">_Xfftn</tt><big>(</big><em>a</em>, <em>s</em>, <em>axes</em>, <em>overwrite_input</em>, <em>planner_effort</em>, <em>threads</em>, <em>auto_align_input</em>, <em>auto_contiguous</em>, <em>avoid_copy</em>, <em>inverse</em>, <em>real</em><big>)</big><a class="headerlink" href="#pyfftw.builders._utils._Xfftn" title="Permalink to this definition">¶</a></dt>
+<dd><p>Generic transform interface for all the transforms. No
+defaults exist. The transform must be specified exactly.</p>
+</dd></dl>
+
+<dl class="function">
+<dt id="pyfftw.builders._utils._setup_input_slicers">
+<tt class="descclassname">pyfftw.builders._utils.</tt><tt class="descname">_setup_input_slicers</tt><big>(</big><em>a_shape</em>, <em>input_shape</em><big>)</big><a class="headerlink" href="#pyfftw.builders._utils._setup_input_slicers" title="Permalink to this definition">¶</a></dt>
+<dd><p>This function returns two slicers that are to be used to
+copy the data from the input array to the FFTW object internal
+array, which can then be passed to _FFTWWrapper:</p>
+<p><tt class="docutils literal"><span class="pre">(update_input_array_slicer,</span> <span class="pre">FFTW_array_slicer)</span></tt></p>
+<p>On calls to <a class="reference internal" href="#pyfftw.builders._utils._FFTWWrapper" title="pyfftw.builders._utils._FFTWWrapper"><tt class="xref py py-class docutils literal"><span class="pre">_FFTWWrapper</span></tt></a> objects, 
+the input array is copied in as:</p>
+<p><tt class="docutils literal"><span class="pre">FFTW_array[FFTW_array_slicer]</span> <span class="pre">=</span> <span class="pre">input_array[update_input_array_slicer]</span></tt></p>
+</dd></dl>
+
+<dl class="function">
+<dt id="pyfftw.builders._utils._compute_array_shapes">
+<tt class="descclassname">pyfftw.builders._utils.</tt><tt class="descname">_compute_array_shapes</tt><big>(</big><em>a</em>, <em>s</em>, <em>axes</em>, <em>inverse</em>, <em>real</em><big>)</big><a class="headerlink" href="#pyfftw.builders._utils._compute_array_shapes" title="Permalink to this definition">¶</a></dt>
+<dd><p>Given a passed in array <tt class="docutils literal"><span class="pre">a</span></tt>, and the rest of the arguments
+(that have been fleshed out with 
+<a class="reference internal" href="#pyfftw.builders._utils._cook_nd_args" title="pyfftw.builders._utils._cook_nd_args"><tt class="xref py py-func docutils literal"><span class="pre">_cook_nd_args()</span></tt></a>), compute
+the shape the input and output arrays need to be in order 
+to satisfy all the requirements for the transform. The input
+shape <em>may</em> be different to the shape of a.</p>
+<p>returns:
+<tt class="docutils literal"><span class="pre">(input_shape,</span> <span class="pre">output_shape)</span></tt></p>
+</dd></dl>
+
+<dl class="function">
+<dt id="pyfftw.builders._utils._precook_1d_args">
+<tt class="descclassname">pyfftw.builders._utils.</tt><tt class="descname">_precook_1d_args</tt><big>(</big><em>a</em>, <em>n</em>, <em>axis</em><big>)</big><a class="headerlink" href="#pyfftw.builders._utils._precook_1d_args" title="Permalink to this definition">¶</a></dt>
+<dd><p>Turn <tt class="docutils literal"><span class="pre">*(n,</span> <span class="pre">axis)</span></tt> into <tt class="docutils literal"><span class="pre">(s,</span> <span class="pre">axes)</span></tt></p>
+</dd></dl>
+
+<dl class="function">
+<dt id="pyfftw.builders._utils._cook_nd_args">
+<tt class="descclassname">pyfftw.builders._utils.</tt><tt class="descname">_cook_nd_args</tt><big>(</big><em>a</em>, <em>s=None</em>, <em>axes=None</em>, <em>invreal=False</em><big>)</big><a class="headerlink" href="#pyfftw.builders._utils._cook_nd_args" title="Permalink to this definition">¶</a></dt>
+<dd><p>Similar to <tt class="xref py py-func docutils literal"><span class="pre">numpy.fft.fftpack._cook_nd_args()</span></tt>.</p>
+</dd></dl>
+
+</div>
+
+
+          </div>
+        </div>
+      </div>
+      <div class="sphinxsidebar">
+        <div class="sphinxsidebarwrapper">
+  <h4>Previous topic</h4>
+  <p class="topless"><a href="builders.html"
+                        title="previous chapter"><tt class="docutils literal"><span class="pre">pyfftw.builders</span></tt> - Get <tt class="docutils literal"><span class="pre">FFTW</span></tt> objects using a <tt class="xref py py-mod docutils literal"><span class="pre">numpy.fft</span></tt> like interface</a></p>
+  <h4>Next topic</h4>
+  <p class="topless"><a href="../interfaces/interfaces.html"
+                        title="next chapter"><tt class="docutils literal"><span class="pre">pyfftw.interfaces</span></tt> - Drop in replacements for other FFT implementations</a></p>
+  <h3>This Page</h3>
+  <ul class="this-page-menu">
+    <li><a href="../../_sources/pyfftw/builders/_utils.txt"
+           rel="nofollow">Show Source</a></li>
+  </ul>
+<div id="searchbox" style="display: none">
+  <h3>Quick search</h3>
+    <form class="search" action="../../search.html" method="get">
+      <input type="text" name="q" />
+      <input type="submit" value="Go" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    <p class="searchtip" style="font-size: 90%">
+    Enter search terms or a module, class or function name.
+    </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../../genindex.html" title="General Index"
+             >index</a></li>
+        <li class="right" >
+          <a href="../../py-modindex.html" title="Python Module Index"
+             >modules</a> |</li>
+        <li class="right" >
+          <a href="../interfaces/interfaces.html" title="pyfftw.interfaces - Drop in replacements for other FFT implementations"
+             >next</a> |</li>
+        <li class="right" >
+          <a href="builders.html" title="pyfftw.builders - Get FFTW objects using a numpy.fft like interface"
+             >previous</a> |</li>
+        <li><a href="../../index.html">pyFFTW 0.9.2 documentation</a> »</li>
+          <li><a href="../../sphinx/api.html" >API Reference</a> »</li> 
+      </ul>
+    </div>
+    <div class="footer">
+        © Copyright 2013, Henry Gomersall.
+      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
+    </div>
+  </body>
+</html>
\ No newline at end of file
diff --git a/docs/html/pyfftw/builders/builders.html b/docs/html/pyfftw/builders/builders.html
new file mode 100644
index 0000000..ec370e0
--- /dev/null
+++ b/docs/html/pyfftw/builders/builders.html
@@ -0,0 +1,442 @@
+
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    
+    <title>pyfftw.builders - Get FFTW objects using a numpy.fft like interface — pyFFTW 0.9.2 documentation</title>
+    
+    <link rel="stylesheet" href="../../_static/default.css" type="text/css" />
+    <link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
+    
+    <script type="text/javascript">
+      var DOCUMENTATION_OPTIONS = {
+        URL_ROOT:    '../../',
+        VERSION:     '0.9.2',
+        COLLAPSE_INDEX: false,
+        FILE_SUFFIX: '.html',
+        HAS_SOURCE:  true
+      };
+    </script>
+    <script type="text/javascript" src="../../_static/jquery.js"></script>
+    <script type="text/javascript" src="../../_static/underscore.js"></script>
+    <script type="text/javascript" src="../../_static/doctools.js"></script>
+    <link rel="top" title="pyFFTW 0.9.2 documentation" href="../../index.html" />
+    <link rel="up" title="API Reference" href="../../sphinx/api.html" />
+    <link rel="next" title="pyfftw.builders._utils - Helper functions for pyfftw.builders" href="_utils.html" />
+    <link rel="prev" title="pyfftw - The core" href="../pyfftw.html" /> 
+  </head>
+  <body>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../../genindex.html" title="General Index"
+             accesskey="I">index</a></li>
+        <li class="right" >
+          <a href="../../py-modindex.html" title="Python Module Index"
+             >modules</a> |</li>
+        <li class="right" >
+          <a href="_utils.html" title="pyfftw.builders._utils - Helper functions for pyfftw.builders"
+             accesskey="N">next</a> |</li>
+        <li class="right" >
+          <a href="../pyfftw.html" title="pyfftw - The core"
+             accesskey="P">previous</a> |</li>
+        <li><a href="../../index.html">pyFFTW 0.9.2 documentation</a> »</li>
+          <li><a href="../../sphinx/api.html" accesskey="U">API Reference</a> »</li> 
+      </ul>
+    </div>  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          <div class="body">
+            
+  <div class="section" id="module-pyfftw.builders">
+<span id="pyfftw-builders-get-fftw-objects-using-a-numpy-fft-like-interface"></span><h1><tt class="docutils literal"><span class="pre">pyfftw.builders</span></tt> - Get <tt class="xref py py-class docutils literal"><span class="pre">FFTW</span></tt> objects using a <tt class="xref py py-mod docutils literal"><span class="pre">numpy.fft</span></tt> like interface<a class="headerlink" href="#module-pyfftw.builders" title="Permalink to this headline">¶</a></h1>
+<div class="section" id="overview">
+<h2>Overview<a class="headerlink" href="#overview" title="Permalink to this headline">¶</a></h2>
+<p>This module contains a set of functions that return 
+<a class="reference internal" href="../pyfftw.html#pyfftw.FFTW" title="pyfftw.FFTW"><tt class="xref py py-class docutils literal"><span class="pre">pyfftw.FFTW</span></tt></a> objects.</p>
+<p>The interface to create these objects is mostly the same as
+<a class="reference external" href="http://docs.scipy.org/doc/numpy/reference/routines.fft.html#numpy.fft" title="(in NumPy v1.7)"><tt class="xref py py-mod docutils literal"><span class="pre">numpy.fft</span></tt></a>, only instead of the call returning the result of the
+FFT, a <a class="reference internal" href="../pyfftw.html#pyfftw.FFTW" title="pyfftw.FFTW"><tt class="xref py py-class docutils literal"><span class="pre">pyfftw.FFTW</span></tt></a> object is returned that performs that FFT
+operation when it is called. Users should be familiar with
+<tt class="xref py py-mod docutils literal"><span class="pre">numpy.fft</span></tt> before reading on.</p>
+<p>In the case where the shape argument, <tt class="docutils literal"><span class="pre">s</span></tt> (or <tt class="docutils literal"><span class="pre">n</span></tt> in the
+1-dimensional case), dictates that the passed-in input array be copied
+into a different processing array, the returned object is an
+instance of a child class of <a class="reference internal" href="../pyfftw.html#pyfftw.FFTW" title="pyfftw.FFTW"><tt class="xref py py-class docutils literal"><span class="pre">pyfftw.FFTW</span></tt></a>,
+<a class="reference internal" href="_utils.html#pyfftw.builders._utils._FFTWWrapper" title="pyfftw.builders._utils._FFTWWrapper"><tt class="xref py py-class docutils literal"><span class="pre">_FFTWWrapper</span></tt></a>, which wraps the call
+method in order to correctly perform that copying. That is, subsequent
+calls to the object (i.e. through
+<a class="reference internal" href="_utils.html#pyfftw.builders._utils._FFTWWrapper.__call__" title="pyfftw.builders._utils._FFTWWrapper.__call__"><tt class="xref py py-meth docutils literal"><span class="pre">__call__()</span></tt></a>) should occur
+with an input array that can be sliced to the same size as the
+expected internal array. Note that a side effect of this is that
+subsequent calls to the object can be made with an array that is
+<em>bigger</em> than the original (but not smaller).</p>
+<p>Only the call method is wrapped; <a class="reference internal" href="../pyfftw.html#pyfftw.FFTW.update_arrays" title="pyfftw.FFTW.update_arrays"><tt class="xref py py-meth docutils literal"><span class="pre">update_arrays()</span></tt></a>
+still expects an array with the correct size, alignment, dtype etc for
+the <a class="reference internal" href="../pyfftw.html#pyfftw.FFTW" title="pyfftw.FFTW"><tt class="xref py py-class docutils literal"><span class="pre">pyfftw.FFTW</span></tt></a> object.</p>
+<p>When the internal input array is bigger along any axis than the input
+array that is passed in (due to <tt class="docutils literal"><span class="pre">s</span></tt> dictating a larger size), then the
+extra entries are padded with zeros. This is a one time action. If the
+internal input array is then extracted using
+<a class="reference internal" href="../pyfftw.html#pyfftw.FFTW.get_input_array" title="pyfftw.FFTW.get_input_array"><tt class="xref py py-meth docutils literal"><span class="pre">pyfftw.FFTW.get_input_array()</span></tt></a>, it is possible to
+persistently fill the padding space with whatever the user desires, so
+subsequent calls with a new input only overwrite the values that aren’t
+padding (even if the array that is used for the call is bigger than the
+original - see the point above about bigger arrays being sliced to
+fit).</p>
+<p>The precision of the FFT operation is acquired from the input array.
+If an array is passed in that is not of float type, or is of an
+unknown float type, an attempt is made to convert the array to a
+double precision array. This results in a copy being made.</p>
+<p>If an array of the incorrect complexity is passed in (e.g. a complex
+array is passed to a real transform routine, or vice-versa), then an
+attempt is made to convert the array to an array of the correct
+complexity. This results in a copy being made.</p>
+<p>Although the array that is internal to the <a class="reference internal" href="../pyfftw.html#pyfftw.FFTW" title="pyfftw.FFTW"><tt class="xref py py-class docutils literal"><span class="pre">pyfftw.FFTW</span></tt></a> object
+will be correctly loaded with the values within the input array, it is
+not necessarily the case that the internal array <em>is</em> the input array.
+The actual internal input array can always be retrieved with 
+<a class="reference internal" href="../pyfftw.html#pyfftw.FFTW.get_input_array" title="pyfftw.FFTW.get_input_array"><tt class="xref py py-meth docutils literal"><span class="pre">pyfftw.FFTW.get_input_array()</span></tt></a>.</p>
+<p><strong>Example:</strong></p>
+<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="kn">import</span> <span class="nn">pyfftw</span>
+<span class="gp">>>> </span><span class="n">a</span> <span class="o">=</span> <span class="n">pyfftw</span><span class="o">.</span><span class="n">n_byte_align_empty</span><span class="p">(</span><span class="mi">4</span><span class="p">,</span> <span class="mi">16</span><span class="p">,</span> <span class="n">dtype</span><span class="o">=</span><span class="s">'complex128'</span><span class="p">)</span>
+<span class="gp">>>> </span><span class="n">fft</span> <span class="o">=</span> <span class="n">pyfftw</span><span class="o">.</span><span class="n">builders</span><span class="o">.</span><span class="n">fft</span><span class="p">(</span><span class="n">a</span><span class="p">)</span>
+<span class="gp">>>> </span><span class="n">a</span><span class="p">[:]</span> <span class="o">=</span> <span class="p">[</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">4</span><span class="p">]</span>
+<span class="gp">>>> </span><span class="n">fft</span><span class="p">()</span> <span class="c"># returns the output</span>
+<span class="go">array([ 10.+0.j,  -2.+2.j,  -2.+0.j,  -2.-2.j])</span>
+</pre></div>
+</div>
+<p>More examples can be found in the <a class="reference internal" href="../../sphinx/tutorial.html"><em>tutorial</em></a>.</p>
+</div>
+<div class="section" id="supported-functions-and-caveats">
+<h2>Supported Functions and Caveats<a class="headerlink" href="#supported-functions-and-caveats" title="Permalink to this headline">¶</a></h2>
+<p>The following functions are supported. They can be used with the
+same calling signature as their respective functions in
+<a class="reference external" href="http://docs.scipy.org/doc/numpy/reference/routines.fft.html#numpy.fft" title="(in NumPy v1.7)"><tt class="xref py py-mod docutils literal"><span class="pre">numpy.fft</span></tt></a>.</p>
+<p><strong>Standard FFTs</strong></p>
+<ul class="simple">
+<li><a class="reference internal" href="#pyfftw.builders.fft" title="pyfftw.builders.fft"><tt class="xref py py-func docutils literal"><span class="pre">fft()</span></tt></a></li>
+<li><a class="reference internal" href="#pyfftw.builders.ifft" title="pyfftw.builders.ifft"><tt class="xref py py-func docutils literal"><span class="pre">ifft()</span></tt></a></li>
+<li><a class="reference internal" href="#pyfftw.builders.fft2" title="pyfftw.builders.fft2"><tt class="xref py py-func docutils literal"><span class="pre">fft2()</span></tt></a></li>
+<li><a class="reference internal" href="#pyfftw.builders.ifft2" title="pyfftw.builders.ifft2"><tt class="xref py py-func docutils literal"><span class="pre">ifft2()</span></tt></a></li>
+<li><a class="reference internal" href="#pyfftw.builders.fftn" title="pyfftw.builders.fftn"><tt class="xref py py-func docutils literal"><span class="pre">fftn()</span></tt></a></li>
+<li><a class="reference internal" href="#pyfftw.builders.ifftn" title="pyfftw.builders.ifftn"><tt class="xref py py-func docutils literal"><span class="pre">ifftn()</span></tt></a></li>
+</ul>
+<p><strong>Real FFTs</strong></p>
+<ul class="simple">
+<li><a class="reference internal" href="#pyfftw.builders.rfft" title="pyfftw.builders.rfft"><tt class="xref py py-func docutils literal"><span class="pre">rfft()</span></tt></a></li>
+<li><a class="reference internal" href="#pyfftw.builders.irfft" title="pyfftw.builders.irfft"><tt class="xref py py-func docutils literal"><span class="pre">irfft()</span></tt></a></li>
+<li><a class="reference internal" href="#pyfftw.builders.rfft2" title="pyfftw.builders.rfft2"><tt class="xref py py-func docutils literal"><span class="pre">rfft2()</span></tt></a></li>
+<li><a class="reference internal" href="#pyfftw.builders.irfft2" title="pyfftw.builders.irfft2"><tt class="xref py py-func docutils literal"><span class="pre">irfft2()</span></tt></a></li>
+<li><a class="reference internal" href="#pyfftw.builders.rfftn" title="pyfftw.builders.rfftn"><tt class="xref py py-func docutils literal"><span class="pre">rfftn()</span></tt></a></li>
+<li><a class="reference internal" href="#pyfftw.builders.irfftn" title="pyfftw.builders.irfftn"><tt class="xref py py-func docutils literal"><span class="pre">irfftn()</span></tt></a></li>
+</ul>
+<p>The first caveat is that the dtype of the input array must match the
+transform. For example, for <tt class="docutils literal"><span class="pre">fft</span></tt> and <tt class="docutils literal"><span class="pre">ifft</span></tt>, the dtype must
+be complex, for <tt class="docutils literal"><span class="pre">rfft</span></tt> it must be real, and so on. The other point
+to note from this is that the precision of the transform matches the
+precision of the input array. So, if a single precision input array is
+passed in, then a single precision transform will be used.</p>
+<p>The second caveat is that repeated axes are handled differently; with 
+the returned <a class="reference internal" href="../pyfftw.html#pyfftw.FFTW" title="pyfftw.FFTW"><tt class="xref py py-class docutils literal"><span class="pre">pyfftw.FFTW</span></tt></a> object, axes that are repeated in the
+axes argument are considered only once, as compared to <a class="reference external" href="http://docs.scipy.org/doc/numpy/reference/routines.fft.html#numpy.fft" title="(in NumPy v1.7)"><tt class="xref py py-mod docutils literal"><span class="pre">numpy.fft</span></tt></a>
+in which repeated axes results in the DFT being taken along that axes
+as many times as the axis occurs (this is down to the underlying
+library).</p>
+<p>Note that unless the <tt class="docutils literal"><span class="pre">auto_align_input</span></tt> argument to the function
+is set to <tt class="docutils literal"><span class="pre">True</span></tt>, the <tt class="docutils literal"><span class="pre">'FFTW_UNALIGNED'</span></tt> <a class="reference internal" href="../pyfftw.html#fftw-flags"><em>flag</em></a>
+is set in the returned <a class="reference internal" href="../pyfftw.html#pyfftw.FFTW" title="pyfftw.FFTW"><tt class="xref py py-class docutils literal"><span class="pre">pyfftw.FFTW</span></tt></a> object. This disables some
+of the FFTW optimisations that rely on aligned arrays. Also worth
+noting is that the <tt class="docutils literal"><span class="pre">auto_align_input</span></tt> flag only results in a copy
+when calling the resultant <a class="reference internal" href="../pyfftw.html#pyfftw.FFTW" title="pyfftw.FFTW"><tt class="xref py py-class docutils literal"><span class="pre">pyfftw.FFTW</span></tt></a> object if the input
+array is not already aligned correctly.</p>
+</div>
+<div class="section" id="additional-arguments">
+<span id="builders-args"></span><h2>Additional Arguments<a class="headerlink" href="#additional-arguments" title="Permalink to this headline">¶</a></h2>
+<p>In addition to the arguments that are present with their complementary
+functions in <a class="reference external" href="http://docs.scipy.org/doc/numpy/reference/routines.fft.html#numpy.fft" title="(in NumPy v1.7)"><tt class="xref py py-mod docutils literal"><span class="pre">numpy.fft</span></tt></a>, each of these functions also offers the
+following additional keyword arguments:</p>
+<ul>
+<li><p class="first"><tt class="docutils literal"><span class="pre">overwrite_input</span></tt>: Whether or not the input array can be
+overwritten during the transform. This sometimes results in a faster
+algorithm being made available. It causes the <tt class="docutils literal"><span class="pre">'FFTW_DESTROY_INPUT'</span></tt>
+flag to be passed to the <a class="reference internal" href="../pyfftw.html#pyfftw.FFTW" title="pyfftw.FFTW"><tt class="xref py py-class docutils literal"><span class="pre">pyfftw.FFTW</span></tt></a> object. This flag is not
+offered for the multi-dimensional inverse real transforms, as FFTW is
+unable to not overwrite the input in that case.</p>
+</li>
+<li><p class="first"><tt class="docutils literal"><span class="pre">planner_effort</span></tt>: A string dictating how much effort is spent 
+in planning the FFTW routines. This is passed to the creation
+of the <a class="reference internal" href="../pyfftw.html#pyfftw.FFTW" title="pyfftw.FFTW"><tt class="xref py py-class docutils literal"><span class="pre">pyfftw.FFTW</span></tt></a> object as an entry in the flags list. 
+They correspond to flags passed to the <a class="reference internal" href="../pyfftw.html#pyfftw.FFTW" title="pyfftw.FFTW"><tt class="xref py py-class docutils literal"><span class="pre">pyfftw.FFTW</span></tt></a> object.</p>
+<p>The valid strings, in order of their increasing impact on the time 
+to compute  are:
+<tt class="docutils literal"><span class="pre">'FFTW_ESTIMATE'</span></tt>, <tt class="docutils literal"><span class="pre">'FFTW_MEASURE'</span></tt> (default), <tt class="docutils literal"><span class="pre">'FFTW_PATIENT'</span></tt>
+and <tt class="docutils literal"><span class="pre">'FFTW_EXHAUSTIVE'</span></tt>.</p>
+<p>The <a class="reference external" href="http://www.fftw.org/fftw3_doc/Words-of-Wisdom_002dSaving-Plans.html">Wisdom</a>
+that FFTW has accumulated or has loaded (through
+<a class="reference internal" href="../pyfftw.html#pyfftw.import_wisdom" title="pyfftw.import_wisdom"><tt class="xref py py-func docutils literal"><span class="pre">pyfftw.import_wisdom()</span></tt></a>) is used during the creation of
+<a class="reference internal" href="../pyfftw.html#pyfftw.FFTW" title="pyfftw.FFTW"><tt class="xref py py-class docutils literal"><span class="pre">pyfftw.FFTW</span></tt></a> objects.</p>
+</li>
+<li><p class="first"><tt class="docutils literal"><span class="pre">threads</span></tt>: The number of threads used to perform the FFT.</p>
+</li>
+<li><p class="first"><tt class="docutils literal"><span class="pre">auto_align_input</span></tt>: Correctly byte align the input array for optimal
+usage of vector instructions. This can lead to a substantial speedup.</p>
+<p>Setting this argument to <tt class="docutils literal"><span class="pre">True</span></tt> makes sure that the input array
+is correctly aligned. It is possible to correctly byte align the array
+prior to calling this function (using, for example,
+<a class="reference internal" href="../pyfftw.html#pyfftw.n_byte_align" title="pyfftw.n_byte_align"><tt class="xref py py-func docutils literal"><span class="pre">pyfftw.n_byte_align()</span></tt></a>). If and only if a realignment is 
+necessary is a new array created. If a new array <em>is</em> created, it is 
+up to the calling code to acquire that new input array using 
+<a class="reference internal" href="../pyfftw.html#pyfftw.FFTW.get_input_array" title="pyfftw.FFTW.get_input_array"><tt class="xref py py-func docutils literal"><span class="pre">pyfftw.FFTW.get_input_array()</span></tt></a>.</p>
+<p>The resultant <a class="reference internal" href="../pyfftw.html#pyfftw.FFTW" title="pyfftw.FFTW"><tt class="xref py py-class docutils literal"><span class="pre">pyfftw.FFTW</span></tt></a> object that is created will be
+designed to operate on arrays that are aligned. If the object is
+called with an unaligned array, this would result in a copy. Despite
+this, it may still be faster to set the <tt class="docutils literal"><span class="pre">auto_align_input</span></tt> flag
+and incur a copy with unaligned arrays than to set up an object
+that uses aligned arrays.</p>
+<p>It’s worth noting that just being aligned may not be sufficient to
+create the fastest possible transform. For example, if the array is not
+contiguous (i.e. certain axes have gaps in memory between slices), it
+may be faster to plan a transform for a contiguous array, and then rely
+on the array being copied in before the transform (which
+<a class="reference internal" href="../pyfftw.html#pyfftw.FFTW" title="pyfftw.FFTW"><tt class="xref py py-class docutils literal"><span class="pre">pyfftw.FFTW</span></tt></a> will handle for you). The <tt class="docutils literal"><span class="pre">auto_contiguous</span></tt>
+argument controls whether this function also takes care of making sure
+the array is contiguous or not.</p>
+</li>
+<li><p class="first"><tt class="docutils literal"><span class="pre">auto_contiguous</span></tt>: Make sure the input array is contiguous in
+memory before performing the transform on it. If the array is not
+contiguous, it is copied into an interim array. This is because it
+is often faster to copy the data before the transform and then transform
+a contiguous array than it is to try to take the transform of a 
+non-contiguous array. This is particularly true in conjunction with
+the <tt class="docutils literal"><span class="pre">auto_align_input</span></tt> argument which is used to make sure that the 
+transform is taken of an aligned array.</p>
+<p>Like <tt class="docutils literal"><span class="pre">auto_align_input</span></tt>, If a new array is created, it is 
+up to the calling code to acquire that new input array using 
+<a class="reference internal" href="../pyfftw.html#pyfftw.FFTW.get_input_array" title="pyfftw.FFTW.get_input_array"><tt class="xref py py-func docutils literal"><span class="pre">pyfftw.FFTW.get_input_array()</span></tt></a>.</p>
+</li>
+<li><p class="first"><tt class="docutils literal"><span class="pre">avoid_copy</span></tt>: By default, these functions will always create a copy 
+(and sometimes more than one) of the passed in input array. This is 
+because the creation of the <a class="reference internal" href="../pyfftw.html#pyfftw.FFTW" title="pyfftw.FFTW"><tt class="xref py py-class docutils literal"><span class="pre">pyfftw.FFTW</span></tt></a> object generally
+destroys the contents of the input array. Setting this argument to
+<tt class="docutils literal"><span class="pre">True</span></tt> will try not to create a copy of the input array, likely
+resulting in the input array being destroyed. If it is not possible
+to create the object without a copy being made, a <tt class="docutils literal"><span class="pre">ValueError</span></tt> is
+raised.</p>
+<p>Example situations that require a copy, and so cause the exception
+to be raised when this flag is set:</p>
+<ul class="simple">
+<li>The shape of the FFT input as dictated by <tt class="docutils literal"><span class="pre">s</span></tt> is
+necessarily different from the shape of the passed-in array.</li>
+<li>The dtypes are incompatible with the FFT routine.</li>
+<li>The <tt class="docutils literal"><span class="pre">auto_contiguous</span></tt> or <tt class="docutils literal"><span class="pre">auto_align</span></tt> flags are True and 
+the input array is not already contiguous or aligned.</li>
+</ul>
+<p>This argument is distinct from <tt class="docutils literal"><span class="pre">overwrite_input</span></tt> in that it only
+influences a copy during the creation of the object. It changes no
+flags in the <a class="reference internal" href="../pyfftw.html#pyfftw.FFTW" title="pyfftw.FFTW"><tt class="xref py py-class docutils literal"><span class="pre">pyfftw.FFTW</span></tt></a> object.</p>
+</li>
+</ul>
+<p>The exceptions raised by each of these functions are as per their
+equivalents in <a class="reference external" href="http://docs.scipy.org/doc/numpy/reference/routines.fft.html#numpy.fft" title="(in NumPy v1.7)"><tt class="xref py py-mod docutils literal"><span class="pre">numpy.fft</span></tt></a>, or as documented above.</p>
+</div>
+<div class="section" id="the-functions">
+<h2>The Functions<a class="headerlink" href="#the-functions" title="Permalink to this headline">¶</a></h2>
+<dl class="function">
+<dt id="pyfftw.builders.fft">
+<tt class="descclassname">pyfftw.builders.</tt><tt class="descname">fft</tt><big>(</big><em>a</em>, <em>n=None</em>, <em>axis=-1</em>, <em>overwrite_input=False</em>, <em>planner_effort='FFTW_MEASURE'</em>, <em>threads=1</em>, <em>auto_align_input=True</em>, <em>auto_contiguous=True</em>, <em>avoid_copy=False</em><big>)</big><a class="headerlink" href="#pyfftw.builders.fft" title="Permalink to this definition">¶</a></dt>
+<dd><p>Return a <a class="reference internal" href="../pyfftw.html#pyfftw.FFTW" title="pyfftw.FFTW"><tt class="xref py py-class docutils literal"><span class="pre">pyfftw.FFTW</span></tt></a> object representing a 1D FFT.</p>
+<p>The first three arguments are as per <a class="reference external" href="http://docs.scipy.org/doc/numpy/reference/generated/numpy.fft.fft.html#numpy.fft.fft" title="(in NumPy v1.7)"><tt class="xref py py-func docutils literal"><span class="pre">numpy.fft.fft()</span></tt></a>; 
+the rest of the arguments are documented 
+<a class="reference internal" href="#builders-args"><em>in the module docs</em></a>.</p>
+</dd></dl>
+
+<dl class="function">
+<dt id="pyfftw.builders.ifft">
+<tt class="descclassname">pyfftw.builders.</tt><tt class="descname">ifft</tt><big>(</big><em>a</em>, <em>n=None</em>, <em>axis=-1</em>, <em>overwrite_input=False</em>, <em>planner_effort='FFTW_MEASURE'</em>, <em>threads=1</em>, <em>auto_align_input=True</em>, <em>auto_contiguous=True</em>, <em>avoid_copy=False</em><big>)</big><a class="headerlink" href="#pyfftw.builders.ifft" title="Permalink to this definition">¶</a></dt>
+<dd><p>Return a <a class="reference internal" href="../pyfftw.html#pyfftw.FFTW" title="pyfftw.FFTW"><tt class="xref py py-class docutils literal"><span class="pre">pyfftw.FFTW</span></tt></a> object representing a 1D 
+inverse FFT.</p>
+<p>The first three arguments are as per <a class="reference external" href="http://docs.scipy.org/doc/numpy/reference/generated/numpy.fft.ifft.html#numpy.fft.ifft" title="(in NumPy v1.7)"><tt class="xref py py-func docutils literal"><span class="pre">numpy.fft.ifft()</span></tt></a>; 
+the rest of the arguments are documented 
+<a class="reference internal" href="#builders-args"><em>in the module docs</em></a>.</p>
+</dd></dl>
+
+<dl class="function">
+<dt id="pyfftw.builders.fft2">
+<tt class="descclassname">pyfftw.builders.</tt><tt class="descname">fft2</tt><big>(</big><em>a</em>, <em>s=None</em>, <em>axes=(-2</em>, <em>-1)</em>, <em>overwrite_input=False</em>, <em>planner_effort='FFTW_MEASURE'</em>, <em>threads=1</em>, <em>auto_align_input=True</em>, <em>auto_contiguous=True</em>, <em>avoid_copy=False</em><big>)</big><a class="headerlink" href="#pyfftw.builders.fft2" title="Permalink to this definition">¶</a></dt>
+<dd><p>Return a <a class="reference internal" href="../pyfftw.html#pyfftw.FFTW" title="pyfftw.FFTW"><tt class="xref py py-class docutils literal"><span class="pre">pyfftw.FFTW</span></tt></a> object representing a 2D FFT.</p>
+<p>The first three arguments are as per <a class="reference external" href="http://docs.scipy.org/doc/numpy/reference/generated/numpy.fft.fft2.html#numpy.fft.fft2" title="(in NumPy v1.7)"><tt class="xref py py-func docutils literal"><span class="pre">numpy.fft.fft2()</span></tt></a>; 
+the rest of the arguments are documented 
+<a class="reference internal" href="#builders-args"><em>in the module docs</em></a>.</p>
+</dd></dl>
+
+<dl class="function">
+<dt id="pyfftw.builders.ifft2">
+<tt class="descclassname">pyfftw.builders.</tt><tt class="descname">ifft2</tt><big>(</big><em>a</em>, <em>s=None</em>, <em>axes=(-2</em>, <em>-1)</em>, <em>overwrite_input=False</em>, <em>planner_effort='FFTW_MEASURE'</em>, <em>threads=1</em>, <em>auto_align_input=True</em>, <em>auto_contiguous=True</em>, <em>avoid_copy=False</em><big>)</big><a class="headerlink" href="#pyfftw.builders.ifft2" title="Permalink to this definition">¶</a></dt>
+<dd><p>Return a <a class="reference internal" href="../pyfftw.html#pyfftw.FFTW" title="pyfftw.FFTW"><tt class="xref py py-class docutils literal"><span class="pre">pyfftw.FFTW</span></tt></a> object representing a 
+2D inverse FFT.</p>
+<p>The first three arguments are as per <a class="reference external" href="http://docs.scipy.org/doc/numpy/reference/generated/numpy.fft.ifft2.html#numpy.fft.ifft2" title="(in NumPy v1.7)"><tt class="xref py py-func docutils literal"><span class="pre">numpy.fft.ifft2()</span></tt></a>; 
+the rest of the arguments are documented 
+<a class="reference internal" href="#builders-args"><em>in the module docs</em></a>.</p>
+</dd></dl>
+
+<dl class="function">
+<dt id="pyfftw.builders.fftn">
+<tt class="descclassname">pyfftw.builders.</tt><tt class="descname">fftn</tt><big>(</big><em>a</em>, <em>s=None</em>, <em>axes=None</em>, <em>overwrite_input=False</em>, <em>planner_effort='FFTW_MEASURE'</em>, <em>threads=1</em>, <em>auto_align_input=True</em>, <em>auto_contiguous=True</em>, <em>avoid_copy=False</em><big>)</big><a class="headerlink" href="#pyfftw.builders.fftn" title="Permalink to this definition">¶</a></dt>
+<dd><p>Return a <a class="reference internal" href="../pyfftw.html#pyfftw.FFTW" title="pyfftw.FFTW"><tt class="xref py py-class docutils literal"><span class="pre">pyfftw.FFTW</span></tt></a> object representing a n-D FFT.</p>
+<p>The first three arguments are as per <a class="reference external" href="http://docs.scipy.org/doc/numpy/reference/generated/numpy.fft.fftn.html#numpy.fft.fftn" title="(in NumPy v1.7)"><tt class="xref py py-func docutils literal"><span class="pre">numpy.fft.fftn()</span></tt></a>; 
+the rest of the arguments are documented 
+<a class="reference internal" href="#builders-args"><em>in the module docs</em></a>.</p>
+</dd></dl>
+
+<dl class="function">
+<dt id="pyfftw.builders.ifftn">
+<tt class="descclassname">pyfftw.builders.</tt><tt class="descname">ifftn</tt><big>(</big><em>a</em>, <em>s=None</em>, <em>axes=None</em>, <em>overwrite_input=False</em>, <em>planner_effort='FFTW_MEASURE'</em>, <em>threads=1</em>, <em>auto_align_input=True</em>, <em>auto_contiguous=True</em>, <em>avoid_copy=False</em><big>)</big><a class="headerlink" href="#pyfftw.builders.ifftn" title="Permalink to this definition">¶</a></dt>
+<dd><p>Return a <a class="reference internal" href="../pyfftw.html#pyfftw.FFTW" title="pyfftw.FFTW"><tt class="xref py py-class docutils literal"><span class="pre">pyfftw.FFTW</span></tt></a> object representing an n-D 
+inverse FFT.</p>
+<p>The first three arguments are as per <a class="reference external" href="http://docs.scipy.org/doc/numpy/reference/generated/numpy.fft.ifftn.html#numpy.fft.ifftn" title="(in NumPy v1.7)"><tt class="xref py py-func docutils literal"><span class="pre">numpy.fft.ifftn()</span></tt></a>; 
+the rest of the arguments are documented 
+<a class="reference internal" href="#builders-args"><em>in the module docs</em></a>.</p>
+</dd></dl>
+
+<dl class="function">
+<dt id="pyfftw.builders.rfft">
+<tt class="descclassname">pyfftw.builders.</tt><tt class="descname">rfft</tt><big>(</big><em>a</em>, <em>n=None</em>, <em>axis=-1</em>, <em>overwrite_input=False</em>, <em>planner_effort='FFTW_MEASURE'</em>, <em>threads=1</em>, <em>auto_align_input=True</em>, <em>auto_contiguous=True</em>, <em>avoid_copy=False</em><big>)</big><a class="headerlink" href="#pyfftw.builders.rfft" title="Permalink to this definition">¶</a></dt>
+<dd><p>Return a <a class="reference internal" href="../pyfftw.html#pyfftw.FFTW" title="pyfftw.FFTW"><tt class="xref py py-class docutils literal"><span class="pre">pyfftw.FFTW</span></tt></a> object representing a 1D 
+real FFT.</p>
+<p>The first three arguments are as per <a class="reference external" href="http://docs.scipy.org/doc/numpy/reference/generated/numpy.fft.rfft.html#numpy.fft.rfft" title="(in NumPy v1.7)"><tt class="xref py py-func docutils literal"><span class="pre">numpy.fft.rfft()</span></tt></a>; 
+the rest of the arguments are documented 
+<a class="reference internal" href="#builders-args"><em>in the module docs</em></a>.</p>
+</dd></dl>
+
+<dl class="function">
+<dt id="pyfftw.builders.irfft">
+<tt class="descclassname">pyfftw.builders.</tt><tt class="descname">irfft</tt><big>(</big><em>a</em>, <em>n=None</em>, <em>axis=-1</em>, <em>overwrite_input=False</em>, <em>planner_effort='FFTW_MEASURE'</em>, <em>threads=1</em>, <em>auto_align_input=True</em>, <em>auto_contiguous=True</em>, <em>avoid_copy=False</em><big>)</big><a class="headerlink" href="#pyfftw.builders.irfft" title="Permalink to this definition">¶</a></dt>
+<dd><p>Return a <a class="reference internal" href="../pyfftw.html#pyfftw.FFTW" title="pyfftw.FFTW"><tt class="xref py py-class docutils literal"><span class="pre">pyfftw.FFTW</span></tt></a> object representing a 1D 
+real inverse FFT.</p>
+<p>The first three arguments are as per <a class="reference external" href="http://docs.scipy.org/doc/numpy/reference/generated/numpy.fft.irfft.html#numpy.fft.irfft" title="(in NumPy v1.7)"><tt class="xref py py-func docutils literal"><span class="pre">numpy.fft.irfft()</span></tt></a>; 
+the rest of the arguments are documented 
+<a class="reference internal" href="#builders-args"><em>in the module docs</em></a>.</p>
+</dd></dl>
+
+<dl class="function">
+<dt id="pyfftw.builders.rfft2">
+<tt class="descclassname">pyfftw.builders.</tt><tt class="descname">rfft2</tt><big>(</big><em>a</em>, <em>s=None</em>, <em>axes=(-2</em>, <em>-1)</em>, <em>overwrite_input=False</em>, <em>planner_effort='FFTW_MEASURE'</em>, <em>threads=1</em>, <em>auto_align_input=True</em>, <em>auto_contiguous=True</em>, <em>avoid_copy=False</em><big>)</big><a class="headerlink" href="#pyfftw.builders.rfft2" title="Permalink to this definition">¶</a></dt>
+<dd><p>Return a <a class="reference internal" href="../pyfftw.html#pyfftw.FFTW" title="pyfftw.FFTW"><tt class="xref py py-class docutils literal"><span class="pre">pyfftw.FFTW</span></tt></a> object representing a 2D 
+real FFT.</p>
+<p>The first three arguments are as per <a class="reference external" href="http://docs.scipy.org/doc/numpy/reference/generated/numpy.fft.rfft2.html#numpy.fft.rfft2" title="(in NumPy v1.7)"><tt class="xref py py-func docutils literal"><span class="pre">numpy.fft.rfft2()</span></tt></a>; 
+the rest of the arguments are documented 
+<a class="reference internal" href="#builders-args"><em>in the module docs</em></a>.</p>
+</dd></dl>
+
+<dl class="function">
+<dt id="pyfftw.builders.irfft2">
+<tt class="descclassname">pyfftw.builders.</tt><tt class="descname">irfft2</tt><big>(</big><em>a</em>, <em>s=None</em>, <em>axes=(-2</em>, <em>-1)</em>, <em>planner_effort='FFTW_MEASURE'</em>, <em>threads=1</em>, <em>auto_align_input=True</em>, <em>auto_contiguous=True</em>, <em>avoid_copy=False</em><big>)</big><a class="headerlink" href="#pyfftw.builders.irfft2" title="Permalink to this definition">¶</a></dt>
+<dd><p>Return a <a class="reference internal" href="../pyfftw.html#pyfftw.FFTW" title="pyfftw.FFTW"><tt class="xref py py-class docutils literal"><span class="pre">pyfftw.FFTW</span></tt></a> object representing a 2D 
+real inverse FFT.</p>
+<p>The first three arguments are as per <a class="reference external" href="http://docs.scipy.org/doc/numpy/reference/generated/numpy.fft.irfft2.html#numpy.fft.irfft2" title="(in NumPy v1.7)"><tt class="xref py py-func docutils literal"><span class="pre">numpy.fft.irfft2()</span></tt></a>; 
+the rest of the arguments are documented 
+<a class="reference internal" href="#builders-args"><em>in the module docs</em></a>.</p>
+</dd></dl>
+
+<dl class="function">
+<dt id="pyfftw.builders.rfftn">
+<tt class="descclassname">pyfftw.builders.</tt><tt class="descname">rfftn</tt><big>(</big><em>a</em>, <em>s=None</em>, <em>axes=None</em>, <em>overwrite_input=False</em>, <em>planner_effort='FFTW_MEASURE'</em>, <em>threads=1</em>, <em>auto_align_input=True</em>, <em>auto_contiguous=True</em>, <em>avoid_copy=False</em><big>)</big><a class="headerlink" href="#pyfftw.builders.rfftn" title="Permalink to this definition">¶</a></dt>
+<dd><p>Return a <a class="reference internal" href="../pyfftw.html#pyfftw.FFTW" title="pyfftw.FFTW"><tt class="xref py py-class docutils literal"><span class="pre">pyfftw.FFTW</span></tt></a> object representing an n-D 
+real FFT.</p>
+<p>The first three arguments are as per <a class="reference external" href="http://docs.scipy.org/doc/numpy/reference/generated/numpy.fft.rfftn.html#numpy.fft.rfftn" title="(in NumPy v1.7)"><tt class="xref py py-func docutils literal"><span class="pre">numpy.fft.rfftn()</span></tt></a>; 
+the rest of the arguments are documented 
+<a class="reference internal" href="#builders-args"><em>in the module docs</em></a>.</p>
+</dd></dl>
+
+<dl class="function">
+<dt id="pyfftw.builders.irfftn">
+<tt class="descclassname">pyfftw.builders.</tt><tt class="descname">irfftn</tt><big>(</big><em>a</em>, <em>s=None</em>, <em>axes=None</em>, <em>planner_effort='FFTW_MEASURE'</em>, <em>threads=1</em>, <em>auto_align_input=True</em>, <em>auto_contiguous=True</em>, <em>avoid_copy=False</em><big>)</big><a class="headerlink" href="#pyfftw.builders.irfftn" title="Permalink to this definition">¶</a></dt>
+<dd><p>Return a <a class="reference internal" href="../pyfftw.html#pyfftw.FFTW" title="pyfftw.FFTW"><tt class="xref py py-class docutils literal"><span class="pre">pyfftw.FFTW</span></tt></a> object representing an n-D 
+real inverse FFT.</p>
+<p>The first three arguments are as per <a class="reference external" href="http://docs.scipy.org/doc/numpy/reference/generated/numpy.fft.rfftn.html#numpy.fft.rfftn" title="(in NumPy v1.7)"><tt class="xref py py-func docutils literal"><span class="pre">numpy.fft.rfftn()</span></tt></a>; 
+the rest of the arguments are documented 
+<a class="reference internal" href="#builders-args"><em>in the module docs</em></a>.</p>
+</dd></dl>
+
+</div>
+</div>
+
+
+          </div>
+        </div>
+      </div>
+      <div class="sphinxsidebar">
+        <div class="sphinxsidebarwrapper">
+  <h3><a href="../../index.html">Table Of Contents</a></h3>
+  <ul>
+<li><a class="reference internal" href="#"><tt class="docutils literal"><span class="pre">pyfftw.builders</span></tt> - Get <tt class="docutils literal"><span class="pre">FFTW</span></tt> objects using a <tt class="xref py py-mod docutils literal"><span class="pre">numpy.fft</span></tt> like interface</a><ul>
+<li><a class="reference internal" href="#overview">Overview</a></li>
+<li><a class="reference internal" href="#supported-functions-and-caveats">Supported Functions and Caveats</a></li>
+<li><a class="reference internal" href="#additional-arguments">Additional Arguments</a></li>
+<li><a class="reference internal" href="#the-functions">The Functions</a></li>
+</ul>
+</li>
+</ul>
+
+  <h4>Previous topic</h4>
+  <p class="topless"><a href="../pyfftw.html"
+                        title="previous chapter"><tt class="docutils literal"><span class="pre">pyfftw</span></tt> - The core</a></p>
+  <h4>Next topic</h4>
+  <p class="topless"><a href="_utils.html"
+                        title="next chapter"><tt class="docutils literal docutils literal"><span class="pre">pyfftw.builders._utils</span></tt> - Helper functions for <tt class="docutils literal docutils literal"><span class="pre">pyfftw.builders</span></tt></a></p>
+  <h3>This Page</h3>
+  <ul class="this-page-menu">
+    <li><a href="../../_sources/pyfftw/builders/builders.txt"
+           rel="nofollow">Show Source</a></li>
+  </ul>
+<div id="searchbox" style="display: none">
+  <h3>Quick search</h3>
+    <form class="search" action="../../search.html" method="get">
+      <input type="text" name="q" />
+      <input type="submit" value="Go" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    <p class="searchtip" style="font-size: 90%">
+    Enter search terms or a module, class or function name.
+    </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../../genindex.html" title="General Index"
+             >index</a></li>
+        <li class="right" >
+          <a href="../../py-modindex.html" title="Python Module Index"
+             >modules</a> |</li>
+        <li class="right" >
+          <a href="_utils.html" title="pyfftw.builders._utils - Helper functions for pyfftw.builders"
+             >next</a> |</li>
+        <li class="right" >
+          <a href="../pyfftw.html" title="pyfftw - The core"
+             >previous</a> |</li>
+        <li><a href="../../index.html">pyFFTW 0.9.2 documentation</a> »</li>
+          <li><a href="../../sphinx/api.html" >API Reference</a> »</li> 
+      </ul>
+    </div>
+    <div class="footer">
+        © Copyright 2013, Henry Gomersall.
+      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
+    </div>
+  </body>
+</html>
\ No newline at end of file
diff --git a/docs/html/pyfftw/interfaces/interfaces.html b/docs/html/pyfftw/interfaces/interfaces.html
new file mode 100644
index 0000000..fb5fb43
--- /dev/null
+++ b/docs/html/pyfftw/interfaces/interfaces.html
@@ -0,0 +1,379 @@
+
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    
+    <title>pyfftw.interfaces - Drop in replacements for other FFT implementations — pyFFTW 0.9.2 documentation</title>
+    
+    <link rel="stylesheet" href="../../_static/default.css" type="text/css" />
+    <link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
+    
+    <script type="text/javascript">
+      var DOCUMENTATION_OPTIONS = {
+        URL_ROOT:    '../../',
+        VERSION:     '0.9.2',
+        COLLAPSE_INDEX: false,
+        FILE_SUFFIX: '.html',
+        HAS_SOURCE:  true
+      };
+    </script>
+    <script type="text/javascript" src="../../_static/jquery.js"></script>
+    <script type="text/javascript" src="../../_static/underscore.js"></script>
+    <script type="text/javascript" src="../../_static/doctools.js"></script>
+    <link rel="top" title="pyFFTW 0.9.2 documentation" href="../../index.html" />
+    <link rel="up" title="API Reference" href="../../sphinx/api.html" />
+    <link rel="next" title="numpy.fft interface" href="numpy_fft.html" />
+    <link rel="prev" title="pyfftw.builders._utils - Helper functions for pyfftw.builders" href="../builders/_utils.html" /> 
+  </head>
+  <body>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../../genindex.html" title="General Index"
+             accesskey="I">index</a></li>
+        <li class="right" >
+          <a href="../../py-modindex.html" title="Python Module Index"
+             >modules</a> |</li>
+        <li class="right" >
+          <a href="numpy_fft.html" title="numpy.fft interface"
+             accesskey="N">next</a> |</li>
+        <li class="right" >
+          <a href="../builders/_utils.html" title="pyfftw.builders._utils - Helper functions for pyfftw.builders"
+             accesskey="P">previous</a> |</li>
+        <li><a href="../../index.html">pyFFTW 0.9.2 documentation</a> »</li>
+          <li><a href="../../sphinx/api.html" accesskey="U">API Reference</a> »</li> 
+      </ul>
+    </div>  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          <div class="body">
+            
+  <div class="section" id="pyfftw-interfaces-drop-in-replacements-for-other-fft-implementations">
+<h1><tt class="docutils literal"><span class="pre">pyfftw.interfaces</span></tt> - Drop in replacements for other FFT implementations<a class="headerlink" href="#pyfftw-interfaces-drop-in-replacements-for-other-fft-implementations" title="Permalink to this headline">¶</a></h1>
+<div class="toctree-wrapper compound">
+</div>
+<span class="target" id="module-pyfftw.interfaces"></span><p>The <a class="reference internal" href="#module-pyfftw.interfaces" title="pyfftw.interfaces"><tt class="xref py py-mod docutils literal"><span class="pre">pyfftw.interfaces</span></tt></a> package provides interfaces to <a class="reference internal" href="../pyfftw.html#module-pyfftw" title="pyfftw"><tt class="xref py py-mod docutils literal"><span class="pre">pyfftw</span></tt></a>
+that implement the API of other, more commonly used FFT libraries;
+specifically <a class="reference external" href="http://docs.scipy.org/doc/numpy/reference/routines.fft.html#numpy.fft" title="(in NumPy v1.7)"><tt class="xref py py-mod docutils literal"><span class="pre">numpy.fft</span></tt></a> and <a class="reference external" href="http://docs.scipy.org/doc/scipy/reference/fftpack.html#scipy.fftpack" title="(in SciPy v0.12)"><tt class="xref py py-mod docutils literal"><span class="pre">scipy.fftpack</span></tt></a>. The
+intention is to satisfy two clear use cases:</p>
+<ol class="arabic simple">
+<li>Simple, clean and well established interfaces to using <a class="reference internal" href="../pyfftw.html#module-pyfftw" title="pyfftw"><tt class="xref py py-mod docutils literal"><span class="pre">pyfftw</span></tt></a>,
+removing the requirement for users to know or understand about creating and
+using <a class="reference internal" href="../pyfftw.html#pyfftw.FFTW" title="pyfftw.FFTW"><tt class="xref py py-class docutils literal"><span class="pre">pyfftw.FFTW</span></tt></a> objects, whilst still benefiting from most of the
+speed benefits of FFTW.</li>
+<li>A library that can be dropped into code that is already written to
+use a supported FFT library, with no significant change to the existing
+code. The power of python allows this to be done at runtime to a third
+party library, without changing any of that library’s code.</li>
+</ol>
+<p>The <a class="reference internal" href="#module-pyfftw.interfaces" title="pyfftw.interfaces"><tt class="xref py py-mod docutils literal"><span class="pre">pyfftw.interfaces</span></tt></a> implementation is designed to sacrifice a small
+amount of the flexibility compared to accessing the <a class="reference internal" href="../pyfftw.html#pyfftw.FFTW" title="pyfftw.FFTW"><tt class="xref py py-class docutils literal"><span class="pre">pyfftw.FFTW</span></tt></a>
+object directly, but implements a reasonable set of defaults and optional
+tweaks that should satisfy most situations.</p>
+<p>The precision of the transform that is used is selected from the array that 
+is passed in, defaulting to double precision if any type conversion is 
+required.</p>
+<p>This module works by generating a <a class="reference internal" href="../pyfftw.html#pyfftw.FFTW" title="pyfftw.FFTW"><tt class="xref py py-class docutils literal"><span class="pre">pyfftw.FFTW</span></tt></a> object behind the
+scenes using the <a class="reference internal" href="../builders/builders.html#module-pyfftw.builders" title="pyfftw.builders"><tt class="xref py py-mod docutils literal"><span class="pre">pyfftw.builders</span></tt></a> interface, which is then executed.
+There is therefore a potentially substantial overhead when a new plan needs
+to be created. This is down to FFTW’s internal planner process.
+After a specific transform has been planned once, subsequent calls in which
+the input array is equivalent will be much faster, though still not without
+potentially significant overhead. <em>This</em> overhead can be largely alleviated by
+enabling the <a class="reference internal" href="#module-pyfftw.interfaces.cache" title="pyfftw.interfaces.cache"><tt class="xref py py-mod docutils literal"><span class="pre">pyfftw.interfaces.cache</span></tt></a> functionality. However, even when
+the cache is used, very small transforms may suffer a significant relative
+slow-down not present when accessing <a class="reference internal" href="../pyfftw.html#pyfftw.FFTW" title="pyfftw.FFTW"><tt class="xref py py-mod docutils literal"><span class="pre">pyfftw.FFTW</span></tt></a> directly (because the
+transform time can be negligibly small compared to the fixed
+<a class="reference internal" href="#module-pyfftw.interfaces" title="pyfftw.interfaces"><tt class="xref py py-mod docutils literal"><span class="pre">pyfftw.interfaces</span></tt></a> overhead).</p>
+<p>In addition, potentially extra copies of the input array might be made.</p>
+<p>If speed or memory conservation is of absolutely paramount importance, the
+suggestion is to use <a class="reference internal" href="../pyfftw.html#pyfftw.FFTW" title="pyfftw.FFTW"><tt class="xref py py-mod docutils literal"><span class="pre">pyfftw.FFTW</span></tt></a> (which provides better control over
+copies and so on), either directly or through <a class="reference internal" href="../builders/builders.html#module-pyfftw.builders" title="pyfftw.builders"><tt class="xref py py-mod docutils literal"><span class="pre">pyfftw.builders</span></tt></a>. As
+always, experimentation is the best guide to optimisation.</p>
+<p>In practice, this means something like the following (taking
+<a class="reference internal" href="numpy_fft.html#module-pyfftw.interfaces.numpy_fft" title="pyfftw.interfaces.numpy_fft"><tt class="xref py py-mod docutils literal"><span class="pre">numpy_fft</span></tt></a> as an example):</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="kn">import</span> <span class="nn">pyfftw</span><span class="o">,</span> <span class="nn">numpy</span>
+<span class="gp">>>> </span><span class="n">a</span> <span class="o">=</span> <span class="n">pyfftw</span><span class="o">.</span><span class="n">n_byte_align_empty</span><span class="p">((</span><span class="mi">128</span><span class="p">,</span> <span class="mi">64</span><span class="p">),</span> <span class="mi">16</span><span class="p">,</span> <span class="n">dtype</span><span class="o">=</span><span class="s">'complex64'</span><span class="p">)</span>
+<span class="gp">>>> </span><span class="n">a</span><span class="p">[:]</span> <span class="o">=</span> <span class="n">numpy</span><span class="o">.</span><span class="n">random</span><span class="o">.</span><span class="n">randn</span><span class="p">(</span><span class="o">*</span><span class="n">a</span><span class="o">.</span><span class="n">shape</span><span class="p">)</span> <span class="o">+</span> <span class="mi">1j</span><span class="o">*</span><span class="n">numpy< [...]
+<span class="gp">>>> </span><span class="n">fft_a</span> <span class="o">=</span> <span class="n">pyfftw</span><span class="o">.</span><span class="n">interfaces</span><span class="o">.</span><span class="n">numpy_fft</span><span class="o">.</span><span class="n">fft2</span><span class="p">(</span><span class="n">a</span><span class="p">)</span> <span class="c"># Will need to plan</span>
+</pre></div>
+</div>
+<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">b</span> <span class="o">=</span> <span class="n">pyfftw</span><span class="o">.</span><span class="n">n_byte_align_empty</span><span class="p">((</span><span class="mi">128</span><span class="p">,</span> <span class="mi">64</span><span class="p">),</span> <span class="mi">16</span><span class="p">,</span> <span class="n">dtype</span><span class="o">=</span><span class="s">' [...]
+<span class="gp">>>> </span><span class="n">b</span><span class="p">[:]</span> <span class="o">=</span> <span class="n">a</span>
+<span class="gp">>>> </span><span class="n">fft_b</span> <span class="o">=</span> <span class="n">pyfftw</span><span class="o">.</span><span class="n">interfaces</span><span class="o">.</span><span class="n">numpy_fft</span><span class="o">.</span><span class="n">fft2</span><span class="p">(</span><span class="n">b</span><span class="p">)</span> <span class="c"># Already planned, so faster</span>
+</pre></div>
+</div>
+<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">c</span> <span class="o">=</span> <span class="n">pyfftw</span><span class="o">.</span><span class="n">n_byte_align_empty</span><span class="p">(</span><span class="mi">132</span><span class="p">,</span> <span class="mi">16</span><span class="p">,</span> <span class="n">dtype</span><span class="o">=</span><span class="s">'complex128'</span><span class="p">)</span>
+<span class="gp">>>> </span><span class="n">fft_c</span> <span class="o">=</span> <span class="n">pyfftw</span><span class="o">.</span><span class="n">interfaces</span><span class="o">.</span><span class="n">numpy_fft</span><span class="o">.</span><span class="n">fft</span><span class="p">(</span><span class="n">c</span><span class="p">)</span> <span class="c"># Needs a new plan</span>
+<span class="gp">>>> </span><span class="n">c</span><span class="p">[:]</span> <span class="o">=</span> <span class="n">numpy</span><span class="o">.</span><span class="n">random</span><span class="o">.</span><span class="n">randn</span><span class="p">(</span><span class="o">*</span><span class="n">c</span><span class="o">.</span><span class="n">shape</span><span class="p">)</span> <span class="o">+</span> <span class="mi">1j</span><span class="o">*</span><span class="n">numpy< [...]
+</pre></div>
+</div>
+<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">pyfftw</span><span class="o">.</span><span class="n">interfaces</span><span class="o">.</span><span class="n">cache</span><span class="o">.</span><span class="n">enable</span><span class="p">()</span>
+<span class="gp">>>> </span><span class="n">fft_a</span> <span class="o">=</span> <span class="n">pyfftw</span><span class="o">.</span><span class="n">interfaces</span><span class="o">.</span><span class="n">numpy_fft</span><span class="o">.</span><span class="n">fft2</span><span class="p">(</span><span class="n">a</span><span class="p">)</span> <span class="c"># still planned</span>
+<span class="gp">>>> </span><span class="n">fft_b</span> <span class="o">=</span> <span class="n">pyfftw</span><span class="o">.</span><span class="n">interfaces</span><span class="o">.</span><span class="n">numpy_fft</span><span class="o">.</span><span class="n">fft2</span><span class="p">(</span><span class="n">b</span><span class="p">)</span> <span class="c"># much faster, from the cache</span>
+</pre></div>
+</div>
+<p>The usual wisdom import and export functions work well for the case where
+the initial plan might be prohibitively expensive. Just use
+<a class="reference internal" href="../pyfftw.html#pyfftw.export_wisdom" title="pyfftw.export_wisdom"><tt class="xref py py-func docutils literal"><span class="pre">pyfftw.export_wisdom()</span></tt></a> and <a class="reference internal" href="../pyfftw.html#pyfftw.import_wisdom" title="pyfftw.import_wisdom"><tt class="xref py py-func docutils literal"><span class="pre">pyfftw.import_wisdom()</span></tt></a> as needed after
+having performed the transform once.</p>
+<div class="section" id="implemented-functions">
+<h2>Implemented Functions<a class="headerlink" href="#implemented-functions" title="Permalink to this headline">¶</a></h2>
+<p>The implemented functions are listed below. <a class="reference external" href="http://docs.scipy.org/doc/numpy/reference/routines.fft.html#numpy.fft" title="(in NumPy v1.7)"><tt class="xref py py-mod docutils literal"><span class="pre">numpy.fft</span></tt></a> is implemented
+by <a class="reference internal" href="numpy_fft.html#module-pyfftw.interfaces.numpy_fft" title="pyfftw.interfaces.numpy_fft"><tt class="xref py py-mod docutils literal"><span class="pre">pyfftw.interfaces.numpy_fft</span></tt></a> and <a class="reference external" href="http://docs.scipy.org/doc/scipy/reference/fftpack.html#scipy.fftpack" title="(in SciPy v0.12)"><tt class="xref py py-mod docutils literal"><span class="pre">scipy.fftpack</span></tt></a> by
+<a class="reference internal" href="scipy_fftpack.html#module-pyfftw.interfaces.scipy_fftpack" title="pyfftw.interfaces.scipy_fftpack"><tt class="xref py py-mod docutils literal"><span class="pre">pyfftw.interfaces.scipy_fftpack</span></tt></a>. All the implemented functions are
+extended by the use of additional arguments, which are 
+<a class="reference internal" href="#interfaces-additional-args"><em>documented below</em></a>.</p>
+<p>Not all the functions provided by <a class="reference external" href="http://docs.scipy.org/doc/numpy/reference/routines.fft.html#numpy.fft" title="(in NumPy v1.7)"><tt class="xref py py-mod docutils literal"><span class="pre">numpy.fft</span></tt></a> and <a class="reference external" href="http://docs.scipy.org/doc/scipy/reference/fftpack.html#scipy.fftpack" title="(in SciPy v0.12)"><tt class="xref py py-mod docutils literal"><span class="pre">scipy.fftpack</span></tt></a>
+are implemented by <a class="reference internal" href="#module-pyfftw.interfaces" title="pyfftw.interfaces"><tt class="xref py py-mod docutils literal"><span class="pre">pyfftw.interfaces</span></tt></a>. In the case where a function is
+not implemented, the function is imported into the namespace from the
+corresponding library. This means that all the documented functionality of the
+library <em>is</em> provided through <a class="reference internal" href="#module-pyfftw.interfaces" title="pyfftw.interfaces"><tt class="xref py py-mod docutils literal"><span class="pre">pyfftw.interfaces</span></tt></a>.</p>
+<p>One known caveat is that repeated axes are potentially handled 
+differently. This is certainly the case for <a class="reference external" href="http://docs.scipy.org/doc/numpy/reference/routines.fft.html#numpy.fft" title="(in NumPy v1.7)"><tt class="xref py py-mod docutils literal"><span class="pre">numpy.fft</span></tt></a> and probably
+also true for <a class="reference external" href="http://docs.scipy.org/doc/scipy/reference/fftpack.html#scipy.fftpack" title="(in SciPy v0.12)"><tt class="xref py py-mod docutils literal"><span class="pre">scipy.fftpack</span></tt></a> (though it is not defined in the 
+docs); axes that are repeated in the axes argument are considered only once, as 
+compared to <a class="reference external" href="http://docs.scipy.org/doc/numpy/reference/routines.fft.html#numpy.fft" title="(in NumPy v1.7)"><tt class="xref py py-mod docutils literal"><span class="pre">numpy.fft</span></tt></a> in which repeated axes results in the DFT 
+being taken along that axes as many times as the axis occurs.</p>
+<div class="section" id="numpy-fft">
+<h3><a class="reference internal" href="numpy_fft.html#module-pyfftw.interfaces.numpy_fft" title="pyfftw.interfaces.numpy_fft"><tt class="xref py py-mod docutils literal"><span class="pre">numpy_fft</span></tt></a><a class="headerlink" href="#numpy-fft" title="Permalink to this headline">¶</a></h3>
+<ul class="simple">
+<li><a class="reference internal" href="numpy_fft.html#pyfftw.interfaces.numpy_fft.fft" title="pyfftw.interfaces.numpy_fft.fft"><tt class="xref py py-func docutils literal"><span class="pre">pyfftw.interfaces.numpy_fft.fft()</span></tt></a></li>
+<li><a class="reference internal" href="numpy_fft.html#pyfftw.interfaces.numpy_fft.ifft" title="pyfftw.interfaces.numpy_fft.ifft"><tt class="xref py py-func docutils literal"><span class="pre">pyfftw.interfaces.numpy_fft.ifft()</span></tt></a></li>
+<li><a class="reference internal" href="numpy_fft.html#pyfftw.interfaces.numpy_fft.fft2" title="pyfftw.interfaces.numpy_fft.fft2"><tt class="xref py py-func docutils literal"><span class="pre">pyfftw.interfaces.numpy_fft.fft2()</span></tt></a></li>
+<li><a class="reference internal" href="numpy_fft.html#pyfftw.interfaces.numpy_fft.ifft2" title="pyfftw.interfaces.numpy_fft.ifft2"><tt class="xref py py-func docutils literal"><span class="pre">pyfftw.interfaces.numpy_fft.ifft2()</span></tt></a></li>
+<li><a class="reference internal" href="numpy_fft.html#pyfftw.interfaces.numpy_fft.fftn" title="pyfftw.interfaces.numpy_fft.fftn"><tt class="xref py py-func docutils literal"><span class="pre">pyfftw.interfaces.numpy_fft.fftn()</span></tt></a></li>
+<li><a class="reference internal" href="numpy_fft.html#pyfftw.interfaces.numpy_fft.ifftn" title="pyfftw.interfaces.numpy_fft.ifftn"><tt class="xref py py-func docutils literal"><span class="pre">pyfftw.interfaces.numpy_fft.ifftn()</span></tt></a></li>
+<li><a class="reference internal" href="numpy_fft.html#pyfftw.interfaces.numpy_fft.rfft" title="pyfftw.interfaces.numpy_fft.rfft"><tt class="xref py py-func docutils literal"><span class="pre">pyfftw.interfaces.numpy_fft.rfft()</span></tt></a></li>
+<li><a class="reference internal" href="numpy_fft.html#pyfftw.interfaces.numpy_fft.irfft" title="pyfftw.interfaces.numpy_fft.irfft"><tt class="xref py py-func docutils literal"><span class="pre">pyfftw.interfaces.numpy_fft.irfft()</span></tt></a></li>
+<li><a class="reference internal" href="numpy_fft.html#pyfftw.interfaces.numpy_fft.rfft2" title="pyfftw.interfaces.numpy_fft.rfft2"><tt class="xref py py-func docutils literal"><span class="pre">pyfftw.interfaces.numpy_fft.rfft2()</span></tt></a></li>
+<li><a class="reference internal" href="numpy_fft.html#pyfftw.interfaces.numpy_fft.irfft2" title="pyfftw.interfaces.numpy_fft.irfft2"><tt class="xref py py-func docutils literal"><span class="pre">pyfftw.interfaces.numpy_fft.irfft2()</span></tt></a></li>
+<li><a class="reference internal" href="numpy_fft.html#pyfftw.interfaces.numpy_fft.rfftn" title="pyfftw.interfaces.numpy_fft.rfftn"><tt class="xref py py-func docutils literal"><span class="pre">pyfftw.interfaces.numpy_fft.rfftn()</span></tt></a></li>
+<li><a class="reference internal" href="numpy_fft.html#pyfftw.interfaces.numpy_fft.irfftn" title="pyfftw.interfaces.numpy_fft.irfftn"><tt class="xref py py-func docutils literal"><span class="pre">pyfftw.interfaces.numpy_fft.irfftn()</span></tt></a></li>
+</ul>
+</div>
+<div class="section" id="scipy-fftpack">
+<h3><a class="reference internal" href="scipy_fftpack.html#module-pyfftw.interfaces.scipy_fftpack" title="pyfftw.interfaces.scipy_fftpack"><tt class="xref py py-mod docutils literal"><span class="pre">scipy_fftpack</span></tt></a><a class="headerlink" href="#scipy-fftpack" title="Permalink to this headline">¶</a></h3>
+<ul class="simple">
+<li><a class="reference internal" href="scipy_fftpack.html#pyfftw.interfaces.scipy_fftpack.fft" title="pyfftw.interfaces.scipy_fftpack.fft"><tt class="xref py py-func docutils literal"><span class="pre">pyfftw.interfaces.scipy_fftpack.fft()</span></tt></a></li>
+<li><a class="reference internal" href="scipy_fftpack.html#pyfftw.interfaces.scipy_fftpack.ifft" title="pyfftw.interfaces.scipy_fftpack.ifft"><tt class="xref py py-func docutils literal"><span class="pre">pyfftw.interfaces.scipy_fftpack.ifft()</span></tt></a></li>
+<li><a class="reference internal" href="scipy_fftpack.html#pyfftw.interfaces.scipy_fftpack.fft2" title="pyfftw.interfaces.scipy_fftpack.fft2"><tt class="xref py py-func docutils literal"><span class="pre">pyfftw.interfaces.scipy_fftpack.fft2()</span></tt></a></li>
+<li><a class="reference internal" href="scipy_fftpack.html#pyfftw.interfaces.scipy_fftpack.ifft2" title="pyfftw.interfaces.scipy_fftpack.ifft2"><tt class="xref py py-func docutils literal"><span class="pre">pyfftw.interfaces.scipy_fftpack.ifft2()</span></tt></a></li>
+<li><a class="reference internal" href="scipy_fftpack.html#pyfftw.interfaces.scipy_fftpack.fftn" title="pyfftw.interfaces.scipy_fftpack.fftn"><tt class="xref py py-func docutils literal"><span class="pre">pyfftw.interfaces.scipy_fftpack.fftn()</span></tt></a></li>
+<li><a class="reference internal" href="scipy_fftpack.html#pyfftw.interfaces.scipy_fftpack.ifftn" title="pyfftw.interfaces.scipy_fftpack.ifftn"><tt class="xref py py-func docutils literal"><span class="pre">pyfftw.interfaces.scipy_fftpack.ifftn()</span></tt></a></li>
+<li><a class="reference internal" href="scipy_fftpack.html#pyfftw.interfaces.scipy_fftpack.rfft" title="pyfftw.interfaces.scipy_fftpack.rfft"><tt class="xref py py-func docutils literal"><span class="pre">pyfftw.interfaces.scipy_fftpack.rfft()</span></tt></a></li>
+<li><a class="reference internal" href="scipy_fftpack.html#pyfftw.interfaces.scipy_fftpack.irfft" title="pyfftw.interfaces.scipy_fftpack.irfft"><tt class="xref py py-func docutils literal"><span class="pre">pyfftw.interfaces.scipy_fftpack.irfft()</span></tt></a></li>
+</ul>
+</div>
+</div>
+<div class="section" id="additional-arguments">
+<span id="interfaces-additional-args"></span><h2>Additional Arguments<a class="headerlink" href="#additional-arguments" title="Permalink to this headline">¶</a></h2>
+<p>In addition to the equivalent arguments in <a class="reference external" href="http://docs.scipy.org/doc/numpy/reference/routines.fft.html#numpy.fft" title="(in NumPy v1.7)"><tt class="xref py py-mod docutils literal"><span class="pre">numpy.fft</span></tt></a> and
+<a class="reference external" href="http://docs.scipy.org/doc/scipy/reference/fftpack.html#scipy.fftpack" title="(in SciPy v0.12)"><tt class="xref py py-mod docutils literal"><span class="pre">scipy.fftpack</span></tt></a>, all these functions also add several additional
+arguments for finer control over the FFT. These additional arguments are 
+largely a subset of the 
+keyword arguments in <a class="reference internal" href="../builders/builders.html#module-pyfftw.builders" title="pyfftw.builders"><tt class="xref py py-mod docutils literal"><span class="pre">pyfftw.builders</span></tt></a> with a few exceptions and with
+different defaults.</p>
+<ul>
+<li><p class="first"><tt class="docutils literal"><span class="pre">overwrite_input</span></tt>: Whether or not the input array can be
+overwritten during the transform. This sometimes results in a faster
+algorithm being made available. It causes the <tt class="docutils literal"><span class="pre">'FFTW_DESTROY_INPUT'</span></tt>
+flag to be passed to the intermediate <a class="reference internal" href="../pyfftw.html#pyfftw.FFTW" title="pyfftw.FFTW"><tt class="xref py py-class docutils literal"><span class="pre">pyfftw.FFTW</span></tt></a> object.
+Unlike with <a class="reference internal" href="../builders/builders.html#module-pyfftw.builders" title="pyfftw.builders"><tt class="xref py py-mod docutils literal"><span class="pre">pyfftw.builders</span></tt></a>, this argument is included with
+<em>every</em> function in this package.</p>
+<p>In <a class="reference internal" href="scipy_fftpack.html#module-pyfftw.interfaces.scipy_fftpack" title="pyfftw.interfaces.scipy_fftpack"><tt class="xref py py-mod docutils literal"><span class="pre">scipy_fftpack</span></tt></a>, this argument is replaced
+by <tt class="docutils literal"><span class="pre">overwrite_x</span></tt>, to which it is equivalent (albeit at the same 
+position).</p>
+<p>The default is <tt class="docutils literal"><span class="pre">False</span></tt> to be consistent with <a class="reference external" href="http://docs.scipy.org/doc/numpy/reference/routines.fft.html#numpy.fft" title="(in NumPy v1.7)"><tt class="xref py py-mod docutils literal"><span class="pre">numpy.fft</span></tt></a>.</p>
+</li>
+<li><p class="first"><tt class="docutils literal"><span class="pre">planner_effort</span></tt>: A string dictating how much effort is spent 
+in planning the FFTW routines. This is passed to the creation
+of the intermediate <a class="reference internal" href="../pyfftw.html#pyfftw.FFTW" title="pyfftw.FFTW"><tt class="xref py py-class docutils literal"><span class="pre">pyfftw.FFTW</span></tt></a> object as an entry 
+in the flags list. They correspond to flags passed to the 
+<a class="reference internal" href="../pyfftw.html#pyfftw.FFTW" title="pyfftw.FFTW"><tt class="xref py py-class docutils literal"><span class="pre">pyfftw.FFTW</span></tt></a> object.</p>
+<p>The valid strings, in order of their increasing impact on the time 
+to compute  are:
+<tt class="docutils literal"><span class="pre">'FFTW_ESTIMATE'</span></tt>, <tt class="docutils literal"><span class="pre">'FFTW_MEASURE'</span></tt> (default), <tt class="docutils literal"><span class="pre">'FFTW_PATIENT'</span></tt>
+and <tt class="docutils literal"><span class="pre">'FFTW_EXHAUSTIVE'</span></tt>.</p>
+<p>The <a class="reference external" href="http://www.fftw.org/fftw3_doc/Words-of-Wisdom_002dSaving-Plans.html">Wisdom</a>
+that FFTW has accumulated or has loaded (through
+<a class="reference internal" href="../pyfftw.html#pyfftw.import_wisdom" title="pyfftw.import_wisdom"><tt class="xref py py-func docutils literal"><span class="pre">pyfftw.import_wisdom()</span></tt></a>) is used during the creation of
+<a class="reference internal" href="../pyfftw.html#pyfftw.FFTW" title="pyfftw.FFTW"><tt class="xref py py-class docutils literal"><span class="pre">pyfftw.FFTW</span></tt></a> objects.</p>
+<p>Note that the first time planning stage can take a substantial amount
+of time. For this reason, the default is to use <tt class="docutils literal"><span class="pre">'FFTW_ESTIMATE'</span></tt>, which
+potentially results in a slightly suboptimal plan being used, but with
+a substantially quicker first-time planner step.</p>
+</li>
+<li><p class="first"><tt class="docutils literal"><span class="pre">threads</span></tt>: The number of threads used to perform the FFT.</p>
+<p>The default is <tt class="docutils literal"><span class="pre">1</span></tt>.</p>
+</li>
+<li><p class="first"><tt class="docutils literal"><span class="pre">auto_align_input</span></tt>: Correctly byte align the input array for optimal
+usage of vector instructions. This can lead to a substantial speedup.</p>
+<p>This argument being <tt class="docutils literal"><span class="pre">True</span></tt> makes sure that the input array
+is correctly aligned. It is possible to correctly byte align the array
+prior to calling this function (using, for example,
+<a class="reference internal" href="../pyfftw.html#pyfftw.n_byte_align" title="pyfftw.n_byte_align"><tt class="xref py py-func docutils literal"><span class="pre">pyfftw.n_byte_align()</span></tt></a>). If and only if a realignment is 
+necessary is a new array created.</p>
+<p>It’s worth noting that just being aligned may not be sufficient to
+create the fastest possible transform. For example, if the array is not
+contiguous (i.e. certain axes have gaps in memory between slices), it may
+be faster to plan a transform for a contiguous array, and then rely on
+the array being copied in before the transform (which
+<a class="reference internal" href="../pyfftw.html#pyfftw.FFTW" title="pyfftw.FFTW"><tt class="xref py py-class docutils literal"><span class="pre">pyfftw.FFTW</span></tt></a> will handle for you). The <tt class="docutils literal"><span class="pre">auto_contiguous</span></tt>
+argument controls whether this function also takes care of making sure
+the array is contiguous or not.</p>
+<p>The default is <tt class="docutils literal"><span class="pre">True</span></tt>.</p>
+</li>
+<li><p class="first"><tt class="docutils literal"><span class="pre">auto_contiguous</span></tt>: Make sure the input array is contiguous in
+memory before performing the transform on it. If the array is not
+contiguous, it is copied into an interim array. This is because it
+is often faster to copy the data before the transform and then transform
+a contiguous array than it is to try to take the transform of a 
+non-contiguous array. This is particularly true in conjunction with
+the <tt class="docutils literal"><span class="pre">auto_align_input</span></tt> argument which is used to make sure that the 
+transform is taken of an aligned array.</p>
+<p>The default is <tt class="docutils literal"><span class="pre">True</span></tt>.</p>
+</li>
+</ul>
+</div>
+<div class="section" id="module-pyfftw.interfaces.cache">
+<span id="caching"></span><h2>Caching<a class="headerlink" href="#module-pyfftw.interfaces.cache" title="Permalink to this headline">¶</a></h2>
+<p>During calls to functions implemented in <a class="reference internal" href="#module-pyfftw.interfaces" title="pyfftw.interfaces"><tt class="xref py py-mod docutils literal"><span class="pre">pyfftw.interfaces</span></tt></a>, a
+<a class="reference internal" href="../pyfftw.html#pyfftw.FFTW" title="pyfftw.FFTW"><tt class="xref py py-class docutils literal"><span class="pre">pyfftw.FFTW</span></tt></a> object is necessarily created. Although the time to
+create a new <a class="reference internal" href="../pyfftw.html#pyfftw.FFTW" title="pyfftw.FFTW"><tt class="xref py py-class docutils literal"><span class="pre">pyfftw.FFTW</span></tt></a> is short (assuming that the planner
+possesses the necessary wisdom to create the plan immediately), it may
+still take longer than a short transform.</p>
+<p>This module implements a method by which objects that are created through
+<a class="reference internal" href="#module-pyfftw.interfaces" title="pyfftw.interfaces"><tt class="xref py py-mod docutils literal"><span class="pre">pyfftw.interfaces</span></tt></a> are temporarily cached. If an equivalent
+transform is then performed within a short period, the object is acquired
+from the cache rather than a new one created. The equivalency is quite 
+conservative and in practice means that if any of the arguments change, or
+if the properties of the array (shape, strides, dtype) change in any way, then
+the cache lookup will fail.</p>
+<p>The cache temporarily stores a copy of any interim <a class="reference internal" href="../pyfftw.html#pyfftw.FFTW" title="pyfftw.FFTW"><tt class="xref py py-class docutils literal"><span class="pre">pyfftw.FFTW</span></tt></a>
+objects that are created. If they are not used for some period of time,
+which can be set with <a class="reference internal" href="#pyfftw.interfaces.cache.set_keepalive_time" title="pyfftw.interfaces.cache.set_keepalive_time"><tt class="xref py py-func docutils literal"><span class="pre">pyfftw.interfaces.cache.set_keepalive_time()</span></tt></a>,
+then they are removed from the cache (liberating any associated memory).
+The default keepalive time is 0.1 seconds.</p>
+<p>Enable the cache by calling <a class="reference internal" href="#pyfftw.interfaces.cache.enable" title="pyfftw.interfaces.cache.enable"><tt class="xref py py-func docutils literal"><span class="pre">pyfftw.interfaces.cache.enable()</span></tt></a>. 
+Disable it by calling <a class="reference internal" href="#pyfftw.interfaces.cache.disable" title="pyfftw.interfaces.cache.disable"><tt class="xref py py-func docutils literal"><span class="pre">pyfftw.interfaces.cache.disable()</span></tt></a>. By default,
+the cache is disabled.</p>
+<p>Note that even with the cache enabled, there is a fixed overhead associated 
+with lookups. This means that for small transforms, the overhead may exceed
+the transform. At this point, it’s worth looking at using <a class="reference internal" href="../pyfftw.html#pyfftw.FFTW" title="pyfftw.FFTW"><tt class="xref py py-class docutils literal"><span class="pre">pyfftw.FFTW</span></tt></a>
+directly.</p>
+<p>When the cache is enabled, the module spawns a new thread to keep track
+of the objects. If <a class="reference external" href="http://docs.python.org/library/threading.html#threading" title="(in Python v2.7)"><tt class="xref py py-mod docutils literal"><span class="pre">threading</span></tt></a> is not available, then the cache
+is not available and trying to use it will raise an ImportError exception.</p>
+<p>The actual implementation of the cache is liable to change, but the 
+documented API is stable.</p>
+<dl class="function">
+<dt id="pyfftw.interfaces.cache.enable">
+<tt class="descclassname">pyfftw.interfaces.cache.</tt><tt class="descname">enable</tt><big>(</big><big>)</big><a class="headerlink" href="#pyfftw.interfaces.cache.enable" title="Permalink to this definition">¶</a></dt>
+<dd><p>Enable the cache.</p>
+</dd></dl>
+
+<dl class="function">
+<dt id="pyfftw.interfaces.cache.disable">
+<tt class="descclassname">pyfftw.interfaces.cache.</tt><tt class="descname">disable</tt><big>(</big><big>)</big><a class="headerlink" href="#pyfftw.interfaces.cache.disable" title="Permalink to this definition">¶</a></dt>
+<dd><p>Disable the cache.</p>
+</dd></dl>
+
+<dl class="function">
+<dt id="pyfftw.interfaces.cache.set_keepalive_time">
+<tt class="descclassname">pyfftw.interfaces.cache.</tt><tt class="descname">set_keepalive_time</tt><big>(</big><em>keepalive_time</em><big>)</big><a class="headerlink" href="#pyfftw.interfaces.cache.set_keepalive_time" title="Permalink to this definition">¶</a></dt>
+<dd><p>Set the minimum time in seconds for which any <a class="reference internal" href="../pyfftw.html#pyfftw.FFTW" title="pyfftw.FFTW"><tt class="xref py py-mod docutils literal"><span class="pre">pyfftw.FFTW</span></tt></a> object
+in the cache is kept alive.</p>
+<p>When the cache is enabled, the interim objects that are used through
+a <a class="reference internal" href="#module-pyfftw.interfaces" title="pyfftw.interfaces"><tt class="xref py py-mod docutils literal"><span class="pre">pyfftw.interfaces</span></tt></a> function are cached for the time set through
+this function. If the object is not used for the that time, it is 
+removed from the cache. Using the object zeros the timer.</p>
+<p>The time is not precise, and sets a minimum time to be alive. In 
+practice, it may be up to twice as long before the object is
+deleted from the cache (due to implementational details).</p>
+</dd></dl>
+
+</div>
+</div>
+
+
+          </div>
+        </div>
+      </div>
+      <div class="sphinxsidebar">
+        <div class="sphinxsidebarwrapper">
+  <h3><a href="../../index.html">Table Of Contents</a></h3>
+  <ul>
+<li><a class="reference internal" href="#"><tt class="docutils literal"><span class="pre">pyfftw.interfaces</span></tt> - Drop in replacements for other FFT implementations</a><ul>
+<li><a class="reference internal" href="#implemented-functions">Implemented Functions</a><ul>
+<li><a class="reference internal" href="#numpy-fft"><tt class="docutils literal"><span class="pre">numpy_fft</span></tt></a></li>
+<li><a class="reference internal" href="#scipy-fftpack"><tt class="docutils literal"><span class="pre">scipy_fftpack</span></tt></a></li>
+</ul>
+</li>
+<li><a class="reference internal" href="#additional-arguments">Additional Arguments</a></li>
+<li><a class="reference internal" href="#module-pyfftw.interfaces.cache">Caching</a></li>
+</ul>
+</li>
+</ul>
+
+  <h4>Previous topic</h4>
+  <p class="topless"><a href="../builders/_utils.html"
+                        title="previous chapter"><tt class="docutils literal docutils literal docutils literal"><span class="pre">pyfftw.builders._utils</span></tt> - Helper functions for <tt class="docutils literal docutils literal docutils literal"><span class="pre">pyfftw.builders</span></tt></a></p>
+  <h4>Next topic</h4>
+  <p class="topless"><a href="numpy_fft.html"
+                        title="next chapter"><tt class="docutils literal"><span class="pre">numpy.fft</span></tt> interface</a></p>
+  <h3>This Page</h3>
+  <ul class="this-page-menu">
+    <li><a href="../../_sources/pyfftw/interfaces/interfaces.txt"
+           rel="nofollow">Show Source</a></li>
+  </ul>
+<div id="searchbox" style="display: none">
+  <h3>Quick search</h3>
+    <form class="search" action="../../search.html" method="get">
+      <input type="text" name="q" />
+      <input type="submit" value="Go" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    <p class="searchtip" style="font-size: 90%">
+    Enter search terms or a module, class or function name.
+    </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../../genindex.html" title="General Index"
+             >index</a></li>
+        <li class="right" >
+          <a href="../../py-modindex.html" title="Python Module Index"
+             >modules</a> |</li>
+        <li class="right" >
+          <a href="numpy_fft.html" title="numpy.fft interface"
+             >next</a> |</li>
+        <li class="right" >
+          <a href="../builders/_utils.html" title="pyfftw.builders._utils - Helper functions for pyfftw.builders"
+             >previous</a> |</li>
+        <li><a href="../../index.html">pyFFTW 0.9.2 documentation</a> »</li>
+          <li><a href="../../sphinx/api.html" >API Reference</a> »</li> 
+      </ul>
+    </div>
+    <div class="footer">
+        © Copyright 2013, Henry Gomersall.
+      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
+    </div>
+  </body>
+</html>
\ No newline at end of file
diff --git a/docs/html/pyfftw/interfaces/numpy_fft.html b/docs/html/pyfftw/interfaces/numpy_fft.html
new file mode 100644
index 0000000..8790ad8
--- /dev/null
+++ b/docs/html/pyfftw/interfaces/numpy_fft.html
@@ -0,0 +1,244 @@
+
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    
+    <title>numpy.fft interface — pyFFTW 0.9.2 documentation</title>
+    
+    <link rel="stylesheet" href="../../_static/default.css" type="text/css" />
+    <link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
+    
+    <script type="text/javascript">
+      var DOCUMENTATION_OPTIONS = {
+        URL_ROOT:    '../../',
+        VERSION:     '0.9.2',
+        COLLAPSE_INDEX: false,
+        FILE_SUFFIX: '.html',
+        HAS_SOURCE:  true
+      };
+    </script>
+    <script type="text/javascript" src="../../_static/jquery.js"></script>
+    <script type="text/javascript" src="../../_static/underscore.js"></script>
+    <script type="text/javascript" src="../../_static/doctools.js"></script>
+    <link rel="top" title="pyFFTW 0.9.2 documentation" href="../../index.html" />
+    <link rel="up" title="pyfftw.interfaces - Drop in replacements for other FFT implementations" href="interfaces.html" />
+    <link rel="next" title="scipy.fftpack interface" href="scipy_fftpack.html" />
+    <link rel="prev" title="pyfftw.interfaces - Drop in replacements for other FFT implementations" href="interfaces.html" /> 
+  </head>
+  <body>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../../genindex.html" title="General Index"
+             accesskey="I">index</a></li>
+        <li class="right" >
+          <a href="../../py-modindex.html" title="Python Module Index"
+             >modules</a> |</li>
+        <li class="right" >
+          <a href="scipy_fftpack.html" title="scipy.fftpack interface"
+             accesskey="N">next</a> |</li>
+        <li class="right" >
+          <a href="interfaces.html" title="pyfftw.interfaces - Drop in replacements for other FFT implementations"
+             accesskey="P">previous</a> |</li>
+        <li><a href="../../index.html">pyFFTW 0.9.2 documentation</a> »</li>
+          <li><a href="../../sphinx/api.html" >API Reference</a> »</li>
+          <li><a href="interfaces.html" accesskey="U"><tt class="docutils literal docutils literal docutils literal docutils literal"><span class="pre">pyfftw.interfaces</span></tt> - Drop in replacements for other FFT implementations</a> »</li> 
+      </ul>
+    </div>  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          <div class="body">
+            
+  <div class="section" id="module-pyfftw.interfaces.numpy_fft">
+<span id="numpy-fft-interface"></span><h1><a class="reference external" href="http://docs.scipy.org/doc/numpy/reference/routines.fft.html#numpy.fft" title="(in NumPy v1.7)"><tt class="xref py py-mod docutils literal"><span class="pre">numpy.fft</span></tt></a> interface<a class="headerlink" href="#module-pyfftw.interfaces.numpy_fft" title="Permalink to this headline">¶</a></h1>
+<p>This module implements those functions that replace aspects of the
+<a class="reference external" href="http://docs.scipy.org/doc/numpy/reference/routines.fft.html#numpy.fft" title="(in NumPy v1.7)"><tt class="xref py py-mod docutils literal"><span class="pre">numpy.fft</span></tt></a> module. This module <em>provides</em> the entire documented namespace 
+of <a class="reference external" href="http://docs.scipy.org/doc/numpy/reference/routines.fft.html#numpy.fft" title="(in NumPy v1.7)"><tt class="xref py py-mod docutils literal"><span class="pre">numpy.fft</span></tt></a>, but those functions that are not included here are imported
+directly from <a class="reference external" href="http://docs.scipy.org/doc/numpy/reference/routines.fft.html#numpy.fft" title="(in NumPy v1.7)"><tt class="xref py py-mod docutils literal"><span class="pre">numpy.fft</span></tt></a>.</p>
+<p>The precision of the transform that is used is selected from the array that 
+is passed in, defaulting to double precision if any type conversion is 
+required.</p>
+<p>One known caveat is that repeated axes are handled differently to
+<a class="reference external" href="http://docs.scipy.org/doc/numpy/reference/routines.fft.html#numpy.fft" title="(in NumPy v1.7)"><tt class="xref py py-mod docutils literal"><span class="pre">numpy.fft</span></tt></a>; axes that are repeated in the axes argument are considered
+only once, as compared to <a class="reference external" href="http://docs.scipy.org/doc/numpy/reference/routines.fft.html#numpy.fft" title="(in NumPy v1.7)"><tt class="xref py py-mod docutils literal"><span class="pre">numpy.fft</span></tt></a> in which repeated axes results in
+the DFT being taken along that axes as many times as the axis occurs.</p>
+<p>The exceptions raised by each of these functions are as per their
+equivalents in <a class="reference external" href="http://docs.scipy.org/doc/numpy/reference/routines.fft.html#numpy.fft" title="(in NumPy v1.7)"><tt class="xref py py-mod docutils literal"><span class="pre">numpy.fft</span></tt></a>.</p>
+<dl class="function">
+<dt id="pyfftw.interfaces.numpy_fft.fft">
+<tt class="descclassname">pyfftw.interfaces.numpy_fft.</tt><tt class="descname">fft</tt><big>(</big><em>a</em>, <em>n=None</em>, <em>axis=-1</em>, <em>overwrite_input=False</em>, <em>planner_effort='FFTW_MEASURE'</em>, <em>threads=1</em>, <em>auto_align_input=True</em>, <em>auto_contiguous=True</em><big>)</big><a class="headerlink" href="#pyfftw.interfaces.numpy_fft.fft" title="Permalink to this definition">¶</a></dt>
+<dd><p>Perform a 1D FFT.</p>
+<p>The first three arguments are as per <a class="reference external" href="http://docs.scipy.org/doc/numpy/reference/generated/numpy.fft.fft.html#numpy.fft.fft" title="(in NumPy v1.7)"><tt class="xref py py-func docutils literal"><span class="pre">numpy.fft.fft()</span></tt></a>; 
+the rest of the arguments are documented 
+in the <a class="reference internal" href="interfaces.html#interfaces-additional-args"><em>additional arguments docs</em></a>.</p>
+</dd></dl>
+
+<dl class="function">
+<dt id="pyfftw.interfaces.numpy_fft.ifft">
+<tt class="descclassname">pyfftw.interfaces.numpy_fft.</tt><tt class="descname">ifft</tt><big>(</big><em>a</em>, <em>n=None</em>, <em>axis=-1</em>, <em>overwrite_input=False</em>, <em>planner_effort='FFTW_MEASURE'</em>, <em>threads=1</em>, <em>auto_align_input=True</em>, <em>auto_contiguous=True</em><big>)</big><a class="headerlink" href="#pyfftw.interfaces.numpy_fft.ifft" title="Permalink to this definition">¶</a></dt>
+<dd><p>Perform a 1D inverse FFT.</p>
+<p>The first three arguments are as per <a class="reference external" href="http://docs.scipy.org/doc/numpy/reference/generated/numpy.fft.ifft.html#numpy.fft.ifft" title="(in NumPy v1.7)"><tt class="xref py py-func docutils literal"><span class="pre">numpy.fft.ifft()</span></tt></a>; 
+the rest of the arguments are documented 
+in the <a class="reference internal" href="interfaces.html#interfaces-additional-args"><em>additional arguments docs</em></a>.</p>
+</dd></dl>
+
+<dl class="function">
+<dt id="pyfftw.interfaces.numpy_fft.fft2">
+<tt class="descclassname">pyfftw.interfaces.numpy_fft.</tt><tt class="descname">fft2</tt><big>(</big><em>a</em>, <em>s=None</em>, <em>axes=(-2</em>, <em>-1)</em>, <em>overwrite_input=False</em>, <em>planner_effort='FFTW_MEASURE'</em>, <em>threads=1</em>, <em>auto_align_input=True</em>, <em>auto_contiguous=True</em><big>)</big><a class="headerlink" href="#pyfftw.interfaces.numpy_fft.fft2" title="Permalink to this definition">¶</a></dt>
+<dd><p>Perform a 2D FFT.</p>
+<p>The first three arguments are as per <a class="reference external" href="http://docs.scipy.org/doc/numpy/reference/generated/numpy.fft.fft2.html#numpy.fft.fft2" title="(in NumPy v1.7)"><tt class="xref py py-func docutils literal"><span class="pre">numpy.fft.fft2()</span></tt></a>; 
+the rest of the arguments are documented 
+in the <a class="reference internal" href="interfaces.html#interfaces-additional-args"><em>additional arguments docs</em></a>.</p>
+</dd></dl>
+
+<dl class="function">
+<dt id="pyfftw.interfaces.numpy_fft.ifft2">
+<tt class="descclassname">pyfftw.interfaces.numpy_fft.</tt><tt class="descname">ifft2</tt><big>(</big><em>a</em>, <em>s=None</em>, <em>axes=(-2</em>, <em>-1)</em>, <em>overwrite_input=False</em>, <em>planner_effort='FFTW_MEASURE'</em>, <em>threads=1</em>, <em>auto_align_input=True</em>, <em>auto_contiguous=True</em><big>)</big><a class="headerlink" href="#pyfftw.interfaces.numpy_fft.ifft2" title="Permalink to this definition">¶</a></dt>
+<dd><p>Perform a 2D inverse FFT.</p>
+<p>The first three arguments are as per <a class="reference external" href="http://docs.scipy.org/doc/numpy/reference/generated/numpy.fft.ifft2.html#numpy.fft.ifft2" title="(in NumPy v1.7)"><tt class="xref py py-func docutils literal"><span class="pre">numpy.fft.ifft2()</span></tt></a>; 
+the rest of the arguments are documented 
+in the <a class="reference internal" href="interfaces.html#interfaces-additional-args"><em>additional arguments docs</em></a>.</p>
+</dd></dl>
+
+<dl class="function">
+<dt id="pyfftw.interfaces.numpy_fft.fftn">
+<tt class="descclassname">pyfftw.interfaces.numpy_fft.</tt><tt class="descname">fftn</tt><big>(</big><em>a</em>, <em>s=None</em>, <em>axes=None</em>, <em>overwrite_input=False</em>, <em>planner_effort='FFTW_MEASURE'</em>, <em>threads=1</em>, <em>auto_align_input=True</em>, <em>auto_contiguous=True</em><big>)</big><a class="headerlink" href="#pyfftw.interfaces.numpy_fft.fftn" title="Permalink to this definition">¶</a></dt>
+<dd><p>Perform an n-D FFT.</p>
+<p>The first three arguments are as per <a class="reference external" href="http://docs.scipy.org/doc/numpy/reference/generated/numpy.fft.fftn.html#numpy.fft.fftn" title="(in NumPy v1.7)"><tt class="xref py py-func docutils literal"><span class="pre">numpy.fft.fftn()</span></tt></a>; 
+the rest of the arguments are documented 
+in the <a class="reference internal" href="interfaces.html#interfaces-additional-args"><em>additional arguments docs</em></a>.</p>
+</dd></dl>
+
+<dl class="function">
+<dt id="pyfftw.interfaces.numpy_fft.ifftn">
+<tt class="descclassname">pyfftw.interfaces.numpy_fft.</tt><tt class="descname">ifftn</tt><big>(</big><em>a</em>, <em>s=None</em>, <em>axes=None</em>, <em>overwrite_input=False</em>, <em>planner_effort='FFTW_MEASURE'</em>, <em>threads=1</em>, <em>auto_align_input=True</em>, <em>auto_contiguous=True</em><big>)</big><a class="headerlink" href="#pyfftw.interfaces.numpy_fft.ifftn" title="Permalink to this definition">¶</a></dt>
+<dd><p>Perform an n-D inverse FFT.</p>
+<p>The first three arguments are as per <a class="reference external" href="http://docs.scipy.org/doc/numpy/reference/generated/numpy.fft.ifftn.html#numpy.fft.ifftn" title="(in NumPy v1.7)"><tt class="xref py py-func docutils literal"><span class="pre">numpy.fft.ifftn()</span></tt></a>; 
+the rest of the arguments are documented 
+in the <a class="reference internal" href="interfaces.html#interfaces-additional-args"><em>additional arguments docs</em></a>.</p>
+</dd></dl>
+
+<dl class="function">
+<dt id="pyfftw.interfaces.numpy_fft.rfft">
+<tt class="descclassname">pyfftw.interfaces.numpy_fft.</tt><tt class="descname">rfft</tt><big>(</big><em>a</em>, <em>n=None</em>, <em>axis=-1</em>, <em>overwrite_input=False</em>, <em>planner_effort='FFTW_MEASURE'</em>, <em>threads=1</em>, <em>auto_align_input=True</em>, <em>auto_contiguous=True</em><big>)</big><a class="headerlink" href="#pyfftw.interfaces.numpy_fft.rfft" title="Permalink to this definition">¶</a></dt>
+<dd><p>Perform a 1D real FFT.</p>
+<p>The first three arguments are as per <a class="reference external" href="http://docs.scipy.org/doc/numpy/reference/generated/numpy.fft.rfft.html#numpy.fft.rfft" title="(in NumPy v1.7)"><tt class="xref py py-func docutils literal"><span class="pre">numpy.fft.rfft()</span></tt></a>; 
+the rest of the arguments are documented 
+in the <a class="reference internal" href="interfaces.html#interfaces-additional-args"><em>additional arguments docs</em></a>.</p>
+</dd></dl>
+
+<dl class="function">
+<dt id="pyfftw.interfaces.numpy_fft.irfft">
+<tt class="descclassname">pyfftw.interfaces.numpy_fft.</tt><tt class="descname">irfft</tt><big>(</big><em>a</em>, <em>n=None</em>, <em>axis=-1</em>, <em>overwrite_input=False</em>, <em>planner_effort='FFTW_MEASURE'</em>, <em>threads=1</em>, <em>auto_align_input=True</em>, <em>auto_contiguous=True</em><big>)</big><a class="headerlink" href="#pyfftw.interfaces.numpy_fft.irfft" title="Permalink to this definition">¶</a></dt>
+<dd><p>Perform a 1D real inverse FFT.</p>
+<p>The first three arguments are as per <a class="reference external" href="http://docs.scipy.org/doc/numpy/reference/generated/numpy.fft.irfft.html#numpy.fft.irfft" title="(in NumPy v1.7)"><tt class="xref py py-func docutils literal"><span class="pre">numpy.fft.irfft()</span></tt></a>; 
+the rest of the arguments are documented 
+in the <a class="reference internal" href="interfaces.html#interfaces-additional-args"><em>additional arguments docs</em></a>.</p>
+</dd></dl>
+
+<dl class="function">
+<dt id="pyfftw.interfaces.numpy_fft.rfft2">
+<tt class="descclassname">pyfftw.interfaces.numpy_fft.</tt><tt class="descname">rfft2</tt><big>(</big><em>a</em>, <em>s=None</em>, <em>axes=(-2</em>, <em>-1)</em>, <em>overwrite_input=False</em>, <em>planner_effort='FFTW_MEASURE'</em>, <em>threads=1</em>, <em>auto_align_input=True</em>, <em>auto_contiguous=True</em><big>)</big><a class="headerlink" href="#pyfftw.interfaces.numpy_fft.rfft2" title="Permalink to this definition">¶</a></dt>
+<dd><p>Perform a 2D real FFT.</p>
+<p>The first three arguments are as per <a class="reference external" href="http://docs.scipy.org/doc/numpy/reference/generated/numpy.fft.rfft2.html#numpy.fft.rfft2" title="(in NumPy v1.7)"><tt class="xref py py-func docutils literal"><span class="pre">numpy.fft.rfft2()</span></tt></a>; 
+the rest of the arguments are documented 
+in the <a class="reference internal" href="interfaces.html#interfaces-additional-args"><em>additional arguments docs</em></a>.</p>
+</dd></dl>
+
+<dl class="function">
+<dt id="pyfftw.interfaces.numpy_fft.irfft2">
+<tt class="descclassname">pyfftw.interfaces.numpy_fft.</tt><tt class="descname">irfft2</tt><big>(</big><em>a</em>, <em>s=None</em>, <em>axes=(-2</em>, <em>-1)</em>, <em>overwrite_input=False</em>, <em>planner_effort='FFTW_MEASURE'</em>, <em>threads=1</em>, <em>auto_align_input=True</em>, <em>auto_contiguous=True</em><big>)</big><a class="headerlink" href="#pyfftw.interfaces.numpy_fft.irfft2" title="Permalink to this definition">¶</a></dt>
+<dd><p>Perform a 2D real inverse FFT.</p>
+<p>The first three arguments are as per <a class="reference external" href="http://docs.scipy.org/doc/numpy/reference/generated/numpy.fft.irfft2.html#numpy.fft.irfft2" title="(in NumPy v1.7)"><tt class="xref py py-func docutils literal"><span class="pre">numpy.fft.irfft2()</span></tt></a>; 
+the rest of the arguments are documented 
+in the <a class="reference internal" href="interfaces.html#interfaces-additional-args"><em>additional arguments docs</em></a>.</p>
+</dd></dl>
+
+<dl class="function">
+<dt id="pyfftw.interfaces.numpy_fft.rfftn">
+<tt class="descclassname">pyfftw.interfaces.numpy_fft.</tt><tt class="descname">rfftn</tt><big>(</big><em>a</em>, <em>s=None</em>, <em>axes=None</em>, <em>overwrite_input=False</em>, <em>planner_effort='FFTW_MEASURE'</em>, <em>threads=1</em>, <em>auto_align_input=True</em>, <em>auto_contiguous=True</em><big>)</big><a class="headerlink" href="#pyfftw.interfaces.numpy_fft.rfftn" title="Permalink to this definition">¶</a></dt>
+<dd><p>Perform an n-D real FFT.</p>
+<p>The first three arguments are as per <a class="reference external" href="http://docs.scipy.org/doc/numpy/reference/generated/numpy.fft.rfftn.html#numpy.fft.rfftn" title="(in NumPy v1.7)"><tt class="xref py py-func docutils literal"><span class="pre">numpy.fft.rfftn()</span></tt></a>; 
+the rest of the arguments are documented 
+in the <a class="reference internal" href="interfaces.html#interfaces-additional-args"><em>additional arguments docs</em></a>.</p>
+</dd></dl>
+
+<dl class="function">
+<dt id="pyfftw.interfaces.numpy_fft.irfftn">
+<tt class="descclassname">pyfftw.interfaces.numpy_fft.</tt><tt class="descname">irfftn</tt><big>(</big><em>a</em>, <em>s=None</em>, <em>axes=None</em>, <em>overwrite_input=False</em>, <em>planner_effort='FFTW_MEASURE'</em>, <em>threads=1</em>, <em>auto_align_input=True</em>, <em>auto_contiguous=True</em><big>)</big><a class="headerlink" href="#pyfftw.interfaces.numpy_fft.irfftn" title="Permalink to this definition">¶</a></dt>
+<dd><p>Perform an n-D real inverse FFT.</p>
+<p>The first three arguments are as per <a class="reference external" href="http://docs.scipy.org/doc/numpy/reference/generated/numpy.fft.rfftn.html#numpy.fft.rfftn" title="(in NumPy v1.7)"><tt class="xref py py-func docutils literal"><span class="pre">numpy.fft.rfftn()</span></tt></a>; 
+the rest of the arguments are documented 
+in the <a class="reference internal" href="interfaces.html#interfaces-additional-args"><em>additional arguments docs</em></a>.</p>
+</dd></dl>
+
+</div>
+
+
+          </div>
+        </div>
+      </div>
+      <div class="sphinxsidebar">
+        <div class="sphinxsidebarwrapper">
+  <h4>Previous topic</h4>
+  <p class="topless"><a href="interfaces.html"
+                        title="previous chapter"><tt class="docutils literal docutils literal docutils literal"><span class="pre">pyfftw.interfaces</span></tt> - Drop in replacements for other FFT implementations</a></p>
+  <h4>Next topic</h4>
+  <p class="topless"><a href="scipy_fftpack.html"
+                        title="next chapter"><tt class="docutils literal"><span class="pre">scipy.fftpack</span></tt> interface</a></p>
+  <h3>This Page</h3>
+  <ul class="this-page-menu">
+    <li><a href="../../_sources/pyfftw/interfaces/numpy_fft.txt"
+           rel="nofollow">Show Source</a></li>
+  </ul>
+<div id="searchbox" style="display: none">
+  <h3>Quick search</h3>
+    <form class="search" action="../../search.html" method="get">
+      <input type="text" name="q" />
+      <input type="submit" value="Go" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    <p class="searchtip" style="font-size: 90%">
+    Enter search terms or a module, class or function name.
+    </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../../genindex.html" title="General Index"
+             >index</a></li>
+        <li class="right" >
+          <a href="../../py-modindex.html" title="Python Module Index"
+             >modules</a> |</li>
+        <li class="right" >
+          <a href="scipy_fftpack.html" title="scipy.fftpack interface"
+             >next</a> |</li>
+        <li class="right" >
+          <a href="interfaces.html" title="pyfftw.interfaces - Drop in replacements for other FFT implementations"
+             >previous</a> |</li>
+        <li><a href="../../index.html">pyFFTW 0.9.2 documentation</a> »</li>
+          <li><a href="../../sphinx/api.html" >API Reference</a> »</li>
+          <li><a href="interfaces.html" ><tt class="docutils literal docutils literal docutils literal docutils literal"><span class="pre">pyfftw.interfaces</span></tt> - Drop in replacements for other FFT implementations</a> »</li> 
+      </ul>
+    </div>
+    <div class="footer">
+        © Copyright 2013, Henry Gomersall.
+      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
+    </div>
+  </body>
+</html>
\ No newline at end of file
diff --git a/docs/html/pyfftw/interfaces/scipy_fftpack.html b/docs/html/pyfftw/interfaces/scipy_fftpack.html
new file mode 100644
index 0000000..a56659e
--- /dev/null
+++ b/docs/html/pyfftw/interfaces/scipy_fftpack.html
@@ -0,0 +1,189 @@
+
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    
+    <title>scipy.fftpack interface — pyFFTW 0.9.2 documentation</title>
+    
+    <link rel="stylesheet" href="../../_static/default.css" type="text/css" />
+    <link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
+    
+    <script type="text/javascript">
+      var DOCUMENTATION_OPTIONS = {
+        URL_ROOT:    '../../',
+        VERSION:     '0.9.2',
+        COLLAPSE_INDEX: false,
+        FILE_SUFFIX: '.html',
+        HAS_SOURCE:  true
+      };
+    </script>
+    <script type="text/javascript" src="../../_static/jquery.js"></script>
+    <script type="text/javascript" src="../../_static/underscore.js"></script>
+    <script type="text/javascript" src="../../_static/doctools.js"></script>
+    <link rel="top" title="pyFFTW 0.9.2 documentation" href="../../index.html" />
+    <link rel="up" title="pyfftw.interfaces - Drop in replacements for other FFT implementations" href="interfaces.html" />
+    <link rel="prev" title="numpy.fft interface" href="numpy_fft.html" /> 
+  </head>
+  <body>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../../genindex.html" title="General Index"
+             accesskey="I">index</a></li>
+        <li class="right" >
+          <a href="../../py-modindex.html" title="Python Module Index"
+             >modules</a> |</li>
+        <li class="right" >
+          <a href="numpy_fft.html" title="numpy.fft interface"
+             accesskey="P">previous</a> |</li>
+        <li><a href="../../index.html">pyFFTW 0.9.2 documentation</a> »</li>
+          <li><a href="../../sphinx/api.html" >API Reference</a> »</li>
+          <li><a href="interfaces.html" accesskey="U"><tt class="docutils literal docutils literal docutils literal docutils literal docutils literal"><span class="pre">pyfftw.interfaces</span></tt> - Drop in replacements for other FFT implementations</a> »</li> 
+      </ul>
+    </div>  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          <div class="body">
+            
+  <div class="section" id="module-pyfftw.interfaces.scipy_fftpack">
+<span id="scipy-fftpack-interface"></span><h1><a class="reference external" href="http://docs.scipy.org/doc/scipy/reference/fftpack.html#scipy.fftpack" title="(in SciPy v0.12)"><tt class="xref py py-mod docutils literal"><span class="pre">scipy.fftpack</span></tt></a> interface<a class="headerlink" href="#module-pyfftw.interfaces.scipy_fftpack" title="Permalink to this headline">¶</a></h1>
+<p>This module implements those functions that replace aspects of the
+<a class="reference external" href="http://docs.scipy.org/doc/scipy/reference/fftpack.html#scipy.fftpack" title="(in SciPy v0.12)"><tt class="xref py py-mod docutils literal"><span class="pre">scipy.fftpack</span></tt></a> module. This module <em>provides</em> the entire documented
+namespace of <a class="reference external" href="http://docs.scipy.org/doc/scipy/reference/fftpack.html#scipy.fftpack" title="(in SciPy v0.12)"><tt class="xref py py-mod docutils literal"><span class="pre">scipy.fftpack</span></tt></a>, but those functions that are not included
+here are imported directly from <a class="reference external" href="http://docs.scipy.org/doc/scipy/reference/fftpack.html#scipy.fftpack" title="(in SciPy v0.12)"><tt class="xref py py-mod docutils literal"><span class="pre">scipy.fftpack</span></tt></a>.</p>
+<dl class="function">
+<dt id="pyfftw.interfaces.scipy_fftpack.fft">
+<tt class="descclassname">pyfftw.interfaces.scipy_fftpack.</tt><tt class="descname">fft</tt><big>(</big><em>x</em>, <em>n=None</em>, <em>axis=-1</em>, <em>overwrite_x=False</em>, <em>planner_effort='FFTW_MEASURE'</em>, <em>threads=1</em>, <em>auto_align_input=True</em>, <em>auto_contiguous=True</em><big>)</big><a class="headerlink" href="#pyfftw.interfaces.scipy_fftpack.fft" title="Permalink to this definition">¶</a></dt>
+<dd><p>Perform a 1D FFT.</p>
+<p>The first three arguments are as per <a class="reference external" href="http://docs.scipy.org/doc/scipy/reference/generated/scipy.fftpack.fft.html#scipy.fftpack.fft" title="(in SciPy v0.12)"><tt class="xref py py-func docutils literal"><span class="pre">scipy.fftpack.fft()</span></tt></a>; 
+the rest of the arguments are documented 
+in the <a class="reference internal" href="interfaces.html#interfaces-additional-args"><em>additional argument docs</em></a>.</p>
+</dd></dl>
+
+<dl class="function">
+<dt id="pyfftw.interfaces.scipy_fftpack.ifft">
+<tt class="descclassname">pyfftw.interfaces.scipy_fftpack.</tt><tt class="descname">ifft</tt><big>(</big><em>x</em>, <em>n=None</em>, <em>axis=-1</em>, <em>overwrite_x=False</em>, <em>planner_effort='FFTW_MEASURE'</em>, <em>threads=1</em>, <em>auto_align_input=True</em>, <em>auto_contiguous=True</em><big>)</big><a class="headerlink" href="#pyfftw.interfaces.scipy_fftpack.ifft" title="Permalink to this definition">¶</a></dt>
+<dd><p>Perform a 1D inverse FFT.</p>
+<p>The first three arguments are as per <a class="reference external" href="http://docs.scipy.org/doc/scipy/reference/generated/scipy.fftpack.ifft.html#scipy.fftpack.ifft" title="(in SciPy v0.12)"><tt class="xref py py-func docutils literal"><span class="pre">scipy.fftpack.ifft()</span></tt></a>; 
+the rest of the arguments are documented 
+in the <a class="reference internal" href="interfaces.html#interfaces-additional-args"><em>additional argument docs</em></a>.</p>
+</dd></dl>
+
+<dl class="function">
+<dt id="pyfftw.interfaces.scipy_fftpack.fftn">
+<tt class="descclassname">pyfftw.interfaces.scipy_fftpack.</tt><tt class="descname">fftn</tt><big>(</big><em>x</em>, <em>shape=None</em>, <em>axes=None</em>, <em>overwrite_x=False</em>, <em>planner_effort='FFTW_MEASURE'</em>, <em>threads=1</em>, <em>auto_align_input=True</em>, <em>auto_contiguous=True</em><big>)</big><a class="headerlink" href="#pyfftw.interfaces.scipy_fftpack.fftn" title="Permalink to this definition">¶</a></dt>
+<dd><p>Perform an n-D FFT.</p>
+<p>The first three arguments are as per <a class="reference external" href="http://docs.scipy.org/doc/scipy/reference/generated/scipy.fftpack.fftn.html#scipy.fftpack.fftn" title="(in SciPy v0.12)"><tt class="xref py py-func docutils literal"><span class="pre">scipy.fftpack.fftn()</span></tt></a>; 
+the rest of the arguments are documented 
+in the <a class="reference internal" href="interfaces.html#interfaces-additional-args"><em>additional argument docs</em></a>.</p>
+</dd></dl>
+
+<dl class="function">
+<dt id="pyfftw.interfaces.scipy_fftpack.ifftn">
+<tt class="descclassname">pyfftw.interfaces.scipy_fftpack.</tt><tt class="descname">ifftn</tt><big>(</big><em>x</em>, <em>shape=None</em>, <em>axes=None</em>, <em>overwrite_x=False</em>, <em>planner_effort='FFTW_MEASURE'</em>, <em>threads=1</em>, <em>auto_align_input=True</em>, <em>auto_contiguous=True</em><big>)</big><a class="headerlink" href="#pyfftw.interfaces.scipy_fftpack.ifftn" title="Permalink to this definition">¶</a></dt>
+<dd><p>Perform an n-D inverse FFT.</p>
+<p>The first three arguments are as per <a class="reference external" href="http://docs.scipy.org/doc/scipy/reference/generated/scipy.fftpack.ifftn.html#scipy.fftpack.ifftn" title="(in SciPy v0.12)"><tt class="xref py py-func docutils literal"><span class="pre">scipy.fftpack.ifftn()</span></tt></a>; 
+the rest of the arguments are documented 
+in the <a class="reference internal" href="interfaces.html#interfaces-additional-args"><em>additional argument docs</em></a>.</p>
+</dd></dl>
+
+<dl class="function">
+<dt id="pyfftw.interfaces.scipy_fftpack.rfft">
+<tt class="descclassname">pyfftw.interfaces.scipy_fftpack.</tt><tt class="descname">rfft</tt><big>(</big><em>x</em>, <em>n=None</em>, <em>axis=-1</em>, <em>overwrite_x=False</em>, <em>planner_effort='FFTW_MEASURE'</em>, <em>threads=1</em>, <em>auto_align_input=True</em>, <em>auto_contiguous=True</em><big>)</big><a class="headerlink" href="#pyfftw.interfaces.scipy_fftpack.rfft" title="Permalink to this definition">¶</a></dt>
+<dd><p>Perform a 1D real FFT.</p>
+<p>The first three arguments are as per <a class="reference external" href="http://docs.scipy.org/doc/scipy/reference/generated/scipy.fftpack.rfft.html#scipy.fftpack.rfft" title="(in SciPy v0.12)"><tt class="xref py py-func docutils literal"><span class="pre">scipy.fftpack.rfft()</span></tt></a>; 
+the rest of the arguments are documented 
+in the <a class="reference internal" href="interfaces.html#interfaces-additional-args"><em>additional argument docs</em></a>.</p>
+</dd></dl>
+
+<dl class="function">
+<dt id="pyfftw.interfaces.scipy_fftpack.irfft">
+<tt class="descclassname">pyfftw.interfaces.scipy_fftpack.</tt><tt class="descname">irfft</tt><big>(</big><em>x</em>, <em>n=None</em>, <em>axis=-1</em>, <em>overwrite_x=False</em>, <em>planner_effort='FFTW_MEASURE'</em>, <em>threads=1</em>, <em>auto_align_input=True</em>, <em>auto_contiguous=True</em><big>)</big><a class="headerlink" href="#pyfftw.interfaces.scipy_fftpack.irfft" title="Permalink to this definition">¶</a></dt>
+<dd><p>Perform a 1D real inverse FFT.</p>
+<p>The first three arguments are as per <a class="reference external" href="http://docs.scipy.org/doc/scipy/reference/generated/scipy.fftpack.irfft.html#scipy.fftpack.irfft" title="(in SciPy v0.12)"><tt class="xref py py-func docutils literal"><span class="pre">scipy.fftpack.irfft()</span></tt></a>; 
+the rest of the arguments are documented 
+in the <a class="reference internal" href="interfaces.html#interfaces-additional-args"><em>additional argument docs</em></a>.</p>
+</dd></dl>
+
+<dl class="function">
+<dt id="pyfftw.interfaces.scipy_fftpack.fft2">
+<tt class="descclassname">pyfftw.interfaces.scipy_fftpack.</tt><tt class="descname">fft2</tt><big>(</big><em>x</em>, <em>shape=None</em>, <em>axes=(-2</em>, <em>-1)</em>, <em>overwrite_x=False</em>, <em>planner_effort='FFTW_MEASURE'</em>, <em>threads=1</em>, <em>auto_align_input=True</em>, <em>auto_contiguous=True</em><big>)</big><a class="headerlink" href="#pyfftw.interfaces.scipy_fftpack.fft2" title="Permalink to this definition">¶</a></dt>
+<dd><p>Perform a 2D FFT.</p>
+<p>The first three arguments are as per <a class="reference external" href="http://docs.scipy.org/doc/scipy/reference/generated/scipy.fftpack.fft2.html#scipy.fftpack.fft2" title="(in SciPy v0.12)"><tt class="xref py py-func docutils literal"><span class="pre">scipy.fftpack.fft2()</span></tt></a>; 
+the rest of the arguments are documented 
+in the <a class="reference internal" href="interfaces.html#interfaces-additional-args"><em>additional argument docs</em></a>.</p>
+</dd></dl>
+
+<dl class="function">
+<dt id="pyfftw.interfaces.scipy_fftpack.ifft2">
+<tt class="descclassname">pyfftw.interfaces.scipy_fftpack.</tt><tt class="descname">ifft2</tt><big>(</big><em>x</em>, <em>shape=None</em>, <em>axes=(-2</em>, <em>-1)</em>, <em>overwrite_x=False</em>, <em>planner_effort='FFTW_MEASURE'</em>, <em>threads=1</em>, <em>auto_align_input=True</em>, <em>auto_contiguous=True</em><big>)</big><a class="headerlink" href="#pyfftw.interfaces.scipy_fftpack.ifft2" title="Permalink to this definition">¶</a></dt>
+<dd><p>Perform a 2D inverse FFT.</p>
+<p>The first three arguments are as per <a class="reference external" href="http://docs.scipy.org/doc/scipy/reference/generated/scipy.fftpack.ifft2.html#scipy.fftpack.ifft2" title="(in SciPy v0.12)"><tt class="xref py py-func docutils literal"><span class="pre">scipy.fftpack.ifft2()</span></tt></a>; 
+the rest of the arguments are documented in the
+<a class="reference internal" href="interfaces.html#interfaces-additional-args"><em>additional argument docs</em></a>.</p>
+</dd></dl>
+
+</div>
+
+
+          </div>
+        </div>
+      </div>
+      <div class="sphinxsidebar">
+        <div class="sphinxsidebarwrapper">
+  <h4>Previous topic</h4>
+  <p class="topless"><a href="numpy_fft.html"
+                        title="previous chapter"><tt class="docutils literal docutils literal docutils literal"><span class="pre">numpy.fft</span></tt> interface</a></p>
+  <h3>This Page</h3>
+  <ul class="this-page-menu">
+    <li><a href="../../_sources/pyfftw/interfaces/scipy_fftpack.txt"
+           rel="nofollow">Show Source</a></li>
+  </ul>
+<div id="searchbox" style="display: none">
+  <h3>Quick search</h3>
+    <form class="search" action="../../search.html" method="get">
+      <input type="text" name="q" />
+      <input type="submit" value="Go" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    <p class="searchtip" style="font-size: 90%">
+    Enter search terms or a module, class or function name.
+    </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../../genindex.html" title="General Index"
+             >index</a></li>
+        <li class="right" >
+          <a href="../../py-modindex.html" title="Python Module Index"
+             >modules</a> |</li>
+        <li class="right" >
+          <a href="numpy_fft.html" title="numpy.fft interface"
+             >previous</a> |</li>
+        <li><a href="../../index.html">pyFFTW 0.9.2 documentation</a> »</li>
+          <li><a href="../../sphinx/api.html" >API Reference</a> »</li>
+          <li><a href="interfaces.html" ><tt class="docutils literal docutils literal docutils literal docutils literal docutils literal"><span class="pre">pyfftw.interfaces</span></tt> - Drop in replacements for other FFT implementations</a> »</li> 
+      </ul>
+    </div>
+    <div class="footer">
+        © Copyright 2013, Henry Gomersall.
+      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
+    </div>
+  </body>
+</html>
\ No newline at end of file
diff --git a/docs/html/pyfftw/pyfftw.html b/docs/html/pyfftw/pyfftw.html
new file mode 100644
index 0000000..35a5c73
--- /dev/null
+++ b/docs/html/pyfftw/pyfftw.html
@@ -0,0 +1,591 @@
+
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    
+    <title>pyfftw - The core — pyFFTW 0.9.2 documentation</title>
+    
+    <link rel="stylesheet" href="../_static/default.css" type="text/css" />
+    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
+    
+    <script type="text/javascript">
+      var DOCUMENTATION_OPTIONS = {
+        URL_ROOT:    '../',
+        VERSION:     '0.9.2',
+        COLLAPSE_INDEX: false,
+        FILE_SUFFIX: '.html',
+        HAS_SOURCE:  true
+      };
+    </script>
+    <script type="text/javascript" src="../_static/jquery.js"></script>
+    <script type="text/javascript" src="../_static/underscore.js"></script>
+    <script type="text/javascript" src="../_static/doctools.js"></script>
+    <link rel="top" title="pyFFTW 0.9.2 documentation" href="../index.html" />
+    <link rel="up" title="API Reference" href="../sphinx/api.html" />
+    <link rel="next" title="pyfftw.builders - Get FFTW objects using a numpy.fft like interface" href="builders/builders.html" />
+    <link rel="prev" title="API Reference" href="../sphinx/api.html" /> 
+  </head>
+  <body>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             accesskey="I">index</a></li>
+        <li class="right" >
+          <a href="../py-modindex.html" title="Python Module Index"
+             >modules</a> |</li>
+        <li class="right" >
+          <a href="builders/builders.html" title="pyfftw.builders - Get FFTW objects using a numpy.fft like interface"
+             accesskey="N">next</a> |</li>
+        <li class="right" >
+          <a href="../sphinx/api.html" title="API Reference"
+             accesskey="P">previous</a> |</li>
+        <li><a href="../index.html">pyFFTW 0.9.2 documentation</a> »</li>
+          <li><a href="../sphinx/api.html" accesskey="U">API Reference</a> »</li> 
+      </ul>
+    </div>  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          <div class="body">
+            
+  <div class="section" id="module-pyfftw">
+<span id="pyfftw-the-core"></span><h1><tt class="docutils literal"><span class="pre">pyfftw</span></tt> - The core<a class="headerlink" href="#module-pyfftw" title="Permalink to this headline">¶</a></h1>
+<p>The core of <tt class="docutils literal"><span class="pre">pyfftw</span></tt> consists of the <a class="reference internal" href="#pyfftw.FFTW" title="pyfftw.FFTW"><tt class="xref py py-class docutils literal"><span class="pre">FFTW</span></tt></a> class, 
+<a class="reference internal" href="#wisdom-functions"><em>wisdom functions</em></a> and a couple of
+<a class="reference internal" href="#utility-functions"><em>utility functions</em></a> for dealing with aligned
+arrays.</p>
+<p>This module represents the full interface to the underlying <a class="reference external" href="http://www.fftw.org/">FFTW
+library</a>. However, users may find it easier to
+use the helper routines provided in <a class="reference internal" href="builders/builders.html#module-pyfftw.builders" title="pyfftw.builders"><tt class="xref py py-mod docutils literal"><span class="pre">pyfftw.builders</span></tt></a>.</p>
+<div class="section" id="fftw-class">
+<h2>FFTW Class<a class="headerlink" href="#fftw-class" title="Permalink to this headline">¶</a></h2>
+<dl class="class">
+<dt id="pyfftw.FFTW">
+<em class="property">class </em><tt class="descclassname">pyfftw.</tt><tt class="descname">FFTW</tt><big>(</big><em>input_array</em>, <em>output_array</em>, <em>axes=(-1</em>, <em>)</em>, <em>direction='FFTW_FORWARD'</em>, <em>flags=('FFTW_MEASURE'</em>, <em>)</em>, <em>threads=1</em>, <em>planning_timelimit=None</em><big>)</big><a class="headerlink" href="#pyfftw.FFTW" title="Permalink to this definition">¶</a></dt>
+<dd><p>FFTW is a class for computing the complex N-Dimensional DFT or
+inverse DFT of an array using the FFTW library. The interface is 
+designed to be somewhat pythonic, with the correct transform being 
+inferred from the dtypes of the passed arrays.</p>
+<p>On instantiation, the dtypes and relative shapes of the input array and
+output arrays are compared to the set of valid (and implemented)
+<a class="reference internal" href="#scheme-table"><em>FFTW schemes</em></a>.  If a match is found, the plan that
+corresponds to that scheme is created, operating on the arrays that are
+passed in. If no scheme can be created, then <tt class="docutils literal"><span class="pre">ValueError</span></tt> is raised.</p>
+<p>The actual FFT or iFFT is performed by calling the 
+<a class="reference internal" href="#pyfftw.FFTW.execute" title="pyfftw.FFTW.execute"><tt class="xref py py-meth docutils literal"><span class="pre">execute()</span></tt></a> method.</p>
+<p>The arrays can be updated by calling the 
+<a class="reference internal" href="#pyfftw.FFTW.update_arrays" title="pyfftw.FFTW.update_arrays"><tt class="xref py py-meth docutils literal"><span class="pre">update_arrays()</span></tt></a> method.</p>
+<p>The created instance of the class is itself callable, and can perform
+the execution of the FFT, both with or without array updates, returning
+the result of the FFT. Unlike calling the <a class="reference internal" href="#pyfftw.FFTW.execute" title="pyfftw.FFTW.execute"><tt class="xref py py-meth docutils literal"><span class="pre">execute()</span></tt></a>
+method, calling the class instance will also optionally normalise the
+output as necessary. Additionally, calling with an input array update
+will also coerce that array to be the correct dtype.</p>
+<p>See the documentation on the <a class="reference internal" href="#pyfftw.FFTW.__call__" title="pyfftw.FFTW.__call__"><tt class="xref py py-meth docutils literal"><span class="pre">__call__()</span></tt></a> method 
+for more information.</p>
+<p><strong>Arguments</strong>:</p>
+<ul>
+<li><p class="first"><tt class="docutils literal"><span class="pre">input_array</span></tt> and <tt class="docutils literal"><span class="pre">output_array</span></tt> should be numpy arrays.
+The contents of these arrays will be destroyed by the planning 
+process during initialisation. Information on supported 
+dtypes for the arrays is <a class="reference internal" href="#scheme-table"><em>given below</em></a>.</p>
+</li>
+<li><p class="first"><tt class="docutils literal"><span class="pre">axes</span></tt> describes along which axes the DFT should be taken.
+This should be a valid list of axes. Repeated axes are 
+only transformed once. Invalid axes will raise an <tt class="docutils literal"><span class="pre">IndexError</span></tt> 
+exception. This argument is equivalent to the same
+argument in <a class="reference external" href="http://docs.scipy.org/doc/numpy/reference/generated/numpy.fft.fftn.html#numpy.fft.fftn" title="(in NumPy v1.7)"><tt class="xref py py-func docutils literal"><span class="pre">numpy.fft.fftn()</span></tt></a>, except for the fact that
+the behaviour of repeated axes is different (<tt class="docutils literal"><span class="pre">numpy.fft</span></tt>
+will happily take the fft of the same axis if it is repeated
+in the <tt class="docutils literal"><span class="pre">axes</span></tt> argument). Rudimentary testing has suggested
+this is down to the underlying FFTW library and so unlikely 
+to be fixed in these wrappers.</p>
+</li>
+<li><p class="first"><tt class="docutils literal"><span class="pre">direction</span></tt> should be a string and one of <tt class="docutils literal"><span class="pre">'FFTW_FORWARD'</span></tt> 
+or <tt class="docutils literal"><span class="pre">'FFTW_BACKWARD'</span></tt>, which dictate whether to take the
+DFT (forwards) or the inverse DFT (backwards) respectively 
+(specifically, it dictates the sign of the exponent in the 
+DFT formulation).</p>
+<p>Note that only the Complex schemes allow a free choice
+for <tt class="docutils literal"><span class="pre">direction</span></tt>. The direction <em>must</em> agree with the 
+the <a class="reference internal" href="#scheme-table"><em>table below</em></a> if a Real scheme 
+is used, otherwise a <tt class="docutils literal"><span class="pre">ValueError</span></tt> is raised.</p>
+</li>
+</ul>
+<ul id="fftw-flags">
+<li><p class="first"><tt class="docutils literal"><span class="pre">flags</span></tt> is a list of strings and is a subset of the 
+flags that FFTW allows for the planners:</p>
+<ul class="simple">
+<li><tt class="docutils literal"><span class="pre">'FFTW_ESTIMATE'</span></tt>, <tt class="docutils literal"><span class="pre">'FFTW_MEASURE'</span></tt>, <tt class="docutils literal"><span class="pre">'FFTW_PATIENT'</span></tt> and 
+<tt class="docutils literal"><span class="pre">'FFTW_EXHAUSTIVE'</span></tt> are supported. These describe the 
+increasing amount of effort spent during the planning 
+stage to create the fastest possible transform. 
+Usually <tt class="docutils literal"><span class="pre">'FFTW_MEASURE'</span></tt> is a good compromise. If no flag
+is passed, the default <tt class="docutils literal"><span class="pre">'FFTW_MEASURE'</span></tt> is used.</li>
+<li><tt class="docutils literal"><span class="pre">'FFTW_UNALIGNED'</span></tt> is supported. 
+This tells FFTW not to assume anything about the 
+alignment of the data and disabling any SIMD capability 
+(see below).</li>
+<li><tt class="docutils literal"><span class="pre">'FFTW_DESTROY_INPUT'</span></tt> is supported.
+This tells FFTW that the input array can be destroyed during
+the transform, sometimes allowing a faster algorithm to be
+used. The default behaviour is, if possible, to preserve the
+input. In the case of the 1D Backwards Real transform, this 
+may result in a performance hit. In the case of a backwards
+real transform for greater than one dimension, it is not
+possible to preserve the input, making this flag implicit
+in that case. A little more on this is given 
+<a class="reference internal" href="#scheme-table"><em>below</em></a>.</li>
+</ul>
+<p>The <a class="reference external" href="http://www.fftw.org/fftw3_doc/Planner-Flags.html#Planner-Flags">FFTW planner flags documentation</a>
+has more information about the various flags and their impact.
+Note that only the flags documented here are supported.</p>
+</li>
+<li><p class="first"><tt class="docutils literal"><span class="pre">threads</span></tt> tells the wrapper how many threads to use
+when invoking FFTW, with a default of 1. If the number
+of threads is greater than 1, then the GIL is released
+by necessity.</p>
+</li>
+<li><p class="first"><tt class="docutils literal"><span class="pre">planning_timelimit</span></tt> is a floating point number that 
+indicates to the underlying FFTW planner the maximum number of
+seconds it should spend planning the FFT. This is a rough
+estimate and corresponds to calling of <tt class="docutils literal"><span class="pre">fftw_set_timelimit()</span></tt>
+(or an equivalent dependent on type) in the underlying FFTW
+library. If <tt class="docutils literal"><span class="pre">None</span></tt> is set, the planner will run indefinitely
+until all the planning modes allowed by the flags have been
+tried. See the <a class="reference external" href="http://www.fftw.org/fftw3_doc/Planner-Flags.html#Planner-Flags">FFTW planner flags page</a>
+for more information on this.</p>
+</li>
+</ul>
+<p id="fftw-schemes"><strong>Schemes</strong></p>
+<p>The currently supported schemes are as follows:</p>
+<table border="1" class="docutils" id="scheme-table">
+<colgroup>
+<col width="22%" />
+<col width="31%" />
+<col width="32%" />
+<col width="15%" />
+</colgroup>
+<thead valign="bottom">
+<tr class="row-odd"><th class="head">Type</th>
+<th class="head"><tt class="docutils literal"><span class="pre">input_array.dtype</span></tt></th>
+<th class="head"><tt class="docutils literal"><span class="pre">output_array.dtype</span></tt></th>
+<th class="head">Direction</th>
+</tr>
+</thead>
+<tbody valign="top">
+<tr class="row-even"><td>Complex</td>
+<td><tt class="docutils literal"><span class="pre">complex64</span></tt></td>
+<td><tt class="docutils literal"><span class="pre">complex64</span></tt></td>
+<td>Both</td>
+</tr>
+<tr class="row-odd"><td>Complex</td>
+<td><tt class="docutils literal"><span class="pre">complex128</span></tt></td>
+<td><tt class="docutils literal"><span class="pre">complex128</span></tt></td>
+<td>Both</td>
+</tr>
+<tr class="row-even"><td>Complex</td>
+<td><tt class="docutils literal"><span class="pre">clongdouble</span></tt></td>
+<td><tt class="docutils literal"><span class="pre">clongdouble</span></tt></td>
+<td>Both</td>
+</tr>
+<tr class="row-odd"><td>Real</td>
+<td><tt class="docutils literal"><span class="pre">float32</span></tt></td>
+<td><tt class="docutils literal"><span class="pre">complex64</span></tt></td>
+<td>Forwards</td>
+</tr>
+<tr class="row-even"><td>Real</td>
+<td><tt class="docutils literal"><span class="pre">float64</span></tt></td>
+<td><tt class="docutils literal"><span class="pre">complex128</span></tt></td>
+<td>Forwards</td>
+</tr>
+<tr class="row-odd"><td>Real</td>
+<td><tt class="docutils literal"><span class="pre">longdouble</span></tt></td>
+<td><tt class="docutils literal"><span class="pre">clongdouble</span></tt></td>
+<td>Forwards</td>
+</tr>
+<tr class="row-even"><td>Real<sup>1</sup></td>
+<td><tt class="docutils literal"><span class="pre">complex64</span></tt></td>
+<td><tt class="docutils literal"><span class="pre">float32</span></tt></td>
+<td>Backwards</td>
+</tr>
+<tr class="row-odd"><td>Real<sup>1</sup></td>
+<td><tt class="docutils literal"><span class="pre">complex128</span></tt></td>
+<td><tt class="docutils literal"><span class="pre">float64</span></tt></td>
+<td>Backwards</td>
+</tr>
+<tr class="row-even"><td>Real<sup>1</sup></td>
+<td><tt class="docutils literal"><span class="pre">clongdouble</span></tt></td>
+<td><tt class="docutils literal"><span class="pre">longdouble</span></tt></td>
+<td>Backwards</td>
+</tr>
+</tbody>
+</table>
+<p><sup>1</sup>  Note that the Backwards Real transform for the case
+in which the dimensionality of the transform is greater than 1
+will destroy the input array. This is inherent to FFTW and the only
+general work-around for this is to copy the array prior to
+performing the transform. In the case where the dimensionality
+of the transform is 1, the default is to preserve the input array.
+This is different from the default in the underlying library, and
+some speed gain may be achieved by allowing the input array to
+be destroyed by passing the <tt class="docutils literal"><span class="pre">'FFTW_DESTROY_INPUT'</span></tt> 
+<a class="reference internal" href="#fftw-flags"><em>flag</em></a>.</p>
+<p><tt class="docutils literal"><span class="pre">clongdouble</span></tt> typically maps directly to <tt class="docutils literal"><span class="pre">complex256</span></tt>
+or <tt class="docutils literal"><span class="pre">complex192</span></tt>, and <tt class="docutils literal"><span class="pre">longdouble</span></tt> to <tt class="docutils literal"><span class="pre">float128</span></tt> or
+<tt class="docutils literal"><span class="pre">float96</span></tt>, dependent on platform. In the case of 64-bit Python
+on Windows, <tt class="docutils literal"><span class="pre">longdouble</span></tt> maps directly to <tt class="docutils literal"><span class="pre">float64</span></tt> and 
+<tt class="docutils literal"><span class="pre">clongdouble</span></tt> to <tt class="docutils literal"><span class="pre">complex128</span></tt>. In such a case, the</p>
+<p>The relative shapes of the arrays should be as follows:</p>
+<ul class="simple">
+<li>For a Complex transform, <tt class="docutils literal"><span class="pre">output_array.shape</span> <span class="pre">==</span> <span class="pre">input_array.shape</span></tt></li>
+<li>For a Real transform in the Forwards direction, both the following 
+should be true:<ul>
+<li><tt class="docutils literal"><span class="pre">output_array.shape[axes][-1]</span> <span class="pre">==</span> <span class="pre">input_array.shape[axes][-1]//2</span> <span class="pre">+</span> <span class="pre">1</span></tt></li>
+<li>All the other axes should be equal in length.</li>
+</ul>
+</li>
+<li>For a Real transform in the Backwards direction, both the following 
+should be true:<ul>
+<li><tt class="docutils literal"><span class="pre">input_array.shape[axes][-1]</span> <span class="pre">==</span> <span class="pre">output_array.shape[axes][-1]//2</span> <span class="pre">+</span> <span class="pre">1</span></tt></li>
+<li>All the other axes should be equal in length.</li>
+</ul>
+</li>
+</ul>
+<p>In the above expressions for the Real transform, the <tt class="docutils literal"><span class="pre">axes</span></tt> 
+arguments denotes the unique set of axes on which we are taking
+the FFT, in the order passed. It is the last of these axes that 
+is subject to the special case shown.</p>
+<p>The shapes for the real transforms corresponds to those
+stipulated by the FFTW library. Further information can be
+found in the FFTW documentation on the <a class="reference external" href="http://www.fftw.org/fftw3_doc/Guru-Real_002ddata-DFTs.html">real DFT</a>.</p>
+<p>The actual arrangement in memory is arbitrary and the scheme
+can be planned for any set of strides on either the input
+or the output. The user should not have to worry about this
+and any valid numpy array should work just fine.</p>
+<p>What is calculated is exactly what FFTW calculates. 
+Notably, this is an unnormalized transform so should 
+be scaled as necessary (fft followed by ifft will scale 
+the input by N, the product of the dimensions along which
+the DFT is taken). For further information, see the 
+<a class="reference external" href="http://www.fftw.org/fftw3_doc/What-FFTW-Really-Computes.html">FFTW documentation</a>.</p>
+<p>The FFTW library benefits greatly from the beginning of each
+DFT axes being aligned on the correct byte boundary, enabling
+SIMD instructions. By default, if the data begins on such a
+boundary, then FFTW will be allowed to try and enable
+SIMD instructions. This means that all future changes to
+the data arrays will be checked for similar alignment. SIMD
+instructions can be explicitly disabled by setting the
+FFTW_UNALIGNED flags, to allow for updates with unaligned
+data.</p>
+<p><a class="reference internal" href="#pyfftw.n_byte_align" title="pyfftw.n_byte_align"><tt class="xref py py-func docutils literal"><span class="pre">n_byte_align()</span></tt></a> and 
+<a class="reference internal" href="#pyfftw.n_byte_align_empty" title="pyfftw.n_byte_align_empty"><tt class="xref py py-func docutils literal"><span class="pre">n_byte_align_empty()</span></tt></a> are two methods
+included with this module for producing aligned arrays.</p>
+<p>The optimum alignment for the running platform is provided
+by <a class="reference internal" href="#pyfftw.pyfftw.simd_alignment" title="pyfftw.pyfftw.simd_alignment"><tt class="xref py py-data docutils literal"><span class="pre">pyfftw.simd_alignment</span></tt></a>, though a different alignment
+may still result in some performance improvement. For example,
+if the processor supports AVX (requiring 32-byte alignment) as
+well as SSE (requiring 16-byte alignment), then if the array
+is 16-byte aligned, SSE will still be used.</p>
+<p>It’s worth noting that just being aligned may not be sufficient
+to create the fastest possible transform. For example, if the
+array is not contiguous (i.e. certain axes are displaced in
+memory), it may be faster to plan a transform for a contiguous
+array, and then rely on the array being copied in before the
+transform (which <a class="reference internal" href="#pyfftw.FFTW" title="pyfftw.FFTW"><tt class="xref py py-class docutils literal"><span class="pre">pyfftw.FFTW</span></tt></a> will handle for you when
+accessed through <a class="reference internal" href="#pyfftw.FFTW.__call__" title="pyfftw.FFTW.__call__"><tt class="xref py py-meth docutils literal"><span class="pre">__call__()</span></tt></a>).</p>
+<dl class="attribute">
+<dt id="pyfftw.FFTW.N">
+<tt class="descname">N</tt><a class="headerlink" href="#pyfftw.FFTW.N" title="Permalink to this definition">¶</a></dt>
+<dd><p>The product of the lengths of the DFT over all DFT axes.
+1/N is the normalisation constant. For any input array A, 
+and for any set of axes, 1/N * ifft(fft(A)) = A</p>
+</dd></dl>
+
+<dl class="attribute">
+<dt id="pyfftw.FFTW.simd_aligned">
+<tt class="descname">simd_aligned</tt><a class="headerlink" href="#pyfftw.FFTW.simd_aligned" title="Permalink to this definition">¶</a></dt>
+<dd><p>Return whether or not this FFTW object requires simd aligned
+input and output data.</p>
+</dd></dl>
+
+<dl class="attribute">
+<dt id="pyfftw.FFTW.input_alignment">
+<tt class="descname">input_alignment</tt><a class="headerlink" href="#pyfftw.FFTW.input_alignment" title="Permalink to this definition">¶</a></dt>
+<dd><p>Returns the byte alignment of the input arrays for which the
+<a class="reference internal" href="#pyfftw.FFTW" title="pyfftw.FFTW"><tt class="xref py py-class docutils literal"><span class="pre">FFTW</span></tt></a> object was created.</p>
+<p>Input array updates with arrays that are not aligned on this
+byte boundary will result in a ValueError being raised, or
+a copy being made if the <a class="reference internal" href="#pyfftw.FFTW.__call__" title="pyfftw.FFTW.__call__"><tt class="xref py py-meth docutils literal"><span class="pre">__call__()</span></tt></a> 
+interface is used.</p>
+</dd></dl>
+
+<dl class="attribute">
+<dt id="pyfftw.FFTW.output_alignment">
+<tt class="descname">output_alignment</tt><a class="headerlink" href="#pyfftw.FFTW.output_alignment" title="Permalink to this definition">¶</a></dt>
+<dd><p>Returns the byte alignment of the output arrays for which the
+<a class="reference internal" href="#pyfftw.FFTW" title="pyfftw.FFTW"><tt class="xref py py-class docutils literal"><span class="pre">FFTW</span></tt></a> object was created.</p>
+<p>Output array updates with arrays that are not aligned on this
+byte boundary will result in a ValueError being raised.</p>
+</dd></dl>
+
+<dl class="attribute">
+<dt id="pyfftw.FFTW.flags">
+<tt class="descname">flags</tt><a class="headerlink" href="#pyfftw.FFTW.flags" title="Permalink to this definition">¶</a></dt>
+<dd><p>Return which flags were used to construct the FFTW object.</p>
+<p>This includes flags that were added during initialisation.</p>
+</dd></dl>
+
+<dl class="method">
+<dt id="pyfftw.FFTW.__call__">
+<tt class="descname">__call__</tt><big>(</big><em>input_array=None</em>, <em>output_array=None</em>, <em>normalise_idft=True</em><big>)</big><a class="headerlink" href="#pyfftw.FFTW.__call__" title="Permalink to this definition">¶</a></dt>
+<dd><p>Calling the class instance (optionally) updates the arrays, then
+calls <a class="reference internal" href="#pyfftw.FFTW.execute" title="pyfftw.FFTW.execute"><tt class="xref py py-meth docutils literal"><span class="pre">execute()</span></tt></a>, before optionally normalising 
+the output and returning the output array.</p>
+<p>It has some built-in helpers to make life simpler for the calling
+functions (as distinct from manually updating the arrays and
+calling <a class="reference internal" href="#pyfftw.FFTW.execute" title="pyfftw.FFTW.execute"><tt class="xref py py-meth docutils literal"><span class="pre">execute()</span></tt></a>).</p>
+<p>If <tt class="docutils literal"><span class="pre">normalise_idft</span></tt> is <tt class="docutils literal"><span class="pre">True</span></tt> (the default), then the output from 
+an inverse DFT (i.e. when the direction flag is <tt class="docutils literal"><span class="pre">'FFTW_BACKWARD'</span></tt>) is
+scaled by 1/N, where N is the product of the lengths of input array on
+which the FFT is taken. If the direction is <tt class="docutils literal"><span class="pre">'FFTW_FORWARD'</span></tt>, this
+flag makes no difference to the output array.</p>
+<p>When <tt class="docutils literal"><span class="pre">input_array</span></tt> is something other than None, then the passed in
+array is coerced to be the same dtype as the input array used when the
+class was instantiated, the byte-alignment of the passed in array is
+made consistent with the expected byte-alignment and the striding is 
+made consistent with the expected striding. All this may, but not 
+necessarily, require a copy to be made.</p>
+<p>As noted in the <a class="reference internal" href="#scheme-table"><em>scheme table</em></a>, if the FFTW 
+instance describes a backwards real transform of more than one
+dimension, the contents of the input array will be destroyed. It is
+up to the calling function to make a copy if it is necessary to
+maintain the input array.</p>
+<p><tt class="docutils literal"><span class="pre">output_array</span></tt> is always used as-is if possible. If the dtype, the 
+alignment or the striding is incorrect for the FFTW object, then a
+<tt class="docutils literal"><span class="pre">ValueError</span></tt> is raised.</p>
+<p>The coerced input array and the output array (as appropriate) are 
+then passed as arguments to
+<a class="reference internal" href="#pyfftw.FFTW.update_arrays" title="pyfftw.FFTW.update_arrays"><tt class="xref py py-meth docutils literal"><span class="pre">update_arrays()</span></tt></a>, after which
+<a class="reference internal" href="#pyfftw.FFTW.execute" title="pyfftw.FFTW.execute"><tt class="xref py py-meth docutils literal"><span class="pre">execute()</span></tt></a> is called, and then normalisation
+is applied to the output array if that is desired.</p>
+<p>Note that it is possible to pass some data structure that can be
+converted to an array, such as a list, so long as it fits the data
+requirements of the class instance, such as array shape.</p>
+<p>Other than the dtype and the alignment of the passed in arrays, the 
+rest of the requirements on the arrays mandated by
+<a class="reference internal" href="#pyfftw.FFTW.update_arrays" title="pyfftw.FFTW.update_arrays"><tt class="xref py py-meth docutils literal"><span class="pre">update_arrays()</span></tt></a> are enforced.</p>
+<p>A <tt class="docutils literal"><span class="pre">None</span></tt> argument to either keyword means that that array is not 
+updated.</p>
+<p>The result of the FFT is returned. This is the same array that is used
+internally and will be overwritten again on subsequent calls. If you
+need the data to persist longer than a subsequent call, you should
+copy the returned array.</p>
+</dd></dl>
+
+<dl class="method">
+<dt id="pyfftw.FFTW.update_arrays">
+<tt class="descname">update_arrays</tt><big>(</big><em>new_input_array</em>, <em>new_output_array</em><big>)</big><a class="headerlink" href="#pyfftw.FFTW.update_arrays" title="Permalink to this definition">¶</a></dt>
+<dd><p>Update the arrays upon which the DFT is taken.</p>
+<p>The new arrays should be of the same dtypes as the originals, the same
+shapes as the originals and should have the same strides between axes.
+If the original data was aligned so as to allow SIMD instructions
+(e.g. by being aligned on a 16-byte boundary), then the new array must
+also be aligned so as to allow SIMD instructions (assuming, of
+course, that the <tt class="docutils literal"><span class="pre">FFTW_UNALIGNED</span></tt> flag was not enabled).</p>
+<p>The byte alignment requirement extends to requiring natural
+alignment in the non-SIMD cases as well, but this is much less
+stringent as it simply means avoiding arrays shifted by, say,
+a single byte (which invariably takes some effort to
+achieve!).</p>
+<p>If all these conditions are not met, a <tt class="docutils literal"><span class="pre">ValueError</span></tt> will
+be raised and the data will <em>not</em> be updated (though the 
+object will still be in a sane state).</p>
+</dd></dl>
+
+<dl class="method">
+<dt id="pyfftw.FFTW.execute">
+<tt class="descname">execute</tt><big>(</big><big>)</big><a class="headerlink" href="#pyfftw.FFTW.execute" title="Permalink to this definition">¶</a></dt>
+<dd><p>Execute the planned operation, taking the correct kind of FFT of
+the input array (what is returned by <a class="reference internal" href="#pyfftw.FFTW.get_input_array" title="pyfftw.FFTW.get_input_array"><tt class="xref py py-meth docutils literal"><span class="pre">get_input_array()</span></tt></a>), 
+and putting the result in the output array (what is returned by
+<a class="reference internal" href="#pyfftw.FFTW.get_output_array" title="pyfftw.FFTW.get_output_array"><tt class="xref py py-meth docutils literal"><span class="pre">get_output_array()</span></tt></a>).</p>
+</dd></dl>
+
+<dl class="method">
+<dt id="pyfftw.FFTW.get_input_array">
+<tt class="descname">get_input_array</tt><big>(</big><big>)</big><a class="headerlink" href="#pyfftw.FFTW.get_input_array" title="Permalink to this definition">¶</a></dt>
+<dd><p>Return the input array that is associated with the FFTW 
+instance.</p>
+</dd></dl>
+
+<dl class="method">
+<dt id="pyfftw.FFTW.get_output_array">
+<tt class="descname">get_output_array</tt><big>(</big><big>)</big><a class="headerlink" href="#pyfftw.FFTW.get_output_array" title="Permalink to this definition">¶</a></dt>
+<dd><p>Return the output array that is associated with the FFTW
+instance.</p>
+</dd></dl>
+
+</dd></dl>
+
+</div>
+<div class="section" id="wisdom-functions">
+<span id="id1"></span><h2>Wisdom Functions<a class="headerlink" href="#wisdom-functions" title="Permalink to this headline">¶</a></h2>
+<p>Functions for dealing with FFTW’s ability to export and restore plans,
+referred to as <em>wisdom</em>. For further information, refer to the <a class="reference external" href="http://www.fftw.org/fftw3_doc/Words-of-Wisdom_002dSaving-Plans.html#Words-of-Wisdom_002dSaving-Plans">FFTW
+wisdom documentation</a>.</p>
+<dl class="function">
+<dt id="pyfftw.export_wisdom">
+<tt class="descclassname">pyfftw.</tt><tt class="descname">export_wisdom</tt><big>(</big><big>)</big><a class="headerlink" href="#pyfftw.export_wisdom" title="Permalink to this definition">¶</a></dt>
+<dd><p>Return the FFTW wisdom as a tuple of strings.</p>
+<p>The first string in the tuple is the string for the double
+precision wisdom. The second string in the tuple is the string 
+for the single precision wisdom. The third string in the tuple 
+is the string for the long double precision wisdom.</p>
+<p>The tuple that is returned from this function can be used as the
+argument to <a class="reference internal" href="#pyfftw.import_wisdom" title="pyfftw.import_wisdom"><tt class="xref py py-func docutils literal"><span class="pre">import_wisdom()</span></tt></a>.</p>
+</dd></dl>
+
+<dl class="function">
+<dt id="pyfftw.import_wisdom">
+<tt class="descclassname">pyfftw.</tt><tt class="descname">import_wisdom</tt><big>(</big><em>wisdom</em><big>)</big><a class="headerlink" href="#pyfftw.import_wisdom" title="Permalink to this definition">¶</a></dt>
+<dd><p>Function that imports wisdom from the passed tuple
+of strings.</p>
+<p>The first string in the tuple is the string for the double
+precision wisdom. The second string in the tuple is the string 
+for the single precision wisdom. The third string in the tuple 
+is the string for the long double precision wisdom.</p>
+<p>The tuple that is returned from <a class="reference internal" href="#pyfftw.export_wisdom" title="pyfftw.export_wisdom"><tt class="xref py py-func docutils literal"><span class="pre">export_wisdom()</span></tt></a>
+can be used as the argument to this function.</p>
+<p>This function returns a tuple of boolean values indicating
+the success of loading each of the wisdom types (double, float 
+and long double, in that order).</p>
+</dd></dl>
+
+<dl class="function">
+<dt id="pyfftw.forget_wisdom">
+<tt class="descclassname">pyfftw.</tt><tt class="descname">forget_wisdom</tt><big>(</big><big>)</big><a class="headerlink" href="#pyfftw.forget_wisdom" title="Permalink to this definition">¶</a></dt>
+<dd><p>Forget all the accumulated wisdom.</p>
+</dd></dl>
+
+</div>
+<div class="section" id="utility-functions">
+<span id="id2"></span><h2>Utility Functions<a class="headerlink" href="#utility-functions" title="Permalink to this headline">¶</a></h2>
+<dl class="data">
+<dt id="pyfftw.pyfftw.simd_alignment">
+<tt class="descclassname">pyfftw.</tt><tt class="descname">simd_alignment</tt><a class="headerlink" href="#pyfftw.pyfftw.simd_alignment" title="Permalink to this definition">¶</a></dt>
+<dd><p>An integer giving the optimum SIMD alignment in bytes, found by
+inspecting the CPU (e.g. if AVX is supported, its value will be 32).</p>
+<p>This can be used as <tt class="docutils literal"><span class="pre">n</span></tt> in the arguments for <a class="reference internal" href="#pyfftw.n_byte_align" title="pyfftw.n_byte_align"><tt class="xref py py-func docutils literal"><span class="pre">n_byte_align()</span></tt></a> and
+<a class="reference internal" href="#pyfftw.n_byte_align_empty" title="pyfftw.n_byte_align_empty"><tt class="xref py py-func docutils literal"><span class="pre">n_byte_align_empty()</span></tt></a> to create optimally aligned arrays for
+the running platform.</p>
+</dd></dl>
+
+<dl class="function">
+<dt id="pyfftw.n_byte_align">
+<tt class="descclassname">pyfftw.</tt><tt class="descname">n_byte_align</tt><big>(</big><em>array</em>, <em>n</em>, <em>dtype=None</em><big>)</big><a class="headerlink" href="#pyfftw.n_byte_align" title="Permalink to this definition">¶</a></dt>
+<dd><p>Function that takes a numpy array and checks it is aligned on an n-byte
+boundary, where <tt class="docutils literal"><span class="pre">n</span></tt> is a passed parameter. If it is, the array is
+returned without further ado.  If it is not, a new array is created and
+the data copied in, but aligned on the n-byte boundary.</p>
+<p><tt class="docutils literal"><span class="pre">dtype</span></tt> is an optional argument that forces the resultant array to be
+of that dtype.</p>
+</dd></dl>
+
+<dl class="function">
+<dt id="pyfftw.n_byte_align_empty">
+<tt class="descclassname">pyfftw.</tt><tt class="descname">n_byte_align_empty</tt><big>(</big><em>shape</em>, <em>n</em>, <em>dtype='float64'</em>, <em>order='C'</em><big>)</big><a class="headerlink" href="#pyfftw.n_byte_align_empty" title="Permalink to this definition">¶</a></dt>
+<dd><p>Function that returns an empty numpy array
+that is n-byte aligned.</p>
+<p>The alignment is given by the second argument, <tt class="docutils literal"><span class="pre">n</span></tt>.
+The rest of the arguments are as per <a class="reference external" href="http://docs.scipy.org/doc/numpy/reference/generated/numpy.empty.html#numpy.empty" title="(in NumPy v1.7)"><tt class="xref py py-func docutils literal"><span class="pre">numpy.empty()</span></tt></a>.</p>
+</dd></dl>
+
+<dl class="function">
+<dt id="pyfftw.is_n_byte_aligned">
+<tt class="descclassname">pyfftw.</tt><tt class="descname">is_n_byte_aligned</tt><big>(</big><em>array</em>, <em>n</em><big>)</big><a class="headerlink" href="#pyfftw.is_n_byte_aligned" title="Permalink to this definition">¶</a></dt>
+<dd><p>Function that takes a numpy array and checks it is aligned on an n-byte
+boundary, where <tt class="docutils literal"><span class="pre">n</span></tt> is a passed parameter, returning <tt class="docutils literal"><span class="pre">True</span></tt> if it is,
+and <tt class="docutils literal"><span class="pre">False</span></tt> if it is not.</p>
+</dd></dl>
+
+</div>
+</div>
+
+
+          </div>
+        </div>
+      </div>
+      <div class="sphinxsidebar">
+        <div class="sphinxsidebarwrapper">
+  <h3><a href="../index.html">Table Of Contents</a></h3>
+  <ul>
+<li><a class="reference internal" href="#"><tt class="docutils literal"><span class="pre">pyfftw</span></tt> - The core</a><ul>
+<li><a class="reference internal" href="#fftw-class">FFTW Class</a></li>
+<li><a class="reference internal" href="#wisdom-functions">Wisdom Functions</a></li>
+<li><a class="reference internal" href="#utility-functions">Utility Functions</a></li>
+</ul>
+</li>
+</ul>
+
+  <h4>Previous topic</h4>
+  <p class="topless"><a href="../sphinx/api.html"
+                        title="previous chapter">API Reference</a></p>
+  <h4>Next topic</h4>
+  <p class="topless"><a href="builders/builders.html"
+                        title="next chapter"><tt class="docutils literal docutils literal docutils literal"><span class="pre">pyfftw.builders</span></tt> - Get <tt class="docutils literal docutils literal docutils literal"><span class="pre">FFTW</span></tt> objects using a <tt class="xref py py-mod docutils literal docutils literal docutils literal"><span class="pre">numpy.fft</span></tt> like interface</a></p>
+  <h3>This Page</h3>
+  <ul class="this-page-menu">
+    <li><a href="../_sources/pyfftw/pyfftw.txt"
+           rel="nofollow">Show Source</a></li>
+  </ul>
+<div id="searchbox" style="display: none">
+  <h3>Quick search</h3>
+    <form class="search" action="../search.html" method="get">
+      <input type="text" name="q" />
+      <input type="submit" value="Go" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    <p class="searchtip" style="font-size: 90%">
+    Enter search terms or a module, class or function name.
+    </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             >index</a></li>
+        <li class="right" >
+          <a href="../py-modindex.html" title="Python Module Index"
+             >modules</a> |</li>
+        <li class="right" >
+          <a href="builders/builders.html" title="pyfftw.builders - Get FFTW objects using a numpy.fft like interface"
+             >next</a> |</li>
+        <li class="right" >
+          <a href="../sphinx/api.html" title="API Reference"
+             >previous</a> |</li>
+        <li><a href="../index.html">pyFFTW 0.9.2 documentation</a> »</li>
+          <li><a href="../sphinx/api.html" >API Reference</a> »</li> 
+      </ul>
+    </div>
+    <div class="footer">
+        © Copyright 2013, Henry Gomersall.
+      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
+    </div>
+  </body>
+</html>
\ No newline at end of file
diff --git a/docs/html/search.html b/docs/html/search.html
new file mode 100644
index 0000000..e584110
--- /dev/null
+++ b/docs/html/search.html
@@ -0,0 +1,107 @@
+
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    
+    <title>Search — pyFFTW 0.9.2 documentation</title>
+    
+    <link rel="stylesheet" href="_static/default.css" type="text/css" />
+    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
+    
+    <script type="text/javascript">
+      var DOCUMENTATION_OPTIONS = {
+        URL_ROOT:    '',
+        VERSION:     '0.9.2',
+        COLLAPSE_INDEX: false,
+        FILE_SUFFIX: '.html',
+        HAS_SOURCE:  true
+      };
+    </script>
+    <script type="text/javascript" src="_static/jquery.js"></script>
+    <script type="text/javascript" src="_static/underscore.js"></script>
+    <script type="text/javascript" src="_static/doctools.js"></script>
+    <script type="text/javascript" src="_static/searchtools.js"></script>
+    <link rel="top" title="pyFFTW 0.9.2 documentation" href="index.html" />
+  <script type="text/javascript">
+    jQuery(function() { Search.loadIndex("searchindex.js"); });
+  </script>
+  
+  <script type="text/javascript" id="searchindexloader"></script>
+   
+
+  </head>
+  <body>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="genindex.html" title="General Index"
+             accesskey="I">index</a></li>
+        <li class="right" >
+          <a href="py-modindex.html" title="Python Module Index"
+             >modules</a> |</li>
+        <li><a href="index.html">pyFFTW 0.9.2 documentation</a> »</li> 
+      </ul>
+    </div>  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          <div class="body">
+            
+  <h1 id="search-documentation">Search</h1>
+  <div id="fallback" class="admonition warning">
+  <script type="text/javascript">$('#fallback').hide();</script>
+  <p>
+    Please activate JavaScript to enable the search
+    functionality.
+  </p>
+  </div>
+  <p>
+    From here you can search these documents. Enter your search
+    words into the box below and click "search". Note that the search
+    function will automatically search for all of the words. Pages
+    containing fewer words won't appear in the result list.
+  </p>
+  <form action="" method="get">
+    <input type="text" name="q" value="" />
+    <input type="submit" value="search" />
+    <span id="search-progress" style="padding-left: 10px"></span>
+  </form>
+  
+  <div id="search-results">
+  
+  </div>
+
+          </div>
+        </div>
+      </div>
+      <div class="sphinxsidebar">
+        <div class="sphinxsidebarwrapper">
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="genindex.html" title="General Index"
+             >index</a></li>
+        <li class="right" >
+          <a href="py-modindex.html" title="Python Module Index"
+             >modules</a> |</li>
+        <li><a href="index.html">pyFFTW 0.9.2 documentation</a> »</li> 
+      </ul>
+    </div>
+    <div class="footer">
+        © Copyright 2013, Henry Gomersall.
+      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
+    </div>
+  </body>
+</html>
\ No newline at end of file
diff --git a/docs/html/searchindex.js b/docs/html/searchindex.js
new file mode 100644
index 0000000..fdb7d9c
--- /dev/null
+++ b/docs/html/searchindex.js
@@ -0,0 +1 @@
+Search.setIndex({objects:{"":{pyfftw:[2,0,1,""]},pyfftw:{n_byte_align:[2,1,1,""],import_wisdom:[2,1,1,""],is_n_byte_aligned:[2,1,1,""],interfaces:[8,0,1,""],FFTW:[2,5,1,""],n_byte_align_empty:[2,1,1,""],export_wisdom:[2,1,1,""],builders:[0,0,1,""],forget_wisdom:[2,1,1,""]},"pyfftw.interfaces.numpy_fft":{irfft2:[3,1,1,""],irfft:[3,1,1,""],ifft:[3,1,1,""],rfftn:[3,1,1,""],fft:[3,1,1,""],ifft2:[3,1,1,""],fft2:[3,1,1,""],fftn:[3,1,1,""],rfft2:[3,1,1,""],rfft:[3,1,1,""],irfftn:[3,1,1,""],ifft [...]
\ No newline at end of file
diff --git a/docs/html/sphinx/api.html b/docs/html/sphinx/api.html
new file mode 100644
index 0000000..e4fea2f
--- /dev/null
+++ b/docs/html/sphinx/api.html
@@ -0,0 +1,146 @@
+
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    
+    <title>API Reference — pyFFTW 0.9.2 documentation</title>
+    
+    <link rel="stylesheet" href="../_static/default.css" type="text/css" />
+    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
+    
+    <script type="text/javascript">
+      var DOCUMENTATION_OPTIONS = {
+        URL_ROOT:    '../',
+        VERSION:     '0.9.2',
+        COLLAPSE_INDEX: false,
+        FILE_SUFFIX: '.html',
+        HAS_SOURCE:  true
+      };
+    </script>
+    <script type="text/javascript" src="../_static/jquery.js"></script>
+    <script type="text/javascript" src="../_static/underscore.js"></script>
+    <script type="text/javascript" src="../_static/doctools.js"></script>
+    <link rel="top" title="pyFFTW 0.9.2 documentation" href="../index.html" />
+    <link rel="next" title="pyfftw - The core" href="../pyfftw/pyfftw.html" />
+    <link rel="prev" title="Overview and A Short Tutorial" href="tutorial.html" /> 
+  </head>
+  <body>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             accesskey="I">index</a></li>
+        <li class="right" >
+          <a href="../py-modindex.html" title="Python Module Index"
+             >modules</a> |</li>
+        <li class="right" >
+          <a href="../pyfftw/pyfftw.html" title="pyfftw - The core"
+             accesskey="N">next</a> |</li>
+        <li class="right" >
+          <a href="tutorial.html" title="Overview and A Short Tutorial"
+             accesskey="P">previous</a> |</li>
+        <li><a href="../index.html">pyFFTW 0.9.2 documentation</a> »</li> 
+      </ul>
+    </div>  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          <div class="body">
+            
+  <div class="section" id="api-reference">
+<h1>API Reference<a class="headerlink" href="#api-reference" title="Permalink to this headline">¶</a></h1>
+<div class="toctree-wrapper compound">
+<ul>
+<li class="toctree-l1"><a class="reference internal" href="../pyfftw/pyfftw.html"><tt class="docutils literal"><span class="pre">pyfftw</span></tt> - The core</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="../pyfftw/pyfftw.html#fftw-class">FFTW Class</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../pyfftw/pyfftw.html#wisdom-functions">Wisdom Functions</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../pyfftw/pyfftw.html#utility-functions">Utility Functions</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="../pyfftw/builders/builders.html"><tt class="docutils literal"><span class="pre">pyfftw.builders</span></tt> - Get <tt class="docutils literal"><span class="pre">FFTW</span></tt> objects using a <tt class="xref py py-mod docutils literal"><span class="pre">numpy.fft</span></tt> like interface</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="../pyfftw/builders/builders.html#overview">Overview</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../pyfftw/builders/builders.html#supported-functions-and-caveats">Supported Functions and Caveats</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../pyfftw/builders/builders.html#additional-arguments">Additional Arguments</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../pyfftw/builders/builders.html#the-functions">The Functions</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="../pyfftw/builders/_utils.html"><tt class="docutils literal"><span class="pre">pyfftw.builders._utils</span></tt> - Helper functions for <tt class="docutils literal"><span class="pre">pyfftw.builders</span></tt></a></li>
+<li class="toctree-l1"><a class="reference internal" href="../pyfftw/interfaces/interfaces.html"><tt class="docutils literal"><span class="pre">pyfftw.interfaces</span></tt> - Drop in replacements for other FFT implementations</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="../pyfftw/interfaces/interfaces.html#implemented-functions">Implemented Functions</a><ul>
+<li class="toctree-l3"><a class="reference internal" href="../pyfftw/interfaces/interfaces.html#numpy-fft"><tt class="docutils literal"><span class="pre">numpy_fft</span></tt></a></li>
+<li class="toctree-l3"><a class="reference internal" href="../pyfftw/interfaces/interfaces.html#scipy-fftpack"><tt class="docutils literal"><span class="pre">scipy_fftpack</span></tt></a></li>
+</ul>
+</li>
+<li class="toctree-l2"><a class="reference internal" href="../pyfftw/interfaces/interfaces.html#additional-arguments">Additional Arguments</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../pyfftw/interfaces/interfaces.html#module-pyfftw.interfaces.cache">Caching</a></li>
+</ul>
+</li>
+</ul>
+</div>
+</div>
+
+
+          </div>
+        </div>
+      </div>
+      <div class="sphinxsidebar">
+        <div class="sphinxsidebarwrapper">
+  <h4>Previous topic</h4>
+  <p class="topless"><a href="tutorial.html"
+                        title="previous chapter">Overview and A Short Tutorial</a></p>
+  <h4>Next topic</h4>
+  <p class="topless"><a href="../pyfftw/pyfftw.html"
+                        title="next chapter"><tt class="docutils literal docutils literal docutils literal"><span class="pre">pyfftw</span></tt> - The core</a></p>
+  <h3>This Page</h3>
+  <ul class="this-page-menu">
+    <li><a href="../_sources/sphinx/api.txt"
+           rel="nofollow">Show Source</a></li>
+  </ul>
+<div id="searchbox" style="display: none">
+  <h3>Quick search</h3>
+    <form class="search" action="../search.html" method="get">
+      <input type="text" name="q" />
+      <input type="submit" value="Go" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    <p class="searchtip" style="font-size: 90%">
+    Enter search terms or a module, class or function name.
+    </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             >index</a></li>
+        <li class="right" >
+          <a href="../py-modindex.html" title="Python Module Index"
+             >modules</a> |</li>
+        <li class="right" >
+          <a href="../pyfftw/pyfftw.html" title="pyfftw - The core"
+             >next</a> |</li>
+        <li class="right" >
+          <a href="tutorial.html" title="Overview and A Short Tutorial"
+             >previous</a> |</li>
+        <li><a href="../index.html">pyFFTW 0.9.2 documentation</a> »</li> 
+      </ul>
+    </div>
+    <div class="footer">
+        © Copyright 2013, Henry Gomersall.
+      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
+    </div>
+  </body>
+</html>
\ No newline at end of file
diff --git a/docs/html/sphinx/tutorial.html b/docs/html/sphinx/tutorial.html
new file mode 100644
index 0000000..a57d663
--- /dev/null
+++ b/docs/html/sphinx/tutorial.html
@@ -0,0 +1,507 @@
+
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    
+    <title>Overview and A Short Tutorial — pyFFTW 0.9.2 documentation</title>
+    
+    <link rel="stylesheet" href="../_static/default.css" type="text/css" />
+    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
+    
+    <script type="text/javascript">
+      var DOCUMENTATION_OPTIONS = {
+        URL_ROOT:    '../',
+        VERSION:     '0.9.2',
+        COLLAPSE_INDEX: false,
+        FILE_SUFFIX: '.html',
+        HAS_SOURCE:  true
+      };
+    </script>
+    <script type="text/javascript" src="../_static/jquery.js"></script>
+    <script type="text/javascript" src="../_static/underscore.js"></script>
+    <script type="text/javascript" src="../_static/doctools.js"></script>
+    <link rel="top" title="pyFFTW 0.9.2 documentation" href="../index.html" />
+    <link rel="next" title="API Reference" href="api.html" />
+    <link rel="prev" title="Welcome to pyFFTW’s documentation!" href="../index.html" /> 
+  </head>
+  <body>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             accesskey="I">index</a></li>
+        <li class="right" >
+          <a href="../py-modindex.html" title="Python Module Index"
+             >modules</a> |</li>
+        <li class="right" >
+          <a href="api.html" title="API Reference"
+             accesskey="N">next</a> |</li>
+        <li class="right" >
+          <a href="../index.html" title="Welcome to pyFFTW’s documentation!"
+             accesskey="P">previous</a> |</li>
+        <li><a href="../index.html">pyFFTW 0.9.2 documentation</a> »</li> 
+      </ul>
+    </div>  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          <div class="body">
+            
+  <div class="section" id="overview-and-a-short-tutorial">
+<h1>Overview and A Short Tutorial<a class="headerlink" href="#overview-and-a-short-tutorial" title="Permalink to this headline">¶</a></h1>
+<p>Before we begin, we assume that you are already familiar with the
+<a class="reference external" href="http://en.wikipedia.org/wiki/Discrete_Fourier_transform">discrete Fourier transform</a>,
+and why you want a faster library to perform your FFTs for you.</p>
+<p><a class="reference external" href="http://www.fftw.org/">FFTW</a> is a very fast FFT C library. The way it
+is designed to work is by planning <em>in advance</em> the fastest way to
+perform a particular transform.  It does this by trying lots of
+different techniques and measuring the fastest way, so called
+<em>planning</em>.</p>
+<p>One consequence of this is that the user needs to specify in advance
+exactly what transform is needed, including things like the data type,
+the array shapes and strides and the precision. This is quite
+different to how one uses, for example, the <a class="reference external" href="http://docs.scipy.org/doc/numpy/reference/routines.fft.html#numpy.fft" title="(in NumPy v1.7)"><tt class="xref py py-mod docutils literal"><span class="pre">numpy.fft</span></tt></a> module.</p>
+<p>The purpose of this library is to provide a simple and pythonic way
+to interact with FFTW, benefiting from the substantial speed-ups it
+offers. In addition to the method of using FFTW as described above,
+a convenient series of functions are included through <a class="reference internal" href="../pyfftw/interfaces/interfaces.html#module-pyfftw.interfaces" title="pyfftw.interfaces"><tt class="xref py py-mod docutils literal"><span class="pre">pyfftw.interfaces</span></tt></a>
+that make using <a class="reference internal" href="../pyfftw/pyfftw.html#module-pyfftw" title="pyfftw"><tt class="xref py py-mod docutils literal"><span class="pre">pyfftw</span></tt></a> almost equivalent to <a class="reference external" href="http://docs.scipy.org/doc/numpy/reference/routines.fft.html#numpy.fft" title="(in NumPy v1.7)"><tt class="xref py py-mod docutils literal"><span class="pre">numpy.fft</span></tt></a>.</p>
+<p>This tutorial is split into three parts. A quick introduction to the
+<a class="reference internal" href="../pyfftw/interfaces/interfaces.html#module-pyfftw.interfaces" title="pyfftw.interfaces"><tt class="xref py py-mod docutils literal"><span class="pre">pyfftw.interfaces</span></tt></a> module is <a class="reference internal" href="#interfaces-tutorial"><em>given</em></a>, the
+most simple and direct way to use <a class="reference internal" href="../pyfftw/pyfftw.html#module-pyfftw" title="pyfftw"><tt class="xref py py-mod docutils literal"><span class="pre">pyfftw</span></tt></a>. Secondly an
+<a class="reference internal" href="#fftw-tutorial"><em>overview</em></a> is given of <a class="reference internal" href="../pyfftw/pyfftw.html#pyfftw.FFTW" title="pyfftw.FFTW"><tt class="xref py py-class docutils literal"><span class="pre">pyfftw.FFTW</span></tt></a>, the core
+of the library. Finally, the <a class="reference internal" href="../pyfftw/builders/builders.html#module-pyfftw.builders" title="pyfftw.builders"><tt class="xref py py-mod docutils literal"><span class="pre">pyfftw.builders</span></tt></a> helper functions are
+<a class="reference internal" href="#builders-tutorial"><em>introduced</em></a>, which ease the creation of
+<a class="reference internal" href="../pyfftw/pyfftw.html#pyfftw.FFTW" title="pyfftw.FFTW"><tt class="xref py py-class docutils literal"><span class="pre">pyfftw.FFTW</span></tt></a> objects.</p>
+<div class="section" id="quick-and-easy-the-pyfftw-interfaces-module">
+<span id="interfaces-tutorial"></span><h2>Quick and easy: the <a class="reference internal" href="../pyfftw/interfaces/interfaces.html#module-pyfftw.interfaces" title="pyfftw.interfaces"><tt class="xref py py-mod docutils literal"><span class="pre">pyfftw.interfaces</span></tt></a> module<a class="headerlink" href="#quick-and-easy-the-pyfftw-interfaces-module" title="Permalink to this headline">¶</a></h2>
+<p>The easiest way to begin using <a class="reference internal" href="../pyfftw/pyfftw.html#module-pyfftw" title="pyfftw"><tt class="xref py py-mod docutils literal"><span class="pre">pyfftw</span></tt></a> is through the
+<a class="reference internal" href="../pyfftw/interfaces/interfaces.html#module-pyfftw.interfaces" title="pyfftw.interfaces"><tt class="xref py py-mod docutils literal"><span class="pre">pyfftw.interfaces</span></tt></a> module. This module implements two APIs:
+<a class="reference internal" href="../pyfftw/interfaces/numpy_fft.html#module-pyfftw.interfaces.numpy_fft" title="pyfftw.interfaces.numpy_fft"><tt class="xref py py-mod docutils literal"><span class="pre">pyfftw.interfaces.numpy_fft</span></tt></a> and
+<a class="reference internal" href="../pyfftw/interfaces/scipy_fftpack.html#module-pyfftw.interfaces.scipy_fftpack" title="pyfftw.interfaces.scipy_fftpack"><tt class="xref py py-mod docutils literal"><span class="pre">pyfftw.interfaces.scipy_fftpack</span></tt></a> which are (apart from a small
+caveat <a class="footnote-reference" href="#caveat" id="id1">[1]</a>) drop in replacements for <a class="reference external" href="http://docs.scipy.org/doc/numpy/reference/routines.fft.html#numpy.fft" title="(in NumPy v1.7)"><tt class="xref py py-mod docutils literal"><span class="pre">numpy.fft</span></tt></a> and
+<a class="reference external" href="http://docs.scipy.org/doc/scipy/reference/fftpack.html#scipy.fftpack" title="(in SciPy v0.12)"><tt class="xref py py-mod docutils literal"><span class="pre">scipy.fftpack</span></tt></a> respectively.</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="kn">import</span> <span class="nn">pyfftw</span>
+<span class="gp">>>> </span><span class="kn">import</span> <span class="nn">numpy</span>
+<span class="gp">>>> </span><span class="n">a</span> <span class="o">=</span> <span class="n">pyfftw</span><span class="o">.</span><span class="n">n_byte_align_empty</span><span class="p">(</span><span class="mi">128</span><span class="p">,</span> <span class="mi">16</span><span class="p">,</span> <span class="s">'complex128'</span><span class="p">)</span>
+<span class="gp">>>> </span><span class="n">a</span><span class="p">[:]</span> <span class="o">=</span> <span class="n">numpy</span><span class="o">.</span><span class="n">random</span><span class="o">.</span><span class="n">randn</span><span class="p">(</span><span class="mi">128</span><span class="p">)</span> <span class="o">+</span> <span class="mi">1j</span><span class="o">*</span><span class="n">numpy</span><span class="o">.</span><span class="n">random</span><span class="o [...]
+<span class="gp">>>> </span><span class="n">b</span> <span class="o">=</span> <span class="n">pyfftw</span><span class="o">.</span><span class="n">interfaces</span><span class="o">.</span><span class="n">numpy_fft</span><span class="o">.</span><span class="n">fft</span><span class="p">(</span><span class="n">a</span><span class="p">)</span>
+<span class="gp">>>> </span><span class="n">c</span> <span class="o">=</span> <span class="n">numpy</span><span class="o">.</span><span class="n">fft</span><span class="o">.</span><span class="n">fft</span><span class="p">(</span><span class="n">a</span><span class="p">)</span>
+<span class="gp">>>> </span><span class="n">numpy</span><span class="o">.</span><span class="n">allclose</span><span class="p">(</span><span class="n">b</span><span class="p">,</span> <span class="n">c</span><span class="p">)</span>
+<span class="go">True</span>
+</pre></div>
+</div>
+<p>We initially create and fill a complex array, <tt class="docutils literal"><span class="pre">a</span></tt>, of length 128.
+<a class="reference internal" href="../pyfftw/pyfftw.html#pyfftw.n_byte_align_empty" title="pyfftw.n_byte_align_empty"><tt class="xref py py-func docutils literal"><span class="pre">pyfftw.n_byte_align_empty()</span></tt></a> is a helper function that works like
+<a class="reference external" href="http://docs.scipy.org/doc/numpy/reference/generated/numpy.empty.html#numpy.empty" title="(in NumPy v1.7)"><tt class="xref py py-func docutils literal"><span class="pre">numpy.empty()</span></tt></a> but returns the array aligned to a particular number of
+bytes in memory, in this case 16. Having byte aligned arrays allows FFTW to
+performed vector operations, potentially speeding up the FFT (a similar
+<a class="reference internal" href="../pyfftw/pyfftw.html#pyfftw.n_byte_align" title="pyfftw.n_byte_align"><tt class="xref py py-func docutils literal"><span class="pre">pyfftw.n_byte_align()</span></tt></a> exists to align a pre-existing array as
+necessary).</p>
+<p>Calling <a class="reference internal" href="../pyfftw/interfaces/numpy_fft.html#pyfftw.interfaces.numpy_fft.fft" title="pyfftw.interfaces.numpy_fft.fft"><tt class="xref py py-func docutils literal"><span class="pre">pyfftw.interfaces.numpy_fft.fft()</span></tt></a> on <tt class="docutils literal"><span class="pre">a</span></tt> gives the same
+output (to numerical precision) as calling <a class="reference external" href="http://docs.scipy.org/doc/numpy/reference/generated/numpy.fft.fft.html#numpy.fft.fft" title="(in NumPy v1.7)"><tt class="xref py py-func docutils literal"><span class="pre">numpy.fft.fft()</span></tt></a> on <tt class="docutils literal"><span class="pre">a</span></tt>.</p>
+<p>If you wanted to modify existing code that uses <a class="reference external" href="http://docs.scipy.org/doc/numpy/reference/routines.fft.html#numpy.fft" title="(in NumPy v1.7)"><tt class="xref py py-mod docutils literal"><span class="pre">numpy.fft</span></tt></a> to use
+<a class="reference internal" href="../pyfftw/interfaces/interfaces.html#module-pyfftw.interfaces" title="pyfftw.interfaces"><tt class="xref py py-mod docutils literal"><span class="pre">pyfftw.interfaces</span></tt></a>, this is done simply by replacing all instances of
+<a class="reference external" href="http://docs.scipy.org/doc/numpy/reference/routines.fft.html#numpy.fft" title="(in NumPy v1.7)"><tt class="xref py py-mod docutils literal"><span class="pre">numpy.fft</span></tt></a> with <a class="reference internal" href="../pyfftw/interfaces/numpy_fft.html#module-pyfftw.interfaces.numpy_fft" title="pyfftw.interfaces.numpy_fft"><tt class="xref py py-mod docutils literal"><span class="pre">pyfftw.interfaces.numpy_fft</span></tt></a> (similarly for
+<a class="reference external" href="http://docs.scipy.org/doc/scipy/reference/fftpack.html#scipy.fftpack" title="(in SciPy v0.12)"><tt class="xref py py-mod docutils literal"><span class="pre">scipy.fftpack</span></tt></a> and <a class="reference internal" href="../pyfftw/interfaces/scipy_fftpack.html#module-pyfftw.interfaces.scipy_fftpack" title="pyfftw.interfaces.scipy_fftpack"><tt class="xref py py-mod docutils literal"><span class="pre">pyfftw.interfaces.scipy_fftpack</span></tt></a> [...]
+optionally, enabling the cache (see below).</p>
+<p>The first call for a given transform size and shape and dtype and so on
+may be slow, this is down to FFTW needing to plan the transform for the first
+time. Once this has been done, subsequent equivalent transforms during the
+same session are much faster. It’s possible to export and save the internal
+knowledge (the <em>wisdom</em>) about how the transform is done. This is described
+<a class="reference internal" href="#wisdom-tutorial"><em>below</em></a>.</p>
+<p>Even after the first transform of a given specification has been performed,
+subsequent transforms are never as fast as using <a class="reference internal" href="../pyfftw/pyfftw.html#pyfftw.FFTW" title="pyfftw.FFTW"><tt class="xref py py-class docutils literal"><span class="pre">pyfftw.FFTW</span></tt></a> objects
+directly, and in many cases are substantially slower. This is because of the
+internal overhead of creating a new <a class="reference internal" href="../pyfftw/pyfftw.html#pyfftw.FFTW" title="pyfftw.FFTW"><tt class="xref py py-class docutils literal"><span class="pre">pyfftw.FFTW</span></tt></a> object on every call.
+For this reason, a cache is provided, which is recommended to be used whenever
+<a class="reference internal" href="../pyfftw/interfaces/interfaces.html#module-pyfftw.interfaces" title="pyfftw.interfaces"><tt class="xref py py-mod docutils literal"><span class="pre">pyfftw.interfaces</span></tt></a> is used. Turn the cache on using
+<a class="reference internal" href="../pyfftw/interfaces/interfaces.html#pyfftw.interfaces.cache.enable" title="pyfftw.interfaces.cache.enable"><tt class="xref py py-func docutils literal"><span class="pre">pyfftw.interfaces.cache.enable()</span></tt></a>. This function turns the cache on
+globally. Note that using the cache invokes the threading module.</p>
+<p>The cache temporarily stores a copy of any interim <a class="reference internal" href="../pyfftw/pyfftw.html#pyfftw.FFTW" title="pyfftw.FFTW"><tt class="xref py py-class docutils literal"><span class="pre">pyfftw.FFTW</span></tt></a>
+objects that are created. If they are not used for some period of time,
+which can be set with <a class="reference internal" href="../pyfftw/interfaces/interfaces.html#pyfftw.interfaces.cache.set_keepalive_time" title="pyfftw.interfaces.cache.set_keepalive_time"><tt class="xref py py-func docutils literal"><span class="pre">pyfftw.interfaces.cache.set_keepalive_time()</span></tt></a>,
+then they are removed from the cache (liberating any associated memory).
+The default keepalive time is 0.1 seconds.</p>
+<p><strong>Monkey patching 3rd party libraries</strong></p>
+<p>Since <a class="reference internal" href="../pyfftw/interfaces/numpy_fft.html#module-pyfftw.interfaces.numpy_fft" title="pyfftw.interfaces.numpy_fft"><tt class="xref py py-mod docutils literal"><span class="pre">pyfftw.interfaces.numpy_fft</span></tt></a> and
+<a class="reference internal" href="../pyfftw/interfaces/scipy_fftpack.html#module-pyfftw.interfaces.scipy_fftpack" title="pyfftw.interfaces.scipy_fftpack"><tt class="xref py py-mod docutils literal"><span class="pre">pyfftw.interfaces.scipy_fftpack</span></tt></a> are drop-in replacements for their
+<a class="reference external" href="http://docs.scipy.org/doc/numpy/reference/routines.fft.html#numpy.fft" title="(in NumPy v1.7)"><tt class="xref py py-mod docutils literal"><span class="pre">numpy.fft</span></tt></a> and <a class="reference external" href="http://docs.scipy.org/doc/scipy/reference/fftpack.html#scipy.fftpack" title="(in SciPy v0.12)"><tt class="xref py py-mod docutils literal"><span class="pre">scipy.fftpack</span></tt></a> libraries respectively, it is
+possible use them as replacements at run-time through monkey patching.</p>
+<p>The following code demonstrates <a class="reference external" href="http://docs.scipy.org/doc/scipy/reference/generated/scipy.signal.fftconvolve.html#scipy.signal.fftconvolve" title="(in SciPy v0.12)"><tt class="xref py py-func docutils literal"><span class="pre">scipy.signal.fftconvolve()</span></tt></a> being monkey
+patched in order to speed it up.</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="kn">import</span> <span class="nn">pyfftw</span>
+<span class="kn">import</span> <span class="nn">scipy.signal</span>
+<span class="kn">import</span> <span class="nn">numpy</span>
+<span class="kn">from</span> <span class="nn">timeit</span> <span class="kn">import</span> <span class="n">Timer</span>
+
+<span class="n">a</span> <span class="o">=</span> <span class="n">pyfftw</span><span class="o">.</span><span class="n">n_byte_align_empty</span><span class="p">((</span><span class="mi">128</span><span class="p">,</span> <span class="mi">64</span><span class="p">),</span> <span class="mi">16</span><span class="p">,</span> <span class="n">dtype</span><span class="o">=</span><span class="s">'complex128'</span><span class="p">)</span>
+<span class="n">b</span> <span class="o">=</span> <span class="n">pyfftw</span><span class="o">.</span><span class="n">n_byte_align_empty</span><span class="p">((</span><span class="mi">128</span><span class="p">,</span> <span class="mi">64</span><span class="p">),</span> <span class="mi">16</span><span class="p">,</span> <span class="n">dtype</span><span class="o">=</span><span class="s">'complex128'</span><span class="p">)</span>
+
+<span class="n">a</span><span class="p">[:]</span> <span class="o">=</span> <span class="n">numpy</span><span class="o">.</span><span class="n">random</span><span class="o">.</span><span class="n">randn</span><span class="p">(</span><span class="mi">128</span><span class="p">,</span> <span class="mi">64</span><span class="p">)</span> <span class="o">+</span> <span class="mi">1j</span><span class="o">*</span><span class="n">numpy</span><span class="o">.</span><span class="n">random</span> [...]
+<span class="n">b</span><span class="p">[:]</span> <span class="o">=</span> <span class="n">numpy</span><span class="o">.</span><span class="n">random</span><span class="o">.</span><span class="n">randn</span><span class="p">(</span><span class="mi">128</span><span class="p">,</span> <span class="mi">64</span><span class="p">)</span> <span class="o">+</span> <span class="mi">1j</span><span class="o">*</span><span class="n">numpy</span><span class="o">.</span><span class="n">random</span> [...]
+
+<span class="n">t</span> <span class="o">=</span> <span class="n">Timer</span><span class="p">(</span><span class="k">lambda</span><span class="p">:</span> <span class="n">scipy</span><span class="o">.</span><span class="n">signal</span><span class="o">.</span><span class="n">fftconvolve</span><span class="p">(</span><span class="n">a</span><span class="p">,</span> <span class="n">b</span><span class="p">))</span>
+
+<span class="k">print</span><span class="p">(</span><span class="s">'Time with scipy.fftpack: </span><span class="si">%1.3f</span><span class="s"> seconds'</span> <span class="o">%</span> <span class="n">t</span><span class="o">.</span><span class="n">timeit</span><span class="p">(</span><span class="n">number</span><span class="o">=</span><span class="mi">100</span><span class="p">))</span>
+
+<span class="c"># Monkey patch in fftn and ifftn from pyfftw.interfaces.scipy_fftpack</span>
+<span class="n">scipy</span><span class="o">.</span><span class="n">signal</span><span class="o">.</span><span class="n">signaltools</span><span class="o">.</span><span class="n">fftn</span> <span class="o">=</span> <span class="n">pyfftw</span><span class="o">.</span><span class="n">interfaces</span><span class="o">.</span><span class="n">scipy_fftpack</span><span class="o">.</span><span class="n">fftn</span>
+<span class="n">scipy</span><span class="o">.</span><span class="n">signal</span><span class="o">.</span><span class="n">signaltools</span><span class="o">.</span><span class="n">ifftn</span> <span class="o">=</span> <span class="n">pyfftw</span><span class="o">.</span><span class="n">interfaces</span><span class="o">.</span><span class="n">scipy_fftpack</span><span class="o">.</span><span class="n">ifftn</span>
+<span class="n">scipy</span><span class="o">.</span><span class="n">signal</span><span class="o">.</span><span class="n">fftconvolve</span><span class="p">(</span><span class="n">a</span><span class="p">,</span> <span class="n">b</span><span class="p">)</span> <span class="c"># We cheat a bit by doing the planning first</span>
+
+<span class="c"># Turn on the cache for optimum performance</span>
+<span class="n">pyfftw</span><span class="o">.</span><span class="n">interfaces</span><span class="o">.</span><span class="n">cache</span><span class="o">.</span><span class="n">enable</span><span class="p">()</span>
+
+<span class="k">print</span><span class="p">(</span><span class="s">'Time with monkey patched scipy_fftpack: </span><span class="si">%1.3f</span><span class="s"> seconds'</span> <span class="o">%</span>
+       <span class="n">t</span><span class="o">.</span><span class="n">timeit</span><span class="p">(</span><span class="n">number</span><span class="o">=</span><span class="mi">100</span><span class="p">))</span>
+</pre></div>
+</div>
+<p>which outputs something like:</p>
+<div class="highlight-none"><div class="highlight"><pre>Time with scipy.fftpack: 0.598 seconds
+Time with monkey patched scipy_fftpack: 0.251 seconds
+</pre></div>
+</div>
+</div>
+<div class="section" id="the-workhorse-pyfftw-fftw-class">
+<span id="fftw-tutorial"></span><h2>The workhorse <a class="reference internal" href="../pyfftw/pyfftw.html#pyfftw.FFTW" title="pyfftw.FFTW"><tt class="xref py py-class docutils literal"><span class="pre">pyfftw.FFTW</span></tt></a> class<a class="headerlink" href="#the-workhorse-pyfftw-fftw-class" title="Permalink to this headline">¶</a></h2>
+<p>The core of this library is provided through the <a class="reference internal" href="../pyfftw/pyfftw.html#pyfftw.FFTW" title="pyfftw.FFTW"><tt class="xref py py-class docutils literal"><span class="pre">pyfftw.FFTW</span></tt></a>
+class. FFTW is fully encapsulated within this class.</p>
+<p>The following gives an overview of the <a class="reference internal" href="../pyfftw/pyfftw.html#pyfftw.FFTW" title="pyfftw.FFTW"><tt class="xref py py-class docutils literal"><span class="pre">pyfftw.FFTW</span></tt></a> class, but
+the easiest way to of dealing with it is through the
+<a class="reference internal" href="../pyfftw/builders/builders.html#module-pyfftw.builders" title="pyfftw.builders"><tt class="xref py py-mod docutils literal"><span class="pre">pyfftw.builders</span></tt></a> helper functions, also
+<a class="reference internal" href="#builders-tutorial"><em>discussed in this tutorial</em></a>.</p>
+<p>For users that already have some experience of FFTW, there is no
+interface distinction between any of the supported data types, shapes
+or transforms, and operating on arbitrarily strided arrays (which are
+common when using <a class="reference external" href="http://docs.scipy.org/doc/numpy/reference/index.html#numpy" title="(in NumPy v1.7)"><tt class="xref py py-mod docutils literal"><span class="pre">numpy</span></tt></a>) is fully supported with no copies
+necessary.</p>
+<p>In its simplest form, a <a class="reference internal" href="../pyfftw/pyfftw.html#pyfftw.FFTW" title="pyfftw.FFTW"><tt class="xref py py-class docutils literal"><span class="pre">pyfftw.FFTW</span></tt></a> object is created with
+a pair of complementary <a class="reference external" href="http://docs.scipy.org/doc/numpy/reference/index.html#numpy" title="(in NumPy v1.7)"><tt class="xref py py-mod docutils literal"><span class="pre">numpy</span></tt></a> arrays: an input array and an
+output array.  They are complementary insomuch as the data types and the
+array sizes together define exactly what transform should be performed.
+We refer to a valid transform as a <a class="reference internal" href="../pyfftw/pyfftw.html#fftw-schemes"><em>scheme</em></a>.</p>
+<p>Internally, three precisions of FFT are supported. These correspond
+to single precision floating point, double precision floating point
+and long double precision floating
+point, which correspond to <a class="reference external" href="http://docs.scipy.org/doc/numpy/reference/index.html#numpy" title="(in NumPy v1.7)"><tt class="xref py py-mod docutils literal"><span class="pre">numpy</span></tt></a>‘s <tt class="docutils literal"><span class="pre">float32</span></tt>, <tt class="docutils literal"><span class="pre">float64</span></tt>
+and <tt class="docutils literal"><span class="pre">longdouble</span></tt> dtypes respectively (and the corresponding
+complex types). The precision is decided by the relevant scheme,
+which is specified by the dtype of the input array.</p>
+<p>Various schemes are supported by <a class="reference internal" href="../pyfftw/pyfftw.html#pyfftw.FFTW" title="pyfftw.FFTW"><tt class="xref py py-class docutils literal"><span class="pre">pyfftw.FFTW</span></tt></a>. The scheme
+that is used depends on the data types of the input array and output
+arrays, the shape of the arrays and the direction flag. For a full
+discussion of the schemes available, see the API documentation for
+<a class="reference internal" href="../pyfftw/pyfftw.html#pyfftw.FFTW" title="pyfftw.FFTW"><tt class="xref py py-class docutils literal"><span class="pre">pyfftw.FFTW</span></tt></a>.</p>
+<p><strong>One-Dimensional Transforms</strong></p>
+<p>We will first consider creating a simple one-dimensional transform of
+a one-dimensional complex array:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="kn">import</span> <span class="nn">pyfftw</span>
+
+<span class="n">a</span> <span class="o">=</span> <span class="n">pyfftw</span><span class="o">.</span><span class="n">n_byte_align_empty</span><span class="p">(</span><span class="mi">128</span><span class="p">,</span> <span class="mi">16</span><span class="p">,</span> <span class="s">'complex128'</span><span class="p">)</span>
+<span class="n">b</span> <span class="o">=</span> <span class="n">pyfftw</span><span class="o">.</span><span class="n">n_byte_align_empty</span><span class="p">(</span><span class="mi">128</span><span class="p">,</span> <span class="mi">16</span><span class="p">,</span> <span class="s">'complex128'</span><span class="p">)</span>
+
+<span class="n">fft_object</span> <span class="o">=</span> <span class="n">pyfftw</span><span class="o">.</span><span class="n">FFTW</span><span class="p">(</span><span class="n">a</span><span class="p">,</span> <span class="n">b</span><span class="p">)</span>
+</pre></div>
+</div>
+<p>In this case, we create 2 complex arrays, <tt class="docutils literal"><span class="pre">a</span></tt> and <tt class="docutils literal"><span class="pre">b</span></tt> each of
+length 128. As before, we use <a class="reference internal" href="../pyfftw/pyfftw.html#pyfftw.n_byte_align_empty" title="pyfftw.n_byte_align_empty"><tt class="xref py py-func docutils literal"><span class="pre">pyfftw.n_byte_align_empty()</span></tt></a> to
+make sure the array is aligned.</p>
+<p>Given these 2 arrays, the only transform that makes sense is a
+1D complex DFT. The direction in this case is the default, which is
+forward, and so that is the transform that is <em>planned</em>. The
+returned <tt class="docutils literal"><span class="pre">fft_object</span></tt> represents such a transform.</p>
+<p>In general, the creation of the <a class="reference internal" href="../pyfftw/pyfftw.html#pyfftw.FFTW" title="pyfftw.FFTW"><tt class="xref py py-class docutils literal"><span class="pre">pyfftw.FFTW</span></tt></a> object clears the
+contents of the arrays, so the arrays should be filled or updated
+after creation.</p>
+<p>Similarly, to plan the inverse:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="n">c</span> <span class="o">=</span> <span class="n">pyfftw</span><span class="o">.</span><span class="n">n_byte_align_empty</span><span class="p">(</span><span class="mi">128</span><span class="p">,</span> <span class="mi">16</span><span class="p">,</span> <span class="s">'complex128'</span><span class="p">)</span>
+<span class="n">ifft_object</span> <span class="o">=</span> <span class="n">pyfftw</span><span class="o">.</span><span class="n">FFTW</span><span class="p">(</span><span class="n">b</span><span class="p">,</span> <span class="n">c</span><span class="p">,</span> <span class="n">direction</span><span class="o">=</span><span class="s">'FFTW_BACKWARD'</span><span class="p">)</span>
+</pre></div>
+</div>
+<p>In this case, the direction argument is given as <tt class="docutils literal"><span class="pre">'FFTW_BACKWARD'</span></tt>
+(to override the default of <tt class="docutils literal"><span class="pre">'FFTW_FORWARD'</span></tt>).</p>
+<p>The actual FFT is performed by calling the returned objects:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="kn">import</span> <span class="nn">numpy</span>
+
+<span class="c"># Generate some data</span>
+<span class="n">ar</span><span class="p">,</span> <span class="n">ai</span> <span class="o">=</span> <span class="n">numpy</span><span class="o">.</span><span class="n">random</span><span class="o">.</span><span class="n">randn</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span> <span class="mi">128</span><span class="p">)</span>
+<span class="n">a</span><span class="p">[:]</span> <span class="o">=</span> <span class="n">ar</span> <span class="o">+</span> <span class="mi">1j</span><span class="o">*</span><span class="n">ai</span>
+
+<span class="n">fft_a</span> <span class="o">=</span> <span class="n">fft_object</span><span class="p">()</span>
+</pre></div>
+</div>
+<p>Note that calling the object like this performs the FFT and returns
+the result in an array. This is the <em>same</em> array as <tt class="docutils literal"><span class="pre">b</span></tt>:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">fft_a</span> <span class="ow">is</span> <span class="n">b</span>
+<span class="go">True</span>
+</pre></div>
+</div>
+<p>This is particularly useful when using <a class="reference internal" href="../pyfftw/builders/builders.html#module-pyfftw.builders" title="pyfftw.builders"><tt class="xref py py-mod docutils literal"><span class="pre">pyfftw.builders</span></tt></a> to
+generate the <a class="reference internal" href="../pyfftw/pyfftw.html#pyfftw.FFTW" title="pyfftw.FFTW"><tt class="xref py py-class docutils literal"><span class="pre">pyfftw.FFTW</span></tt></a> objects.</p>
+<p>Calling the FFT object followed by the inverse FFT object yields
+an output that is numerically the same as the original <tt class="docutils literal"><span class="pre">a</span></tt>
+(within numerical accuracy).</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">fft_a</span> <span class="o">=</span> <span class="n">fft_object</span><span class="p">()</span>
+<span class="gp">>>> </span><span class="n">ifft_b</span> <span class="o">=</span> <span class="n">ifft_object</span><span class="p">()</span>
+<span class="gp">>>> </span><span class="n">ifft_b</span> <span class="ow">is</span> <span class="n">c</span>
+<span class="go">True</span>
+<span class="gp">>>> </span><span class="n">numpy</span><span class="o">.</span><span class="n">allclose</span><span class="p">(</span><span class="n">a</span><span class="p">,</span> <span class="n">c</span><span class="p">)</span>
+<span class="go">True</span>
+<span class="gp">>>> </span><span class="n">a</span> <span class="ow">is</span> <span class="n">c</span>
+<span class="go">False</span>
+</pre></div>
+</div>
+<p>In this case, the normalisation of the DFT is performed automatically
+by the inverse FFTW object (<tt class="docutils literal"><span class="pre">ifft_object</span></tt>). This can be disabled
+by setting the <tt class="docutils literal"><span class="pre">normalise_idft=False</span></tt> argument.</p>
+<p>It is possible to change the data on which a <a class="reference internal" href="../pyfftw/pyfftw.html#pyfftw.FFTW" title="pyfftw.FFTW"><tt class="xref py py-class docutils literal"><span class="pre">pyfftw.FFTW</span></tt></a>
+operates. The <a class="reference internal" href="../pyfftw/pyfftw.html#pyfftw.FFTW.__call__" title="pyfftw.FFTW.__call__"><tt class="xref py py-meth docutils literal"><span class="pre">pyfftw.FFTW.__call__()</span></tt></a> accepts both an
+<tt class="docutils literal"><span class="pre">input_array</span></tt> and and <tt class="docutils literal"><span class="pre">output_array</span></tt> argument to update the
+arrays. The arrays should be compatible with the arrays with which
+the <a class="reference internal" href="../pyfftw/pyfftw.html#pyfftw.FFTW" title="pyfftw.FFTW"><tt class="xref py py-class docutils literal"><span class="pre">pyfftw.FFTW</span></tt></a> object was originally created. Please read the
+API docs on <a class="reference internal" href="../pyfftw/pyfftw.html#pyfftw.FFTW.__call__" title="pyfftw.FFTW.__call__"><tt class="xref py py-meth docutils literal"><span class="pre">pyfftw.FFTW.__call__()</span></tt></a> to fully understand the
+requirements for updating the array.</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">d</span> <span class="o">=</span> <span class="n">pyfftw</span><span class="o">.</span><span class="n">n_byte_align_empty</span><span class="p">(</span><span class="mi">4</span><span class="p">,</span> <span class="mi">16</span><span class="p">,</span> <span class="s">'complex128'</span><span class="p">)</span>
+<span class="gp">>>> </span><span class="n">e</span> <span class="o">=</span> <span class="n">pyfftw</span><span class="o">.</span><span class="n">n_byte_align_empty</span><span class="p">(</span><span class="mi">4</span><span class="p">,</span> <span class="mi">16</span><span class="p">,</span> <span class="s">'complex128'</span><span class="p">)</span>
+<span class="gp">>>> </span><span class="n">f</span> <span class="o">=</span> <span class="n">pyfftw</span><span class="o">.</span><span class="n">n_byte_align_empty</span><span class="p">(</span><span class="mi">4</span><span class="p">,</span> <span class="mi">16</span><span class="p">,</span> <span class="s">'complex128'</span><span class="p">)</span>
+<span class="gp">>>> </span><span class="n">fft_object</span> <span class="o">=</span> <span class="n">pyfftw</span><span class="o">.</span><span class="n">FFTW</span><span class="p">(</span><span class="n">d</span><span class="p">,</span> <span class="n">e</span><span class="p">)</span>
+<span class="gp">>>> </span><span class="n">fft_object</span><span class="o">.</span><span class="n">get_input_array</span><span class="p">()</span> <span class="ow">is</span> <span class="n">d</span> <span class="c"># get the input array from the object</span>
+<span class="go">True</span>
+<span class="gp">>>> </span><span class="n">f</span><span class="p">[:]</span> <span class="o">=</span> <span class="p">[</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">4</span><span class="p">]</span> <span class="c"># Add some data to f</span>
+<span class="gp">>>> </span><span class="n">fft_object</span><span class="p">(</span><span class="n">f</span><span class="p">)</span>
+<span class="go">array([ 10.+0.j,  -2.+2.j,  -2.+0.j,  -2.-2.j])</span>
+<span class="gp">>>> </span><span class="n">fft_object</span><span class="o">.</span><span class="n">get_input_array</span><span class="p">()</span> <span class="ow">is</span> <span class="n">d</span> <span class="c"># No longer true!</span>
+<span class="go">False</span>
+<span class="gp">>>> </span><span class="n">fft_object</span><span class="o">.</span><span class="n">get_input_array</span><span class="p">()</span> <span class="ow">is</span> <span class="n">f</span> <span class="c"># It has been updated with f :)</span>
+<span class="go">True</span>
+</pre></div>
+</div>
+<p>If the new input array is of the wrong dtype or wrongly strided,
+<a class="reference internal" href="../pyfftw/pyfftw.html#pyfftw.FFTW.__call__" title="pyfftw.FFTW.__call__"><tt class="xref py py-meth docutils literal"><span class="pre">pyfftw.FFTW.__call__()</span></tt></a> method will copy the new array into the
+internal array, if necessary changing it’s dtype in the process.</p>
+<p>It should be made clear that the <a class="reference internal" href="../pyfftw/pyfftw.html#pyfftw.FFTW.__call__" title="pyfftw.FFTW.__call__"><tt class="xref py py-meth docutils literal"><span class="pre">pyfftw.FFTW.__call__()</span></tt></a> method
+is simply a helper routine around the other methods of the object.
+Though it is expected that most of the time
+<a class="reference internal" href="../pyfftw/pyfftw.html#pyfftw.FFTW.__call__" title="pyfftw.FFTW.__call__"><tt class="xref py py-meth docutils literal"><span class="pre">pyfftw.FFTW.__call__()</span></tt></a> will be sufficient, all the FFTW
+functionality can be accessed through other methods at a slightly
+lower level.</p>
+<p><strong>Multi-Dimensional Transforms</strong></p>
+<p>Arrays of more than one dimension are easily supported as well.
+In this case, the <tt class="docutils literal"><span class="pre">axes</span></tt> argument specifies over which axes the
+transform is to be taken.</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="kn">import</span> <span class="nn">pyfftw</span>
+
+<span class="n">a</span> <span class="o">=</span> <span class="n">pyfftw</span><span class="o">.</span><span class="n">n_byte_align_empty</span><span class="p">((</span><span class="mi">128</span><span class="p">,</span> <span class="mi">64</span><span class="p">),</span> <span class="mi">16</span><span class="p">,</span> <span class="s">'complex128'</span><span class="p">)</span>
+<span class="n">b</span> <span class="o">=</span> <span class="n">pyfftw</span><span class="o">.</span><span class="n">n_byte_align_empty</span><span class="p">((</span><span class="mi">128</span><span class="p">,</span> <span class="mi">64</span><span class="p">),</span> <span class="mi">16</span><span class="p">,</span> <span class="s">'complex128'</span><span class="p">)</span>
+
+<span class="c"># Plan an fft over the last axis</span>
+<span class="n">fft_object_a</span> <span class="o">=</span> <span class="n">pyfftw</span><span class="o">.</span><span class="n">FFTW</span><span class="p">(</span><span class="n">a</span><span class="p">,</span> <span class="n">b</span><span class="p">)</span>
+
+<span class="c"># Over the first axis</span>
+<span class="n">fft_object_b</span> <span class="o">=</span> <span class="n">pyfftw</span><span class="o">.</span><span class="n">FFTW</span><span class="p">(</span><span class="n">a</span><span class="p">,</span> <span class="n">b</span><span class="p">,</span> <span class="n">axes</span><span class="o">=</span><span class="p">(</span><span class="mi">0</span><span class="p">,))</span>
+
+<span class="c"># Over the both axes</span>
+<span class="n">fft_object_c</span> <span class="o">=</span> <span class="n">pyfftw</span><span class="o">.</span><span class="n">FFTW</span><span class="p">(</span><span class="n">a</span><span class="p">,</span> <span class="n">b</span><span class="p">,</span> <span class="n">axes</span><span class="o">=</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="mi">1</span><span class="p">))</span>
+</pre></div>
+</div>
+<p>For further information on all the supported transforms, including
+real transforms, as well as full documentaion on all the
+instantiation arguments, see the <a class="reference internal" href="../pyfftw/pyfftw.html#pyfftw.FFTW" title="pyfftw.FFTW"><tt class="xref py py-class docutils literal"><span class="pre">pyfftw.FFTW</span></tt></a> documentation.</p>
+<p id="wisdom-tutorial"><strong>Wisdom</strong></p>
+<p>When creating a <a class="reference internal" href="../pyfftw/pyfftw.html#pyfftw.FFTW" title="pyfftw.FFTW"><tt class="xref py py-class docutils literal"><span class="pre">pyfftw.FFTW</span></tt></a> object, it is possible to instruct
+FFTW how much effort it should put into finding the fastest possible
+method for computing the DFT. This is done by specifying a suitable
+planner flag in <tt class="docutils literal"><span class="pre">flags</span></tt> argument to <a class="reference internal" href="../pyfftw/pyfftw.html#pyfftw.FFTW" title="pyfftw.FFTW"><tt class="xref py py-class docutils literal"><span class="pre">pyfftw.FFTW</span></tt></a>. Some
+of the planner flags can take a very long time to complete which can
+be problematic.</p>
+<p>When the a particular transform has been created, distinguished by
+things like the data type, the shape, the stridings and the flags,
+FFTW keeps a record of the fastest way to compute such a transform in
+future. This is referred to as
+<a class="reference external" href="http://www.fftw.org/fftw3_doc/Wisdom.html">wisdom</a>. When
+the program is completed, the wisdom that has been accumulated is
+forgotten.</p>
+<p>It is possible to output the accumulated wisdom using the
+<a class="reference internal" href="../pyfftw/pyfftw.html#wisdom-functions"><em>wisdom output routines</em></a>.
+<a class="reference internal" href="../pyfftw/pyfftw.html#pyfftw.export_wisdom" title="pyfftw.export_wisdom"><tt class="xref py py-func docutils literal"><span class="pre">pyfftw.export_wisdom()</span></tt></a> exports and returns the wisdom as a tuple
+of strings that can be easily written to file. To load the wisdom back
+in, use the <a class="reference internal" href="../pyfftw/pyfftw.html#pyfftw.import_wisdom" title="pyfftw.import_wisdom"><tt class="xref py py-func docutils literal"><span class="pre">pyfftw.import_wisdom()</span></tt></a> function which takes as its
+argument that same tuple of strings that was returned from
+<a class="reference internal" href="../pyfftw/pyfftw.html#pyfftw.export_wisdom" title="pyfftw.export_wisdom"><tt class="xref py py-func docutils literal"><span class="pre">pyfftw.export_wisdom()</span></tt></a>.</p>
+<p>If for some reason you wish to forget the accumulated wisdom, call
+<a class="reference internal" href="../pyfftw/pyfftw.html#pyfftw.forget_wisdom" title="pyfftw.forget_wisdom"><tt class="xref py py-func docutils literal"><span class="pre">pyfftw.forget_wisdom()</span></tt></a>.</p>
+</div>
+<div class="section" id="the-pyfftw-builders-functions">
+<span id="builders-tutorial"></span><h2>The <a class="reference internal" href="../pyfftw/builders/builders.html#module-pyfftw.builders" title="pyfftw.builders"><tt class="xref py py-mod docutils literal"><span class="pre">pyfftw.builders</span></tt></a> functions<a class="headerlink" href="#the-pyfftw-builders-functions" title="Permalink to this headline">¶</a></h2>
+<p>If you absolutely need the flexibility of dealing with
+<a class="reference internal" href="../pyfftw/pyfftw.html#pyfftw.FFTW" title="pyfftw.FFTW"><tt class="xref py py-class docutils literal"><span class="pre">pyfftw.FFTW</span></tt></a> directly, an easier option than constructing valid
+arrays and so on is to use the convenient <a class="reference internal" href="../pyfftw/builders/builders.html#module-pyfftw.builders" title="pyfftw.builders"><tt class="xref py py-mod docutils literal"><span class="pre">pyfftw.builders</span></tt></a> package.
+These functions take care of much of the difficulty in specifying the
+exact size and dtype requirements to produce a valid scheme.</p>
+<p>The <a class="reference internal" href="../pyfftw/builders/builders.html#module-pyfftw.builders" title="pyfftw.builders"><tt class="xref py py-mod docutils literal"><span class="pre">pyfftw.builders</span></tt></a> functions are a series of helper functions
+that provide an interface very much like that provided by
+<a class="reference external" href="http://docs.scipy.org/doc/numpy/reference/routines.fft.html#numpy.fft" title="(in NumPy v1.7)"><tt class="xref py py-mod docutils literal"><span class="pre">numpy.fft</span></tt></a>, only instead of returning the result of the
+transform, a <a class="reference internal" href="../pyfftw/pyfftw.html#pyfftw.FFTW" title="pyfftw.FFTW"><tt class="xref py py-class docutils literal"><span class="pre">pyfftw.FFTW</span></tt></a> object (or in some cases a wrapper
+around <a class="reference internal" href="../pyfftw/pyfftw.html#pyfftw.FFTW" title="pyfftw.FFTW"><tt class="xref py py-class docutils literal"><span class="pre">pyfftw.FFTW</span></tt></a>) is returned.</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="kn">import</span> <span class="nn">pyfftw</span>
+
+<span class="n">a</span> <span class="o">=</span> <span class="n">pyfftw</span><span class="o">.</span><span class="n">n_byte_align_empty</span><span class="p">((</span><span class="mi">128</span><span class="p">,</span> <span class="mi">64</span><span class="p">),</span> <span class="mi">16</span><span class="p">,</span> <span class="s">'complex128'</span><span class="p">)</span>
+
+<span class="c"># Generate some data</span>
+<span class="n">ar</span><span class="p">,</span> <span class="n">ai</span> <span class="o">=</span> <span class="n">numpy</span><span class="o">.</span><span class="n">random</span><span class="o">.</span><span class="n">randn</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span> <span class="mi">128</span><span class="p">,</span> <span class="mi">64</span><span class="p">)</span>
+<span class="n">a</span><span class="p">[:]</span> <span class="o">=</span> <span class="n">ar</span> <span class="o">+</span> <span class="mi">1j</span><span class="o">*</span><span class="n">ai</span>
+
+<span class="n">fft_object</span> <span class="o">=</span> <span class="n">pyfftw</span><span class="o">.</span><span class="n">builders</span><span class="o">.</span><span class="n">fft</span><span class="p">(</span><span class="n">a</span><span class="p">)</span>
+
+<span class="n">b</span> <span class="o">=</span> <span class="n">fft_object</span><span class="p">()</span>
+</pre></div>
+</div>
+<p><tt class="docutils literal"><span class="pre">fft_object</span></tt> is an instance of <a class="reference internal" href="../pyfftw/pyfftw.html#pyfftw.FFTW" title="pyfftw.FFTW"><tt class="xref py py-class docutils literal"><span class="pre">pyfftw.FFTW</span></tt></a>, <tt class="docutils literal"><span class="pre">b</span></tt> is
+the result of the DFT.</p>
+<p>Note that in this example, unlike creating a <a class="reference internal" href="../pyfftw/pyfftw.html#pyfftw.FFTW" title="pyfftw.FFTW"><tt class="xref py py-class docutils literal"><span class="pre">pyfftw.FFTW</span></tt></a>
+object using the direct interface, we can fill the array in advance.
+This is because by default all the functions in <a class="reference internal" href="../pyfftw/builders/builders.html#module-pyfftw.builders" title="pyfftw.builders"><tt class="xref py py-mod docutils literal"><span class="pre">pyfftw.builders</span></tt></a>
+keep a copy of the input array during creation (though this can
+be disabled).</p>
+<p>The <a class="reference internal" href="../pyfftw/builders/builders.html#module-pyfftw.builders" title="pyfftw.builders"><tt class="xref py py-mod docutils literal"><span class="pre">pyfftw.builders</span></tt></a> functions construct an output array of
+the correct size and type. In the case of the regular DFTs, this
+always creates an output array of the same size as the input array.
+In the case of the real transform, the output array is the right
+shape to satisfy the scheme requirements.</p>
+<p>The precision of the transform is determined by the dtype of the
+input array. If the input array is a floating point array, then
+the precision of the floating point is used. If the input array
+is not a float point array then a double precision transform is used.
+Any calls made to the resultant object with an array of the same
+size will then be copied into the internal array of the object,
+changing the dtype in the process.</p>
+<p>Like <a class="reference external" href="http://docs.scipy.org/doc/numpy/reference/routines.fft.html#numpy.fft" title="(in NumPy v1.7)"><tt class="xref py py-mod docutils literal"><span class="pre">numpy.fft</span></tt></a>, it is possible to specify a length (in the
+one-dimensional case) or a shape (in the multi-dimensional case) that
+may be different to the array that is passed in. In such a case,
+a wrapper object of type
+<a class="reference internal" href="../pyfftw/builders/_utils.html#pyfftw.builders._utils._FFTWWrapper" title="pyfftw.builders._utils._FFTWWrapper"><tt class="xref py py-class docutils literal"><span class="pre">pyfftw.builders._utils._FFTWWrapper</span></tt></a> is returned. From an
+interface perspective, this is identical to <a class="reference internal" href="../pyfftw/pyfftw.html#pyfftw.FFTW" title="pyfftw.FFTW"><tt class="xref py py-class docutils literal"><span class="pre">pyfftw.FFTW</span></tt></a>. The
+difference is in the way calls to the object are handled. With
+<a class="reference internal" href="../pyfftw/builders/_utils.html#pyfftw.builders._utils._FFTWWrapper" title="pyfftw.builders._utils._FFTWWrapper"><tt class="xref py py-class docutils literal"><span class="pre">pyfftw.builders._utils._FFTWWrapper</span></tt></a> objects, an array that
+is passed as an argument when calling the object is <em>copied</em> into the
+internal array. This is done by a suitable slicing of the new
+passed-in array and the internal array and is done precisely because
+the shape of the transform is different to the shape of the input
+array.</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="n">a</span> <span class="o">=</span> <span class="n">pyfftw</span><span class="o">.</span><span class="n">n_byte_align_empty</span><span class="p">((</span><span class="mi">128</span><span class="p">,</span> <span class="mi">64</span><span class="p">),</span> <span class="mi">16</span><span class="p">,</span> <span class="s">'complex128'</span><span class="p">)</span>
+
+<span class="n">fft_wrapper_object</span> <span class="o">=</span> <span class="n">pyfftw</span><span class="o">.</span><span class="n">builders</span><span class="o">.</span><span class="n">fftn</span><span class="p">(</span><span class="n">a</span><span class="p">,</span> <span class="n">s</span><span class="o">=</span><span class="p">(</span><span class="mi">32</span><span class="p">,</span> <span class="mi">256</span><span class="p">))</span>
+
+<span class="n">b</span> <span class="o">=</span> <span class="n">fft_wrapper_object</span><span class="p">()</span>
+</pre></div>
+</div>
+<p>Inspecting these objects gives us their shapes:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">b</span><span class="o">.</span><span class="n">shape</span>
+<span class="go">(32, 256)</span>
+<span class="gp">>>> </span><span class="n">fft_wrapper_object</span><span class="o">.</span><span class="n">get_input_array</span><span class="p">()</span><span class="o">.</span><span class="n">shape</span>
+<span class="go">(32, 256)</span>
+<span class="gp">>>> </span><span class="n">a</span><span class="o">.</span><span class="n">shape</span>
+<span class="go">(128, 64)</span>
+</pre></div>
+</div>
+<p>It is only possible to call <tt class="docutils literal"><span class="pre">fft_wrapper_object</span></tt> with an array
+that is the same shape as <tt class="docutils literal"><span class="pre">a</span></tt>. In this case, the first axis of <tt class="docutils literal"><span class="pre">a</span></tt>
+is sliced to include only the first 32 elements, and the second axis
+of the internal array is sliced to include only the last 64 elements.
+This way, shapes are made consistent for copying.</p>
+<p>Understanding <a class="reference external" href="http://docs.scipy.org/doc/numpy/reference/routines.fft.html#numpy.fft" title="(in NumPy v1.7)"><tt class="xref py py-mod docutils literal"><span class="pre">numpy.fft</span></tt></a>, these functions are largely
+self-explanatory. We point the reader to the <a class="reference internal" href="../pyfftw/builders/builders.html#module-pyfftw.builders" title="pyfftw.builders"><tt class="xref py py-mod docutils literal"><span class="pre">API</span> <span class="pre">docs</span></tt></a> for more information.</p>
+<p class="rubric">Footnotes</p>
+<table class="docutils footnote" frame="void" id="caveat" rules="none">
+<colgroup><col class="label" /><col /></colgroup>
+<tbody valign="top">
+<tr><td class="label"><a class="fn-backref" href="#id1">[1]</a></td><td><a class="reference internal" href="../pyfftw/interfaces/interfaces.html#module-pyfftw.interfaces" title="pyfftw.interfaces"><tt class="xref py py-mod docutils literal"><span class="pre">pyfftw.interfaces</span></tt></a> deals with repeated values in the
+<tt class="docutils literal"><span class="pre">axes</span></tt> argument differently to <a class="reference external" href="http://docs.scipy.org/doc/numpy/reference/routines.fft.html#numpy.fft" title="(in NumPy v1.7)"><tt class="xref py py-mod docutils literal"><span class="pre">numpy.fft</span></tt></a> (and probably to
+<a class="reference external" href="http://docs.scipy.org/doc/scipy/reference/fftpack.html#scipy.fftpack" title="(in SciPy v0.12)"><tt class="xref py py-mod docutils literal"><span class="pre">scipy.fftpack</span></tt></a> to, but that’s not documented clearly).
+Specifically, <a class="reference external" href="http://docs.scipy.org/doc/numpy/reference/routines.fft.html#numpy.fft" title="(in NumPy v1.7)"><tt class="xref py py-mod docutils literal"><span class="pre">numpy.fft</span></tt></a> takes the transform along a given axis
+as many times as it appears in the <tt class="docutils literal"><span class="pre">axes</span></tt> argument.
+<a class="reference internal" href="../pyfftw/interfaces/interfaces.html#module-pyfftw.interfaces" title="pyfftw.interfaces"><tt class="xref py py-mod docutils literal"><span class="pre">pyfftw.interfaces</span></tt></a> takes the transform only once along each
+axis that appears, regardless of how many times it appears. This is
+deemed to be such a fringe corner case that it is ignored.</td></tr>
+</tbody>
+</table>
+</div>
+</div>
+
+
+          </div>
+        </div>
+      </div>
+      <div class="sphinxsidebar">
+        <div class="sphinxsidebarwrapper">
+  <h3><a href="../index.html">Table Of Contents</a></h3>
+  <ul>
+<li><a class="reference internal" href="#">Overview and A Short Tutorial</a><ul>
+<li><a class="reference internal" href="#quick-and-easy-the-pyfftw-interfaces-module">Quick and easy: the <tt class="docutils literal"><span class="pre">pyfftw.interfaces</span></tt> module</a></li>
+<li><a class="reference internal" href="#the-workhorse-pyfftw-fftw-class">The workhorse <tt class="docutils literal"><span class="pre">pyfftw.FFTW</span></tt> class</a></li>
+<li><a class="reference internal" href="#the-pyfftw-builders-functions">The <tt class="docutils literal"><span class="pre">pyfftw.builders</span></tt> functions</a></li>
+</ul>
+</li>
+</ul>
+
+  <h4>Previous topic</h4>
+  <p class="topless"><a href="../index.html"
+                        title="previous chapter">Welcome to pyFFTW’s documentation!</a></p>
+  <h4>Next topic</h4>
+  <p class="topless"><a href="api.html"
+                        title="next chapter">API Reference</a></p>
+  <h3>This Page</h3>
+  <ul class="this-page-menu">
+    <li><a href="../_sources/sphinx/tutorial.txt"
+           rel="nofollow">Show Source</a></li>
+  </ul>
+<div id="searchbox" style="display: none">
+  <h3>Quick search</h3>
+    <form class="search" action="../search.html" method="get">
+      <input type="text" name="q" />
+      <input type="submit" value="Go" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    <p class="searchtip" style="font-size: 90%">
+    Enter search terms or a module, class or function name.
+    </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             >index</a></li>
+        <li class="right" >
+          <a href="../py-modindex.html" title="Python Module Index"
+             >modules</a> |</li>
+        <li class="right" >
+          <a href="api.html" title="API Reference"
+             >next</a> |</li>
+        <li class="right" >
+          <a href="../index.html" title="Welcome to pyFFTW’s documentation!"
+             >previous</a> |</li>
+        <li><a href="../index.html">pyFFTW 0.9.2 documentation</a> »</li> 
+      </ul>
+    </div>
+    <div class="footer">
+        © Copyright 2013, Henry Gomersall.
+      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
+    </div>
+  </body>
+</html>
\ No newline at end of file
diff --git a/include/cpu.h b/include/cpu.h
new file mode 100644
index 0000000..4c28ccd
--- /dev/null
+++ b/include/cpu.h
@@ -0,0 +1,85 @@
+/*
+ * Copyright 2013 Knowledge Economy Developments Ltd
+ * 
+ * Henry Gomersall
+ * heng at kedevelopments.co.uk
+ * 
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/* Small utilities for inspecting the CPU */
+
+#ifndef CPU_H
+#define CPU_H
+
+#if __STDC_VERSION__ >= 199901L
+  /* "inline" is a keyword */
+#else
+# define inline static
+#endif
+
+#if defined(__amd64__) || defined (_M_X64) || defined(__i386__) || defined(_M_IX86) || defined(_X86_)
+
+  #define AVX_WORD 2
+  #define AVX_BIT 28
+  #define SSE_WORD 3
+  #define SSE_BIT 25
+
+  #ifdef _MSC_VER
+    /* Visual Studio Code */
+    #include <intrin.h>
+    #define cpuid(func, cpuinfo)\
+      __cpuid(cpuinfo, func);
+
+  #else
+    /* generic x86 Assembly code (based on wikipedia example)
+     * Firstly it's necessary to move ebx into an interim
+     * register to protect it (cpuid clobbers eax, ebx ecx and edx)
+     * */
+    #define cpuid(func, cpuinfo)\
+      cpuinfo[0] = func; /* Load the first entry with the func id */\
+      __asm__ __volatile__ \
+      ("mov %%ebx, %%edi;" /* 32bit PIC: don't clobber ebx */ \
+       "cpuid;" \
+       "mov %%ebx, %%esi;" \
+       "mov %%edi, %%ebx;" \
+       :"+a" (cpuinfo[0]), "=S" (cpuinfo[1]), /* eax rw, esi read */ \
+       "=c" (cpuinfo[2]), "=d" (cpuinfo[3]) /* ecx read, edx read */\
+       : :"edi")
+  
+  #endif
+
+/* Returns the byte alignment for optimum simd operations */
+inline int simd_alignment(void){
+    int cpuinfo[4];
+
+    /* This gets the cpuinfo (set by 1)*/
+    cpuid(1, cpuinfo);
+
+    if (cpuinfo[AVX_WORD] & (1<<AVX_BIT))  /* AVX */
+        return 32;
+    else if (cpuinfo[SSE_WORD] & (1<<SSE_BIT))  /* SSE */
+        return 16;
+    else  /* No SIMD */
+        return 4;
+}
+
+#else
+
+inline int simd_alignment(void){
+    return 4;
+}
+#endif
+
+#endif /* Header guard */
diff --git a/include/msvc_2008/stdint.h b/include/msvc_2008/stdint.h
new file mode 100644
index 0000000..4fe0ef9
--- /dev/null
+++ b/include/msvc_2008/stdint.h
@@ -0,0 +1,259 @@
+// ISO C9x  compliant stdint.h for Microsoft Visual Studio
+// Based on ISO/IEC 9899:TC2 Committee draft (May 6, 2005) WG14/N1124 
+// 
+//  Copyright (c) 2006-2013 Alexander Chemeris
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+// 
+//   1. Redistributions of source code must retain the above copyright notice,
+//      this list of conditions and the following disclaimer.
+// 
+//   2. Redistributions in binary form must reproduce the above copyright
+//      notice, this list of conditions and the following disclaimer in the
+//      documentation and/or other materials provided with the distribution.
+// 
+//   3. Neither the name of the product nor the names of its contributors may
+//      be used to endorse or promote products derived from this software
+//      without specific prior written permission.
+// 
+// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+// EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
+// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+// 
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef _MSC_VER // [
+#error "Use this header only with Microsoft Visual C++ compilers!"
+#endif // _MSC_VER ]
+
+#ifndef _MSC_STDINT_H_ // [
+#define _MSC_STDINT_H_
+
+#if _MSC_VER > 1000
+#pragma once
+#endif
+
+#if _MSC_VER >= 1600 // [
+#include <stdint.h>
+#else // ] _MSC_VER >= 1600 [
+
+#include <limits.h>
+
+// For Visual Studio 6 in C++ mode and for many Visual Studio versions when
+// compiling for ARM we should wrap <wchar.h> include with 'extern "C++" {}'
+// or compiler give many errors like this:
+//   error C2733: second C linkage of overloaded function 'wmemchr' not allowed
+#ifdef __cplusplus
+extern "C" {
+#endif
+#  include <wchar.h>
+#ifdef __cplusplus
+}
+#endif
+
+// Define _W64 macros to mark types changing their size, like intptr_t.
+#ifndef _W64
+#  if !defined(__midl) && (defined(_X86_) || defined(_M_IX86)) && _MSC_VER >= 1300
+#     define _W64 __w64
+#  else
+#     define _W64
+#  endif
+#endif
+
+
+// 7.18.1 Integer types
+
+// 7.18.1.1 Exact-width integer types
+
+// Visual Studio 6 and Embedded Visual C++ 4 doesn't
+// realize that, e.g. char has the same size as __int8
+// so we give up on __intX for them.
+#if (_MSC_VER < 1300)
+   typedef signed char       int8_t;
+   typedef signed short      int16_t;
+   typedef signed int        int32_t;
+   typedef unsigned char     uint8_t;
+   typedef unsigned short    uint16_t;
+   typedef unsigned int      uint32_t;
+#else
+   typedef signed __int8     int8_t;
+   typedef signed __int16    int16_t;
+   typedef signed __int32    int32_t;
+   typedef unsigned __int8   uint8_t;
+   typedef unsigned __int16  uint16_t;
+   typedef unsigned __int32  uint32_t;
+#endif
+typedef signed __int64       int64_t;
+typedef unsigned __int64     uint64_t;
+
+
+// 7.18.1.2 Minimum-width integer types
+typedef int8_t    int_least8_t;
+typedef int16_t   int_least16_t;
+typedef int32_t   int_least32_t;
+typedef int64_t   int_least64_t;
+typedef uint8_t   uint_least8_t;
+typedef uint16_t  uint_least16_t;
+typedef uint32_t  uint_least32_t;
+typedef uint64_t  uint_least64_t;
+
+// 7.18.1.3 Fastest minimum-width integer types
+typedef int8_t    int_fast8_t;
+typedef int16_t   int_fast16_t;
+typedef int32_t   int_fast32_t;
+typedef int64_t   int_fast64_t;
+typedef uint8_t   uint_fast8_t;
+typedef uint16_t  uint_fast16_t;
+typedef uint32_t  uint_fast32_t;
+typedef uint64_t  uint_fast64_t;
+
+// 7.18.1.4 Integer types capable of holding object pointers
+#ifdef _WIN64 // [
+   typedef signed __int64    intptr_t;
+   typedef unsigned __int64  uintptr_t;
+#else // _WIN64 ][
+   typedef _W64 signed int   intptr_t;
+   typedef _W64 unsigned int uintptr_t;
+#endif // _WIN64 ]
+
+// 7.18.1.5 Greatest-width integer types
+typedef int64_t   intmax_t;
+typedef uint64_t  uintmax_t;
+
+
+// 7.18.2 Limits of specified-width integer types
+
+#if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) // [   See footnote 220 at page 257 and footnote 221 at page 259
+
+// 7.18.2.1 Limits of exact-width integer types
+#define INT8_MIN     ((int8_t)_I8_MIN)
+#define INT8_MAX     _I8_MAX
+#define INT16_MIN    ((int16_t)_I16_MIN)
+#define INT16_MAX    _I16_MAX
+#define INT32_MIN    ((int32_t)_I32_MIN)
+#define INT32_MAX    _I32_MAX
+#define INT64_MIN    ((int64_t)_I64_MIN)
+#define INT64_MAX    _I64_MAX
+#define UINT8_MAX    _UI8_MAX
+#define UINT16_MAX   _UI16_MAX
+#define UINT32_MAX   _UI32_MAX
+#define UINT64_MAX   _UI64_MAX
+
+// 7.18.2.2 Limits of minimum-width integer types
+#define INT_LEAST8_MIN    INT8_MIN
+#define INT_LEAST8_MAX    INT8_MAX
+#define INT_LEAST16_MIN   INT16_MIN
+#define INT_LEAST16_MAX   INT16_MAX
+#define INT_LEAST32_MIN   INT32_MIN
+#define INT_LEAST32_MAX   INT32_MAX
+#define INT_LEAST64_MIN   INT64_MIN
+#define INT_LEAST64_MAX   INT64_MAX
+#define UINT_LEAST8_MAX   UINT8_MAX
+#define UINT_LEAST16_MAX  UINT16_MAX
+#define UINT_LEAST32_MAX  UINT32_MAX
+#define UINT_LEAST64_MAX  UINT64_MAX
+
+// 7.18.2.3 Limits of fastest minimum-width integer types
+#define INT_FAST8_MIN    INT8_MIN
+#define INT_FAST8_MAX    INT8_MAX
+#define INT_FAST16_MIN   INT16_MIN
+#define INT_FAST16_MAX   INT16_MAX
+#define INT_FAST32_MIN   INT32_MIN
+#define INT_FAST32_MAX   INT32_MAX
+#define INT_FAST64_MIN   INT64_MIN
+#define INT_FAST64_MAX   INT64_MAX
+#define UINT_FAST8_MAX   UINT8_MAX
+#define UINT_FAST16_MAX  UINT16_MAX
+#define UINT_FAST32_MAX  UINT32_MAX
+#define UINT_FAST64_MAX  UINT64_MAX
+
+// 7.18.2.4 Limits of integer types capable of holding object pointers
+#ifdef _WIN64 // [
+#  define INTPTR_MIN   INT64_MIN
+#  define INTPTR_MAX   INT64_MAX
+#  define UINTPTR_MAX  UINT64_MAX
+#else // _WIN64 ][
+#  define INTPTR_MIN   INT32_MIN
+#  define INTPTR_MAX   INT32_MAX
+#  define UINTPTR_MAX  UINT32_MAX
+#endif // _WIN64 ]
+
+// 7.18.2.5 Limits of greatest-width integer types
+#define INTMAX_MIN   INT64_MIN
+#define INTMAX_MAX   INT64_MAX
+#define UINTMAX_MAX  UINT64_MAX
+
+// 7.18.3 Limits of other integer types
+
+#ifdef _WIN64 // [
+#  define PTRDIFF_MIN  _I64_MIN
+#  define PTRDIFF_MAX  _I64_MAX
+#else  // _WIN64 ][
+#  define PTRDIFF_MIN  _I32_MIN
+#  define PTRDIFF_MAX  _I32_MAX
+#endif  // _WIN64 ]
+
+#define SIG_ATOMIC_MIN  INT_MIN
+#define SIG_ATOMIC_MAX  INT_MAX
+
+#ifndef SIZE_MAX // [
+#  ifdef _WIN64 // [
+#     define SIZE_MAX  _UI64_MAX
+#  else // _WIN64 ][
+#     define SIZE_MAX  _UI32_MAX
+#  endif // _WIN64 ]
+#endif // SIZE_MAX ]
+
+// WCHAR_MIN and WCHAR_MAX are also defined in <wchar.h>
+#ifndef WCHAR_MIN // [
+#  define WCHAR_MIN  0
+#endif  // WCHAR_MIN ]
+#ifndef WCHAR_MAX // [
+#  define WCHAR_MAX  _UI16_MAX
+#endif  // WCHAR_MAX ]
+
+#define WINT_MIN  0
+#define WINT_MAX  _UI16_MAX
+
+#endif // __STDC_LIMIT_MACROS ]
+
+
+// 7.18.4 Limits of other integer types
+
+#if !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS) // [   See footnote 224 at page 260
+
+// 7.18.4.1 Macros for minimum-width integer constants
+
+#define INT8_C(val)  val##i8
+#define INT16_C(val) val##i16
+#define INT32_C(val) val##i32
+#define INT64_C(val) val##i64
+
+#define UINT8_C(val)  val##ui8
+#define UINT16_C(val) val##ui16
+#define UINT32_C(val) val##ui32
+#define UINT64_C(val) val##ui64
+
+// 7.18.4.2 Macros for greatest-width integer constants
+// These #ifndef's are needed to prevent collisions with <boost/cstdint.hpp>.
+// Check out Issue 9 for the details.
+#ifndef INTMAX_C //   [
+#  define INTMAX_C   INT64_C
+#endif // INTMAX_C    ]
+#ifndef UINTMAX_C //  [
+#  define UINTMAX_C  UINT64_C
+#endif // UINTMAX_C   ]
+
+#endif // __STDC_CONSTANT_MACROS ]
+
+#endif // _MSC_VER >= 1600 ]
+
+#endif // _MSC_STDINT_H_ ]
diff --git a/include/pyfftw_complex.h b/include/pyfftw_complex.h
new file mode 100644
index 0000000..0d711ce
--- /dev/null
+++ b/include/pyfftw_complex.h
@@ -0,0 +1,38 @@
+
+/*
+ * Copyright 2013 Knowledge Economy Developments Ltd
+ * 
+ * Henry Gomersall
+ * heng at kedevelopments.co.uk
+ * 
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/* Defines complex types that are bit compatible with C99's complex.h
+ * and (crucially) the same type as expected by fftw3.h.
+ * Note, don't use this with complex.h. fftw3.h checks to see whether
+ * complex.h is included and then uses that to set the interface.
+ * Since MSVC doesn't support C99, by using the following types we
+ * have a cross platform/compiler solution.
+ *
+ * */
+
+#ifndef PYFFTW_COMPLEX_H
+#define PYFFTW_COMPLEX_H
+
+typedef float cfloat[2];
+typedef double cdouble[2];
+typedef long double clongdouble[2];
+
+#endif /* Header guard */
diff --git a/include/win/fftw3.h b/include/win/fftw3.h
new file mode 100644
index 0000000..6fabb7e
--- /dev/null
+++ b/include/win/fftw3.h
@@ -0,0 +1,412 @@
+/*
+ * Copyright (c) 2003, 2007-11 Matteo Frigo
+ * Copyright (c) 2003, 2007-11 Massachusetts Institute of Technology
+ *
+ * The following statement of license applies *only* to this header file,
+ * and *not* to the other files distributed with FFTW or derived therefrom:
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
+ * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+ * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/***************************** NOTE TO USERS *********************************
+ *
+ *                 THIS IS A HEADER FILE, NOT A MANUAL
+ *
+ *    If you want to know how to use FFTW, please read the manual,
+ *    online at http://www.fftw.org/doc/ and also included with FFTW.
+ *    For a quick start, see the manual's tutorial section.
+ *
+ *   (Reading header files to learn how to use a library is a habit
+ *    stemming from code lacking a proper manual.  Arguably, it's a
+ *    *bad* habit in most cases, because header files can contain
+ *    interfaces that are not part of the public, stable API.)
+ *
+ ****************************************************************************/
+
+#ifndef FFTW3_H
+#define FFTW3_H
+
+#include <stdio.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+/* If <complex.h> is included, use the C99 complex type.  Otherwise
+   define a type bit-compatible with C99 complex */
+#if !defined(FFTW_NO_Complex) && defined(_Complex_I) && defined(complex) && defined(I)
+#  define FFTW_DEFINE_COMPLEX(R, C) typedef R _Complex C
+#else
+#  define FFTW_DEFINE_COMPLEX(R, C) typedef R C[2]
+#endif
+
+#define FFTW_CONCAT(prefix, name) prefix ## name
+#define FFTW_MANGLE_DOUBLE(name) FFTW_CONCAT(fftw_, name)
+#define FFTW_MANGLE_FLOAT(name) FFTW_CONCAT(fftwf_, name)
+#define FFTW_MANGLE_LONG_DOUBLE(name) FFTW_CONCAT(fftwl_, name)
+#define FFTW_MANGLE_QUAD(name) FFTW_CONCAT(fftwq_, name)
+
+/* IMPORTANT: for Windows compilers, you should add a line
+*/
+#define FFTW_DLL
+/*
+   here and in kernel/ifftw.h if you are compiling/using FFTW as a
+   DLL, in order to do the proper importing/exporting, or
+   alternatively compile with -DFFTW_DLL or the equivalent
+   command-line flag.  This is not necessary under MinGW/Cygwin, where
+   libtool does the imports/exports automatically. */
+#if defined(FFTW_DLL) && (defined(_WIN32) || defined(__WIN32__))
+   /* annoying Windows syntax for shared-library declarations */
+#  if defined(COMPILING_FFTW) /* defined in api.h when compiling FFTW */
+#    define FFTW_EXTERN extern __declspec(dllexport) 
+#  else /* user is calling FFTW; import symbol */
+#    define FFTW_EXTERN extern __declspec(dllimport) 
+#  endif
+#else
+#  define FFTW_EXTERN extern
+#endif
+
+enum fftw_r2r_kind_do_not_use_me {
+     FFTW_R2HC=0, FFTW_HC2R=1, FFTW_DHT=2,
+     FFTW_REDFT00=3, FFTW_REDFT01=4, FFTW_REDFT10=5, FFTW_REDFT11=6,
+     FFTW_RODFT00=7, FFTW_RODFT01=8, FFTW_RODFT10=9, FFTW_RODFT11=10
+};
+
+struct fftw_iodim_do_not_use_me {
+     int n;                     /* dimension size */
+     int is;			/* input stride */
+     int os;			/* output stride */
+};
+
+#include <stddef.h> /* for ptrdiff_t */
+struct fftw_iodim64_do_not_use_me {
+     ptrdiff_t n;                     /* dimension size */
+     ptrdiff_t is;			/* input stride */
+     ptrdiff_t os;			/* output stride */
+};
+
+typedef void (*fftw_write_char_func_do_not_use_me)(char c, void *);
+typedef int (*fftw_read_char_func_do_not_use_me)(void *);
+
+/*
+  huge second-order macro that defines prototypes for all API
+  functions.  We expand this macro for each supported precision
+ 
+  X: name-mangling macro
+  R: real data type
+  C: complex data type
+*/
+
+#define FFTW_DEFINE_API(X, R, C)					   \
+									   \
+FFTW_DEFINE_COMPLEX(R, C);						   \
+									   \
+typedef struct X(plan_s) *X(plan);					   \
+									   \
+typedef struct fftw_iodim_do_not_use_me X(iodim);			   \
+typedef struct fftw_iodim64_do_not_use_me X(iodim64);			   \
+									   \
+typedef enum fftw_r2r_kind_do_not_use_me X(r2r_kind);			   \
+									   \
+typedef fftw_write_char_func_do_not_use_me X(write_char_func);		   \
+typedef fftw_read_char_func_do_not_use_me X(read_char_func);		   \
+									   \
+FFTW_EXTERN void X(execute)(const X(plan) p);				   \
+									   \
+FFTW_EXTERN X(plan) X(plan_dft)(int rank, const int *n,			   \
+		    C *in, C *out, int sign, unsigned flags);		   \
+									   \
+FFTW_EXTERN X(plan) X(plan_dft_1d)(int n, C *in, C *out, int sign,	   \
+		       unsigned flags);					   \
+FFTW_EXTERN X(plan) X(plan_dft_2d)(int n0, int n1,			   \
+		       C *in, C *out, int sign, unsigned flags);	   \
+FFTW_EXTERN X(plan) X(plan_dft_3d)(int n0, int n1, int n2,		   \
+		       C *in, C *out, int sign, unsigned flags);	   \
+									   \
+FFTW_EXTERN X(plan) X(plan_many_dft)(int rank, const int *n,		   \
+                         int howmany,					   \
+                         C *in, const int *inembed,			   \
+                         int istride, int idist,			   \
+                         C *out, const int *onembed,			   \
+                         int ostride, int odist,			   \
+                         int sign, unsigned flags);			   \
+									   \
+FFTW_EXTERN X(plan) X(plan_guru_dft)(int rank, const X(iodim) *dims,	   \
+			 int howmany_rank,				   \
+			 const X(iodim) *howmany_dims,			   \
+			 C *in, C *out,					   \
+			 int sign, unsigned flags);			   \
+FFTW_EXTERN X(plan) X(plan_guru_split_dft)(int rank, const X(iodim) *dims, \
+			 int howmany_rank,				   \
+			 const X(iodim) *howmany_dims,			   \
+			 R *ri, R *ii, R *ro, R *io,			   \
+			 unsigned flags);				   \
+									   \
+FFTW_EXTERN X(plan) X(plan_guru64_dft)(int rank,			   \
+                         const X(iodim64) *dims,			   \
+			 int howmany_rank,				   \
+			 const X(iodim64) *howmany_dims,		   \
+			 C *in, C *out,					   \
+			 int sign, unsigned flags);			   \
+FFTW_EXTERN X(plan) X(plan_guru64_split_dft)(int rank,			   \
+                         const X(iodim64) *dims,			   \
+			 int howmany_rank,				   \
+			 const X(iodim64) *howmany_dims,		   \
+			 R *ri, R *ii, R *ro, R *io,			   \
+			 unsigned flags);				   \
+									   \
+FFTW_EXTERN void X(execute_dft)(const X(plan) p, C *in, C *out);	   \
+FFTW_EXTERN void X(execute_split_dft)(const X(plan) p, R *ri, R *ii,	   \
+                                      R *ro, R *io);			   \
+									   \
+FFTW_EXTERN X(plan) X(plan_many_dft_r2c)(int rank, const int *n,	   \
+                             int howmany,				   \
+                             R *in, const int *inembed,			   \
+                             int istride, int idist,			   \
+                             C *out, const int *onembed,		   \
+                             int ostride, int odist,			   \
+                             unsigned flags);				   \
+									   \
+FFTW_EXTERN X(plan) X(plan_dft_r2c)(int rank, const int *n,		   \
+                        R *in, C *out, unsigned flags);			   \
+									   \
+FFTW_EXTERN X(plan) X(plan_dft_r2c_1d)(int n,R *in,C *out,unsigned flags); \
+FFTW_EXTERN X(plan) X(plan_dft_r2c_2d)(int n0, int n1,			   \
+			   R *in, C *out, unsigned flags);		   \
+FFTW_EXTERN X(plan) X(plan_dft_r2c_3d)(int n0, int n1,			   \
+			   int n2,					   \
+			   R *in, C *out, unsigned flags);		   \
+									   \
+									   \
+FFTW_EXTERN X(plan) X(plan_many_dft_c2r)(int rank, const int *n,	   \
+			     int howmany,				   \
+			     C *in, const int *inembed,			   \
+			     int istride, int idist,			   \
+			     R *out, const int *onembed,		   \
+			     int ostride, int odist,			   \
+			     unsigned flags);				   \
+									   \
+FFTW_EXTERN X(plan) X(plan_dft_c2r)(int rank, const int *n,		   \
+                        C *in, R *out, unsigned flags);			   \
+									   \
+FFTW_EXTERN X(plan) X(plan_dft_c2r_1d)(int n,C *in,R *out,unsigned flags); \
+FFTW_EXTERN X(plan) X(plan_dft_c2r_2d)(int n0, int n1,			   \
+			   C *in, R *out, unsigned flags);		   \
+FFTW_EXTERN X(plan) X(plan_dft_c2r_3d)(int n0, int n1,			   \
+			   int n2,					   \
+			   C *in, R *out, unsigned flags);		   \
+									   \
+FFTW_EXTERN X(plan) X(plan_guru_dft_r2c)(int rank, const X(iodim) *dims,   \
+			     int howmany_rank,				   \
+			     const X(iodim) *howmany_dims,		   \
+			     R *in, C *out,				   \
+			     unsigned flags);				   \
+FFTW_EXTERN X(plan) X(plan_guru_dft_c2r)(int rank, const X(iodim) *dims,   \
+			     int howmany_rank,				   \
+			     const X(iodim) *howmany_dims,		   \
+			     C *in, R *out,				   \
+			     unsigned flags);				   \
+									   \
+FFTW_EXTERN X(plan) X(plan_guru_split_dft_r2c)(				   \
+                             int rank, const X(iodim) *dims,		   \
+			     int howmany_rank,				   \
+			     const X(iodim) *howmany_dims,		   \
+			     R *in, R *ro, R *io,			   \
+			     unsigned flags);				   \
+FFTW_EXTERN X(plan) X(plan_guru_split_dft_c2r)(				   \
+                             int rank, const X(iodim) *dims,		   \
+			     int howmany_rank,				   \
+			     const X(iodim) *howmany_dims,		   \
+			     R *ri, R *ii, R *out,			   \
+			     unsigned flags);				   \
+									   \
+FFTW_EXTERN X(plan) X(plan_guru64_dft_r2c)(int rank,			   \
+                             const X(iodim64) *dims,			   \
+			     int howmany_rank,				   \
+			     const X(iodim64) *howmany_dims,		   \
+			     R *in, C *out,				   \
+			     unsigned flags);				   \
+FFTW_EXTERN X(plan) X(plan_guru64_dft_c2r)(int rank,			   \
+                             const X(iodim64) *dims,			   \
+			     int howmany_rank,				   \
+			     const X(iodim64) *howmany_dims,		   \
+			     C *in, R *out,				   \
+			     unsigned flags);				   \
+									   \
+FFTW_EXTERN X(plan) X(plan_guru64_split_dft_r2c)(			   \
+                             int rank, const X(iodim64) *dims,		   \
+			     int howmany_rank,				   \
+			     const X(iodim64) *howmany_dims,		   \
+			     R *in, R *ro, R *io,			   \
+			     unsigned flags);				   \
+FFTW_EXTERN X(plan) X(plan_guru64_split_dft_c2r)(			   \
+                             int rank, const X(iodim64) *dims,		   \
+			     int howmany_rank,				   \
+			     const X(iodim64) *howmany_dims,		   \
+			     R *ri, R *ii, R *out,			   \
+			     unsigned flags);				   \
+									   \
+FFTW_EXTERN void X(execute_dft_r2c)(const X(plan) p, R *in, C *out);	   \
+FFTW_EXTERN void X(execute_dft_c2r)(const X(plan) p, C *in, R *out);	   \
+									   \
+FFTW_EXTERN void X(execute_split_dft_r2c)(const X(plan) p,		   \
+                                          R *in, R *ro, R *io);		   \
+FFTW_EXTERN void X(execute_split_dft_c2r)(const X(plan) p,		   \
+                                          R *ri, R *ii, R *out);	   \
+									   \
+FFTW_EXTERN X(plan) X(plan_many_r2r)(int rank, const int *n,		   \
+                         int howmany,					   \
+                         R *in, const int *inembed,			   \
+                         int istride, int idist,			   \
+                         R *out, const int *onembed,			   \
+                         int ostride, int odist,			   \
+                         const X(r2r_kind) *kind, unsigned flags);	   \
+									   \
+FFTW_EXTERN X(plan) X(plan_r2r)(int rank, const int *n, R *in, R *out,	   \
+                    const X(r2r_kind) *kind, unsigned flags);		   \
+									   \
+FFTW_EXTERN X(plan) X(plan_r2r_1d)(int n, R *in, R *out,		   \
+                       X(r2r_kind) kind, unsigned flags);		   \
+FFTW_EXTERN X(plan) X(plan_r2r_2d)(int n0, int n1, R *in, R *out,	   \
+                       X(r2r_kind) kind0, X(r2r_kind) kind1,		   \
+                       unsigned flags);					   \
+FFTW_EXTERN X(plan) X(plan_r2r_3d)(int n0, int n1, int n2,		   \
+                       R *in, R *out, X(r2r_kind) kind0,		   \
+                       X(r2r_kind) kind1, X(r2r_kind) kind2,		   \
+                       unsigned flags);					   \
+									   \
+FFTW_EXTERN X(plan) X(plan_guru_r2r)(int rank, const X(iodim) *dims,	   \
+                         int howmany_rank,				   \
+                         const X(iodim) *howmany_dims,			   \
+                         R *in, R *out,					   \
+                         const X(r2r_kind) *kind, unsigned flags);	   \
+									   \
+FFTW_EXTERN X(plan) X(plan_guru64_r2r)(int rank, const X(iodim64) *dims,   \
+                         int howmany_rank,				   \
+                         const X(iodim64) *howmany_dims,		   \
+                         R *in, R *out,					   \
+                         const X(r2r_kind) *kind, unsigned flags);	   \
+									   \
+FFTW_EXTERN void X(execute_r2r)(const X(plan) p, R *in, R *out);	   \
+									   \
+FFTW_EXTERN void X(destroy_plan)(X(plan) p);				   \
+FFTW_EXTERN void X(forget_wisdom)(void);				   \
+FFTW_EXTERN void X(cleanup)(void);					   \
+									   \
+FFTW_EXTERN void X(set_timelimit)(double t);				   \
+									   \
+FFTW_EXTERN void X(plan_with_nthreads)(int nthreads);			   \
+FFTW_EXTERN int X(init_threads)(void);					   \
+FFTW_EXTERN void X(cleanup_threads)(void);				   \
+									   \
+FFTW_EXTERN int X(export_wisdom_to_filename)(const char *filename);	   \
+FFTW_EXTERN void X(export_wisdom_to_file)(FILE *output_file);		   \
+FFTW_EXTERN char *X(export_wisdom_to_string)(void);			   \
+FFTW_EXTERN void X(export_wisdom)(X(write_char_func) write_char,   	   \
+                                  void *data);				   \
+FFTW_EXTERN int X(import_system_wisdom)(void);				   \
+FFTW_EXTERN int X(import_wisdom_from_filename)(const char *filename);	   \
+FFTW_EXTERN int X(import_wisdom_from_file)(FILE *input_file);		   \
+FFTW_EXTERN int X(import_wisdom_from_string)(const char *input_string);	   \
+FFTW_EXTERN int X(import_wisdom)(X(read_char_func) read_char, void *data); \
+									   \
+FFTW_EXTERN void X(fprint_plan)(const X(plan) p, FILE *output_file);	   \
+FFTW_EXTERN void X(print_plan)(const X(plan) p);			   \
+									   \
+FFTW_EXTERN void *X(malloc)(size_t n);					   \
+FFTW_EXTERN R *X(alloc_real)(size_t n);					   \
+FFTW_EXTERN C *X(alloc_complex)(size_t n);				   \
+FFTW_EXTERN void X(free)(void *p);					   \
+									   \
+FFTW_EXTERN void X(flops)(const X(plan) p,				   \
+                          double *add, double *mul, double *fmas);	   \
+FFTW_EXTERN double X(estimate_cost)(const X(plan) p);			   \
+FFTW_EXTERN double X(cost)(const X(plan) p);				   \
+									   \
+FFTW_EXTERN const char X(version)[];					   \
+FFTW_EXTERN const char X(cc)[];						   \
+FFTW_EXTERN const char X(codelet_optim)[];
+
+
+/* end of FFTW_DEFINE_API macro */
+
+FFTW_DEFINE_API(FFTW_MANGLE_DOUBLE, double, fftw_complex)
+FFTW_DEFINE_API(FFTW_MANGLE_FLOAT, float, fftwf_complex)
+FFTW_DEFINE_API(FFTW_MANGLE_LONG_DOUBLE, long double, fftwl_complex)
+
+/* __float128 (quad precision) is a gcc extension on i386, x86_64, and ia64
+   for gcc >= 4.6 (compiled in FFTW with --enable-quad-precision) */
+#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) \
+ && !(defined(__ICC) || defined(__INTEL_COMPILER)) \
+ && (defined(__i386__) || defined(__x86_64__) || defined(__ia64__))
+#  if !defined(FFTW_NO_Complex) && defined(_Complex_I) && defined(complex) && defined(I)
+/* note: __float128 is a typedef, which is not supported with the _Complex
+         keyword in gcc, so instead we use this ugly __attribute__ version.
+         However, we can't simply pass the __attribute__ version to
+         FFTW_DEFINE_API because the __attribute__ confuses gcc in pointer
+         types.  Hence redefining FFTW_DEFINE_COMPLEX.  Ugh. */
+#    undef FFTW_DEFINE_COMPLEX
+#    define FFTW_DEFINE_COMPLEX(R, C) typedef _Complex float __attribute__((mode(TC))) C
+#  endif
+FFTW_DEFINE_API(FFTW_MANGLE_QUAD, __float128, fftwq_complex)
+#endif
+
+#define FFTW_FORWARD (-1)
+#define FFTW_BACKWARD (+1)
+
+#define FFTW_NO_TIMELIMIT (-1.0)
+
+/* documented flags */
+#define FFTW_MEASURE (0U)
+#define FFTW_DESTROY_INPUT (1U << 0)
+#define FFTW_UNALIGNED (1U << 1)
+#define FFTW_CONSERVE_MEMORY (1U << 2)
+#define FFTW_EXHAUSTIVE (1U << 3) /* NO_EXHAUSTIVE is default */
+#define FFTW_PRESERVE_INPUT (1U << 4) /* cancels FFTW_DESTROY_INPUT */
+#define FFTW_PATIENT (1U << 5) /* IMPATIENT is default */
+#define FFTW_ESTIMATE (1U << 6)
+#define FFTW_WISDOM_ONLY (1U << 21)
+
+/* undocumented beyond-guru flags */
+#define FFTW_ESTIMATE_PATIENT (1U << 7)
+#define FFTW_BELIEVE_PCOST (1U << 8)
+#define FFTW_NO_DFT_R2HC (1U << 9)
+#define FFTW_NO_NONTHREADED (1U << 10)
+#define FFTW_NO_BUFFERING (1U << 11)
+#define FFTW_NO_INDIRECT_OP (1U << 12)
+#define FFTW_ALLOW_LARGE_GENERIC (1U << 13) /* NO_LARGE_GENERIC is default */
+#define FFTW_NO_RANK_SPLITS (1U << 14)
+#define FFTW_NO_VRANK_SPLITS (1U << 15)
+#define FFTW_NO_VRECURSE (1U << 16)
+#define FFTW_NO_SIMD (1U << 17)
+#define FFTW_NO_SLOW (1U << 18)
+#define FFTW_NO_FIXED_RADIX_LARGE_N (1U << 19)
+#define FFTW_ALLOW_PRUNING (1U << 20)
+
+#ifdef __cplusplus
+}  /* extern "C" */
+#endif /* __cplusplus */
+
+#endif /* FFTW3_H */
diff --git a/pyfftw/__init__.py b/pyfftw/__init__.py
new file mode 100644
index 0000000..6fa985d
--- /dev/null
+++ b/pyfftw/__init__.py
@@ -0,0 +1,31 @@
+#!/usr/bin/env python
+# The pyfftw namespace
+
+''' The core of ``pyfftw`` consists of the :class:`FFTW` class, 
+:ref:`wisdom functions <wisdom_functions>` and a couple of
+:ref:`utility functions <utility_functions>` for dealing with aligned
+arrays.
+
+This module represents the full interface to the underlying `FFTW
+library <http://www.fftw.org/>`_. However, users may find it easier to
+use the helper routines provided in :mod:`pyfftw.builders`.
+'''
+
+from ._version import version
+
+from .pyfftw import (
+        FFTW,
+        export_wisdom,
+        import_wisdom,
+        forget_wisdom,
+        simd_alignment,
+        n_byte_align_empty,
+        n_byte_align,
+        is_n_byte_aligned,)
+
+from . import builders
+from . import interfaces
+
+# clean up the namespace
+del builders.builders
+
diff --git a/pyfftw/_version.py b/pyfftw/_version.py
new file mode 100644
index 0000000..30ac598
--- /dev/null
+++ b/pyfftw/_version.py
@@ -0,0 +1,2 @@
+
+version = '0.9.2'
diff --git a/pyfftw/builders/__init__.py b/pyfftw/builders/__init__.py
new file mode 100644
index 0000000..a7fd3cd
--- /dev/null
+++ b/pyfftw/builders/__init__.py
@@ -0,0 +1,7 @@
+#!/usr/bin/env python
+
+from .builders import *
+from . import _utils
+
+__doc__ = builders.__doc__
+__all__ = builders.__all__
diff --git a/pyfftw/builders/_utils.py b/pyfftw/builders/_utils.py
new file mode 100644
index 0000000..7009b80
--- /dev/null
+++ b/pyfftw/builders/_utils.py
@@ -0,0 +1,367 @@
+#!/usr/bin/env python
+#
+# Copyright 2012 Knowledge Economy Developments Ltd
+# 
+# Henry Gomersall
+# heng at kedevelopments.co.uk
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+'''
+A set of utility functions for use with the builders. Users should
+not need to use the functions directly, but they are included here for
+completeness and to aid with understanding of what is happening behind
+the scenes.
+
+Certainly, users may encounter instances of 
+:class:`~pyfftw.builders._utils._FFTWWrapper`.
+
+These everything documented in this module is *not* part of the public API 
+and may change in future versions.
+'''
+
+import pyfftw
+import numpy
+
+__all__ = ['_FFTWWrapper', '_rc_dtype_pairs', '_default_dtype', '_Xfftn',
+        '_setup_input_slicers', '_compute_array_shapes', '_precook_1d_args',
+        '_cook_nd_args']
+
+_valid_efforts = ('FFTW_ESTIMATE', 'FFTW_MEASURE', 
+        'FFTW_PATIENT', 'FFTW_EXHAUSTIVE')
+
+# Looking up a dtype in here returns the complex complement of the same
+# precision.
+_rc_dtype_pairs = {numpy.dtype('float32'): numpy.dtype('complex64'),
+        numpy.dtype('float64'): numpy.dtype('complex128'),
+        numpy.dtype('longdouble'): numpy.dtype('clongdouble'),
+        numpy.dtype('complex64'): numpy.dtype('float32'),
+        numpy.dtype('complex128'): numpy.dtype('float64'),
+        numpy.dtype('clongdouble'): numpy.dtype('longdouble')}
+
+_default_dtype = numpy.dtype('float64')
+
+def _Xfftn(a, s, axes, overwrite_input, 
+        planner_effort, threads, auto_align_input, auto_contiguous, 
+        avoid_copy, inverse, real):
+    '''Generic transform interface for all the transforms. No
+    defaults exist. The transform must be specified exactly.
+    '''
+    a_orig = a
+    invreal = inverse and real
+
+    if inverse:
+        direction = 'FFTW_BACKWARD'
+    else:
+        direction = 'FFTW_FORWARD'
+
+    if planner_effort not in _valid_efforts:
+        raise ValueError('Invalid planner effort: ', planner_effort)
+
+    s, axes = _cook_nd_args(a, s, axes, invreal)
+    
+    input_shape, output_shape = _compute_array_shapes(
+            a, s, axes, inverse, real)
+
+    a_is_complex = numpy.iscomplexobj(a)
+
+    # Make the input dtype correct
+    if a.dtype not in _rc_dtype_pairs:
+        # We make it the default dtype
+        if not real or inverse:
+            # It's going to be complex
+            a = numpy.asarray(a, dtype=_rc_dtype_pairs[_default_dtype])
+        else:
+            a = numpy.asarray(a, dtype=_default_dtype)
+    
+    elif not (real and not inverse) and not a_is_complex:
+        # We need to make it a complex dtype
+        a = numpy.asarray(a, dtype=_rc_dtype_pairs[a.dtype])
+
+    elif (real and not inverse) and a_is_complex:
+        # It should be real
+        a = numpy.asarray(a, dtype=_rc_dtype_pairs[a.dtype])
+
+    # Make the output dtype correct
+    if not real:
+        output_dtype = a.dtype
+    
+    else:
+        output_dtype = _rc_dtype_pairs[a.dtype]
+
+    if not avoid_copy:
+        a_copy = a.copy()
+
+    output_array = pyfftw.n_byte_align_empty(output_shape, 16, output_dtype)
+
+    flags = [planner_effort]
+
+    if not auto_align_input:
+        flags.append('FFTW_UNALIGNED')
+
+    if overwrite_input:
+        flags.append('FFTW_DESTROY_INPUT')
+
+    if not a.shape == input_shape:
+
+        if avoid_copy:
+            raise ValueError('Cannot avoid copy: '
+                    'The transform shape is not the same as the array size. '
+                    '(from avoid_copy flag)')
+
+        # This means we need to use an _FFTWWrapper object
+        # and so need to create slicers.
+        update_input_array_slicer, FFTW_array_slicer = (
+                _setup_input_slicers(a.shape, input_shape))
+
+        # Also, the input array will be a different shape to the shape of 
+        # `a`, so we need to create a new array.
+        input_array = pyfftw.n_byte_align_empty(input_shape, 16, a.dtype)
+
+        FFTW_object = _FFTWWrapper(input_array, output_array, axes, direction,
+                flags, threads, input_array_slicer=update_input_array_slicer,
+                FFTW_array_slicer=FFTW_array_slicer)
+
+        # We copy the data back into the internal FFTW object array
+        internal_array = FFTW_object.get_input_array()
+        internal_array[:] = 0
+        internal_array[FFTW_array_slicer] = (
+                a_copy[update_input_array_slicer])
+
+    else:
+        # Otherwise we can use `a` as-is
+
+        input_array = a
+
+        if auto_contiguous:
+            # We only need to create a new array if it's not already 
+            # contiguous
+            if not (a.flags['C_CONTIGUOUS'] or a.flags['F_CONTIGUOUS']):
+                if avoid_copy:
+                    raise ValueError('Cannot avoid copy: '
+                            'The input array is not contiguous and '
+                            'auto_contiguous is set. (from avoid_copy flag)')
+
+                input_array = pyfftw.n_byte_align_empty(a.shape, 16, a.dtype)
+
+        if (auto_align_input and 
+                not pyfftw.is_n_byte_aligned(input_array, 16)):
+
+            if avoid_copy:
+                raise ValueError('Cannot avoid copy: '
+                        'The input array is not aligned and '
+                        'auto_align is set. (from avoid_copy flag)')
+
+            input_array = pyfftw.n_byte_align(input_array, 16)
+
+        FFTW_object = pyfftw.FFTW(input_array, output_array, axes, direction,
+                flags, threads)
+
+        if not avoid_copy:
+            # Copy the data back into the (likely) destroyed array
+            FFTW_object.get_input_array()[:] = a_copy
+    
+    return FFTW_object
+
+
+class _FFTWWrapper(pyfftw.FFTW):
+    ''' A class that wraps :class:`pyfftw.FFTW`, providing a slicer on the input
+    stage during calls to :meth:`~pyfftw.builders._utils._FFTWWrapper.__call__`.
+    '''
+
+    def __init__(self, input_array, output_array, axes=[-1], 
+            direction='FFTW_FORWARD', flags=['FFTW_MEASURE'], 
+            threads=1, *args, **kwargs):
+        '''The arguments are as per :class:`pyfftw.FFTW`, but with the addition
+        of 2 keyword arguments: ``input_array_slicer`` and
+        ``FFTW_array_slicer``.
+
+        These arguments represent 2 slicers: ``input_array_slicer`` slices
+        the input array that is passed in during a call to instances of this
+        class, and ``FFTW_array_slicer`` slices the internal array.
+
+        The arrays that are returned from both of these slicing operations
+        should be the same size. The data is then copied from the sliced
+        input array into the sliced internal array.
+        '''
+
+        self.__input_array_slicer = kwargs.pop('input_array_slicer')
+        self.__FFTW_array_slicer = kwargs.pop('FFTW_array_slicer')
+
+        if 'FFTW_DESTROY_INPUT' in flags:
+            self.__input_destroyed = True
+        else:
+            self.__input_destroyed = False
+
+        super(_FFTWWrapper, self).__init__(input_array, output_array, 
+                axes, direction, flags, threads, *args, **kwargs)
+
+    def __call__(self, input_array=None, output_array=None, 
+            normalise_idft=True):
+        '''Wrap :meth:`pyfftw.FFTW.__call__` by firstly slicing the 
+        passed-in input array and then copying it into a sliced version
+        of the internal array. These slicers are set at instantiation.
+
+        When input array is not ``None``, this method always results in
+        a copy. Consequently, the alignment and dtype are maintained in
+        the internal array.
+
+        ``output_array`` and ``normalise_idft`` are passed through to
+        :meth:`pyfftw.FFTW.__call__` untouched.
+        '''
+
+        if input_array is not None:
+            # Do the update here (which is a copy, so it's alignment
+            # safe etc).
+
+            internal_input_array = self.get_input_array()
+            input_array = numpy.asanyarray(input_array)
+
+            if self.__input_destroyed:
+                internal_input_array[:] = 0
+
+            sliced_internal = internal_input_array[self.__FFTW_array_slicer]
+            sliced_input = input_array[self.__input_array_slicer]
+
+            if sliced_internal.shape != sliced_input.shape:
+                raise ValueError('Invalid input shape: '
+                        'The new input array should be the same shape '
+                        'as the input array used to instantiate the '
+                        'object.')
+
+            sliced_internal[:] = sliced_input
+
+        output = super(_FFTWWrapper, self).__call__(input_array=None,
+                output_array=output_array, normalise_idft=normalise_idft)
+
+        return output
+
+
+def _setup_input_slicers(a_shape, input_shape):
+    ''' This function returns two slicers that are to be used to
+    copy the data from the input array to the FFTW object internal
+    array, which can then be passed to _FFTWWrapper:
+
+    ``(update_input_array_slicer, FFTW_array_slicer)``
+
+    On calls to :class:`~pyfftw.builders._utils._FFTWWrapper` objects, 
+    the input array is copied in as:
+
+    ``FFTW_array[FFTW_array_slicer] = input_array[update_input_array_slicer]``
+    '''
+
+    # default the slicers to include everything
+    update_input_array_slicer = (
+            [slice(None)]*len(a_shape))
+    FFTW_array_slicer = [slice(None)]*len(a_shape)
+
+    # iterate over each dimension and modify the slicer and FFTW dimension
+    for axis in range(len(a_shape)):
+
+        if a_shape[axis] > input_shape[axis]:
+            update_input_array_slicer[axis] = (
+                    slice(0, input_shape[axis]))
+
+        elif a_shape[axis] < input_shape[axis]:
+            FFTW_array_slicer[axis] = (
+                    slice(0, a_shape[axis]))
+            update_input_array_slicer[axis] = (
+                    slice(0, a_shape[axis]))
+
+        else:
+            # If neither of these, we use the whole dimension.
+            update_input_array_slicer[axis] = (
+                    slice(0, a_shape[axis]))
+
+    return update_input_array_slicer, FFTW_array_slicer
+
+def _compute_array_shapes(a, s, axes, inverse, real):
+    '''Given a passed in array ``a``, and the rest of the arguments
+    (that have been fleshed out with 
+    :func:`~pyfftw.builders._utils._cook_nd_args`), compute
+    the shape the input and output arrays need to be in order 
+    to satisfy all the requirements for the transform. The input
+    shape *may* be different to the shape of a.
+
+    returns:
+    ``(input_shape, output_shape)``
+    '''
+    # Start with the shape of a
+    orig_domain_shape = list(a.shape)
+    fft_domain_shape = list(a.shape)
+    
+    try:
+        for n, axis in enumerate(axes):
+            orig_domain_shape[axis] = s[n]
+            fft_domain_shape[axis] = s[n]
+
+        if real:
+            fft_domain_shape[axes[-1]] = s[-1]//2 + 1
+
+    except IndexError:
+        raise IndexError('Invalid axes: '
+                'At least one of the passed axes is invalid.')
+
+    if inverse:
+        input_shape = fft_domain_shape
+        output_shape = orig_domain_shape
+    else:
+        input_shape = orig_domain_shape
+        output_shape = fft_domain_shape
+
+    return tuple(input_shape), tuple(output_shape)
+
+def _precook_1d_args(a, n, axis):
+    '''Turn ``*(n, axis)`` into ``(s, axes)``
+    '''
+    if n is not None:
+        s = [int(n)]
+    else:
+        s = None
+
+    # Force an error with an invalid axis
+    a.shape[axis]
+
+    return s, (axis,)
+
+def _cook_nd_args(a, s=None, axes=None, invreal=False):
+    '''Similar to :func:`numpy.fft.fftpack._cook_nd_args`.
+    '''
+
+    if axes is None:
+        if s is None:
+            len_s = len(a.shape)
+        else:
+            len_s = len(s)
+
+        axes = list(range(-len_s, 0))
+
+    if s is None:
+        s = list(numpy.take(a.shape, axes))
+
+        if invreal:
+            s[-1] = (a.shape[axes[-1]] - 1) * 2
+
+
+    if len(s) != len(axes):
+        raise ValueError('Shape error: '
+                'Shape and axes have different lengths.')
+
+    if len(s) > len(a.shape):
+        raise ValueError('Shape error: '
+                'The length of s or axes cannot exceed the dimensionality '
+                'of the input array, a.')
+
+    return tuple(s), tuple(axes)
+
diff --git a/pyfftw/builders/builders.py b/pyfftw/builders/builders.py
new file mode 100644
index 0000000..f6c4c05
--- /dev/null
+++ b/pyfftw/builders/builders.py
@@ -0,0 +1,497 @@
+#!/usr/bin/env python
+#
+# Copyright 2012 Knowledge Economy Developments Ltd
+# 
+# Henry Gomersall
+# heng at kedevelopments.co.uk
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+'''
+Overview
+""""""""
+
+This module contains a set of functions that return 
+:class:`pyfftw.FFTW` objects.
+
+The interface to create these objects is mostly the same as
+:mod:`numpy.fft`, only instead of the call returning the result of the
+FFT, a :class:`pyfftw.FFTW` object is returned that performs that FFT
+operation when it is called. Users should be familiar with
+:mod:`!numpy.fft` before reading on.
+
+In the case where the shape argument, ``s`` (or ``n`` in the
+1-dimensional case), dictates that the passed-in input array be copied
+into a different processing array, the returned object is an
+instance of a child class of :class:`pyfftw.FFTW`,
+:class:`~pyfftw.builders._utils._FFTWWrapper`, which wraps the call
+method in order to correctly perform that copying. That is, subsequent
+calls to the object (i.e. through
+:meth:`~pyfftw.builders._utils._FFTWWrapper.__call__`) should occur
+with an input array that can be sliced to the same size as the
+expected internal array. Note that a side effect of this is that
+subsequent calls to the object can be made with an array that is
+*bigger* than the original (but not smaller).
+
+Only the call method is wrapped; :meth:`~pyfftw.FFTW.update_arrays`
+still expects an array with the correct size, alignment, dtype etc for
+the :class:`pyfftw.FFTW` object.
+
+When the internal input array is bigger along any axis than the input
+array that is passed in (due to ``s`` dictating a larger size), then the
+extra entries are padded with zeros. This is a one time action. If the
+internal input array is then extracted using
+:meth:`pyfftw.FFTW.get_input_array`, it is possible to
+persistently fill the padding space with whatever the user desires, so
+subsequent calls with a new input only overwrite the values that aren't
+padding (even if the array that is used for the call is bigger than the
+original - see the point above about bigger arrays being sliced to
+fit).
+
+The precision of the FFT operation is acquired from the input array.
+If an array is passed in that is not of float type, or is of an
+unknown float type, an attempt is made to convert the array to a
+double precision array. This results in a copy being made.
+
+If an array of the incorrect complexity is passed in (e.g. a complex
+array is passed to a real transform routine, or vice-versa), then an
+attempt is made to convert the array to an array of the correct
+complexity. This results in a copy being made.
+
+Although the array that is internal to the :class:`pyfftw.FFTW` object
+will be correctly loaded with the values within the input array, it is
+not necessarily the case that the internal array *is* the input array.
+The actual internal input array can always be retrieved with 
+:meth:`pyfftw.FFTW.get_input_array`.
+
+**Example:**
+
+.. doctest::
+    
+    >>> import pyfftw
+    >>> a = pyfftw.n_byte_align_empty(4, 16, dtype='complex128')
+    >>> fft = pyfftw.builders.fft(a)
+    >>> a[:] = [1, 2, 3, 4]
+    >>> fft() # returns the output
+    array([ 10.+0.j,  -2.+2.j,  -2.+0.j,  -2.-2.j])
+
+More examples can be found in the :doc:`tutorial </sphinx/tutorial>`.
+
+Supported Functions and Caveats
+"""""""""""""""""""""""""""""""
+
+The following functions are supported. They can be used with the
+same calling signature as their respective functions in
+:mod:`numpy.fft`.
+
+**Standard FFTs**
+
+* :func:`~pyfftw.builders.fft`
+* :func:`~pyfftw.builders.ifft`
+* :func:`~pyfftw.builders.fft2`
+* :func:`~pyfftw.builders.ifft2`
+* :func:`~pyfftw.builders.fftn`
+* :func:`~pyfftw.builders.ifftn`
+
+**Real FFTs**
+
+* :func:`~pyfftw.builders.rfft`
+* :func:`~pyfftw.builders.irfft`
+* :func:`~pyfftw.builders.rfft2`
+* :func:`~pyfftw.builders.irfft2`
+* :func:`~pyfftw.builders.rfftn`
+* :func:`~pyfftw.builders.irfftn`
+
+The first caveat is that the dtype of the input array must match the
+transform. For example, for ``fft`` and ``ifft``, the dtype must
+be complex, for ``rfft`` it must be real, and so on. The other point
+to note from this is that the precision of the transform matches the
+precision of the input array. So, if a single precision input array is
+passed in, then a single precision transform will be used.
+
+The second caveat is that repeated axes are handled differently; with 
+the returned :class:`pyfftw.FFTW` object, axes that are repeated in the
+axes argument are considered only once, as compared to :mod:`numpy.fft`
+in which repeated axes results in the DFT being taken along that axes
+as many times as the axis occurs (this is down to the underlying
+library).
+
+Note that unless the ``auto_align_input`` argument to the function
+is set to ``True``, the ``'FFTW_UNALIGNED'`` :ref:`flag <FFTW_flags>`
+is set in the returned :class:`pyfftw.FFTW` object. This disables some
+of the FFTW optimisations that rely on aligned arrays. Also worth
+noting is that the ``auto_align_input`` flag only results in a copy
+when calling the resultant :class:`pyfftw.FFTW` object if the input
+array is not already aligned correctly.
+
+.. _builders_args:
+
+Additional Arguments
+""""""""""""""""""""
+
+In addition to the arguments that are present with their complementary
+functions in :mod:`numpy.fft`, each of these functions also offers the
+following additional keyword arguments:
+
+* ``overwrite_input``: Whether or not the input array can be
+  overwritten during the transform. This sometimes results in a faster
+  algorithm being made available. It causes the ``'FFTW_DESTROY_INPUT'``
+  flag to be passed to the :class:`pyfftw.FFTW` object. This flag is not
+  offered for the multi-dimensional inverse real transforms, as FFTW is
+  unable to not overwrite the input in that case.
+
+* ``planner_effort``: A string dictating how much effort is spent 
+  in planning the FFTW routines. This is passed to the creation
+  of the :class:`pyfftw.FFTW` object as an entry in the flags list. 
+  They correspond to flags passed to the :class:`pyfftw.FFTW` object.
+
+  The valid strings, in order of their increasing impact on the time 
+  to compute  are:
+  ``'FFTW_ESTIMATE'``, ``'FFTW_MEASURE'`` (default), ``'FFTW_PATIENT'``
+  and ``'FFTW_EXHAUSTIVE'``.
+
+  The `Wisdom
+  <http://www.fftw.org/fftw3_doc/Words-of-Wisdom_002dSaving-Plans.html>`_
+  that FFTW has accumulated or has loaded (through
+  :func:`pyfftw.import_wisdom`) is used during the creation of
+  :class:`pyfftw.FFTW` objects.
+
+* ``threads``: The number of threads used to perform the FFT.
+
+* ``auto_align_input``: Correctly byte align the input array for optimal
+  usage of vector instructions. This can lead to a substantial speedup.
+
+  Setting this argument to ``True`` makes sure that the input array
+  is correctly aligned. It is possible to correctly byte align the array
+  prior to calling this function (using, for example,
+  :func:`pyfftw.n_byte_align`). If and only if a realignment is 
+  necessary is a new array created. If a new array *is* created, it is 
+  up to the calling code to acquire that new input array using 
+  :func:`pyfftw.FFTW.get_input_array`.
+
+  The resultant :class:`pyfftw.FFTW` object that is created will be
+  designed to operate on arrays that are aligned. If the object is
+  called with an unaligned array, this would result in a copy. Despite
+  this, it may still be faster to set the ``auto_align_input`` flag
+  and incur a copy with unaligned arrays than to set up an object
+  that uses aligned arrays.
+
+  It's worth noting that just being aligned may not be sufficient to
+  create the fastest possible transform. For example, if the array is not
+  contiguous (i.e. certain axes have gaps in memory between slices), it
+  may be faster to plan a transform for a contiguous array, and then rely
+  on the array being copied in before the transform (which
+  :class:`pyfftw.FFTW` will handle for you). The ``auto_contiguous``
+  argument controls whether this function also takes care of making sure
+  the array is contiguous or not.
+
+* ``auto_contiguous``: Make sure the input array is contiguous in
+  memory before performing the transform on it. If the array is not
+  contiguous, it is copied into an interim array. This is because it
+  is often faster to copy the data before the transform and then transform
+  a contiguous array than it is to try to take the transform of a 
+  non-contiguous array. This is particularly true in conjunction with
+  the ``auto_align_input`` argument which is used to make sure that the 
+  transform is taken of an aligned array.
+
+  Like ``auto_align_input``, If a new array is created, it is 
+  up to the calling code to acquire that new input array using 
+  :func:`pyfftw.FFTW.get_input_array`.
+
+* ``avoid_copy``: By default, these functions will always create a copy 
+  (and sometimes more than one) of the passed in input array. This is 
+  because the creation of the :class:`pyfftw.FFTW` object generally
+  destroys the contents of the input array. Setting this argument to
+  ``True`` will try not to create a copy of the input array, likely
+  resulting in the input array being destroyed. If it is not possible
+  to create the object without a copy being made, a ``ValueError`` is
+  raised.
+
+  Example situations that require a copy, and so cause the exception
+  to be raised when this flag is set:
+
+  * The shape of the FFT input as dictated by ``s`` is
+    necessarily different from the shape of the passed-in array.
+
+  * The dtypes are incompatible with the FFT routine.
+
+  * The ``auto_contiguous`` or ``auto_align`` flags are True and 
+    the input array is not already contiguous or aligned.
+
+  This argument is distinct from ``overwrite_input`` in that it only
+  influences a copy during the creation of the object. It changes no
+  flags in the :class:`pyfftw.FFTW` object.
+
+The exceptions raised by each of these functions are as per their
+equivalents in :mod:`numpy.fft`, or as documented above.
+'''
+
+from ._utils import _precook_1d_args, _Xfftn
+
+__all__ = ['fft','ifft', 'fft2', 'ifft2', 'fftn',
+           'ifftn', 'rfft', 'irfft', 'rfft2', 'irfft2', 'rfftn', 
+           'irfftn']
+
+
+def fft(a, n=None, axis=-1, overwrite_input=False, 
+        planner_effort='FFTW_MEASURE', threads=1,
+        auto_align_input=True, auto_contiguous=True,
+        avoid_copy=False):
+    '''Return a :class:`pyfftw.FFTW` object representing a 1D FFT.
+    
+    The first three arguments are as per :func:`numpy.fft.fft`; 
+    the rest of the arguments are documented 
+    :ref:`in the module docs <builders_args>`.
+    '''
+    inverse = False
+    real = False
+
+    s, axes = _precook_1d_args(a, n, axis)
+
+    return _Xfftn(a, s, axes, overwrite_input, planner_effort,
+            threads, auto_align_input, auto_contiguous, 
+            avoid_copy, inverse, real)
+
+def ifft(a, n=None, axis=-1, overwrite_input=False,
+        planner_effort='FFTW_MEASURE', threads=1,
+        auto_align_input=True, auto_contiguous=True,
+        avoid_copy=False):
+    '''Return a :class:`pyfftw.FFTW` object representing a 1D 
+    inverse FFT.
+    
+    The first three arguments are as per :func:`numpy.fft.ifft`; 
+    the rest of the arguments are documented 
+    :ref:`in the module docs <builders_args>`.
+    '''
+
+    inverse = True
+    real = False
+    
+    s, axes = _precook_1d_args(a, n, axis)
+
+    return _Xfftn(a, s, axes, overwrite_input, planner_effort,
+            threads, auto_align_input, auto_contiguous, 
+            avoid_copy, inverse, real)
+
+
+def fft2(a, s=None, axes=(-2,-1), overwrite_input=False,
+        planner_effort='FFTW_MEASURE', threads=1,
+        auto_align_input=True, auto_contiguous=True,
+        avoid_copy=False):
+    '''Return a :class:`pyfftw.FFTW` object representing a 2D FFT.
+    
+    The first three arguments are as per :func:`numpy.fft.fft2`; 
+    the rest of the arguments are documented 
+    :ref:`in the module docs <builders_args>`.
+    '''
+
+    
+    inverse = False
+    real = False
+
+    return _Xfftn(a, s, axes, overwrite_input, planner_effort,
+            threads, auto_align_input, auto_contiguous, 
+            avoid_copy, inverse, real)
+
+def ifft2(a, s=None, axes=(-2,-1), overwrite_input=False,
+        planner_effort='FFTW_MEASURE', threads=1,
+        auto_align_input=True, auto_contiguous=True,
+        avoid_copy=False):
+    '''Return a :class:`pyfftw.FFTW` object representing a 
+    2D inverse FFT.
+    
+    The first three arguments are as per :func:`numpy.fft.ifft2`; 
+    the rest of the arguments are documented 
+    :ref:`in the module docs <builders_args>`.
+    '''
+
+    
+    inverse = True
+    real = False
+
+    return _Xfftn(a, s, axes, overwrite_input, planner_effort,
+            threads, auto_align_input, auto_contiguous, 
+            avoid_copy, inverse, real)
+
+
+def fftn(a, s=None, axes=None, overwrite_input=False,
+        planner_effort='FFTW_MEASURE', threads=1,
+        auto_align_input=True, auto_contiguous=True,
+        avoid_copy=False):
+    '''Return a :class:`pyfftw.FFTW` object representing a n-D FFT.
+    
+    The first three arguments are as per :func:`numpy.fft.fftn`; 
+    the rest of the arguments are documented 
+    :ref:`in the module docs <builders_args>`.
+    '''
+
+
+    inverse = False
+    real = False
+
+    return _Xfftn(a, s, axes, overwrite_input, planner_effort,
+            threads, auto_align_input, auto_contiguous, 
+            avoid_copy, inverse, real)
+
+def ifftn(a, s=None, axes=None, overwrite_input=False,
+        planner_effort='FFTW_MEASURE', threads=1,
+        auto_align_input=True, auto_contiguous=True,
+        avoid_copy=False):
+    '''Return a :class:`pyfftw.FFTW` object representing an n-D 
+    inverse FFT.
+    
+    The first three arguments are as per :func:`numpy.fft.ifftn`; 
+    the rest of the arguments are documented 
+    :ref:`in the module docs <builders_args>`.
+    '''
+
+
+    inverse = True
+    real = False
+
+    return _Xfftn(a, s, axes, overwrite_input, planner_effort,
+            threads, auto_align_input, auto_contiguous, 
+            avoid_copy, inverse, real)
+
+def rfft(a, n=None, axis=-1, overwrite_input=False,
+        planner_effort='FFTW_MEASURE', threads=1,
+        auto_align_input=True, auto_contiguous=True,
+        avoid_copy=False):
+    '''Return a :class:`pyfftw.FFTW` object representing a 1D 
+    real FFT.
+    
+    The first three arguments are as per :func:`numpy.fft.rfft`; 
+    the rest of the arguments are documented 
+    :ref:`in the module docs <builders_args>`.
+    '''
+
+
+    inverse = False
+    real = True
+    
+    s, axes = _precook_1d_args(a, n, axis)
+
+    return _Xfftn(a, s, axes, overwrite_input, planner_effort,
+            threads, auto_align_input, auto_contiguous, 
+            avoid_copy, inverse, real)
+
+def irfft(a, n=None, axis=-1, overwrite_input=False,
+        planner_effort='FFTW_MEASURE', threads=1,
+        auto_align_input=True, auto_contiguous=True,
+        avoid_copy=False):
+    '''Return a :class:`pyfftw.FFTW` object representing a 1D 
+    real inverse FFT.
+    
+    The first three arguments are as per :func:`numpy.fft.irfft`; 
+    the rest of the arguments are documented 
+    :ref:`in the module docs <builders_args>`.
+    '''
+
+
+    inverse = True
+    real = True
+
+    s, axes = _precook_1d_args(a, n, axis)
+
+    return _Xfftn(a, s, axes, overwrite_input, planner_effort,
+            threads, auto_align_input, auto_contiguous, 
+            avoid_copy, inverse, real)
+
+def rfft2(a, s=None, axes=(-2,-1), overwrite_input=False,
+        planner_effort='FFTW_MEASURE', threads=1,
+        auto_align_input=True, auto_contiguous=True,
+        avoid_copy=False):
+    '''Return a :class:`pyfftw.FFTW` object representing a 2D 
+    real FFT.
+    
+    The first three arguments are as per :func:`numpy.fft.rfft2`; 
+    the rest of the arguments are documented 
+    :ref:`in the module docs <builders_args>`.
+    '''
+
+    inverse = False
+    real = True
+
+    return _Xfftn(a, s, axes, overwrite_input, planner_effort,
+            threads, auto_align_input, auto_contiguous, 
+            avoid_copy, inverse, real)
+
+def irfft2(a, s=None, axes=(-2,-1),
+        planner_effort='FFTW_MEASURE', threads=1,
+        auto_align_input=True, auto_contiguous=True,
+        avoid_copy=False):
+    '''Return a :class:`pyfftw.FFTW` object representing a 2D 
+    real inverse FFT.
+    
+    The first three arguments are as per :func:`numpy.fft.irfft2`; 
+    the rest of the arguments are documented 
+    :ref:`in the module docs <builders_args>`.
+    '''
+
+
+    inverse = True
+    real = True
+
+    overwrite_input = True    
+
+    return _Xfftn(a, s, axes, overwrite_input, planner_effort,
+            threads, auto_align_input, auto_contiguous, 
+            avoid_copy, inverse, real)
+
+
+def rfftn(a, s=None, axes=None, overwrite_input=False,
+        planner_effort='FFTW_MEASURE', threads=1,
+        auto_align_input=True, auto_contiguous=True,
+        avoid_copy=False):
+    '''Return a :class:`pyfftw.FFTW` object representing an n-D 
+    real FFT.
+    
+    The first three arguments are as per :func:`numpy.fft.rfftn`; 
+    the rest of the arguments are documented 
+    :ref:`in the module docs <builders_args>`.
+    '''
+
+
+    inverse = False
+    real = True
+
+    return _Xfftn(a, s, axes, overwrite_input, planner_effort,
+            threads, auto_align_input, auto_contiguous, 
+            avoid_copy, inverse, real)
+
+
+def irfftn(a, s=None, axes=None,
+        planner_effort='FFTW_MEASURE', threads=1,
+        auto_align_input=True, auto_contiguous=True,
+        avoid_copy=False):
+    '''Return a :class:`pyfftw.FFTW` object representing an n-D 
+    real inverse FFT.
+    
+    The first three arguments are as per :func:`numpy.fft.rfftn`; 
+    the rest of the arguments are documented 
+    :ref:`in the module docs <builders_args>`.
+    '''
+
+
+    inverse = True
+    real = True
+
+    overwrite_input = True
+
+    return _Xfftn(a, s, axes, overwrite_input, planner_effort,
+            threads, auto_align_input, auto_contiguous, 
+            avoid_copy, inverse, real)
+
+
+
diff --git a/pyfftw/cpu.pxd b/pyfftw/cpu.pxd
new file mode 100644
index 0000000..84e9823
--- /dev/null
+++ b/pyfftw/cpu.pxd
@@ -0,0 +1,21 @@
+# Copyright 2012 Knowledge Economy Developments Ltd
+# 
+# Henry Gomersall
+# heng at kedevelopments.co.uk
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+cdef extern from "cpu.h":
+
+    int simd_alignment()
diff --git a/pyfftw/interfaces/__init__.py b/pyfftw/interfaces/__init__.py
new file mode 100644
index 0000000..31112d6
--- /dev/null
+++ b/pyfftw/interfaces/__init__.py
@@ -0,0 +1,225 @@
+#!/usr/bin/env python
+
+'''The :mod:`pyfftw.interfaces` package provides interfaces to :mod:`pyfftw`
+that implement the API of other, more commonly used FFT libraries;
+specifically :mod:`numpy.fft` and :mod:`scipy.fftpack`. The
+intention is to satisfy two clear use cases:
+
+1. Simple, clean and well established interfaces to using :mod:`pyfftw`,
+   removing the requirement for users to know or understand about creating and
+   using :class:`pyfftw.FFTW` objects, whilst still benefiting from most of the
+   speed benefits of FFTW.
+2. A library that can be dropped into code that is already written to
+   use a supported FFT library, with no significant change to the existing
+   code. The power of python allows this to be done at runtime to a third
+   party library, without changing any of that library's code.
+
+The :mod:`pyfftw.interfaces` implementation is designed to sacrifice a small
+amount of the flexibility compared to accessing the :class:`pyfftw.FFTW`
+object directly, but implements a reasonable set of defaults and optional
+tweaks that should satisfy most situations.
+
+The precision of the transform that is used is selected from the array that 
+is passed in, defaulting to double precision if any type conversion is 
+required.
+
+This module works by generating a :class:`pyfftw.FFTW` object behind the
+scenes using the :mod:`pyfftw.builders` interface, which is then executed.
+There is therefore a potentially substantial overhead when a new plan needs
+to be created. This is down to FFTW's internal planner process.
+After a specific transform has been planned once, subsequent calls in which
+the input array is equivalent will be much faster, though still not without
+potentially significant overhead. *This* overhead can be largely alleviated by
+enabling the :mod:`pyfftw.interfaces.cache` functionality. However, even when
+the cache is used, very small transforms may suffer a significant relative
+slow-down not present when accessing :mod:`pyfftw.FFTW` directly (because the
+transform time can be negligibly small compared to the fixed
+:mod:`pyfftw.interfaces` overhead).
+
+In addition, potentially extra copies of the input array might be made.
+
+If speed or memory conservation is of absolutely paramount importance, the
+suggestion is to use :mod:`pyfftw.FFTW` (which provides better control over
+copies and so on), either directly or through :mod:`pyfftw.builders`. As
+always, experimentation is the best guide to optimisation.
+
+In practice, this means something like the following (taking
+:mod:`~pyfftw.interfaces.numpy_fft` as an example):
+
+.. doctest::
+
+    >>> import pyfftw, numpy
+    >>> a = pyfftw.n_byte_align_empty((128, 64), 16, dtype='complex64')
+    >>> a[:] = numpy.random.randn(*a.shape) + 1j*numpy.random.randn(*a.shape)
+    >>> fft_a = pyfftw.interfaces.numpy_fft.fft2(a) # Will need to plan
+
+.. doctest::
+
+    >>> b = pyfftw.n_byte_align_empty((128, 64), 16, dtype='complex64')
+    >>> b[:] = a
+    >>> fft_b = pyfftw.interfaces.numpy_fft.fft2(b) # Already planned, so faster
+
+.. doctest::
+
+    >>> c = pyfftw.n_byte_align_empty(132, 16, dtype='complex128')
+    >>> fft_c = pyfftw.interfaces.numpy_fft.fft(c) # Needs a new plan
+    >>> c[:] = numpy.random.randn(*c.shape) + 1j*numpy.random.randn(*c.shape)
+
+.. doctest::
+
+    >>> pyfftw.interfaces.cache.enable()
+    >>> fft_a = pyfftw.interfaces.numpy_fft.fft2(a) # still planned
+    >>> fft_b = pyfftw.interfaces.numpy_fft.fft2(b) # much faster, from the cache
+
+The usual wisdom import and export functions work well for the case where
+the initial plan might be prohibitively expensive. Just use
+:func:`pyfftw.export_wisdom` and :func:`pyfftw.import_wisdom` as needed after
+having performed the transform once.
+
+Implemented Functions
+---------------------
+
+The implemented functions are listed below. :mod:`numpy.fft` is implemented
+by :mod:`pyfftw.interfaces.numpy_fft` and :mod:`scipy.fftpack` by
+:mod:`pyfftw.interfaces.scipy_fftpack`. All the implemented functions are
+extended by the use of additional arguments, which are 
+:ref:`documented below<interfaces_additional_args>`.
+
+Not all the functions provided by :mod:`numpy.fft` and :mod:`scipy.fftpack`
+are implemented by :mod:`pyfftw.interfaces`. In the case where a function is
+not implemented, the function is imported into the namespace from the
+corresponding library. This means that all the documented functionality of the
+library *is* provided through :mod:`pyfftw.interfaces`.
+
+One known caveat is that repeated axes are potentially handled 
+differently. This is certainly the case for :mod:`numpy.fft` and probably
+also true for :mod:`scipy.fftpack` (though it is not defined in the 
+docs); axes that are repeated in the axes argument are considered only once, as 
+compared to :mod:`numpy.fft` in which repeated axes results in the DFT 
+being taken along that axes as many times as the axis occurs.
+
+:mod:`~pyfftw.interfaces.numpy_fft`
+"""""""""""""""""""""""""""""""""""
+
+* :func:`pyfftw.interfaces.numpy_fft.fft`
+* :func:`pyfftw.interfaces.numpy_fft.ifft`
+* :func:`pyfftw.interfaces.numpy_fft.fft2`
+* :func:`pyfftw.interfaces.numpy_fft.ifft2`
+* :func:`pyfftw.interfaces.numpy_fft.fftn`
+* :func:`pyfftw.interfaces.numpy_fft.ifftn`
+* :func:`pyfftw.interfaces.numpy_fft.rfft`
+* :func:`pyfftw.interfaces.numpy_fft.irfft`
+* :func:`pyfftw.interfaces.numpy_fft.rfft2`
+* :func:`pyfftw.interfaces.numpy_fft.irfft2`
+* :func:`pyfftw.interfaces.numpy_fft.rfftn`
+* :func:`pyfftw.interfaces.numpy_fft.irfftn`
+
+:mod:`~pyfftw.interfaces.scipy_fftpack`
+"""""""""""""""""""""""""""""""""""""""
+
+* :func:`pyfftw.interfaces.scipy_fftpack.fft`
+* :func:`pyfftw.interfaces.scipy_fftpack.ifft`
+* :func:`pyfftw.interfaces.scipy_fftpack.fft2`
+* :func:`pyfftw.interfaces.scipy_fftpack.ifft2`
+* :func:`pyfftw.interfaces.scipy_fftpack.fftn`
+* :func:`pyfftw.interfaces.scipy_fftpack.ifftn`
+* :func:`pyfftw.interfaces.scipy_fftpack.rfft`
+* :func:`pyfftw.interfaces.scipy_fftpack.irfft`
+
+
+.. _interfaces_additional_args:
+
+Additional Arguments
+--------------------
+
+In addition to the equivalent arguments in :mod:`numpy.fft` and
+:mod:`scipy.fftpack`, all these functions also add several additional
+arguments for finer control over the FFT. These additional arguments are 
+largely a subset of the 
+keyword arguments in :mod:`pyfftw.builders` with a few exceptions and with
+different defaults.
+
+* ``overwrite_input``: Whether or not the input array can be
+  overwritten during the transform. This sometimes results in a faster
+  algorithm being made available. It causes the ``'FFTW_DESTROY_INPUT'``
+  flag to be passed to the intermediate :class:`pyfftw.FFTW` object.
+  Unlike with :mod:`pyfftw.builders`, this argument is included with
+  *every* function in this package.
+
+  In :mod:`~pyfftw.interfaces.scipy_fftpack`, this argument is replaced
+  by ``overwrite_x``, to which it is equivalent (albeit at the same 
+  position).
+
+  The default is ``False`` to be consistent with :mod:`numpy.fft`.
+
+* ``planner_effort``: A string dictating how much effort is spent 
+  in planning the FFTW routines. This is passed to the creation
+  of the intermediate :class:`pyfftw.FFTW` object as an entry 
+  in the flags list. They correspond to flags passed to the 
+  :class:`pyfftw.FFTW` object.
+
+  The valid strings, in order of their increasing impact on the time 
+  to compute  are:
+  ``'FFTW_ESTIMATE'``, ``'FFTW_MEASURE'`` (default), ``'FFTW_PATIENT'``
+  and ``'FFTW_EXHAUSTIVE'``.
+
+  The `Wisdom
+  <http://www.fftw.org/fftw3_doc/Words-of-Wisdom_002dSaving-Plans.html>`_
+  that FFTW has accumulated or has loaded (through
+  :func:`pyfftw.import_wisdom`) is used during the creation of
+  :class:`pyfftw.FFTW` objects.
+
+  Note that the first time planning stage can take a substantial amount
+  of time. For this reason, the default is to use ``'FFTW_ESTIMATE'``, which
+  potentially results in a slightly suboptimal plan being used, but with
+  a substantially quicker first-time planner step.
+
+* ``threads``: The number of threads used to perform the FFT.
+
+  The default is ``1``.
+
+* ``auto_align_input``: Correctly byte align the input array for optimal
+  usage of vector instructions. This can lead to a substantial speedup.
+
+  This argument being ``True`` makes sure that the input array
+  is correctly aligned. It is possible to correctly byte align the array
+  prior to calling this function (using, for example,
+  :func:`pyfftw.n_byte_align`). If and only if a realignment is 
+  necessary is a new array created.
+
+  It's worth noting that just being aligned may not be sufficient to
+  create the fastest possible transform. For example, if the array is not
+  contiguous (i.e. certain axes have gaps in memory between slices), it may
+  be faster to plan a transform for a contiguous array, and then rely on
+  the array being copied in before the transform (which
+  :class:`pyfftw.FFTW` will handle for you). The ``auto_contiguous``
+  argument controls whether this function also takes care of making sure
+  the array is contiguous or not.
+
+  The default is ``True``.
+
+* ``auto_contiguous``: Make sure the input array is contiguous in
+  memory before performing the transform on it. If the array is not
+  contiguous, it is copied into an interim array. This is because it
+  is often faster to copy the data before the transform and then transform
+  a contiguous array than it is to try to take the transform of a 
+  non-contiguous array. This is particularly true in conjunction with
+  the ``auto_align_input`` argument which is used to make sure that the 
+  transform is taken of an aligned array.
+
+  The default is ``True``.
+
+'''
+
+from . import (
+        numpy_fft,
+        cache,)
+
+try:
+    import scipy.fftpack
+except ImportError:
+    pass
+else:
+    del scipy
+    from . import scipy_fftpack
+
diff --git a/pyfftw/interfaces/_utils.py b/pyfftw/interfaces/_utils.py
new file mode 100644
index 0000000..72836a5
--- /dev/null
+++ b/pyfftw/interfaces/_utils.py
@@ -0,0 +1,112 @@
+#!/usr/bin/env python
+#
+# Copyright 2012 Knowledge Economy Developments Ltd
+# 
+# Henry Gomersall
+# heng at kedevelopments.co.uk
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+'''
+Utility functions for the interfaces routines
+'''
+
+import pyfftw.builders as builders
+import pyfftw
+from . import cache
+
+def _Xfftn(a, s, axes, overwrite_input, planner_effort,
+        threads, auto_align_input, auto_contiguous, 
+        calling_func):
+
+    reload_after_transform = False
+
+    try:
+        s = tuple(s)
+    except TypeError:
+        pass
+
+    try:
+        axes = tuple(axes)
+    except TypeError:
+        pass
+
+    if calling_func in ('irfft2', 'irfftn'):
+        # overwrite_input is not an argument to irfft2 or irfftn
+        args = (a, s, axes, planner_effort, threads, 
+                auto_align_input, auto_contiguous)
+
+        if not overwrite_input:
+            # Only irfft2 and irfftn have overwriting the input
+            # as the default (and so require the input array to 
+            # be reloaded).
+            reload_after_transform = True
+    else:
+        args = (a, s, axes, overwrite_input, planner_effort, threads, 
+                auto_align_input, auto_contiguous)
+    
+    if cache.is_enabled():
+        key = (calling_func, a.shape, a.strides, a.dtype, s.__hash__(), 
+                axes.__hash__(), args[3:])
+
+        try:
+            if key in cache._fftw_cache:
+                FFTW_object = cache._fftw_cache.lookup(key)
+            else:
+                FFTW_object = None
+
+        except KeyError:
+            # This occurs if the object has fallen out of the cache between
+            # the check and the lookup
+            FFTW_object = None
+
+    if not cache.is_enabled() or FFTW_object is None:
+
+        # If we're going to create a new FFTW object, we need to copy
+        # the input array to preserve it, otherwise we can't actually
+        # take the transform of the input array! (in general, we have
+        # to assume that the input array will be destroyed during 
+        # planning).
+        a_copy = a.copy()
+
+        FFTW_object = getattr(builders, calling_func)(*args)
+    
+        # Only copy if the input array is what was actually used
+        # (otherwise it shouldn't be overwritten)
+        if FFTW_object.get_input_array() is a:
+            a[:] = a_copy
+
+        if cache.is_enabled():
+            cache._fftw_cache.insert(FFTW_object, key)
+        
+        output_array = FFTW_object()
+
+    else:
+        if reload_after_transform:
+            a_copy = a.copy()
+
+        orig_output_array = FFTW_object.get_output_array()
+        output_shape = orig_output_array.shape
+        output_dtype = orig_output_array.dtype
+        output_alignment = FFTW_object.output_alignment
+
+        output_array = pyfftw.n_byte_align_empty(output_shape, 
+                output_alignment, output_dtype)
+
+        FFTW_object(input_array=a, output_array=output_array)
+    
+    if reload_after_transform:
+        a[:] = a_copy
+
+    return output_array
diff --git a/pyfftw/interfaces/cache.py b/pyfftw/interfaces/cache.py
new file mode 100644
index 0000000..f82d9e7
--- /dev/null
+++ b/pyfftw/interfaces/cache.py
@@ -0,0 +1,245 @@
+#!/usr/bin/env python
+#
+# Copyright 2013 Knowledge Economy Developments Ltd
+# 
+# Henry Gomersall
+# heng at kedevelopments.co.uk
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+'''
+During calls to functions implemented in :mod:`pyfftw.interfaces`, a
+:class:`pyfftw.FFTW` object is necessarily created. Although the time to
+create a new :class:`pyfftw.FFTW` is short (assuming that the planner
+possesses the necessary wisdom to create the plan immediately), it may
+still take longer than a short transform.
+
+This module implements a method by which objects that are created through
+:mod:`pyfftw.interfaces` are temporarily cached. If an equivalent
+transform is then performed within a short period, the object is acquired
+from the cache rather than a new one created. The equivalency is quite 
+conservative and in practice means that if any of the arguments change, or
+if the properties of the array (shape, strides, dtype) change in any way, then
+the cache lookup will fail.
+
+The cache temporarily stores a copy of any interim :class:`pyfftw.FFTW`
+objects that are created. If they are not used for some period of time,
+which can be set with :func:`pyfftw.interfaces.cache.set_keepalive_time`,
+then they are removed from the cache (liberating any associated memory).
+The default keepalive time is 0.1 seconds.
+
+Enable the cache by calling :func:`pyfftw.interfaces.cache.enable`. 
+Disable it by calling :func:`pyfftw.interfaces.cache.disable`. By default,
+the cache is disabled.
+
+Note that even with the cache enabled, there is a fixed overhead associated 
+with lookups. This means that for small transforms, the overhead may exceed
+the transform. At this point, it's worth looking at using :class:`pyfftw.FFTW`
+directly.
+
+When the cache is enabled, the module spawns a new thread to keep track
+of the objects. If :mod:`threading` is not available, then the cache
+is not available and trying to use it will raise an ImportError exception.
+
+The actual implementation of the cache is liable to change, but the 
+documented API is stable.
+'''
+
+try:
+    import threading as _threading
+    _threading_import_error = None
+except ImportError as e:
+    _threading_import_error = e
+    _threading == None
+
+import time
+import weakref
+
+__all__ = ['enable', 'disable', 'set_keepalive_time']
+
+_fftw_cache = None
+
+class CacheError(Exception):
+    pass
+
+def enable():
+    '''Enable the cache.
+    '''
+    global _fftw_cache
+
+    if _threading is not None:
+        if _fftw_cache is None:
+            _fftw_cache = _Cache()
+    else:
+        raise ImportError(_threading_import_error)
+
+def disable():
+    '''Disable the cache.
+    '''
+    global _fftw_cache
+    _fftw_cache = None
+
+def is_enabled():
+    '''Return whether the cache is currently enabled.
+    '''
+    if _fftw_cache is None:
+        return False
+    else:
+        return True
+
+def set_keepalive_time(keepalive_time):
+    '''Set the minimum time in seconds for which any :mod:`pyfftw.FFTW` object
+    in the cache is kept alive.
+    
+    When the cache is enabled, the interim objects that are used through
+    a :mod:`pyfftw.interfaces` function are cached for the time set through
+    this function. If the object is not used for the that time, it is 
+    removed from the cache. Using the object zeros the timer.
+
+    The time is not precise, and sets a minimum time to be alive. In 
+    practice, it may be up to twice as long before the object is
+    deleted from the cache (due to implementational details).
+    '''
+    global _fftw_cache
+    
+    if _fftw_cache is None:
+        raise CacheError('Cache is not currently enabled')
+    else:
+        _fftw_cache.set_keepalive_time(keepalive_time)
+
+class _Cache(object):
+
+    @property
+    def keepalive_time(self):
+        return self._keepalive_time
+
+    def __init__(self, keepalive_time=0.1):
+
+        self._cache_dict = {}
+        self.set_keepalive_time(keepalive_time)
+
+        # A set of objects to be kept alive during the next cull
+        self._keepalive_set = set()
+
+        self._cull_lock = _threading.Lock()
+        self._keepalive_set_lock = _threading.Lock()
+
+        self.initialised = _threading.Event()
+
+        self._parent_thread = _threading.current_thread()
+
+        self._initialised = _threading.Event()
+        self._initialised.clear() # Explicitly clear it for clarity
+        
+        self._thread_object = _threading.Thread(target=_Cache._run,
+                args=(weakref.proxy(self), ))
+
+        self._thread_object.daemon = True
+        self._thread_object.start()
+
+        while not self._initialised.is_set():
+            # This loop is necessary to stop the main thread doing 
+            # anything until the exception handler in _run can deal with 
+            # the object being deleted.
+            pass
+
+    def __del__(self):
+        # Wait until the thread object has quit before
+        # exiting (which it will because a reference error will
+        # be raised).
+        try:
+            self._thread_object.join()
+        except TypeError:
+            # Not sure what's going on here, but IPython baulks on exit
+            pass
+
+    def __contains__(self, key):
+        return key in self._cache_dict
+
+    def _run(self):
+
+        last_cull_time = time.time()
+
+        try:
+            self._initialised.set()
+
+            while True:
+                if not self._parent_thread.is_alive():
+                    break
+
+                if time.time() - last_cull_time > self._keepalive_time:
+                    # Perform a cull
+                    last_cull_time = time.time()
+
+                    with self._cull_lock:
+                        # Operate on a copy of the cache dict
+                        # so lookups continue.
+                        new_cache_dict = self._cache_dict.copy()
+
+                        with self._keepalive_set_lock:
+                            # Work out which should be culled
+                            cull_set = set(new_cache_dict).difference(
+                                    self._keepalive_set)
+
+                            self._keepalive_set = set()
+
+                        for each_key in cull_set:
+                            del new_cache_dict[each_key]
+
+                        # Necessarily atomic, so no problem with
+                        # the lookups continuing
+                        self._cache_dict = new_cache_dict
+
+                time.sleep(self._wakeup_time)
+
+        except ReferenceError:
+            pass
+
+    def set_keepalive_time(self, keepalive_time=0.1):
+        '''Set the minimum time in seconds for which any object in the cache
+        is kept alive.
+
+        The time is not precise, and sets a minimum time to be alive. In 
+        practice, it may be up to twice as long before the object is
+        deleted from the cache (due to implementational details).
+        '''
+        self._keepalive_time = float(keepalive_time)
+
+        if self._keepalive_time/2 > 0.1:
+            self._wakeup_time = 0.1
+        else:
+            self._wakeup_time = self._keepalive_time/2
+
+    def _refresh(self, key):
+        '''Refresh the object referenced by key to stop it being culled
+        on the next round.
+        '''
+        with self._keepalive_set_lock:
+            self._keepalive_set.add(key)
+
+    def insert(self, obj, key):
+        '''Insert the passed object into the cache, referenced by key, 
+        a hashable.
+        '''
+        with self._cull_lock:
+            self._cache_dict[key] = obj
+            self._refresh(key)
+
+    def lookup(self, key):
+        '''Lookup the object referenced by key and return it, refreshing
+        the cache at the same time.
+        '''
+        self._refresh(key)        
+        return self._cache_dict[key]
+
diff --git a/pyfftw/interfaces/numpy_fft.py b/pyfftw/interfaces/numpy_fft.py
new file mode 100644
index 0000000..b09148e
--- /dev/null
+++ b/pyfftw/interfaces/numpy_fft.py
@@ -0,0 +1,233 @@
+#!/usr/bin/env python
+#
+# Copyright 2013 Knowledge Economy Developments Ltd
+# 
+# Henry Gomersall
+# heng at kedevelopments.co.uk
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+'''
+This module implements those functions that replace aspects of the
+:mod:`numpy.fft` module. This module *provides* the entire documented namespace 
+of :mod:`numpy.fft`, but those functions that are not included here are imported
+directly from :mod:`numpy.fft`.
+
+The precision of the transform that is used is selected from the array that 
+is passed in, defaulting to double precision if any type conversion is 
+required.
+
+One known caveat is that repeated axes are handled differently to
+:mod:`numpy.fft`; axes that are repeated in the axes argument are considered
+only once, as compared to :mod:`numpy.fft` in which repeated axes results in
+the DFT being taken along that axes as many times as the axis occurs.
+
+The exceptions raised by each of these functions are as per their
+equivalents in :mod:`numpy.fft`.
+'''
+
+from ._utils import _Xfftn
+
+# Complete the namespace (these are not actually used in this module)
+from numpy.fft import hfft, ihfft, fftfreq, fftshift, ifftshift
+
+__all__ = ['fft','ifft', 'fft2', 'ifft2', 'fftn', 'ifftn', 
+           'rfft', 'irfft', 'rfft2', 'irfft2', 'rfftn', 'irfftn',
+           'hfft', 'ihfft', 'fftfreq', 'fftshift', 'ifftshift']
+
+def fft(a, n=None, axis=-1, overwrite_input=False, 
+        planner_effort='FFTW_MEASURE', threads=1,
+        auto_align_input=True, auto_contiguous=True):
+    '''Perform a 1D FFT.
+    
+    The first three arguments are as per :func:`numpy.fft.fft`; 
+    the rest of the arguments are documented 
+    in the :ref:`additional arguments docs<interfaces_additional_args>`.
+    '''
+
+    calling_func = 'fft'
+
+    return _Xfftn(a, n, axis, overwrite_input, planner_effort,
+            threads, auto_align_input, auto_contiguous, 
+            calling_func)
+
+def ifft(a, n=None, axis=-1, overwrite_input=False,
+        planner_effort='FFTW_MEASURE', threads=1,
+        auto_align_input=True, auto_contiguous=True):
+    '''Perform a 1D inverse FFT.
+    
+    The first three arguments are as per :func:`numpy.fft.ifft`; 
+    the rest of the arguments are documented 
+    in the :ref:`additional arguments docs<interfaces_additional_args>`.
+    '''
+    calling_func = 'ifft'
+
+    return _Xfftn(a, n, axis, overwrite_input, planner_effort,
+            threads, auto_align_input, auto_contiguous, 
+            calling_func)
+
+
+def fft2(a, s=None, axes=(-2,-1), overwrite_input=False,
+        planner_effort='FFTW_MEASURE', threads=1,
+        auto_align_input=True, auto_contiguous=True):
+    '''Perform a 2D FFT.
+    
+    The first three arguments are as per :func:`numpy.fft.fft2`; 
+    the rest of the arguments are documented 
+    in the :ref:`additional arguments docs<interfaces_additional_args>`.
+    '''
+    calling_func = 'fft2'
+
+    return _Xfftn(a, s, axes, overwrite_input, planner_effort,
+            threads, auto_align_input, auto_contiguous, 
+            calling_func)
+
+def ifft2(a, s=None, axes=(-2,-1), overwrite_input=False,
+        planner_effort='FFTW_MEASURE', threads=1,
+        auto_align_input=True, auto_contiguous=True):
+    '''Perform a 2D inverse FFT.
+    
+    The first three arguments are as per :func:`numpy.fft.ifft2`; 
+    the rest of the arguments are documented 
+    in the :ref:`additional arguments docs<interfaces_additional_args>`.
+    '''
+    calling_func = 'ifft2'
+
+    return _Xfftn(a, s, axes, overwrite_input, planner_effort,
+            threads, auto_align_input, auto_contiguous, 
+            calling_func)
+
+
+def fftn(a, s=None, axes=None, overwrite_input=False,
+        planner_effort='FFTW_MEASURE', threads=1,
+        auto_align_input=True, auto_contiguous=True):
+    '''Perform an n-D FFT.
+    
+    The first three arguments are as per :func:`numpy.fft.fftn`; 
+    the rest of the arguments are documented 
+    in the :ref:`additional arguments docs<interfaces_additional_args>`.
+    '''
+    calling_func = 'fftn'
+
+    return _Xfftn(a, s, axes, overwrite_input, planner_effort,
+            threads, auto_align_input, auto_contiguous, 
+            calling_func)
+
+def ifftn(a, s=None, axes=None, overwrite_input=False,
+        planner_effort='FFTW_MEASURE', threads=1,
+        auto_align_input=True, auto_contiguous=True):
+    '''Perform an n-D inverse FFT.
+    
+    The first three arguments are as per :func:`numpy.fft.ifftn`; 
+    the rest of the arguments are documented 
+    in the :ref:`additional arguments docs<interfaces_additional_args>`.
+    '''
+    calling_func = 'ifftn'
+
+    return _Xfftn(a, s, axes, overwrite_input, planner_effort,
+            threads, auto_align_input, auto_contiguous, 
+            calling_func)
+
+def rfft(a, n=None, axis=-1, overwrite_input=False,
+        planner_effort='FFTW_MEASURE', threads=1,
+        auto_align_input=True, auto_contiguous=True):
+    '''Perform a 1D real FFT.
+    
+    The first three arguments are as per :func:`numpy.fft.rfft`; 
+    the rest of the arguments are documented 
+    in the :ref:`additional arguments docs<interfaces_additional_args>`.
+    '''
+    calling_func = 'rfft'
+
+    return _Xfftn(a, n, axis, overwrite_input, planner_effort,
+            threads, auto_align_input, auto_contiguous, 
+            calling_func)
+
+def irfft(a, n=None, axis=-1, overwrite_input=False,
+        planner_effort='FFTW_MEASURE', threads=1,
+        auto_align_input=True, auto_contiguous=True):
+    '''Perform a 1D real inverse FFT.
+    
+    The first three arguments are as per :func:`numpy.fft.irfft`; 
+    the rest of the arguments are documented 
+    in the :ref:`additional arguments docs<interfaces_additional_args>`.
+    '''
+    calling_func = 'irfft'
+
+    return _Xfftn(a, n, axis, overwrite_input, planner_effort,
+            threads, auto_align_input, auto_contiguous, 
+            calling_func)
+
+def rfft2(a, s=None, axes=(-2,-1), overwrite_input=False,
+        planner_effort='FFTW_MEASURE', threads=1,
+        auto_align_input=True, auto_contiguous=True):
+    '''Perform a 2D real FFT.
+    
+    The first three arguments are as per :func:`numpy.fft.rfft2`; 
+    the rest of the arguments are documented 
+    in the :ref:`additional arguments docs<interfaces_additional_args>`.
+    '''
+    calling_func = 'rfft2'
+
+    return _Xfftn(a, s, axes, overwrite_input, planner_effort,
+            threads, auto_align_input, auto_contiguous, 
+            calling_func)
+
+def irfft2(a, s=None, axes=(-2,-1), overwrite_input=False,
+        planner_effort='FFTW_MEASURE', threads=1,
+        auto_align_input=True, auto_contiguous=True):
+    '''Perform a 2D real inverse FFT.
+    
+    The first three arguments are as per :func:`numpy.fft.irfft2`; 
+    the rest of the arguments are documented 
+    in the :ref:`additional arguments docs<interfaces_additional_args>`.
+    '''
+    calling_func = 'irfft2'
+    
+    return _Xfftn(a, s, axes, overwrite_input, planner_effort,
+            threads, auto_align_input, auto_contiguous, 
+            calling_func)
+
+
+def rfftn(a, s=None, axes=None, overwrite_input=False,
+        planner_effort='FFTW_MEASURE', threads=1,
+        auto_align_input=True, auto_contiguous=True):
+    '''Perform an n-D real FFT.
+    
+    The first three arguments are as per :func:`numpy.fft.rfftn`; 
+    the rest of the arguments are documented 
+    in the :ref:`additional arguments docs<interfaces_additional_args>`.
+    '''
+    calling_func = 'rfftn'
+
+    return _Xfftn(a, s, axes, overwrite_input, planner_effort,
+            threads, auto_align_input, auto_contiguous, 
+            calling_func)
+
+
+def irfftn(a, s=None, axes=None, overwrite_input=False,
+        planner_effort='FFTW_MEASURE', threads=1,
+        auto_align_input=True, auto_contiguous=True):
+    '''Perform an n-D real inverse FFT.
+    
+    The first three arguments are as per :func:`numpy.fft.rfftn`; 
+    the rest of the arguments are documented 
+    in the :ref:`additional arguments docs<interfaces_additional_args>`.
+    '''
+    calling_func = 'irfftn'
+    
+    return _Xfftn(a, s, axes, overwrite_input, planner_effort,
+            threads, auto_align_input, auto_contiguous, 
+            calling_func)
+
diff --git a/pyfftw/interfaces/scipy_fftpack.py b/pyfftw/interfaces/scipy_fftpack.py
new file mode 100644
index 0000000..aaf109e
--- /dev/null
+++ b/pyfftw/interfaces/scipy_fftpack.py
@@ -0,0 +1,148 @@
+#!/usr/bin/env python
+#
+# Copyright 2012 Knowledge Economy Developments Ltd
+# 
+# Henry Gomersall
+# heng at kedevelopments.co.uk
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+'''
+This module implements those functions that replace aspects of the
+:mod:`scipy.fftpack` module. This module *provides* the entire documented
+namespace of :mod:`scipy.fftpack`, but those functions that are not included
+here are imported directly from :mod:`scipy.fftpack`.
+'''
+
+from . import numpy_fft
+
+# Complete the namespace (these are not actually used in this module)
+from scipy.fftpack import (dct, idct, diff, tilbert, itilbert, 
+        hilbert, ihilbert, cs_diff, sc_diff, ss_diff, cc_diff, 
+        shift, fftshift, ifftshift, fftfreq, rfftfreq, 
+        convolve, _fftpack)
+
+__all__ = ['fft','ifft','fftn','ifftn','rfft','irfft', 'fft2','ifft2', 
+        'diff', 'tilbert','itilbert','hilbert','ihilbert', 'sc_diff',
+        'cs_diff','cc_diff','ss_diff', 'shift', 'rfftfreq']
+
+def fft(x, n=None, axis=-1, overwrite_x=False, 
+        planner_effort='FFTW_MEASURE', threads=1,
+        auto_align_input=True, auto_contiguous=True):
+    '''Perform a 1D FFT.
+    
+    The first three arguments are as per :func:`scipy.fftpack.fft`; 
+    the rest of the arguments are documented 
+    in the :ref:`additional argument docs<interfaces_additional_args>`.
+    '''
+
+    return numpy_fft.fft(x, n, axis, overwrite_x, planner_effort,
+            threads, auto_align_input, auto_contiguous)
+
+def ifft(x, n=None, axis=-1, overwrite_x=False,
+        planner_effort='FFTW_MEASURE', threads=1,
+        auto_align_input=True, auto_contiguous=True):
+    '''Perform a 1D inverse FFT.
+    
+    The first three arguments are as per :func:`scipy.fftpack.ifft`; 
+    the rest of the arguments are documented 
+    in the :ref:`additional argument docs<interfaces_additional_args>`.
+    '''
+
+    return numpy_fft.ifft(x, n, axis, overwrite_x, planner_effort,
+            threads, auto_align_input, auto_contiguous)
+
+
+def fft2(x, shape=None, axes=(-2,-1), overwrite_x=False,
+        planner_effort='FFTW_MEASURE', threads=1,
+        auto_align_input=True, auto_contiguous=True):
+    '''Perform a 2D FFT.
+    
+    The first three arguments are as per :func:`scipy.fftpack.fft2`; 
+    the rest of the arguments are documented 
+    in the :ref:`additional argument docs<interfaces_additional_args>`.
+    '''
+
+    return numpy_fft.fft2(x, shape, axes, overwrite_x, planner_effort,
+            threads, auto_align_input, auto_contiguous)
+
+
+def ifft2(x, shape=None, axes=(-2,-1), overwrite_x=False,
+        planner_effort='FFTW_MEASURE', threads=1,
+        auto_align_input=True, auto_contiguous=True):
+    '''Perform a 2D inverse FFT.
+    
+    The first three arguments are as per :func:`scipy.fftpack.ifft2`; 
+    the rest of the arguments are documented in the
+    :ref:`additional argument docs <interfaces_additional_args>`.
+    '''
+
+    return numpy_fft.ifft2(x, shape, axes, overwrite_x, planner_effort,
+            threads, auto_align_input, auto_contiguous)
+
+
+def fftn(x, shape=None, axes=None, overwrite_x=False,
+        planner_effort='FFTW_MEASURE', threads=1,
+        auto_align_input=True, auto_contiguous=True):
+    '''Perform an n-D FFT.
+    
+    The first three arguments are as per :func:`scipy.fftpack.fftn`; 
+    the rest of the arguments are documented 
+    in the :ref:`additional argument docs<interfaces_additional_args>`.
+    '''
+
+    return numpy_fft.fftn(x, shape, axes, overwrite_x, planner_effort,
+            threads, auto_align_input, auto_contiguous)
+
+
+def ifftn(x, shape=None, axes=None, overwrite_x=False,
+        planner_effort='FFTW_MEASURE', threads=1,
+        auto_align_input=True, auto_contiguous=True):
+    '''Perform an n-D inverse FFT.
+    
+    The first three arguments are as per :func:`scipy.fftpack.ifftn`; 
+    the rest of the arguments are documented 
+    in the :ref:`additional argument docs<interfaces_additional_args>`.
+    '''
+
+    return numpy_fft.ifftn(x, shape, axes, overwrite_x, planner_effort,
+            threads, auto_align_input, auto_contiguous)
+
+
+def rfft(x, n=None, axis=-1, overwrite_x=False,
+        planner_effort='FFTW_MEASURE', threads=1,
+        auto_align_input=True, auto_contiguous=True):
+    '''Perform a 1D real FFT.
+    
+    The first three arguments are as per :func:`scipy.fftpack.rfft`; 
+    the rest of the arguments are documented 
+    in the :ref:`additional argument docs<interfaces_additional_args>`.
+    '''
+
+    return numpy_fft.rfft(x, n, axis, overwrite_x, planner_effort,
+            threads, auto_align_input, auto_contiguous)
+
+def irfft(x, n=None, axis=-1, overwrite_x=False,
+        planner_effort='FFTW_MEASURE', threads=1,
+        auto_align_input=True, auto_contiguous=True):
+    '''Perform a 1D real inverse FFT.
+    
+    The first three arguments are as per :func:`scipy.fftpack.irfft`; 
+    the rest of the arguments are documented 
+    in the :ref:`additional argument docs<interfaces_additional_args>`.
+    '''
+
+    return numpy_fft.irfft(x, n, axis, overwrite_x, planner_effort,
+            threads, auto_align_input, auto_contiguous)
+
diff --git a/pyfftw/np_fft.py b/pyfftw/np_fft.py
new file mode 100644
index 0000000..a2bb629
--- /dev/null
+++ b/pyfftw/np_fft.py
@@ -0,0 +1,43 @@
+#!/usr/bin/env python
+
+# Skeleton file to fill in the numpy like fft functions
+
+def fft(a, n=None, axis=-1):
+
+    pass
+
+def ifft(a, n=None, axis=-1):
+    pass
+
+def fft2(a, s=None, axes=(-1,-2)):
+    pass
+
+def ifft2(a, s=None, axes=(-1,-2)):
+    pass
+
+def fftn(a, s=None, axes=None):
+    if not len(set(axes)) == len(axes):
+        pass
+
+
+def ifftn(a, s=None, axes=None):
+    pass
+
+def rfft(a, n=None, axis=-1):
+    pass
+
+def irfft(a, n=None, axis=-1):
+    pass
+
+def rfft2(a, s=None, axes=(-2,-1)):
+    pass
+
+def irfft2(a, s=None, axes=(-2,-1)):
+    pass
+
+def rfftn(a, s=None, axes=None):
+    pass
+
+def irfftn(a, s=None, axes=None):
+    pass
+
diff --git a/pyfftw/pyfftw.c b/pyfftw/pyfftw.c
new file mode 100644
index 0000000..dc19504
--- /dev/null
+++ b/pyfftw/pyfftw.c
@@ -0,0 +1,16764 @@
+/* Generated by Cython 0.17.4 on Wed Sep 25 15:19:42 2013 */
+
+#define PY_SSIZE_T_CLEAN
+#include "Python.h"
+#ifndef Py_PYTHON_H
+    #error Python headers needed to compile C extensions, please install development version of Python.
+#elif PY_VERSION_HEX < 0x02040000
+    #error Cython requires Python 2.4+.
+#else
+#include <stddef.h> /* For offsetof */
+#ifndef offsetof
+#define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
+#endif
+#if !defined(WIN32) && !defined(MS_WINDOWS)
+  #ifndef __stdcall
+    #define __stdcall
+  #endif
+  #ifndef __cdecl
+    #define __cdecl
+  #endif
+  #ifndef __fastcall
+    #define __fastcall
+  #endif
+#endif
+#ifndef DL_IMPORT
+  #define DL_IMPORT(t) t
+#endif
+#ifndef DL_EXPORT
+  #define DL_EXPORT(t) t
+#endif
+#ifndef PY_LONG_LONG
+  #define PY_LONG_LONG LONG_LONG
+#endif
+#ifndef Py_HUGE_VAL
+  #define Py_HUGE_VAL HUGE_VAL
+#endif
+#ifdef PYPY_VERSION
+#define CYTHON_COMPILING_IN_PYPY 1
+#define CYTHON_COMPILING_IN_CPYTHON 0
+#else
+#define CYTHON_COMPILING_IN_PYPY 0
+#define CYTHON_COMPILING_IN_CPYTHON 1
+#endif
+#if PY_VERSION_HEX < 0x02050000
+  typedef int Py_ssize_t;
+  #define PY_SSIZE_T_MAX INT_MAX
+  #define PY_SSIZE_T_MIN INT_MIN
+  #define PY_FORMAT_SIZE_T ""
+  #define CYTHON_FORMAT_SSIZE_T ""
+  #define PyInt_FromSsize_t(z) PyInt_FromLong(z)
+  #define PyInt_AsSsize_t(o)   __Pyx_PyInt_AsInt(o)
+  #define PyNumber_Index(o)    ((PyNumber_Check(o) && !PyFloat_Check(o)) ? PyNumber_Int(o) : \
+                                (PyErr_Format(PyExc_TypeError, \
+                                              "expected index value, got %.200s", Py_TYPE(o)->tp_name), \
+                                 (PyObject*)0))
+  #define __Pyx_PyIndex_Check(o) (PyNumber_Check(o) && !PyFloat_Check(o) && \
+                                  !PyComplex_Check(o))
+  #define PyIndex_Check __Pyx_PyIndex_Check
+  #define PyErr_WarnEx(category, message, stacklevel) PyErr_Warn(category, message)
+  #define __PYX_BUILD_PY_SSIZE_T "i"
+#else
+  #define __PYX_BUILD_PY_SSIZE_T "n"
+  #define CYTHON_FORMAT_SSIZE_T "z"
+  #define __Pyx_PyIndex_Check PyIndex_Check
+#endif
+#if PY_VERSION_HEX < 0x02060000
+  #define Py_REFCNT(ob) (((PyObject*)(ob))->ob_refcnt)
+  #define Py_TYPE(ob)   (((PyObject*)(ob))->ob_type)
+  #define Py_SIZE(ob)   (((PyVarObject*)(ob))->ob_size)
+  #define PyVarObject_HEAD_INIT(type, size) \
+          PyObject_HEAD_INIT(type) size,
+  #define PyType_Modified(t)
+  typedef struct {
+     void *buf;
+     PyObject *obj;
+     Py_ssize_t len;
+     Py_ssize_t itemsize;
+     int readonly;
+     int ndim;
+     char *format;
+     Py_ssize_t *shape;
+     Py_ssize_t *strides;
+     Py_ssize_t *suboffsets;
+     void *internal;
+  } Py_buffer;
+  #define PyBUF_SIMPLE 0
+  #define PyBUF_WRITABLE 0x0001
+  #define PyBUF_FORMAT 0x0004
+  #define PyBUF_ND 0x0008
+  #define PyBUF_STRIDES (0x0010 | PyBUF_ND)
+  #define PyBUF_C_CONTIGUOUS (0x0020 | PyBUF_STRIDES)
+  #define PyBUF_F_CONTIGUOUS (0x0040 | PyBUF_STRIDES)
+  #define PyBUF_ANY_CONTIGUOUS (0x0080 | PyBUF_STRIDES)
+  #define PyBUF_INDIRECT (0x0100 | PyBUF_STRIDES)
+  #define PyBUF_RECORDS (PyBUF_STRIDES | PyBUF_FORMAT | PyBUF_WRITABLE)
+  #define PyBUF_FULL (PyBUF_INDIRECT | PyBUF_FORMAT | PyBUF_WRITABLE)
+  typedef int (*getbufferproc)(PyObject *, Py_buffer *, int);
+  typedef void (*releasebufferproc)(PyObject *, Py_buffer *);
+#endif
+#if PY_MAJOR_VERSION < 3
+  #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
+  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) \
+          PyCode_New(a, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
+#else
+  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
+  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) \
+          PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
+#endif
+#if PY_MAJOR_VERSION < 3 && PY_MINOR_VERSION < 6
+  #define PyUnicode_FromString(s) PyUnicode_Decode(s, strlen(s), "UTF-8", "strict")
+#endif
+#if PY_MAJOR_VERSION >= 3
+  #define Py_TPFLAGS_CHECKTYPES 0
+  #define Py_TPFLAGS_HAVE_INDEX 0
+#endif
+#if (PY_VERSION_HEX < 0x02060000) || (PY_MAJOR_VERSION >= 3)
+  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
+#endif
+#if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
+  #define CYTHON_PEP393_ENABLED 1
+  #define __Pyx_PyUnicode_READY(op)       (likely(PyUnicode_IS_READY(op)) ? \
+                                              0 : _PyUnicode_Ready((PyObject *)(op)))
+  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_LENGTH(u)
+  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
+  #define __Pyx_PyUnicode_READ(k, d, i)   PyUnicode_READ(k, d, i)
+#else
+  #define CYTHON_PEP393_ENABLED 0
+  #define __Pyx_PyUnicode_READY(op)       (0)
+  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_SIZE(u)
+  #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
+  #define __Pyx_PyUnicode_READ(k, d, i)   ((k=k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
+#endif
+#if PY_MAJOR_VERSION >= 3
+  #define PyBaseString_Type            PyUnicode_Type
+  #define PyStringObject               PyUnicodeObject
+  #define PyString_Type                PyUnicode_Type
+  #define PyString_Check               PyUnicode_Check
+  #define PyString_CheckExact          PyUnicode_CheckExact
+#endif
+#if PY_VERSION_HEX < 0x02060000
+  #define PyBytesObject                PyStringObject
+  #define PyBytes_Type                 PyString_Type
+  #define PyBytes_Check                PyString_Check
+  #define PyBytes_CheckExact           PyString_CheckExact
+  #define PyBytes_FromString           PyString_FromString
+  #define PyBytes_FromStringAndSize    PyString_FromStringAndSize
+  #define PyBytes_FromFormat           PyString_FromFormat
+  #define PyBytes_DecodeEscape         PyString_DecodeEscape
+  #define PyBytes_AsString             PyString_AsString
+  #define PyBytes_AsStringAndSize      PyString_AsStringAndSize
+  #define PyBytes_Size                 PyString_Size
+  #define PyBytes_AS_STRING            PyString_AS_STRING
+  #define PyBytes_GET_SIZE             PyString_GET_SIZE
+  #define PyBytes_Repr                 PyString_Repr
+  #define PyBytes_Concat               PyString_Concat
+  #define PyBytes_ConcatAndDel         PyString_ConcatAndDel
+#endif
+#if PY_VERSION_HEX < 0x02060000
+  #define PySet_Check(obj)             PyObject_TypeCheck(obj, &PySet_Type)
+  #define PyFrozenSet_Check(obj)       PyObject_TypeCheck(obj, &PyFrozenSet_Type)
+#endif
+#ifndef PySet_CheckExact
+  #define PySet_CheckExact(obj)        (Py_TYPE(obj) == &PySet_Type)
+#endif
+#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
+#if PY_MAJOR_VERSION >= 3
+  #define PyIntObject                  PyLongObject
+  #define PyInt_Type                   PyLong_Type
+  #define PyInt_Check(op)              PyLong_Check(op)
+  #define PyInt_CheckExact(op)         PyLong_CheckExact(op)
+  #define PyInt_FromString             PyLong_FromString
+  #define PyInt_FromUnicode            PyLong_FromUnicode
+  #define PyInt_FromLong               PyLong_FromLong
+  #define PyInt_FromSize_t             PyLong_FromSize_t
+  #define PyInt_FromSsize_t            PyLong_FromSsize_t
+  #define PyInt_AsLong                 PyLong_AsLong
+  #define PyInt_AS_LONG                PyLong_AS_LONG
+  #define PyInt_AsSsize_t              PyLong_AsSsize_t
+  #define PyInt_AsUnsignedLongMask     PyLong_AsUnsignedLongMask
+  #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
+#endif
+#if PY_MAJOR_VERSION >= 3
+  #define PyBoolObject                 PyLongObject
+#endif
+#if PY_VERSION_HEX < 0x03020000
+  typedef long Py_hash_t;
+  #define __Pyx_PyInt_FromHash_t PyInt_FromLong
+  #define __Pyx_PyInt_AsHash_t   PyInt_AsLong
+#else
+  #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
+  #define __Pyx_PyInt_AsHash_t   PyInt_AsSsize_t
+#endif
+#if (PY_MAJOR_VERSION < 3) || (PY_VERSION_HEX >= 0x03010300)
+  #define __Pyx_PySequence_GetSlice(obj, a, b) PySequence_GetSlice(obj, a, b)
+  #define __Pyx_PySequence_SetSlice(obj, a, b, value) PySequence_SetSlice(obj, a, b, value)
+  #define __Pyx_PySequence_DelSlice(obj, a, b) PySequence_DelSlice(obj, a, b)
+#else
+  #define __Pyx_PySequence_GetSlice(obj, a, b) (unlikely(!(obj)) ? \
+        (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), (PyObject*)0) : \
+        (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_GetSlice(obj, a, b)) : \
+            (PyErr_Format(PyExc_TypeError, "'%.200s' object is unsliceable", (obj)->ob_type->tp_name), (PyObject*)0)))
+  #define __Pyx_PySequence_SetSlice(obj, a, b, value) (unlikely(!(obj)) ? \
+        (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \
+        (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_SetSlice(obj, a, b, value)) : \
+            (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice assignment", (obj)->ob_type->tp_name), -1)))
+  #define __Pyx_PySequence_DelSlice(obj, a, b) (unlikely(!(obj)) ? \
+        (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \
+        (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_DelSlice(obj, a, b)) : \
+            (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice deletion", (obj)->ob_type->tp_name), -1)))
+#endif
+#if PY_MAJOR_VERSION >= 3
+  #define PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func))
+#endif
+#if PY_VERSION_HEX < 0x02050000
+  #define __Pyx_GetAttrString(o,n)   PyObject_GetAttrString((o),((char *)(n)))
+  #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),((char *)(n)),(a))
+  #define __Pyx_DelAttrString(o,n)   PyObject_DelAttrString((o),((char *)(n)))
+#else
+  #define __Pyx_GetAttrString(o,n)   PyObject_GetAttrString((o),(n))
+  #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),(n),(a))
+  #define __Pyx_DelAttrString(o,n)   PyObject_DelAttrString((o),(n))
+#endif
+#if PY_VERSION_HEX < 0x02050000
+  #define __Pyx_NAMESTR(n) ((char *)(n))
+  #define __Pyx_DOCSTR(n)  ((char *)(n))
+#else
+  #define __Pyx_NAMESTR(n) (n)
+  #define __Pyx_DOCSTR(n)  (n)
+#endif
+
+
+#if PY_MAJOR_VERSION >= 3
+  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_TrueDivide(x,y)
+  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceTrueDivide(x,y)
+#else
+  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_Divide(x,y)
+  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceDivide(x,y)
+#endif
+
+#ifndef __PYX_EXTERN_C
+  #ifdef __cplusplus
+    #define __PYX_EXTERN_C extern "C"
+  #else
+    #define __PYX_EXTERN_C extern
+  #endif
+#endif
+
+#if defined(WIN32) || defined(MS_WINDOWS)
+#define _USE_MATH_DEFINES
+#endif
+#include <math.h>
+#define __PYX_HAVE__pyfftw__pyfftw
+#define __PYX_HAVE_API__pyfftw__pyfftw
+#include "stdio.h"
+#include "stdlib.h"
+#include "numpy/arrayobject.h"
+#include "numpy/ufuncobject.h"
+#include "stdint.h"
+#include "pyfftw_complex.h"
+#include "fftw3.h"
+#include "limits.h"
+#include "cpu.h"
+#ifdef _OPENMP
+#include <omp.h>
+#endif /* _OPENMP */
+
+#ifdef PYREX_WITHOUT_ASSERTIONS
+#define CYTHON_WITHOUT_ASSERTIONS
+#endif
+
+
+/* inline attribute */
+#ifndef CYTHON_INLINE
+  #if defined(__GNUC__)
+    #define CYTHON_INLINE __inline__
+  #elif defined(_MSC_VER)
+    #define CYTHON_INLINE __inline
+  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+    #define CYTHON_INLINE inline
+  #else
+    #define CYTHON_INLINE
+  #endif
+#endif
+
+/* unused attribute */
+#ifndef CYTHON_UNUSED
+# if defined(__GNUC__)
+#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
+#     define CYTHON_UNUSED __attribute__ ((__unused__))
+#   else
+#     define CYTHON_UNUSED
+#   endif
+# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
+#   define CYTHON_UNUSED __attribute__ ((__unused__))
+# else
+#   define CYTHON_UNUSED
+# endif
+#endif
+
+typedef struct {PyObject **p; char *s; const long n; const char* encoding; const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; /*proto*/
+
+
+/* Type Conversion Predeclarations */
+
+#define __Pyx_PyBytes_FromUString(s) PyBytes_FromString((char*)s)
+#define __Pyx_PyBytes_AsUString(s)   ((unsigned char*) PyBytes_AsString(s))
+
+#define __Pyx_Owned_Py_None(b) (Py_INCREF(Py_None), Py_None)
+#define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False))
+static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
+static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x);
+
+static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
+static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
+static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*);
+
+#if CYTHON_COMPILING_IN_CPYTHON
+#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
+#else
+#define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
+#endif
+#define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
+
+#ifdef __GNUC__
+  /* Test for GCC > 2.95 */
+  #if __GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))
+    #define likely(x)   __builtin_expect(!!(x), 1)
+    #define unlikely(x) __builtin_expect(!!(x), 0)
+  #else /* __GNUC__ > 2 ... */
+    #define likely(x)   (x)
+    #define unlikely(x) (x)
+  #endif /* __GNUC__ > 2 ... */
+#else /* __GNUC__ */
+  #define likely(x)   (x)
+  #define unlikely(x) (x)
+#endif /* __GNUC__ */
+    
+static PyObject *__pyx_m;
+static PyObject *__pyx_b;
+static PyObject *__pyx_empty_tuple;
+static PyObject *__pyx_empty_bytes;
+static int __pyx_lineno;
+static int __pyx_clineno = 0;
+static const char * __pyx_cfilenm= __FILE__;
+static const char *__pyx_filename;
+
+#if !defined(CYTHON_CCOMPLEX)
+  #if defined(__cplusplus)
+    #define CYTHON_CCOMPLEX 1
+  #elif defined(_Complex_I)
+    #define CYTHON_CCOMPLEX 1
+  #else
+    #define CYTHON_CCOMPLEX 0
+  #endif
+#endif
+#if CYTHON_CCOMPLEX
+  #ifdef __cplusplus
+    #include <complex>
+  #else
+    #include <complex.h>
+  #endif
+#endif
+#if CYTHON_CCOMPLEX && !defined(__cplusplus) && defined(__sun__) && defined(__GNUC__)
+  #undef _Complex_I
+  #define _Complex_I 1.0fj
+#endif
+
+
+static const char *__pyx_f[] = {
+  "pyfftw.pyx",
+  "utils.pxi",
+  "numpy.pxd",
+  "type.pxd",
+};
+
+/* "numpy.pxd":723
+ * # in Cython to enable them only on the right systems.
+ * 
+ * ctypedef npy_int8       int8_t             # <<<<<<<<<<<<<<
+ * ctypedef npy_int16      int16_t
+ * ctypedef npy_int32      int32_t
+ */
+typedef npy_int8 __pyx_t_5numpy_int8_t;
+
+/* "numpy.pxd":724
+ * 
+ * ctypedef npy_int8       int8_t
+ * ctypedef npy_int16      int16_t             # <<<<<<<<<<<<<<
+ * ctypedef npy_int32      int32_t
+ * ctypedef npy_int64      int64_t
+ */
+typedef npy_int16 __pyx_t_5numpy_int16_t;
+
+/* "numpy.pxd":725
+ * ctypedef npy_int8       int8_t
+ * ctypedef npy_int16      int16_t
+ * ctypedef npy_int32      int32_t             # <<<<<<<<<<<<<<
+ * ctypedef npy_int64      int64_t
+ * #ctypedef npy_int96      int96_t
+ */
+typedef npy_int32 __pyx_t_5numpy_int32_t;
+
+/* "numpy.pxd":726
+ * ctypedef npy_int16      int16_t
+ * ctypedef npy_int32      int32_t
+ * ctypedef npy_int64      int64_t             # <<<<<<<<<<<<<<
+ * #ctypedef npy_int96      int96_t
+ * #ctypedef npy_int128     int128_t
+ */
+typedef npy_int64 __pyx_t_5numpy_int64_t;
+
+/* "numpy.pxd":730
+ * #ctypedef npy_int128     int128_t
+ * 
+ * ctypedef npy_uint8      uint8_t             # <<<<<<<<<<<<<<
+ * ctypedef npy_uint16     uint16_t
+ * ctypedef npy_uint32     uint32_t
+ */
+typedef npy_uint8 __pyx_t_5numpy_uint8_t;
+
+/* "numpy.pxd":731
+ * 
+ * ctypedef npy_uint8      uint8_t
+ * ctypedef npy_uint16     uint16_t             # <<<<<<<<<<<<<<
+ * ctypedef npy_uint32     uint32_t
+ * ctypedef npy_uint64     uint64_t
+ */
+typedef npy_uint16 __pyx_t_5numpy_uint16_t;
+
+/* "numpy.pxd":732
+ * ctypedef npy_uint8      uint8_t
+ * ctypedef npy_uint16     uint16_t
+ * ctypedef npy_uint32     uint32_t             # <<<<<<<<<<<<<<
+ * ctypedef npy_uint64     uint64_t
+ * #ctypedef npy_uint96     uint96_t
+ */
+typedef npy_uint32 __pyx_t_5numpy_uint32_t;
+
+/* "numpy.pxd":733
+ * ctypedef npy_uint16     uint16_t
+ * ctypedef npy_uint32     uint32_t
+ * ctypedef npy_uint64     uint64_t             # <<<<<<<<<<<<<<
+ * #ctypedef npy_uint96     uint96_t
+ * #ctypedef npy_uint128    uint128_t
+ */
+typedef npy_uint64 __pyx_t_5numpy_uint64_t;
+
+/* "numpy.pxd":737
+ * #ctypedef npy_uint128    uint128_t
+ * 
+ * ctypedef npy_float32    float32_t             # <<<<<<<<<<<<<<
+ * ctypedef npy_float64    float64_t
+ * #ctypedef npy_float80    float80_t
+ */
+typedef npy_float32 __pyx_t_5numpy_float32_t;
+
+/* "numpy.pxd":738
+ * 
+ * ctypedef npy_float32    float32_t
+ * ctypedef npy_float64    float64_t             # <<<<<<<<<<<<<<
+ * #ctypedef npy_float80    float80_t
+ * #ctypedef npy_float128   float128_t
+ */
+typedef npy_float64 __pyx_t_5numpy_float64_t;
+
+/* "numpy.pxd":747
+ * # The int types are mapped a bit surprising --
+ * # numpy.int corresponds to 'l' and numpy.long to 'q'
+ * ctypedef npy_long       int_t             # <<<<<<<<<<<<<<
+ * ctypedef npy_longlong   long_t
+ * ctypedef npy_longlong   longlong_t
+ */
+typedef npy_long __pyx_t_5numpy_int_t;
+
+/* "numpy.pxd":748
+ * # numpy.int corresponds to 'l' and numpy.long to 'q'
+ * ctypedef npy_long       int_t
+ * ctypedef npy_longlong   long_t             # <<<<<<<<<<<<<<
+ * ctypedef npy_longlong   longlong_t
+ * 
+ */
+typedef npy_longlong __pyx_t_5numpy_long_t;
+
+/* "numpy.pxd":749
+ * ctypedef npy_long       int_t
+ * ctypedef npy_longlong   long_t
+ * ctypedef npy_longlong   longlong_t             # <<<<<<<<<<<<<<
+ * 
+ * ctypedef npy_ulong      uint_t
+ */
+typedef npy_longlong __pyx_t_5numpy_longlong_t;
+
+/* "numpy.pxd":751
+ * ctypedef npy_longlong   longlong_t
+ * 
+ * ctypedef npy_ulong      uint_t             # <<<<<<<<<<<<<<
+ * ctypedef npy_ulonglong  ulong_t
+ * ctypedef npy_ulonglong  ulonglong_t
+ */
+typedef npy_ulong __pyx_t_5numpy_uint_t;
+
+/* "numpy.pxd":752
+ * 
+ * ctypedef npy_ulong      uint_t
+ * ctypedef npy_ulonglong  ulong_t             # <<<<<<<<<<<<<<
+ * ctypedef npy_ulonglong  ulonglong_t
+ * 
+ */
+typedef npy_ulonglong __pyx_t_5numpy_ulong_t;
+
+/* "numpy.pxd":753
+ * ctypedef npy_ulong      uint_t
+ * ctypedef npy_ulonglong  ulong_t
+ * ctypedef npy_ulonglong  ulonglong_t             # <<<<<<<<<<<<<<
+ * 
+ * ctypedef npy_intp       intp_t
+ */
+typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t;
+
+/* "numpy.pxd":755
+ * ctypedef npy_ulonglong  ulonglong_t
+ * 
+ * ctypedef npy_intp       intp_t             # <<<<<<<<<<<<<<
+ * ctypedef npy_uintp      uintp_t
+ * 
+ */
+typedef npy_intp __pyx_t_5numpy_intp_t;
+
+/* "numpy.pxd":756
+ * 
+ * ctypedef npy_intp       intp_t
+ * ctypedef npy_uintp      uintp_t             # <<<<<<<<<<<<<<
+ * 
+ * ctypedef npy_double     float_t
+ */
+typedef npy_uintp __pyx_t_5numpy_uintp_t;
+
+/* "numpy.pxd":758
+ * ctypedef npy_uintp      uintp_t
+ * 
+ * ctypedef npy_double     float_t             # <<<<<<<<<<<<<<
+ * ctypedef npy_double     double_t
+ * ctypedef npy_longdouble longdouble_t
+ */
+typedef npy_double __pyx_t_5numpy_float_t;
+
+/* "numpy.pxd":759
+ * 
+ * ctypedef npy_double     float_t
+ * ctypedef npy_double     double_t             # <<<<<<<<<<<<<<
+ * ctypedef npy_longdouble longdouble_t
+ * 
+ */
+typedef npy_double __pyx_t_5numpy_double_t;
+
+/* "numpy.pxd":760
+ * ctypedef npy_double     float_t
+ * ctypedef npy_double     double_t
+ * ctypedef npy_longdouble longdouble_t             # <<<<<<<<<<<<<<
+ * 
+ * ctypedef npy_cfloat      cfloat_t
+ */
+typedef npy_longdouble __pyx_t_5numpy_longdouble_t;
+#if CYTHON_CCOMPLEX
+  #ifdef __cplusplus
+    typedef ::std::complex< float > __pyx_t_float_complex;
+  #else
+    typedef float _Complex __pyx_t_float_complex;
+  #endif
+#else
+    typedef struct { float real, imag; } __pyx_t_float_complex;
+#endif
+
+#if CYTHON_CCOMPLEX
+  #ifdef __cplusplus
+    typedef ::std::complex< double > __pyx_t_double_complex;
+  #else
+    typedef double _Complex __pyx_t_double_complex;
+  #endif
+#else
+    typedef struct { double real, imag; } __pyx_t_double_complex;
+#endif
+
+
+/*--- Type declarations ---*/
+struct __pyx_obj_6pyfftw_6pyfftw_FFTW;
+
+/* "numpy.pxd":762
+ * ctypedef npy_longdouble longdouble_t
+ * 
+ * ctypedef npy_cfloat      cfloat_t             # <<<<<<<<<<<<<<
+ * ctypedef npy_cdouble     cdouble_t
+ * ctypedef npy_clongdouble clongdouble_t
+ */
+typedef npy_cfloat __pyx_t_5numpy_cfloat_t;
+
+/* "numpy.pxd":763
+ * 
+ * ctypedef npy_cfloat      cfloat_t
+ * ctypedef npy_cdouble     cdouble_t             # <<<<<<<<<<<<<<
+ * ctypedef npy_clongdouble clongdouble_t
+ * 
+ */
+typedef npy_cdouble __pyx_t_5numpy_cdouble_t;
+
+/* "numpy.pxd":764
+ * ctypedef npy_cfloat      cfloat_t
+ * ctypedef npy_cdouble     cdouble_t
+ * ctypedef npy_clongdouble clongdouble_t             # <<<<<<<<<<<<<<
+ * 
+ * ctypedef npy_cdouble     complex_t
+ */
+typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t;
+
+/* "numpy.pxd":766
+ * ctypedef npy_clongdouble clongdouble_t
+ * 
+ * ctypedef npy_cdouble     complex_t             # <<<<<<<<<<<<<<
+ * 
+ * cdef inline object PyArray_MultiIterNew1(a):
+ */
+typedef npy_cdouble __pyx_t_5numpy_complex_t;
+struct __pyx_t_6pyfftw_6pyfftw__fftw_iodim;
+typedef struct __pyx_t_6pyfftw_6pyfftw__fftw_iodim __pyx_t_6pyfftw_6pyfftw__fftw_iodim;
+struct __pyx_opt_args_6pyfftw_6pyfftw_n_byte_align_empty;
+struct __pyx_opt_args_6pyfftw_6pyfftw_n_byte_align;
+
+/* "pyfftw/pyfftw.pxd":247
+ * 
+ * # Direction enum
+ * cdef enum:             # <<<<<<<<<<<<<<
+ *     FFTW_FORWARD = -1
+ *     FFTW_BACKWARD = 1
+ */
+enum  {
+  __pyx_e_6pyfftw_6pyfftw_FFTW_FORWARD = -1,
+  __pyx_e_6pyfftw_6pyfftw_FFTW_BACKWARD = 1
+};
+
+/* "pyfftw/pyfftw.pxd":252
+ * 
+ * # Documented flags
+ * cdef enum:             # <<<<<<<<<<<<<<
+ *     FFTW_MEASURE = 0
+ *     FFTW_DESTROY_INPUT = 1
+ */
+enum  {
+  __pyx_e_6pyfftw_6pyfftw_FFTW_MEASURE = 0,
+  __pyx_e_6pyfftw_6pyfftw_FFTW_DESTROY_INPUT = 1,
+  __pyx_e_6pyfftw_6pyfftw_FFTW_UNALIGNED = 2,
+  __pyx_e_6pyfftw_6pyfftw_FFTW_CONSERVE_MEMORY = 4,
+  __pyx_e_6pyfftw_6pyfftw_FFTW_EXHAUSTIVE = 8,
+  __pyx_e_6pyfftw_6pyfftw_FFTW_PRESERVE_INPUT = 16,
+  __pyx_e_6pyfftw_6pyfftw_FFTW_PATIENT = 32,
+  __pyx_e_6pyfftw_6pyfftw_FFTW_ESTIMATE = 64
+};
+
+/* "pyfftw/pyfftw.pxd":22
+ * from libc.stdint cimport int64_t
+ * 
+ * ctypedef struct _fftw_iodim:             # <<<<<<<<<<<<<<
+ *     int _n
+ *     int _is
+ */
+struct __pyx_t_6pyfftw_6pyfftw__fftw_iodim {
+  int _n;
+  int _is;
+  int _os;
+};
+
+/* "pyfftw/pyfftw.pxd":226
+ * # has different function names and signatures for all the
+ * # different precisions and dft types).
+ * ctypedef void * (*fftw_generic_plan_guru)(             # <<<<<<<<<<<<<<
+ *         int rank, fftw_iodim *dims,
+ *         int howmany_rank, fftw_iodim *howmany_dims,
+ */
+typedef void *(*__pyx_t_6pyfftw_6pyfftw_fftw_generic_plan_guru)(int, fftw_iodim *, int, fftw_iodim *, void *, void *, int, int);
+
+/* "pyfftw/pyfftw.pxd":232
+ *         int sign, int flags)
+ * 
+ * ctypedef void (*fftw_generic_execute)(void *_plan, void *_in, void *_out) nogil             # <<<<<<<<<<<<<<
+ * 
+ * ctypedef void (*fftw_generic_destroy_plan)(void *_plan)
+ */
+typedef void (*__pyx_t_6pyfftw_6pyfftw_fftw_generic_execute)(void *, void *, void *);
+
+/* "pyfftw/pyfftw.pxd":234
+ * ctypedef void (*fftw_generic_execute)(void *_plan, void *_in, void *_out) nogil
+ * 
+ * ctypedef void (*fftw_generic_destroy_plan)(void *_plan)             # <<<<<<<<<<<<<<
+ * 
+ * ctypedef void (*fftw_generic_init_threads)()
+ */
+typedef void (*__pyx_t_6pyfftw_6pyfftw_fftw_generic_destroy_plan)(void *);
+
+/* "pyfftw/pyfftw.pxd":236
+ * ctypedef void (*fftw_generic_destroy_plan)(void *_plan)
+ * 
+ * ctypedef void (*fftw_generic_init_threads)()             # <<<<<<<<<<<<<<
+ * 
+ * ctypedef void (*fftw_generic_plan_with_nthreads)(int n)
+ */
+typedef void (*__pyx_t_6pyfftw_6pyfftw_fftw_generic_init_threads)(void);
+
+/* "pyfftw/pyfftw.pxd":238
+ * ctypedef void (*fftw_generic_init_threads)()
+ * 
+ * ctypedef void (*fftw_generic_plan_with_nthreads)(int n)             # <<<<<<<<<<<<<<
+ * 
+ * ctypedef void (*fftw_generic_set_timelimit)(double seconds)
+ */
+typedef void (*__pyx_t_6pyfftw_6pyfftw_fftw_generic_plan_with_nthreads)(int);
+
+/* "pyfftw/pyfftw.pxd":240
+ * ctypedef void (*fftw_generic_plan_with_nthreads)(int n)
+ * 
+ * ctypedef void (*fftw_generic_set_timelimit)(double seconds)             # <<<<<<<<<<<<<<
+ * 
+ * ctypedef bint (*validator)(np.ndarray input_array,
+ */
+typedef void (*__pyx_t_6pyfftw_6pyfftw_fftw_generic_set_timelimit)(double);
+
+/* "pyfftw/pyfftw.pxd":242
+ * ctypedef void (*fftw_generic_set_timelimit)(double seconds)
+ * 
+ * ctypedef bint (*validator)(np.ndarray input_array,             # <<<<<<<<<<<<<<
+ *         np.ndarray output_array, int64_t *axes, int64_t *not_axes,
+ *         int64_t axes_length)
+ */
+typedef int (*__pyx_t_6pyfftw_6pyfftw_validator)(PyArrayObject *, PyArrayObject *, int64_t *, int64_t *, int64_t);
+
+/* "/home/whg21/Projects/github/pyFFTW/pyfftw/utils.pxi":39
+ *     _valid_simd_alignments = ()
+ * 
+ * cpdef n_byte_align_empty(shape, n, dtype='float64', order='C'):             # <<<<<<<<<<<<<<
+ *     '''n_byte_align_empty(shape, n, dtype='float64', order='C')
+ * 
+ */
+struct __pyx_opt_args_6pyfftw_6pyfftw_n_byte_align_empty {
+  int __pyx_n;
+  PyObject *dtype;
+  PyObject *order;
+};
+
+/* "/home/whg21/Projects/github/pyFFTW/pyfftw/utils.pxi":75
+ *     return array
+ * 
+ * cpdef n_byte_align(array, n, dtype=None):             # <<<<<<<<<<<<<<
+ *     ''' n_byte_align(array, n, dtype=None)
+ * 
+ */
+struct __pyx_opt_args_6pyfftw_6pyfftw_n_byte_align {
+  int __pyx_n;
+  PyObject *dtype;
+};
+
+/* "pyfftw/pyfftw.pyx":568
+ * # ======================
+ * #
+ * cdef class FFTW:             # <<<<<<<<<<<<<<
+ *     '''
+ *     FFTW is a class for computing the complex N-Dimensional DFT or
+ */
+struct __pyx_obj_6pyfftw_6pyfftw_FFTW {
+  PyObject_HEAD
+  struct __pyx_vtabstruct_6pyfftw_6pyfftw_FFTW *__pyx_vtab;
+  __pyx_t_6pyfftw_6pyfftw_fftw_generic_plan_guru __pyx___fftw_planner;
+  __pyx_t_6pyfftw_6pyfftw_fftw_generic_execute __pyx___fftw_execute;
+  __pyx_t_6pyfftw_6pyfftw_fftw_generic_destroy_plan __pyx___fftw_destroy;
+  __pyx_t_6pyfftw_6pyfftw_fftw_generic_plan_with_nthreads __pyx___nthreads_plan_setter;
+  void *__pyx___plan;
+  PyArrayObject *__pyx___input_array;
+  PyArrayObject *__pyx___output_array;
+  int __pyx___direction;
+  int __pyx___flags;
+  int __pyx___simd_allowed;
+  int __pyx___input_array_alignment;
+  int __pyx___output_array_alignment;
+  int __pyx___use_threads;
+  PyObject *__pyx___input_strides;
+  PyObject *__pyx___input_byte_strides;
+  PyObject *__pyx___output_strides;
+  PyObject *__pyx___output_byte_strides;
+  PyObject *__pyx___input_shape;
+  PyObject *__pyx___output_shape;
+  PyObject *__pyx___input_dtype;
+  PyObject *__pyx___output_dtype;
+  PyObject *__pyx___flags_used;
+  float __pyx___normalisation_scaling;
+  int __pyx___rank;
+  __pyx_t_6pyfftw_6pyfftw__fftw_iodim *__pyx___dims;
+  int __pyx___howmany_rank;
+  __pyx_t_6pyfftw_6pyfftw__fftw_iodim *__pyx___howmany_dims;
+  int64_t *__pyx___axes;
+  int64_t *__pyx___not_axes;
+  int __pyx___N;
+};
+
+
+
+struct __pyx_vtabstruct_6pyfftw_6pyfftw_FFTW {
+  PyObject *(*update_arrays)(struct __pyx_obj_6pyfftw_6pyfftw_FFTW *, PyObject *, PyObject *, int __pyx_skip_dispatch);
+  PyObject *(*_update_arrays)(struct __pyx_obj_6pyfftw_6pyfftw_FFTW *, PyArrayObject *, PyArrayObject *);
+  PyObject *(*execute)(struct __pyx_obj_6pyfftw_6pyfftw_FFTW *, int __pyx_skip_dispatch);
+};
+static struct __pyx_vtabstruct_6pyfftw_6pyfftw_FFTW *__pyx_vtabptr_6pyfftw_6pyfftw_FFTW;
+#ifndef CYTHON_REFNANNY
+  #define CYTHON_REFNANNY 0
+#endif
+#if CYTHON_REFNANNY
+  typedef struct {
+    void (*INCREF)(void*, PyObject*, int);
+    void (*DECREF)(void*, PyObject*, int);
+    void (*GOTREF)(void*, PyObject*, int);
+    void (*GIVEREF)(void*, PyObject*, int);
+    void* (*SetupContext)(const char*, int, const char*);
+    void (*FinishContext)(void**);
+  } __Pyx_RefNannyAPIStruct;
+  static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
+  static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); /*proto*/
+  #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
+#ifdef WITH_THREAD
+  #define __Pyx_RefNannySetupContext(name, acquire_gil) \
+          if (acquire_gil) { \
+              PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); \
+              __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__); \
+              PyGILState_Release(__pyx_gilstate_save); \
+          } else { \
+              __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__); \
+          }
+#else
+  #define __Pyx_RefNannySetupContext(name, acquire_gil) \
+          __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
+#endif
+  #define __Pyx_RefNannyFinishContext() \
+          __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
+  #define __Pyx_INCREF(r)  __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
+  #define __Pyx_DECREF(r)  __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
+  #define __Pyx_GOTREF(r)  __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
+  #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
+  #define __Pyx_XINCREF(r)  do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
+  #define __Pyx_XDECREF(r)  do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
+  #define __Pyx_XGOTREF(r)  do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
+  #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
+#else
+  #define __Pyx_RefNannyDeclarations
+  #define __Pyx_RefNannySetupContext(name, acquire_gil)
+  #define __Pyx_RefNannyFinishContext()
+  #define __Pyx_INCREF(r) Py_INCREF(r)
+  #define __Pyx_DECREF(r) Py_DECREF(r)
+  #define __Pyx_GOTREF(r)
+  #define __Pyx_GIVEREF(r)
+  #define __Pyx_XINCREF(r) Py_XINCREF(r)
+  #define __Pyx_XDECREF(r) Py_XDECREF(r)
+  #define __Pyx_XGOTREF(r)
+  #define __Pyx_XGIVEREF(r)
+#endif /* CYTHON_REFNANNY */
+#define __Pyx_CLEAR(r)    do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
+#define __Pyx_XCLEAR(r)   do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
+
+static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/
+
+static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /*proto*/
+
+static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
+    Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); /*proto*/
+
+static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); /*proto*/
+
+static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[], \
+    PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, \
+    const char* function_name); /*proto*/
+
+static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
+static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
+
+static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); /*proto*/
+
+static CYTHON_INLINE long __Pyx_div_long(long, long); /* proto */
+
+static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
+
+static CYTHON_INLINE int __Pyx_PySequence_Contains(PyObject* item, PyObject* seq, int eq) {
+    int result = PySequence_Contains(seq, item);
+    return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
+}
+
+static CYTHON_INLINE PyObject* __Pyx_PyObject_Append(PyObject* L, PyObject* x) {
+    if (likely(PyList_CheckExact(L))) {
+        if (unlikely(PyList_Append(L, x) < 0)) return NULL;
+        Py_INCREF(Py_None);
+        return Py_None; /* this is just to have an accurate signature */
+    } else {
+        PyObject *r, *m;
+        m = __Pyx_GetAttrString(L, "append");
+        if (!m) return NULL;
+        r = PyObject_CallFunctionObjArgs(m, x, NULL);
+        Py_DECREF(m);
+        return r;
+    }
+}
+
+static CYTHON_INLINE intptr_t __Pyx_mod_intptr_t(intptr_t, intptr_t); /* proto */
+
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
+    PyObject *r;
+    if (!j) return NULL;
+    r = PyObject_GetItem(o, j);
+    Py_DECREF(j);
+    return r;
+}
+#define __Pyx_GetItemInt_List(o, i, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \
+                                                    __Pyx_GetItemInt_List_Fast(o, i) : \
+                                                    __Pyx_GetItemInt_Generic(o, to_py_func(i)))
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i) {
+#if CYTHON_COMPILING_IN_CPYTHON
+    if (likely((0 <= i) & (i < PyList_GET_SIZE(o)))) {
+        PyObject *r = PyList_GET_ITEM(o, i);
+        Py_INCREF(r);
+        return r;
+    }
+    else if ((-PyList_GET_SIZE(o) <= i) & (i < 0)) {
+        PyObject *r = PyList_GET_ITEM(o, PyList_GET_SIZE(o) + i);
+        Py_INCREF(r);
+        return r;
+    }
+    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
+#else
+    return PySequence_GetItem(o, i);
+#endif
+}
+#define __Pyx_GetItemInt_Tuple(o, i, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \
+                                                    __Pyx_GetItemInt_Tuple_Fast(o, i) : \
+                                                    __Pyx_GetItemInt_Generic(o, to_py_func(i)))
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i) {
+#if CYTHON_COMPILING_IN_CPYTHON
+    if (likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) {
+        PyObject *r = PyTuple_GET_ITEM(o, i);
+        Py_INCREF(r);
+        return r;
+    }
+    else if ((-PyTuple_GET_SIZE(o) <= i) & (i < 0)) {
+        PyObject *r = PyTuple_GET_ITEM(o, PyTuple_GET_SIZE(o) + i);
+        Py_INCREF(r);
+        return r;
+    }
+    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
+#else
+    return PySequence_GetItem(o, i);
+#endif
+}
+#define __Pyx_GetItemInt(o, i, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \
+                                                    __Pyx_GetItemInt_Fast(o, i) : \
+                                                    __Pyx_GetItemInt_Generic(o, to_py_func(i)))
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i) {
+#if CYTHON_COMPILING_IN_CPYTHON
+    if (PyList_CheckExact(o)) {
+        Py_ssize_t n = (likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
+        if (likely((n >= 0) & (n < PyList_GET_SIZE(o)))) {
+            PyObject *r = PyList_GET_ITEM(o, n);
+            Py_INCREF(r);
+            return r;
+        }
+    }
+    else if (PyTuple_CheckExact(o)) {
+        Py_ssize_t n = (likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
+        if (likely((n >= 0) & (n < PyTuple_GET_SIZE(o)))) {
+            PyObject *r = PyTuple_GET_ITEM(o, n);
+            Py_INCREF(r);
+            return r;
+        }
+    } else {  /* inlined PySequence_GetItem() */
+        PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
+        if (likely(m && m->sq_item)) {
+            if (unlikely(i < 0) && likely(m->sq_length)) {
+                Py_ssize_t l = m->sq_length(o);
+                if (unlikely(l < 0)) return NULL;
+                i += l;
+            }
+            return m->sq_item(o, i);
+        }
+    }
+#else
+    if (PySequence_Check(o)) {
+        return PySequence_GetItem(o, i);
+    }
+#endif
+    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
+}
+
+static double __Pyx__PyObject_AsDouble(PyObject* obj); /* proto */
+#if CYTHON_COMPILING_IN_PYPY
+#define __Pyx_PyObject_AsDouble(obj) \
+(likely(PyFloat_CheckExact(obj)) ? PyFloat_AS_DOUBLE(obj) : \
+ likely(PyInt_CheckExact(obj)) ? \
+ PyFloat_AsDouble(obj) : __Pyx__PyObject_AsDouble(obj))
+#else
+#define __Pyx_PyObject_AsDouble(obj) \
+((likely(PyFloat_CheckExact(obj))) ? \
+ PyFloat_AS_DOUBLE(obj) : __Pyx__PyObject_AsDouble(obj))
+#endif
+
+#if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
+    PyListObject* L = (PyListObject*) list;
+    Py_ssize_t len = Py_SIZE(list);
+    if (likely(L->allocated > len)) {
+        Py_INCREF(x);
+        PyList_SET_ITEM(list, len, x);
+        Py_SIZE(list) = len+1;
+        return 0;
+    }
+    return PyList_Append(list, x);
+}
+#else
+#define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
+#endif
+
+static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);
+
+static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
+
+static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void);
+
+static CYTHON_INLINE int __Pyx_IterFinish(void); /*proto*/
+
+static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected); /*proto*/
+
+static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
+static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
+
+static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, long level); /*proto*/
+
+static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_int64_t(int64_t);
+
+static CYTHON_INLINE int64_t __Pyx_PyInt_from_py_int64_t(PyObject *);
+
+#ifndef __PYX_FORCE_INIT_THREADS
+  #define __PYX_FORCE_INIT_THREADS 0
+#endif
+
+#if CYTHON_CCOMPLEX
+  #ifdef __cplusplus
+    #define __Pyx_CREAL(z) ((z).real())
+    #define __Pyx_CIMAG(z) ((z).imag())
+  #else
+    #define __Pyx_CREAL(z) (__real__(z))
+    #define __Pyx_CIMAG(z) (__imag__(z))
+  #endif
+#else
+    #define __Pyx_CREAL(z) ((z).real)
+    #define __Pyx_CIMAG(z) ((z).imag)
+#endif
+#if defined(_WIN32) && defined(__cplusplus) && CYTHON_CCOMPLEX
+    #define __Pyx_SET_CREAL(z,x) ((z).real(x))
+    #define __Pyx_SET_CIMAG(z,y) ((z).imag(y))
+#else
+    #define __Pyx_SET_CREAL(z,x) __Pyx_CREAL(z) = (x)
+    #define __Pyx_SET_CIMAG(z,y) __Pyx_CIMAG(z) = (y)
+#endif
+
+static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float);
+
+#if CYTHON_CCOMPLEX
+    #define __Pyx_c_eqf(a, b)   ((a)==(b))
+    #define __Pyx_c_sumf(a, b)  ((a)+(b))
+    #define __Pyx_c_difff(a, b) ((a)-(b))
+    #define __Pyx_c_prodf(a, b) ((a)*(b))
+    #define __Pyx_c_quotf(a, b) ((a)/(b))
+    #define __Pyx_c_negf(a)     (-(a))
+  #ifdef __cplusplus
+    #define __Pyx_c_is_zerof(z) ((z)==(float)0)
+    #define __Pyx_c_conjf(z)    (::std::conj(z))
+    #if 1
+        #define __Pyx_c_absf(z)     (::std::abs(z))
+        #define __Pyx_c_powf(a, b)  (::std::pow(a, b))
+    #endif
+  #else
+    #define __Pyx_c_is_zerof(z) ((z)==0)
+    #define __Pyx_c_conjf(z)    (conjf(z))
+    #if 1
+        #define __Pyx_c_absf(z)     (cabsf(z))
+        #define __Pyx_c_powf(a, b)  (cpowf(a, b))
+    #endif
+ #endif
+#else
+    static CYTHON_INLINE int __Pyx_c_eqf(__pyx_t_float_complex, __pyx_t_float_complex);
+    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sumf(__pyx_t_float_complex, __pyx_t_float_complex);
+    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_difff(__pyx_t_float_complex, __pyx_t_float_complex);
+    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prodf(__pyx_t_float_complex, __pyx_t_float_complex);
+    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quotf(__pyx_t_float_complex, __pyx_t_float_complex);
+    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_negf(__pyx_t_float_complex);
+    static CYTHON_INLINE int __Pyx_c_is_zerof(__pyx_t_float_complex);
+    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conjf(__pyx_t_float_complex);
+    #if 1
+        static CYTHON_INLINE float __Pyx_c_absf(__pyx_t_float_complex);
+        static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_powf(__pyx_t_float_complex, __pyx_t_float_complex);
+    #endif
+#endif
+
+static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double);
+
+#if CYTHON_CCOMPLEX
+    #define __Pyx_c_eq(a, b)   ((a)==(b))
+    #define __Pyx_c_sum(a, b)  ((a)+(b))
+    #define __Pyx_c_diff(a, b) ((a)-(b))
+    #define __Pyx_c_prod(a, b) ((a)*(b))
+    #define __Pyx_c_quot(a, b) ((a)/(b))
+    #define __Pyx_c_neg(a)     (-(a))
+  #ifdef __cplusplus
+    #define __Pyx_c_is_zero(z) ((z)==(double)0)
+    #define __Pyx_c_conj(z)    (::std::conj(z))
+    #if 1
+        #define __Pyx_c_abs(z)     (::std::abs(z))
+        #define __Pyx_c_pow(a, b)  (::std::pow(a, b))
+    #endif
+  #else
+    #define __Pyx_c_is_zero(z) ((z)==0)
+    #define __Pyx_c_conj(z)    (conj(z))
+    #if 1
+        #define __Pyx_c_abs(z)     (cabs(z))
+        #define __Pyx_c_pow(a, b)  (cpow(a, b))
+    #endif
+ #endif
+#else
+    static CYTHON_INLINE int __Pyx_c_eq(__pyx_t_double_complex, __pyx_t_double_complex);
+    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum(__pyx_t_double_complex, __pyx_t_double_complex);
+    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff(__pyx_t_double_complex, __pyx_t_double_complex);
+    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod(__pyx_t_double_complex, __pyx_t_double_complex);
+    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot(__pyx_t_double_complex, __pyx_t_double_complex);
+    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg(__pyx_t_double_complex);
+    static CYTHON_INLINE int __Pyx_c_is_zero(__pyx_t_double_complex);
+    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj(__pyx_t_double_complex);
+    #if 1
+        static CYTHON_INLINE double __Pyx_c_abs(__pyx_t_double_complex);
+        static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow(__pyx_t_double_complex, __pyx_t_double_complex);
+    #endif
+#endif
+
+static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject *);
+
+static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject *);
+
+static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject *);
+
+static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject *);
+
+static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject *);
+
+static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject *);
+
+static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject *);
+
+static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject *);
+
+static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject *);
+
+static CYTHON_INLINE int __Pyx_PyInt_AsLongDouble(PyObject *);
+
+static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject *);
+
+static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject *);
+
+static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject *);
+
+static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject *);
+
+static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject *);
+
+static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject *);
+
+static int __Pyx_check_binary_version(void);
+
+static int __Pyx_SetVtable(PyObject *dict, void *vtable); /*proto*/
+
+#if !defined(__Pyx_PyIdentifier_FromString)
+#if PY_MAJOR_VERSION < 3
+  #define __Pyx_PyIdentifier_FromString(s) PyString_FromString(s)
+#else
+  #define __Pyx_PyIdentifier_FromString(s) PyUnicode_FromString(s)
+#endif
+#endif
+
+static PyObject *__Pyx_ImportModule(const char *name); /*proto*/
+
+static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, size_t size, int strict);  /*proto*/
+
+typedef struct {
+    int code_line;
+    PyCodeObject* code_object;
+} __Pyx_CodeObjectCacheEntry;
+struct __Pyx_CodeObjectCache {
+    int count;
+    int max_count;
+    __Pyx_CodeObjectCacheEntry* entries;
+};
+static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
+static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
+static PyCodeObject *__pyx_find_code_object(int code_line);
+static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
+
+static void __Pyx_AddTraceback(const char *funcname, int c_line,
+                               int py_line, const char *filename); /*proto*/
+
+static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/
+
+
+/* Module declarations from 'cpython.buffer' */
+
+/* Module declarations from 'cpython.ref' */
+
+/* Module declarations from 'libc.stdio' */
+
+/* Module declarations from 'cpython.object' */
+
+/* Module declarations from '__builtin__' */
+
+/* Module declarations from 'cpython.type' */
+static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0;
+
+/* Module declarations from 'libc.stdlib' */
+
+/* Module declarations from 'numpy' */
+
+/* Module declarations from 'numpy' */
+static PyTypeObject *__pyx_ptype_5numpy_dtype = 0;
+static PyTypeObject *__pyx_ptype_5numpy_flatiter = 0;
+static PyTypeObject *__pyx_ptype_5numpy_broadcast = 0;
+static PyTypeObject *__pyx_ptype_5numpy_ndarray = 0;
+static PyTypeObject *__pyx_ptype_5numpy_ufunc = 0;
+static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *, char *, char *, int *); /*proto*/
+
+/* Module declarations from 'libc.stdint' */
+
+/* Module declarations from 'libc' */
+
+/* Module declarations from 'libc.limits' */
+
+/* Module declarations from 'pyfftw.cpu' */
+
+/* Module declarations from 'pyfftw.pyfftw' */
+static PyTypeObject *__pyx_ptype_6pyfftw_6pyfftw_FFTW = 0;
+static int __pyx_v_6pyfftw_6pyfftw__simd_alignment;
+static PyObject *__pyx_v_6pyfftw_6pyfftw_directions = 0;
+static PyObject *__pyx_v_6pyfftw_6pyfftw_flag_dict = 0;
+static __pyx_t_6pyfftw_6pyfftw_fftw_generic_plan_guru __pyx_v_6pyfftw_6pyfftw_planners[9];
+static __pyx_t_6pyfftw_6pyfftw_fftw_generic_execute __pyx_v_6pyfftw_6pyfftw_executors[9];
+static __pyx_t_6pyfftw_6pyfftw_fftw_generic_destroy_plan __pyx_v_6pyfftw_6pyfftw_destroyers[3];
+static __pyx_t_6pyfftw_6pyfftw_fftw_generic_plan_with_nthreads __pyx_v_6pyfftw_6pyfftw_nthreads_plan_setters[3];
+static __pyx_t_6pyfftw_6pyfftw_fftw_generic_set_timelimit __pyx_v_6pyfftw_6pyfftw_set_timelimit_funcs[3];
+static __pyx_t_6pyfftw_6pyfftw_validator __pyx_v_6pyfftw_6pyfftw_validators[2];
+static PyObject *__pyx_v_6pyfftw_6pyfftw_fftw_schemes = 0;
+static PyObject *__pyx_v_6pyfftw_6pyfftw_scheme_directions = 0;
+static PyObject *__pyx_v_6pyfftw_6pyfftw_scheme_functions = 0;
+static PyObject *__pyx_f_6pyfftw_6pyfftw_n_byte_align_empty(PyObject *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyfftw_6pyfftw_n_byte_align_empty *__pyx_optional_args); /*proto*/
+static PyObject *__pyx_f_6pyfftw_6pyfftw_n_byte_align(PyObject *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_6pyfftw_6pyfftw_n_byte_align *__pyx_optional_args); /*proto*/
+static PyObject *__pyx_f_6pyfftw_6pyfftw_is_n_byte_aligned(PyObject *, PyObject *, int __pyx_skip_dispatch); /*proto*/
+static void *__pyx_f_6pyfftw_6pyfftw__fftw_plan_guru_dft(int, fftw_iodim *, int, fftw_iodim *, void *, void *, int, int); /*proto*/
+static void *__pyx_f_6pyfftw_6pyfftw__fftwf_plan_guru_dft(int, fftw_iodim *, int, fftw_iodim *, void *, void *, int, int); /*proto*/
+static void *__pyx_f_6pyfftw_6pyfftw__fftwl_plan_guru_dft(int, fftw_iodim *, int, fftw_iodim *, void *, void *, int, int); /*proto*/
+static void *__pyx_f_6pyfftw_6pyfftw__fftw_plan_guru_dft_r2c(int, fftw_iodim *, int, fftw_iodim *, void *, void *, int, int); /*proto*/
+static void *__pyx_f_6pyfftw_6pyfftw__fftwf_plan_guru_dft_r2c(int, fftw_iodim *, int, fftw_iodim *, void *, void *, int, int); /*proto*/
+static void *__pyx_f_6pyfftw_6pyfftw__fftwl_plan_guru_dft_r2c(int, fftw_iodim *, int, fftw_iodim *, void *, void *, int, int); /*proto*/
+static void *__pyx_f_6pyfftw_6pyfftw__fftw_plan_guru_dft_c2r(int, fftw_iodim *, int, fftw_iodim *, void *, void *, int, int); /*proto*/
+static void *__pyx_f_6pyfftw_6pyfftw__fftwf_plan_guru_dft_c2r(int, fftw_iodim *, int, fftw_iodim *, void *, void *, int, int); /*proto*/
+static void *__pyx_f_6pyfftw_6pyfftw__fftwl_plan_guru_dft_c2r(int, fftw_iodim *, int, fftw_iodim *, void *, void *, int, int); /*proto*/
+static void __pyx_f_6pyfftw_6pyfftw__fftw_execute_dft(void *, void *, void *); /*proto*/
+static void __pyx_f_6pyfftw_6pyfftw__fftwf_execute_dft(void *, void *, void *); /*proto*/
+static void __pyx_f_6pyfftw_6pyfftw__fftwl_execute_dft(void *, void *, void *); /*proto*/
+static void __pyx_f_6pyfftw_6pyfftw__fftw_execute_dft_r2c(void *, void *, void *); /*proto*/
+static void __pyx_f_6pyfftw_6pyfftw__fftwf_execute_dft_r2c(void *, void *, void *); /*proto*/
+static void __pyx_f_6pyfftw_6pyfftw__fftwl_execute_dft_r2c(void *, void *, void *); /*proto*/
+static void __pyx_f_6pyfftw_6pyfftw__fftw_execute_dft_c2r(void *, void *, void *); /*proto*/
+static void __pyx_f_6pyfftw_6pyfftw__fftwf_execute_dft_c2r(void *, void *, void *); /*proto*/
+static void __pyx_f_6pyfftw_6pyfftw__fftwl_execute_dft_c2r(void *, void *, void *); /*proto*/
+static void __pyx_f_6pyfftw_6pyfftw__fftw_destroy_plan(void *); /*proto*/
+static void __pyx_f_6pyfftw_6pyfftw__fftwf_destroy_plan(void *); /*proto*/
+static void __pyx_f_6pyfftw_6pyfftw__fftwl_destroy_plan(void *); /*proto*/
+static __pyx_t_6pyfftw_6pyfftw_fftw_generic_plan_guru *__pyx_f_6pyfftw_6pyfftw__build_planner_list(void); /*proto*/
+static __pyx_t_6pyfftw_6pyfftw_fftw_generic_execute *__pyx_f_6pyfftw_6pyfftw__build_executor_list(void); /*proto*/
+static __pyx_t_6pyfftw_6pyfftw_fftw_generic_destroy_plan *__pyx_f_6pyfftw_6pyfftw__build_destroyer_list(void); /*proto*/
+static __pyx_t_6pyfftw_6pyfftw_fftw_generic_plan_with_nthreads *__pyx_f_6pyfftw_6pyfftw__build_nthreads_plan_setters_list(void); /*proto*/
+static __pyx_t_6pyfftw_6pyfftw_fftw_generic_set_timelimit *__pyx_f_6pyfftw_6pyfftw__build_set_timelimit_funcs_list(void); /*proto*/
+static __pyx_t_6pyfftw_6pyfftw_validator *__pyx_f_6pyfftw_6pyfftw__build_validators_list(void); /*proto*/
+static int __pyx_f_6pyfftw_6pyfftw__validate_r2c_arrays(PyArrayObject *, PyArrayObject *, int64_t *, int64_t *, int64_t); /*proto*/
+static int __pyx_f_6pyfftw_6pyfftw__validate_c2r_arrays(PyArrayObject *, PyArrayObject *, int64_t *, int64_t *, int64_t); /*proto*/
+static void __pyx_f_6pyfftw_6pyfftw__cleanup(void); /*proto*/
+static void __pyx_f_6pyfftw_6pyfftw_make_axes_unique(int64_t *, int64_t, int64_t **, int64_t **, int64_t, int64_t *); /*proto*/
+static void __pyx_f_6pyfftw_6pyfftw_count_char(char, void *); /*proto*/
+static void __pyx_f_6pyfftw_6pyfftw_write_char_to_string(char, void *); /*proto*/
+#define __Pyx_MODULE_NAME "pyfftw.pyfftw"
+int __pyx_module_is_main_pyfftw__pyfftw = 0;
+
+/* Implementation of 'pyfftw.pyfftw' */
+static PyObject *__pyx_builtin_property;
+static PyObject *__pyx_builtin_TypeError;
+static PyObject *__pyx_builtin_range;
+static PyObject *__pyx_builtin_ValueError;
+static PyObject *__pyx_builtin_KeyError;
+static PyObject *__pyx_builtin_IndexError;
+static PyObject *__pyx_builtin_MemoryError;
+static PyObject *__pyx_builtin_RuntimeError;
+static PyObject *__pyx_pf_6pyfftw_6pyfftw_n_byte_align_empty(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_shape, PyObject *__pyx_v_n, PyObject *__pyx_v_dtype, PyObject *__pyx_v_order); /* proto */
+static PyObject *__pyx_pf_6pyfftw_6pyfftw_2n_byte_align(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_array, PyObject *__pyx_v_n, PyObject *__pyx_v_dtype); /* proto */
+static PyObject *__pyx_pf_6pyfftw_6pyfftw_4is_n_byte_aligned(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_array, PyObject *__pyx_v_n); /* proto */
+static PyObject *__pyx_pf_6pyfftw_6pyfftw_6_lookup_shape_r2c_arrays(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_input_array, CYTHON_UNUSED PyObject *__pyx_v_output_array); /* proto */
+static PyObject *__pyx_pf_6pyfftw_6pyfftw_8_lookup_shape_c2r_arrays(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_input_array, PyObject *__pyx_v_output_array); /* proto */
+static PyObject *__pyx_pf_6pyfftw_6pyfftw_4FFTW___get_N(struct __pyx_obj_6pyfftw_6pyfftw_FFTW *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_6pyfftw_6pyfftw_4FFTW_2__get_simd_aligned(struct __pyx_obj_6pyfftw_6pyfftw_FFTW *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_6pyfftw_6pyfftw_4FFTW_4__get_input_alignment(struct __pyx_obj_6pyfftw_6pyfftw_FFTW *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_6pyfftw_6pyfftw_4FFTW_6__get_output_alignment(struct __pyx_obj_6pyfftw_6pyfftw_FFTW *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_6pyfftw_6pyfftw_4FFTW_8__get_flags_used(struct __pyx_obj_6pyfftw_6pyfftw_FFTW *__pyx_v_self); /* proto */
+static int __pyx_pf_6pyfftw_6pyfftw_4FFTW_10__cinit__(struct __pyx_obj_6pyfftw_6pyfftw_FFTW *__pyx_v_self, PyObject *__pyx_v_input_array, PyObject *__pyx_v_output_array, PyObject *__pyx_v_axes, PyObject *__pyx_v_direction, PyObject *__pyx_v_flags, unsigned int __pyx_v_threads, PyObject *__pyx_v_planning_timelimit, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
+static int __pyx_pf_6pyfftw_6pyfftw_4FFTW_12__init__(CYTHON_UNUSED struct __pyx_obj_6pyfftw_6pyfftw_FFTW *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_input_array, CYTHON_UNUSED PyObject *__pyx_v_output_array, CYTHON_UNUSED PyObject *__pyx_v_axes, CYTHON_UNUSED PyObject *__pyx_v_direction, CYTHON_UNUSED PyObject *__pyx_v_flags, CYTHON_UNUSED int __pyx_v_threads, CYTHON_UNUSED PyObject *__pyx_v_planning_timelimit, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwar [...]
+static void __pyx_pf_6pyfftw_6pyfftw_4FFTW_14__dealloc__(struct __pyx_obj_6pyfftw_6pyfftw_FFTW *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_6pyfftw_6pyfftw_4FFTW_16__call__(struct __pyx_obj_6pyfftw_6pyfftw_FFTW *__pyx_v_self, PyObject *__pyx_v_input_array, PyObject *__pyx_v_output_array, PyObject *__pyx_v_normalise_idft); /* proto */
+static PyObject *__pyx_pf_6pyfftw_6pyfftw_4FFTW_18update_arrays(struct __pyx_obj_6pyfftw_6pyfftw_FFTW *__pyx_v_self, PyObject *__pyx_v_new_input_array, PyObject *__pyx_v_new_output_array); /* proto */
+static PyObject *__pyx_pf_6pyfftw_6pyfftw_4FFTW_20get_input_array(struct __pyx_obj_6pyfftw_6pyfftw_FFTW *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_6pyfftw_6pyfftw_4FFTW_22get_output_array(struct __pyx_obj_6pyfftw_6pyfftw_FFTW *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_6pyfftw_6pyfftw_4FFTW_24execute(struct __pyx_obj_6pyfftw_6pyfftw_FFTW *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_6pyfftw_6pyfftw_10export_wisdom(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_6pyfftw_6pyfftw_12import_wisdom(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_wisdom); /* proto */
+static PyObject *__pyx_pf_6pyfftw_6pyfftw_14forget_wisdom(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
+static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */
+static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info); /* proto */
+static char __pyx_k_1[] = "Invalid array: n_byte_align requires a subclass of ndarray";
+static char __pyx_k_3[] = "Invalid array: is_n_byte_aligned requires a subclass of ndarray";
+static char __pyx_k_7[] = "Invalid planning timelimit: The planning timelimit needs to be a float.";
+static char __pyx_k_9[] = "Invalid input array: The input array needs to be an instance of numpy.ndarray";
+static char __pyx_k_11[] = "Invalid output array: The output array needs to be an instance of numpy.ndarray";
+static char __pyx_k_13[] = "Invalid scheme: The output array and input array dtypes do not correspond to a valid fftw scheme.";
+static char __pyx_k_15[] = "_valid_simd_alignments";
+static char __pyx_k_16[] = "Invalid input alignment: The input array is expected to lie on a %d byte boundary.";
+static char __pyx_k_17[] = "Invalid output alignment: The output array is expected to lie on a %d byte boundary.";
+static char __pyx_k_18[] = "Invalid direction: The direction is not valid for the scheme. Try setting it explicitly if it is not already.";
+static char __pyx_k_20[] = "Invalid axes: The axes list cannot contain invalid axes.";
+static char __pyx_k_22[] = "Zero length array: The input array should have no zero lengthaxes over which the FFT is to be taken";
+static char __pyx_k_24[] = "Invalid shapes: The output array should be the same shape as the input array for the given array dtypes.";
+static char __pyx_k_26[] = "Invalid shapes: The input array and output array are invalid complementary shapes for their dtypes.";
+static char __pyx_k_28[] = "Invalid flag: ";
+static char __pyx_k_29[] = "'";
+static char __pyx_k_30[] = "' is not a valid planner flag.";
+static char __pyx_k_31[] = "Dimensions of the input array must be ";
+static char __pyx_k_32[] = "less than ";
+static char __pyx_k_33[] = "Strides of the input array must be ";
+static char __pyx_k_34[] = "Dimensions of the output array must be ";
+static char __pyx_k_35[] = "Strides of the output array must be ";
+static char __pyx_k_36[] = "The data has an uncaught error that led ";
+static char __pyx_k_37[] = "to the planner returning NULL. This is a bug.";
+static char __pyx_k_41[] = "Invalid input shape: The new input array should be the same shape as the input array used to instantiate the object.";
+static char __pyx_k_43[] = "Invalid input array: The new input array needs to be an instance of numpy.ndarray";
+static char __pyx_k_45[] = "Invalid output array The new output array needs to be an instance of numpy.ndarray";
+static char __pyx_k_47[] = "Invalid input alignment: The original arrays were %d-byte aligned. It is necessary that the update input array is similarly aligned.";
+static char __pyx_k_48[] = "Invalid output alignment: The original arrays were %d-byte aligned. It is necessary that the update output array is similarly aligned.";
+static char __pyx_k_49[] = "Invalid input dtype: The new input array is not of the same dtype as was originally planned for.";
+static char __pyx_k_51[] = "Invalid output dtype: The new output array is not of the same dtype as was originally planned for.";
+static char __pyx_k_54[] = "Invalid output shape: The new output array should be the same shape as the output array used to instantiate the object.";
+static char __pyx_k_56[] = "Invalid input striding: The strides should be identical for the new input array as for the old.";
+static char __pyx_k_58[] = "Invalid output striding: The strides should be identical for the new output array as for the old.";
+static char __pyx_k_60[] = "ndarray is not C contiguous";
+static char __pyx_k_62[] = "ndarray is not Fortran contiguous";
+static char __pyx_k_64[] = "Non-native byte order not supported";
+static char __pyx_k_66[] = "unknown dtype code in numpy.pxd (%d)";
+static char __pyx_k_67[] = "Format string allocated too short, see comment in numpy.pxd";
+static char __pyx_k_70[] = "Format string allocated too short.";
+static char __pyx_k_76[] = "_lookup_shape_r2c_arrays";
+static char __pyx_k_77[] = "/home/whg21/Projects/github/pyFFTW/pyfftw/pyfftw.pyx";
+static char __pyx_k_78[] = "pyfftw.pyfftw";
+static char __pyx_k_81[] = "_lookup_shape_c2r_arrays";
+static char __pyx_k__B[] = "B";
+static char __pyx_k__C[] = "C";
+static char __pyx_k__H[] = "H";
+static char __pyx_k__I[] = "I";
+static char __pyx_k__L[] = "L";
+static char __pyx_k__N[] = "N";
+static char __pyx_k__O[] = "O";
+static char __pyx_k__Q[] = "Q";
+static char __pyx_k__b[] = "b";
+static char __pyx_k__d[] = "d";
+static char __pyx_k__f[] = "f";
+static char __pyx_k__g[] = "g";
+static char __pyx_k__h[] = "h";
+static char __pyx_k__i[] = "i";
+static char __pyx_k__l[] = "l";
+static char __pyx_k__n[] = "n";
+static char __pyx_k__q[] = "q";
+static char __pyx_k_129[] = "__get_input_alignment";
+static char __pyx_k_130[] = "__get_output_alignment";
+static char __pyx_k__32[] = "32";
+static char __pyx_k__64[] = "64";
+static char __pyx_k__Zd[] = "Zd";
+static char __pyx_k__Zf[] = "Zf";
+static char __pyx_k__Zg[] = "Zg";
+static char __pyx_k__ld[] = "ld";
+static char __pyx_k__np[] = "np";
+static char __pyx_k__c2c[] = "c2c";
+static char __pyx_k__c2r[] = "c2r";
+static char __pyx_k__r2c[] = "r2c";
+static char __pyx_k__axes[] = "axes";
+static char __pyx_k__copy[] = "copy";
+static char __pyx_k__data[] = "data";
+static char __pyx_k__int8[] = "int8";
+static char __pyx_k__type[] = "type";
+static char __pyx_k__view[] = "view";
+static char __pyx_k__array[] = "array";
+static char __pyx_k__dtype[] = "dtype";
+static char __pyx_k__empty[] = "empty";
+static char __pyx_k__flags[] = "flags";
+static char __pyx_k__numpy[] = "numpy";
+static char __pyx_k__order[] = "order";
+static char __pyx_k__range[] = "range";
+static char __pyx_k__shape[] = "shape";
+static char __pyx_k__update[] = "update";
+static char __pyx_k__wisdom[] = "wisdom";
+static char __pyx_k____get_N[] = "__get_N";
+static char __pyx_k__counter[] = "counter";
+static char __pyx_k__execute[] = "execute";
+static char __pyx_k__float32[] = "float32";
+static char __pyx_k__float64[] = "float64";
+static char __pyx_k__integer[] = "integer";
+static char __pyx_k__planner[] = "planner";
+static char __pyx_k__reshape[] = "reshape";
+static char __pyx_k__strides[] = "strides";
+static char __pyx_k__success[] = "success";
+static char __pyx_k__threads[] = "threads";
+static char __pyx_k__KeyError[] = "KeyError";
+static char __pyx_k____main__[] = "__main__";
+static char __pyx_k____test__[] = "__test__";
+static char __pyx_k__c_wisdom[] = "c_wisdom";
+static char __pyx_k__counterf[] = "counterf";
+static char __pyx_k__counterl[] = "counterl";
+static char __pyx_k__executor[] = "executor";
+static char __pyx_k__itemsize[] = "itemsize";
+static char __pyx_k__property[] = "property";
+static char __pyx_k__successf[] = "successf";
+static char __pyx_k__successl[] = "successl";
+static char __pyx_k__TypeError[] = "TypeError";
+static char __pyx_k____class__[] = "__class__";
+static char __pyx_k__alignment[] = "alignment";
+static char __pyx_k__c_wisdomf[] = "c_wisdomf";
+static char __pyx_k__c_wisdoml[] = "c_wisdoml";
+static char __pyx_k__complex64[] = "complex64";
+static char __pyx_k__direction[] = "direction";
+static char __pyx_k__py_wisdom[] = "py_wisdom";
+static char __pyx_k__validator[] = "validator";
+static char __pyx_k__IndexError[] = "IndexError";
+static char __pyx_k__ValueError[] = "ValueError";
+static char __pyx_k___flag_dict[] = "_flag_dict";
+static char __pyx_k__asanyarray[] = "asanyarray";
+static char __pyx_k__complex128[] = "complex128";
+static char __pyx_k__frombuffer[] = "frombuffer";
+static char __pyx_k__longdouble[] = "longdouble";
+static char __pyx_k__py_wisdomf[] = "py_wisdomf";
+static char __pyx_k__py_wisdoml[] = "py_wisdoml";
+static char __pyx_k__MemoryError[] = "MemoryError";
+static char __pyx_k__clongdouble[] = "clongdouble";
+static char __pyx_k__input_array[] = "input_array";
+static char __pyx_k__FFTW_FORWARD[] = "FFTW_FORWARD";
+static char __pyx_k__FFTW_MEASURE[] = "FFTW_MEASURE";
+static char __pyx_k__FFTW_PATIENT[] = "FFTW_PATIENT";
+static char __pyx_k__RuntimeError[] = "RuntimeError";
+static char __pyx_k__c_wisdom_ptr[] = "c_wisdom_ptr";
+static char __pyx_k__output_array[] = "output_array";
+static char __pyx_k__simd_aligned[] = "simd_aligned";
+static char __pyx_k__FFTW_BACKWARD[] = "FFTW_BACKWARD";
+static char __pyx_k__FFTW_ESTIMATE[] = "FFTW_ESTIMATE";
+static char __pyx_k__c_wisdomf_ptr[] = "c_wisdomf_ptr";
+static char __pyx_k__c_wisdoml_ptr[] = "c_wisdoml_ptr";
+static char __pyx_k__export_wisdom[] = "export_wisdom";
+static char __pyx_k__forget_wisdom[] = "forget_wisdom";
+static char __pyx_k__import_wisdom[] = "import_wisdom";
+static char __pyx_k__update_arrays[] = "update_arrays";
+static char __pyx_k__FFTW_UNALIGNED[] = "FFTW_UNALIGNED";
+static char __pyx_k__normalise_idft[] = "normalise_idft";
+static char __pyx_k__simd_alignment[] = "simd_alignment";
+static char __pyx_k__FFTW_EXHAUSTIVE[] = "FFTW_EXHAUSTIVE";
+static char __pyx_k__input_alignment[] = "input_alignment";
+static char __pyx_k__new_input_array[] = "new_input_array";
+static char __pyx_k____get_flags_used[] = "__get_flags_used";
+static char __pyx_k__fft_shape_lookup[] = "fft_shape_lookup";
+static char __pyx_k__new_output_array[] = "new_output_array";
+static char __pyx_k__output_alignment[] = "output_alignment";
+static char __pyx_k__generic_precision[] = "generic_precision";
+static char __pyx_k__FFTW_DESTROY_INPUT[] = "FFTW_DESTROY_INPUT";
+static char __pyx_k____get_simd_aligned[] = "__get_simd_aligned";
+static char __pyx_k__planning_timelimit[] = "planning_timelimit";
+static PyObject *__pyx_kp_s_1;
+static PyObject *__pyx_kp_s_11;
+static PyObject *__pyx_n_s_129;
+static PyObject *__pyx_kp_s_13;
+static PyObject *__pyx_n_s_130;
+static PyObject *__pyx_n_s_15;
+static PyObject *__pyx_kp_s_16;
+static PyObject *__pyx_kp_s_17;
+static PyObject *__pyx_kp_s_18;
+static PyObject *__pyx_kp_s_20;
+static PyObject *__pyx_kp_s_22;
+static PyObject *__pyx_kp_s_24;
+static PyObject *__pyx_kp_s_26;
+static PyObject *__pyx_kp_s_28;
+static PyObject *__pyx_kp_s_29;
+static PyObject *__pyx_kp_s_3;
+static PyObject *__pyx_kp_s_30;
+static PyObject *__pyx_kp_s_31;
+static PyObject *__pyx_kp_s_32;
+static PyObject *__pyx_kp_s_33;
+static PyObject *__pyx_kp_s_34;
+static PyObject *__pyx_kp_s_35;
+static PyObject *__pyx_kp_s_36;
+static PyObject *__pyx_kp_s_37;
+static PyObject *__pyx_kp_s_41;
+static PyObject *__pyx_kp_s_43;
+static PyObject *__pyx_kp_s_45;
+static PyObject *__pyx_kp_s_47;
+static PyObject *__pyx_kp_s_48;
+static PyObject *__pyx_kp_s_49;
+static PyObject *__pyx_kp_s_51;
+static PyObject *__pyx_kp_s_54;
+static PyObject *__pyx_kp_s_56;
+static PyObject *__pyx_kp_s_58;
+static PyObject *__pyx_kp_u_60;
+static PyObject *__pyx_kp_u_62;
+static PyObject *__pyx_kp_u_64;
+static PyObject *__pyx_kp_u_66;
+static PyObject *__pyx_kp_u_67;
+static PyObject *__pyx_kp_s_7;
+static PyObject *__pyx_kp_u_70;
+static PyObject *__pyx_n_s_76;
+static PyObject *__pyx_kp_s_77;
+static PyObject *__pyx_n_s_78;
+static PyObject *__pyx_n_s_81;
+static PyObject *__pyx_kp_s_9;
+static PyObject *__pyx_kp_s__32;
+static PyObject *__pyx_kp_s__64;
+static PyObject *__pyx_n_s__C;
+static PyObject *__pyx_n_s__FFTW_BACKWARD;
+static PyObject *__pyx_n_s__FFTW_DESTROY_INPUT;
+static PyObject *__pyx_n_s__FFTW_ESTIMATE;
+static PyObject *__pyx_n_s__FFTW_EXHAUSTIVE;
+static PyObject *__pyx_n_s__FFTW_FORWARD;
+static PyObject *__pyx_n_s__FFTW_MEASURE;
+static PyObject *__pyx_n_s__FFTW_PATIENT;
+static PyObject *__pyx_n_s__FFTW_UNALIGNED;
+static PyObject *__pyx_n_s__IndexError;
+static PyObject *__pyx_n_s__KeyError;
+static PyObject *__pyx_n_s__MemoryError;
+static PyObject *__pyx_n_s__N;
+static PyObject *__pyx_n_s__RuntimeError;
+static PyObject *__pyx_n_s__TypeError;
+static PyObject *__pyx_n_s__ValueError;
+static PyObject *__pyx_n_s____class__;
+static PyObject *__pyx_n_s____get_N;
+static PyObject *__pyx_n_s____get_flags_used;
+static PyObject *__pyx_n_s____get_simd_aligned;
+static PyObject *__pyx_n_s____main__;
+static PyObject *__pyx_n_s____test__;
+static PyObject *__pyx_n_s___flag_dict;
+static PyObject *__pyx_n_s__alignment;
+static PyObject *__pyx_n_s__array;
+static PyObject *__pyx_n_s__asanyarray;
+static PyObject *__pyx_n_s__axes;
+static PyObject *__pyx_n_s__c2c;
+static PyObject *__pyx_n_s__c2r;
+static PyObject *__pyx_n_s__c_wisdom;
+static PyObject *__pyx_n_s__c_wisdom_ptr;
+static PyObject *__pyx_n_s__c_wisdomf;
+static PyObject *__pyx_n_s__c_wisdomf_ptr;
+static PyObject *__pyx_n_s__c_wisdoml;
+static PyObject *__pyx_n_s__c_wisdoml_ptr;
+static PyObject *__pyx_n_s__clongdouble;
+static PyObject *__pyx_n_s__complex128;
+static PyObject *__pyx_n_s__complex64;
+static PyObject *__pyx_n_s__copy;
+static PyObject *__pyx_n_s__counter;
+static PyObject *__pyx_n_s__counterf;
+static PyObject *__pyx_n_s__counterl;
+static PyObject *__pyx_n_s__data;
+static PyObject *__pyx_n_s__direction;
+static PyObject *__pyx_n_s__dtype;
+static PyObject *__pyx_n_s__empty;
+static PyObject *__pyx_n_s__execute;
+static PyObject *__pyx_n_s__executor;
+static PyObject *__pyx_n_s__export_wisdom;
+static PyObject *__pyx_n_s__fft_shape_lookup;
+static PyObject *__pyx_n_s__flags;
+static PyObject *__pyx_n_s__float32;
+static PyObject *__pyx_n_s__float64;
+static PyObject *__pyx_n_s__forget_wisdom;
+static PyObject *__pyx_n_s__frombuffer;
+static PyObject *__pyx_n_s__generic_precision;
+static PyObject *__pyx_n_s__import_wisdom;
+static PyObject *__pyx_n_s__input_alignment;
+static PyObject *__pyx_n_s__input_array;
+static PyObject *__pyx_n_s__int8;
+static PyObject *__pyx_n_s__integer;
+static PyObject *__pyx_n_s__itemsize;
+static PyObject *__pyx_n_s__ld;
+static PyObject *__pyx_n_s__longdouble;
+static PyObject *__pyx_n_s__n;
+static PyObject *__pyx_n_s__new_input_array;
+static PyObject *__pyx_n_s__new_output_array;
+static PyObject *__pyx_n_s__normalise_idft;
+static PyObject *__pyx_n_s__np;
+static PyObject *__pyx_n_s__numpy;
+static PyObject *__pyx_n_s__order;
+static PyObject *__pyx_n_s__output_alignment;
+static PyObject *__pyx_n_s__output_array;
+static PyObject *__pyx_n_s__planner;
+static PyObject *__pyx_n_s__planning_timelimit;
+static PyObject *__pyx_n_s__property;
+static PyObject *__pyx_n_s__py_wisdom;
+static PyObject *__pyx_n_s__py_wisdomf;
+static PyObject *__pyx_n_s__py_wisdoml;
+static PyObject *__pyx_n_s__r2c;
+static PyObject *__pyx_n_s__range;
+static PyObject *__pyx_n_s__reshape;
+static PyObject *__pyx_n_s__shape;
+static PyObject *__pyx_n_s__simd_aligned;
+static PyObject *__pyx_n_s__simd_alignment;
+static PyObject *__pyx_n_s__strides;
+static PyObject *__pyx_n_s__success;
+static PyObject *__pyx_n_s__successf;
+static PyObject *__pyx_n_s__successl;
+static PyObject *__pyx_n_s__threads;
+static PyObject *__pyx_n_s__type;
+static PyObject *__pyx_n_s__update;
+static PyObject *__pyx_n_s__update_arrays;
+static PyObject *__pyx_n_s__validator;
+static PyObject *__pyx_n_s__view;
+static PyObject *__pyx_n_s__wisdom;
+static PyObject *__pyx_int_0;
+static PyObject *__pyx_int_1;
+static PyObject *__pyx_int_2;
+static PyObject *__pyx_int_3;
+static PyObject *__pyx_int_4;
+static PyObject *__pyx_int_5;
+static PyObject *__pyx_int_6;
+static PyObject *__pyx_int_7;
+static PyObject *__pyx_int_8;
+static PyObject *__pyx_int_neg_1;
+static PyObject *__pyx_int_15;
+static PyObject *__pyx_int_16;
+static PyObject *__pyx_int_32;
+static PyObject *__pyx_k_40;
+static PyObject *__pyx_k_tuple_2;
+static PyObject *__pyx_k_tuple_4;
+static PyObject *__pyx_k_tuple_5;
+static PyObject *__pyx_k_tuple_6;
+static PyObject *__pyx_k_tuple_8;
+static PyObject *__pyx_k_tuple_10;
+static PyObject *__pyx_k_tuple_12;
+static PyObject *__pyx_k_tuple_14;
+static PyObject *__pyx_k_tuple_19;
+static PyObject *__pyx_k_tuple_21;
+static PyObject *__pyx_k_tuple_23;
+static PyObject *__pyx_k_tuple_25;
+static PyObject *__pyx_k_tuple_27;
+static PyObject *__pyx_k_tuple_38;
+static PyObject *__pyx_k_tuple_39;
+static PyObject *__pyx_k_tuple_42;
+static PyObject *__pyx_k_tuple_44;
+static PyObject *__pyx_k_tuple_46;
+static PyObject *__pyx_k_tuple_50;
+static PyObject *__pyx_k_tuple_52;
+static PyObject *__pyx_k_tuple_53;
+static PyObject *__pyx_k_tuple_55;
+static PyObject *__pyx_k_tuple_57;
+static PyObject *__pyx_k_tuple_59;
+static PyObject *__pyx_k_tuple_61;
+static PyObject *__pyx_k_tuple_63;
+static PyObject *__pyx_k_tuple_65;
+static PyObject *__pyx_k_tuple_68;
+static PyObject *__pyx_k_tuple_69;
+static PyObject *__pyx_k_tuple_71;
+static PyObject *__pyx_k_tuple_72;
+static PyObject *__pyx_k_tuple_73;
+static PyObject *__pyx_k_tuple_74;
+static PyObject *__pyx_k_tuple_79;
+static PyObject *__pyx_k_tuple_82;
+static PyObject *__pyx_k_tuple_83;
+static PyObject *__pyx_k_tuple_84;
+static PyObject *__pyx_k_tuple_85;
+static PyObject *__pyx_k_tuple_86;
+static PyObject *__pyx_k_tuple_87;
+static PyObject *__pyx_k_tuple_88;
+static PyObject *__pyx_k_tuple_89;
+static PyObject *__pyx_k_tuple_90;
+static PyObject *__pyx_k_tuple_91;
+static PyObject *__pyx_k_tuple_92;
+static PyObject *__pyx_k_tuple_93;
+static PyObject *__pyx_k_tuple_94;
+static PyObject *__pyx_k_tuple_95;
+static PyObject *__pyx_k_tuple_96;
+static PyObject *__pyx_k_tuple_97;
+static PyObject *__pyx_k_tuple_98;
+static PyObject *__pyx_k_tuple_99;
+static PyObject *__pyx_k_tuple_100;
+static PyObject *__pyx_k_tuple_101;
+static PyObject *__pyx_k_tuple_102;
+static PyObject *__pyx_k_tuple_103;
+static PyObject *__pyx_k_tuple_104;
+static PyObject *__pyx_k_tuple_105;
+static PyObject *__pyx_k_tuple_106;
+static PyObject *__pyx_k_tuple_107;
+static PyObject *__pyx_k_tuple_108;
+static PyObject *__pyx_k_tuple_109;
+static PyObject *__pyx_k_tuple_110;
+static PyObject *__pyx_k_tuple_111;
+static PyObject *__pyx_k_tuple_112;
+static PyObject *__pyx_k_tuple_113;
+static PyObject *__pyx_k_tuple_114;
+static PyObject *__pyx_k_tuple_115;
+static PyObject *__pyx_k_tuple_116;
+static PyObject *__pyx_k_tuple_117;
+static PyObject *__pyx_k_tuple_118;
+static PyObject *__pyx_k_tuple_119;
+static PyObject *__pyx_k_tuple_120;
+static PyObject *__pyx_k_tuple_121;
+static PyObject *__pyx_k_tuple_122;
+static PyObject *__pyx_k_tuple_123;
+static PyObject *__pyx_k_tuple_124;
+static PyObject *__pyx_k_tuple_125;
+static PyObject *__pyx_k_tuple_126;
+static PyObject *__pyx_k_tuple_127;
+static PyObject *__pyx_k_tuple_128;
+static PyObject *__pyx_k_tuple_131;
+static PyObject *__pyx_k_tuple_133;
+static PyObject *__pyx_k_codeobj_75;
+static PyObject *__pyx_k_codeobj_80;
+static PyObject *__pyx_k_codeobj_132;
+static PyObject *__pyx_k_codeobj_134;
+static PyObject *__pyx_k_codeobj_135;
+
+/* "/home/whg21/Projects/github/pyFFTW/pyfftw/utils.pxi":39
+ *     _valid_simd_alignments = ()
+ * 
+ * cpdef n_byte_align_empty(shape, n, dtype='float64', order='C'):             # <<<<<<<<<<<<<<
+ *     '''n_byte_align_empty(shape, n, dtype='float64', order='C')
+ * 
+ */
+
+static PyObject *__pyx_pw_6pyfftw_6pyfftw_1n_byte_align_empty(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyObject *__pyx_f_6pyfftw_6pyfftw_n_byte_align_empty(PyObject *__pyx_v_shape, PyObject *__pyx_v_n, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_6pyfftw_6pyfftw_n_byte_align_empty *__pyx_optional_args) {
+  PyObject *__pyx_v_dtype = ((PyObject *)__pyx_n_s__float64);
+  PyObject *__pyx_v_order = ((PyObject *)__pyx_n_s__C);
+  PyObject *__pyx_v_itemsize = NULL;
+  PyObject *__pyx_v_array_length = NULL;
+  PyObject *__pyx_v_each_dimension = NULL;
+  PyObject *__pyx_v__array_aligned = NULL;
+  PyObject *__pyx_v__array_aligned_offset = NULL;
+  PyObject *__pyx_v_array = NULL;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  int __pyx_t_3;
+  int __pyx_t_4;
+  Py_ssize_t __pyx_t_5;
+  PyObject *(*__pyx_t_6)(PyObject *);
+  PyObject *__pyx_t_7 = NULL;
+  PyObject *__pyx_t_8 = NULL;
+  Py_ssize_t __pyx_t_9;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("n_byte_align_empty", 0);
+  if (__pyx_optional_args) {
+    if (__pyx_optional_args->__pyx_n > 0) {
+      __pyx_v_dtype = __pyx_optional_args->dtype;
+      if (__pyx_optional_args->__pyx_n > 1) {
+        __pyx_v_order = __pyx_optional_args->order;
+      }
+    }
+  }
+
+  /* "/home/whg21/Projects/github/pyFFTW/pyfftw/utils.pxi":49
+ *     '''
+ * 
+ *     itemsize = np.dtype(dtype).itemsize             # <<<<<<<<<<<<<<
+ * 
+ *     # Apparently there is an issue with numpy.prod wrapping around on 32-bits
+ */
+  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_INCREF(__pyx_v_dtype);
+  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_dtype);
+  __Pyx_GIVEREF(__pyx_v_dtype);
+  __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5numpy_dtype)), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
+  __pyx_t_1 = PyInt_FromLong(((PyArray_Descr *)__pyx_t_2)->elsize); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_v_itemsize = __pyx_t_1;
+  __pyx_t_1 = 0;
+
+  /* "/home/whg21/Projects/github/pyFFTW/pyfftw/utils.pxi":54
+ *     # on Windows 64-bit. This shouldn't happen, but the following code
+ *     # alleviates the problem.
+ *     if not isinstance(shape, (int, np.integer)):             # <<<<<<<<<<<<<<
+ *         array_length = 1
+ *         for each_dimension in shape:
+ */
+  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__integer); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_INCREF(((PyObject *)((PyObject*)(&PyInt_Type))));
+  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)((PyObject*)(&PyInt_Type))));
+  __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyInt_Type))));
+  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
+  __Pyx_GIVEREF(__pyx_t_2);
+  __pyx_t_2 = 0;
+  __pyx_t_3 = PyObject_IsInstance(__pyx_v_shape, ((PyObject *)__pyx_t_1)); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
+  __pyx_t_4 = (!__pyx_t_3);
+  if (__pyx_t_4) {
+
+    /* "/home/whg21/Projects/github/pyFFTW/pyfftw/utils.pxi":55
+ *     # alleviates the problem.
+ *     if not isinstance(shape, (int, np.integer)):
+ *         array_length = 1             # <<<<<<<<<<<<<<
+ *         for each_dimension in shape:
+ *             array_length *= each_dimension
+ */
+    __Pyx_INCREF(__pyx_int_1);
+    __pyx_v_array_length = __pyx_int_1;
+
+    /* "/home/whg21/Projects/github/pyFFTW/pyfftw/utils.pxi":56
+ *     if not isinstance(shape, (int, np.integer)):
+ *         array_length = 1
+ *         for each_dimension in shape:             # <<<<<<<<<<<<<<
+ *             array_length *= each_dimension
+ * 
+ */
+    if (PyList_CheckExact(__pyx_v_shape) || PyTuple_CheckExact(__pyx_v_shape)) {
+      __pyx_t_1 = __pyx_v_shape; __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = 0;
+      __pyx_t_6 = NULL;
+    } else {
+      __pyx_t_5 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_t_6 = Py_TYPE(__pyx_t_1)->tp_iternext;
+    }
+    for (;;) {
+      if (!__pyx_t_6 && PyList_CheckExact(__pyx_t_1)) {
+        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_1)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      } else if (!__pyx_t_6 && PyTuple_CheckExact(__pyx_t_1)) {
+        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      } else {
+        __pyx_t_2 = __pyx_t_6(__pyx_t_1);
+        if (unlikely(!__pyx_t_2)) {
+          if (PyErr_Occurred()) {
+            if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
+            else {__pyx_filename = __pyx_f[1]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          }
+          break;
+        }
+        __Pyx_GOTREF(__pyx_t_2);
+      }
+      __Pyx_XDECREF(__pyx_v_each_dimension);
+      __pyx_v_each_dimension = __pyx_t_2;
+      __pyx_t_2 = 0;
+
+      /* "/home/whg21/Projects/github/pyFFTW/pyfftw/utils.pxi":57
+ *         array_length = 1
+ *         for each_dimension in shape:
+ *             array_length *= each_dimension             # <<<<<<<<<<<<<<
+ * 
+ *     else:
+ */
+      __pyx_t_2 = PyNumber_InPlaceMultiply(__pyx_v_array_length, __pyx_v_each_dimension); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __Pyx_DECREF(__pyx_v_array_length);
+      __pyx_v_array_length = __pyx_t_2;
+      __pyx_t_2 = 0;
+    }
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    goto __pyx_L3;
+  }
+  /*else*/ {
+
+    /* "/home/whg21/Projects/github/pyFFTW/pyfftw/utils.pxi":60
+ * 
+ *     else:
+ *         array_length = shape             # <<<<<<<<<<<<<<
+ * 
+ *     # Allocate a new array that will contain the aligned data
+ */
+    __Pyx_INCREF(__pyx_v_shape);
+    __pyx_v_array_length = __pyx_v_shape;
+  }
+  __pyx_L3:;
+
+  /* "/home/whg21/Projects/github/pyFFTW/pyfftw/utils.pxi":63
+ * 
+ *     # Allocate a new array that will contain the aligned data
+ *     _array_aligned = np.empty(array_length*itemsize+n, dtype='int8')             # <<<<<<<<<<<<<<
+ * 
+ *     # We now need to know how to offset _array_aligned
+ */
+  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__empty); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_1 = PyNumber_Multiply(__pyx_v_array_length, __pyx_v_itemsize); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_7 = PyNumber_Add(__pyx_t_1, __pyx_v_n); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_7);
+  __Pyx_GIVEREF(__pyx_t_7);
+  __pyx_t_7 = 0;
+  __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_7));
+  if (PyDict_SetItem(__pyx_t_7, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__int8)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_8 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), ((PyObject *)__pyx_t_7)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_8);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
+  __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
+  __pyx_v__array_aligned = __pyx_t_8;
+  __pyx_t_8 = 0;
+
+  /* "/home/whg21/Projects/github/pyFFTW/pyfftw/utils.pxi":67
+ *     # We now need to know how to offset _array_aligned
+ *     # so it is correctly aligned
+ *     _array_aligned_offset = (n-<intptr_t>np.PyArray_DATA(_array_aligned))%n             # <<<<<<<<<<<<<<
+ * 
+ *     array = np.frombuffer(
+ */
+  if (!(likely(((__pyx_v__array_aligned) == Py_None) || likely(__Pyx_TypeTest(__pyx_v__array_aligned, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_8 = __pyx_v__array_aligned;
+  __Pyx_INCREF(__pyx_t_8);
+  __pyx_t_7 = PyInt_FromSsize_t(((intptr_t)PyArray_DATA(((PyArrayObject *)__pyx_t_8)))); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+  __pyx_t_8 = PyNumber_Subtract(__pyx_v_n, __pyx_t_7); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_8);
+  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+  __pyx_t_7 = PyNumber_Remainder(__pyx_t_8, __pyx_v_n); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+  __pyx_v__array_aligned_offset = __pyx_t_7;
+  __pyx_t_7 = 0;
+
+  /* "/home/whg21/Projects/github/pyFFTW/pyfftw/utils.pxi":69
+ *     _array_aligned_offset = (n-<intptr_t>np.PyArray_DATA(_array_aligned))%n
+ * 
+ *     array = np.frombuffer(             # <<<<<<<<<<<<<<
+ *             _array_aligned[_array_aligned_offset:_array_aligned_offset-n].data,
+ *             dtype=dtype).reshape(shape, order=order)
+ */
+  __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+  __pyx_t_8 = PyObject_GetAttr(__pyx_t_7, __pyx_n_s__frombuffer); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_8);
+  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+  /* "/home/whg21/Projects/github/pyFFTW/pyfftw/utils.pxi":70
+ * 
+ *     array = np.frombuffer(
+ *             _array_aligned[_array_aligned_offset:_array_aligned_offset-n].data,             # <<<<<<<<<<<<<<
+ *             dtype=dtype).reshape(shape, order=order)
+ * 
+ */
+  __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_v__array_aligned_offset); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_7 = PyNumber_Subtract(__pyx_v__array_aligned_offset, __pyx_v_n); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+  __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_7); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+  __pyx_t_7 = __Pyx_PySequence_GetSlice(__pyx_v__array_aligned, __pyx_t_5, __pyx_t_9); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+  __pyx_t_1 = PyObject_GetAttr(__pyx_t_7, __pyx_n_s__data); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1);
+  __Pyx_GIVEREF(__pyx_t_1);
+  __pyx_t_1 = 0;
+
+  /* "/home/whg21/Projects/github/pyFFTW/pyfftw/utils.pxi":69
+ *     _array_aligned_offset = (n-<intptr_t>np.PyArray_DATA(_array_aligned))%n
+ * 
+ *     array = np.frombuffer(             # <<<<<<<<<<<<<<
+ *             _array_aligned[_array_aligned_offset:_array_aligned_offset-n].data,
+ *             dtype=dtype).reshape(shape, order=order)
+ */
+  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
+
+  /* "/home/whg21/Projects/github/pyFFTW/pyfftw/utils.pxi":71
+ *     array = np.frombuffer(
+ *             _array_aligned[_array_aligned_offset:_array_aligned_offset-n].data,
+ *             dtype=dtype).reshape(shape, order=order)             # <<<<<<<<<<<<<<
+ * 
+ *     return array
+ */
+  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), __pyx_v_dtype) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_7), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+  __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
+  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
+  __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__reshape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_INCREF(__pyx_v_shape);
+  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_shape);
+  __Pyx_GIVEREF(__pyx_v_shape);
+  __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_7));
+  if (PyDict_SetItem(__pyx_t_7, ((PyObject *)__pyx_n_s__order), __pyx_v_order) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_8 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_7)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_8);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+  __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
+  __pyx_v_array = __pyx_t_8;
+  __pyx_t_8 = 0;
+
+  /* "/home/whg21/Projects/github/pyFFTW/pyfftw/utils.pxi":73
+ *             dtype=dtype).reshape(shape, order=order)
+ * 
+ *     return array             # <<<<<<<<<<<<<<
+ * 
+ * cpdef n_byte_align(array, n, dtype=None):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(__pyx_v_array);
+  __pyx_r = __pyx_v_array;
+  goto __pyx_L0;
+
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_7);
+  __Pyx_XDECREF(__pyx_t_8);
+  __Pyx_AddTraceback("pyfftw.pyfftw.n_byte_align_empty", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = 0;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_itemsize);
+  __Pyx_XDECREF(__pyx_v_array_length);
+  __Pyx_XDECREF(__pyx_v_each_dimension);
+  __Pyx_XDECREF(__pyx_v__array_aligned);
+  __Pyx_XDECREF(__pyx_v__array_aligned_offset);
+  __Pyx_XDECREF(__pyx_v_array);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static PyObject *__pyx_pw_6pyfftw_6pyfftw_1n_byte_align_empty(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_6pyfftw_6pyfftw_n_byte_align_empty[] = "n_byte_align_empty(shape, n, dtype='float64', order='C')\n\n    Function that returns an empty numpy array\n    that is n-byte aligned.\n\n    The alignment is given by the second argument, ``n``.\n    The rest of the arguments are as per :func:`numpy.empty`.\n    ";
+static PyObject *__pyx_pw_6pyfftw_6pyfftw_1n_byte_align_empty(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  PyObject *__pyx_v_shape = 0;
+  PyObject *__pyx_v_n = 0;
+  PyObject *__pyx_v_dtype = 0;
+  PyObject *__pyx_v_order = 0;
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("n_byte_align_empty (wrapper)", 0);
+  {
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__shape,&__pyx_n_s__n,&__pyx_n_s__dtype,&__pyx_n_s__order,0};
+    PyObject* values[4] = {0,0,0,0};
+    values[2] = ((PyObject *)__pyx_n_s__float64);
+    values[3] = ((PyObject *)__pyx_n_s__C);
+    if (unlikely(__pyx_kwds)) {
+      Py_ssize_t kw_args;
+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+      switch (pos_args) {
+        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        case  0: break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+      kw_args = PyDict_Size(__pyx_kwds);
+      switch (pos_args) {
+        case  0:
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__shape)) != 0)) kw_args--;
+        else goto __pyx_L5_argtuple_error;
+        case  1:
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__n)) != 0)) kw_args--;
+        else {
+          __Pyx_RaiseArgtupleInvalid("n_byte_align_empty", 0, 2, 4, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        }
+        case  2:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__dtype);
+          if (value) { values[2] = value; kw_args--; }
+        }
+        case  3:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__order);
+          if (value) { values[3] = value; kw_args--; }
+        }
+      }
+      if (unlikely(kw_args > 0)) {
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "n_byte_align_empty") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      }
+    } else {
+      switch (PyTuple_GET_SIZE(__pyx_args)) {
+        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+    }
+    __pyx_v_shape = values[0];
+    __pyx_v_n = values[1];
+    __pyx_v_dtype = values[2];
+    __pyx_v_order = values[3];
+  }
+  goto __pyx_L4_argument_unpacking_done;
+  __pyx_L5_argtuple_error:;
+  __Pyx_RaiseArgtupleInvalid("n_byte_align_empty", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_AddTraceback("pyfftw.pyfftw.n_byte_align_empty", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_RefNannyFinishContext();
+  return NULL;
+  __pyx_L4_argument_unpacking_done:;
+  __pyx_r = __pyx_pf_6pyfftw_6pyfftw_n_byte_align_empty(__pyx_self, __pyx_v_shape, __pyx_v_n, __pyx_v_dtype, __pyx_v_order);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "/home/whg21/Projects/github/pyFFTW/pyfftw/utils.pxi":39
+ *     _valid_simd_alignments = ()
+ * 
+ * cpdef n_byte_align_empty(shape, n, dtype='float64', order='C'):             # <<<<<<<<<<<<<<
+ *     '''n_byte_align_empty(shape, n, dtype='float64', order='C')
+ * 
+ */
+
+static PyObject *__pyx_pf_6pyfftw_6pyfftw_n_byte_align_empty(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_shape, PyObject *__pyx_v_n, PyObject *__pyx_v_dtype, PyObject *__pyx_v_order) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  struct __pyx_opt_args_6pyfftw_6pyfftw_n_byte_align_empty __pyx_t_2;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("n_byte_align_empty", 0);
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_2.__pyx_n = 2;
+  __pyx_t_2.dtype = __pyx_v_dtype;
+  __pyx_t_2.order = __pyx_v_order;
+  __pyx_t_1 = __pyx_f_6pyfftw_6pyfftw_n_byte_align_empty(__pyx_v_shape, __pyx_v_n, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("pyfftw.pyfftw.n_byte_align_empty", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "/home/whg21/Projects/github/pyFFTW/pyfftw/utils.pxi":75
+ *     return array
+ * 
+ * cpdef n_byte_align(array, n, dtype=None):             # <<<<<<<<<<<<<<
+ *     ''' n_byte_align(array, n, dtype=None)
+ * 
+ */
+
+static PyObject *__pyx_pw_6pyfftw_6pyfftw_3n_byte_align(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyObject *__pyx_f_6pyfftw_6pyfftw_n_byte_align(PyObject *__pyx_v_array, PyObject *__pyx_v_n, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_6pyfftw_6pyfftw_n_byte_align *__pyx_optional_args) {
+  PyObject *__pyx_v_dtype = ((PyObject *)Py_None);
+  int __pyx_v_update_dtype;
+  PyObject *__pyx_v_offset = NULL;
+  PyObject *__pyx_v__array_aligned = NULL;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_t_2;
+  int __pyx_t_3;
+  PyObject *__pyx_t_4 = NULL;
+  struct __pyx_opt_args_6pyfftw_6pyfftw_n_byte_align_empty __pyx_t_5;
+  PyObject *__pyx_t_6 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("n_byte_align", 0);
+  if (__pyx_optional_args) {
+    if (__pyx_optional_args->__pyx_n > 0) {
+      __pyx_v_dtype = __pyx_optional_args->dtype;
+    }
+  }
+  __Pyx_INCREF(__pyx_v_array);
+  __Pyx_INCREF(__pyx_v_dtype);
+
+  /* "/home/whg21/Projects/github/pyFFTW/pyfftw/utils.pxi":87
+ *     '''
+ * 
+ *     if not isinstance(array, np.ndarray):             # <<<<<<<<<<<<<<
+ *         raise TypeError('Invalid array: n_byte_align requires a subclass '
+ *                 'of ndarray')
+ */
+  __pyx_t_1 = ((PyObject *)((PyObject*)__pyx_ptype_5numpy_ndarray));
+  __Pyx_INCREF(__pyx_t_1);
+  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_array, __pyx_t_1); 
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_3 = (!__pyx_t_2);
+  if (__pyx_t_3) {
+
+    /* "/home/whg21/Projects/github/pyFFTW/pyfftw/utils.pxi":88
+ * 
+ *     if not isinstance(array, np.ndarray):
+ *         raise TypeError('Invalid array: n_byte_align requires a subclass '             # <<<<<<<<<<<<<<
+ *                 'of ndarray')
+ * 
+ */
+    __pyx_t_1 = PyObject_Call(__pyx_builtin_TypeError, ((PyObject *)__pyx_k_tuple_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    {__pyx_filename = __pyx_f[1]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    goto __pyx_L3;
+  }
+  __pyx_L3:;
+
+  /* "/home/whg21/Projects/github/pyFFTW/pyfftw/utils.pxi":91
+ *                 'of ndarray')
+ * 
+ *     if dtype is not None:             # <<<<<<<<<<<<<<
+ *         if not array.dtype == dtype:
+ *             update_dtype = True
+ */
+  __pyx_t_3 = (__pyx_v_dtype != Py_None);
+  if (__pyx_t_3) {
+
+    /* "/home/whg21/Projects/github/pyFFTW/pyfftw/utils.pxi":92
+ * 
+ *     if dtype is not None:
+ *         if not array.dtype == dtype:             # <<<<<<<<<<<<<<
+ *             update_dtype = True
+ * 
+ */
+    __pyx_t_1 = PyObject_GetAttr(__pyx_v_array, __pyx_n_s__dtype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_v_dtype, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __pyx_t_2 = (!__pyx_t_3);
+    if (__pyx_t_2) {
+
+      /* "/home/whg21/Projects/github/pyFFTW/pyfftw/utils.pxi":93
+ *     if dtype is not None:
+ *         if not array.dtype == dtype:
+ *             update_dtype = True             # <<<<<<<<<<<<<<
+ * 
+ *     else:
+ */
+      __pyx_v_update_dtype = 1;
+      goto __pyx_L5;
+    }
+    __pyx_L5:;
+    goto __pyx_L4;
+  }
+  /*else*/ {
+
+    /* "/home/whg21/Projects/github/pyFFTW/pyfftw/utils.pxi":96
+ * 
+ *     else:
+ *         dtype = array.dtype             # <<<<<<<<<<<<<<
+ *         update_dtype = False
+ * 
+ */
+    __pyx_t_4 = PyObject_GetAttr(__pyx_v_array, __pyx_n_s__dtype); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_DECREF(__pyx_v_dtype);
+    __pyx_v_dtype = __pyx_t_4;
+    __pyx_t_4 = 0;
+
+    /* "/home/whg21/Projects/github/pyFFTW/pyfftw/utils.pxi":97
+ *     else:
+ *         dtype = array.dtype
+ *         update_dtype = False             # <<<<<<<<<<<<<<
+ * 
+ *     # See if we're already n byte aligned. If so, do nothing.
+ */
+    __pyx_v_update_dtype = 0;
+  }
+  __pyx_L4:;
+
+  /* "/home/whg21/Projects/github/pyFFTW/pyfftw/utils.pxi":100
+ * 
+ *     # See if we're already n byte aligned. If so, do nothing.
+ *     offset = <intptr_t>np.PyArray_DATA(array) %n             # <<<<<<<<<<<<<<
+ * 
+ *     if offset is not 0 or update_dtype:
+ */
+  if (!(likely(((__pyx_v_array) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_array, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_4 = __pyx_v_array;
+  __Pyx_INCREF(__pyx_t_4);
+  __pyx_t_1 = PyInt_FromSsize_t(((intptr_t)PyArray_DATA(((PyArrayObject *)__pyx_t_4)))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  __pyx_t_4 = PyNumber_Remainder(__pyx_t_1, __pyx_v_n); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_v_offset = __pyx_t_4;
+  __pyx_t_4 = 0;
+
+  /* "/home/whg21/Projects/github/pyFFTW/pyfftw/utils.pxi":102
+ *     offset = <intptr_t>np.PyArray_DATA(array) %n
+ * 
+ *     if offset is not 0 or update_dtype:             # <<<<<<<<<<<<<<
+ * 
+ *         _array_aligned = n_byte_align_empty(array.shape, n, dtype)
+ */
+  __pyx_t_2 = (__pyx_v_offset != __pyx_int_0);
+  if (!__pyx_t_2) {
+    __pyx_t_3 = __pyx_v_update_dtype;
+  } else {
+    __pyx_t_3 = __pyx_t_2;
+  }
+  if (__pyx_t_3) {
+
+    /* "/home/whg21/Projects/github/pyFFTW/pyfftw/utils.pxi":104
+ *     if offset is not 0 or update_dtype:
+ * 
+ *         _array_aligned = n_byte_align_empty(array.shape, n, dtype)             # <<<<<<<<<<<<<<
+ * 
+ *         _array_aligned[:] = array
+ */
+    __pyx_t_4 = PyObject_GetAttr(__pyx_v_array, __pyx_n_s__shape); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_5.__pyx_n = 1;
+    __pyx_t_5.dtype = __pyx_v_dtype;
+    __pyx_t_1 = __pyx_f_6pyfftw_6pyfftw_n_byte_align_empty(__pyx_t_4, __pyx_v_n, 0, &__pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __pyx_v__array_aligned = __pyx_t_1;
+    __pyx_t_1 = 0;
+
+    /* "/home/whg21/Projects/github/pyFFTW/pyfftw/utils.pxi":106
+ *         _array_aligned = n_byte_align_empty(array.shape, n, dtype)
+ * 
+ *         _array_aligned[:] = array             # <<<<<<<<<<<<<<
+ * 
+ *         array = _array_aligned.view(type=array.__class__)
+ */
+    if (__Pyx_PySequence_SetSlice(__pyx_v__array_aligned, 0, PY_SSIZE_T_MAX, __pyx_v_array) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+    /* "/home/whg21/Projects/github/pyFFTW/pyfftw/utils.pxi":108
+ *         _array_aligned[:] = array
+ * 
+ *         array = _array_aligned.view(type=array.__class__)             # <<<<<<<<<<<<<<
+ * 
+ *     return array
+ */
+    __pyx_t_1 = PyObject_GetAttr(__pyx_v__array_aligned, __pyx_n_s__view); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(((PyObject *)__pyx_t_4));
+    __pyx_t_6 = PyObject_GetAttr(__pyx_v_array, __pyx_n_s____class__); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__type), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    __pyx_t_6 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
+    __Pyx_DECREF(__pyx_v_array);
+    __pyx_v_array = __pyx_t_6;
+    __pyx_t_6 = 0;
+    goto __pyx_L6;
+  }
+  __pyx_L6:;
+
+  /* "/home/whg21/Projects/github/pyFFTW/pyfftw/utils.pxi":110
+ *         array = _array_aligned.view(type=array.__class__)
+ * 
+ *     return array             # <<<<<<<<<<<<<<
+ * 
+ * cpdef is_n_byte_aligned(array, n):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(__pyx_v_array);
+  __pyx_r = __pyx_v_array;
+  goto __pyx_L0;
+
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_XDECREF(__pyx_t_6);
+  __Pyx_AddTraceback("pyfftw.pyfftw.n_byte_align", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = 0;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_offset);
+  __Pyx_XDECREF(__pyx_v__array_aligned);
+  __Pyx_XDECREF(__pyx_v_array);
+  __Pyx_XDECREF(__pyx_v_dtype);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static PyObject *__pyx_pw_6pyfftw_6pyfftw_3n_byte_align(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_6pyfftw_6pyfftw_2n_byte_align[] = " n_byte_align(array, n, dtype=None)\n\n    Function that takes a numpy array and checks it is aligned on an n-byte\n    boundary, where ``n`` is a passed parameter. If it is, the array is\n    returned without further ado.  If it is not, a new array is created and\n    the data copied in, but aligned on the n-byte boundary.\n\n    ``dtype`` is an optional argument that forces the resultant array to be\n    of that dtype.\n    ";
+static PyObject *__pyx_pw_6pyfftw_6pyfftw_3n_byte_align(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  PyObject *__pyx_v_array = 0;
+  PyObject *__pyx_v_n = 0;
+  PyObject *__pyx_v_dtype = 0;
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("n_byte_align (wrapper)", 0);
+  {
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__array,&__pyx_n_s__n,&__pyx_n_s__dtype,0};
+    PyObject* values[3] = {0,0,0};
+
+    /* "/home/whg21/Projects/github/pyFFTW/pyfftw/utils.pxi":75
+ *     return array
+ * 
+ * cpdef n_byte_align(array, n, dtype=None):             # <<<<<<<<<<<<<<
+ *     ''' n_byte_align(array, n, dtype=None)
+ * 
+ */
+    values[2] = ((PyObject *)Py_None);
+    if (unlikely(__pyx_kwds)) {
+      Py_ssize_t kw_args;
+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+      switch (pos_args) {
+        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        case  0: break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+      kw_args = PyDict_Size(__pyx_kwds);
+      switch (pos_args) {
+        case  0:
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__array)) != 0)) kw_args--;
+        else goto __pyx_L5_argtuple_error;
+        case  1:
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__n)) != 0)) kw_args--;
+        else {
+          __Pyx_RaiseArgtupleInvalid("n_byte_align", 0, 2, 3, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        }
+        case  2:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__dtype);
+          if (value) { values[2] = value; kw_args--; }
+        }
+      }
+      if (unlikely(kw_args > 0)) {
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "n_byte_align") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      }
+    } else {
+      switch (PyTuple_GET_SIZE(__pyx_args)) {
+        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+    }
+    __pyx_v_array = values[0];
+    __pyx_v_n = values[1];
+    __pyx_v_dtype = values[2];
+  }
+  goto __pyx_L4_argument_unpacking_done;
+  __pyx_L5_argtuple_error:;
+  __Pyx_RaiseArgtupleInvalid("n_byte_align", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_AddTraceback("pyfftw.pyfftw.n_byte_align", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_RefNannyFinishContext();
+  return NULL;
+  __pyx_L4_argument_unpacking_done:;
+  __pyx_r = __pyx_pf_6pyfftw_6pyfftw_2n_byte_align(__pyx_self, __pyx_v_array, __pyx_v_n, __pyx_v_dtype);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_6pyfftw_6pyfftw_2n_byte_align(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_array, PyObject *__pyx_v_n, PyObject *__pyx_v_dtype) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  struct __pyx_opt_args_6pyfftw_6pyfftw_n_byte_align __pyx_t_2;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("n_byte_align", 0);
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_2.__pyx_n = 1;
+  __pyx_t_2.dtype = __pyx_v_dtype;
+  __pyx_t_1 = __pyx_f_6pyfftw_6pyfftw_n_byte_align(__pyx_v_array, __pyx_v_n, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("pyfftw.pyfftw.n_byte_align", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "/home/whg21/Projects/github/pyFFTW/pyfftw/utils.pxi":112
+ *     return array
+ * 
+ * cpdef is_n_byte_aligned(array, n):             # <<<<<<<<<<<<<<
+ *     ''' is_n_byte_aligned(array, n)
+ * 
+ */
+
+static PyObject *__pyx_pw_6pyfftw_6pyfftw_5is_n_byte_aligned(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyObject *__pyx_f_6pyfftw_6pyfftw_is_n_byte_aligned(PyObject *__pyx_v_array, PyObject *__pyx_v_n, CYTHON_UNUSED int __pyx_skip_dispatch) {
+  PyObject *__pyx_v_offset = NULL;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_t_2;
+  int __pyx_t_3;
+  PyObject *__pyx_t_4 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("is_n_byte_aligned", 0);
+
+  /* "/home/whg21/Projects/github/pyFFTW/pyfftw/utils.pxi":119
+ *     and ``False`` if it is not.
+ *     '''
+ *     if not isinstance(array, np.ndarray):             # <<<<<<<<<<<<<<
+ *         raise TypeError('Invalid array: is_n_byte_aligned requires a subclass '
+ *                 'of ndarray')
+ */
+  __pyx_t_1 = ((PyObject *)((PyObject*)__pyx_ptype_5numpy_ndarray));
+  __Pyx_INCREF(__pyx_t_1);
+  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_array, __pyx_t_1); 
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_3 = (!__pyx_t_2);
+  if (__pyx_t_3) {
+
+    /* "/home/whg21/Projects/github/pyFFTW/pyfftw/utils.pxi":120
+ *     '''
+ *     if not isinstance(array, np.ndarray):
+ *         raise TypeError('Invalid array: is_n_byte_aligned requires a subclass '             # <<<<<<<<<<<<<<
+ *                 'of ndarray')
+ * 
+ */
+    __pyx_t_1 = PyObject_Call(__pyx_builtin_TypeError, ((PyObject *)__pyx_k_tuple_4), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    {__pyx_filename = __pyx_f[1]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    goto __pyx_L3;
+  }
+  __pyx_L3:;
+
+  /* "/home/whg21/Projects/github/pyFFTW/pyfftw/utils.pxi":124
+ * 
+ *     # See if we're n byte aligned.
+ *     offset = <intptr_t>np.PyArray_DATA(array) %n             # <<<<<<<<<<<<<<
+ * 
+ *     return not bool(offset)
+ */
+  if (!(likely(((__pyx_v_array) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_array, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __pyx_v_array;
+  __Pyx_INCREF(__pyx_t_1);
+  __pyx_t_4 = PyInt_FromSsize_t(((intptr_t)PyArray_DATA(((PyArrayObject *)__pyx_t_1)))); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_1 = PyNumber_Remainder(__pyx_t_4, __pyx_v_n); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  __pyx_v_offset = __pyx_t_1;
+  __pyx_t_1 = 0;
+
+  /* "/home/whg21/Projects/github/pyFFTW/pyfftw/utils.pxi":126
+ *     offset = <intptr_t>np.PyArray_DATA(array) %n
+ * 
+ *     return not bool(offset)             # <<<<<<<<<<<<<<
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_offset); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!(!__pyx_t_3)))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_AddTraceback("pyfftw.pyfftw.is_n_byte_aligned", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = 0;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_offset);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static PyObject *__pyx_pw_6pyfftw_6pyfftw_5is_n_byte_aligned(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_6pyfftw_6pyfftw_4is_n_byte_aligned[] = " is_n_byte_aligned(array, n)\n\n    Function that takes a numpy array and checks it is aligned on an n-byte\n    boundary, where ``n`` is a passed parameter, returning ``True`` if it is,\n    and ``False`` if it is not.\n    ";
+static PyObject *__pyx_pw_6pyfftw_6pyfftw_5is_n_byte_aligned(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  PyObject *__pyx_v_array = 0;
+  PyObject *__pyx_v_n = 0;
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("is_n_byte_aligned (wrapper)", 0);
+  {
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__array,&__pyx_n_s__n,0};
+    PyObject* values[2] = {0,0};
+    if (unlikely(__pyx_kwds)) {
+      Py_ssize_t kw_args;
+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+      switch (pos_args) {
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        case  0: break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+      kw_args = PyDict_Size(__pyx_kwds);
+      switch (pos_args) {
+        case  0:
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__array)) != 0)) kw_args--;
+        else goto __pyx_L5_argtuple_error;
+        case  1:
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__n)) != 0)) kw_args--;
+        else {
+          __Pyx_RaiseArgtupleInvalid("is_n_byte_aligned", 1, 2, 2, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        }
+      }
+      if (unlikely(kw_args > 0)) {
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "is_n_byte_aligned") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      }
+    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+      goto __pyx_L5_argtuple_error;
+    } else {
+      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+    }
+    __pyx_v_array = values[0];
+    __pyx_v_n = values[1];
+  }
+  goto __pyx_L4_argument_unpacking_done;
+  __pyx_L5_argtuple_error:;
+  __Pyx_RaiseArgtupleInvalid("is_n_byte_aligned", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_AddTraceback("pyfftw.pyfftw.is_n_byte_aligned", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_RefNannyFinishContext();
+  return NULL;
+  __pyx_L4_argument_unpacking_done:;
+  __pyx_r = __pyx_pf_6pyfftw_6pyfftw_4is_n_byte_aligned(__pyx_self, __pyx_v_array, __pyx_v_n);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "/home/whg21/Projects/github/pyFFTW/pyfftw/utils.pxi":112
+ *     return array
+ * 
+ * cpdef is_n_byte_aligned(array, n):             # <<<<<<<<<<<<<<
+ *     ''' is_n_byte_aligned(array, n)
+ * 
+ */
+
+static PyObject *__pyx_pf_6pyfftw_6pyfftw_4is_n_byte_aligned(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_array, PyObject *__pyx_v_n) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("is_n_byte_aligned", 0);
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __pyx_f_6pyfftw_6pyfftw_is_n_byte_aligned(__pyx_v_array, __pyx_v_n, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("pyfftw.pyfftw.is_n_byte_aligned", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pyfftw/pyfftw.pyx":57
+ * #
+ * # Complex double precision
+ * cdef void* _fftw_plan_guru_dft(             # <<<<<<<<<<<<<<
+ *             int rank, fftw_iodim *dims,
+ *             int howmany_rank, fftw_iodim *howmany_dims,
+ */
+
+static void *__pyx_f_6pyfftw_6pyfftw__fftw_plan_guru_dft(int __pyx_v_rank, fftw_iodim *__pyx_v_dims, int __pyx_v_howmany_rank, fftw_iodim *__pyx_v_howmany_dims, void *__pyx_v__in, void *__pyx_v__out, int __pyx_v_sign, int __pyx_v_flags) {
+  void *__pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("_fftw_plan_guru_dft", 0);
+
+  /* "pyfftw/pyfftw.pyx":66
+ *             howmany_rank, howmany_dims,
+ *             <cdouble *>_in, <cdouble *>_out,
+ *             sign, flags)             # <<<<<<<<<<<<<<
+ * 
+ * # Complex single precision
+ */
+  __pyx_r = ((void *)fftw_plan_guru_dft(__pyx_v_rank, __pyx_v_dims, __pyx_v_howmany_rank, __pyx_v_howmany_dims, ((cdouble *)__pyx_v__in), ((cdouble *)__pyx_v__out), __pyx_v_sign, __pyx_v_flags));
+  goto __pyx_L0;
+
+  __pyx_r = 0;
+  __pyx_L0:;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pyfftw/pyfftw.pyx":69
+ * 
+ * # Complex single precision
+ * cdef void* _fftwf_plan_guru_dft(             # <<<<<<<<<<<<<<
+ *             int rank, fftw_iodim *dims,
+ *             int howmany_rank, fftw_iodim *howmany_dims,
+ */
+
+static void *__pyx_f_6pyfftw_6pyfftw__fftwf_plan_guru_dft(int __pyx_v_rank, fftw_iodim *__pyx_v_dims, int __pyx_v_howmany_rank, fftw_iodim *__pyx_v_howmany_dims, void *__pyx_v__in, void *__pyx_v__out, int __pyx_v_sign, int __pyx_v_flags) {
+  void *__pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("_fftwf_plan_guru_dft", 0);
+
+  /* "pyfftw/pyfftw.pyx":78
+ *             howmany_rank, howmany_dims,
+ *             <cfloat *>_in, <cfloat *>_out,
+ *             sign, flags)             # <<<<<<<<<<<<<<
+ * 
+ * # Complex long double precision
+ */
+  __pyx_r = ((void *)fftwf_plan_guru_dft(__pyx_v_rank, __pyx_v_dims, __pyx_v_howmany_rank, __pyx_v_howmany_dims, ((cfloat *)__pyx_v__in), ((cfloat *)__pyx_v__out), __pyx_v_sign, __pyx_v_flags));
+  goto __pyx_L0;
+
+  __pyx_r = 0;
+  __pyx_L0:;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pyfftw/pyfftw.pyx":81
+ * 
+ * # Complex long double precision
+ * cdef void* _fftwl_plan_guru_dft(             # <<<<<<<<<<<<<<
+ *             int rank, fftw_iodim *dims,
+ *             int howmany_rank, fftw_iodim *howmany_dims,
+ */
+
+static void *__pyx_f_6pyfftw_6pyfftw__fftwl_plan_guru_dft(int __pyx_v_rank, fftw_iodim *__pyx_v_dims, int __pyx_v_howmany_rank, fftw_iodim *__pyx_v_howmany_dims, void *__pyx_v__in, void *__pyx_v__out, int __pyx_v_sign, int __pyx_v_flags) {
+  void *__pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("_fftwl_plan_guru_dft", 0);
+
+  /* "pyfftw/pyfftw.pyx":90
+ *             howmany_rank, howmany_dims,
+ *             <clongdouble *>_in, <clongdouble *>_out,
+ *             sign, flags)             # <<<<<<<<<<<<<<
+ * 
+ * # real to complex double precision
+ */
+  __pyx_r = ((void *)fftwl_plan_guru_dft(__pyx_v_rank, __pyx_v_dims, __pyx_v_howmany_rank, __pyx_v_howmany_dims, ((clongdouble *)__pyx_v__in), ((clongdouble *)__pyx_v__out), __pyx_v_sign, __pyx_v_flags));
+  goto __pyx_L0;
+
+  __pyx_r = 0;
+  __pyx_L0:;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pyfftw/pyfftw.pyx":93
+ * 
+ * # real to complex double precision
+ * cdef void* _fftw_plan_guru_dft_r2c(             # <<<<<<<<<<<<<<
+ *             int rank, fftw_iodim *dims,
+ *             int howmany_rank, fftw_iodim *howmany_dims,
+ */
+
+static void *__pyx_f_6pyfftw_6pyfftw__fftw_plan_guru_dft_r2c(int __pyx_v_rank, fftw_iodim *__pyx_v_dims, int __pyx_v_howmany_rank, fftw_iodim *__pyx_v_howmany_dims, void *__pyx_v__in, void *__pyx_v__out, CYTHON_UNUSED int __pyx_v_sign, int __pyx_v_flags) {
+  void *__pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("_fftw_plan_guru_dft_r2c", 0);
+
+  /* "pyfftw/pyfftw.pyx":102
+ *             howmany_rank, howmany_dims,
+ *             <double *>_in, <cdouble *>_out,
+ *             flags)             # <<<<<<<<<<<<<<
+ * 
+ * # real to complex single precision
+ */
+  __pyx_r = ((void *)fftw_plan_guru_dft_r2c(__pyx_v_rank, __pyx_v_dims, __pyx_v_howmany_rank, __pyx_v_howmany_dims, ((double *)__pyx_v__in), ((cdouble *)__pyx_v__out), __pyx_v_flags));
+  goto __pyx_L0;
+
+  __pyx_r = 0;
+  __pyx_L0:;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pyfftw/pyfftw.pyx":105
+ * 
+ * # real to complex single precision
+ * cdef void* _fftwf_plan_guru_dft_r2c(             # <<<<<<<<<<<<<<
+ *             int rank, fftw_iodim *dims,
+ *             int howmany_rank, fftw_iodim *howmany_dims,
+ */
+
+static void *__pyx_f_6pyfftw_6pyfftw__fftwf_plan_guru_dft_r2c(int __pyx_v_rank, fftw_iodim *__pyx_v_dims, int __pyx_v_howmany_rank, fftw_iodim *__pyx_v_howmany_dims, void *__pyx_v__in, void *__pyx_v__out, CYTHON_UNUSED int __pyx_v_sign, int __pyx_v_flags) {
+  void *__pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("_fftwf_plan_guru_dft_r2c", 0);
+
+  /* "pyfftw/pyfftw.pyx":114
+ *             howmany_rank, howmany_dims,
+ *             <float *>_in, <cfloat *>_out,
+ *             flags)             # <<<<<<<<<<<<<<
+ * 
+ * # real to complex long double precision
+ */
+  __pyx_r = ((void *)fftwf_plan_guru_dft_r2c(__pyx_v_rank, __pyx_v_dims, __pyx_v_howmany_rank, __pyx_v_howmany_dims, ((float *)__pyx_v__in), ((cfloat *)__pyx_v__out), __pyx_v_flags));
+  goto __pyx_L0;
+
+  __pyx_r = 0;
+  __pyx_L0:;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pyfftw/pyfftw.pyx":117
+ * 
+ * # real to complex long double precision
+ * cdef void* _fftwl_plan_guru_dft_r2c(             # <<<<<<<<<<<<<<
+ *             int rank, fftw_iodim *dims,
+ *             int howmany_rank, fftw_iodim *howmany_dims,
+ */
+
+static void *__pyx_f_6pyfftw_6pyfftw__fftwl_plan_guru_dft_r2c(int __pyx_v_rank, fftw_iodim *__pyx_v_dims, int __pyx_v_howmany_rank, fftw_iodim *__pyx_v_howmany_dims, void *__pyx_v__in, void *__pyx_v__out, CYTHON_UNUSED int __pyx_v_sign, int __pyx_v_flags) {
+  void *__pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("_fftwl_plan_guru_dft_r2c", 0);
+
+  /* "pyfftw/pyfftw.pyx":126
+ *             howmany_rank, howmany_dims,
+ *             <long double *>_in, <clongdouble *>_out,
+ *             flags)             # <<<<<<<<<<<<<<
+ * 
+ * # complex to real double precision
+ */
+  __pyx_r = ((void *)fftwl_plan_guru_dft_r2c(__pyx_v_rank, __pyx_v_dims, __pyx_v_howmany_rank, __pyx_v_howmany_dims, ((long double *)__pyx_v__in), ((clongdouble *)__pyx_v__out), __pyx_v_flags));
+  goto __pyx_L0;
+
+  __pyx_r = 0;
+  __pyx_L0:;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pyfftw/pyfftw.pyx":129
+ * 
+ * # complex to real double precision
+ * cdef void* _fftw_plan_guru_dft_c2r(             # <<<<<<<<<<<<<<
+ *             int rank, fftw_iodim *dims,
+ *             int howmany_rank, fftw_iodim *howmany_dims,
+ */
+
+static void *__pyx_f_6pyfftw_6pyfftw__fftw_plan_guru_dft_c2r(int __pyx_v_rank, fftw_iodim *__pyx_v_dims, int __pyx_v_howmany_rank, fftw_iodim *__pyx_v_howmany_dims, void *__pyx_v__in, void *__pyx_v__out, CYTHON_UNUSED int __pyx_v_sign, int __pyx_v_flags) {
+  void *__pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("_fftw_plan_guru_dft_c2r", 0);
+
+  /* "pyfftw/pyfftw.pyx":138
+ *             howmany_rank, howmany_dims,
+ *             <cdouble *>_in, <double *>_out,
+ *             flags)             # <<<<<<<<<<<<<<
+ * 
+ * # complex to real single precision
+ */
+  __pyx_r = ((void *)fftw_plan_guru_dft_c2r(__pyx_v_rank, __pyx_v_dims, __pyx_v_howmany_rank, __pyx_v_howmany_dims, ((cdouble *)__pyx_v__in), ((double *)__pyx_v__out), __pyx_v_flags));
+  goto __pyx_L0;
+
+  __pyx_r = 0;
+  __pyx_L0:;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pyfftw/pyfftw.pyx":141
+ * 
+ * # complex to real single precision
+ * cdef void* _fftwf_plan_guru_dft_c2r(             # <<<<<<<<<<<<<<
+ *             int rank, fftw_iodim *dims,
+ *             int howmany_rank, fftw_iodim *howmany_dims,
+ */
+
+static void *__pyx_f_6pyfftw_6pyfftw__fftwf_plan_guru_dft_c2r(int __pyx_v_rank, fftw_iodim *__pyx_v_dims, int __pyx_v_howmany_rank, fftw_iodim *__pyx_v_howmany_dims, void *__pyx_v__in, void *__pyx_v__out, CYTHON_UNUSED int __pyx_v_sign, int __pyx_v_flags) {
+  void *__pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("_fftwf_plan_guru_dft_c2r", 0);
+
+  /* "pyfftw/pyfftw.pyx":150
+ *             howmany_rank, howmany_dims,
+ *             <cfloat *>_in, <float *>_out,
+ *             flags)             # <<<<<<<<<<<<<<
+ * 
+ * # complex to real long double precision
+ */
+  __pyx_r = ((void *)fftwf_plan_guru_dft_c2r(__pyx_v_rank, __pyx_v_dims, __pyx_v_howmany_rank, __pyx_v_howmany_dims, ((cfloat *)__pyx_v__in), ((float *)__pyx_v__out), __pyx_v_flags));
+  goto __pyx_L0;
+
+  __pyx_r = 0;
+  __pyx_L0:;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pyfftw/pyfftw.pyx":153
+ * 
+ * # complex to real long double precision
+ * cdef void* _fftwl_plan_guru_dft_c2r(             # <<<<<<<<<<<<<<
+ *             int rank, fftw_iodim *dims,
+ *             int howmany_rank, fftw_iodim *howmany_dims,
+ */
+
+static void *__pyx_f_6pyfftw_6pyfftw__fftwl_plan_guru_dft_c2r(int __pyx_v_rank, fftw_iodim *__pyx_v_dims, int __pyx_v_howmany_rank, fftw_iodim *__pyx_v_howmany_dims, void *__pyx_v__in, void *__pyx_v__out, CYTHON_UNUSED int __pyx_v_sign, int __pyx_v_flags) {
+  void *__pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("_fftwl_plan_guru_dft_c2r", 0);
+
+  /* "pyfftw/pyfftw.pyx":162
+ *             howmany_rank, howmany_dims,
+ *             <clongdouble *>_in, <long double *>_out,
+ *             flags)             # <<<<<<<<<<<<<<
+ * 
+ * #    Executors
+ */
+  __pyx_r = ((void *)fftwl_plan_guru_dft_c2r(__pyx_v_rank, __pyx_v_dims, __pyx_v_howmany_rank, __pyx_v_howmany_dims, ((clongdouble *)__pyx_v__in), ((long double *)__pyx_v__out), __pyx_v_flags));
+  goto __pyx_L0;
+
+  __pyx_r = 0;
+  __pyx_L0:;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pyfftw/pyfftw.pyx":168
+ * #
+ * # Complex double precision
+ * cdef void _fftw_execute_dft(void *_plan, void *_in, void *_out) nogil:             # <<<<<<<<<<<<<<
+ * 
+ *     fftw_execute_dft(<fftw_plan>_plan,
+ */
+
+static void __pyx_f_6pyfftw_6pyfftw__fftw_execute_dft(void *__pyx_v__plan, void *__pyx_v__in, void *__pyx_v__out) {
+
+  /* "pyfftw/pyfftw.pyx":171
+ * 
+ *     fftw_execute_dft(<fftw_plan>_plan,
+ *             <cdouble *>_in, <cdouble *>_out)             # <<<<<<<<<<<<<<
+ * 
+ * # Complex single precision
+ */
+  fftw_execute_dft(((fftw_plan)__pyx_v__plan), ((cdouble *)__pyx_v__in), ((cdouble *)__pyx_v__out));
+
+}
+
+/* "pyfftw/pyfftw.pyx":174
+ * 
+ * # Complex single precision
+ * cdef void _fftwf_execute_dft(void *_plan, void *_in, void *_out) nogil:             # <<<<<<<<<<<<<<
+ * 
+ *     fftwf_execute_dft(<fftwf_plan>_plan,
+ */
+
+static void __pyx_f_6pyfftw_6pyfftw__fftwf_execute_dft(void *__pyx_v__plan, void *__pyx_v__in, void *__pyx_v__out) {
+
+  /* "pyfftw/pyfftw.pyx":177
+ * 
+ *     fftwf_execute_dft(<fftwf_plan>_plan,
+ *             <cfloat *>_in, <cfloat *>_out)             # <<<<<<<<<<<<<<
+ * 
+ * # Complex long double precision
+ */
+  fftwf_execute_dft(((fftwf_plan)__pyx_v__plan), ((cfloat *)__pyx_v__in), ((cfloat *)__pyx_v__out));
+
+}
+
+/* "pyfftw/pyfftw.pyx":180
+ * 
+ * # Complex long double precision
+ * cdef void _fftwl_execute_dft(void *_plan, void *_in, void *_out) nogil:             # <<<<<<<<<<<<<<
+ * 
+ *     fftwl_execute_dft(<fftwl_plan>_plan,
+ */
+
+static void __pyx_f_6pyfftw_6pyfftw__fftwl_execute_dft(void *__pyx_v__plan, void *__pyx_v__in, void *__pyx_v__out) {
+
+  /* "pyfftw/pyfftw.pyx":183
+ * 
+ *     fftwl_execute_dft(<fftwl_plan>_plan,
+ *             <clongdouble *>_in, <clongdouble *>_out)             # <<<<<<<<<<<<<<
+ * 
+ * # real to complex double precision
+ */
+  fftwl_execute_dft(((fftwl_plan)__pyx_v__plan), ((clongdouble *)__pyx_v__in), ((clongdouble *)__pyx_v__out));
+
+}
+
+/* "pyfftw/pyfftw.pyx":186
+ * 
+ * # real to complex double precision
+ * cdef void _fftw_execute_dft_r2c(void *_plan, void *_in, void *_out) nogil:             # <<<<<<<<<<<<<<
+ * 
+ *     fftw_execute_dft_r2c(<fftw_plan>_plan,
+ */
+
+static void __pyx_f_6pyfftw_6pyfftw__fftw_execute_dft_r2c(void *__pyx_v__plan, void *__pyx_v__in, void *__pyx_v__out) {
+
+  /* "pyfftw/pyfftw.pyx":189
+ * 
+ *     fftw_execute_dft_r2c(<fftw_plan>_plan,
+ *             <double *>_in, <cdouble *>_out)             # <<<<<<<<<<<<<<
+ * 
+ * # real to complex single precision
+ */
+  fftw_execute_dft_r2c(((fftw_plan)__pyx_v__plan), ((double *)__pyx_v__in), ((cdouble *)__pyx_v__out));
+
+}
+
+/* "pyfftw/pyfftw.pyx":192
+ * 
+ * # real to complex single precision
+ * cdef void _fftwf_execute_dft_r2c(void *_plan, void *_in, void *_out) nogil:             # <<<<<<<<<<<<<<
+ * 
+ *     fftwf_execute_dft_r2c(<fftwf_plan>_plan,
+ */
+
+static void __pyx_f_6pyfftw_6pyfftw__fftwf_execute_dft_r2c(void *__pyx_v__plan, void *__pyx_v__in, void *__pyx_v__out) {
+
+  /* "pyfftw/pyfftw.pyx":195
+ * 
+ *     fftwf_execute_dft_r2c(<fftwf_plan>_plan,
+ *             <float *>_in, <cfloat *>_out)             # <<<<<<<<<<<<<<
+ * 
+ * # real to complex long double precision
+ */
+  fftwf_execute_dft_r2c(((fftwf_plan)__pyx_v__plan), ((float *)__pyx_v__in), ((cfloat *)__pyx_v__out));
+
+}
+
+/* "pyfftw/pyfftw.pyx":198
+ * 
+ * # real to complex long double precision
+ * cdef void _fftwl_execute_dft_r2c(void *_plan, void *_in, void *_out) nogil:             # <<<<<<<<<<<<<<
+ * 
+ *     fftwl_execute_dft_r2c(<fftwl_plan>_plan,
+ */
+
+static void __pyx_f_6pyfftw_6pyfftw__fftwl_execute_dft_r2c(void *__pyx_v__plan, void *__pyx_v__in, void *__pyx_v__out) {
+
+  /* "pyfftw/pyfftw.pyx":201
+ * 
+ *     fftwl_execute_dft_r2c(<fftwl_plan>_plan,
+ *             <long double *>_in, <clongdouble *>_out)             # <<<<<<<<<<<<<<
+ * 
+ * # complex to real double precision
+ */
+  fftwl_execute_dft_r2c(((fftwl_plan)__pyx_v__plan), ((long double *)__pyx_v__in), ((clongdouble *)__pyx_v__out));
+
+}
+
+/* "pyfftw/pyfftw.pyx":204
+ * 
+ * # complex to real double precision
+ * cdef void _fftw_execute_dft_c2r(void *_plan, void *_in, void *_out) nogil:             # <<<<<<<<<<<<<<
+ * 
+ *     fftw_execute_dft_c2r(<fftw_plan>_plan,
+ */
+
+static void __pyx_f_6pyfftw_6pyfftw__fftw_execute_dft_c2r(void *__pyx_v__plan, void *__pyx_v__in, void *__pyx_v__out) {
+
+  /* "pyfftw/pyfftw.pyx":207
+ * 
+ *     fftw_execute_dft_c2r(<fftw_plan>_plan,
+ *             <cdouble *>_in, <double *>_out)             # <<<<<<<<<<<<<<
+ * 
+ * # complex to real single precision
+ */
+  fftw_execute_dft_c2r(((fftw_plan)__pyx_v__plan), ((cdouble *)__pyx_v__in), ((double *)__pyx_v__out));
+
+}
+
+/* "pyfftw/pyfftw.pyx":210
+ * 
+ * # complex to real single precision
+ * cdef void _fftwf_execute_dft_c2r(void *_plan, void *_in, void *_out) nogil:             # <<<<<<<<<<<<<<
+ * 
+ *     fftwf_execute_dft_c2r(<fftwf_plan>_plan,
+ */
+
+static void __pyx_f_6pyfftw_6pyfftw__fftwf_execute_dft_c2r(void *__pyx_v__plan, void *__pyx_v__in, void *__pyx_v__out) {
+
+  /* "pyfftw/pyfftw.pyx":213
+ * 
+ *     fftwf_execute_dft_c2r(<fftwf_plan>_plan,
+ *             <cfloat *>_in, <float *>_out)             # <<<<<<<<<<<<<<
+ * 
+ * # complex to real long double precision
+ */
+  fftwf_execute_dft_c2r(((fftwf_plan)__pyx_v__plan), ((cfloat *)__pyx_v__in), ((float *)__pyx_v__out));
+
+}
+
+/* "pyfftw/pyfftw.pyx":216
+ * 
+ * # complex to real long double precision
+ * cdef void _fftwl_execute_dft_c2r(void *_plan, void *_in, void *_out) nogil:             # <<<<<<<<<<<<<<
+ * 
+ *     fftwl_execute_dft_c2r(<fftwl_plan>_plan,
+ */
+
+static void __pyx_f_6pyfftw_6pyfftw__fftwl_execute_dft_c2r(void *__pyx_v__plan, void *__pyx_v__in, void *__pyx_v__out) {
+
+  /* "pyfftw/pyfftw.pyx":219
+ * 
+ *     fftwl_execute_dft_c2r(<fftwl_plan>_plan,
+ *             <clongdouble *>_in, <long double *>_out)             # <<<<<<<<<<<<<<
+ * 
+ * #    Destroyers
+ */
+  fftwl_execute_dft_c2r(((fftwl_plan)__pyx_v__plan), ((clongdouble *)__pyx_v__in), ((long double *)__pyx_v__out));
+
+}
+
+/* "pyfftw/pyfftw.pyx":225
+ * #
+ * # Double precision
+ * cdef void _fftw_destroy_plan(void *_plan):             # <<<<<<<<<<<<<<
+ * 
+ *     fftw_destroy_plan(<fftw_plan>_plan)
+ */
+
+static void __pyx_f_6pyfftw_6pyfftw__fftw_destroy_plan(void *__pyx_v__plan) {
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("_fftw_destroy_plan", 0);
+
+  /* "pyfftw/pyfftw.pyx":227
+ * cdef void _fftw_destroy_plan(void *_plan):
+ * 
+ *     fftw_destroy_plan(<fftw_plan>_plan)             # <<<<<<<<<<<<<<
+ * 
+ * # Single precision
+ */
+  fftw_destroy_plan(((fftw_plan)__pyx_v__plan));
+
+  __Pyx_RefNannyFinishContext();
+}
+
+/* "pyfftw/pyfftw.pyx":230
+ * 
+ * # Single precision
+ * cdef void _fftwf_destroy_plan(void *_plan):             # <<<<<<<<<<<<<<
+ * 
+ *     fftwf_destroy_plan(<fftwf_plan>_plan)
+ */
+
+static void __pyx_f_6pyfftw_6pyfftw__fftwf_destroy_plan(void *__pyx_v__plan) {
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("_fftwf_destroy_plan", 0);
+
+  /* "pyfftw/pyfftw.pyx":232
+ * cdef void _fftwf_destroy_plan(void *_plan):
+ * 
+ *     fftwf_destroy_plan(<fftwf_plan>_plan)             # <<<<<<<<<<<<<<
+ * 
+ * # Long double precision
+ */
+  fftwf_destroy_plan(((fftwf_plan)__pyx_v__plan));
+
+  __Pyx_RefNannyFinishContext();
+}
+
+/* "pyfftw/pyfftw.pyx":235
+ * 
+ * # Long double precision
+ * cdef void _fftwl_destroy_plan(void *_plan):             # <<<<<<<<<<<<<<
+ * 
+ *     fftwl_destroy_plan(<fftwl_plan>_plan)
+ */
+
+static void __pyx_f_6pyfftw_6pyfftw__fftwl_destroy_plan(void *__pyx_v__plan) {
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("_fftwl_destroy_plan", 0);
+
+  /* "pyfftw/pyfftw.pyx":237
+ * cdef void _fftwl_destroy_plan(void *_plan):
+ * 
+ *     fftwl_destroy_plan(<fftwl_plan>_plan)             # <<<<<<<<<<<<<<
+ * 
+ * 
+ */
+  fftwl_destroy_plan(((fftwl_plan)__pyx_v__plan));
+
+  __Pyx_RefNannyFinishContext();
+}
+
+/* "pyfftw/pyfftw.pyx":246
+ * cdef fftw_generic_plan_guru planners[9]
+ * 
+ * cdef fftw_generic_plan_guru * _build_planner_list():             # <<<<<<<<<<<<<<
+ * 
+ *     planners[0] = <fftw_generic_plan_guru>&_fftw_plan_guru_dft
+ */
+
+static __pyx_t_6pyfftw_6pyfftw_fftw_generic_plan_guru *__pyx_f_6pyfftw_6pyfftw__build_planner_list(void) {
+  __pyx_t_6pyfftw_6pyfftw_fftw_generic_plan_guru *__pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("_build_planner_list", 0);
+
+  /* "pyfftw/pyfftw.pyx":248
+ * cdef fftw_generic_plan_guru * _build_planner_list():
+ * 
+ *     planners[0] = <fftw_generic_plan_guru>&_fftw_plan_guru_dft             # <<<<<<<<<<<<<<
+ *     planners[1] = <fftw_generic_plan_guru>&_fftwf_plan_guru_dft
+ *     planners[2] = <fftw_generic_plan_guru>&_fftwl_plan_guru_dft
+ */
+  (__pyx_v_6pyfftw_6pyfftw_planners[0]) = ((__pyx_t_6pyfftw_6pyfftw_fftw_generic_plan_guru)(&__pyx_f_6pyfftw_6pyfftw__fftw_plan_guru_dft));
+
+  /* "pyfftw/pyfftw.pyx":249
+ * 
+ *     planners[0] = <fftw_generic_plan_guru>&_fftw_plan_guru_dft
+ *     planners[1] = <fftw_generic_plan_guru>&_fftwf_plan_guru_dft             # <<<<<<<<<<<<<<
+ *     planners[2] = <fftw_generic_plan_guru>&_fftwl_plan_guru_dft
+ *     planners[3] = <fftw_generic_plan_guru>&_fftw_plan_guru_dft_r2c
+ */
+  (__pyx_v_6pyfftw_6pyfftw_planners[1]) = ((__pyx_t_6pyfftw_6pyfftw_fftw_generic_plan_guru)(&__pyx_f_6pyfftw_6pyfftw__fftwf_plan_guru_dft));
+
+  /* "pyfftw/pyfftw.pyx":250
+ *     planners[0] = <fftw_generic_plan_guru>&_fftw_plan_guru_dft
+ *     planners[1] = <fftw_generic_plan_guru>&_fftwf_plan_guru_dft
+ *     planners[2] = <fftw_generic_plan_guru>&_fftwl_plan_guru_dft             # <<<<<<<<<<<<<<
+ *     planners[3] = <fftw_generic_plan_guru>&_fftw_plan_guru_dft_r2c
+ *     planners[4] = <fftw_generic_plan_guru>&_fftwf_plan_guru_dft_r2c
+ */
+  (__pyx_v_6pyfftw_6pyfftw_planners[2]) = ((__pyx_t_6pyfftw_6pyfftw_fftw_generic_plan_guru)(&__pyx_f_6pyfftw_6pyfftw__fftwl_plan_guru_dft));
+
+  /* "pyfftw/pyfftw.pyx":251
+ *     planners[1] = <fftw_generic_plan_guru>&_fftwf_plan_guru_dft
+ *     planners[2] = <fftw_generic_plan_guru>&_fftwl_plan_guru_dft
+ *     planners[3] = <fftw_generic_plan_guru>&_fftw_plan_guru_dft_r2c             # <<<<<<<<<<<<<<
+ *     planners[4] = <fftw_generic_plan_guru>&_fftwf_plan_guru_dft_r2c
+ *     planners[5] = <fftw_generic_plan_guru>&_fftwl_plan_guru_dft_r2c
+ */
+  (__pyx_v_6pyfftw_6pyfftw_planners[3]) = ((__pyx_t_6pyfftw_6pyfftw_fftw_generic_plan_guru)(&__pyx_f_6pyfftw_6pyfftw__fftw_plan_guru_dft_r2c));
+
+  /* "pyfftw/pyfftw.pyx":252
+ *     planners[2] = <fftw_generic_plan_guru>&_fftwl_plan_guru_dft
+ *     planners[3] = <fftw_generic_plan_guru>&_fftw_plan_guru_dft_r2c
+ *     planners[4] = <fftw_generic_plan_guru>&_fftwf_plan_guru_dft_r2c             # <<<<<<<<<<<<<<
+ *     planners[5] = <fftw_generic_plan_guru>&_fftwl_plan_guru_dft_r2c
+ *     planners[6] = <fftw_generic_plan_guru>&_fftw_plan_guru_dft_c2r
+ */
+  (__pyx_v_6pyfftw_6pyfftw_planners[4]) = ((__pyx_t_6pyfftw_6pyfftw_fftw_generic_plan_guru)(&__pyx_f_6pyfftw_6pyfftw__fftwf_plan_guru_dft_r2c));
+
+  /* "pyfftw/pyfftw.pyx":253
+ *     planners[3] = <fftw_generic_plan_guru>&_fftw_plan_guru_dft_r2c
+ *     planners[4] = <fftw_generic_plan_guru>&_fftwf_plan_guru_dft_r2c
+ *     planners[5] = <fftw_generic_plan_guru>&_fftwl_plan_guru_dft_r2c             # <<<<<<<<<<<<<<
+ *     planners[6] = <fftw_generic_plan_guru>&_fftw_plan_guru_dft_c2r
+ *     planners[7] = <fftw_generic_plan_guru>&_fftwf_plan_guru_dft_c2r
+ */
+  (__pyx_v_6pyfftw_6pyfftw_planners[5]) = ((__pyx_t_6pyfftw_6pyfftw_fftw_generic_plan_guru)(&__pyx_f_6pyfftw_6pyfftw__fftwl_plan_guru_dft_r2c));
+
+  /* "pyfftw/pyfftw.pyx":254
+ *     planners[4] = <fftw_generic_plan_guru>&_fftwf_plan_guru_dft_r2c
+ *     planners[5] = <fftw_generic_plan_guru>&_fftwl_plan_guru_dft_r2c
+ *     planners[6] = <fftw_generic_plan_guru>&_fftw_plan_guru_dft_c2r             # <<<<<<<<<<<<<<
+ *     planners[7] = <fftw_generic_plan_guru>&_fftwf_plan_guru_dft_c2r
+ *     planners[8] = <fftw_generic_plan_guru>&_fftwl_plan_guru_dft_c2r
+ */
+  (__pyx_v_6pyfftw_6pyfftw_planners[6]) = ((__pyx_t_6pyfftw_6pyfftw_fftw_generic_plan_guru)(&__pyx_f_6pyfftw_6pyfftw__fftw_plan_guru_dft_c2r));
+
+  /* "pyfftw/pyfftw.pyx":255
+ *     planners[5] = <fftw_generic_plan_guru>&_fftwl_plan_guru_dft_r2c
+ *     planners[6] = <fftw_generic_plan_guru>&_fftw_plan_guru_dft_c2r
+ *     planners[7] = <fftw_generic_plan_guru>&_fftwf_plan_guru_dft_c2r             # <<<<<<<<<<<<<<
+ *     planners[8] = <fftw_generic_plan_guru>&_fftwl_plan_guru_dft_c2r
+ * 
+ */
+  (__pyx_v_6pyfftw_6pyfftw_planners[7]) = ((__pyx_t_6pyfftw_6pyfftw_fftw_generic_plan_guru)(&__pyx_f_6pyfftw_6pyfftw__fftwf_plan_guru_dft_c2r));
+
+  /* "pyfftw/pyfftw.pyx":256
+ *     planners[6] = <fftw_generic_plan_guru>&_fftw_plan_guru_dft_c2r
+ *     planners[7] = <fftw_generic_plan_guru>&_fftwf_plan_guru_dft_c2r
+ *     planners[8] = <fftw_generic_plan_guru>&_fftwl_plan_guru_dft_c2r             # <<<<<<<<<<<<<<
+ * 
+ * # Executor table (of size the number of executors)
+ */
+  (__pyx_v_6pyfftw_6pyfftw_planners[8]) = ((__pyx_t_6pyfftw_6pyfftw_fftw_generic_plan_guru)(&__pyx_f_6pyfftw_6pyfftw__fftwl_plan_guru_dft_c2r));
+
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pyfftw/pyfftw.pyx":261
+ * cdef fftw_generic_execute executors[9]
+ * 
+ * cdef fftw_generic_execute * _build_executor_list():             # <<<<<<<<<<<<<<
+ * 
+ *     executors[0] = <fftw_generic_execute>&_fftw_execute_dft
+ */
+
+static __pyx_t_6pyfftw_6pyfftw_fftw_generic_execute *__pyx_f_6pyfftw_6pyfftw__build_executor_list(void) {
+  __pyx_t_6pyfftw_6pyfftw_fftw_generic_execute *__pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("_build_executor_list", 0);
+
+  /* "pyfftw/pyfftw.pyx":263
+ * cdef fftw_generic_execute * _build_executor_list():
+ * 
+ *     executors[0] = <fftw_generic_execute>&_fftw_execute_dft             # <<<<<<<<<<<<<<
+ *     executors[1] = <fftw_generic_execute>&_fftwf_execute_dft
+ *     executors[2] = <fftw_generic_execute>&_fftwl_execute_dft
+ */
+  (__pyx_v_6pyfftw_6pyfftw_executors[0]) = ((__pyx_t_6pyfftw_6pyfftw_fftw_generic_execute)(&__pyx_f_6pyfftw_6pyfftw__fftw_execute_dft));
+
+  /* "pyfftw/pyfftw.pyx":264
+ * 
+ *     executors[0] = <fftw_generic_execute>&_fftw_execute_dft
+ *     executors[1] = <fftw_generic_execute>&_fftwf_execute_dft             # <<<<<<<<<<<<<<
+ *     executors[2] = <fftw_generic_execute>&_fftwl_execute_dft
+ *     executors[3] = <fftw_generic_execute>&_fftw_execute_dft_r2c
+ */
+  (__pyx_v_6pyfftw_6pyfftw_executors[1]) = ((__pyx_t_6pyfftw_6pyfftw_fftw_generic_execute)(&__pyx_f_6pyfftw_6pyfftw__fftwf_execute_dft));
+
+  /* "pyfftw/pyfftw.pyx":265
+ *     executors[0] = <fftw_generic_execute>&_fftw_execute_dft
+ *     executors[1] = <fftw_generic_execute>&_fftwf_execute_dft
+ *     executors[2] = <fftw_generic_execute>&_fftwl_execute_dft             # <<<<<<<<<<<<<<
+ *     executors[3] = <fftw_generic_execute>&_fftw_execute_dft_r2c
+ *     executors[4] = <fftw_generic_execute>&_fftwf_execute_dft_r2c
+ */
+  (__pyx_v_6pyfftw_6pyfftw_executors[2]) = ((__pyx_t_6pyfftw_6pyfftw_fftw_generic_execute)(&__pyx_f_6pyfftw_6pyfftw__fftwl_execute_dft));
+
+  /* "pyfftw/pyfftw.pyx":266
+ *     executors[1] = <fftw_generic_execute>&_fftwf_execute_dft
+ *     executors[2] = <fftw_generic_execute>&_fftwl_execute_dft
+ *     executors[3] = <fftw_generic_execute>&_fftw_execute_dft_r2c             # <<<<<<<<<<<<<<
+ *     executors[4] = <fftw_generic_execute>&_fftwf_execute_dft_r2c
+ *     executors[5] = <fftw_generic_execute>&_fftwl_execute_dft_r2c
+ */
+  (__pyx_v_6pyfftw_6pyfftw_executors[3]) = ((__pyx_t_6pyfftw_6pyfftw_fftw_generic_execute)(&__pyx_f_6pyfftw_6pyfftw__fftw_execute_dft_r2c));
+
+  /* "pyfftw/pyfftw.pyx":267
+ *     executors[2] = <fftw_generic_execute>&_fftwl_execute_dft
+ *     executors[3] = <fftw_generic_execute>&_fftw_execute_dft_r2c
+ *     executors[4] = <fftw_generic_execute>&_fftwf_execute_dft_r2c             # <<<<<<<<<<<<<<
+ *     executors[5] = <fftw_generic_execute>&_fftwl_execute_dft_r2c
+ *     executors[6] = <fftw_generic_execute>&_fftw_execute_dft_c2r
+ */
+  (__pyx_v_6pyfftw_6pyfftw_executors[4]) = ((__pyx_t_6pyfftw_6pyfftw_fftw_generic_execute)(&__pyx_f_6pyfftw_6pyfftw__fftwf_execute_dft_r2c));
+
+  /* "pyfftw/pyfftw.pyx":268
+ *     executors[3] = <fftw_generic_execute>&_fftw_execute_dft_r2c
+ *     executors[4] = <fftw_generic_execute>&_fftwf_execute_dft_r2c
+ *     executors[5] = <fftw_generic_execute>&_fftwl_execute_dft_r2c             # <<<<<<<<<<<<<<
+ *     executors[6] = <fftw_generic_execute>&_fftw_execute_dft_c2r
+ *     executors[7] = <fftw_generic_execute>&_fftwf_execute_dft_c2r
+ */
+  (__pyx_v_6pyfftw_6pyfftw_executors[5]) = ((__pyx_t_6pyfftw_6pyfftw_fftw_generic_execute)(&__pyx_f_6pyfftw_6pyfftw__fftwl_execute_dft_r2c));
+
+  /* "pyfftw/pyfftw.pyx":269
+ *     executors[4] = <fftw_generic_execute>&_fftwf_execute_dft_r2c
+ *     executors[5] = <fftw_generic_execute>&_fftwl_execute_dft_r2c
+ *     executors[6] = <fftw_generic_execute>&_fftw_execute_dft_c2r             # <<<<<<<<<<<<<<
+ *     executors[7] = <fftw_generic_execute>&_fftwf_execute_dft_c2r
+ *     executors[8] = <fftw_generic_execute>&_fftwl_execute_dft_c2r
+ */
+  (__pyx_v_6pyfftw_6pyfftw_executors[6]) = ((__pyx_t_6pyfftw_6pyfftw_fftw_generic_execute)(&__pyx_f_6pyfftw_6pyfftw__fftw_execute_dft_c2r));
+
+  /* "pyfftw/pyfftw.pyx":270
+ *     executors[5] = <fftw_generic_execute>&_fftwl_execute_dft_r2c
+ *     executors[6] = <fftw_generic_execute>&_fftw_execute_dft_c2r
+ *     executors[7] = <fftw_generic_execute>&_fftwf_execute_dft_c2r             # <<<<<<<<<<<<<<
+ *     executors[8] = <fftw_generic_execute>&_fftwl_execute_dft_c2r
+ * 
+ */
+  (__pyx_v_6pyfftw_6pyfftw_executors[7]) = ((__pyx_t_6pyfftw_6pyfftw_fftw_generic_execute)(&__pyx_f_6pyfftw_6pyfftw__fftwf_execute_dft_c2r));
+
+  /* "pyfftw/pyfftw.pyx":271
+ *     executors[6] = <fftw_generic_execute>&_fftw_execute_dft_c2r
+ *     executors[7] = <fftw_generic_execute>&_fftwf_execute_dft_c2r
+ *     executors[8] = <fftw_generic_execute>&_fftwl_execute_dft_c2r             # <<<<<<<<<<<<<<
+ * 
+ * # Destroyer table (of size the number of destroyers)
+ */
+  (__pyx_v_6pyfftw_6pyfftw_executors[8]) = ((__pyx_t_6pyfftw_6pyfftw_fftw_generic_execute)(&__pyx_f_6pyfftw_6pyfftw__fftwl_execute_dft_c2r));
+
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pyfftw/pyfftw.pyx":276
+ * cdef fftw_generic_destroy_plan destroyers[3]
+ * 
+ * cdef fftw_generic_destroy_plan * _build_destroyer_list():             # <<<<<<<<<<<<<<
+ * 
+ *     destroyers[0] = <fftw_generic_destroy_plan>&_fftw_destroy_plan
+ */
+
+static __pyx_t_6pyfftw_6pyfftw_fftw_generic_destroy_plan *__pyx_f_6pyfftw_6pyfftw__build_destroyer_list(void) {
+  __pyx_t_6pyfftw_6pyfftw_fftw_generic_destroy_plan *__pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("_build_destroyer_list", 0);
+
+  /* "pyfftw/pyfftw.pyx":278
+ * cdef fftw_generic_destroy_plan * _build_destroyer_list():
+ * 
+ *     destroyers[0] = <fftw_generic_destroy_plan>&_fftw_destroy_plan             # <<<<<<<<<<<<<<
+ *     destroyers[1] = <fftw_generic_destroy_plan>&_fftwf_destroy_plan
+ *     destroyers[2] = <fftw_generic_destroy_plan>&_fftwl_destroy_plan
+ */
+  (__pyx_v_6pyfftw_6pyfftw_destroyers[0]) = ((__pyx_t_6pyfftw_6pyfftw_fftw_generic_destroy_plan)(&__pyx_f_6pyfftw_6pyfftw__fftw_destroy_plan));
+
+  /* "pyfftw/pyfftw.pyx":279
+ * 
+ *     destroyers[0] = <fftw_generic_destroy_plan>&_fftw_destroy_plan
+ *     destroyers[1] = <fftw_generic_destroy_plan>&_fftwf_destroy_plan             # <<<<<<<<<<<<<<
+ *     destroyers[2] = <fftw_generic_destroy_plan>&_fftwl_destroy_plan
+ * 
+ */
+  (__pyx_v_6pyfftw_6pyfftw_destroyers[1]) = ((__pyx_t_6pyfftw_6pyfftw_fftw_generic_destroy_plan)(&__pyx_f_6pyfftw_6pyfftw__fftwf_destroy_plan));
+
+  /* "pyfftw/pyfftw.pyx":280
+ *     destroyers[0] = <fftw_generic_destroy_plan>&_fftw_destroy_plan
+ *     destroyers[1] = <fftw_generic_destroy_plan>&_fftwf_destroy_plan
+ *     destroyers[2] = <fftw_generic_destroy_plan>&_fftwl_destroy_plan             # <<<<<<<<<<<<<<
+ * 
+ * 
+ */
+  (__pyx_v_6pyfftw_6pyfftw_destroyers[2]) = ((__pyx_t_6pyfftw_6pyfftw_fftw_generic_destroy_plan)(&__pyx_f_6pyfftw_6pyfftw__fftwl_destroy_plan));
+
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pyfftw/pyfftw.pyx":286
+ * cdef fftw_generic_plan_with_nthreads nthreads_plan_setters[3]
+ * 
+ * cdef fftw_generic_plan_with_nthreads * _build_nthreads_plan_setters_list():             # <<<<<<<<<<<<<<
+ *     nthreads_plan_setters[0] = (
+ *             <fftw_generic_plan_with_nthreads>&fftw_plan_with_nthreads)
+ */
+
+static __pyx_t_6pyfftw_6pyfftw_fftw_generic_plan_with_nthreads *__pyx_f_6pyfftw_6pyfftw__build_nthreads_plan_setters_list(void) {
+  __pyx_t_6pyfftw_6pyfftw_fftw_generic_plan_with_nthreads *__pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("_build_nthreads_plan_setters_list", 0);
+
+  /* "pyfftw/pyfftw.pyx":287
+ * 
+ * cdef fftw_generic_plan_with_nthreads * _build_nthreads_plan_setters_list():
+ *     nthreads_plan_setters[0] = (             # <<<<<<<<<<<<<<
+ *             <fftw_generic_plan_with_nthreads>&fftw_plan_with_nthreads)
+ *     nthreads_plan_setters[1] = (
+ */
+  (__pyx_v_6pyfftw_6pyfftw_nthreads_plan_setters[0]) = ((__pyx_t_6pyfftw_6pyfftw_fftw_generic_plan_with_nthreads)(&fftw_plan_with_nthreads));
+
+  /* "pyfftw/pyfftw.pyx":289
+ *     nthreads_plan_setters[0] = (
+ *             <fftw_generic_plan_with_nthreads>&fftw_plan_with_nthreads)
+ *     nthreads_plan_setters[1] = (             # <<<<<<<<<<<<<<
+ *             <fftw_generic_plan_with_nthreads>&fftwf_plan_with_nthreads)
+ *     nthreads_plan_setters[2] = (
+ */
+  (__pyx_v_6pyfftw_6pyfftw_nthreads_plan_setters[1]) = ((__pyx_t_6pyfftw_6pyfftw_fftw_generic_plan_with_nthreads)(&fftwf_plan_with_nthreads));
+
+  /* "pyfftw/pyfftw.pyx":291
+ *     nthreads_plan_setters[1] = (
+ *             <fftw_generic_plan_with_nthreads>&fftwf_plan_with_nthreads)
+ *     nthreads_plan_setters[2] = (             # <<<<<<<<<<<<<<
+ *             <fftw_generic_plan_with_nthreads>&fftwl_plan_with_nthreads)
+ * 
+ */
+  (__pyx_v_6pyfftw_6pyfftw_nthreads_plan_setters[2]) = ((__pyx_t_6pyfftw_6pyfftw_fftw_generic_plan_with_nthreads)(&fftwl_plan_with_nthreads));
+
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pyfftw/pyfftw.pyx":297
+ * cdef fftw_generic_set_timelimit set_timelimit_funcs[3]
+ * 
+ * cdef fftw_generic_set_timelimit * _build_set_timelimit_funcs_list():             # <<<<<<<<<<<<<<
+ *     set_timelimit_funcs[0] = (
+ *             <fftw_generic_set_timelimit>&fftw_set_timelimit)
+ */
+
+static __pyx_t_6pyfftw_6pyfftw_fftw_generic_set_timelimit *__pyx_f_6pyfftw_6pyfftw__build_set_timelimit_funcs_list(void) {
+  __pyx_t_6pyfftw_6pyfftw_fftw_generic_set_timelimit *__pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("_build_set_timelimit_funcs_list", 0);
+
+  /* "pyfftw/pyfftw.pyx":298
+ * 
+ * cdef fftw_generic_set_timelimit * _build_set_timelimit_funcs_list():
+ *     set_timelimit_funcs[0] = (             # <<<<<<<<<<<<<<
+ *             <fftw_generic_set_timelimit>&fftw_set_timelimit)
+ *     set_timelimit_funcs[1] = (
+ */
+  (__pyx_v_6pyfftw_6pyfftw_set_timelimit_funcs[0]) = ((__pyx_t_6pyfftw_6pyfftw_fftw_generic_set_timelimit)(&fftw_set_timelimit));
+
+  /* "pyfftw/pyfftw.pyx":300
+ *     set_timelimit_funcs[0] = (
+ *             <fftw_generic_set_timelimit>&fftw_set_timelimit)
+ *     set_timelimit_funcs[1] = (             # <<<<<<<<<<<<<<
+ *             <fftw_generic_set_timelimit>&fftwf_set_timelimit)
+ *     set_timelimit_funcs[2] = (
+ */
+  (__pyx_v_6pyfftw_6pyfftw_set_timelimit_funcs[1]) = ((__pyx_t_6pyfftw_6pyfftw_fftw_generic_set_timelimit)(&fftwf_set_timelimit));
+
+  /* "pyfftw/pyfftw.pyx":302
+ *     set_timelimit_funcs[1] = (
+ *             <fftw_generic_set_timelimit>&fftwf_set_timelimit)
+ *     set_timelimit_funcs[2] = (             # <<<<<<<<<<<<<<
+ *             <fftw_generic_set_timelimit>&fftwl_set_timelimit)
+ * 
+ */
+  (__pyx_v_6pyfftw_6pyfftw_set_timelimit_funcs[2]) = ((__pyx_t_6pyfftw_6pyfftw_fftw_generic_set_timelimit)(&fftwl_set_timelimit));
+
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pyfftw/pyfftw.pyx":309
+ * cdef validator validators[2]
+ * 
+ * cdef validator * _build_validators_list():             # <<<<<<<<<<<<<<
+ *     validators[0] = &_validate_r2c_arrays
+ *     validators[1] = &_validate_c2r_arrays
+ */
+
+static __pyx_t_6pyfftw_6pyfftw_validator *__pyx_f_6pyfftw_6pyfftw__build_validators_list(void) {
+  __pyx_t_6pyfftw_6pyfftw_validator *__pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("_build_validators_list", 0);
+
+  /* "pyfftw/pyfftw.pyx":310
+ * 
+ * cdef validator * _build_validators_list():
+ *     validators[0] = &_validate_r2c_arrays             # <<<<<<<<<<<<<<
+ *     validators[1] = &_validate_c2r_arrays
+ * 
+ */
+  (__pyx_v_6pyfftw_6pyfftw_validators[0]) = (&__pyx_f_6pyfftw_6pyfftw__validate_r2c_arrays);
+
+  /* "pyfftw/pyfftw.pyx":311
+ * cdef validator * _build_validators_list():
+ *     validators[0] = &_validate_r2c_arrays
+ *     validators[1] = &_validate_c2r_arrays             # <<<<<<<<<<<<<<
+ * 
+ * # Validator functions
+ */
+  (__pyx_v_6pyfftw_6pyfftw_validators[1]) = (&__pyx_f_6pyfftw_6pyfftw__validate_c2r_arrays);
+
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pyfftw/pyfftw.pyx":315
+ * # Validator functions
+ * # ===================
+ * cdef bint _validate_r2c_arrays(np.ndarray input_array,             # <<<<<<<<<<<<<<
+ *         np.ndarray output_array, int64_t *axes, int64_t *not_axes,
+ *         int64_t axes_length):
+ */
+
+static int __pyx_f_6pyfftw_6pyfftw__validate_r2c_arrays(PyArrayObject *__pyx_v_input_array, PyArrayObject *__pyx_v_output_array, int64_t *__pyx_v_axes, int64_t *__pyx_v_not_axes, int64_t __pyx_v_axes_length) {
+  npy_intp *__pyx_v_in_shape;
+  npy_intp *__pyx_v_out_shape;
+  long __pyx_v_n;
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
+  npy_intp *__pyx_t_2;
+  long __pyx_t_3;
+  long __pyx_t_4;
+  int64_t __pyx_t_5;
+  __Pyx_RefNannySetupContext("_validate_r2c_arrays", 0);
+
+  /* "pyfftw/pyfftw.pyx":323
+ *     # We firstly need to confirm that the dimenions of the arrays
+ *     # are the same
+ *     if not (input_array.ndim == output_array.ndim):             # <<<<<<<<<<<<<<
+ *         return False
+ * 
+ */
+  __pyx_t_1 = (!(__pyx_v_input_array->nd == __pyx_v_output_array->nd));
+  if (__pyx_t_1) {
+
+    /* "pyfftw/pyfftw.pyx":324
+ *     # are the same
+ *     if not (input_array.ndim == output_array.ndim):
+ *         return False             # <<<<<<<<<<<<<<
+ * 
+ *     in_shape = input_array.shape
+ */
+    __pyx_r = 0;
+    goto __pyx_L0;
+    goto __pyx_L3;
+  }
+  __pyx_L3:;
+
+  /* "pyfftw/pyfftw.pyx":326
+ *         return False
+ * 
+ *     in_shape = input_array.shape             # <<<<<<<<<<<<<<
+ *     out_shape = output_array.shape
+ * 
+ */
+  __pyx_t_2 = __pyx_v_input_array->dimensions;
+  __pyx_v_in_shape = __pyx_t_2;
+
+  /* "pyfftw/pyfftw.pyx":327
+ * 
+ *     in_shape = input_array.shape
+ *     out_shape = output_array.shape             # <<<<<<<<<<<<<<
+ * 
+ *     for n in range(axes_length - 1):
+ */
+  __pyx_t_2 = __pyx_v_output_array->dimensions;
+  __pyx_v_out_shape = __pyx_t_2;
+
+  /* "pyfftw/pyfftw.pyx":329
+ *     out_shape = output_array.shape
+ * 
+ *     for n in range(axes_length - 1):             # <<<<<<<<<<<<<<
+ *         if not out_shape[axes[n]] == in_shape[axes[n]]:
+ *             return False
+ */
+  __pyx_t_3 = (__pyx_v_axes_length - 1);
+  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
+    __pyx_v_n = __pyx_t_4;
+
+    /* "pyfftw/pyfftw.pyx":330
+ * 
+ *     for n in range(axes_length - 1):
+ *         if not out_shape[axes[n]] == in_shape[axes[n]]:             # <<<<<<<<<<<<<<
+ *             return False
+ * 
+ */
+    __pyx_t_1 = (!((__pyx_v_out_shape[(__pyx_v_axes[__pyx_v_n])]) == (__pyx_v_in_shape[(__pyx_v_axes[__pyx_v_n])])));
+    if (__pyx_t_1) {
+
+      /* "pyfftw/pyfftw.pyx":331
+ *     for n in range(axes_length - 1):
+ *         if not out_shape[axes[n]] == in_shape[axes[n]]:
+ *             return False             # <<<<<<<<<<<<<<
+ * 
+ *     # The critical axis is the last of those over which the
+ */
+      __pyx_r = 0;
+      goto __pyx_L0;
+      goto __pyx_L6;
+    }
+    __pyx_L6:;
+  }
+
+  /* "pyfftw/pyfftw.pyx":336
+ *     # FFT is taken.
+ *     if not (out_shape[axes[axes_length-1]]
+ *             == in_shape[axes[axes_length-1]]//2 + 1):             # <<<<<<<<<<<<<<
+ *         return False
+ * 
+ */
+  __pyx_t_1 = (!((__pyx_v_out_shape[(__pyx_v_axes[(__pyx_v_axes_length - 1)])]) == (__Pyx_div_long((__pyx_v_in_shape[(__pyx_v_axes[(__pyx_v_axes_length - 1)])]), 2) + 1)));
+  if (__pyx_t_1) {
+
+    /* "pyfftw/pyfftw.pyx":337
+ *     if not (out_shape[axes[axes_length-1]]
+ *             == in_shape[axes[axes_length-1]]//2 + 1):
+ *         return False             # <<<<<<<<<<<<<<
+ * 
+ *     for n in range(input_array.ndim - axes_length):
+ */
+    __pyx_r = 0;
+    goto __pyx_L0;
+    goto __pyx_L7;
+  }
+  __pyx_L7:;
+
+  /* "pyfftw/pyfftw.pyx":339
+ *         return False
+ * 
+ *     for n in range(input_array.ndim - axes_length):             # <<<<<<<<<<<<<<
+ *         if not out_shape[not_axes[n]] == in_shape[not_axes[n]]:
+ *             return False
+ */
+  __pyx_t_5 = (__pyx_v_input_array->nd - __pyx_v_axes_length);
+  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_5; __pyx_t_3+=1) {
+    __pyx_v_n = __pyx_t_3;
+
+    /* "pyfftw/pyfftw.pyx":340
+ * 
+ *     for n in range(input_array.ndim - axes_length):
+ *         if not out_shape[not_axes[n]] == in_shape[not_axes[n]]:             # <<<<<<<<<<<<<<
+ *             return False
+ * 
+ */
+    __pyx_t_1 = (!((__pyx_v_out_shape[(__pyx_v_not_axes[__pyx_v_n])]) == (__pyx_v_in_shape[(__pyx_v_not_axes[__pyx_v_n])])));
+    if (__pyx_t_1) {
+
+      /* "pyfftw/pyfftw.pyx":341
+ *     for n in range(input_array.ndim - axes_length):
+ *         if not out_shape[not_axes[n]] == in_shape[not_axes[n]]:
+ *             return False             # <<<<<<<<<<<<<<
+ * 
+ *     return True
+ */
+      __pyx_r = 0;
+      goto __pyx_L0;
+      goto __pyx_L10;
+    }
+    __pyx_L10:;
+  }
+
+  /* "pyfftw/pyfftw.pyx":343
+ *             return False
+ * 
+ *     return True             # <<<<<<<<<<<<<<
+ * 
+ * 
+ */
+  __pyx_r = 1;
+  goto __pyx_L0;
+
+  __pyx_r = 0;
+  __pyx_L0:;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pyfftw/pyfftw.pyx":346
+ * 
+ * 
+ * cdef bint _validate_c2r_arrays(np.ndarray input_array,             # <<<<<<<<<<<<<<
+ *         np.ndarray output_array, int64_t *axes, int64_t *not_axes,
+ *         int64_t axes_length):
+ */
+
+static int __pyx_f_6pyfftw_6pyfftw__validate_c2r_arrays(PyArrayObject *__pyx_v_input_array, PyArrayObject *__pyx_v_output_array, int64_t *__pyx_v_axes, int64_t *__pyx_v_not_axes, int64_t __pyx_v_axes_length) {
+  npy_intp *__pyx_v_in_shape;
+  npy_intp *__pyx_v_out_shape;
+  long __pyx_v_n;
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
+  npy_intp *__pyx_t_2;
+  long __pyx_t_3;
+  long __pyx_t_4;
+  int64_t __pyx_t_5;
+  __Pyx_RefNannySetupContext("_validate_c2r_arrays", 0);
+
+  /* "pyfftw/pyfftw.pyx":355
+ *     # We firstly need to confirm that the dimenions of the arrays
+ *     # are the same
+ *     if not (input_array.ndim == output_array.ndim):             # <<<<<<<<<<<<<<
+ *         return False
+ * 
+ */
+  __pyx_t_1 = (!(__pyx_v_input_array->nd == __pyx_v_output_array->nd));
+  if (__pyx_t_1) {
+
+    /* "pyfftw/pyfftw.pyx":356
+ *     # are the same
+ *     if not (input_array.ndim == output_array.ndim):
+ *         return False             # <<<<<<<<<<<<<<
+ * 
+ *     in_shape = input_array.shape
+ */
+    __pyx_r = 0;
+    goto __pyx_L0;
+    goto __pyx_L3;
+  }
+  __pyx_L3:;
+
+  /* "pyfftw/pyfftw.pyx":358
+ *         return False
+ * 
+ *     in_shape = input_array.shape             # <<<<<<<<<<<<<<
+ *     out_shape = output_array.shape
+ * 
+ */
+  __pyx_t_2 = __pyx_v_input_array->dimensions;
+  __pyx_v_in_shape = __pyx_t_2;
+
+  /* "pyfftw/pyfftw.pyx":359
+ * 
+ *     in_shape = input_array.shape
+ *     out_shape = output_array.shape             # <<<<<<<<<<<<<<
+ * 
+ *     for n in range(axes_length - 1):
+ */
+  __pyx_t_2 = __pyx_v_output_array->dimensions;
+  __pyx_v_out_shape = __pyx_t_2;
+
+  /* "pyfftw/pyfftw.pyx":361
+ *     out_shape = output_array.shape
+ * 
+ *     for n in range(axes_length - 1):             # <<<<<<<<<<<<<<
+ *         if not in_shape[axes[n]] == out_shape[axes[n]]:
+ *             return False
+ */
+  __pyx_t_3 = (__pyx_v_axes_length - 1);
+  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
+    __pyx_v_n = __pyx_t_4;
+
+    /* "pyfftw/pyfftw.pyx":362
+ * 
+ *     for n in range(axes_length - 1):
+ *         if not in_shape[axes[n]] == out_shape[axes[n]]:             # <<<<<<<<<<<<<<
+ *             return False
+ * 
+ */
+    __pyx_t_1 = (!((__pyx_v_in_shape[(__pyx_v_axes[__pyx_v_n])]) == (__pyx_v_out_shape[(__pyx_v_axes[__pyx_v_n])])));
+    if (__pyx_t_1) {
+
+      /* "pyfftw/pyfftw.pyx":363
+ *     for n in range(axes_length - 1):
+ *         if not in_shape[axes[n]] == out_shape[axes[n]]:
+ *             return False             # <<<<<<<<<<<<<<
+ * 
+ *     # The critical axis is the last of those over which the
+ */
+      __pyx_r = 0;
+      goto __pyx_L0;
+      goto __pyx_L6;
+    }
+    __pyx_L6:;
+  }
+
+  /* "pyfftw/pyfftw.pyx":368
+ *     # FFT is taken.
+ *     if not (in_shape[axes[axes_length-1]]
+ *             == out_shape[axes[axes_length-1]]//2 + 1):             # <<<<<<<<<<<<<<
+ *         return False
+ * 
+ */
+  __pyx_t_1 = (!((__pyx_v_in_shape[(__pyx_v_axes[(__pyx_v_axes_length - 1)])]) == (__Pyx_div_long((__pyx_v_out_shape[(__pyx_v_axes[(__pyx_v_axes_length - 1)])]), 2) + 1)));
+  if (__pyx_t_1) {
+
+    /* "pyfftw/pyfftw.pyx":369
+ *     if not (in_shape[axes[axes_length-1]]
+ *             == out_shape[axes[axes_length-1]]//2 + 1):
+ *         return False             # <<<<<<<<<<<<<<
+ * 
+ *     for n in range(input_array.ndim - axes_length):
+ */
+    __pyx_r = 0;
+    goto __pyx_L0;
+    goto __pyx_L7;
+  }
+  __pyx_L7:;
+
+  /* "pyfftw/pyfftw.pyx":371
+ *         return False
+ * 
+ *     for n in range(input_array.ndim - axes_length):             # <<<<<<<<<<<<<<
+ *         if not in_shape[not_axes[n]] == out_shape[not_axes[n]]:
+ *             return False
+ */
+  __pyx_t_5 = (__pyx_v_input_array->nd - __pyx_v_axes_length);
+  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_5; __pyx_t_3+=1) {
+    __pyx_v_n = __pyx_t_3;
+
+    /* "pyfftw/pyfftw.pyx":372
+ * 
+ *     for n in range(input_array.ndim - axes_length):
+ *         if not in_shape[not_axes[n]] == out_shape[not_axes[n]]:             # <<<<<<<<<<<<<<
+ *             return False
+ * 
+ */
+    __pyx_t_1 = (!((__pyx_v_in_shape[(__pyx_v_not_axes[__pyx_v_n])]) == (__pyx_v_out_shape[(__pyx_v_not_axes[__pyx_v_n])])));
+    if (__pyx_t_1) {
+
+      /* "pyfftw/pyfftw.pyx":373
+ *     for n in range(input_array.ndim - axes_length):
+ *         if not in_shape[not_axes[n]] == out_shape[not_axes[n]]:
+ *             return False             # <<<<<<<<<<<<<<
+ * 
+ *     return True
+ */
+      __pyx_r = 0;
+      goto __pyx_L0;
+      goto __pyx_L10;
+    }
+    __pyx_L10:;
+  }
+
+  /* "pyfftw/pyfftw.pyx":375
+ *             return False
+ * 
+ *     return True             # <<<<<<<<<<<<<<
+ * 
+ * 
+ */
+  __pyx_r = 1;
+  goto __pyx_L0;
+
+  __pyx_r = 0;
+  __pyx_L0:;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static PyObject *__pyx_pw_6pyfftw_6pyfftw_7_lookup_shape_r2c_arrays(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_6pyfftw_6pyfftw_7_lookup_shape_r2c_arrays = {__Pyx_NAMESTR("_lookup_shape_r2c_arrays"), (PyCFunction)__pyx_pw_6pyfftw_6pyfftw_7_lookup_shape_r2c_arrays, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
+static PyObject *__pyx_pw_6pyfftw_6pyfftw_7_lookup_shape_r2c_arrays(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  PyObject *__pyx_v_input_array = 0;
+  CYTHON_UNUSED PyObject *__pyx_v_output_array = 0;
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("_lookup_shape_r2c_arrays (wrapper)", 0);
+  {
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__input_array,&__pyx_n_s__output_array,0};
+    PyObject* values[2] = {0,0};
+    if (unlikely(__pyx_kwds)) {
+      Py_ssize_t kw_args;
+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+      switch (pos_args) {
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        case  0: break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+      kw_args = PyDict_Size(__pyx_kwds);
+      switch (pos_args) {
+        case  0:
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__input_array)) != 0)) kw_args--;
+        else goto __pyx_L5_argtuple_error;
+        case  1:
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__output_array)) != 0)) kw_args--;
+        else {
+          __Pyx_RaiseArgtupleInvalid("_lookup_shape_r2c_arrays", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        }
+      }
+      if (unlikely(kw_args > 0)) {
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_lookup_shape_r2c_arrays") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      }
+    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+      goto __pyx_L5_argtuple_error;
+    } else {
+      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+    }
+    __pyx_v_input_array = values[0];
+    __pyx_v_output_array = values[1];
+  }
+  goto __pyx_L4_argument_unpacking_done;
+  __pyx_L5_argtuple_error:;
+  __Pyx_RaiseArgtupleInvalid("_lookup_shape_r2c_arrays", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_AddTraceback("pyfftw.pyfftw._lookup_shape_r2c_arrays", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_RefNannyFinishContext();
+  return NULL;
+  __pyx_L4_argument_unpacking_done:;
+  __pyx_r = __pyx_pf_6pyfftw_6pyfftw_6_lookup_shape_r2c_arrays(__pyx_self, __pyx_v_input_array, __pyx_v_output_array);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pyfftw/pyfftw.pyx":380
+ * # Shape lookup functions
+ * # ======================
+ * def _lookup_shape_r2c_arrays(input_array, output_array):             # <<<<<<<<<<<<<<
+ *     return input_array.shape
+ * 
+ */
+
+static PyObject *__pyx_pf_6pyfftw_6pyfftw_6_lookup_shape_r2c_arrays(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_input_array, CYTHON_UNUSED PyObject *__pyx_v_output_array) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("_lookup_shape_r2c_arrays", 0);
+
+  /* "pyfftw/pyfftw.pyx":381
+ * # ======================
+ * def _lookup_shape_r2c_arrays(input_array, output_array):
+ *     return input_array.shape             # <<<<<<<<<<<<<<
+ * 
+ * def _lookup_shape_c2r_arrays(input_array, output_array):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = PyObject_GetAttr(__pyx_v_input_array, __pyx_n_s__shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 381; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("pyfftw.pyfftw._lookup_shape_r2c_arrays", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static PyObject *__pyx_pw_6pyfftw_6pyfftw_9_lookup_shape_c2r_arrays(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_6pyfftw_6pyfftw_9_lookup_shape_c2r_arrays = {__Pyx_NAMESTR("_lookup_shape_c2r_arrays"), (PyCFunction)__pyx_pw_6pyfftw_6pyfftw_9_lookup_shape_c2r_arrays, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
+static PyObject *__pyx_pw_6pyfftw_6pyfftw_9_lookup_shape_c2r_arrays(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  CYTHON_UNUSED PyObject *__pyx_v_input_array = 0;
+  PyObject *__pyx_v_output_array = 0;
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("_lookup_shape_c2r_arrays (wrapper)", 0);
+  {
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__input_array,&__pyx_n_s__output_array,0};
+    PyObject* values[2] = {0,0};
+    if (unlikely(__pyx_kwds)) {
+      Py_ssize_t kw_args;
+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+      switch (pos_args) {
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        case  0: break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+      kw_args = PyDict_Size(__pyx_kwds);
+      switch (pos_args) {
+        case  0:
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__input_array)) != 0)) kw_args--;
+        else goto __pyx_L5_argtuple_error;
+        case  1:
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__output_array)) != 0)) kw_args--;
+        else {
+          __Pyx_RaiseArgtupleInvalid("_lookup_shape_c2r_arrays", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        }
+      }
+      if (unlikely(kw_args > 0)) {
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_lookup_shape_c2r_arrays") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      }
+    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+      goto __pyx_L5_argtuple_error;
+    } else {
+      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+    }
+    __pyx_v_input_array = values[0];
+    __pyx_v_output_array = values[1];
+  }
+  goto __pyx_L4_argument_unpacking_done;
+  __pyx_L5_argtuple_error:;
+  __Pyx_RaiseArgtupleInvalid("_lookup_shape_c2r_arrays", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_AddTraceback("pyfftw.pyfftw._lookup_shape_c2r_arrays", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_RefNannyFinishContext();
+  return NULL;
+  __pyx_L4_argument_unpacking_done:;
+  __pyx_r = __pyx_pf_6pyfftw_6pyfftw_8_lookup_shape_c2r_arrays(__pyx_self, __pyx_v_input_array, __pyx_v_output_array);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pyfftw/pyfftw.pyx":383
+ *     return input_array.shape
+ * 
+ * def _lookup_shape_c2r_arrays(input_array, output_array):             # <<<<<<<<<<<<<<
+ *     return output_array.shape
+ * 
+ */
+
+static PyObject *__pyx_pf_6pyfftw_6pyfftw_8_lookup_shape_c2r_arrays(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_input_array, PyObject *__pyx_v_output_array) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("_lookup_shape_c2r_arrays", 0);
+
+  /* "pyfftw/pyfftw.pyx":384
+ * 
+ * def _lookup_shape_c2r_arrays(input_array, output_array):
+ *     return output_array.shape             # <<<<<<<<<<<<<<
+ * 
+ * # fftw_schemes is a dictionary with a mapping from a keys,
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = PyObject_GetAttr(__pyx_v_output_array, __pyx_n_s__shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("pyfftw.pyfftw._lookup_shape_c2r_arrays", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pyfftw/pyfftw.pyx":490
+ * 
+ * # Set the cleanup routine
+ * cdef void _cleanup():             # <<<<<<<<<<<<<<
+ *     fftw_cleanup()
+ *     fftwf_cleanup()
+ */
+
+static void __pyx_f_6pyfftw_6pyfftw__cleanup(void) {
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("_cleanup", 0);
+
+  /* "pyfftw/pyfftw.pyx":491
+ * # Set the cleanup routine
+ * cdef void _cleanup():
+ *     fftw_cleanup()             # <<<<<<<<<<<<<<
+ *     fftwf_cleanup()
+ *     fftwl_cleanup()
+ */
+  fftw_cleanup();
+
+  /* "pyfftw/pyfftw.pyx":492
+ * cdef void _cleanup():
+ *     fftw_cleanup()
+ *     fftwf_cleanup()             # <<<<<<<<<<<<<<
+ *     fftwl_cleanup()
+ *     fftw_cleanup_threads()
+ */
+  fftwf_cleanup();
+
+  /* "pyfftw/pyfftw.pyx":493
+ *     fftw_cleanup()
+ *     fftwf_cleanup()
+ *     fftwl_cleanup()             # <<<<<<<<<<<<<<
+ *     fftw_cleanup_threads()
+ *     fftwf_cleanup_threads()
+ */
+  fftwl_cleanup();
+
+  /* "pyfftw/pyfftw.pyx":494
+ *     fftwf_cleanup()
+ *     fftwl_cleanup()
+ *     fftw_cleanup_threads()             # <<<<<<<<<<<<<<
+ *     fftwf_cleanup_threads()
+ *     fftwl_cleanup_threads()
+ */
+  fftw_cleanup_threads();
+
+  /* "pyfftw/pyfftw.pyx":495
+ *     fftwl_cleanup()
+ *     fftw_cleanup_threads()
+ *     fftwf_cleanup_threads()             # <<<<<<<<<<<<<<
+ *     fftwl_cleanup_threads()
+ * 
+ */
+  fftwf_cleanup_threads();
+
+  /* "pyfftw/pyfftw.pyx":496
+ *     fftw_cleanup_threads()
+ *     fftwf_cleanup_threads()
+ *     fftwl_cleanup_threads()             # <<<<<<<<<<<<<<
+ * 
+ * Py_AtExit(_cleanup)
+ */
+  fftwl_cleanup_threads();
+
+  __Pyx_RefNannyFinishContext();
+}
+
+/* "pyfftw/pyfftw.pyx":501
+ * 
+ * # Helper functions
+ * cdef void make_axes_unique(int64_t *axes, int64_t axes_length,             # <<<<<<<<<<<<<<
+ *         int64_t **unique_axes, int64_t **not_axes, int64_t dimensions,
+ *         int64_t *unique_axes_length):
+ */
+
+static void __pyx_f_6pyfftw_6pyfftw_make_axes_unique(int64_t *__pyx_v_axes, int64_t __pyx_v_axes_length, int64_t **__pyx_v_unique_axes, int64_t **__pyx_v_not_axes, int64_t __pyx_v_dimensions, int64_t *__pyx_v_unique_axes_length) {
+  int64_t __pyx_v_unique_axes_count;
+  int64_t __pyx_v_holding_offset;
+  int64_t *__pyx_v_axes_holding;
+  int64_t *__pyx_v_axes_holding_offset;
+  int64_t __pyx_v_n;
+  int64_t __pyx_v_not_axes_count;
+  __Pyx_RefNannyDeclarations
+  int64_t __pyx_t_1;
+  int64_t __pyx_t_2;
+  int __pyx_t_3;
+  __Pyx_RefNannySetupContext("make_axes_unique", 0);
+
+  /* "pyfftw/pyfftw.pyx":516
+ *     '''
+ * 
+ *     cdef int64_t unique_axes_count = 0             # <<<<<<<<<<<<<<
+ *     cdef int64_t holding_offset = 0
+ * 
+ */
+  __pyx_v_unique_axes_count = 0;
+
+  /* "pyfftw/pyfftw.pyx":517
+ * 
+ *     cdef int64_t unique_axes_count = 0
+ *     cdef int64_t holding_offset = 0             # <<<<<<<<<<<<<<
+ * 
+ *     cdef int64_t *axes_holding = (
+ */
+  __pyx_v_holding_offset = 0;
+
+  /* "pyfftw/pyfftw.pyx":520
+ * 
+ *     cdef int64_t *axes_holding = (
+ *             <int64_t *>calloc(dimensions, sizeof(int64_t)))             # <<<<<<<<<<<<<<
+ *     cdef int64_t *axes_holding_offset = (
+ *             <int64_t *>calloc(dimensions, sizeof(int64_t)))
+ */
+  __pyx_v_axes_holding = ((int64_t *)calloc(__pyx_v_dimensions, (sizeof(int64_t))));
+
+  /* "pyfftw/pyfftw.pyx":522
+ *             <int64_t *>calloc(dimensions, sizeof(int64_t)))
+ *     cdef int64_t *axes_holding_offset = (
+ *             <int64_t *>calloc(dimensions, sizeof(int64_t)))             # <<<<<<<<<<<<<<
+ * 
+ *     for n in range(dimensions):
+ */
+  __pyx_v_axes_holding_offset = ((int64_t *)calloc(__pyx_v_dimensions, (sizeof(int64_t))));
+
+  /* "pyfftw/pyfftw.pyx":524
+ *             <int64_t *>calloc(dimensions, sizeof(int64_t)))
+ * 
+ *     for n in range(dimensions):             # <<<<<<<<<<<<<<
+ *         axes_holding[n] = -1
+ * 
+ */
+  __pyx_t_1 = __pyx_v_dimensions;
+  for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
+    __pyx_v_n = __pyx_t_2;
+
+    /* "pyfftw/pyfftw.pyx":525
+ * 
+ *     for n in range(dimensions):
+ *         axes_holding[n] = -1             # <<<<<<<<<<<<<<
+ * 
+ *     # Iterate over all the axes and store each index if it hasn't already
+ */
+    (__pyx_v_axes_holding[__pyx_v_n]) = -1;
+  }
+
+  /* "pyfftw/pyfftw.pyx":532
+ *     #
+ *     # axes_holding_offset holds the shift due to repeated axes
+ *     for n in range(axes_length):             # <<<<<<<<<<<<<<
+ *         if axes_holding[axes[n]] == -1:
+ *             axes_holding[axes[n]] = n
+ */
+  __pyx_t_1 = __pyx_v_axes_length;
+  for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
+    __pyx_v_n = __pyx_t_2;
+
+    /* "pyfftw/pyfftw.pyx":533
+ *     # axes_holding_offset holds the shift due to repeated axes
+ *     for n in range(axes_length):
+ *         if axes_holding[axes[n]] == -1:             # <<<<<<<<<<<<<<
+ *             axes_holding[axes[n]] = n
+ *             axes_holding_offset[axes[n]] = holding_offset
+ */
+    __pyx_t_3 = ((__pyx_v_axes_holding[(__pyx_v_axes[__pyx_v_n])]) == -1);
+    if (__pyx_t_3) {
+
+      /* "pyfftw/pyfftw.pyx":534
+ *     for n in range(axes_length):
+ *         if axes_holding[axes[n]] == -1:
+ *             axes_holding[axes[n]] = n             # <<<<<<<<<<<<<<
+ *             axes_holding_offset[axes[n]] = holding_offset
+ *             unique_axes_count += 1
+ */
+      (__pyx_v_axes_holding[(__pyx_v_axes[__pyx_v_n])]) = __pyx_v_n;
+
+      /* "pyfftw/pyfftw.pyx":535
+ *         if axes_holding[axes[n]] == -1:
+ *             axes_holding[axes[n]] = n
+ *             axes_holding_offset[axes[n]] = holding_offset             # <<<<<<<<<<<<<<
+ *             unique_axes_count += 1
+ *         else:
+ */
+      (__pyx_v_axes_holding_offset[(__pyx_v_axes[__pyx_v_n])]) = __pyx_v_holding_offset;
+
+      /* "pyfftw/pyfftw.pyx":536
+ *             axes_holding[axes[n]] = n
+ *             axes_holding_offset[axes[n]] = holding_offset
+ *             unique_axes_count += 1             # <<<<<<<<<<<<<<
+ *         else:
+ *             holding_offset += 1
+ */
+      __pyx_v_unique_axes_count = (__pyx_v_unique_axes_count + 1);
+      goto __pyx_L7;
+    }
+    /*else*/ {
+
+      /* "pyfftw/pyfftw.pyx":538
+ *             unique_axes_count += 1
+ *         else:
+ *             holding_offset += 1             # <<<<<<<<<<<<<<
+ * 
+ *     unique_axes[0] = <int64_t *>malloc(
+ */
+      __pyx_v_holding_offset = (__pyx_v_holding_offset + 1);
+    }
+    __pyx_L7:;
+  }
+
+  /* "pyfftw/pyfftw.pyx":540
+ *             holding_offset += 1
+ * 
+ *     unique_axes[0] = <int64_t *>malloc(             # <<<<<<<<<<<<<<
+ *             unique_axes_count * sizeof(int64_t))
+ * 
+ */
+  (__pyx_v_unique_axes[0]) = ((int64_t *)malloc((__pyx_v_unique_axes_count * (sizeof(int64_t)))));
+
+  /* "pyfftw/pyfftw.pyx":543
+ *             unique_axes_count * sizeof(int64_t))
+ * 
+ *     not_axes[0] = <int64_t *>malloc(             # <<<<<<<<<<<<<<
+ *             (dimensions - unique_axes_count) * sizeof(int64_t))
+ * 
+ */
+  (__pyx_v_not_axes[0]) = ((int64_t *)malloc(((__pyx_v_dimensions - __pyx_v_unique_axes_count) * (sizeof(int64_t)))));
+
+  /* "pyfftw/pyfftw.pyx":547
+ * 
+ *     # Now we need to write back the unique axes to a tmp axes
+ *     cdef int64_t not_axes_count = 0             # <<<<<<<<<<<<<<
+ * 
+ *     for n in range(dimensions):
+ */
+  __pyx_v_not_axes_count = 0;
+
+  /* "pyfftw/pyfftw.pyx":549
+ *     cdef int64_t not_axes_count = 0
+ * 
+ *     for n in range(dimensions):             # <<<<<<<<<<<<<<
+ *         if axes_holding[n] != -1:
+ *             unique_axes[0][axes_holding[n] - axes_holding_offset[n]] = (
+ */
+  __pyx_t_1 = __pyx_v_dimensions;
+  for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
+    __pyx_v_n = __pyx_t_2;
+
+    /* "pyfftw/pyfftw.pyx":550
+ * 
+ *     for n in range(dimensions):
+ *         if axes_holding[n] != -1:             # <<<<<<<<<<<<<<
+ *             unique_axes[0][axes_holding[n] - axes_holding_offset[n]] = (
+ *                     axes[axes_holding[n]])
+ */
+    __pyx_t_3 = ((__pyx_v_axes_holding[__pyx_v_n]) != -1);
+    if (__pyx_t_3) {
+
+      /* "pyfftw/pyfftw.pyx":551
+ *     for n in range(dimensions):
+ *         if axes_holding[n] != -1:
+ *             unique_axes[0][axes_holding[n] - axes_holding_offset[n]] = (             # <<<<<<<<<<<<<<
+ *                     axes[axes_holding[n]])
+ * 
+ */
+      ((__pyx_v_unique_axes[0])[((__pyx_v_axes_holding[__pyx_v_n]) - (__pyx_v_axes_holding_offset[__pyx_v_n]))]) = (__pyx_v_axes[(__pyx_v_axes_holding[__pyx_v_n])]);
+      goto __pyx_L10;
+    }
+    /*else*/ {
+
+      /* "pyfftw/pyfftw.pyx":555
+ * 
+ *         else:
+ *             not_axes[0][not_axes_count] = n             # <<<<<<<<<<<<<<
+ *             not_axes_count += 1
+ * 
+ */
+      ((__pyx_v_not_axes[0])[__pyx_v_not_axes_count]) = __pyx_v_n;
+
+      /* "pyfftw/pyfftw.pyx":556
+ *         else:
+ *             not_axes[0][not_axes_count] = n
+ *             not_axes_count += 1             # <<<<<<<<<<<<<<
+ * 
+ *     free(axes_holding)
+ */
+      __pyx_v_not_axes_count = (__pyx_v_not_axes_count + 1);
+    }
+    __pyx_L10:;
+  }
+
+  /* "pyfftw/pyfftw.pyx":558
+ *             not_axes_count += 1
+ * 
+ *     free(axes_holding)             # <<<<<<<<<<<<<<
+ *     free(axes_holding_offset)
+ * 
+ */
+  free(__pyx_v_axes_holding);
+
+  /* "pyfftw/pyfftw.pyx":559
+ * 
+ *     free(axes_holding)
+ *     free(axes_holding_offset)             # <<<<<<<<<<<<<<
+ * 
+ *     unique_axes_length[0] = unique_axes_count
+ */
+  free(__pyx_v_axes_holding_offset);
+
+  /* "pyfftw/pyfftw.pyx":561
+ *     free(axes_holding_offset)
+ * 
+ *     unique_axes_length[0] = unique_axes_count             # <<<<<<<<<<<<<<
+ * 
+ *     return
+ */
+  (__pyx_v_unique_axes_length[0]) = __pyx_v_unique_axes_count;
+
+  /* "pyfftw/pyfftw.pyx":563
+ *     unique_axes_length[0] = unique_axes_count
+ * 
+ *     return             # <<<<<<<<<<<<<<
+ * 
+ * # The External Interface
+ */
+  goto __pyx_L0;
+
+  __pyx_L0:;
+  __Pyx_RefNannyFinishContext();
+}
+
+/* Python wrapper */
+static PyObject *__pyx_pw_6pyfftw_6pyfftw_4FFTW_1__get_N(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static char __pyx_doc_6pyfftw_6pyfftw_4FFTW___get_N[] = "\n        The product of the lengths of the DFT over all DFT axes.\n        1/N is the normalisation constant. For any input array A, \n        and for any set of axes, 1/N * ifft(fft(A)) = A\n        ";
+static PyObject *__pyx_pw_6pyfftw_6pyfftw_4FFTW_1__get_N(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get_N (wrapper)", 0);
+  __pyx_r = __pyx_pf_6pyfftw_6pyfftw_4FFTW___get_N(((struct __pyx_obj_6pyfftw_6pyfftw_FFTW *)__pyx_v_self));
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pyfftw/pyfftw.pyx":639
+ * 
+ *     cdef int __N
+ *     def __get_N(self):             # <<<<<<<<<<<<<<
+ *         '''
+ *         The product of the lengths of the DFT over all DFT axes.
+ */
+
+static PyObject *__pyx_pf_6pyfftw_6pyfftw_4FFTW___get_N(struct __pyx_obj_6pyfftw_6pyfftw_FFTW *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__get_N", 0);
+
+  /* "pyfftw/pyfftw.pyx":645
+ *         and for any set of axes, 1/N * ifft(fft(A)) = A
+ *         '''
+ *         return self.__N             # <<<<<<<<<<<<<<
+ * 
+ *     N = property(__get_N)
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = PyInt_FromLong(__pyx_v_self->__pyx___N); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("pyfftw.pyfftw.FFTW.__get_N", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static PyObject *__pyx_pw_6pyfftw_6pyfftw_4FFTW_3__get_simd_aligned(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static char __pyx_doc_6pyfftw_6pyfftw_4FFTW_2__get_simd_aligned[] = "\n        Return whether or not this FFTW object requires simd aligned\n        input and output data.\n        ";
+static PyObject *__pyx_pw_6pyfftw_6pyfftw_4FFTW_3__get_simd_aligned(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get_simd_aligned (wrapper)", 0);
+  __pyx_r = __pyx_pf_6pyfftw_6pyfftw_4FFTW_2__get_simd_aligned(((struct __pyx_obj_6pyfftw_6pyfftw_FFTW *)__pyx_v_self));
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pyfftw/pyfftw.pyx":649
+ *     N = property(__get_N)
+ * 
+ *     def __get_simd_aligned(self):             # <<<<<<<<<<<<<<
+ *         '''
+ *         Return whether or not this FFTW object requires simd aligned
+ */
+
+static PyObject *__pyx_pf_6pyfftw_6pyfftw_4FFTW_2__get_simd_aligned(struct __pyx_obj_6pyfftw_6pyfftw_FFTW *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__get_simd_aligned", 0);
+
+  /* "pyfftw/pyfftw.pyx":654
+ *         input and output data.
+ *         '''
+ *         return self.__simd_allowed             # <<<<<<<<<<<<<<
+ * 
+ *     simd_aligned = property(__get_simd_aligned)
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->__pyx___simd_allowed); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 654; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("pyfftw.pyfftw.FFTW.__get_simd_aligned", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static PyObject *__pyx_pw_6pyfftw_6pyfftw_4FFTW_5__get_input_alignment(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static char __pyx_doc_6pyfftw_6pyfftw_4FFTW_4__get_input_alignment[] = "\n        Returns the byte alignment of the input arrays for which the\n        :class:`~pyfftw.FFTW` object was created.\n\n        Input array updates with arrays that are not aligned on this\n        byte boundary will result in a ValueError being raised, or\n        a copy being made if the :meth:`~pyfftw.FFTW.__call__` \n        interface is used.\n        ";
+static PyObject *__pyx_pw_6pyfftw_6pyfftw_4FFTW_5__get_input_alignment(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get_input_alignment (wrapper)", 0);
+  __pyx_r = __pyx_pf_6pyfftw_6pyfftw_4FFTW_4__get_input_alignment(((struct __pyx_obj_6pyfftw_6pyfftw_FFTW *)__pyx_v_self));
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pyfftw/pyfftw.pyx":658
+ *     simd_aligned = property(__get_simd_aligned)
+ * 
+ *     def __get_input_alignment(self):             # <<<<<<<<<<<<<<
+ *         '''
+ *         Returns the byte alignment of the input arrays for which the
+ */
+
+static PyObject *__pyx_pf_6pyfftw_6pyfftw_4FFTW_4__get_input_alignment(struct __pyx_obj_6pyfftw_6pyfftw_FFTW *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__get_input_alignment", 0);
+
+  /* "pyfftw/pyfftw.pyx":668
+ *         interface is used.
+ *         '''
+ *         return self.__input_array_alignment             # <<<<<<<<<<<<<<
+ * 
+ *     input_alignment = property(__get_input_alignment)
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = PyInt_FromLong(__pyx_v_self->__pyx___input_array_alignment); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("pyfftw.pyfftw.FFTW.__get_input_alignment", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static PyObject *__pyx_pw_6pyfftw_6pyfftw_4FFTW_7__get_output_alignment(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static char __pyx_doc_6pyfftw_6pyfftw_4FFTW_6__get_output_alignment[] = "\n        Returns the byte alignment of the output arrays for which the\n        :class:`~pyfftw.FFTW` object was created.\n\n        Output array updates with arrays that are not aligned on this\n        byte boundary will result in a ValueError being raised.\n        ";
+static PyObject *__pyx_pw_6pyfftw_6pyfftw_4FFTW_7__get_output_alignment(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get_output_alignment (wrapper)", 0);
+  __pyx_r = __pyx_pf_6pyfftw_6pyfftw_4FFTW_6__get_output_alignment(((struct __pyx_obj_6pyfftw_6pyfftw_FFTW *)__pyx_v_self));
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pyfftw/pyfftw.pyx":672
+ *     input_alignment = property(__get_input_alignment)
+ * 
+ *     def __get_output_alignment(self):             # <<<<<<<<<<<<<<
+ *         '''
+ *         Returns the byte alignment of the output arrays for which the
+ */
+
+static PyObject *__pyx_pf_6pyfftw_6pyfftw_4FFTW_6__get_output_alignment(struct __pyx_obj_6pyfftw_6pyfftw_FFTW *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__get_output_alignment", 0);
+
+  /* "pyfftw/pyfftw.pyx":680
+ *         byte boundary will result in a ValueError being raised.
+ *         '''
+ *         return self.__output_array_alignment             # <<<<<<<<<<<<<<
+ * 
+ *     output_alignment = property(__get_output_alignment)
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = PyInt_FromLong(__pyx_v_self->__pyx___output_array_alignment); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 680; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("pyfftw.pyfftw.FFTW.__get_output_alignment", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static PyObject *__pyx_pw_6pyfftw_6pyfftw_4FFTW_9__get_flags_used(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static char __pyx_doc_6pyfftw_6pyfftw_4FFTW_8__get_flags_used[] = "\n        Return which flags were used to construct the FFTW object.\n        \n        This includes flags that were added during initialisation.\n        ";
+static PyObject *__pyx_pw_6pyfftw_6pyfftw_4FFTW_9__get_flags_used(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get_flags_used (wrapper)", 0);
+  __pyx_r = __pyx_pf_6pyfftw_6pyfftw_4FFTW_8__get_flags_used(((struct __pyx_obj_6pyfftw_6pyfftw_FFTW *)__pyx_v_self));
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pyfftw/pyfftw.pyx":684
+ *     output_alignment = property(__get_output_alignment)
+ * 
+ *     def __get_flags_used(self):             # <<<<<<<<<<<<<<
+ *         '''
+ *         Return which flags were used to construct the FFTW object.
+ */
+
+static PyObject *__pyx_pf_6pyfftw_6pyfftw_4FFTW_8__get_flags_used(struct __pyx_obj_6pyfftw_6pyfftw_FFTW *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__get_flags_used", 0);
+
+  /* "pyfftw/pyfftw.pyx":690
+ *         This includes flags that were added during initialisation.
+ *         '''
+ *         return tuple(self.__flags_used)             # <<<<<<<<<<<<<<
+ * 
+ *     flags = property(__get_flags_used)
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_INCREF(__pyx_v_self->__pyx___flags_used);
+  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->__pyx___flags_used);
+  __Pyx_GIVEREF(__pyx_v_self->__pyx___flags_used);
+  __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
+  __pyx_r = __pyx_t_2;
+  __pyx_t_2 = 0;
+  goto __pyx_L0;
+
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_AddTraceback("pyfftw.pyfftw.FFTW.__get_flags_used", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static int __pyx_pw_6pyfftw_6pyfftw_4FFTW_11__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static int __pyx_pw_6pyfftw_6pyfftw_4FFTW_11__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  PyObject *__pyx_v_input_array = 0;
+  PyObject *__pyx_v_output_array = 0;
+  PyObject *__pyx_v_axes = 0;
+  PyObject *__pyx_v_direction = 0;
+  PyObject *__pyx_v_flags = 0;
+  unsigned int __pyx_v_threads;
+  PyObject *__pyx_v_planning_timelimit = 0;
+  CYTHON_UNUSED PyObject *__pyx_v_args = 0;
+  CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0;
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
+  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return -1;
+  __Pyx_GOTREF(__pyx_v_kwargs);
+  if (PyTuple_GET_SIZE(__pyx_args) > 7) {
+    __pyx_v_args = PyTuple_GetSlice(__pyx_args, 7, PyTuple_GET_SIZE(__pyx_args));
+    if (unlikely(!__pyx_v_args)) {
+      __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
+      __Pyx_RefNannyFinishContext();
+      return -1;
+    }
+    __Pyx_GOTREF(__pyx_v_args);
+  } else {
+    __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
+  }
+  {
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__input_array,&__pyx_n_s__output_array,&__pyx_n_s__axes,&__pyx_n_s__direction,&__pyx_n_s__flags,&__pyx_n_s__threads,&__pyx_n_s__planning_timelimit,0};
+    PyObject* values[7] = {0,0,0,0,0,0,0};
+
+    /* "pyfftw/pyfftw.pyx":694
+ *     flags = property(__get_flags_used)
+ * 
+ *     def __cinit__(self, input_array, output_array, axes=(-1,),             # <<<<<<<<<<<<<<
+ *             direction='FFTW_FORWARD', flags=('FFTW_MEASURE',),
+ *             unsigned int threads=1, planning_timelimit=None,
+ */
+    values[2] = ((PyObject *)__pyx_k_tuple_5);
+    values[3] = ((PyObject *)__pyx_n_s__FFTW_FORWARD);
+
+    /* "pyfftw/pyfftw.pyx":695
+ * 
+ *     def __cinit__(self, input_array, output_array, axes=(-1,),
+ *             direction='FFTW_FORWARD', flags=('FFTW_MEASURE',),             # <<<<<<<<<<<<<<
+ *             unsigned int threads=1, planning_timelimit=None,
+ *             *args, **kwargs):
+ */
+    values[4] = ((PyObject *)__pyx_k_tuple_6);
+
+    /* "pyfftw/pyfftw.pyx":696
+ *     def __cinit__(self, input_array, output_array, axes=(-1,),
+ *             direction='FFTW_FORWARD', flags=('FFTW_MEASURE',),
+ *             unsigned int threads=1, planning_timelimit=None,             # <<<<<<<<<<<<<<
+ *             *args, **kwargs):
+ * 
+ */
+    values[6] = ((PyObject *)Py_None);
+    if (unlikely(__pyx_kwds)) {
+      Py_ssize_t kw_args;
+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+      switch (pos_args) {
+        default:
+        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
+        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        case  0: break;
+      }
+      kw_args = PyDict_Size(__pyx_kwds);
+      switch (pos_args) {
+        case  0:
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__input_array)) != 0)) kw_args--;
+        else goto __pyx_L5_argtuple_error;
+        case  1:
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__output_array)) != 0)) kw_args--;
+        else {
+          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 7, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        }
+        case  2:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__axes);
+          if (value) { values[2] = value; kw_args--; }
+        }
+        case  3:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__direction);
+          if (value) { values[3] = value; kw_args--; }
+        }
+        case  4:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__flags);
+          if (value) { values[4] = value; kw_args--; }
+        }
+        case  5:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__threads);
+          if (value) { values[5] = value; kw_args--; }
+        }
+        case  6:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__planning_timelimit);
+          if (value) { values[6] = value; kw_args--; }
+        }
+      }
+      if (unlikely(kw_args > 0)) {
+        const Py_ssize_t used_pos_args = (pos_args < 7) ? pos_args : 7;
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      }
+    } else {
+      switch (PyTuple_GET_SIZE(__pyx_args)) {
+        default:
+        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
+        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        break;
+        case  1:
+        case  0:
+        goto __pyx_L5_argtuple_error;
+      }
+    }
+    __pyx_v_input_array = values[0];
+    __pyx_v_output_array = values[1];
+    __pyx_v_axes = values[2];
+    __pyx_v_direction = values[3];
+    __pyx_v_flags = values[4];
+    if (values[5]) {
+      __pyx_v_threads = __Pyx_PyInt_AsUnsignedInt(values[5]); if (unlikely((__pyx_v_threads == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 696; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+    } else {
+      __pyx_v_threads = ((unsigned int)1);
+    }
+    __pyx_v_planning_timelimit = values[6];
+  }
+  goto __pyx_L4_argument_unpacking_done;
+  __pyx_L5_argtuple_error:;
+  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 7, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
+  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
+  __Pyx_AddTraceback("pyfftw.pyfftw.FFTW.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_RefNannyFinishContext();
+  return -1;
+  __pyx_L4_argument_unpacking_done:;
+  __pyx_r = __pyx_pf_6pyfftw_6pyfftw_4FFTW_10__cinit__(((struct __pyx_obj_6pyfftw_6pyfftw_FFTW *)__pyx_v_self), __pyx_v_input_array, __pyx_v_output_array, __pyx_v_axes, __pyx_v_direction, __pyx_v_flags, __pyx_v_threads, __pyx_v_planning_timelimit, __pyx_v_args, __pyx_v_kwargs);
+  __Pyx_XDECREF(__pyx_v_args);
+  __Pyx_XDECREF(__pyx_v_kwargs);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pyfftw/pyfftw.pyx":694
+ *     flags = property(__get_flags_used)
+ * 
+ *     def __cinit__(self, input_array, output_array, axes=(-1,),             # <<<<<<<<<<<<<<
+ *             direction='FFTW_FORWARD', flags=('FFTW_MEASURE',),
+ *             unsigned int threads=1, planning_timelimit=None,
+ */
+
+static int __pyx_pf_6pyfftw_6pyfftw_4FFTW_10__cinit__(struct __pyx_obj_6pyfftw_6pyfftw_FFTW *__pyx_v_self, PyObject *__pyx_v_input_array, PyObject *__pyx_v_output_array, PyObject *__pyx_v_axes, PyObject *__pyx_v_direction, PyObject *__pyx_v_flags, unsigned int __pyx_v_threads, PyObject *__pyx_v_planning_timelimit, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
+  double __pyx_v__planning_timelimit;
+  PyObject *__pyx_v_input_dtype = NULL;
+  PyObject *__pyx_v_output_dtype = NULL;
+  PyObject *__pyx_v_scheme = NULL;
+  PyObject *__pyx_v_functions = NULL;
+  __pyx_t_6pyfftw_6pyfftw_fftw_generic_set_timelimit __pyx_v_set_timelimit_func;
+  PyObject *__pyx_v_each_alignment = NULL;
+  PyObject *__pyx_v_n = NULL;
+  int64_t __pyx_v_array_dimension;
+  int64_t __pyx_v_unique_axes_length;
+  int64_t *__pyx_v_unique_axes;
+  int64_t *__pyx_v_not_axes;
+  PyObject *__pyx_v_total_N = NULL;
+  __pyx_t_6pyfftw_6pyfftw_validator __pyx_v__validator;
+  PyObject *__pyx_v_each_flag = NULL;
+  int __pyx_v_i;
+  PyObject *__pyx_v_fft_shape_lookup = NULL;
+  PyObject *__pyx_v_fft_shape = NULL;
+  PyObject *__pyx_v_input_strides_array = NULL;
+  PyObject *__pyx_v_output_strides_array = NULL;
+  PyObject *__pyx_v_stride = NULL;
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  int __pyx_t_3;
+  PyObject *__pyx_t_4 = NULL;
+  PyObject *__pyx_t_5 = NULL;
+  PyObject *__pyx_t_6 = NULL;
+  double __pyx_t_7;
+  int __pyx_t_8;
+  PyObject *__pyx_t_9 = NULL;
+  PyObject *__pyx_t_10 = NULL;
+  int __pyx_t_11;
+  Py_ssize_t __pyx_t_12;
+  PyObject *(*__pyx_t_13)(PyObject *);
+  int __pyx_t_14;
+  intptr_t __pyx_t_15;
+  int64_t __pyx_t_16;
+  Py_ssize_t __pyx_t_17;
+  Py_ssize_t __pyx_t_18;
+  PyObject *__pyx_t_19 = NULL;
+  PyObject *__pyx_t_20 = NULL;
+  int __pyx_t_21;
+  int __pyx_t_22;
+  int __pyx_t_23;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__cinit__", 0);
+  __Pyx_INCREF(__pyx_v_flags);
+
+  /* "pyfftw/pyfftw.pyx":700
+ * 
+ *         # Initialise the pointers that need to be freed
+ *         self.__plan = NULL             # <<<<<<<<<<<<<<
+ *         self.__dims = NULL
+ *         self.__howmany_dims = NULL
+ */
+  __pyx_v_self->__pyx___plan = NULL;
+
+  /* "pyfftw/pyfftw.pyx":701
+ *         # Initialise the pointers that need to be freed
+ *         self.__plan = NULL
+ *         self.__dims = NULL             # <<<<<<<<<<<<<<
+ *         self.__howmany_dims = NULL
+ * 
+ */
+  __pyx_v_self->__pyx___dims = NULL;
+
+  /* "pyfftw/pyfftw.pyx":702
+ *         self.__plan = NULL
+ *         self.__dims = NULL
+ *         self.__howmany_dims = NULL             # <<<<<<<<<<<<<<
+ * 
+ *         self.__axes = NULL
+ */
+  __pyx_v_self->__pyx___howmany_dims = NULL;
+
+  /* "pyfftw/pyfftw.pyx":704
+ *         self.__howmany_dims = NULL
+ * 
+ *         self.__axes = NULL             # <<<<<<<<<<<<<<
+ *         self.__not_axes = NULL
+ * 
+ */
+  __pyx_v_self->__pyx___axes = NULL;
+
+  /* "pyfftw/pyfftw.pyx":705
+ * 
+ *         self.__axes = NULL
+ *         self.__not_axes = NULL             # <<<<<<<<<<<<<<
+ * 
+ *         flags = list(flags)
+ */
+  __pyx_v_self->__pyx___not_axes = NULL;
+
+  /* "pyfftw/pyfftw.pyx":707
+ *         self.__not_axes = NULL
+ * 
+ *         flags = list(flags)             # <<<<<<<<<<<<<<
+ * 
+ *         cdef double _planning_timelimit
+ */
+  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 707; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_INCREF(__pyx_v_flags);
+  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_flags);
+  __Pyx_GIVEREF(__pyx_v_flags);
+  __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 707; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
+  __Pyx_DECREF(__pyx_v_flags);
+  __pyx_v_flags = __pyx_t_2;
+  __pyx_t_2 = 0;
+
+  /* "pyfftw/pyfftw.pyx":710
+ * 
+ *         cdef double _planning_timelimit
+ *         if planning_timelimit is None:             # <<<<<<<<<<<<<<
+ *             _planning_timelimit = FFTW_NO_TIMELIMIT
+ *         else:
+ */
+  __pyx_t_3 = (__pyx_v_planning_timelimit == Py_None);
+  if (__pyx_t_3) {
+
+    /* "pyfftw/pyfftw.pyx":711
+ *         cdef double _planning_timelimit
+ *         if planning_timelimit is None:
+ *             _planning_timelimit = FFTW_NO_TIMELIMIT             # <<<<<<<<<<<<<<
+ *         else:
+ *             try:
+ */
+    __pyx_v__planning_timelimit = FFTW_NO_TIMELIMIT;
+    goto __pyx_L3;
+  }
+  /*else*/ {
+
+    /* "pyfftw/pyfftw.pyx":713
+ *             _planning_timelimit = FFTW_NO_TIMELIMIT
+ *         else:
+ *             try:             # <<<<<<<<<<<<<<
+ *                 _planning_timelimit = planning_timelimit
+ *             except TypeError:
+ */
+    {
+      __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
+      __Pyx_XGOTREF(__pyx_t_4);
+      __Pyx_XGOTREF(__pyx_t_5);
+      __Pyx_XGOTREF(__pyx_t_6);
+      /*try:*/ {
+
+        /* "pyfftw/pyfftw.pyx":714
+ *         else:
+ *             try:
+ *                 _planning_timelimit = planning_timelimit             # <<<<<<<<<<<<<<
+ *             except TypeError:
+ *                 raise TypeError('Invalid planning timelimit: '
+ */
+        __pyx_t_7 = __pyx_PyFloat_AsDouble(__pyx_v_planning_timelimit); if (unlikely((__pyx_t_7 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
+        __pyx_v__planning_timelimit = __pyx_t_7;
+      }
+      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+      goto __pyx_L11_try_end;
+      __pyx_L4_error:;
+      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+      /* "pyfftw/pyfftw.pyx":715
+ *             try:
+ *                 _planning_timelimit = planning_timelimit
+ *             except TypeError:             # <<<<<<<<<<<<<<
+ *                 raise TypeError('Invalid planning timelimit: '
+ *                         'The planning timelimit needs to be a float.')
+ */
+      __pyx_t_8 = PyErr_ExceptionMatches(__pyx_builtin_TypeError);
+      if (__pyx_t_8) {
+        __Pyx_AddTraceback("pyfftw.pyfftw.FFTW.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+        if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_1, &__pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 715; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
+        __Pyx_GOTREF(__pyx_t_2);
+        __Pyx_GOTREF(__pyx_t_1);
+        __Pyx_GOTREF(__pyx_t_9);
+
+        /* "pyfftw/pyfftw.pyx":716
+ *                 _planning_timelimit = planning_timelimit
+ *             except TypeError:
+ *                 raise TypeError('Invalid planning timelimit: '             # <<<<<<<<<<<<<<
+ *                         'The planning timelimit needs to be a float.')
+ * 
+ */
+        __pyx_t_10 = PyObject_Call(__pyx_builtin_TypeError, ((PyObject *)__pyx_k_tuple_8), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 716; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
+        __Pyx_GOTREF(__pyx_t_10);
+        __Pyx_Raise(__pyx_t_10, 0, 0, 0);
+        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 716; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
+        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+        goto __pyx_L5_exception_handled;
+      }
+      __pyx_L6_except_error:;
+      __Pyx_XGIVEREF(__pyx_t_4);
+      __Pyx_XGIVEREF(__pyx_t_5);
+      __Pyx_XGIVEREF(__pyx_t_6);
+      __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
+      goto __pyx_L1_error;
+      __pyx_L5_exception_handled:;
+      __Pyx_XGIVEREF(__pyx_t_4);
+      __Pyx_XGIVEREF(__pyx_t_5);
+      __Pyx_XGIVEREF(__pyx_t_6);
+      __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
+      __pyx_L11_try_end:;
+    }
+  }
+  __pyx_L3:;
+
+  /* "pyfftw/pyfftw.pyx":719
+ *                         'The planning timelimit needs to be a float.')
+ * 
+ *         if not isinstance(input_array, np.ndarray):             # <<<<<<<<<<<<<<
+ *             raise ValueError('Invalid input array: '
+ *                     'The input array needs to be an instance '
+ */
+  __pyx_t_9 = ((PyObject *)((PyObject*)__pyx_ptype_5numpy_ndarray));
+  __Pyx_INCREF(__pyx_t_9);
+  __pyx_t_3 = __Pyx_TypeCheck(__pyx_v_input_array, __pyx_t_9); 
+  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+  __pyx_t_11 = (!__pyx_t_3);
+  if (__pyx_t_11) {
+
+    /* "pyfftw/pyfftw.pyx":720
+ * 
+ *         if not isinstance(input_array, np.ndarray):
+ *             raise ValueError('Invalid input array: '             # <<<<<<<<<<<<<<
+ *                     'The input array needs to be an instance '
+ *                     'of numpy.ndarray')
+ */
+    __pyx_t_9 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_10), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 720; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_9);
+    __Pyx_Raise(__pyx_t_9, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 720; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    goto __pyx_L14;
+  }
+  __pyx_L14:;
+
+  /* "pyfftw/pyfftw.pyx":724
+ *                     'of numpy.ndarray')
+ * 
+ *         if not isinstance(output_array, np.ndarray):             # <<<<<<<<<<<<<<
+ *             raise ValueError('Invalid output array: '
+ *                     'The output array needs to be an instance '
+ */
+  __pyx_t_9 = ((PyObject *)((PyObject*)__pyx_ptype_5numpy_ndarray));
+  __Pyx_INCREF(__pyx_t_9);
+  __pyx_t_11 = __Pyx_TypeCheck(__pyx_v_output_array, __pyx_t_9); 
+  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+  __pyx_t_3 = (!__pyx_t_11);
+  if (__pyx_t_3) {
+
+    /* "pyfftw/pyfftw.pyx":725
+ * 
+ *         if not isinstance(output_array, np.ndarray):
+ *             raise ValueError('Invalid output array: '             # <<<<<<<<<<<<<<
+ *                     'The output array needs to be an instance '
+ *                     'of numpy.ndarray')
+ */
+    __pyx_t_9 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_12), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_9);
+    __Pyx_Raise(__pyx_t_9, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    goto __pyx_L15;
+  }
+  __pyx_L15:;
+
+  /* "pyfftw/pyfftw.pyx":729
+ *                     'of numpy.ndarray')
+ * 
+ *         try:             # <<<<<<<<<<<<<<
+ *             input_dtype = input_array.dtype
+ *             output_dtype = output_array.dtype
+ */
+  {
+    __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4);
+    __Pyx_XGOTREF(__pyx_t_6);
+    __Pyx_XGOTREF(__pyx_t_5);
+    __Pyx_XGOTREF(__pyx_t_4);
+    /*try:*/ {
+
+      /* "pyfftw/pyfftw.pyx":730
+ * 
+ *         try:
+ *             input_dtype = input_array.dtype             # <<<<<<<<<<<<<<
+ *             output_dtype = output_array.dtype
+ *             scheme = fftw_schemes[(input_dtype, output_dtype)]
+ */
+      __pyx_t_9 = PyObject_GetAttr(__pyx_v_input_array, __pyx_n_s__dtype); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 730; __pyx_clineno = __LINE__; goto __pyx_L16_error;}
+      __Pyx_GOTREF(__pyx_t_9);
+      __pyx_v_input_dtype = __pyx_t_9;
+      __pyx_t_9 = 0;
+
+      /* "pyfftw/pyfftw.pyx":731
+ *         try:
+ *             input_dtype = input_array.dtype
+ *             output_dtype = output_array.dtype             # <<<<<<<<<<<<<<
+ *             scheme = fftw_schemes[(input_dtype, output_dtype)]
+ *         except KeyError:
+ */
+      __pyx_t_9 = PyObject_GetAttr(__pyx_v_output_array, __pyx_n_s__dtype); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L16_error;}
+      __Pyx_GOTREF(__pyx_t_9);
+      __pyx_v_output_dtype = __pyx_t_9;
+      __pyx_t_9 = 0;
+
+      /* "pyfftw/pyfftw.pyx":732
+ *             input_dtype = input_array.dtype
+ *             output_dtype = output_array.dtype
+ *             scheme = fftw_schemes[(input_dtype, output_dtype)]             # <<<<<<<<<<<<<<
+ *         except KeyError:
+ *             raise ValueError('Invalid scheme: '
+ */
+      __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 732; __pyx_clineno = __LINE__; goto __pyx_L16_error;}
+      __Pyx_GOTREF(__pyx_t_9);
+      __Pyx_INCREF(__pyx_v_input_dtype);
+      PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_input_dtype);
+      __Pyx_GIVEREF(__pyx_v_input_dtype);
+      __Pyx_INCREF(__pyx_v_output_dtype);
+      PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_v_output_dtype);
+      __Pyx_GIVEREF(__pyx_v_output_dtype);
+      __pyx_t_1 = PyObject_GetItem(__pyx_v_6pyfftw_6pyfftw_fftw_schemes, ((PyObject *)__pyx_t_9)); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 732; __pyx_clineno = __LINE__; goto __pyx_L16_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
+      __pyx_v_scheme = __pyx_t_1;
+      __pyx_t_1 = 0;
+    }
+    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+    goto __pyx_L23_try_end;
+    __pyx_L16_error:;
+    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+    /* "pyfftw/pyfftw.pyx":733
+ *             output_dtype = output_array.dtype
+ *             scheme = fftw_schemes[(input_dtype, output_dtype)]
+ *         except KeyError:             # <<<<<<<<<<<<<<
+ *             raise ValueError('Invalid scheme: '
+ *                     'The output array and input array dtypes '
+ */
+    __pyx_t_8 = PyErr_ExceptionMatches(__pyx_builtin_KeyError);
+    if (__pyx_t_8) {
+      __Pyx_AddTraceback("pyfftw.pyfftw.FFTW.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+      if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_9, &__pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 733; __pyx_clineno = __LINE__; goto __pyx_L18_except_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_GOTREF(__pyx_t_9);
+      __Pyx_GOTREF(__pyx_t_2);
+
+      /* "pyfftw/pyfftw.pyx":734
+ *             scheme = fftw_schemes[(input_dtype, output_dtype)]
+ *         except KeyError:
+ *             raise ValueError('Invalid scheme: '             # <<<<<<<<<<<<<<
+ *                     'The output array and input array dtypes '
+ *                     'do not correspond to a valid fftw scheme.')
+ */
+      __pyx_t_10 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_14), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 734; __pyx_clineno = __LINE__; goto __pyx_L18_except_error;}
+      __Pyx_GOTREF(__pyx_t_10);
+      __Pyx_Raise(__pyx_t_10, 0, 0, 0);
+      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 734; __pyx_clineno = __LINE__; goto __pyx_L18_except_error;}
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      goto __pyx_L17_exception_handled;
+    }
+    __pyx_L18_except_error:;
+    __Pyx_XGIVEREF(__pyx_t_6);
+    __Pyx_XGIVEREF(__pyx_t_5);
+    __Pyx_XGIVEREF(__pyx_t_4);
+    __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_5, __pyx_t_4);
+    goto __pyx_L1_error;
+    __pyx_L17_exception_handled:;
+    __Pyx_XGIVEREF(__pyx_t_6);
+    __Pyx_XGIVEREF(__pyx_t_5);
+    __Pyx_XGIVEREF(__pyx_t_4);
+    __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_5, __pyx_t_4);
+    __pyx_L23_try_end:;
+  }
+
+  /* "pyfftw/pyfftw.pyx":738
+ *                     'do not correspond to a valid fftw scheme.')
+ * 
+ *         self.__input_dtype = input_dtype             # <<<<<<<<<<<<<<
+ *         self.__output_dtype = output_dtype
+ * 
+ */
+  __Pyx_INCREF(__pyx_v_input_dtype);
+  __Pyx_GIVEREF(__pyx_v_input_dtype);
+  __Pyx_GOTREF(__pyx_v_self->__pyx___input_dtype);
+  __Pyx_DECREF(__pyx_v_self->__pyx___input_dtype);
+  __pyx_v_self->__pyx___input_dtype = __pyx_v_input_dtype;
+
+  /* "pyfftw/pyfftw.pyx":739
+ * 
+ *         self.__input_dtype = input_dtype
+ *         self.__output_dtype = output_dtype             # <<<<<<<<<<<<<<
+ * 
+ *         functions = scheme_functions[scheme]
+ */
+  __Pyx_INCREF(__pyx_v_output_dtype);
+  __Pyx_GIVEREF(__pyx_v_output_dtype);
+  __Pyx_GOTREF(__pyx_v_self->__pyx___output_dtype);
+  __Pyx_DECREF(__pyx_v_self->__pyx___output_dtype);
+  __pyx_v_self->__pyx___output_dtype = __pyx_v_output_dtype;
+
+  /* "pyfftw/pyfftw.pyx":741
+ *         self.__output_dtype = output_dtype
+ * 
+ *         functions = scheme_functions[scheme]             # <<<<<<<<<<<<<<
+ * 
+ *         self.__fftw_planner = planners[functions['planner']]
+ */
+  __pyx_t_2 = PyObject_GetItem(__pyx_v_6pyfftw_6pyfftw_scheme_functions, __pyx_v_scheme); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 741; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_v_functions = __pyx_t_2;
+  __pyx_t_2 = 0;
+
+  /* "pyfftw/pyfftw.pyx":743
+ *         functions = scheme_functions[scheme]
+ * 
+ *         self.__fftw_planner = planners[functions['planner']]             # <<<<<<<<<<<<<<
+ *         self.__fftw_execute = executors[functions['executor']]
+ *         self.__fftw_destroy = destroyers[functions['generic_precision']]
+ */
+  __pyx_t_2 = PyObject_GetItem(__pyx_v_functions, ((PyObject *)__pyx_n_s__planner)); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_v_self->__pyx___fftw_planner = (__pyx_v_6pyfftw_6pyfftw_planners[__pyx_t_12]);
+
+  /* "pyfftw/pyfftw.pyx":744
+ * 
+ *         self.__fftw_planner = planners[functions['planner']]
+ *         self.__fftw_execute = executors[functions['executor']]             # <<<<<<<<<<<<<<
+ *         self.__fftw_destroy = destroyers[functions['generic_precision']]
+ * 
+ */
+  __pyx_t_2 = PyObject_GetItem(__pyx_v_functions, ((PyObject *)__pyx_n_s__executor)); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 744; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 744; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_v_self->__pyx___fftw_execute = (__pyx_v_6pyfftw_6pyfftw_executors[__pyx_t_12]);
+
+  /* "pyfftw/pyfftw.pyx":745
+ *         self.__fftw_planner = planners[functions['planner']]
+ *         self.__fftw_execute = executors[functions['executor']]
+ *         self.__fftw_destroy = destroyers[functions['generic_precision']]             # <<<<<<<<<<<<<<
+ * 
+ *         self.__nthreads_plan_setter = (
+ */
+  __pyx_t_2 = PyObject_GetItem(__pyx_v_functions, ((PyObject *)__pyx_n_s__generic_precision)); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_v_self->__pyx___fftw_destroy = (__pyx_v_6pyfftw_6pyfftw_destroyers[__pyx_t_12]);
+
+  /* "pyfftw/pyfftw.pyx":748
+ * 
+ *         self.__nthreads_plan_setter = (
+ *                 nthreads_plan_setters[functions['generic_precision']])             # <<<<<<<<<<<<<<
+ * 
+ *         cdef fftw_generic_set_timelimit set_timelimit_func = (
+ */
+  __pyx_t_2 = PyObject_GetItem(__pyx_v_functions, ((PyObject *)__pyx_n_s__generic_precision)); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 748; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 748; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+  /* "pyfftw/pyfftw.pyx":747
+ *         self.__fftw_destroy = destroyers[functions['generic_precision']]
+ * 
+ *         self.__nthreads_plan_setter = (             # <<<<<<<<<<<<<<
+ *                 nthreads_plan_setters[functions['generic_precision']])
+ * 
+ */
+  __pyx_v_self->__pyx___nthreads_plan_setter = (__pyx_v_6pyfftw_6pyfftw_nthreads_plan_setters[__pyx_t_12]);
+
+  /* "pyfftw/pyfftw.pyx":751
+ * 
+ *         cdef fftw_generic_set_timelimit set_timelimit_func = (
+ *                 set_timelimit_funcs[functions['generic_precision']])             # <<<<<<<<<<<<<<
+ * 
+ *         # If either of the arrays is not aligned on a 16-byte boundary,
+ */
+  __pyx_t_2 = PyObject_GetItem(__pyx_v_functions, ((PyObject *)__pyx_n_s__generic_precision)); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_v_set_timelimit_func = (__pyx_v_6pyfftw_6pyfftw_set_timelimit_funcs[__pyx_t_12]);
+
+  /* "pyfftw/pyfftw.pyx":756
+ *         # we set the FFTW_UNALIGNED flag. This disables SIMD.
+ *         # (16 bytes is assumed to be the minimal alignment)
+ *         if 'FFTW_UNALIGNED' in flags:             # <<<<<<<<<<<<<<
+ *             self.__simd_allowed = False
+ *             self.__input_array_alignment = self.__input_dtype.alignment
+ */
+  __pyx_t_3 = (__Pyx_PySequence_Contains(((PyObject *)__pyx_n_s__FFTW_UNALIGNED), __pyx_v_flags, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 756; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_3) {
+
+    /* "pyfftw/pyfftw.pyx":757
+ *         # (16 bytes is assumed to be the minimal alignment)
+ *         if 'FFTW_UNALIGNED' in flags:
+ *             self.__simd_allowed = False             # <<<<<<<<<<<<<<
+ *             self.__input_array_alignment = self.__input_dtype.alignment
+ *             self.__output_array_alignment = self.__output_dtype.alignment
+ */
+    __pyx_v_self->__pyx___simd_allowed = 0;
+
+    /* "pyfftw/pyfftw.pyx":758
+ *         if 'FFTW_UNALIGNED' in flags:
+ *             self.__simd_allowed = False
+ *             self.__input_array_alignment = self.__input_dtype.alignment             # <<<<<<<<<<<<<<
+ *             self.__output_array_alignment = self.__output_dtype.alignment
+ * 
+ */
+    __pyx_t_2 = PyObject_GetAttr(__pyx_v_self->__pyx___input_dtype, __pyx_n_s__alignment); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_8 = __Pyx_PyInt_AsInt(__pyx_t_2); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __pyx_v_self->__pyx___input_array_alignment = __pyx_t_8;
+
+    /* "pyfftw/pyfftw.pyx":759
+ *             self.__simd_allowed = False
+ *             self.__input_array_alignment = self.__input_dtype.alignment
+ *             self.__output_array_alignment = self.__output_dtype.alignment             # <<<<<<<<<<<<<<
+ * 
+ *         else:
+ */
+    __pyx_t_2 = PyObject_GetAttr(__pyx_v_self->__pyx___output_dtype, __pyx_n_s__alignment); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_8 = __Pyx_PyInt_AsInt(__pyx_t_2); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __pyx_v_self->__pyx___output_array_alignment = __pyx_t_8;
+    goto __pyx_L26;
+  }
+  /*else*/ {
+
+    /* "pyfftw/pyfftw.pyx":763
+ *         else:
+ * 
+ *             self.__input_array_alignment = -1             # <<<<<<<<<<<<<<
+ *             self.__output_array_alignment = -1
+ * 
+ */
+    __pyx_v_self->__pyx___input_array_alignment = -1;
+
+    /* "pyfftw/pyfftw.pyx":764
+ * 
+ *             self.__input_array_alignment = -1
+ *             self.__output_array_alignment = -1             # <<<<<<<<<<<<<<
+ * 
+ *             for each_alignment in _valid_simd_alignments:
+ */
+    __pyx_v_self->__pyx___output_array_alignment = -1;
+
+    /* "pyfftw/pyfftw.pyx":766
+ *             self.__output_array_alignment = -1
+ * 
+ *             for each_alignment in _valid_simd_alignments:             # <<<<<<<<<<<<<<
+ *                 if (<intptr_t>np.PyArray_DATA(input_array) %
+ *                         each_alignment == 0 and
+ */
+    __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s_15); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 766; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) {
+      __pyx_t_9 = __pyx_t_2; __Pyx_INCREF(__pyx_t_9); __pyx_t_12 = 0;
+      __pyx_t_13 = NULL;
+    } else {
+      __pyx_t_12 = -1; __pyx_t_9 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 766; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_9);
+      __pyx_t_13 = Py_TYPE(__pyx_t_9)->tp_iternext;
+    }
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    for (;;) {
+      if (!__pyx_t_13 && PyList_CheckExact(__pyx_t_9)) {
+        if (__pyx_t_12 >= PyList_GET_SIZE(__pyx_t_9)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_9, __pyx_t_12); __Pyx_INCREF(__pyx_t_2); __pyx_t_12++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 766; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_2 = PySequence_ITEM(__pyx_t_9, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 766; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      } else if (!__pyx_t_13 && PyTuple_CheckExact(__pyx_t_9)) {
+        if (__pyx_t_12 >= PyTuple_GET_SIZE(__pyx_t_9)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_9, __pyx_t_12); __Pyx_INCREF(__pyx_t_2); __pyx_t_12++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 766; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_2 = PySequence_ITEM(__pyx_t_9, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 766; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      } else {
+        __pyx_t_2 = __pyx_t_13(__pyx_t_9);
+        if (unlikely(!__pyx_t_2)) {
+          if (PyErr_Occurred()) {
+            if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
+            else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 766; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          }
+          break;
+        }
+        __Pyx_GOTREF(__pyx_t_2);
+      }
+      __Pyx_XDECREF(__pyx_v_each_alignment);
+      __pyx_v_each_alignment = __pyx_t_2;
+      __pyx_t_2 = 0;
+
+      /* "pyfftw/pyfftw.pyx":767
+ * 
+ *             for each_alignment in _valid_simd_alignments:
+ *                 if (<intptr_t>np.PyArray_DATA(input_array) %             # <<<<<<<<<<<<<<
+ *                         each_alignment == 0 and
+ *                         <intptr_t>np.PyArray_DATA(output_array) %
+ */
+      if (!(likely(((__pyx_v_input_array) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_input_array, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 767; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = __pyx_v_input_array;
+      __Pyx_INCREF(__pyx_t_2);
+      __pyx_t_1 = PyInt_FromSsize_t(((intptr_t)PyArray_DATA(((PyArrayObject *)__pyx_t_2)))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 767; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+      /* "pyfftw/pyfftw.pyx":768
+ *             for each_alignment in _valid_simd_alignments:
+ *                 if (<intptr_t>np.PyArray_DATA(input_array) %
+ *                         each_alignment == 0 and             # <<<<<<<<<<<<<<
+ *                         <intptr_t>np.PyArray_DATA(output_array) %
+ *                         each_alignment == 0):
+ */
+      __pyx_t_2 = PyNumber_Remainder(__pyx_t_1, __pyx_v_each_alignment); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 767; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_int_0, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 768; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 768; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      if (__pyx_t_3) {
+
+        /* "pyfftw/pyfftw.pyx":769
+ *                 if (<intptr_t>np.PyArray_DATA(input_array) %
+ *                         each_alignment == 0 and
+ *                         <intptr_t>np.PyArray_DATA(output_array) %             # <<<<<<<<<<<<<<
+ *                         each_alignment == 0):
+ * 
+ */
+        if (!(likely(((__pyx_v_output_array) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_output_array, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 769; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_1 = __pyx_v_output_array;
+        __Pyx_INCREF(__pyx_t_1);
+        __pyx_t_2 = PyInt_FromSsize_t(((intptr_t)PyArray_DATA(((PyArrayObject *)__pyx_t_1)))); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 769; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_2);
+        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+        /* "pyfftw/pyfftw.pyx":770
+ *                         each_alignment == 0 and
+ *                         <intptr_t>np.PyArray_DATA(output_array) %
+ *                         each_alignment == 0):             # <<<<<<<<<<<<<<
+ * 
+ *                     self.__simd_allowed = True
+ */
+        __pyx_t_1 = PyNumber_Remainder(__pyx_t_2, __pyx_v_each_alignment); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 769; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_1);
+        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+        __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_int_0, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 770; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+        __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 770; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+        __pyx_t_14 = __pyx_t_11;
+      } else {
+        __pyx_t_14 = __pyx_t_3;
+      }
+      if (__pyx_t_14) {
+
+        /* "pyfftw/pyfftw.pyx":772
+ *                         each_alignment == 0):
+ * 
+ *                     self.__simd_allowed = True             # <<<<<<<<<<<<<<
+ * 
+ *                     self.__input_array_alignment = each_alignment
+ */
+        __pyx_v_self->__pyx___simd_allowed = 1;
+
+        /* "pyfftw/pyfftw.pyx":774
+ *                     self.__simd_allowed = True
+ * 
+ *                     self.__input_array_alignment = each_alignment             # <<<<<<<<<<<<<<
+ *                     self.__output_array_alignment = each_alignment
+ * 
+ */
+        __pyx_t_8 = __Pyx_PyInt_AsInt(__pyx_v_each_alignment); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_v_self->__pyx___input_array_alignment = __pyx_t_8;
+
+        /* "pyfftw/pyfftw.pyx":775
+ * 
+ *                     self.__input_array_alignment = each_alignment
+ *                     self.__output_array_alignment = each_alignment             # <<<<<<<<<<<<<<
+ * 
+ *                     break
+ */
+        __pyx_t_8 = __Pyx_PyInt_AsInt(__pyx_v_each_alignment); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_v_self->__pyx___output_array_alignment = __pyx_t_8;
+
+        /* "pyfftw/pyfftw.pyx":777
+ *                     self.__output_array_alignment = each_alignment
+ * 
+ *                     break             # <<<<<<<<<<<<<<
+ * 
+ *             if (self.__input_array_alignment == -1 or
+ */
+        goto __pyx_L28_break;
+        goto __pyx_L29;
+      }
+      __pyx_L29:;
+    }
+    __pyx_L28_break:;
+    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+
+    /* "pyfftw/pyfftw.pyx":779
+ *                     break
+ * 
+ *             if (self.__input_array_alignment == -1 or             # <<<<<<<<<<<<<<
+ *                     self.__output_array_alignment == -1):
+ * 
+ */
+    __pyx_t_14 = (__pyx_v_self->__pyx___input_array_alignment == -1);
+    if (!__pyx_t_14) {
+
+      /* "pyfftw/pyfftw.pyx":780
+ * 
+ *             if (self.__input_array_alignment == -1 or
+ *                     self.__output_array_alignment == -1):             # <<<<<<<<<<<<<<
+ * 
+ *                 self.__simd_allowed = False
+ */
+      __pyx_t_3 = (__pyx_v_self->__pyx___output_array_alignment == -1);
+      __pyx_t_11 = __pyx_t_3;
+    } else {
+      __pyx_t_11 = __pyx_t_14;
+    }
+    if (__pyx_t_11) {
+
+      /* "pyfftw/pyfftw.pyx":782
+ *                     self.__output_array_alignment == -1):
+ * 
+ *                 self.__simd_allowed = False             # <<<<<<<<<<<<<<
+ * 
+ *                 self.__input_array_alignment = (
+ */
+      __pyx_v_self->__pyx___simd_allowed = 0;
+
+      /* "pyfftw/pyfftw.pyx":785
+ * 
+ *                 self.__input_array_alignment = (
+ *                         self.__input_dtype.alignment)             # <<<<<<<<<<<<<<
+ *                 self.__output_array_alignment = (
+ *                         self.__output_dtype.alignment)
+ */
+      __pyx_t_9 = PyObject_GetAttr(__pyx_v_self->__pyx___input_dtype, __pyx_n_s__alignment); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_9);
+      __pyx_t_8 = __Pyx_PyInt_AsInt(__pyx_t_9); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+
+      /* "pyfftw/pyfftw.pyx":784
+ *                 self.__simd_allowed = False
+ * 
+ *                 self.__input_array_alignment = (             # <<<<<<<<<<<<<<
+ *                         self.__input_dtype.alignment)
+ *                 self.__output_array_alignment = (
+ */
+      __pyx_v_self->__pyx___input_array_alignment = __pyx_t_8;
+
+      /* "pyfftw/pyfftw.pyx":787
+ *                         self.__input_dtype.alignment)
+ *                 self.__output_array_alignment = (
+ *                         self.__output_dtype.alignment)             # <<<<<<<<<<<<<<
+ *                 flags.append('FFTW_UNALIGNED')
+ * 
+ */
+      __pyx_t_9 = PyObject_GetAttr(__pyx_v_self->__pyx___output_dtype, __pyx_n_s__alignment); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 787; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_9);
+      __pyx_t_8 = __Pyx_PyInt_AsInt(__pyx_t_9); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 787; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+
+      /* "pyfftw/pyfftw.pyx":786
+ *                 self.__input_array_alignment = (
+ *                         self.__input_dtype.alignment)
+ *                 self.__output_array_alignment = (             # <<<<<<<<<<<<<<
+ *                         self.__output_dtype.alignment)
+ *                 flags.append('FFTW_UNALIGNED')
+ */
+      __pyx_v_self->__pyx___output_array_alignment = __pyx_t_8;
+
+      /* "pyfftw/pyfftw.pyx":788
+ *                 self.__output_array_alignment = (
+ *                         self.__output_dtype.alignment)
+ *                 flags.append('FFTW_UNALIGNED')             # <<<<<<<<<<<<<<
+ * 
+ *         if (not (<intptr_t>np.PyArray_DATA(input_array)
+ */
+      __pyx_t_9 = __Pyx_PyObject_Append(__pyx_v_flags, ((PyObject *)__pyx_n_s__FFTW_UNALIGNED)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 788; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_9);
+      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+      goto __pyx_L30;
+    }
+    __pyx_L30:;
+  }
+  __pyx_L26:;
+
+  /* "pyfftw/pyfftw.pyx":790
+ *                 flags.append('FFTW_UNALIGNED')
+ * 
+ *         if (not (<intptr_t>np.PyArray_DATA(input_array)             # <<<<<<<<<<<<<<
+ *             % self.__input_array_alignment == 0)):
+ *             raise ValueError('Invalid input alignment: '
+ */
+  if (!(likely(((__pyx_v_input_array) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_input_array, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_9 = __pyx_v_input_array;
+  __Pyx_INCREF(__pyx_t_9);
+  __pyx_t_15 = ((intptr_t)PyArray_DATA(((PyArrayObject *)__pyx_t_9)));
+  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+
+  /* "pyfftw/pyfftw.pyx":791
+ * 
+ *         if (not (<intptr_t>np.PyArray_DATA(input_array)
+ *             % self.__input_array_alignment == 0)):             # <<<<<<<<<<<<<<
+ *             raise ValueError('Invalid input alignment: '
+ *                     'The input array is expected to lie on a %d '
+ */
+  if (unlikely(__pyx_v_self->__pyx___input_array_alignment == 0)) {
+    PyErr_Format(PyExc_ZeroDivisionError, "integer division or modulo by zero");
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 791; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __pyx_t_11 = (!(__Pyx_mod_intptr_t(__pyx_t_15, __pyx_v_self->__pyx___input_array_alignment) == 0));
+  if (__pyx_t_11) {
+
+    /* "pyfftw/pyfftw.pyx":794
+ *             raise ValueError('Invalid input alignment: '
+ *                     'The input array is expected to lie on a %d '
+ *                     'byte boundary.' % self.__input_array_alignment)             # <<<<<<<<<<<<<<
+ * 
+ *         if (not (<intptr_t>np.PyArray_DATA(output_array)
+ */
+    __pyx_t_9 = PyInt_FromLong(__pyx_v_self->__pyx___input_array_alignment); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 794; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_9);
+    __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_16), __pyx_t_9); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 794; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
+    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+    __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 792; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_9);
+    PyTuple_SET_ITEM(__pyx_t_9, 0, ((PyObject *)__pyx_t_2));
+    __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
+    __pyx_t_2 = 0;
+    __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 792; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
+    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 792; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    goto __pyx_L31;
+  }
+  __pyx_L31:;
+
+  /* "pyfftw/pyfftw.pyx":796
+ *                     'byte boundary.' % self.__input_array_alignment)
+ * 
+ *         if (not (<intptr_t>np.PyArray_DATA(output_array)             # <<<<<<<<<<<<<<
+ *             % self.__output_array_alignment == 0)):
+ *             raise ValueError('Invalid output alignment: '
+ */
+  if (!(likely(((__pyx_v_output_array) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_output_array, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __pyx_v_output_array;
+  __Pyx_INCREF(__pyx_t_2);
+  __pyx_t_15 = ((intptr_t)PyArray_DATA(((PyArrayObject *)__pyx_t_2)));
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+  /* "pyfftw/pyfftw.pyx":797
+ * 
+ *         if (not (<intptr_t>np.PyArray_DATA(output_array)
+ *             % self.__output_array_alignment == 0)):             # <<<<<<<<<<<<<<
+ *             raise ValueError('Invalid output alignment: '
+ *                     'The output array is expected to lie on a %d '
+ */
+  if (unlikely(__pyx_v_self->__pyx___output_array_alignment == 0)) {
+    PyErr_Format(PyExc_ZeroDivisionError, "integer division or modulo by zero");
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 797; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __pyx_t_11 = (!(__Pyx_mod_intptr_t(__pyx_t_15, __pyx_v_self->__pyx___output_array_alignment) == 0));
+  if (__pyx_t_11) {
+
+    /* "pyfftw/pyfftw.pyx":800
+ *             raise ValueError('Invalid output alignment: '
+ *                     'The output array is expected to lie on a %d '
+ *                     'byte boundary.' % self.__output_array_alignment)             # <<<<<<<<<<<<<<
+ * 
+ *         if not direction in scheme_directions[scheme]:
+ */
+    __pyx_t_2 = PyInt_FromLong(__pyx_v_self->__pyx___output_array_alignment); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_9 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_17), __pyx_t_2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(((PyObject *)__pyx_t_9));
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_9));
+    __Pyx_GIVEREF(((PyObject *)__pyx_t_9));
+    __pyx_t_9 = 0;
+    __pyx_t_9 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_9);
+    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+    __Pyx_Raise(__pyx_t_9, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    goto __pyx_L32;
+  }
+  __pyx_L32:;
+
+  /* "pyfftw/pyfftw.pyx":802
+ *                     'byte boundary.' % self.__output_array_alignment)
+ * 
+ *         if not direction in scheme_directions[scheme]:             # <<<<<<<<<<<<<<
+ *             raise ValueError('Invalid direction: '
+ *                     'The direction is not valid for the scheme. '
+ */
+  __pyx_t_9 = PyObject_GetItem(__pyx_v_6pyfftw_6pyfftw_scheme_directions, __pyx_v_scheme); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_9);
+  __pyx_t_11 = (__Pyx_PySequence_Contains(__pyx_v_direction, __pyx_t_9, Py_EQ)); if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+  __pyx_t_14 = (!__pyx_t_11);
+  if (__pyx_t_14) {
+
+    /* "pyfftw/pyfftw.pyx":803
+ * 
+ *         if not direction in scheme_directions[scheme]:
+ *             raise ValueError('Invalid direction: '             # <<<<<<<<<<<<<<
+ *                     'The direction is not valid for the scheme. '
+ *                     'Try setting it explicitly if it is not already.')
+ */
+    __pyx_t_9 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_19), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_9);
+    __Pyx_Raise(__pyx_t_9, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    goto __pyx_L33;
+  }
+  __pyx_L33:;
+
+  /* "pyfftw/pyfftw.pyx":807
+ *                     'Try setting it explicitly if it is not already.')
+ * 
+ *         self.__direction = directions[direction]             # <<<<<<<<<<<<<<
+ *         self.__input_shape = input_array.shape
+ *         self.__output_shape = output_array.shape
+ */
+  __pyx_t_9 = PyObject_GetItem(__pyx_v_6pyfftw_6pyfftw_directions, __pyx_v_direction); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_9);
+  __pyx_t_8 = __Pyx_PyInt_AsInt(__pyx_t_9); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+  __pyx_v_self->__pyx___direction = __pyx_t_8;
+
+  /* "pyfftw/pyfftw.pyx":808
+ * 
+ *         self.__direction = directions[direction]
+ *         self.__input_shape = input_array.shape             # <<<<<<<<<<<<<<
+ *         self.__output_shape = output_array.shape
+ * 
+ */
+  __pyx_t_9 = PyObject_GetAttr(__pyx_v_input_array, __pyx_n_s__shape); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_9);
+  __Pyx_GIVEREF(__pyx_t_9);
+  __Pyx_GOTREF(__pyx_v_self->__pyx___input_shape);
+  __Pyx_DECREF(__pyx_v_self->__pyx___input_shape);
+  __pyx_v_self->__pyx___input_shape = __pyx_t_9;
+  __pyx_t_9 = 0;
+
+  /* "pyfftw/pyfftw.pyx":809
+ *         self.__direction = directions[direction]
+ *         self.__input_shape = input_array.shape
+ *         self.__output_shape = output_array.shape             # <<<<<<<<<<<<<<
+ * 
+ *         self.__input_array = input_array
+ */
+  __pyx_t_9 = PyObject_GetAttr(__pyx_v_output_array, __pyx_n_s__shape); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 809; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_9);
+  __Pyx_GIVEREF(__pyx_t_9);
+  __Pyx_GOTREF(__pyx_v_self->__pyx___output_shape);
+  __Pyx_DECREF(__pyx_v_self->__pyx___output_shape);
+  __pyx_v_self->__pyx___output_shape = __pyx_t_9;
+  __pyx_t_9 = 0;
+
+  /* "pyfftw/pyfftw.pyx":811
+ *         self.__output_shape = output_array.shape
+ * 
+ *         self.__input_array = input_array             # <<<<<<<<<<<<<<
+ *         self.__output_array = output_array
+ * 
+ */
+  if (!(likely(((__pyx_v_input_array) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_input_array, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 811; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_INCREF(__pyx_v_input_array);
+  __Pyx_GIVEREF(__pyx_v_input_array);
+  __Pyx_GOTREF(__pyx_v_self->__pyx___input_array);
+  __Pyx_DECREF(((PyObject *)__pyx_v_self->__pyx___input_array));
+  __pyx_v_self->__pyx___input_array = ((PyArrayObject *)__pyx_v_input_array);
+
+  /* "pyfftw/pyfftw.pyx":812
+ * 
+ *         self.__input_array = input_array
+ *         self.__output_array = output_array             # <<<<<<<<<<<<<<
+ * 
+ *         self.__axes = <int64_t *>malloc(len(axes)*sizeof(int64_t))
+ */
+  if (!(likely(((__pyx_v_output_array) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_output_array, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 812; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_INCREF(__pyx_v_output_array);
+  __Pyx_GIVEREF(__pyx_v_output_array);
+  __Pyx_GOTREF(__pyx_v_self->__pyx___output_array);
+  __Pyx_DECREF(((PyObject *)__pyx_v_self->__pyx___output_array));
+  __pyx_v_self->__pyx___output_array = ((PyArrayObject *)__pyx_v_output_array);
+
+  /* "pyfftw/pyfftw.pyx":814
+ *         self.__output_array = output_array
+ * 
+ *         self.__axes = <int64_t *>malloc(len(axes)*sizeof(int64_t))             # <<<<<<<<<<<<<<
+ *         for n in range(len(axes)):
+ *             self.__axes[n] = axes[n]
+ */
+  __pyx_t_12 = PyObject_Length(__pyx_v_axes); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 814; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_self->__pyx___axes = ((int64_t *)malloc((__pyx_t_12 * (sizeof(int64_t)))));
+
+  /* "pyfftw/pyfftw.pyx":815
+ * 
+ *         self.__axes = <int64_t *>malloc(len(axes)*sizeof(int64_t))
+ *         for n in range(len(axes)):             # <<<<<<<<<<<<<<
+ *             self.__axes[n] = axes[n]
+ * 
+ */
+  __pyx_t_12 = PyObject_Length(__pyx_v_axes); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 815; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_9 = PyInt_FromSsize_t(__pyx_t_12); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 815; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_9);
+  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 815; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_9);
+  __Pyx_GIVEREF(__pyx_t_9);
+  __pyx_t_9 = 0;
+  __pyx_t_9 = PyObject_Call(__pyx_builtin_range, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 815; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_9);
+  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+  if (PyList_CheckExact(__pyx_t_9) || PyTuple_CheckExact(__pyx_t_9)) {
+    __pyx_t_2 = __pyx_t_9; __Pyx_INCREF(__pyx_t_2); __pyx_t_12 = 0;
+    __pyx_t_13 = NULL;
+  } else {
+    __pyx_t_12 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 815; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_13 = Py_TYPE(__pyx_t_2)->tp_iternext;
+  }
+  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+  for (;;) {
+    if (!__pyx_t_13 && PyList_CheckExact(__pyx_t_2)) {
+      if (__pyx_t_12 >= PyList_GET_SIZE(__pyx_t_2)) break;
+      #if CYTHON_COMPILING_IN_CPYTHON
+      __pyx_t_9 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_12); __Pyx_INCREF(__pyx_t_9); __pyx_t_12++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 815; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      #else
+      __pyx_t_9 = PySequence_ITEM(__pyx_t_2, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 815; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      #endif
+    } else if (!__pyx_t_13 && PyTuple_CheckExact(__pyx_t_2)) {
+      if (__pyx_t_12 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
+      #if CYTHON_COMPILING_IN_CPYTHON
+      __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_12); __Pyx_INCREF(__pyx_t_9); __pyx_t_12++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 815; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      #else
+      __pyx_t_9 = PySequence_ITEM(__pyx_t_2, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 815; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      #endif
+    } else {
+      __pyx_t_9 = __pyx_t_13(__pyx_t_2);
+      if (unlikely(!__pyx_t_9)) {
+        if (PyErr_Occurred()) {
+          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
+          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 815; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+        break;
+      }
+      __Pyx_GOTREF(__pyx_t_9);
+    }
+    __Pyx_XDECREF(__pyx_v_n);
+    __pyx_v_n = __pyx_t_9;
+    __pyx_t_9 = 0;
+
+    /* "pyfftw/pyfftw.pyx":816
+ *         self.__axes = <int64_t *>malloc(len(axes)*sizeof(int64_t))
+ *         for n in range(len(axes)):
+ *             self.__axes[n] = axes[n]             # <<<<<<<<<<<<<<
+ * 
+ *         # Set the negative entries to their actual index (use the size
+ */
+    __pyx_t_9 = PyObject_GetItem(__pyx_v_axes, __pyx_v_n); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_9);
+    __pyx_t_16 = __Pyx_PyInt_from_py_int64_t(__pyx_t_9); if (unlikely((__pyx_t_16 == (int64_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+    __pyx_t_17 = __Pyx_PyIndex_AsSsize_t(__pyx_v_n); if (unlikely((__pyx_t_17 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    (__pyx_v_self->__pyx___axes[__pyx_t_17]) = __pyx_t_16;
+  }
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+  /* "pyfftw/pyfftw.pyx":820
+ *         # Set the negative entries to their actual index (use the size
+ *         # of the shape array for this)
+ *         cdef int64_t array_dimension = len(self.__input_shape)             # <<<<<<<<<<<<<<
+ * 
+ *         for n in range(len(axes)):
+ */
+  __pyx_t_2 = __pyx_v_self->__pyx___input_shape;
+  __Pyx_INCREF(__pyx_t_2);
+  __pyx_t_12 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 820; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_v_array_dimension = __pyx_t_12;
+
+  /* "pyfftw/pyfftw.pyx":822
+ *         cdef int64_t array_dimension = len(self.__input_shape)
+ * 
+ *         for n in range(len(axes)):             # <<<<<<<<<<<<<<
+ *             if self.__axes[n] < 0:
+ *                 self.__axes[n] = self.__axes[n] + array_dimension
+ */
+  __pyx_t_12 = PyObject_Length(__pyx_v_axes); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_12); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_9);
+  PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_2);
+  __Pyx_GIVEREF(__pyx_t_2);
+  __pyx_t_2 = 0;
+  __pyx_t_2 = PyObject_Call(__pyx_builtin_range, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
+  if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) {
+    __pyx_t_9 = __pyx_t_2; __Pyx_INCREF(__pyx_t_9); __pyx_t_12 = 0;
+    __pyx_t_13 = NULL;
+  } else {
+    __pyx_t_12 = -1; __pyx_t_9 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_9);
+    __pyx_t_13 = Py_TYPE(__pyx_t_9)->tp_iternext;
+  }
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  for (;;) {
+    if (!__pyx_t_13 && PyList_CheckExact(__pyx_t_9)) {
+      if (__pyx_t_12 >= PyList_GET_SIZE(__pyx_t_9)) break;
+      #if CYTHON_COMPILING_IN_CPYTHON
+      __pyx_t_2 = PyList_GET_ITEM(__pyx_t_9, __pyx_t_12); __Pyx_INCREF(__pyx_t_2); __pyx_t_12++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      #else
+      __pyx_t_2 = PySequence_ITEM(__pyx_t_9, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      #endif
+    } else if (!__pyx_t_13 && PyTuple_CheckExact(__pyx_t_9)) {
+      if (__pyx_t_12 >= PyTuple_GET_SIZE(__pyx_t_9)) break;
+      #if CYTHON_COMPILING_IN_CPYTHON
+      __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_9, __pyx_t_12); __Pyx_INCREF(__pyx_t_2); __pyx_t_12++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      #else
+      __pyx_t_2 = PySequence_ITEM(__pyx_t_9, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      #endif
+    } else {
+      __pyx_t_2 = __pyx_t_13(__pyx_t_9);
+      if (unlikely(!__pyx_t_2)) {
+        if (PyErr_Occurred()) {
+          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
+          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+        break;
+      }
+      __Pyx_GOTREF(__pyx_t_2);
+    }
+    __Pyx_XDECREF(__pyx_v_n);
+    __pyx_v_n = __pyx_t_2;
+    __pyx_t_2 = 0;
+
+    /* "pyfftw/pyfftw.pyx":823
+ * 
+ *         for n in range(len(axes)):
+ *             if self.__axes[n] < 0:             # <<<<<<<<<<<<<<
+ *                 self.__axes[n] = self.__axes[n] + array_dimension
+ * 
+ */
+    __pyx_t_17 = __Pyx_PyIndex_AsSsize_t(__pyx_v_n); if (unlikely((__pyx_t_17 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_14 = ((__pyx_v_self->__pyx___axes[__pyx_t_17]) < 0);
+    if (__pyx_t_14) {
+
+      /* "pyfftw/pyfftw.pyx":824
+ *         for n in range(len(axes)):
+ *             if self.__axes[n] < 0:
+ *                 self.__axes[n] = self.__axes[n] + array_dimension             # <<<<<<<<<<<<<<
+ * 
+ *             if self.__axes[n] >= array_dimension or self.__axes[n] < 0:
+ */
+      __pyx_t_17 = __Pyx_PyIndex_AsSsize_t(__pyx_v_n); if (unlikely((__pyx_t_17 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_18 = __Pyx_PyIndex_AsSsize_t(__pyx_v_n); if (unlikely((__pyx_t_18 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      (__pyx_v_self->__pyx___axes[__pyx_t_18]) = ((__pyx_v_self->__pyx___axes[__pyx_t_17]) + __pyx_v_array_dimension);
+      goto __pyx_L38;
+    }
+    __pyx_L38:;
+
+    /* "pyfftw/pyfftw.pyx":826
+ *                 self.__axes[n] = self.__axes[n] + array_dimension
+ * 
+ *             if self.__axes[n] >= array_dimension or self.__axes[n] < 0:             # <<<<<<<<<<<<<<
+ *                 raise IndexError('Invalid axes: '
+ *                     'The axes list cannot contain invalid axes.')
+ */
+    __pyx_t_17 = __Pyx_PyIndex_AsSsize_t(__pyx_v_n); if (unlikely((__pyx_t_17 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_14 = ((__pyx_v_self->__pyx___axes[__pyx_t_17]) >= __pyx_v_array_dimension);
+    if (!__pyx_t_14) {
+      __pyx_t_17 = __Pyx_PyIndex_AsSsize_t(__pyx_v_n); if (unlikely((__pyx_t_17 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_11 = ((__pyx_v_self->__pyx___axes[__pyx_t_17]) < 0);
+      __pyx_t_3 = __pyx_t_11;
+    } else {
+      __pyx_t_3 = __pyx_t_14;
+    }
+    if (__pyx_t_3) {
+
+      /* "pyfftw/pyfftw.pyx":827
+ * 
+ *             if self.__axes[n] >= array_dimension or self.__axes[n] < 0:
+ *                 raise IndexError('Invalid axes: '             # <<<<<<<<<<<<<<
+ *                     'The axes list cannot contain invalid axes.')
+ * 
+ */
+      __pyx_t_2 = PyObject_Call(__pyx_builtin_IndexError, ((PyObject *)__pyx_k_tuple_21), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __Pyx_Raise(__pyx_t_2, 0, 0, 0);
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      goto __pyx_L39;
+    }
+    __pyx_L39:;
+  }
+  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+
+  /* "pyfftw/pyfftw.pyx":834
+ *         cdef int64_t *not_axes
+ * 
+ *         make_axes_unique(self.__axes, len(axes), &unique_axes,             # <<<<<<<<<<<<<<
+ *                 &not_axes, array_dimension, &unique_axes_length)
+ * 
+ */
+  __pyx_t_12 = PyObject_Length(__pyx_v_axes); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "pyfftw/pyfftw.pyx":835
+ * 
+ *         make_axes_unique(self.__axes, len(axes), &unique_axes,
+ *                 &not_axes, array_dimension, &unique_axes_length)             # <<<<<<<<<<<<<<
+ * 
+ *         # and assign axes and not_axes to the filled arrays
+ */
+  __pyx_f_6pyfftw_6pyfftw_make_axes_unique(__pyx_v_self->__pyx___axes, __pyx_t_12, (&__pyx_v_unique_axes), (&__pyx_v_not_axes), __pyx_v_array_dimension, (&__pyx_v_unique_axes_length));
+
+  /* "pyfftw/pyfftw.pyx":838
+ * 
+ *         # and assign axes and not_axes to the filled arrays
+ *         free(self.__axes)             # <<<<<<<<<<<<<<
+ *         self.__axes = unique_axes
+ *         self.__not_axes = not_axes
+ */
+  free(__pyx_v_self->__pyx___axes);
+
+  /* "pyfftw/pyfftw.pyx":839
+ *         # and assign axes and not_axes to the filled arrays
+ *         free(self.__axes)
+ *         self.__axes = unique_axes             # <<<<<<<<<<<<<<
+ *         self.__not_axes = not_axes
+ * 
+ */
+  __pyx_v_self->__pyx___axes = __pyx_v_unique_axes;
+
+  /* "pyfftw/pyfftw.pyx":840
+ *         free(self.__axes)
+ *         self.__axes = unique_axes
+ *         self.__not_axes = not_axes             # <<<<<<<<<<<<<<
+ * 
+ *         total_N = 1
+ */
+  __pyx_v_self->__pyx___not_axes = __pyx_v_not_axes;
+
+  /* "pyfftw/pyfftw.pyx":842
+ *         self.__not_axes = not_axes
+ * 
+ *         total_N = 1             # <<<<<<<<<<<<<<
+ *         for n in range(unique_axes_length):
+ *             if self.__input_shape[self.__axes[n]] == 0:
+ */
+  __Pyx_INCREF(__pyx_int_1);
+  __pyx_v_total_N = __pyx_int_1;
+
+  /* "pyfftw/pyfftw.pyx":843
+ * 
+ *         total_N = 1
+ *         for n in range(unique_axes_length):             # <<<<<<<<<<<<<<
+ *             if self.__input_shape[self.__axes[n]] == 0:
+ *                 raise ValueError('Zero length array: '
+ */
+  __pyx_t_9 = __Pyx_PyInt_to_py_int64_t(__pyx_v_unique_axes_length); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_9);
+  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_9);
+  __Pyx_GIVEREF(__pyx_t_9);
+  __pyx_t_9 = 0;
+  __pyx_t_9 = PyObject_Call(__pyx_builtin_range, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_9);
+  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+  if (PyList_CheckExact(__pyx_t_9) || PyTuple_CheckExact(__pyx_t_9)) {
+    __pyx_t_2 = __pyx_t_9; __Pyx_INCREF(__pyx_t_2); __pyx_t_12 = 0;
+    __pyx_t_13 = NULL;
+  } else {
+    __pyx_t_12 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_13 = Py_TYPE(__pyx_t_2)->tp_iternext;
+  }
+  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+  for (;;) {
+    if (!__pyx_t_13 && PyList_CheckExact(__pyx_t_2)) {
+      if (__pyx_t_12 >= PyList_GET_SIZE(__pyx_t_2)) break;
+      #if CYTHON_COMPILING_IN_CPYTHON
+      __pyx_t_9 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_12); __Pyx_INCREF(__pyx_t_9); __pyx_t_12++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      #else
+      __pyx_t_9 = PySequence_ITEM(__pyx_t_2, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      #endif
+    } else if (!__pyx_t_13 && PyTuple_CheckExact(__pyx_t_2)) {
+      if (__pyx_t_12 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
+      #if CYTHON_COMPILING_IN_CPYTHON
+      __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_12); __Pyx_INCREF(__pyx_t_9); __pyx_t_12++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      #else
+      __pyx_t_9 = PySequence_ITEM(__pyx_t_2, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      #endif
+    } else {
+      __pyx_t_9 = __pyx_t_13(__pyx_t_2);
+      if (unlikely(!__pyx_t_9)) {
+        if (PyErr_Occurred()) {
+          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
+          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+        break;
+      }
+      __Pyx_GOTREF(__pyx_t_9);
+    }
+    __Pyx_XDECREF(__pyx_v_n);
+    __pyx_v_n = __pyx_t_9;
+    __pyx_t_9 = 0;
+
+    /* "pyfftw/pyfftw.pyx":844
+ *         total_N = 1
+ *         for n in range(unique_axes_length):
+ *             if self.__input_shape[self.__axes[n]] == 0:             # <<<<<<<<<<<<<<
+ *                 raise ValueError('Zero length array: '
+ *                     'The input array should have no zero length'
+ */
+    __pyx_t_17 = __Pyx_PyIndex_AsSsize_t(__pyx_v_n); if (unlikely((__pyx_t_17 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_self->__pyx___input_shape, (__pyx_v_self->__pyx___axes[__pyx_t_17]), sizeof(int64_t), __Pyx_PyInt_to_py_int64_t); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_9);
+    __pyx_t_1 = PyObject_RichCompare(__pyx_t_9, __pyx_int_0, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    if (__pyx_t_3) {
+
+      /* "pyfftw/pyfftw.pyx":845
+ *         for n in range(unique_axes_length):
+ *             if self.__input_shape[self.__axes[n]] == 0:
+ *                 raise ValueError('Zero length array: '             # <<<<<<<<<<<<<<
+ *                     'The input array should have no zero length'
+ *                     'axes over which the FFT is to be taken')
+ */
+      __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_23), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      goto __pyx_L42;
+    }
+    __pyx_L42:;
+
+    /* "pyfftw/pyfftw.pyx":849
+ *                     'axes over which the FFT is to be taken')
+ * 
+ *             if self.__direction == FFTW_FORWARD:             # <<<<<<<<<<<<<<
+ *                 total_N *= self.__input_shape[self.__axes[n]]
+ *             else:
+ */
+    __pyx_t_3 = (__pyx_v_self->__pyx___direction == __pyx_e_6pyfftw_6pyfftw_FFTW_FORWARD);
+    if (__pyx_t_3) {
+
+      /* "pyfftw/pyfftw.pyx":850
+ * 
+ *             if self.__direction == FFTW_FORWARD:
+ *                 total_N *= self.__input_shape[self.__axes[n]]             # <<<<<<<<<<<<<<
+ *             else:
+ *                 total_N *= self.__output_shape[self.__axes[n]]
+ */
+      __pyx_t_17 = __Pyx_PyIndex_AsSsize_t(__pyx_v_n); if (unlikely((__pyx_t_17 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_self->__pyx___input_shape, (__pyx_v_self->__pyx___axes[__pyx_t_17]), sizeof(int64_t), __Pyx_PyInt_to_py_int64_t); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_t_9 = PyNumber_InPlaceMultiply(__pyx_v_total_N, __pyx_t_1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_9);
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __Pyx_DECREF(__pyx_v_total_N);
+      __pyx_v_total_N = __pyx_t_9;
+      __pyx_t_9 = 0;
+      goto __pyx_L43;
+    }
+    /*else*/ {
+
+      /* "pyfftw/pyfftw.pyx":852
+ *                 total_N *= self.__input_shape[self.__axes[n]]
+ *             else:
+ *                 total_N *= self.__output_shape[self.__axes[n]]             # <<<<<<<<<<<<<<
+ * 
+ *         self.__N = total_N
+ */
+      __pyx_t_17 = __Pyx_PyIndex_AsSsize_t(__pyx_v_n); if (unlikely((__pyx_t_17 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 852; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_self->__pyx___output_shape, (__pyx_v_self->__pyx___axes[__pyx_t_17]), sizeof(int64_t), __Pyx_PyInt_to_py_int64_t); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 852; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_9);
+      __pyx_t_1 = PyNumber_InPlaceMultiply(__pyx_v_total_N, __pyx_t_9); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 852; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+      __Pyx_DECREF(__pyx_v_total_N);
+      __pyx_v_total_N = __pyx_t_1;
+      __pyx_t_1 = 0;
+    }
+    __pyx_L43:;
+  }
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+  /* "pyfftw/pyfftw.pyx":854
+ *                 total_N *= self.__output_shape[self.__axes[n]]
+ * 
+ *         self.__N = total_N             # <<<<<<<<<<<<<<
+ *         self.__normalisation_scaling = 1/float(self.N)
+ * 
+ */
+  __pyx_t_8 = __Pyx_PyInt_AsInt(__pyx_v_total_N); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 854; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_self->__pyx___N = __pyx_t_8;
+
+  /* "pyfftw/pyfftw.pyx":855
+ * 
+ *         self.__N = total_N
+ *         self.__normalisation_scaling = 1/float(self.N)             # <<<<<<<<<<<<<<
+ * 
+ *         # Now we can validate the array shapes
+ */
+  __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__N); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 855; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_7 = __Pyx_PyObject_AsDouble(__pyx_t_2); if (unlikely(__pyx_t_7 == ((double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 855; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  if (unlikely(__pyx_t_7 == 0)) {
+    PyErr_Format(PyExc_ZeroDivisionError, "float division");
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 855; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __pyx_v_self->__pyx___normalisation_scaling = (1.0 / __pyx_t_7);
+
+  /* "pyfftw/pyfftw.pyx":860
+ *         cdef validator _validator
+ * 
+ *         if functions['validator'] == -1:             # <<<<<<<<<<<<<<
+ *             if not (output_array.shape == input_array.shape):
+ *                 raise ValueError('Invalid shapes: '
+ */
+  __pyx_t_2 = PyObject_GetItem(__pyx_v_functions, ((PyObject *)__pyx_n_s__validator)); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 860; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_int_neg_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 860; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 860; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  if (__pyx_t_3) {
+
+    /* "pyfftw/pyfftw.pyx":861
+ * 
+ *         if functions['validator'] == -1:
+ *             if not (output_array.shape == input_array.shape):             # <<<<<<<<<<<<<<
+ *                 raise ValueError('Invalid shapes: '
+ *                         'The output array should be the same shape as the '
+ */
+    __pyx_t_1 = PyObject_GetAttr(__pyx_v_output_array, __pyx_n_s__shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 861; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_2 = PyObject_GetAttr(__pyx_v_input_array, __pyx_n_s__shape); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 861; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_9 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 861; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 861; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+    __pyx_t_14 = (!__pyx_t_3);
+    if (__pyx_t_14) {
+
+      /* "pyfftw/pyfftw.pyx":862
+ *         if functions['validator'] == -1:
+ *             if not (output_array.shape == input_array.shape):
+ *                 raise ValueError('Invalid shapes: '             # <<<<<<<<<<<<<<
+ *                         'The output array should be the same shape as the '
+ *                         'input array for the given array dtypes.')
+ */
+      __pyx_t_9 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_25), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 862; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_9);
+      __Pyx_Raise(__pyx_t_9, 0, 0, 0);
+      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 862; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      goto __pyx_L45;
+    }
+    __pyx_L45:;
+    goto __pyx_L44;
+  }
+  /*else*/ {
+
+    /* "pyfftw/pyfftw.pyx":866
+ *                         'input array for the given array dtypes.')
+ *         else:
+ *             _validator = validators[functions['validator']]             # <<<<<<<<<<<<<<
+ *             if not _validator(input_array, output_array,
+ *                     self.__axes, self.__not_axes, unique_axes_length):
+ */
+    __pyx_t_9 = PyObject_GetItem(__pyx_v_functions, ((PyObject *)__pyx_n_s__validator)); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 866; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_9);
+    __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_9); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 866; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+    __pyx_v__validator = (__pyx_v_6pyfftw_6pyfftw_validators[__pyx_t_12]);
+
+    /* "pyfftw/pyfftw.pyx":867
+ *         else:
+ *             _validator = validators[functions['validator']]
+ *             if not _validator(input_array, output_array,             # <<<<<<<<<<<<<<
+ *                     self.__axes, self.__not_axes, unique_axes_length):
+ *                 raise ValueError('Invalid shapes: '
+ */
+    if (!(likely(((__pyx_v_input_array) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_input_array, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 867; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_9 = __pyx_v_input_array;
+    __Pyx_INCREF(__pyx_t_9);
+    if (!(likely(((__pyx_v_output_array) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_output_array, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 867; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = __pyx_v_output_array;
+    __Pyx_INCREF(__pyx_t_2);
+
+    /* "pyfftw/pyfftw.pyx":868
+ *             _validator = validators[functions['validator']]
+ *             if not _validator(input_array, output_array,
+ *                     self.__axes, self.__not_axes, unique_axes_length):             # <<<<<<<<<<<<<<
+ *                 raise ValueError('Invalid shapes: '
+ *                         'The input array and output array are invalid '
+ */
+    __pyx_t_14 = (!__pyx_v__validator(((PyArrayObject *)__pyx_t_9), ((PyArrayObject *)__pyx_t_2), __pyx_v_self->__pyx___axes, __pyx_v_self->__pyx___not_axes, __pyx_v_unique_axes_length));
+    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    if (__pyx_t_14) {
+
+      /* "pyfftw/pyfftw.pyx":869
+ *             if not _validator(input_array, output_array,
+ *                     self.__axes, self.__not_axes, unique_axes_length):
+ *                 raise ValueError('Invalid shapes: '             # <<<<<<<<<<<<<<
+ *                         'The input array and output array are invalid '
+ *                         'complementary shapes for their dtypes.')
+ */
+      __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_27), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 869; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __Pyx_Raise(__pyx_t_2, 0, 0, 0);
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 869; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      goto __pyx_L46;
+    }
+    __pyx_L46:;
+  }
+  __pyx_L44:;
+
+  /* "pyfftw/pyfftw.pyx":873
+ *                         'complementary shapes for their dtypes.')
+ * 
+ *         self.__rank = unique_axes_length             # <<<<<<<<<<<<<<
+ *         self.__howmany_rank = self.__input_array.ndim - unique_axes_length
+ * 
+ */
+  __pyx_v_self->__pyx___rank = __pyx_v_unique_axes_length;
+
+  /* "pyfftw/pyfftw.pyx":874
+ * 
+ *         self.__rank = unique_axes_length
+ *         self.__howmany_rank = self.__input_array.ndim - unique_axes_length             # <<<<<<<<<<<<<<
+ * 
+ *         self.__flags = 0
+ */
+  __pyx_v_self->__pyx___howmany_rank = (__pyx_v_self->__pyx___input_array->nd - __pyx_v_unique_axes_length);
+
+  /* "pyfftw/pyfftw.pyx":876
+ *         self.__howmany_rank = self.__input_array.ndim - unique_axes_length
+ * 
+ *         self.__flags = 0             # <<<<<<<<<<<<<<
+ *         self.__flags_used = []
+ *         for each_flag in flags:
+ */
+  __pyx_v_self->__pyx___flags = 0;
+
+  /* "pyfftw/pyfftw.pyx":877
+ * 
+ *         self.__flags = 0
+ *         self.__flags_used = []             # <<<<<<<<<<<<<<
+ *         for each_flag in flags:
+ *             try:
+ */
+  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 877; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
+  __Pyx_GOTREF(__pyx_v_self->__pyx___flags_used);
+  __Pyx_DECREF(__pyx_v_self->__pyx___flags_used);
+  __pyx_v_self->__pyx___flags_used = ((PyObject *)__pyx_t_2);
+  __pyx_t_2 = 0;
+
+  /* "pyfftw/pyfftw.pyx":878
+ *         self.__flags = 0
+ *         self.__flags_used = []
+ *         for each_flag in flags:             # <<<<<<<<<<<<<<
+ *             try:
+ *                 self.__flags |= flag_dict[each_flag]
+ */
+  if (PyList_CheckExact(__pyx_v_flags) || PyTuple_CheckExact(__pyx_v_flags)) {
+    __pyx_t_2 = __pyx_v_flags; __Pyx_INCREF(__pyx_t_2); __pyx_t_12 = 0;
+    __pyx_t_13 = NULL;
+  } else {
+    __pyx_t_12 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_flags); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 878; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_13 = Py_TYPE(__pyx_t_2)->tp_iternext;
+  }
+  for (;;) {
+    if (!__pyx_t_13 && PyList_CheckExact(__pyx_t_2)) {
+      if (__pyx_t_12 >= PyList_GET_SIZE(__pyx_t_2)) break;
+      #if CYTHON_COMPILING_IN_CPYTHON
+      __pyx_t_9 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_12); __Pyx_INCREF(__pyx_t_9); __pyx_t_12++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 878; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      #else
+      __pyx_t_9 = PySequence_ITEM(__pyx_t_2, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 878; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      #endif
+    } else if (!__pyx_t_13 && PyTuple_CheckExact(__pyx_t_2)) {
+      if (__pyx_t_12 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
+      #if CYTHON_COMPILING_IN_CPYTHON
+      __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_12); __Pyx_INCREF(__pyx_t_9); __pyx_t_12++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 878; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      #else
+      __pyx_t_9 = PySequence_ITEM(__pyx_t_2, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 878; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      #endif
+    } else {
+      __pyx_t_9 = __pyx_t_13(__pyx_t_2);
+      if (unlikely(!__pyx_t_9)) {
+        if (PyErr_Occurred()) {
+          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
+          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 878; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+        break;
+      }
+      __Pyx_GOTREF(__pyx_t_9);
+    }
+    __Pyx_XDECREF(__pyx_v_each_flag);
+    __pyx_v_each_flag = __pyx_t_9;
+    __pyx_t_9 = 0;
+
+    /* "pyfftw/pyfftw.pyx":879
+ *         self.__flags_used = []
+ *         for each_flag in flags:
+ *             try:             # <<<<<<<<<<<<<<
+ *                 self.__flags |= flag_dict[each_flag]
+ *                 self.__flags_used.append(each_flag)
+ */
+    {
+      __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
+      __Pyx_XGOTREF(__pyx_t_4);
+      __Pyx_XGOTREF(__pyx_t_5);
+      __Pyx_XGOTREF(__pyx_t_6);
+      /*try:*/ {
+
+        /* "pyfftw/pyfftw.pyx":880
+ *         for each_flag in flags:
+ *             try:
+ *                 self.__flags |= flag_dict[each_flag]             # <<<<<<<<<<<<<<
+ *                 self.__flags_used.append(each_flag)
+ *             except KeyError:
+ */
+        __pyx_t_9 = PyInt_FromLong(__pyx_v_self->__pyx___flags); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 880; __pyx_clineno = __LINE__; goto __pyx_L49_error;}
+        __Pyx_GOTREF(__pyx_t_9);
+        __pyx_t_1 = PyObject_GetItem(__pyx_v_6pyfftw_6pyfftw_flag_dict, __pyx_v_each_flag); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 880; __pyx_clineno = __LINE__; goto __pyx_L49_error;}
+        __Pyx_GOTREF(__pyx_t_1);
+        __pyx_t_10 = PyNumber_InPlaceOr(__pyx_t_9, __pyx_t_1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 880; __pyx_clineno = __LINE__; goto __pyx_L49_error;}
+        __Pyx_GOTREF(__pyx_t_10);
+        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+        __pyx_t_8 = __Pyx_PyInt_AsInt(__pyx_t_10); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 880; __pyx_clineno = __LINE__; goto __pyx_L49_error;}
+        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+        __pyx_v_self->__pyx___flags = __pyx_t_8;
+
+        /* "pyfftw/pyfftw.pyx":881
+ *             try:
+ *                 self.__flags |= flag_dict[each_flag]
+ *                 self.__flags_used.append(each_flag)             # <<<<<<<<<<<<<<
+ *             except KeyError:
+ *                 raise ValueError('Invalid flag: ' + '\'' +
+ */
+        __pyx_t_10 = __Pyx_PyObject_Append(__pyx_v_self->__pyx___flags_used, __pyx_v_each_flag); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 881; __pyx_clineno = __LINE__; goto __pyx_L49_error;}
+        __Pyx_GOTREF(__pyx_t_10);
+        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+      }
+      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+      goto __pyx_L56_try_end;
+      __pyx_L49_error:;
+      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+
+      /* "pyfftw/pyfftw.pyx":882
+ *                 self.__flags |= flag_dict[each_flag]
+ *                 self.__flags_used.append(each_flag)
+ *             except KeyError:             # <<<<<<<<<<<<<<
+ *                 raise ValueError('Invalid flag: ' + '\'' +
+ *                         each_flag + '\' is not a valid planner flag.')
+ */
+      __pyx_t_8 = PyErr_ExceptionMatches(__pyx_builtin_KeyError);
+      if (__pyx_t_8) {
+        __Pyx_AddTraceback("pyfftw.pyfftw.FFTW.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+        if (__Pyx_GetException(&__pyx_t_10, &__pyx_t_1, &__pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L51_except_error;}
+        __Pyx_GOTREF(__pyx_t_10);
+        __Pyx_GOTREF(__pyx_t_1);
+        __Pyx_GOTREF(__pyx_t_9);
+
+        /* "pyfftw/pyfftw.pyx":883
+ *                 self.__flags_used.append(each_flag)
+ *             except KeyError:
+ *                 raise ValueError('Invalid flag: ' + '\'' +             # <<<<<<<<<<<<<<
+ *                         each_flag + '\' is not a valid planner flag.')
+ * 
+ */
+        __pyx_t_19 = PyNumber_Add(((PyObject *)__pyx_kp_s_28), ((PyObject *)__pyx_kp_s_29)); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 883; __pyx_clineno = __LINE__; goto __pyx_L51_except_error;}
+        __Pyx_GOTREF(((PyObject *)__pyx_t_19));
+
+        /* "pyfftw/pyfftw.pyx":884
+ *             except KeyError:
+ *                 raise ValueError('Invalid flag: ' + '\'' +
+ *                         each_flag + '\' is not a valid planner flag.')             # <<<<<<<<<<<<<<
+ * 
+ * 
+ */
+        __pyx_t_20 = PyNumber_Add(((PyObject *)__pyx_t_19), __pyx_v_each_flag); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 883; __pyx_clineno = __LINE__; goto __pyx_L51_except_error;}
+        __Pyx_GOTREF(__pyx_t_20);
+        __Pyx_DECREF(((PyObject *)__pyx_t_19)); __pyx_t_19 = 0;
+        __pyx_t_19 = PyNumber_Add(__pyx_t_20, ((PyObject *)__pyx_kp_s_30)); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L51_except_error;}
+        __Pyx_GOTREF(__pyx_t_19);
+        __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
+        __pyx_t_20 = PyTuple_New(1); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 883; __pyx_clineno = __LINE__; goto __pyx_L51_except_error;}
+        __Pyx_GOTREF(__pyx_t_20);
+        PyTuple_SET_ITEM(__pyx_t_20, 0, __pyx_t_19);
+        __Pyx_GIVEREF(__pyx_t_19);
+        __pyx_t_19 = 0;
+        __pyx_t_19 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_20), NULL); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 883; __pyx_clineno = __LINE__; goto __pyx_L51_except_error;}
+        __Pyx_GOTREF(__pyx_t_19);
+        __Pyx_DECREF(((PyObject *)__pyx_t_20)); __pyx_t_20 = 0;
+        __Pyx_Raise(__pyx_t_19, 0, 0, 0);
+        __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
+        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 883; __pyx_clineno = __LINE__; goto __pyx_L51_except_error;}
+        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+        goto __pyx_L50_exception_handled;
+      }
+      __pyx_L51_except_error:;
+      __Pyx_XGIVEREF(__pyx_t_4);
+      __Pyx_XGIVEREF(__pyx_t_5);
+      __Pyx_XGIVEREF(__pyx_t_6);
+      __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
+      goto __pyx_L1_error;
+      __pyx_L50_exception_handled:;
+      __Pyx_XGIVEREF(__pyx_t_4);
+      __Pyx_XGIVEREF(__pyx_t_5);
+      __Pyx_XGIVEREF(__pyx_t_6);
+      __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
+      __pyx_L56_try_end:;
+    }
+  }
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+  /* "pyfftw/pyfftw.pyx":887
+ * 
+ * 
+ *         if ('FFTW_DESTROY_INPUT' not in flags) and (             # <<<<<<<<<<<<<<
+ *                 (scheme[0] != 'c2r') or not self.__rank > 1):
+ *             # The default in all possible cases is to preserve the input
+ */
+  __pyx_t_14 = (__Pyx_PySequence_Contains(((PyObject *)__pyx_n_s__FFTW_DESTROY_INPUT), __pyx_v_flags, Py_NE)); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_14) {
+
+    /* "pyfftw/pyfftw.pyx":888
+ * 
+ *         if ('FFTW_DESTROY_INPUT' not in flags) and (
+ *                 (scheme[0] != 'c2r') or not self.__rank > 1):             # <<<<<<<<<<<<<<
+ *             # The default in all possible cases is to preserve the input
+ *             # This is not possible for r2c arrays with rank > 1
+ */
+    __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_scheme, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 888; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_9 = PyObject_RichCompare(__pyx_t_2, ((PyObject *)__pyx_n_s__c2r), Py_NE); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 888; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 888; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+    if (!__pyx_t_3) {
+      __pyx_t_11 = (!(__pyx_v_self->__pyx___rank > 1));
+      __pyx_t_21 = __pyx_t_11;
+    } else {
+      __pyx_t_21 = __pyx_t_3;
+    }
+    __pyx_t_3 = __pyx_t_21;
+  } else {
+    __pyx_t_3 = __pyx_t_14;
+  }
+  if (__pyx_t_3) {
+
+    /* "pyfftw/pyfftw.pyx":891
+ *             # The default in all possible cases is to preserve the input
+ *             # This is not possible for r2c arrays with rank > 1
+ *             self.__flags |= FFTW_PRESERVE_INPUT             # <<<<<<<<<<<<<<
+ * 
+ *         # Set up the arrays of structs for holding the stride shape
+ */
+    __pyx_v_self->__pyx___flags = (__pyx_v_self->__pyx___flags | __pyx_e_6pyfftw_6pyfftw_FFTW_PRESERVE_INPUT);
+    goto __pyx_L59;
+  }
+  __pyx_L59:;
+
+  /* "pyfftw/pyfftw.pyx":895
+ *         # Set up the arrays of structs for holding the stride shape
+ *         # information
+ *         self.__dims = <_fftw_iodim *>malloc(             # <<<<<<<<<<<<<<
+ *                 self.__rank * sizeof(_fftw_iodim))
+ *         self.__howmany_dims = <_fftw_iodim *>malloc(
+ */
+  __pyx_v_self->__pyx___dims = ((__pyx_t_6pyfftw_6pyfftw__fftw_iodim *)malloc((__pyx_v_self->__pyx___rank * (sizeof(__pyx_t_6pyfftw_6pyfftw__fftw_iodim)))));
+
+  /* "pyfftw/pyfftw.pyx":897
+ *         self.__dims = <_fftw_iodim *>malloc(
+ *                 self.__rank * sizeof(_fftw_iodim))
+ *         self.__howmany_dims = <_fftw_iodim *>malloc(             # <<<<<<<<<<<<<<
+ *                 self.__howmany_rank * sizeof(_fftw_iodim))
+ * 
+ */
+  __pyx_v_self->__pyx___howmany_dims = ((__pyx_t_6pyfftw_6pyfftw__fftw_iodim *)malloc((__pyx_v_self->__pyx___howmany_rank * (sizeof(__pyx_t_6pyfftw_6pyfftw__fftw_iodim)))));
+
+  /* "pyfftw/pyfftw.pyx":900
+ *                 self.__howmany_rank * sizeof(_fftw_iodim))
+ * 
+ *         if self.__dims == NULL or self.__howmany_dims == NULL:             # <<<<<<<<<<<<<<
+ *             # Not much else to do than raise an exception
+ *             raise MemoryError
+ */
+  __pyx_t_3 = (__pyx_v_self->__pyx___dims == NULL);
+  if (!__pyx_t_3) {
+    __pyx_t_14 = (__pyx_v_self->__pyx___howmany_dims == NULL);
+    __pyx_t_21 = __pyx_t_14;
+  } else {
+    __pyx_t_21 = __pyx_t_3;
+  }
+  if (__pyx_t_21) {
+
+    /* "pyfftw/pyfftw.pyx":902
+ *         if self.__dims == NULL or self.__howmany_dims == NULL:
+ *             # Not much else to do than raise an exception
+ *             raise MemoryError             # <<<<<<<<<<<<<<
+ * 
+ *         # Find the strides for all the axes of both arrays in terms of the
+ */
+    PyErr_NoMemory(); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    goto __pyx_L60;
+  }
+  __pyx_L60:;
+
+  /* "pyfftw/pyfftw.pyx":906
+ *         # Find the strides for all the axes of both arrays in terms of the
+ *         # number of elements (as opposed to the number of bytes).
+ *         self.__input_byte_strides = input_array.strides             # <<<<<<<<<<<<<<
+ *         self.__input_strides = tuple([stride/input_array.itemsize
+ *             for stride in input_array.strides])
+ */
+  __pyx_t_9 = PyObject_GetAttr(__pyx_v_input_array, __pyx_n_s__strides); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 906; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_9);
+  __Pyx_GIVEREF(__pyx_t_9);
+  __Pyx_GOTREF(__pyx_v_self->__pyx___input_byte_strides);
+  __Pyx_DECREF(__pyx_v_self->__pyx___input_byte_strides);
+  __pyx_v_self->__pyx___input_byte_strides = __pyx_t_9;
+  __pyx_t_9 = 0;
+
+  /* "pyfftw/pyfftw.pyx":907
+ *         # number of elements (as opposed to the number of bytes).
+ *         self.__input_byte_strides = input_array.strides
+ *         self.__input_strides = tuple([stride/input_array.itemsize             # <<<<<<<<<<<<<<
+ *             for stride in input_array.strides])
+ *         self.__output_byte_strides = output_array.strides
+ */
+  __pyx_t_9 = PyList_New(0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 907; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_9);
+
+  /* "pyfftw/pyfftw.pyx":908
+ *         self.__input_byte_strides = input_array.strides
+ *         self.__input_strides = tuple([stride/input_array.itemsize
+ *             for stride in input_array.strides])             # <<<<<<<<<<<<<<
+ *         self.__output_byte_strides = output_array.strides
+ *         self.__output_strides = tuple([stride/output_array.itemsize
+ */
+  __pyx_t_2 = PyObject_GetAttr(__pyx_v_input_array, __pyx_n_s__strides); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 908; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) {
+    __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_12 = 0;
+    __pyx_t_13 = NULL;
+  } else {
+    __pyx_t_12 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 908; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_13 = Py_TYPE(__pyx_t_1)->tp_iternext;
+  }
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  for (;;) {
+    if (!__pyx_t_13 && PyList_CheckExact(__pyx_t_1)) {
+      if (__pyx_t_12 >= PyList_GET_SIZE(__pyx_t_1)) break;
+      #if CYTHON_COMPILING_IN_CPYTHON
+      __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_12); __Pyx_INCREF(__pyx_t_2); __pyx_t_12++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 908; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      #else
+      __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 908; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      #endif
+    } else if (!__pyx_t_13 && PyTuple_CheckExact(__pyx_t_1)) {
+      if (__pyx_t_12 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
+      #if CYTHON_COMPILING_IN_CPYTHON
+      __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_12); __Pyx_INCREF(__pyx_t_2); __pyx_t_12++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 908; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      #else
+      __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 908; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      #endif
+    } else {
+      __pyx_t_2 = __pyx_t_13(__pyx_t_1);
+      if (unlikely(!__pyx_t_2)) {
+        if (PyErr_Occurred()) {
+          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
+          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 908; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+        break;
+      }
+      __Pyx_GOTREF(__pyx_t_2);
+    }
+    __Pyx_XDECREF(__pyx_v_stride);
+    __pyx_v_stride = __pyx_t_2;
+    __pyx_t_2 = 0;
+
+    /* "pyfftw/pyfftw.pyx":907
+ *         # number of elements (as opposed to the number of bytes).
+ *         self.__input_byte_strides = input_array.strides
+ *         self.__input_strides = tuple([stride/input_array.itemsize             # <<<<<<<<<<<<<<
+ *             for stride in input_array.strides])
+ *         self.__output_byte_strides = output_array.strides
+ */
+    __pyx_t_2 = PyObject_GetAttr(__pyx_v_input_array, __pyx_n_s__itemsize); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 907; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_10 = __Pyx_PyNumber_Divide(__pyx_v_stride, __pyx_t_2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 907; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_10);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    if (unlikely(__Pyx_PyList_Append(__pyx_t_9, (PyObject*)__pyx_t_10))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 907; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+  }
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_1 = ((PyObject *)PyList_AsTuple(__pyx_t_9)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 907; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
+  __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
+  __Pyx_GIVEREF(((PyObject *)__pyx_t_1));
+  __Pyx_GOTREF(__pyx_v_self->__pyx___input_strides);
+  __Pyx_DECREF(__pyx_v_self->__pyx___input_strides);
+  __pyx_v_self->__pyx___input_strides = ((PyObject *)__pyx_t_1);
+  __pyx_t_1 = 0;
+
+  /* "pyfftw/pyfftw.pyx":909
+ *         self.__input_strides = tuple([stride/input_array.itemsize
+ *             for stride in input_array.strides])
+ *         self.__output_byte_strides = output_array.strides             # <<<<<<<<<<<<<<
+ *         self.__output_strides = tuple([stride/output_array.itemsize
+ *             for stride in output_array.strides])
+ */
+  __pyx_t_1 = PyObject_GetAttr(__pyx_v_output_array, __pyx_n_s__strides); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 909; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_GIVEREF(__pyx_t_1);
+  __Pyx_GOTREF(__pyx_v_self->__pyx___output_byte_strides);
+  __Pyx_DECREF(__pyx_v_self->__pyx___output_byte_strides);
+  __pyx_v_self->__pyx___output_byte_strides = __pyx_t_1;
+  __pyx_t_1 = 0;
+
+  /* "pyfftw/pyfftw.pyx":910
+ *             for stride in input_array.strides])
+ *         self.__output_byte_strides = output_array.strides
+ *         self.__output_strides = tuple([stride/output_array.itemsize             # <<<<<<<<<<<<<<
+ *             for stride in output_array.strides])
+ * 
+ */
+  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 910; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+
+  /* "pyfftw/pyfftw.pyx":911
+ *         self.__output_byte_strides = output_array.strides
+ *         self.__output_strides = tuple([stride/output_array.itemsize
+ *             for stride in output_array.strides])             # <<<<<<<<<<<<<<
+ * 
+ *         # Make sure that the arrays are not too big for fftw
+ */
+  __pyx_t_9 = PyObject_GetAttr(__pyx_v_output_array, __pyx_n_s__strides); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 911; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_9);
+  if (PyList_CheckExact(__pyx_t_9) || PyTuple_CheckExact(__pyx_t_9)) {
+    __pyx_t_10 = __pyx_t_9; __Pyx_INCREF(__pyx_t_10); __pyx_t_12 = 0;
+    __pyx_t_13 = NULL;
+  } else {
+    __pyx_t_12 = -1; __pyx_t_10 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 911; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_10);
+    __pyx_t_13 = Py_TYPE(__pyx_t_10)->tp_iternext;
+  }
+  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+  for (;;) {
+    if (!__pyx_t_13 && PyList_CheckExact(__pyx_t_10)) {
+      if (__pyx_t_12 >= PyList_GET_SIZE(__pyx_t_10)) break;
+      #if CYTHON_COMPILING_IN_CPYTHON
+      __pyx_t_9 = PyList_GET_ITEM(__pyx_t_10, __pyx_t_12); __Pyx_INCREF(__pyx_t_9); __pyx_t_12++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 911; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      #else
+      __pyx_t_9 = PySequence_ITEM(__pyx_t_10, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 911; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      #endif
+    } else if (!__pyx_t_13 && PyTuple_CheckExact(__pyx_t_10)) {
+      if (__pyx_t_12 >= PyTuple_GET_SIZE(__pyx_t_10)) break;
+      #if CYTHON_COMPILING_IN_CPYTHON
+      __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_10, __pyx_t_12); __Pyx_INCREF(__pyx_t_9); __pyx_t_12++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 911; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      #else
+      __pyx_t_9 = PySequence_ITEM(__pyx_t_10, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 911; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      #endif
+    } else {
+      __pyx_t_9 = __pyx_t_13(__pyx_t_10);
+      if (unlikely(!__pyx_t_9)) {
+        if (PyErr_Occurred()) {
+          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
+          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 911; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+        break;
+      }
+      __Pyx_GOTREF(__pyx_t_9);
+    }
+    __Pyx_XDECREF(__pyx_v_stride);
+    __pyx_v_stride = __pyx_t_9;
+    __pyx_t_9 = 0;
+
+    /* "pyfftw/pyfftw.pyx":910
+ *             for stride in input_array.strides])
+ *         self.__output_byte_strides = output_array.strides
+ *         self.__output_strides = tuple([stride/output_array.itemsize             # <<<<<<<<<<<<<<
+ *             for stride in output_array.strides])
+ * 
+ */
+    __pyx_t_9 = PyObject_GetAttr(__pyx_v_output_array, __pyx_n_s__itemsize); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 910; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_9);
+    __pyx_t_2 = __Pyx_PyNumber_Divide(__pyx_v_stride, __pyx_t_9); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 910; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+    if (unlikely(__Pyx_PyList_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 910; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  }
+  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+  __pyx_t_10 = ((PyObject *)PyList_AsTuple(__pyx_t_1)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 910; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_10));
+  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
+  __Pyx_GIVEREF(((PyObject *)__pyx_t_10));
+  __Pyx_GOTREF(__pyx_v_self->__pyx___output_strides);
+  __Pyx_DECREF(__pyx_v_self->__pyx___output_strides);
+  __pyx_v_self->__pyx___output_strides = ((PyObject *)__pyx_t_10);
+  __pyx_t_10 = 0;
+
+  /* "pyfftw/pyfftw.pyx":917
+ *         # best (any suggestions, please get in touch).
+ *         cdef int i
+ *         for i in range(0, len(self.__input_shape)):             # <<<<<<<<<<<<<<
+ *             if self.__input_shape[i] >= <Py_ssize_t> limits.INT_MAX:
+ *                 raise ValueError('Dimensions of the input array must be ' +
+ */
+  __pyx_t_10 = __pyx_v_self->__pyx___input_shape;
+  __Pyx_INCREF(__pyx_t_10);
+  __pyx_t_12 = PyObject_Length(__pyx_t_10); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 917; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+  for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_12; __pyx_t_8+=1) {
+    __pyx_v_i = __pyx_t_8;
+
+    /* "pyfftw/pyfftw.pyx":918
+ *         cdef int i
+ *         for i in range(0, len(self.__input_shape)):
+ *             if self.__input_shape[i] >= <Py_ssize_t> limits.INT_MAX:             # <<<<<<<<<<<<<<
+ *                 raise ValueError('Dimensions of the input array must be ' +
+ *                         'less than ', str(limits.INT_MAX))
+ */
+    __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_self->__pyx___input_shape, __pyx_v_i, sizeof(int), PyInt_FromLong); if (!__pyx_t_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 918; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_10);
+    __pyx_t_1 = PyInt_FromSsize_t(((Py_ssize_t)INT_MAX)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 918; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_2 = PyObject_RichCompare(__pyx_t_10, __pyx_t_1, Py_GE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 918; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_21 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_21 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 918; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    if (__pyx_t_21) {
+
+      /* "pyfftw/pyfftw.pyx":919
+ *         for i in range(0, len(self.__input_shape)):
+ *             if self.__input_shape[i] >= <Py_ssize_t> limits.INT_MAX:
+ *                 raise ValueError('Dimensions of the input array must be ' +             # <<<<<<<<<<<<<<
+ *                         'less than ', str(limits.INT_MAX))
+ * 
+ */
+      __pyx_t_2 = PyNumber_Add(((PyObject *)__pyx_kp_s_31), ((PyObject *)__pyx_kp_s_32)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 919; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
+
+      /* "pyfftw/pyfftw.pyx":920
+ *             if self.__input_shape[i] >= <Py_ssize_t> limits.INT_MAX:
+ *                 raise ValueError('Dimensions of the input array must be ' +
+ *                         'less than ', str(limits.INT_MAX))             # <<<<<<<<<<<<<<
+ * 
+ *             if self.__input_strides[i] >= <Py_ssize_t> limits.INT_MAX:
+ */
+      __pyx_t_1 = PyInt_FromLong(INT_MAX); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 920; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 920; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_10);
+      PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1);
+      __Pyx_GIVEREF(__pyx_t_1);
+      __pyx_t_1 = 0;
+      __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 920; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
+      __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 919; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_10);
+      PyTuple_SET_ITEM(__pyx_t_10, 0, ((PyObject *)__pyx_t_2));
+      __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
+      PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_1);
+      __Pyx_GIVEREF(__pyx_t_1);
+      __pyx_t_2 = 0;
+      __pyx_t_1 = 0;
+      __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 919; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
+      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 919; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      goto __pyx_L67;
+    }
+    __pyx_L67:;
+
+    /* "pyfftw/pyfftw.pyx":922
+ *                         'less than ', str(limits.INT_MAX))
+ * 
+ *             if self.__input_strides[i] >= <Py_ssize_t> limits.INT_MAX:             # <<<<<<<<<<<<<<
+ *                 raise ValueError('Strides of the input array must be ' +
+ *                         'less than ', str(limits.INT_MAX))
+ */
+    __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_self->__pyx___input_strides, __pyx_v_i, sizeof(int), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_10 = PyInt_FromSsize_t(((Py_ssize_t)INT_MAX)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_10);
+    __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_t_10, Py_GE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+    __pyx_t_21 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_21 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    if (__pyx_t_21) {
+
+      /* "pyfftw/pyfftw.pyx":923
+ * 
+ *             if self.__input_strides[i] >= <Py_ssize_t> limits.INT_MAX:
+ *                 raise ValueError('Strides of the input array must be ' +             # <<<<<<<<<<<<<<
+ *                         'less than ', str(limits.INT_MAX))
+ * 
+ */
+      __pyx_t_2 = PyNumber_Add(((PyObject *)__pyx_kp_s_33), ((PyObject *)__pyx_kp_s_32)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 923; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
+
+      /* "pyfftw/pyfftw.pyx":924
+ *             if self.__input_strides[i] >= <Py_ssize_t> limits.INT_MAX:
+ *                 raise ValueError('Strides of the input array must be ' +
+ *                         'less than ', str(limits.INT_MAX))             # <<<<<<<<<<<<<<
+ * 
+ *         for i in range(0, len(self.__output_shape)):
+ */
+      __pyx_t_10 = PyInt_FromLong(INT_MAX); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_10);
+      __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_10);
+      __Pyx_GIVEREF(__pyx_t_10);
+      __pyx_t_10 = 0;
+      __pyx_t_10 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_10);
+      __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
+      __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 923; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_t_2));
+      __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
+      PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_10);
+      __Pyx_GIVEREF(__pyx_t_10);
+      __pyx_t_2 = 0;
+      __pyx_t_10 = 0;
+      __pyx_t_10 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 923; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_10);
+      __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
+      __Pyx_Raise(__pyx_t_10, 0, 0, 0);
+      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 923; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      goto __pyx_L68;
+    }
+    __pyx_L68:;
+  }
+
+  /* "pyfftw/pyfftw.pyx":926
+ *                         'less than ', str(limits.INT_MAX))
+ * 
+ *         for i in range(0, len(self.__output_shape)):             # <<<<<<<<<<<<<<
+ *             if self.__output_shape[i] >= <Py_ssize_t> limits.INT_MAX:
+ *                 raise ValueError('Dimensions of the output array must be ' +
+ */
+  __pyx_t_10 = __pyx_v_self->__pyx___output_shape;
+  __Pyx_INCREF(__pyx_t_10);
+  __pyx_t_12 = PyObject_Length(__pyx_t_10); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+  for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_12; __pyx_t_8+=1) {
+    __pyx_v_i = __pyx_t_8;
+
+    /* "pyfftw/pyfftw.pyx":927
+ * 
+ *         for i in range(0, len(self.__output_shape)):
+ *             if self.__output_shape[i] >= <Py_ssize_t> limits.INT_MAX:             # <<<<<<<<<<<<<<
+ *                 raise ValueError('Dimensions of the output array must be ' +
+ *                         'less than ', str(limits.INT_MAX))
+ */
+    __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_self->__pyx___output_shape, __pyx_v_i, sizeof(int), PyInt_FromLong); if (!__pyx_t_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 927; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_10);
+    __pyx_t_1 = PyInt_FromSsize_t(((Py_ssize_t)INT_MAX)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 927; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_2 = PyObject_RichCompare(__pyx_t_10, __pyx_t_1, Py_GE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 927; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_21 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_21 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 927; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    if (__pyx_t_21) {
+
+      /* "pyfftw/pyfftw.pyx":928
+ *         for i in range(0, len(self.__output_shape)):
+ *             if self.__output_shape[i] >= <Py_ssize_t> limits.INT_MAX:
+ *                 raise ValueError('Dimensions of the output array must be ' +             # <<<<<<<<<<<<<<
+ *                         'less than ', str(limits.INT_MAX))
+ * 
+ */
+      __pyx_t_2 = PyNumber_Add(((PyObject *)__pyx_kp_s_34), ((PyObject *)__pyx_kp_s_32)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 928; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
+
+      /* "pyfftw/pyfftw.pyx":929
+ *             if self.__output_shape[i] >= <Py_ssize_t> limits.INT_MAX:
+ *                 raise ValueError('Dimensions of the output array must be ' +
+ *                         'less than ', str(limits.INT_MAX))             # <<<<<<<<<<<<<<
+ * 
+ *             if self.__output_strides[i] >= <Py_ssize_t> limits.INT_MAX:
+ */
+      __pyx_t_1 = PyInt_FromLong(INT_MAX); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 929; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 929; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_10);
+      PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1);
+      __Pyx_GIVEREF(__pyx_t_1);
+      __pyx_t_1 = 0;
+      __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 929; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
+      __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 928; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_10);
+      PyTuple_SET_ITEM(__pyx_t_10, 0, ((PyObject *)__pyx_t_2));
+      __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
+      PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_1);
+      __Pyx_GIVEREF(__pyx_t_1);
+      __pyx_t_2 = 0;
+      __pyx_t_1 = 0;
+      __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 928; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
+      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 928; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      goto __pyx_L71;
+    }
+    __pyx_L71:;
+
+    /* "pyfftw/pyfftw.pyx":931
+ *                         'less than ', str(limits.INT_MAX))
+ * 
+ *             if self.__output_strides[i] >= <Py_ssize_t> limits.INT_MAX:             # <<<<<<<<<<<<<<
+ *                 raise ValueError('Strides of the output array must be ' +
+ *                         'less than ', str(limits.INT_MAX))
+ */
+    __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_self->__pyx___output_strides, __pyx_v_i, sizeof(int), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 931; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_10 = PyInt_FromSsize_t(((Py_ssize_t)INT_MAX)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 931; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_10);
+    __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_t_10, Py_GE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 931; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+    __pyx_t_21 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_21 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 931; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    if (__pyx_t_21) {
+
+      /* "pyfftw/pyfftw.pyx":932
+ * 
+ *             if self.__output_strides[i] >= <Py_ssize_t> limits.INT_MAX:
+ *                 raise ValueError('Strides of the output array must be ' +             # <<<<<<<<<<<<<<
+ *                         'less than ', str(limits.INT_MAX))
+ * 
+ */
+      __pyx_t_2 = PyNumber_Add(((PyObject *)__pyx_kp_s_35), ((PyObject *)__pyx_kp_s_32)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 932; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
+
+      /* "pyfftw/pyfftw.pyx":933
+ *             if self.__output_strides[i] >= <Py_ssize_t> limits.INT_MAX:
+ *                 raise ValueError('Strides of the output array must be ' +
+ *                         'less than ', str(limits.INT_MAX))             # <<<<<<<<<<<<<<
+ * 
+ *         fft_shape_lookup = functions['fft_shape_lookup']
+ */
+      __pyx_t_10 = PyInt_FromLong(INT_MAX); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 933; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_10);
+      __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 933; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_10);
+      __Pyx_GIVEREF(__pyx_t_10);
+      __pyx_t_10 = 0;
+      __pyx_t_10 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 933; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_10);
+      __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
+      __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 932; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_t_2));
+      __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
+      PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_10);
+      __Pyx_GIVEREF(__pyx_t_10);
+      __pyx_t_2 = 0;
+      __pyx_t_10 = 0;
+      __pyx_t_10 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 932; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_10);
+      __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
+      __Pyx_Raise(__pyx_t_10, 0, 0, 0);
+      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 932; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      goto __pyx_L72;
+    }
+    __pyx_L72:;
+  }
+
+  /* "pyfftw/pyfftw.pyx":935
+ *                         'less than ', str(limits.INT_MAX))
+ * 
+ *         fft_shape_lookup = functions['fft_shape_lookup']             # <<<<<<<<<<<<<<
+ *         if fft_shape_lookup == -1:
+ *             fft_shape = self.__input_shape
+ */
+  __pyx_t_10 = PyObject_GetItem(__pyx_v_functions, ((PyObject *)__pyx_n_s__fft_shape_lookup)); if (!__pyx_t_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 935; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_10);
+  __pyx_v_fft_shape_lookup = __pyx_t_10;
+  __pyx_t_10 = 0;
+
+  /* "pyfftw/pyfftw.pyx":936
+ * 
+ *         fft_shape_lookup = functions['fft_shape_lookup']
+ *         if fft_shape_lookup == -1:             # <<<<<<<<<<<<<<
+ *             fft_shape = self.__input_shape
+ *         else:
+ */
+  __pyx_t_10 = PyObject_RichCompare(__pyx_v_fft_shape_lookup, __pyx_int_neg_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 936; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_21 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_21 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 936; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+  if (__pyx_t_21) {
+
+    /* "pyfftw/pyfftw.pyx":937
+ *         fft_shape_lookup = functions['fft_shape_lookup']
+ *         if fft_shape_lookup == -1:
+ *             fft_shape = self.__input_shape             # <<<<<<<<<<<<<<
+ *         else:
+ *             fft_shape = fft_shape_lookup(input_array, output_array)
+ */
+    __pyx_t_10 = __pyx_v_self->__pyx___input_shape;
+    __Pyx_INCREF(__pyx_t_10);
+    __pyx_v_fft_shape = __pyx_t_10;
+    __pyx_t_10 = 0;
+    goto __pyx_L73;
+  }
+  /*else*/ {
+
+    /* "pyfftw/pyfftw.pyx":939
+ *             fft_shape = self.__input_shape
+ *         else:
+ *             fft_shape = fft_shape_lookup(input_array, output_array)             # <<<<<<<<<<<<<<
+ * 
+ *         # Fill in the stride and shape information
+ */
+    __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_10);
+    __Pyx_INCREF(__pyx_v_input_array);
+    PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_input_array);
+    __Pyx_GIVEREF(__pyx_v_input_array);
+    __Pyx_INCREF(__pyx_v_output_array);
+    PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_v_output_array);
+    __Pyx_GIVEREF(__pyx_v_output_array);
+    __pyx_t_1 = PyObject_Call(__pyx_v_fft_shape_lookup, ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
+    __pyx_v_fft_shape = __pyx_t_1;
+    __pyx_t_1 = 0;
+  }
+  __pyx_L73:;
+
+  /* "pyfftw/pyfftw.pyx":942
+ * 
+ *         # Fill in the stride and shape information
+ *         input_strides_array = self.__input_strides             # <<<<<<<<<<<<<<
+ *         output_strides_array = self.__output_strides
+ *         for i in range(0, self.__rank):
+ */
+  __pyx_t_1 = __pyx_v_self->__pyx___input_strides;
+  __Pyx_INCREF(__pyx_t_1);
+  __pyx_v_input_strides_array = __pyx_t_1;
+  __pyx_t_1 = 0;
+
+  /* "pyfftw/pyfftw.pyx":943
+ *         # Fill in the stride and shape information
+ *         input_strides_array = self.__input_strides
+ *         output_strides_array = self.__output_strides             # <<<<<<<<<<<<<<
+ *         for i in range(0, self.__rank):
+ *             self.__dims[i]._n = fft_shape[self.__axes[i]]
+ */
+  __pyx_t_1 = __pyx_v_self->__pyx___output_strides;
+  __Pyx_INCREF(__pyx_t_1);
+  __pyx_v_output_strides_array = __pyx_t_1;
+  __pyx_t_1 = 0;
+
+  /* "pyfftw/pyfftw.pyx":944
+ *         input_strides_array = self.__input_strides
+ *         output_strides_array = self.__output_strides
+ *         for i in range(0, self.__rank):             # <<<<<<<<<<<<<<
+ *             self.__dims[i]._n = fft_shape[self.__axes[i]]
+ *             self.__dims[i]._is = input_strides_array[self.__axes[i]]
+ */
+  __pyx_t_8 = __pyx_v_self->__pyx___rank;
+  for (__pyx_t_22 = 0; __pyx_t_22 < __pyx_t_8; __pyx_t_22+=1) {
+    __pyx_v_i = __pyx_t_22;
+
+    /* "pyfftw/pyfftw.pyx":945
+ *         output_strides_array = self.__output_strides
+ *         for i in range(0, self.__rank):
+ *             self.__dims[i]._n = fft_shape[self.__axes[i]]             # <<<<<<<<<<<<<<
+ *             self.__dims[i]._is = input_strides_array[self.__axes[i]]
+ *             self.__dims[i]._os = output_strides_array[self.__axes[i]]
+ */
+    __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_fft_shape, (__pyx_v_self->__pyx___axes[__pyx_v_i]), sizeof(int64_t), __Pyx_PyInt_to_py_int64_t); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 945; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_23 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_23 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 945; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    (__pyx_v_self->__pyx___dims[__pyx_v_i])._n = __pyx_t_23;
+
+    /* "pyfftw/pyfftw.pyx":946
+ *         for i in range(0, self.__rank):
+ *             self.__dims[i]._n = fft_shape[self.__axes[i]]
+ *             self.__dims[i]._is = input_strides_array[self.__axes[i]]             # <<<<<<<<<<<<<<
+ *             self.__dims[i]._os = output_strides_array[self.__axes[i]]
+ * 
+ */
+    __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_input_strides_array, (__pyx_v_self->__pyx___axes[__pyx_v_i]), sizeof(int64_t), __Pyx_PyInt_to_py_int64_t); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 946; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_23 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_23 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 946; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    (__pyx_v_self->__pyx___dims[__pyx_v_i])._is = __pyx_t_23;
+
+    /* "pyfftw/pyfftw.pyx":947
+ *             self.__dims[i]._n = fft_shape[self.__axes[i]]
+ *             self.__dims[i]._is = input_strides_array[self.__axes[i]]
+ *             self.__dims[i]._os = output_strides_array[self.__axes[i]]             # <<<<<<<<<<<<<<
+ * 
+ *         for i in range(0, self.__howmany_rank):
+ */
+    __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_output_strides_array, (__pyx_v_self->__pyx___axes[__pyx_v_i]), sizeof(int64_t), __Pyx_PyInt_to_py_int64_t); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 947; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_23 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_23 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 947; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    (__pyx_v_self->__pyx___dims[__pyx_v_i])._os = __pyx_t_23;
+  }
+
+  /* "pyfftw/pyfftw.pyx":949
+ *             self.__dims[i]._os = output_strides_array[self.__axes[i]]
+ * 
+ *         for i in range(0, self.__howmany_rank):             # <<<<<<<<<<<<<<
+ *             self.__howmany_dims[i]._n = fft_shape[self.__not_axes[i]]
+ *             self.__howmany_dims[i]._is = input_strides_array[self.__not_axes[i]]
+ */
+  __pyx_t_8 = __pyx_v_self->__pyx___howmany_rank;
+  for (__pyx_t_22 = 0; __pyx_t_22 < __pyx_t_8; __pyx_t_22+=1) {
+    __pyx_v_i = __pyx_t_22;
+
+    /* "pyfftw/pyfftw.pyx":950
+ * 
+ *         for i in range(0, self.__howmany_rank):
+ *             self.__howmany_dims[i]._n = fft_shape[self.__not_axes[i]]             # <<<<<<<<<<<<<<
+ *             self.__howmany_dims[i]._is = input_strides_array[self.__not_axes[i]]
+ *             self.__howmany_dims[i]._os = output_strides_array[self.__not_axes[i]]
+ */
+    __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_fft_shape, (__pyx_v_self->__pyx___not_axes[__pyx_v_i]), sizeof(int64_t), __Pyx_PyInt_to_py_int64_t); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 950; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_23 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_23 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 950; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    (__pyx_v_self->__pyx___howmany_dims[__pyx_v_i])._n = __pyx_t_23;
+
+    /* "pyfftw/pyfftw.pyx":951
+ *         for i in range(0, self.__howmany_rank):
+ *             self.__howmany_dims[i]._n = fft_shape[self.__not_axes[i]]
+ *             self.__howmany_dims[i]._is = input_strides_array[self.__not_axes[i]]             # <<<<<<<<<<<<<<
+ *             self.__howmany_dims[i]._os = output_strides_array[self.__not_axes[i]]
+ * 
+ */
+    __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_input_strides_array, (__pyx_v_self->__pyx___not_axes[__pyx_v_i]), sizeof(int64_t), __Pyx_PyInt_to_py_int64_t); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 951; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_23 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_23 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 951; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    (__pyx_v_self->__pyx___howmany_dims[__pyx_v_i])._is = __pyx_t_23;
+
+    /* "pyfftw/pyfftw.pyx":952
+ *             self.__howmany_dims[i]._n = fft_shape[self.__not_axes[i]]
+ *             self.__howmany_dims[i]._is = input_strides_array[self.__not_axes[i]]
+ *             self.__howmany_dims[i]._os = output_strides_array[self.__not_axes[i]]             # <<<<<<<<<<<<<<
+ * 
+ *         ## Point at which FFTW calls are made
+ */
+    __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_output_strides_array, (__pyx_v_self->__pyx___not_axes[__pyx_v_i]), sizeof(int64_t), __Pyx_PyInt_to_py_int64_t); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 952; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_23 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_23 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 952; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    (__pyx_v_self->__pyx___howmany_dims[__pyx_v_i])._os = __pyx_t_23;
+  }
+
+  /* "pyfftw/pyfftw.pyx":956
+ *         ## Point at which FFTW calls are made
+ *         ## (and none should be made before this)
+ *         if threads > 1:             # <<<<<<<<<<<<<<
+ *             self.__use_threads = True
+ *             self.__nthreads_plan_setter(threads)
+ */
+  __pyx_t_21 = (__pyx_v_threads > 1);
+  if (__pyx_t_21) {
+
+    /* "pyfftw/pyfftw.pyx":957
+ *         ## (and none should be made before this)
+ *         if threads > 1:
+ *             self.__use_threads = True             # <<<<<<<<<<<<<<
+ *             self.__nthreads_plan_setter(threads)
+ *         else:
+ */
+    __pyx_v_self->__pyx___use_threads = 1;
+
+    /* "pyfftw/pyfftw.pyx":958
+ *         if threads > 1:
+ *             self.__use_threads = True
+ *             self.__nthreads_plan_setter(threads)             # <<<<<<<<<<<<<<
+ *         else:
+ *             self.__use_threads = False
+ */
+    __pyx_v_self->__pyx___nthreads_plan_setter(__pyx_v_threads);
+    goto __pyx_L78;
+  }
+  /*else*/ {
+
+    /* "pyfftw/pyfftw.pyx":960
+ *             self.__nthreads_plan_setter(threads)
+ *         else:
+ *             self.__use_threads = False             # <<<<<<<<<<<<<<
+ *             self.__nthreads_plan_setter(1)
+ * 
+ */
+    __pyx_v_self->__pyx___use_threads = 0;
+
+    /* "pyfftw/pyfftw.pyx":961
+ *         else:
+ *             self.__use_threads = False
+ *             self.__nthreads_plan_setter(1)             # <<<<<<<<<<<<<<
+ * 
+ *         # Set the timelimit
+ */
+    __pyx_v_self->__pyx___nthreads_plan_setter(1);
+  }
+  __pyx_L78:;
+
+  /* "pyfftw/pyfftw.pyx":964
+ * 
+ *         # Set the timelimit
+ *         set_timelimit_func(_planning_timelimit)             # <<<<<<<<<<<<<<
+ * 
+ *         # Finally, construct the plan
+ */
+  __pyx_v_set_timelimit_func(__pyx_v__planning_timelimit);
+
+  /* "pyfftw/pyfftw.pyx":970
+ *             self.__rank, <fftw_iodim *>self.__dims,
+ *             self.__howmany_rank, <fftw_iodim *>self.__howmany_dims,
+ *             <void *>np.PyArray_DATA(self.__input_array),             # <<<<<<<<<<<<<<
+ *             <void *>np.PyArray_DATA(self.__output_array),
+ *             self.__direction, self.__flags)
+ */
+  __pyx_t_1 = ((PyObject *)__pyx_v_self->__pyx___input_array);
+  __Pyx_INCREF(__pyx_t_1);
+
+  /* "pyfftw/pyfftw.pyx":971
+ *             self.__howmany_rank, <fftw_iodim *>self.__howmany_dims,
+ *             <void *>np.PyArray_DATA(self.__input_array),
+ *             <void *>np.PyArray_DATA(self.__output_array),             # <<<<<<<<<<<<<<
+ *             self.__direction, self.__flags)
+ * 
+ */
+  __pyx_t_10 = ((PyObject *)__pyx_v_self->__pyx___output_array);
+  __Pyx_INCREF(__pyx_t_10);
+
+  /* "pyfftw/pyfftw.pyx":967
+ * 
+ *         # Finally, construct the plan
+ *         self.__plan = self.__fftw_planner(             # <<<<<<<<<<<<<<
+ *             self.__rank, <fftw_iodim *>self.__dims,
+ *             self.__howmany_rank, <fftw_iodim *>self.__howmany_dims,
+ */
+  __pyx_v_self->__pyx___plan = __pyx_v_self->__pyx___fftw_planner(__pyx_v_self->__pyx___rank, ((fftw_iodim *)__pyx_v_self->__pyx___dims), __pyx_v_self->__pyx___howmany_rank, ((fftw_iodim *)__pyx_v_self->__pyx___howmany_dims), ((void *)PyArray_DATA(((PyArrayObject *)__pyx_t_1))), ((void *)PyArray_DATA(((PyArrayObject *)__pyx_t_10))), __pyx_v_self->__pyx___direction, __pyx_v_self->__pyx___flags);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+
+  /* "pyfftw/pyfftw.pyx":974
+ *             self.__direction, self.__flags)
+ * 
+ *         if self.__plan == NULL:             # <<<<<<<<<<<<<<
+ *             raise RuntimeError('The data has an uncaught error that led '+
+ *                     'to the planner returning NULL. This is a bug.')
+ */
+  __pyx_t_21 = (__pyx_v_self->__pyx___plan == NULL);
+  if (__pyx_t_21) {
+
+    /* "pyfftw/pyfftw.pyx":975
+ * 
+ *         if self.__plan == NULL:
+ *             raise RuntimeError('The data has an uncaught error that led '+             # <<<<<<<<<<<<<<
+ *                     'to the planner returning NULL. This is a bug.')
+ * 
+ */
+    __pyx_t_10 = PyNumber_Add(((PyObject *)__pyx_kp_s_36), ((PyObject *)__pyx_kp_s_37)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 975; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(((PyObject *)__pyx_t_10));
+    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 975; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_t_10));
+    __Pyx_GIVEREF(((PyObject *)__pyx_t_10));
+    __pyx_t_10 = 0;
+    __pyx_t_10 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 975; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_10);
+    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
+    __Pyx_Raise(__pyx_t_10, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 975; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    goto __pyx_L79;
+  }
+  __pyx_L79:;
+
+  __pyx_r = 0;
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_9);
+  __Pyx_XDECREF(__pyx_t_10);
+  __Pyx_XDECREF(__pyx_t_19);
+  __Pyx_XDECREF(__pyx_t_20);
+  __Pyx_AddTraceback("pyfftw.pyfftw.FFTW.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_input_dtype);
+  __Pyx_XDECREF(__pyx_v_output_dtype);
+  __Pyx_XDECREF(__pyx_v_scheme);
+  __Pyx_XDECREF(__pyx_v_functions);
+  __Pyx_XDECREF(__pyx_v_each_alignment);
+  __Pyx_XDECREF(__pyx_v_n);
+  __Pyx_XDECREF(__pyx_v_total_N);
+  __Pyx_XDECREF(__pyx_v_each_flag);
+  __Pyx_XDECREF(__pyx_v_fft_shape_lookup);
+  __Pyx_XDECREF(__pyx_v_fft_shape);
+  __Pyx_XDECREF(__pyx_v_input_strides_array);
+  __Pyx_XDECREF(__pyx_v_output_strides_array);
+  __Pyx_XDECREF(__pyx_v_stride);
+  __Pyx_XDECREF(__pyx_v_flags);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static int __pyx_pw_6pyfftw_6pyfftw_4FFTW_13__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_6pyfftw_6pyfftw_4FFTW_12__init__[] = "\n        **Arguments**:\n\n        * ``input_array`` and ``output_array`` should be numpy arrays.\n          The contents of these arrays will be destroyed by the planning \n          process during initialisation. Information on supported \n          dtypes for the arrays is :ref:`given below <scheme_table>`.\n        \n        * ``axes`` describes along which axes the DFT should be taken.\n          This should be a valid lis [...]
+#if CYTHON_COMPILING_IN_CPYTHON
+struct wrapperbase __pyx_wrapperbase_6pyfftw_6pyfftw_4FFTW_12__init__;
+#endif
+static int __pyx_pw_6pyfftw_6pyfftw_4FFTW_13__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  CYTHON_UNUSED PyObject *__pyx_v_input_array = 0;
+  CYTHON_UNUSED PyObject *__pyx_v_output_array = 0;
+  CYTHON_UNUSED PyObject *__pyx_v_axes = 0;
+  CYTHON_UNUSED PyObject *__pyx_v_direction = 0;
+  CYTHON_UNUSED PyObject *__pyx_v_flags = 0;
+  CYTHON_UNUSED int __pyx_v_threads;
+  CYTHON_UNUSED PyObject *__pyx_v_planning_timelimit = 0;
+  CYTHON_UNUSED PyObject *__pyx_v_args = 0;
+  CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0;
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
+  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return -1;
+  __Pyx_GOTREF(__pyx_v_kwargs);
+  if (PyTuple_GET_SIZE(__pyx_args) > 7) {
+    __pyx_v_args = PyTuple_GetSlice(__pyx_args, 7, PyTuple_GET_SIZE(__pyx_args));
+    if (unlikely(!__pyx_v_args)) {
+      __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
+      __Pyx_RefNannyFinishContext();
+      return -1;
+    }
+    __Pyx_GOTREF(__pyx_v_args);
+  } else {
+    __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
+  }
+  {
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__input_array,&__pyx_n_s__output_array,&__pyx_n_s__axes,&__pyx_n_s__direction,&__pyx_n_s__flags,&__pyx_n_s__threads,&__pyx_n_s__planning_timelimit,0};
+    PyObject* values[7] = {0,0,0,0,0,0,0};
+
+    /* "pyfftw/pyfftw.pyx":978
+ *                     'to the planner returning NULL. This is a bug.')
+ * 
+ *     def __init__(self, input_array, output_array, axes=(-1,),             # <<<<<<<<<<<<<<
+ *             direction='FFTW_FORWARD', flags=('FFTW_MEASURE',),
+ *             int threads=1, planning_timelimit=None,
+ */
+    values[2] = ((PyObject *)__pyx_k_tuple_38);
+    values[3] = ((PyObject *)__pyx_n_s__FFTW_FORWARD);
+
+    /* "pyfftw/pyfftw.pyx":979
+ * 
+ *     def __init__(self, input_array, output_array, axes=(-1,),
+ *             direction='FFTW_FORWARD', flags=('FFTW_MEASURE',),             # <<<<<<<<<<<<<<
+ *             int threads=1, planning_timelimit=None,
+ *             *args, **kwargs):
+ */
+    values[4] = ((PyObject *)__pyx_k_tuple_39);
+
+    /* "pyfftw/pyfftw.pyx":980
+ *     def __init__(self, input_array, output_array, axes=(-1,),
+ *             direction='FFTW_FORWARD', flags=('FFTW_MEASURE',),
+ *             int threads=1, planning_timelimit=None,             # <<<<<<<<<<<<<<
+ *             *args, **kwargs):
+ *         '''
+ */
+    values[6] = ((PyObject *)Py_None);
+    if (unlikely(__pyx_kwds)) {
+      Py_ssize_t kw_args;
+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+      switch (pos_args) {
+        default:
+        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
+        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        case  0: break;
+      }
+      kw_args = PyDict_Size(__pyx_kwds);
+      switch (pos_args) {
+        case  0:
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__input_array)) != 0)) kw_args--;
+        else goto __pyx_L5_argtuple_error;
+        case  1:
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__output_array)) != 0)) kw_args--;
+        else {
+          __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 7, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 978; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        }
+        case  2:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__axes);
+          if (value) { values[2] = value; kw_args--; }
+        }
+        case  3:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__direction);
+          if (value) { values[3] = value; kw_args--; }
+        }
+        case  4:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__flags);
+          if (value) { values[4] = value; kw_args--; }
+        }
+        case  5:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__threads);
+          if (value) { values[5] = value; kw_args--; }
+        }
+        case  6:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__planning_timelimit);
+          if (value) { values[6] = value; kw_args--; }
+        }
+      }
+      if (unlikely(kw_args > 0)) {
+        const Py_ssize_t used_pos_args = (pos_args < 7) ? pos_args : 7;
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 978; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      }
+    } else {
+      switch (PyTuple_GET_SIZE(__pyx_args)) {
+        default:
+        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
+        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        break;
+        case  1:
+        case  0:
+        goto __pyx_L5_argtuple_error;
+      }
+    }
+    __pyx_v_input_array = values[0];
+    __pyx_v_output_array = values[1];
+    __pyx_v_axes = values[2];
+    __pyx_v_direction = values[3];
+    __pyx_v_flags = values[4];
+    if (values[5]) {
+      __pyx_v_threads = __Pyx_PyInt_AsInt(values[5]); if (unlikely((__pyx_v_threads == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 980; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+    } else {
+      __pyx_v_threads = ((int)1);
+    }
+    __pyx_v_planning_timelimit = values[6];
+  }
+  goto __pyx_L4_argument_unpacking_done;
+  __pyx_L5_argtuple_error:;
+  __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 7, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 978; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
+  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
+  __Pyx_AddTraceback("pyfftw.pyfftw.FFTW.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_RefNannyFinishContext();
+  return -1;
+  __pyx_L4_argument_unpacking_done:;
+  __pyx_r = __pyx_pf_6pyfftw_6pyfftw_4FFTW_12__init__(((struct __pyx_obj_6pyfftw_6pyfftw_FFTW *)__pyx_v_self), __pyx_v_input_array, __pyx_v_output_array, __pyx_v_axes, __pyx_v_direction, __pyx_v_flags, __pyx_v_threads, __pyx_v_planning_timelimit, __pyx_v_args, __pyx_v_kwargs);
+  __Pyx_XDECREF(__pyx_v_args);
+  __Pyx_XDECREF(__pyx_v_kwargs);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pyfftw/pyfftw.pyx":978
+ *                     'to the planner returning NULL. This is a bug.')
+ * 
+ *     def __init__(self, input_array, output_array, axes=(-1,),             # <<<<<<<<<<<<<<
+ *             direction='FFTW_FORWARD', flags=('FFTW_MEASURE',),
+ *             int threads=1, planning_timelimit=None,
+ */
+
+static int __pyx_pf_6pyfftw_6pyfftw_4FFTW_12__init__(CYTHON_UNUSED struct __pyx_obj_6pyfftw_6pyfftw_FFTW *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_input_array, CYTHON_UNUSED PyObject *__pyx_v_output_array, CYTHON_UNUSED PyObject *__pyx_v_axes, CYTHON_UNUSED PyObject *__pyx_v_direction, CYTHON_UNUSED PyObject *__pyx_v_flags, CYTHON_UNUSED int __pyx_v_threads, CYTHON_UNUSED PyObject *__pyx_v_planning_timelimit, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__init__", 0);
+
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static void __pyx_pw_6pyfftw_6pyfftw_4FFTW_15__dealloc__(PyObject *__pyx_v_self); /*proto*/
+static void __pyx_pw_6pyfftw_6pyfftw_4FFTW_15__dealloc__(PyObject *__pyx_v_self) {
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
+  __pyx_pf_6pyfftw_6pyfftw_4FFTW_14__dealloc__(((struct __pyx_obj_6pyfftw_6pyfftw_FFTW *)__pyx_v_self));
+  __Pyx_RefNannyFinishContext();
+}
+
+/* "pyfftw/pyfftw.pyx":1176
+ *         pass
+ * 
+ *     def __dealloc__(self):             # <<<<<<<<<<<<<<
+ * 
+ *         if not self.__axes == NULL:
+ */
+
+static void __pyx_pf_6pyfftw_6pyfftw_4FFTW_14__dealloc__(struct __pyx_obj_6pyfftw_6pyfftw_FFTW *__pyx_v_self) {
+  __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
+  __Pyx_RefNannySetupContext("__dealloc__", 0);
+
+  /* "pyfftw/pyfftw.pyx":1178
+ *     def __dealloc__(self):
+ * 
+ *         if not self.__axes == NULL:             # <<<<<<<<<<<<<<
+ *             free(self.__axes)
+ * 
+ */
+  __pyx_t_1 = (!(__pyx_v_self->__pyx___axes == NULL));
+  if (__pyx_t_1) {
+
+    /* "pyfftw/pyfftw.pyx":1179
+ * 
+ *         if not self.__axes == NULL:
+ *             free(self.__axes)             # <<<<<<<<<<<<<<
+ * 
+ *         if not self.__not_axes == NULL:
+ */
+    free(__pyx_v_self->__pyx___axes);
+    goto __pyx_L3;
+  }
+  __pyx_L3:;
+
+  /* "pyfftw/pyfftw.pyx":1181
+ *             free(self.__axes)
+ * 
+ *         if not self.__not_axes == NULL:             # <<<<<<<<<<<<<<
+ *             free(self.__not_axes)
+ * 
+ */
+  __pyx_t_1 = (!(__pyx_v_self->__pyx___not_axes == NULL));
+  if (__pyx_t_1) {
+
+    /* "pyfftw/pyfftw.pyx":1182
+ * 
+ *         if not self.__not_axes == NULL:
+ *             free(self.__not_axes)             # <<<<<<<<<<<<<<
+ * 
+ *         if not self.__plan == NULL:
+ */
+    free(__pyx_v_self->__pyx___not_axes);
+    goto __pyx_L4;
+  }
+  __pyx_L4:;
+
+  /* "pyfftw/pyfftw.pyx":1184
+ *             free(self.__not_axes)
+ * 
+ *         if not self.__plan == NULL:             # <<<<<<<<<<<<<<
+ *             self.__fftw_destroy(self.__plan)
+ * 
+ */
+  __pyx_t_1 = (!(__pyx_v_self->__pyx___plan == NULL));
+  if (__pyx_t_1) {
+
+    /* "pyfftw/pyfftw.pyx":1185
+ * 
+ *         if not self.__plan == NULL:
+ *             self.__fftw_destroy(self.__plan)             # <<<<<<<<<<<<<<
+ * 
+ *         if not self.__dims == NULL:
+ */
+    __pyx_v_self->__pyx___fftw_destroy(__pyx_v_self->__pyx___plan);
+    goto __pyx_L5;
+  }
+  __pyx_L5:;
+
+  /* "pyfftw/pyfftw.pyx":1187
+ *             self.__fftw_destroy(self.__plan)
+ * 
+ *         if not self.__dims == NULL:             # <<<<<<<<<<<<<<
+ *             free(self.__dims)
+ * 
+ */
+  __pyx_t_1 = (!(__pyx_v_self->__pyx___dims == NULL));
+  if (__pyx_t_1) {
+
+    /* "pyfftw/pyfftw.pyx":1188
+ * 
+ *         if not self.__dims == NULL:
+ *             free(self.__dims)             # <<<<<<<<<<<<<<
+ * 
+ *         if not self.__howmany_dims == NULL:
+ */
+    free(__pyx_v_self->__pyx___dims);
+    goto __pyx_L6;
+  }
+  __pyx_L6:;
+
+  /* "pyfftw/pyfftw.pyx":1190
+ *             free(self.__dims)
+ * 
+ *         if not self.__howmany_dims == NULL:             # <<<<<<<<<<<<<<
+ *             free(self.__howmany_dims)
+ * 
+ */
+  __pyx_t_1 = (!(__pyx_v_self->__pyx___howmany_dims == NULL));
+  if (__pyx_t_1) {
+
+    /* "pyfftw/pyfftw.pyx":1191
+ * 
+ *         if not self.__howmany_dims == NULL:
+ *             free(self.__howmany_dims)             # <<<<<<<<<<<<<<
+ * 
+ *     def __call__(self, input_array=None, output_array=None,
+ */
+    free(__pyx_v_self->__pyx___howmany_dims);
+    goto __pyx_L7;
+  }
+  __pyx_L7:;
+
+  __Pyx_RefNannyFinishContext();
+}
+
+/* Python wrapper */
+static PyObject *__pyx_pw_6pyfftw_6pyfftw_4FFTW_17__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_6pyfftw_6pyfftw_4FFTW_16__call__[] = "__call__(input_array=None, output_array=None, normalise_idft=True)\n\n        Calling the class instance (optionally) updates the arrays, then\n        calls :meth:`~pyfftw.FFTW.execute`, before optionally normalising \n        the output and returning the output array.\n\n        It has some built-in helpers to make life simpler for the calling\n        functions (as distinct from manually updating the arrays and\n        calli [...]
+#if CYTHON_COMPILING_IN_CPYTHON
+struct wrapperbase __pyx_wrapperbase_6pyfftw_6pyfftw_4FFTW_16__call__;
+#endif
+static PyObject *__pyx_pw_6pyfftw_6pyfftw_4FFTW_17__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  PyObject *__pyx_v_input_array = 0;
+  PyObject *__pyx_v_output_array = 0;
+  PyObject *__pyx_v_normalise_idft = 0;
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__call__ (wrapper)", 0);
+  {
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__input_array,&__pyx_n_s__output_array,&__pyx_n_s__normalise_idft,0};
+    PyObject* values[3] = {0,0,0};
+
+    /* "pyfftw/pyfftw.pyx":1193
+ *             free(self.__howmany_dims)
+ * 
+ *     def __call__(self, input_array=None, output_array=None,             # <<<<<<<<<<<<<<
+ *             normalise_idft=True):
+ *         '''__call__(input_array=None, output_array=None, normalise_idft=True)
+ */
+    values[0] = ((PyObject *)Py_None);
+    values[1] = ((PyObject *)Py_None);
+    values[2] = __pyx_k_40;
+    if (unlikely(__pyx_kwds)) {
+      Py_ssize_t kw_args;
+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+      switch (pos_args) {
+        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        case  0: break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+      kw_args = PyDict_Size(__pyx_kwds);
+      switch (pos_args) {
+        case  0:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__input_array);
+          if (value) { values[0] = value; kw_args--; }
+        }
+        case  1:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__output_array);
+          if (value) { values[1] = value; kw_args--; }
+        }
+        case  2:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__normalise_idft);
+          if (value) { values[2] = value; kw_args--; }
+        }
+      }
+      if (unlikely(kw_args > 0)) {
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__call__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1193; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      }
+    } else {
+      switch (PyTuple_GET_SIZE(__pyx_args)) {
+        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        case  0: break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+    }
+    __pyx_v_input_array = values[0];
+    __pyx_v_output_array = values[1];
+    __pyx_v_normalise_idft = values[2];
+  }
+  goto __pyx_L4_argument_unpacking_done;
+  __pyx_L5_argtuple_error:;
+  __Pyx_RaiseArgtupleInvalid("__call__", 0, 0, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1193; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_AddTraceback("pyfftw.pyfftw.FFTW.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_RefNannyFinishContext();
+  return NULL;
+  __pyx_L4_argument_unpacking_done:;
+  __pyx_r = __pyx_pf_6pyfftw_6pyfftw_4FFTW_16__call__(((struct __pyx_obj_6pyfftw_6pyfftw_FFTW *)__pyx_v_self), __pyx_v_input_array, __pyx_v_output_array, __pyx_v_normalise_idft);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_6pyfftw_6pyfftw_4FFTW_16__call__(struct __pyx_obj_6pyfftw_6pyfftw_FFTW *__pyx_v_self, PyObject *__pyx_v_input_array, PyObject *__pyx_v_output_array, PyObject *__pyx_v_normalise_idft) {
+  int __pyx_v_copy_needed;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
+  int __pyx_t_2;
+  int __pyx_t_3;
+  PyObject *__pyx_t_4 = NULL;
+  PyObject *__pyx_t_5 = NULL;
+  PyObject *__pyx_t_6 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__call__", 0);
+  __Pyx_INCREF(__pyx_v_input_array);
+  __Pyx_INCREF(__pyx_v_output_array);
+
+  /* "pyfftw/pyfftw.pyx":1251
+ *         '''
+ * 
+ *         if input_array is not None or output_array is not None:             # <<<<<<<<<<<<<<
+ * 
+ *             if input_array is None:
+ */
+  __pyx_t_1 = (__pyx_v_input_array != Py_None);
+  if (!__pyx_t_1) {
+    __pyx_t_2 = (__pyx_v_output_array != Py_None);
+    __pyx_t_3 = __pyx_t_2;
+  } else {
+    __pyx_t_3 = __pyx_t_1;
+  }
+  if (__pyx_t_3) {
+
+    /* "pyfftw/pyfftw.pyx":1253
+ *         if input_array is not None or output_array is not None:
+ * 
+ *             if input_array is None:             # <<<<<<<<<<<<<<
+ *                 input_array = self.__input_array
+ * 
+ */
+    __pyx_t_3 = (__pyx_v_input_array == Py_None);
+    if (__pyx_t_3) {
+
+      /* "pyfftw/pyfftw.pyx":1254
+ * 
+ *             if input_array is None:
+ *                 input_array = self.__input_array             # <<<<<<<<<<<<<<
+ * 
+ *             if output_array is None:
+ */
+      __pyx_t_4 = ((PyObject *)__pyx_v_self->__pyx___input_array);
+      __Pyx_INCREF(__pyx_t_4);
+      __Pyx_DECREF(__pyx_v_input_array);
+      __pyx_v_input_array = __pyx_t_4;
+      __pyx_t_4 = 0;
+      goto __pyx_L4;
+    }
+    __pyx_L4:;
+
+    /* "pyfftw/pyfftw.pyx":1256
+ *                 input_array = self.__input_array
+ * 
+ *             if output_array is None:             # <<<<<<<<<<<<<<
+ *                 output_array = self.__output_array
+ * 
+ */
+    __pyx_t_3 = (__pyx_v_output_array == Py_None);
+    if (__pyx_t_3) {
+
+      /* "pyfftw/pyfftw.pyx":1257
+ * 
+ *             if output_array is None:
+ *                 output_array = self.__output_array             # <<<<<<<<<<<<<<
+ * 
+ *             if not isinstance(input_array, np.ndarray):
+ */
+      __pyx_t_4 = ((PyObject *)__pyx_v_self->__pyx___output_array);
+      __Pyx_INCREF(__pyx_t_4);
+      __Pyx_DECREF(__pyx_v_output_array);
+      __pyx_v_output_array = __pyx_t_4;
+      __pyx_t_4 = 0;
+      goto __pyx_L5;
+    }
+    __pyx_L5:;
+
+    /* "pyfftw/pyfftw.pyx":1259
+ *                 output_array = self.__output_array
+ * 
+ *             if not isinstance(input_array, np.ndarray):             # <<<<<<<<<<<<<<
+ *                 copy_needed = True
+ *             elif (not input_array.dtype == self.__input_dtype):
+ */
+    __pyx_t_4 = ((PyObject *)((PyObject*)__pyx_ptype_5numpy_ndarray));
+    __Pyx_INCREF(__pyx_t_4);
+    __pyx_t_3 = __Pyx_TypeCheck(__pyx_v_input_array, __pyx_t_4); 
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __pyx_t_1 = (!__pyx_t_3);
+    if (__pyx_t_1) {
+
+      /* "pyfftw/pyfftw.pyx":1260
+ * 
+ *             if not isinstance(input_array, np.ndarray):
+ *                 copy_needed = True             # <<<<<<<<<<<<<<
+ *             elif (not input_array.dtype == self.__input_dtype):
+ *                 copy_needed = True
+ */
+      __pyx_v_copy_needed = 1;
+      goto __pyx_L6;
+    }
+
+    /* "pyfftw/pyfftw.pyx":1261
+ *             if not isinstance(input_array, np.ndarray):
+ *                 copy_needed = True
+ *             elif (not input_array.dtype == self.__input_dtype):             # <<<<<<<<<<<<<<
+ *                 copy_needed = True
+ *             elif (not input_array.strides == self.__input_byte_strides):
+ */
+    __pyx_t_4 = PyObject_GetAttr(__pyx_v_input_array, __pyx_n_s__dtype); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1261; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_5 = PyObject_RichCompare(__pyx_t_4, __pyx_v_self->__pyx___input_dtype, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1261; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1261; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    __pyx_t_3 = (!__pyx_t_1);
+    if (__pyx_t_3) {
+
+      /* "pyfftw/pyfftw.pyx":1262
+ *                 copy_needed = True
+ *             elif (not input_array.dtype == self.__input_dtype):
+ *                 copy_needed = True             # <<<<<<<<<<<<<<
+ *             elif (not input_array.strides == self.__input_byte_strides):
+ *                 copy_needed = True
+ */
+      __pyx_v_copy_needed = 1;
+      goto __pyx_L6;
+    }
+
+    /* "pyfftw/pyfftw.pyx":1263
+ *             elif (not input_array.dtype == self.__input_dtype):
+ *                 copy_needed = True
+ *             elif (not input_array.strides == self.__input_byte_strides):             # <<<<<<<<<<<<<<
+ *                 copy_needed = True
+ *             elif not (<intptr_t>np.PyArray_DATA(input_array)
+ */
+    __pyx_t_5 = PyObject_GetAttr(__pyx_v_input_array, __pyx_n_s__strides); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1263; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __pyx_t_4 = PyObject_RichCompare(__pyx_t_5, __pyx_v_self->__pyx___input_byte_strides, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1263; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1263; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __pyx_t_1 = (!__pyx_t_3);
+    if (__pyx_t_1) {
+
+      /* "pyfftw/pyfftw.pyx":1264
+ *                 copy_needed = True
+ *             elif (not input_array.strides == self.__input_byte_strides):
+ *                 copy_needed = True             # <<<<<<<<<<<<<<
+ *             elif not (<intptr_t>np.PyArray_DATA(input_array)
+ *                     % self.input_alignment == 0):
+ */
+      __pyx_v_copy_needed = 1;
+      goto __pyx_L6;
+    }
+
+    /* "pyfftw/pyfftw.pyx":1265
+ *             elif (not input_array.strides == self.__input_byte_strides):
+ *                 copy_needed = True
+ *             elif not (<intptr_t>np.PyArray_DATA(input_array)             # <<<<<<<<<<<<<<
+ *                     % self.input_alignment == 0):
+ *                 copy_needed = True
+ */
+    if (!(likely(((__pyx_v_input_array) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_input_array, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1265; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = __pyx_v_input_array;
+    __Pyx_INCREF(__pyx_t_4);
+    __pyx_t_5 = PyInt_FromSsize_t(((intptr_t)PyArray_DATA(((PyArrayObject *)__pyx_t_4)))); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1265; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+    /* "pyfftw/pyfftw.pyx":1266
+ *                 copy_needed = True
+ *             elif not (<intptr_t>np.PyArray_DATA(input_array)
+ *                     % self.input_alignment == 0):             # <<<<<<<<<<<<<<
+ *                 copy_needed = True
+ *             else:
+ */
+    __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__input_alignment); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_6 = PyNumber_Remainder(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __pyx_t_4 = PyObject_RichCompare(__pyx_t_6, __pyx_int_0, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __pyx_t_3 = (!__pyx_t_1);
+    if (__pyx_t_3) {
+
+      /* "pyfftw/pyfftw.pyx":1267
+ *             elif not (<intptr_t>np.PyArray_DATA(input_array)
+ *                     % self.input_alignment == 0):
+ *                 copy_needed = True             # <<<<<<<<<<<<<<
+ *             else:
+ *                 copy_needed = False
+ */
+      __pyx_v_copy_needed = 1;
+      goto __pyx_L6;
+    }
+    /*else*/ {
+
+      /* "pyfftw/pyfftw.pyx":1269
+ *                 copy_needed = True
+ *             else:
+ *                 copy_needed = False             # <<<<<<<<<<<<<<
+ * 
+ *             if copy_needed:
+ */
+      __pyx_v_copy_needed = 0;
+    }
+    __pyx_L6:;
+
+    /* "pyfftw/pyfftw.pyx":1271
+ *                 copy_needed = False
+ * 
+ *             if copy_needed:             # <<<<<<<<<<<<<<
+ * 
+ *                 if not isinstance(input_array, np.ndarray):
+ */
+    if (__pyx_v_copy_needed) {
+
+      /* "pyfftw/pyfftw.pyx":1273
+ *             if copy_needed:
+ * 
+ *                 if not isinstance(input_array, np.ndarray):             # <<<<<<<<<<<<<<
+ *                     input_array = np.asanyarray(input_array)
+ * 
+ */
+      __pyx_t_4 = ((PyObject *)((PyObject*)__pyx_ptype_5numpy_ndarray));
+      __Pyx_INCREF(__pyx_t_4);
+      __pyx_t_3 = __Pyx_TypeCheck(__pyx_v_input_array, __pyx_t_4); 
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __pyx_t_1 = (!__pyx_t_3);
+      if (__pyx_t_1) {
+
+        /* "pyfftw/pyfftw.pyx":1274
+ * 
+ *                 if not isinstance(input_array, np.ndarray):
+ *                     input_array = np.asanyarray(input_array)             # <<<<<<<<<<<<<<
+ * 
+ *                 if not input_array.shape == self.__input_shape:
+ */
+        __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_4);
+        __pyx_t_6 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__asanyarray); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_6);
+        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+        __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_4);
+        __Pyx_INCREF(__pyx_v_input_array);
+        PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_input_array);
+        __Pyx_GIVEREF(__pyx_v_input_array);
+        __pyx_t_5 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_5);
+        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+        __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
+        __Pyx_DECREF(__pyx_v_input_array);
+        __pyx_v_input_array = __pyx_t_5;
+        __pyx_t_5 = 0;
+        goto __pyx_L8;
+      }
+      __pyx_L8:;
+
+      /* "pyfftw/pyfftw.pyx":1276
+ *                     input_array = np.asanyarray(input_array)
+ * 
+ *                 if not input_array.shape == self.__input_shape:             # <<<<<<<<<<<<<<
+ *                     raise ValueError('Invalid input shape: '
+ *                             'The new input array should be the same shape '
+ */
+      __pyx_t_5 = PyObject_GetAttr(__pyx_v_input_array, __pyx_n_s__shape); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __pyx_t_4 = PyObject_RichCompare(__pyx_t_5, __pyx_v_self->__pyx___input_shape, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __pyx_t_3 = (!__pyx_t_1);
+      if (__pyx_t_3) {
+
+        /* "pyfftw/pyfftw.pyx":1277
+ * 
+ *                 if not input_array.shape == self.__input_shape:
+ *                     raise ValueError('Invalid input shape: '             # <<<<<<<<<<<<<<
+ *                             'The new input array should be the same shape '
+ *                             'as the input array used to instantiate the '
+ */
+        __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_42), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1277; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_4);
+        __Pyx_Raise(__pyx_t_4, 0, 0, 0);
+        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1277; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        goto __pyx_L9;
+      }
+      __pyx_L9:;
+
+      /* "pyfftw/pyfftw.pyx":1282
+ *                             'object.')
+ * 
+ *                 self.__input_array[:] = input_array             # <<<<<<<<<<<<<<
+ * 
+ *                 if output_array is not None:
+ */
+      if (__Pyx_PySequence_SetSlice(((PyObject *)__pyx_v_self->__pyx___input_array), 0, PY_SSIZE_T_MAX, __pyx_v_input_array) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1282; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+      /* "pyfftw/pyfftw.pyx":1284
+ *                 self.__input_array[:] = input_array
+ * 
+ *                 if output_array is not None:             # <<<<<<<<<<<<<<
+ *                     # No point wasting time if no update is necessary
+ *                     # (which the copy above may have avoided)
+ */
+      __pyx_t_3 = (__pyx_v_output_array != Py_None);
+      if (__pyx_t_3) {
+
+        /* "pyfftw/pyfftw.pyx":1287
+ *                     # No point wasting time if no update is necessary
+ *                     # (which the copy above may have avoided)
+ *                     input_array = self.__input_array             # <<<<<<<<<<<<<<
+ *                     self.update_arrays(input_array, output_array)
+ * 
+ */
+        __pyx_t_4 = ((PyObject *)__pyx_v_self->__pyx___input_array);
+        __Pyx_INCREF(__pyx_t_4);
+        __Pyx_DECREF(__pyx_v_input_array);
+        __pyx_v_input_array = __pyx_t_4;
+        __pyx_t_4 = 0;
+
+        /* "pyfftw/pyfftw.pyx":1288
+ *                     # (which the copy above may have avoided)
+ *                     input_array = self.__input_array
+ *                     self.update_arrays(input_array, output_array)             # <<<<<<<<<<<<<<
+ * 
+ *             else:
+ */
+        __pyx_t_4 = ((struct __pyx_vtabstruct_6pyfftw_6pyfftw_FFTW *)__pyx_v_self->__pyx_vtab)->update_arrays(__pyx_v_self, __pyx_v_input_array, __pyx_v_output_array, 0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1288; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_4);
+        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+        goto __pyx_L10;
+      }
+      __pyx_L10:;
+      goto __pyx_L7;
+    }
+    /*else*/ {
+
+      /* "pyfftw/pyfftw.pyx":1291
+ * 
+ *             else:
+ *                 self.update_arrays(input_array, output_array)             # <<<<<<<<<<<<<<
+ * 
+ *         self.execute()
+ */
+      __pyx_t_4 = ((struct __pyx_vtabstruct_6pyfftw_6pyfftw_FFTW *)__pyx_v_self->__pyx_vtab)->update_arrays(__pyx_v_self, __pyx_v_input_array, __pyx_v_output_array, 0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    }
+    __pyx_L7:;
+    goto __pyx_L3;
+  }
+  __pyx_L3:;
+
+  /* "pyfftw/pyfftw.pyx":1293
+ *                 self.update_arrays(input_array, output_array)
+ * 
+ *         self.execute()             # <<<<<<<<<<<<<<
+ * 
+ *         if self.__direction == FFTW_BACKWARD and normalise_idft:
+ */
+  __pyx_t_4 = ((struct __pyx_vtabstruct_6pyfftw_6pyfftw_FFTW *)__pyx_v_self->__pyx_vtab)->execute(__pyx_v_self, 0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1293; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+  /* "pyfftw/pyfftw.pyx":1295
+ *         self.execute()
+ * 
+ *         if self.__direction == FFTW_BACKWARD and normalise_idft:             # <<<<<<<<<<<<<<
+ *             self.__output_array *= self.__normalisation_scaling
+ * 
+ */
+  __pyx_t_3 = (__pyx_v_self->__pyx___direction == __pyx_e_6pyfftw_6pyfftw_FFTW_BACKWARD);
+  if (__pyx_t_3) {
+    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_normalise_idft); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = __pyx_t_1;
+  } else {
+    __pyx_t_2 = __pyx_t_3;
+  }
+  if (__pyx_t_2) {
+
+    /* "pyfftw/pyfftw.pyx":1296
+ * 
+ *         if self.__direction == FFTW_BACKWARD and normalise_idft:
+ *             self.__output_array *= self.__normalisation_scaling             # <<<<<<<<<<<<<<
+ * 
+ *         return self.__output_array
+ */
+    __pyx_t_4 = PyFloat_FromDouble(__pyx_v_self->__pyx___normalisation_scaling); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_5 = PyNumber_InPlaceMultiply(((PyObject *)__pyx_v_self->__pyx___output_array), __pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GIVEREF(__pyx_t_5);
+    __Pyx_GOTREF(__pyx_v_self->__pyx___output_array);
+    __Pyx_DECREF(((PyObject *)__pyx_v_self->__pyx___output_array));
+    __pyx_v_self->__pyx___output_array = ((PyArrayObject *)__pyx_t_5);
+    __pyx_t_5 = 0;
+    goto __pyx_L11;
+  }
+  __pyx_L11:;
+
+  /* "pyfftw/pyfftw.pyx":1298
+ *             self.__output_array *= self.__normalisation_scaling
+ * 
+ *         return self.__output_array             # <<<<<<<<<<<<<<
+ * 
+ *     cpdef update_arrays(self,
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx___output_array));
+  __pyx_r = ((PyObject *)__pyx_v_self->__pyx___output_array);
+  goto __pyx_L0;
+
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_XDECREF(__pyx_t_5);
+  __Pyx_XDECREF(__pyx_t_6);
+  __Pyx_AddTraceback("pyfftw.pyfftw.FFTW.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_input_array);
+  __Pyx_XDECREF(__pyx_v_output_array);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pyfftw/pyfftw.pyx":1300
+ *         return self.__output_array
+ * 
+ *     cpdef update_arrays(self,             # <<<<<<<<<<<<<<
+ *             new_input_array, new_output_array):
+ *         '''update_arrays(new_input_array, new_output_array)
+ */
+
+static PyObject *__pyx_pw_6pyfftw_6pyfftw_4FFTW_19update_arrays(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyObject *__pyx_f_6pyfftw_6pyfftw_4FFTW_update_arrays(struct __pyx_obj_6pyfftw_6pyfftw_FFTW *__pyx_v_self, PyObject *__pyx_v_new_input_array, PyObject *__pyx_v_new_output_array, int __pyx_skip_dispatch) {
+  PyObject *__pyx_v_new_input_shape = NULL;
+  PyObject *__pyx_v_new_output_shape = NULL;
+  PyObject *__pyx_v_new_input_strides = NULL;
+  PyObject *__pyx_v_new_output_strides = NULL;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  int __pyx_t_4;
+  int __pyx_t_5;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("update_arrays", 0);
+  /* Check if called by wrapper */
+  if (unlikely(__pyx_skip_dispatch)) ;
+  /* Check if overriden in Python */
+  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
+    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__update_arrays); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6pyfftw_6pyfftw_4FFTW_19update_arrays)) {
+      __Pyx_XDECREF(__pyx_r);
+      __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __Pyx_INCREF(__pyx_v_new_input_array);
+      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_new_input_array);
+      __Pyx_GIVEREF(__pyx_v_new_input_array);
+      __Pyx_INCREF(__pyx_v_new_output_array);
+      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_new_output_array);
+      __Pyx_GIVEREF(__pyx_v_new_output_array);
+      __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+      __pyx_r = __pyx_t_3;
+      __pyx_t_3 = 0;
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      goto __pyx_L0;
+    }
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  }
+
+  /* "pyfftw/pyfftw.pyx":1323
+ *         object will still be in a sane state).
+ *         '''
+ *         if not isinstance(new_input_array, np.ndarray):             # <<<<<<<<<<<<<<
+ *             raise ValueError('Invalid input array: '
+ *                     'The new input array needs to be an instance '
+ */
+  __pyx_t_1 = ((PyObject *)((PyObject*)__pyx_ptype_5numpy_ndarray));
+  __Pyx_INCREF(__pyx_t_1);
+  __pyx_t_4 = __Pyx_TypeCheck(__pyx_v_new_input_array, __pyx_t_1); 
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_5 = (!__pyx_t_4);
+  if (__pyx_t_5) {
+
+    /* "pyfftw/pyfftw.pyx":1324
+ *         '''
+ *         if not isinstance(new_input_array, np.ndarray):
+ *             raise ValueError('Invalid input array: '             # <<<<<<<<<<<<<<
+ *                     'The new input array needs to be an instance '
+ *                     'of numpy.ndarray')
+ */
+    __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_44), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    goto __pyx_L3;
+  }
+  __pyx_L3:;
+
+  /* "pyfftw/pyfftw.pyx":1328
+ *                     'of numpy.ndarray')
+ * 
+ *         if not isinstance(new_output_array, np.ndarray):             # <<<<<<<<<<<<<<
+ *             raise ValueError('Invalid output array '
+ *                     'The new output array needs to be an instance '
+ */
+  __pyx_t_1 = ((PyObject *)((PyObject*)__pyx_ptype_5numpy_ndarray));
+  __Pyx_INCREF(__pyx_t_1);
+  __pyx_t_5 = __Pyx_TypeCheck(__pyx_v_new_output_array, __pyx_t_1); 
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_4 = (!__pyx_t_5);
+  if (__pyx_t_4) {
+
+    /* "pyfftw/pyfftw.pyx":1329
+ * 
+ *         if not isinstance(new_output_array, np.ndarray):
+ *             raise ValueError('Invalid output array '             # <<<<<<<<<<<<<<
+ *                     'The new output array needs to be an instance '
+ *                     'of numpy.ndarray')
+ */
+    __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_46), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1329; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1329; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    goto __pyx_L4;
+  }
+  __pyx_L4:;
+
+  /* "pyfftw/pyfftw.pyx":1333
+ *                     'of numpy.ndarray')
+ * 
+ *         if not (<intptr_t>np.PyArray_DATA(new_input_array) %             # <<<<<<<<<<<<<<
+ *                 self.input_alignment == 0):
+ *             raise ValueError('Invalid input alignment: '
+ */
+  if (!(likely(((__pyx_v_new_input_array) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_new_input_array, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1333; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __pyx_v_new_input_array;
+  __Pyx_INCREF(__pyx_t_1);
+  __pyx_t_3 = PyInt_FromSsize_t(((intptr_t)PyArray_DATA(((PyArrayObject *)__pyx_t_1)))); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1333; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "pyfftw/pyfftw.pyx":1334
+ * 
+ *         if not (<intptr_t>np.PyArray_DATA(new_input_array) %
+ *                 self.input_alignment == 0):             # <<<<<<<<<<<<<<
+ *             raise ValueError('Invalid input alignment: '
+ *                     'The original arrays were %d-byte aligned. It is '
+ */
+  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__input_alignment); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = PyNumber_Remainder(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1333; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_int_0, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_5 = (!__pyx_t_4);
+  if (__pyx_t_5) {
+
+    /* "pyfftw/pyfftw.pyx":1338
+ *                     'The original arrays were %d-byte aligned. It is '
+ *                     'necessary that the update input array is similarly '
+ *                     'aligned.' % self.input_alignment)             # <<<<<<<<<<<<<<
+ * 
+ *         if not (<intptr_t>np.PyArray_DATA(new_output_array) %
+ */
+    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__input_alignment); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_47), __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_t_2));
+    __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
+    __pyx_t_2 = 0;
+    __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
+    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    goto __pyx_L5;
+  }
+  __pyx_L5:;
+
+  /* "pyfftw/pyfftw.pyx":1340
+ *                     'aligned.' % self.input_alignment)
+ * 
+ *         if not (<intptr_t>np.PyArray_DATA(new_output_array) %             # <<<<<<<<<<<<<<
+ *                 self.output_alignment == 0):
+ *             raise ValueError('Invalid output alignment: '
+ */
+  if (!(likely(((__pyx_v_new_output_array) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_new_output_array, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1340; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __pyx_v_new_output_array;
+  __Pyx_INCREF(__pyx_t_2);
+  __pyx_t_1 = PyInt_FromSsize_t(((intptr_t)PyArray_DATA(((PyArrayObject *)__pyx_t_2)))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1340; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+  /* "pyfftw/pyfftw.pyx":1341
+ * 
+ *         if not (<intptr_t>np.PyArray_DATA(new_output_array) %
+ *                 self.output_alignment == 0):             # <<<<<<<<<<<<<<
+ *             raise ValueError('Invalid output alignment: '
+ *                     'The original arrays were %d-byte aligned. It is '
+ */
+  __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__output_alignment); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_3 = PyNumber_Remainder(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1340; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_2 = PyObject_RichCompare(__pyx_t_3, __pyx_int_0, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_4 = (!__pyx_t_5);
+  if (__pyx_t_4) {
+
+    /* "pyfftw/pyfftw.pyx":1345
+ *                     'The original arrays were %d-byte aligned. It is '
+ *                     'necessary that the update output array is similarly '
+ *                     'aligned.' % self.output_alignment)             # <<<<<<<<<<<<<<
+ * 
+ *         if not new_input_array.dtype == self.__input_dtype:
+ */
+    __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__output_alignment); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_48), __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_3));
+    __Pyx_GIVEREF(((PyObject *)__pyx_t_3));
+    __pyx_t_3 = 0;
+    __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    goto __pyx_L6;
+  }
+  __pyx_L6:;
+
+  /* "pyfftw/pyfftw.pyx":1347
+ *                     'aligned.' % self.output_alignment)
+ * 
+ *         if not new_input_array.dtype == self.__input_dtype:             # <<<<<<<<<<<<<<
+ *             raise ValueError('Invalid input dtype: '
+ *                     'The new input array is not of the same '
+ */
+  __pyx_t_3 = PyObject_GetAttr(__pyx_v_new_input_array, __pyx_n_s__dtype); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_2 = PyObject_RichCompare(__pyx_t_3, __pyx_v_self->__pyx___input_dtype, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_5 = (!__pyx_t_4);
+  if (__pyx_t_5) {
+
+    /* "pyfftw/pyfftw.pyx":1348
+ * 
+ *         if not new_input_array.dtype == self.__input_dtype:
+ *             raise ValueError('Invalid input dtype: '             # <<<<<<<<<<<<<<
+ *                     'The new input array is not of the same '
+ *                     'dtype as was originally planned for.')
+ */
+    __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_50), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    goto __pyx_L7;
+  }
+  __pyx_L7:;
+
+  /* "pyfftw/pyfftw.pyx":1352
+ *                     'dtype as was originally planned for.')
+ * 
+ *         if not new_output_array.dtype == self.__output_dtype:             # <<<<<<<<<<<<<<
+ *             raise ValueError('Invalid output dtype: '
+ *                     'The new output array is not of the same '
+ */
+  __pyx_t_2 = PyObject_GetAttr(__pyx_v_new_output_array, __pyx_n_s__dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_v_self->__pyx___output_dtype, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_t_4 = (!__pyx_t_5);
+  if (__pyx_t_4) {
+
+    /* "pyfftw/pyfftw.pyx":1353
+ * 
+ *         if not new_output_array.dtype == self.__output_dtype:
+ *             raise ValueError('Invalid output dtype: '             # <<<<<<<<<<<<<<
+ *                     'The new output array is not of the same '
+ *                     'dtype as was originally planned for.')
+ */
+    __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_52), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    goto __pyx_L8;
+  }
+  __pyx_L8:;
+
+  /* "pyfftw/pyfftw.pyx":1357
+ *                     'dtype as was originally planned for.')
+ * 
+ *         new_input_shape = new_input_array.shape             # <<<<<<<<<<<<<<
+ *         new_output_shape = new_output_array.shape
+ * 
+ */
+  __pyx_t_3 = PyObject_GetAttr(__pyx_v_new_input_array, __pyx_n_s__shape); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_v_new_input_shape = __pyx_t_3;
+  __pyx_t_3 = 0;
+
+  /* "pyfftw/pyfftw.pyx":1358
+ * 
+ *         new_input_shape = new_input_array.shape
+ *         new_output_shape = new_output_array.shape             # <<<<<<<<<<<<<<
+ * 
+ *         new_input_strides = new_input_array.strides
+ */
+  __pyx_t_3 = PyObject_GetAttr(__pyx_v_new_output_array, __pyx_n_s__shape); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_v_new_output_shape = __pyx_t_3;
+  __pyx_t_3 = 0;
+
+  /* "pyfftw/pyfftw.pyx":1360
+ *         new_output_shape = new_output_array.shape
+ * 
+ *         new_input_strides = new_input_array.strides             # <<<<<<<<<<<<<<
+ *         new_output_strides = new_output_array.strides
+ * 
+ */
+  __pyx_t_3 = PyObject_GetAttr(__pyx_v_new_input_array, __pyx_n_s__strides); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1360; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_v_new_input_strides = __pyx_t_3;
+  __pyx_t_3 = 0;
+
+  /* "pyfftw/pyfftw.pyx":1361
+ * 
+ *         new_input_strides = new_input_array.strides
+ *         new_output_strides = new_output_array.strides             # <<<<<<<<<<<<<<
+ * 
+ *         if not new_input_shape == self.__input_shape:
+ */
+  __pyx_t_3 = PyObject_GetAttr(__pyx_v_new_output_array, __pyx_n_s__strides); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_v_new_output_strides = __pyx_t_3;
+  __pyx_t_3 = 0;
+
+  /* "pyfftw/pyfftw.pyx":1363
+ *         new_output_strides = new_output_array.strides
+ * 
+ *         if not new_input_shape == self.__input_shape:             # <<<<<<<<<<<<<<
+ *             raise ValueError('Invalid input shape: '
+ *                     'The new input array should be the same shape as '
+ */
+  __pyx_t_3 = PyObject_RichCompare(__pyx_v_new_input_shape, __pyx_v_self->__pyx___input_shape, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_t_5 = (!__pyx_t_4);
+  if (__pyx_t_5) {
+
+    /* "pyfftw/pyfftw.pyx":1364
+ * 
+ *         if not new_input_shape == self.__input_shape:
+ *             raise ValueError('Invalid input shape: '             # <<<<<<<<<<<<<<
+ *                     'The new input array should be the same shape as '
+ *                     'the input array used to instantiate the object.')
+ */
+    __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_53), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    goto __pyx_L9;
+  }
+  __pyx_L9:;
+
+  /* "pyfftw/pyfftw.pyx":1368
+ *                     'the input array used to instantiate the object.')
+ * 
+ *         if not new_output_shape == self.__output_shape:             # <<<<<<<<<<<<<<
+ *             raise ValueError('Invalid output shape: '
+ *                     'The new output array should be the same shape as '
+ */
+  __pyx_t_3 = PyObject_RichCompare(__pyx_v_new_output_shape, __pyx_v_self->__pyx___output_shape, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_t_4 = (!__pyx_t_5);
+  if (__pyx_t_4) {
+
+    /* "pyfftw/pyfftw.pyx":1369
+ * 
+ *         if not new_output_shape == self.__output_shape:
+ *             raise ValueError('Invalid output shape: '             # <<<<<<<<<<<<<<
+ *                     'The new output array should be the same shape as '
+ *                     'the output array used to instantiate the object.')
+ */
+    __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_55), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    goto __pyx_L10;
+  }
+  __pyx_L10:;
+
+  /* "pyfftw/pyfftw.pyx":1373
+ *                     'the output array used to instantiate the object.')
+ * 
+ *         if not new_input_strides == self.__input_byte_strides:             # <<<<<<<<<<<<<<
+ *             raise ValueError('Invalid input striding: '
+ *                     'The strides should be identical for the new '
+ */
+  __pyx_t_3 = PyObject_RichCompare(__pyx_v_new_input_strides, __pyx_v_self->__pyx___input_byte_strides, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1373; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1373; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_t_5 = (!__pyx_t_4);
+  if (__pyx_t_5) {
+
+    /* "pyfftw/pyfftw.pyx":1374
+ * 
+ *         if not new_input_strides == self.__input_byte_strides:
+ *             raise ValueError('Invalid input striding: '             # <<<<<<<<<<<<<<
+ *                     'The strides should be identical for the new '
+ *                     'input array as for the old.')
+ */
+    __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_57), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    goto __pyx_L11;
+  }
+  __pyx_L11:;
+
+  /* "pyfftw/pyfftw.pyx":1378
+ *                     'input array as for the old.')
+ * 
+ *         if not new_output_strides == self.__output_byte_strides:             # <<<<<<<<<<<<<<
+ *             raise ValueError('Invalid output striding: '
+ *                     'The strides should be identical for the new '
+ */
+  __pyx_t_3 = PyObject_RichCompare(__pyx_v_new_output_strides, __pyx_v_self->__pyx___output_byte_strides, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1378; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1378; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_t_4 = (!__pyx_t_5);
+  if (__pyx_t_4) {
+
+    /* "pyfftw/pyfftw.pyx":1379
+ * 
+ *         if not new_output_strides == self.__output_byte_strides:
+ *             raise ValueError('Invalid output striding: '             # <<<<<<<<<<<<<<
+ *                     'The strides should be identical for the new '
+ *                     'output array as for the old.')
+ */
+    __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_59), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1379; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1379; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    goto __pyx_L12;
+  }
+  __pyx_L12:;
+
+  /* "pyfftw/pyfftw.pyx":1383
+ *                     'output array as for the old.')
+ * 
+ *         self._update_arrays(new_input_array, new_output_array)             # <<<<<<<<<<<<<<
+ * 
+ *     cdef _update_arrays(self,
+ */
+  if (!(likely(((__pyx_v_new_input_array) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_new_input_array, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = __pyx_v_new_input_array;
+  __Pyx_INCREF(__pyx_t_3);
+  if (!(likely(((__pyx_v_new_output_array) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_new_output_array, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __pyx_v_new_output_array;
+  __Pyx_INCREF(__pyx_t_2);
+  __pyx_t_1 = ((struct __pyx_vtabstruct_6pyfftw_6pyfftw_FFTW *)__pyx_v_self->__pyx_vtab)->_update_arrays(__pyx_v_self, ((PyArrayObject *)__pyx_t_3), ((PyArrayObject *)__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_AddTraceback("pyfftw.pyfftw.FFTW.update_arrays", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = 0;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_new_input_shape);
+  __Pyx_XDECREF(__pyx_v_new_output_shape);
+  __Pyx_XDECREF(__pyx_v_new_input_strides);
+  __Pyx_XDECREF(__pyx_v_new_output_strides);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static PyObject *__pyx_pw_6pyfftw_6pyfftw_4FFTW_19update_arrays(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_6pyfftw_6pyfftw_4FFTW_18update_arrays[] = "update_arrays(new_input_array, new_output_array)\n\n        Update the arrays upon which the DFT is taken.\n\n        The new arrays should be of the same dtypes as the originals, the same\n        shapes as the originals and should have the same strides between axes.\n        If the original data was aligned so as to allow SIMD instructions\n        (e.g. by being aligned on a 16-byte boundary), then the new array must\n   [...]
+static PyObject *__pyx_pw_6pyfftw_6pyfftw_4FFTW_19update_arrays(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  PyObject *__pyx_v_new_input_array = 0;
+  PyObject *__pyx_v_new_output_array = 0;
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("update_arrays (wrapper)", 0);
+  {
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__new_input_array,&__pyx_n_s__new_output_array,0};
+    PyObject* values[2] = {0,0};
+    if (unlikely(__pyx_kwds)) {
+      Py_ssize_t kw_args;
+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+      switch (pos_args) {
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        case  0: break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+      kw_args = PyDict_Size(__pyx_kwds);
+      switch (pos_args) {
+        case  0:
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__new_input_array)) != 0)) kw_args--;
+        else goto __pyx_L5_argtuple_error;
+        case  1:
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__new_output_array)) != 0)) kw_args--;
+        else {
+          __Pyx_RaiseArgtupleInvalid("update_arrays", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1300; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        }
+      }
+      if (unlikely(kw_args > 0)) {
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "update_arrays") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1300; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      }
+    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+      goto __pyx_L5_argtuple_error;
+    } else {
+      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+    }
+    __pyx_v_new_input_array = values[0];
+    __pyx_v_new_output_array = values[1];
+  }
+  goto __pyx_L4_argument_unpacking_done;
+  __pyx_L5_argtuple_error:;
+  __Pyx_RaiseArgtupleInvalid("update_arrays", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1300; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_AddTraceback("pyfftw.pyfftw.FFTW.update_arrays", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_RefNannyFinishContext();
+  return NULL;
+  __pyx_L4_argument_unpacking_done:;
+  __pyx_r = __pyx_pf_6pyfftw_6pyfftw_4FFTW_18update_arrays(((struct __pyx_obj_6pyfftw_6pyfftw_FFTW *)__pyx_v_self), __pyx_v_new_input_array, __pyx_v_new_output_array);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pyfftw/pyfftw.pyx":1300
+ *         return self.__output_array
+ * 
+ *     cpdef update_arrays(self,             # <<<<<<<<<<<<<<
+ *             new_input_array, new_output_array):
+ *         '''update_arrays(new_input_array, new_output_array)
+ */
+
+static PyObject *__pyx_pf_6pyfftw_6pyfftw_4FFTW_18update_arrays(struct __pyx_obj_6pyfftw_6pyfftw_FFTW *__pyx_v_self, PyObject *__pyx_v_new_input_array, PyObject *__pyx_v_new_output_array) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("update_arrays", 0);
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = ((struct __pyx_vtabstruct_6pyfftw_6pyfftw_FFTW *)__pyx_v_self->__pyx_vtab)->update_arrays(__pyx_v_self, __pyx_v_new_input_array, __pyx_v_new_output_array, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("pyfftw.pyfftw.FFTW.update_arrays", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pyfftw/pyfftw.pyx":1385
+ *         self._update_arrays(new_input_array, new_output_array)
+ * 
+ *     cdef _update_arrays(self,             # <<<<<<<<<<<<<<
+ *             np.ndarray new_input_array, np.ndarray new_output_array):
+ *         ''' A C interface to the update_arrays method that does not
+ */
+
+static PyObject *__pyx_f_6pyfftw_6pyfftw_4FFTW__update_arrays(struct __pyx_obj_6pyfftw_6pyfftw_FFTW *__pyx_v_self, PyArrayObject *__pyx_v_new_input_array, PyArrayObject *__pyx_v_new_output_array) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("_update_arrays", 0);
+
+  /* "pyfftw/pyfftw.pyx":1390
+ *         perform any checks on strides being correct and so on.
+ *         '''
+ *         self.__input_array = new_input_array             # <<<<<<<<<<<<<<
+ *         self.__output_array = new_output_array
+ * 
+ */
+  __Pyx_INCREF(((PyObject *)__pyx_v_new_input_array));
+  __Pyx_GIVEREF(((PyObject *)__pyx_v_new_input_array));
+  __Pyx_GOTREF(__pyx_v_self->__pyx___input_array);
+  __Pyx_DECREF(((PyObject *)__pyx_v_self->__pyx___input_array));
+  __pyx_v_self->__pyx___input_array = __pyx_v_new_input_array;
+
+  /* "pyfftw/pyfftw.pyx":1391
+ *         '''
+ *         self.__input_array = new_input_array
+ *         self.__output_array = new_output_array             # <<<<<<<<<<<<<<
+ * 
+ *     def get_input_array(self):
+ */
+  __Pyx_INCREF(((PyObject *)__pyx_v_new_output_array));
+  __Pyx_GIVEREF(((PyObject *)__pyx_v_new_output_array));
+  __Pyx_GOTREF(__pyx_v_self->__pyx___output_array);
+  __Pyx_DECREF(((PyObject *)__pyx_v_self->__pyx___output_array));
+  __pyx_v_self->__pyx___output_array = __pyx_v_new_output_array;
+
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static PyObject *__pyx_pw_6pyfftw_6pyfftw_4FFTW_21get_input_array(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static char __pyx_doc_6pyfftw_6pyfftw_4FFTW_20get_input_array[] = "get_input_array()\n\n        Return the input array that is associated with the FFTW \n        instance.\n        ";
+static PyObject *__pyx_pw_6pyfftw_6pyfftw_4FFTW_21get_input_array(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("get_input_array (wrapper)", 0);
+  __pyx_r = __pyx_pf_6pyfftw_6pyfftw_4FFTW_20get_input_array(((struct __pyx_obj_6pyfftw_6pyfftw_FFTW *)__pyx_v_self));
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pyfftw/pyfftw.pyx":1393
+ *         self.__output_array = new_output_array
+ * 
+ *     def get_input_array(self):             # <<<<<<<<<<<<<<
+ *         '''get_input_array()
+ * 
+ */
+
+static PyObject *__pyx_pf_6pyfftw_6pyfftw_4FFTW_20get_input_array(struct __pyx_obj_6pyfftw_6pyfftw_FFTW *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("get_input_array", 0);
+
+  /* "pyfftw/pyfftw.pyx":1399
+ *         instance.
+ *         '''
+ *         return self.__input_array             # <<<<<<<<<<<<<<
+ * 
+ *     def get_output_array(self):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx___input_array));
+  __pyx_r = ((PyObject *)__pyx_v_self->__pyx___input_array);
+  goto __pyx_L0;
+
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static PyObject *__pyx_pw_6pyfftw_6pyfftw_4FFTW_23get_output_array(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static char __pyx_doc_6pyfftw_6pyfftw_4FFTW_22get_output_array[] = "get_output_array()\n\n        Return the output array that is associated with the FFTW\n        instance.\n        ";
+static PyObject *__pyx_pw_6pyfftw_6pyfftw_4FFTW_23get_output_array(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("get_output_array (wrapper)", 0);
+  __pyx_r = __pyx_pf_6pyfftw_6pyfftw_4FFTW_22get_output_array(((struct __pyx_obj_6pyfftw_6pyfftw_FFTW *)__pyx_v_self));
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pyfftw/pyfftw.pyx":1401
+ *         return self.__input_array
+ * 
+ *     def get_output_array(self):             # <<<<<<<<<<<<<<
+ *         '''get_output_array()
+ * 
+ */
+
+static PyObject *__pyx_pf_6pyfftw_6pyfftw_4FFTW_22get_output_array(struct __pyx_obj_6pyfftw_6pyfftw_FFTW *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("get_output_array", 0);
+
+  /* "pyfftw/pyfftw.pyx":1407
+ *         instance.
+ *         '''
+ *         return self.__output_array             # <<<<<<<<<<<<<<
+ * 
+ *     cpdef execute(self):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx___output_array));
+  __pyx_r = ((PyObject *)__pyx_v_self->__pyx___output_array);
+  goto __pyx_L0;
+
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pyfftw/pyfftw.pyx":1409
+ *         return self.__output_array
+ * 
+ *     cpdef execute(self):             # <<<<<<<<<<<<<<
+ *         '''execute()
+ * 
+ */
+
+static PyObject *__pyx_pw_6pyfftw_6pyfftw_4FFTW_25execute(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_f_6pyfftw_6pyfftw_4FFTW_execute(struct __pyx_obj_6pyfftw_6pyfftw_FFTW *__pyx_v_self, int __pyx_skip_dispatch) {
+  void *__pyx_v_input_pointer;
+  void *__pyx_v_output_pointer;
+  void *__pyx_v_plan;
+  __pyx_t_6pyfftw_6pyfftw_fftw_generic_execute __pyx_v_fftw_execute;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  void *__pyx_t_3;
+  __pyx_t_6pyfftw_6pyfftw_fftw_generic_execute __pyx_t_4;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("execute", 0);
+  /* Check if called by wrapper */
+  if (unlikely(__pyx_skip_dispatch)) ;
+  /* Check if overriden in Python */
+  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
+    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__execute); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1409; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6pyfftw_6pyfftw_4FFTW_25execute)) {
+      __Pyx_XDECREF(__pyx_r);
+      __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1409; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __pyx_r = __pyx_t_2;
+      __pyx_t_2 = 0;
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      goto __pyx_L0;
+    }
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  }
+
+  /* "pyfftw/pyfftw.pyx":1418
+ *         '''
+ *         cdef void *input_pointer = (
+ *                 <void *>np.PyArray_DATA(self.__input_array))             # <<<<<<<<<<<<<<
+ *         cdef void *output_pointer = (
+ *                 <void *>np.PyArray_DATA(self.__output_array))
+ */
+  __pyx_t_1 = ((PyObject *)__pyx_v_self->__pyx___input_array);
+  __Pyx_INCREF(__pyx_t_1);
+  __pyx_v_input_pointer = ((void *)PyArray_DATA(((PyArrayObject *)__pyx_t_1)));
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "pyfftw/pyfftw.pyx":1420
+ *                 <void *>np.PyArray_DATA(self.__input_array))
+ *         cdef void *output_pointer = (
+ *                 <void *>np.PyArray_DATA(self.__output_array))             # <<<<<<<<<<<<<<
+ * 
+ *         cdef void *plan = self.__plan
+ */
+  __pyx_t_1 = ((PyObject *)__pyx_v_self->__pyx___output_array);
+  __Pyx_INCREF(__pyx_t_1);
+  __pyx_v_output_pointer = ((void *)PyArray_DATA(((PyArrayObject *)__pyx_t_1)));
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "pyfftw/pyfftw.pyx":1422
+ *                 <void *>np.PyArray_DATA(self.__output_array))
+ * 
+ *         cdef void *plan = self.__plan             # <<<<<<<<<<<<<<
+ *         cdef fftw_generic_execute fftw_execute = self.__fftw_execute
+ * 
+ */
+  __pyx_t_3 = __pyx_v_self->__pyx___plan;
+  __pyx_v_plan = __pyx_t_3;
+
+  /* "pyfftw/pyfftw.pyx":1423
+ * 
+ *         cdef void *plan = self.__plan
+ *         cdef fftw_generic_execute fftw_execute = self.__fftw_execute             # <<<<<<<<<<<<<<
+ * 
+ *         if self.__use_threads:
+ */
+  __pyx_t_4 = __pyx_v_self->__pyx___fftw_execute;
+  __pyx_v_fftw_execute = __pyx_t_4;
+
+  /* "pyfftw/pyfftw.pyx":1425
+ *         cdef fftw_generic_execute fftw_execute = self.__fftw_execute
+ * 
+ *         if self.__use_threads:             # <<<<<<<<<<<<<<
+ *             with nogil:
+ *                 fftw_execute(plan, input_pointer, output_pointer)
+ */
+  if (__pyx_v_self->__pyx___use_threads) {
+
+    /* "pyfftw/pyfftw.pyx":1426
+ * 
+ *         if self.__use_threads:
+ *             with nogil:             # <<<<<<<<<<<<<<
+ *                 fftw_execute(plan, input_pointer, output_pointer)
+ *         else:
+ */
+    {
+        #ifdef WITH_THREAD
+        PyThreadState *_save = NULL;
+        #endif
+        Py_UNBLOCK_THREADS
+        /*try:*/ {
+
+          /* "pyfftw/pyfftw.pyx":1427
+ *         if self.__use_threads:
+ *             with nogil:
+ *                 fftw_execute(plan, input_pointer, output_pointer)             # <<<<<<<<<<<<<<
+ *         else:
+ *             fftw_execute(self.__plan, input_pointer, output_pointer)
+ */
+          __pyx_v_fftw_execute(__pyx_v_plan, __pyx_v_input_pointer, __pyx_v_output_pointer);
+        }
+
+        /* "pyfftw/pyfftw.pyx":1426
+ * 
+ *         if self.__use_threads:
+ *             with nogil:             # <<<<<<<<<<<<<<
+ *                 fftw_execute(plan, input_pointer, output_pointer)
+ *         else:
+ */
+        /*finally:*/ {
+          Py_BLOCK_THREADS
+        }
+    }
+    goto __pyx_L3;
+  }
+  /*else*/ {
+
+    /* "pyfftw/pyfftw.pyx":1429
+ *                 fftw_execute(plan, input_pointer, output_pointer)
+ *         else:
+ *             fftw_execute(self.__plan, input_pointer, output_pointer)             # <<<<<<<<<<<<<<
+ * 
+ * cdef void count_char(char c, void *counter_ptr):
+ */
+    __pyx_v_fftw_execute(__pyx_v_self->__pyx___plan, __pyx_v_input_pointer, __pyx_v_output_pointer);
+  }
+  __pyx_L3:;
+
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_AddTraceback("pyfftw.pyfftw.FFTW.execute", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = 0;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static PyObject *__pyx_pw_6pyfftw_6pyfftw_4FFTW_25execute(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static char __pyx_doc_6pyfftw_6pyfftw_4FFTW_24execute[] = "execute()\n\n        Execute the planned operation, taking the correct kind of FFT of\n        the input array (what is returned by :meth:`get_input_array`), \n        and putting the result in the output array (what is returned by\n        :meth:`get_output_array`).\n        ";
+static PyObject *__pyx_pw_6pyfftw_6pyfftw_4FFTW_25execute(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("execute (wrapper)", 0);
+  __pyx_r = __pyx_pf_6pyfftw_6pyfftw_4FFTW_24execute(((struct __pyx_obj_6pyfftw_6pyfftw_FFTW *)__pyx_v_self));
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pyfftw/pyfftw.pyx":1409
+ *         return self.__output_array
+ * 
+ *     cpdef execute(self):             # <<<<<<<<<<<<<<
+ *         '''execute()
+ * 
+ */
+
+static PyObject *__pyx_pf_6pyfftw_6pyfftw_4FFTW_24execute(struct __pyx_obj_6pyfftw_6pyfftw_FFTW *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("execute", 0);
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = ((struct __pyx_vtabstruct_6pyfftw_6pyfftw_FFTW *)__pyx_v_self->__pyx_vtab)->execute(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1409; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("pyfftw.pyfftw.FFTW.execute", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pyfftw/pyfftw.pyx":1431
+ *             fftw_execute(self.__plan, input_pointer, output_pointer)
+ * 
+ * cdef void count_char(char c, void *counter_ptr):             # <<<<<<<<<<<<<<
+ *     '''
+ *     On every call, increment the derefenced counter_ptr.
+ */
+
+static void __pyx_f_6pyfftw_6pyfftw_count_char(CYTHON_UNUSED char __pyx_v_c, void *__pyx_v_counter_ptr) {
+  __Pyx_RefNannyDeclarations
+  int *__pyx_t_1;
+  long __pyx_t_2;
+  __Pyx_RefNannySetupContext("count_char", 0);
+
+  /* "pyfftw/pyfftw.pyx":1435
+ *     On every call, increment the derefenced counter_ptr.
+ *     '''
+ *     (<int *>counter_ptr)[0] += 1             # <<<<<<<<<<<<<<
+ * 
+ * 
+ */
+  __pyx_t_1 = ((int *)__pyx_v_counter_ptr);
+  __pyx_t_2 = 0;
+  (__pyx_t_1[__pyx_t_2]) = ((__pyx_t_1[__pyx_t_2]) + 1);
+
+  __Pyx_RefNannyFinishContext();
+}
+
+/* "pyfftw/pyfftw.pyx":1438
+ * 
+ * 
+ * cdef void write_char_to_string(char c, void *string_location_ptr):             # <<<<<<<<<<<<<<
+ *     '''
+ *     Write the passed character c to the memory location
+ */
+
+static void __pyx_f_6pyfftw_6pyfftw_write_char_to_string(char __pyx_v_c, void *__pyx_v_string_location_ptr) {
+  char *__pyx_v_write_location;
+  __Pyx_RefNannyDeclarations
+  intptr_t *__pyx_t_1;
+  long __pyx_t_2;
+  __Pyx_RefNannySetupContext("write_char_to_string", 0);
+
+  /* "pyfftw/pyfftw.pyx":1452
+ *     unallocated piece of memory, a segfault will likely occur.
+ *     '''
+ *     cdef char *write_location = <char *>((<intptr_t *>string_location_ptr)[0])             # <<<<<<<<<<<<<<
+ *     write_location[0] = c
+ * 
+ */
+  __pyx_v_write_location = ((char *)(((intptr_t *)__pyx_v_string_location_ptr)[0]));
+
+  /* "pyfftw/pyfftw.pyx":1453
+ *     '''
+ *     cdef char *write_location = <char *>((<intptr_t *>string_location_ptr)[0])
+ *     write_location[0] = c             # <<<<<<<<<<<<<<
+ * 
+ *     (<intptr_t *>string_location_ptr)[0] += 1
+ */
+  (__pyx_v_write_location[0]) = __pyx_v_c;
+
+  /* "pyfftw/pyfftw.pyx":1455
+ *     write_location[0] = c
+ * 
+ *     (<intptr_t *>string_location_ptr)[0] += 1             # <<<<<<<<<<<<<<
+ * 
+ * 
+ */
+  __pyx_t_1 = ((intptr_t *)__pyx_v_string_location_ptr);
+  __pyx_t_2 = 0;
+  (__pyx_t_1[__pyx_t_2]) = ((__pyx_t_1[__pyx_t_2]) + 1);
+
+  __Pyx_RefNannyFinishContext();
+}
+
+/* Python wrapper */
+static PyObject *__pyx_pw_6pyfftw_6pyfftw_11export_wisdom(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static char __pyx_doc_6pyfftw_6pyfftw_10export_wisdom[] = "export_wisdom()\n\n    Return the FFTW wisdom as a tuple of strings.\n\n    The first string in the tuple is the string for the double\n    precision wisdom. The second string in the tuple is the string \n    for the single precision wisdom. The third string in the tuple \n    is the string for the long double precision wisdom.\n\n    The tuple that is returned from this function can be used as the\n    argument to :func:`~pyfftw [...]
+static PyMethodDef __pyx_mdef_6pyfftw_6pyfftw_11export_wisdom = {__Pyx_NAMESTR("export_wisdom"), (PyCFunction)__pyx_pw_6pyfftw_6pyfftw_11export_wisdom, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_6pyfftw_6pyfftw_10export_wisdom)};
+static PyObject *__pyx_pw_6pyfftw_6pyfftw_11export_wisdom(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("export_wisdom (wrapper)", 0);
+  __pyx_r = __pyx_pf_6pyfftw_6pyfftw_10export_wisdom(__pyx_self);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pyfftw/pyfftw.pyx":1458
+ * 
+ * 
+ * def export_wisdom():             # <<<<<<<<<<<<<<
+ *     '''export_wisdom()
+ * 
+ */
+
+static PyObject *__pyx_pf_6pyfftw_6pyfftw_10export_wisdom(CYTHON_UNUSED PyObject *__pyx_self) {
+  PyObject *__pyx_v_py_wisdom = 0;
+  PyObject *__pyx_v_py_wisdomf = 0;
+  PyObject *__pyx_v_py_wisdoml = 0;
+  int __pyx_v_counter;
+  int __pyx_v_counterf;
+  int __pyx_v_counterl;
+  char *__pyx_v_c_wisdom;
+  char *__pyx_v_c_wisdomf;
+  char *__pyx_v_c_wisdoml;
+  intptr_t __pyx_v_c_wisdom_ptr;
+  intptr_t __pyx_v_c_wisdomf_ptr;
+  intptr_t __pyx_v_c_wisdoml_ptr;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
+  int __pyx_t_2;
+  int __pyx_t_3;
+  int __pyx_t_4;
+  PyObject *__pyx_t_5 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("export_wisdom", 0);
+
+  /* "pyfftw/pyfftw.pyx":1476
+ *     cdef bytes py_wisdoml
+ * 
+ *     cdef int counter = 0             # <<<<<<<<<<<<<<
+ *     cdef int counterf = 0
+ *     cdef int counterl = 0
+ */
+  __pyx_v_counter = 0;
+
+  /* "pyfftw/pyfftw.pyx":1477
+ * 
+ *     cdef int counter = 0
+ *     cdef int counterf = 0             # <<<<<<<<<<<<<<
+ *     cdef int counterl = 0
+ * 
+ */
+  __pyx_v_counterf = 0;
+
+  /* "pyfftw/pyfftw.pyx":1478
+ *     cdef int counter = 0
+ *     cdef int counterf = 0
+ *     cdef int counterl = 0             # <<<<<<<<<<<<<<
+ * 
+ *     fftw_export_wisdom(&count_char, <void *>&counter)
+ */
+  __pyx_v_counterl = 0;
+
+  /* "pyfftw/pyfftw.pyx":1480
+ *     cdef int counterl = 0
+ * 
+ *     fftw_export_wisdom(&count_char, <void *>&counter)             # <<<<<<<<<<<<<<
+ *     fftwf_export_wisdom(&count_char, <void *>&counterf)
+ *     fftwl_export_wisdom(&count_char, <void *>&counterl)
+ */
+  fftw_export_wisdom((&__pyx_f_6pyfftw_6pyfftw_count_char), ((void *)(&__pyx_v_counter)));
+
+  /* "pyfftw/pyfftw.pyx":1481
+ * 
+ *     fftw_export_wisdom(&count_char, <void *>&counter)
+ *     fftwf_export_wisdom(&count_char, <void *>&counterf)             # <<<<<<<<<<<<<<
+ *     fftwl_export_wisdom(&count_char, <void *>&counterl)
+ * 
+ */
+  fftwf_export_wisdom((&__pyx_f_6pyfftw_6pyfftw_count_char), ((void *)(&__pyx_v_counterf)));
+
+  /* "pyfftw/pyfftw.pyx":1482
+ *     fftw_export_wisdom(&count_char, <void *>&counter)
+ *     fftwf_export_wisdom(&count_char, <void *>&counterf)
+ *     fftwl_export_wisdom(&count_char, <void *>&counterl)             # <<<<<<<<<<<<<<
+ * 
+ *     cdef char* c_wisdom = <char *>malloc(sizeof(char)*(counter + 1))
+ */
+  fftwl_export_wisdom((&__pyx_f_6pyfftw_6pyfftw_count_char), ((void *)(&__pyx_v_counterl)));
+
+  /* "pyfftw/pyfftw.pyx":1484
+ *     fftwl_export_wisdom(&count_char, <void *>&counterl)
+ * 
+ *     cdef char* c_wisdom = <char *>malloc(sizeof(char)*(counter + 1))             # <<<<<<<<<<<<<<
+ *     cdef char* c_wisdomf = <char *>malloc(sizeof(char)*(counterf + 1))
+ *     cdef char* c_wisdoml = <char *>malloc(sizeof(char)*(counterl + 1))
+ */
+  __pyx_v_c_wisdom = ((char *)malloc(((sizeof(char)) * (__pyx_v_counter + 1))));
+
+  /* "pyfftw/pyfftw.pyx":1485
+ * 
+ *     cdef char* c_wisdom = <char *>malloc(sizeof(char)*(counter + 1))
+ *     cdef char* c_wisdomf = <char *>malloc(sizeof(char)*(counterf + 1))             # <<<<<<<<<<<<<<
+ *     cdef char* c_wisdoml = <char *>malloc(sizeof(char)*(counterl + 1))
+ * 
+ */
+  __pyx_v_c_wisdomf = ((char *)malloc(((sizeof(char)) * (__pyx_v_counterf + 1))));
+
+  /* "pyfftw/pyfftw.pyx":1486
+ *     cdef char* c_wisdom = <char *>malloc(sizeof(char)*(counter + 1))
+ *     cdef char* c_wisdomf = <char *>malloc(sizeof(char)*(counterf + 1))
+ *     cdef char* c_wisdoml = <char *>malloc(sizeof(char)*(counterl + 1))             # <<<<<<<<<<<<<<
+ * 
+ *     if c_wisdom == NULL or c_wisdomf == NULL or c_wisdoml == NULL:
+ */
+  __pyx_v_c_wisdoml = ((char *)malloc(((sizeof(char)) * (__pyx_v_counterl + 1))));
+
+  /* "pyfftw/pyfftw.pyx":1488
+ *     cdef char* c_wisdoml = <char *>malloc(sizeof(char)*(counterl + 1))
+ * 
+ *     if c_wisdom == NULL or c_wisdomf == NULL or c_wisdoml == NULL:             # <<<<<<<<<<<<<<
+ *         raise MemoryError
+ * 
+ */
+  __pyx_t_1 = (__pyx_v_c_wisdom == NULL);
+  if (!__pyx_t_1) {
+    __pyx_t_2 = (__pyx_v_c_wisdomf == NULL);
+    if (!__pyx_t_2) {
+      __pyx_t_3 = (__pyx_v_c_wisdoml == NULL);
+      __pyx_t_4 = __pyx_t_3;
+    } else {
+      __pyx_t_4 = __pyx_t_2;
+    }
+    __pyx_t_2 = __pyx_t_4;
+  } else {
+    __pyx_t_2 = __pyx_t_1;
+  }
+  if (__pyx_t_2) {
+
+    /* "pyfftw/pyfftw.pyx":1489
+ * 
+ *     if c_wisdom == NULL or c_wisdomf == NULL or c_wisdoml == NULL:
+ *         raise MemoryError             # <<<<<<<<<<<<<<
+ * 
+ *     # Set the pointers to the string pointers
+ */
+    PyErr_NoMemory(); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1489; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    goto __pyx_L3;
+  }
+  __pyx_L3:;
+
+  /* "pyfftw/pyfftw.pyx":1492
+ * 
+ *     # Set the pointers to the string pointers
+ *     cdef intptr_t c_wisdom_ptr = <intptr_t>c_wisdom             # <<<<<<<<<<<<<<
+ *     cdef intptr_t c_wisdomf_ptr = <intptr_t>c_wisdomf
+ *     cdef intptr_t c_wisdoml_ptr = <intptr_t>c_wisdoml
+ */
+  __pyx_v_c_wisdom_ptr = ((intptr_t)__pyx_v_c_wisdom);
+
+  /* "pyfftw/pyfftw.pyx":1493
+ *     # Set the pointers to the string pointers
+ *     cdef intptr_t c_wisdom_ptr = <intptr_t>c_wisdom
+ *     cdef intptr_t c_wisdomf_ptr = <intptr_t>c_wisdomf             # <<<<<<<<<<<<<<
+ *     cdef intptr_t c_wisdoml_ptr = <intptr_t>c_wisdoml
+ * 
+ */
+  __pyx_v_c_wisdomf_ptr = ((intptr_t)__pyx_v_c_wisdomf);
+
+  /* "pyfftw/pyfftw.pyx":1494
+ *     cdef intptr_t c_wisdom_ptr = <intptr_t>c_wisdom
+ *     cdef intptr_t c_wisdomf_ptr = <intptr_t>c_wisdomf
+ *     cdef intptr_t c_wisdoml_ptr = <intptr_t>c_wisdoml             # <<<<<<<<<<<<<<
+ * 
+ *     fftw_export_wisdom(&write_char_to_string, <void *>&c_wisdom_ptr)
+ */
+  __pyx_v_c_wisdoml_ptr = ((intptr_t)__pyx_v_c_wisdoml);
+
+  /* "pyfftw/pyfftw.pyx":1496
+ *     cdef intptr_t c_wisdoml_ptr = <intptr_t>c_wisdoml
+ * 
+ *     fftw_export_wisdom(&write_char_to_string, <void *>&c_wisdom_ptr)             # <<<<<<<<<<<<<<
+ *     fftwf_export_wisdom(&write_char_to_string, <void *>&c_wisdomf_ptr)
+ *     fftwl_export_wisdom(&write_char_to_string, <void *>&c_wisdoml_ptr)
+ */
+  fftw_export_wisdom((&__pyx_f_6pyfftw_6pyfftw_write_char_to_string), ((void *)(&__pyx_v_c_wisdom_ptr)));
+
+  /* "pyfftw/pyfftw.pyx":1497
+ * 
+ *     fftw_export_wisdom(&write_char_to_string, <void *>&c_wisdom_ptr)
+ *     fftwf_export_wisdom(&write_char_to_string, <void *>&c_wisdomf_ptr)             # <<<<<<<<<<<<<<
+ *     fftwl_export_wisdom(&write_char_to_string, <void *>&c_wisdoml_ptr)
+ * 
+ */
+  fftwf_export_wisdom((&__pyx_f_6pyfftw_6pyfftw_write_char_to_string), ((void *)(&__pyx_v_c_wisdomf_ptr)));
+
+  /* "pyfftw/pyfftw.pyx":1498
+ *     fftw_export_wisdom(&write_char_to_string, <void *>&c_wisdom_ptr)
+ *     fftwf_export_wisdom(&write_char_to_string, <void *>&c_wisdomf_ptr)
+ *     fftwl_export_wisdom(&write_char_to_string, <void *>&c_wisdoml_ptr)             # <<<<<<<<<<<<<<
+ * 
+ *     # Write the last byte as the null byte
+ */
+  fftwl_export_wisdom((&__pyx_f_6pyfftw_6pyfftw_write_char_to_string), ((void *)(&__pyx_v_c_wisdoml_ptr)));
+
+  /* "pyfftw/pyfftw.pyx":1501
+ * 
+ *     # Write the last byte as the null byte
+ *     c_wisdom[counter] = 0             # <<<<<<<<<<<<<<
+ *     c_wisdomf[counterf] = 0
+ *     c_wisdoml[counterl] = 0
+ */
+  (__pyx_v_c_wisdom[__pyx_v_counter]) = 0;
+
+  /* "pyfftw/pyfftw.pyx":1502
+ *     # Write the last byte as the null byte
+ *     c_wisdom[counter] = 0
+ *     c_wisdomf[counterf] = 0             # <<<<<<<<<<<<<<
+ *     c_wisdoml[counterl] = 0
+ * 
+ */
+  (__pyx_v_c_wisdomf[__pyx_v_counterf]) = 0;
+
+  /* "pyfftw/pyfftw.pyx":1503
+ *     c_wisdom[counter] = 0
+ *     c_wisdomf[counterf] = 0
+ *     c_wisdoml[counterl] = 0             # <<<<<<<<<<<<<<
+ * 
+ *     try:
+ */
+  (__pyx_v_c_wisdoml[__pyx_v_counterl]) = 0;
+
+  /* "pyfftw/pyfftw.pyx":1505
+ *     c_wisdoml[counterl] = 0
+ * 
+ *     try:             # <<<<<<<<<<<<<<
+ *         py_wisdom = c_wisdom
+ *         py_wisdomf = c_wisdomf
+ */
+  /*try:*/ {
+
+    /* "pyfftw/pyfftw.pyx":1506
+ * 
+ *     try:
+ *         py_wisdom = c_wisdom             # <<<<<<<<<<<<<<
+ *         py_wisdomf = c_wisdomf
+ *         py_wisdoml = c_wisdoml
+ */
+    __pyx_t_5 = PyBytes_FromString(__pyx_v_c_wisdom); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1506; __pyx_clineno = __LINE__; goto __pyx_L5;}
+    __Pyx_GOTREF(((PyObject *)__pyx_t_5));
+    __pyx_v_py_wisdom = __pyx_t_5;
+    __pyx_t_5 = 0;
+
+    /* "pyfftw/pyfftw.pyx":1507
+ *     try:
+ *         py_wisdom = c_wisdom
+ *         py_wisdomf = c_wisdomf             # <<<<<<<<<<<<<<
+ *         py_wisdoml = c_wisdoml
+ * 
+ */
+    __pyx_t_5 = PyBytes_FromString(__pyx_v_c_wisdomf); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1507; __pyx_clineno = __LINE__; goto __pyx_L5;}
+    __Pyx_GOTREF(((PyObject *)__pyx_t_5));
+    __pyx_v_py_wisdomf = __pyx_t_5;
+    __pyx_t_5 = 0;
+
+    /* "pyfftw/pyfftw.pyx":1508
+ *         py_wisdom = c_wisdom
+ *         py_wisdomf = c_wisdomf
+ *         py_wisdoml = c_wisdoml             # <<<<<<<<<<<<<<
+ * 
+ *     finally:
+ */
+    __pyx_t_5 = PyBytes_FromString(__pyx_v_c_wisdoml); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1508; __pyx_clineno = __LINE__; goto __pyx_L5;}
+    __Pyx_GOTREF(((PyObject *)__pyx_t_5));
+    __pyx_v_py_wisdoml = __pyx_t_5;
+    __pyx_t_5 = 0;
+  }
+
+  /* "pyfftw/pyfftw.pyx":1511
+ * 
+ *     finally:
+ *         free(c_wisdom)             # <<<<<<<<<<<<<<
+ *         free(c_wisdomf)
+ *         free(c_wisdoml)
+ */
+  /*finally:*/ {
+    int __pyx_why;
+    PyObject *__pyx_exc_type, *__pyx_exc_value, *__pyx_exc_tb;
+    int __pyx_exc_lineno;
+    __pyx_exc_type = 0; __pyx_exc_value = 0; __pyx_exc_tb = 0; __pyx_exc_lineno = 0;
+    __pyx_why = 0; goto __pyx_L6;
+    __pyx_L5: {
+      __pyx_why = 4;
+      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+      __Pyx_ErrFetch(&__pyx_exc_type, &__pyx_exc_value, &__pyx_exc_tb);
+      __pyx_exc_lineno = __pyx_lineno;
+      goto __pyx_L6;
+    }
+    __pyx_L6:;
+    free(__pyx_v_c_wisdom);
+
+    /* "pyfftw/pyfftw.pyx":1512
+ *     finally:
+ *         free(c_wisdom)
+ *         free(c_wisdomf)             # <<<<<<<<<<<<<<
+ *         free(c_wisdoml)
+ * 
+ */
+    free(__pyx_v_c_wisdomf);
+
+    /* "pyfftw/pyfftw.pyx":1513
+ *         free(c_wisdom)
+ *         free(c_wisdomf)
+ *         free(c_wisdoml)             # <<<<<<<<<<<<<<
+ * 
+ *     return (py_wisdom, py_wisdomf, py_wisdoml)
+ */
+    free(__pyx_v_c_wisdoml);
+    switch (__pyx_why) {
+      case 4: {
+        __Pyx_ErrRestore(__pyx_exc_type, __pyx_exc_value, __pyx_exc_tb);
+        __pyx_lineno = __pyx_exc_lineno;
+        __pyx_exc_type = 0;
+        __pyx_exc_value = 0;
+        __pyx_exc_tb = 0;
+        goto __pyx_L1_error;
+      }
+    }
+  }
+
+  /* "pyfftw/pyfftw.pyx":1515
+ *         free(c_wisdoml)
+ * 
+ *     return (py_wisdom, py_wisdomf, py_wisdoml)             # <<<<<<<<<<<<<<
+ * 
+ * def import_wisdom(wisdom):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1515; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  __Pyx_INCREF(((PyObject *)__pyx_v_py_wisdom));
+  PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_py_wisdom));
+  __Pyx_GIVEREF(((PyObject *)__pyx_v_py_wisdom));
+  __Pyx_INCREF(((PyObject *)__pyx_v_py_wisdomf));
+  PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_py_wisdomf));
+  __Pyx_GIVEREF(((PyObject *)__pyx_v_py_wisdomf));
+  __Pyx_INCREF(((PyObject *)__pyx_v_py_wisdoml));
+  PyTuple_SET_ITEM(__pyx_t_5, 2, ((PyObject *)__pyx_v_py_wisdoml));
+  __Pyx_GIVEREF(((PyObject *)__pyx_v_py_wisdoml));
+  __pyx_r = ((PyObject *)__pyx_t_5);
+  __pyx_t_5 = 0;
+  goto __pyx_L0;
+
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_5);
+  __Pyx_AddTraceback("pyfftw.pyfftw.export_wisdom", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_py_wisdom);
+  __Pyx_XDECREF(__pyx_v_py_wisdomf);
+  __Pyx_XDECREF(__pyx_v_py_wisdoml);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static PyObject *__pyx_pw_6pyfftw_6pyfftw_13import_wisdom(PyObject *__pyx_self, PyObject *__pyx_v_wisdom); /*proto*/
+static char __pyx_doc_6pyfftw_6pyfftw_12import_wisdom[] = "import_wisdom(wisdom)\n\n    Function that imports wisdom from the passed tuple\n    of strings.\n\n    The first string in the tuple is the string for the double\n    precision wisdom. The second string in the tuple is the string \n    for the single precision wisdom. The third string in the tuple \n    is the string for the long double precision wisdom.\n\n    The tuple that is returned from :func:`~pyfftw.export_wisdom`\n    c [...]
+static PyMethodDef __pyx_mdef_6pyfftw_6pyfftw_13import_wisdom = {__Pyx_NAMESTR("import_wisdom"), (PyCFunction)__pyx_pw_6pyfftw_6pyfftw_13import_wisdom, METH_O, __Pyx_DOCSTR(__pyx_doc_6pyfftw_6pyfftw_12import_wisdom)};
+static PyObject *__pyx_pw_6pyfftw_6pyfftw_13import_wisdom(PyObject *__pyx_self, PyObject *__pyx_v_wisdom) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("import_wisdom (wrapper)", 0);
+  __pyx_r = __pyx_pf_6pyfftw_6pyfftw_12import_wisdom(__pyx_self, ((PyObject *)__pyx_v_wisdom));
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pyfftw/pyfftw.pyx":1517
+ *     return (py_wisdom, py_wisdomf, py_wisdoml)
+ * 
+ * def import_wisdom(wisdom):             # <<<<<<<<<<<<<<
+ *     '''import_wisdom(wisdom)
+ * 
+ */
+
+static PyObject *__pyx_pf_6pyfftw_6pyfftw_12import_wisdom(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_wisdom) {
+  char *__pyx_v_c_wisdom;
+  char *__pyx_v_c_wisdomf;
+  char *__pyx_v_c_wisdoml;
+  int __pyx_v_success;
+  int __pyx_v_successf;
+  int __pyx_v_successl;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  char *__pyx_t_2;
+  PyObject *__pyx_t_3 = NULL;
+  PyObject *__pyx_t_4 = NULL;
+  PyObject *__pyx_t_5 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("import_wisdom", 0);
+
+  /* "pyfftw/pyfftw.pyx":1536
+ *     '''
+ * 
+ *     cdef char* c_wisdom = wisdom[0]             # <<<<<<<<<<<<<<
+ *     cdef char* c_wisdomf = wisdom[1]
+ *     cdef char* c_wisdoml = wisdom[2]
+ */
+  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_wisdom, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1536; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = PyBytes_AsString(__pyx_t_1); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1536; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_v_c_wisdom = __pyx_t_2;
+
+  /* "pyfftw/pyfftw.pyx":1537
+ * 
+ *     cdef char* c_wisdom = wisdom[0]
+ *     cdef char* c_wisdomf = wisdom[1]             # <<<<<<<<<<<<<<
+ *     cdef char* c_wisdoml = wisdom[2]
+ * 
+ */
+  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_wisdom, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1537; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = PyBytes_AsString(__pyx_t_1); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1537; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_v_c_wisdomf = __pyx_t_2;
+
+  /* "pyfftw/pyfftw.pyx":1538
+ *     cdef char* c_wisdom = wisdom[0]
+ *     cdef char* c_wisdomf = wisdom[1]
+ *     cdef char* c_wisdoml = wisdom[2]             # <<<<<<<<<<<<<<
+ * 
+ *     cdef bint success = fftw_import_wisdom_from_string(c_wisdom)
+ */
+  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_wisdom, 2, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1538; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = PyBytes_AsString(__pyx_t_1); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1538; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_v_c_wisdoml = __pyx_t_2;
+
+  /* "pyfftw/pyfftw.pyx":1540
+ *     cdef char* c_wisdoml = wisdom[2]
+ * 
+ *     cdef bint success = fftw_import_wisdom_from_string(c_wisdom)             # <<<<<<<<<<<<<<
+ *     cdef bint successf = fftwf_import_wisdom_from_string(c_wisdomf)
+ *     cdef bint successl = fftwl_import_wisdom_from_string(c_wisdoml)
+ */
+  __pyx_v_success = fftw_import_wisdom_from_string(__pyx_v_c_wisdom);
+
+  /* "pyfftw/pyfftw.pyx":1541
+ * 
+ *     cdef bint success = fftw_import_wisdom_from_string(c_wisdom)
+ *     cdef bint successf = fftwf_import_wisdom_from_string(c_wisdomf)             # <<<<<<<<<<<<<<
+ *     cdef bint successl = fftwl_import_wisdom_from_string(c_wisdoml)
+ * 
+ */
+  __pyx_v_successf = fftwf_import_wisdom_from_string(__pyx_v_c_wisdomf);
+
+  /* "pyfftw/pyfftw.pyx":1542
+ *     cdef bint success = fftw_import_wisdom_from_string(c_wisdom)
+ *     cdef bint successf = fftwf_import_wisdom_from_string(c_wisdomf)
+ *     cdef bint successl = fftwl_import_wisdom_from_string(c_wisdoml)             # <<<<<<<<<<<<<<
+ * 
+ *     return (success, successf, successl)
+ */
+  __pyx_v_successl = fftwl_import_wisdom_from_string(__pyx_v_c_wisdoml);
+
+  /* "pyfftw/pyfftw.pyx":1544
+ *     cdef bint successl = fftwl_import_wisdom_from_string(c_wisdoml)
+ * 
+ *     return (success, successf, successl)             # <<<<<<<<<<<<<<
+ * 
+ * #def export_wisdom_to_files(
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_success); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1544; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_successf); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1544; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_successl); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1544; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1544; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
+  __Pyx_GIVEREF(__pyx_t_1);
+  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3);
+  __Pyx_GIVEREF(__pyx_t_3);
+  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_4);
+  __Pyx_GIVEREF(__pyx_t_4);
+  __pyx_t_1 = 0;
+  __pyx_t_3 = 0;
+  __pyx_t_4 = 0;
+  __pyx_r = ((PyObject *)__pyx_t_5);
+  __pyx_t_5 = 0;
+  goto __pyx_L0;
+
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_XDECREF(__pyx_t_5);
+  __Pyx_AddTraceback("pyfftw.pyfftw.import_wisdom", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static PyObject *__pyx_pw_6pyfftw_6pyfftw_15forget_wisdom(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static char __pyx_doc_6pyfftw_6pyfftw_14forget_wisdom[] = "forget_wisdom()\n\n    Forget all the accumulated wisdom.\n    ";
+static PyMethodDef __pyx_mdef_6pyfftw_6pyfftw_15forget_wisdom = {__Pyx_NAMESTR("forget_wisdom"), (PyCFunction)__pyx_pw_6pyfftw_6pyfftw_15forget_wisdom, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_6pyfftw_6pyfftw_14forget_wisdom)};
+static PyObject *__pyx_pw_6pyfftw_6pyfftw_15forget_wisdom(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("forget_wisdom (wrapper)", 0);
+  __pyx_r = __pyx_pf_6pyfftw_6pyfftw_14forget_wisdom(__pyx_self);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "pyfftw/pyfftw.pyx":1633
+ * #    return (success, successf, successl)
+ * 
+ * def forget_wisdom():             # <<<<<<<<<<<<<<
+ *     '''forget_wisdom()
+ * 
+ */
+
+static PyObject *__pyx_pf_6pyfftw_6pyfftw_14forget_wisdom(CYTHON_UNUSED PyObject *__pyx_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("forget_wisdom", 0);
+
+  /* "pyfftw/pyfftw.pyx":1638
+ *     Forget all the accumulated wisdom.
+ *     '''
+ *     fftw_forget_wisdom()             # <<<<<<<<<<<<<<
+ *     fftwf_forget_wisdom()
+ *     fftwl_forget_wisdom()
+ */
+  fftw_forget_wisdom();
+
+  /* "pyfftw/pyfftw.pyx":1639
+ *     '''
+ *     fftw_forget_wisdom()
+ *     fftwf_forget_wisdom()             # <<<<<<<<<<<<<<
+ *     fftwl_forget_wisdom()
+ * 
+ */
+  fftwf_forget_wisdom();
+
+  /* "pyfftw/pyfftw.pyx":1640
+ *     fftw_forget_wisdom()
+ *     fftwf_forget_wisdom()
+ *     fftwl_forget_wisdom()             # <<<<<<<<<<<<<<
+ * 
+ * 
+ */
+  fftwl_forget_wisdom();
+
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
+static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5numpy_7ndarray___getbuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags));
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "numpy.pxd":194
+ *         # experimental exception made for __getbuffer__ and __releasebuffer__
+ *         # -- the details of this may change.
+ *         def __getbuffer__(ndarray self, Py_buffer* info, int flags):             # <<<<<<<<<<<<<<
+ *             # This implementation of getbuffer is geared towards Cython
+ *             # requirements, and does not yet fullfill the PEP.
+ */
+
+static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
+  int __pyx_v_copy_shape;
+  int __pyx_v_i;
+  int __pyx_v_ndim;
+  int __pyx_v_endian_detector;
+  int __pyx_v_little_endian;
+  int __pyx_v_t;
+  char *__pyx_v_f;
+  PyArray_Descr *__pyx_v_descr = 0;
+  int __pyx_v_offset;
+  int __pyx_v_hasfields;
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
+  int __pyx_t_2;
+  int __pyx_t_3;
+  PyObject *__pyx_t_4 = NULL;
+  int __pyx_t_5;
+  int __pyx_t_6;
+  int __pyx_t_7;
+  PyObject *__pyx_t_8 = NULL;
+  char *__pyx_t_9;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__getbuffer__", 0);
+  if (__pyx_v_info != NULL) {
+    __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
+    __Pyx_GIVEREF(__pyx_v_info->obj);
+  }
+
+  /* "numpy.pxd":200
+ *             # of flags
+ * 
+ *             if info == NULL: return             # <<<<<<<<<<<<<<
+ * 
+ *             cdef int copy_shape, i, ndim
+ */
+  __pyx_t_1 = (__pyx_v_info == NULL);
+  if (__pyx_t_1) {
+    __pyx_r = 0;
+    goto __pyx_L0;
+    goto __pyx_L3;
+  }
+  __pyx_L3:;
+
+  /* "numpy.pxd":203
+ * 
+ *             cdef int copy_shape, i, ndim
+ *             cdef int endian_detector = 1             # <<<<<<<<<<<<<<
+ *             cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
+ * 
+ */
+  __pyx_v_endian_detector = 1;
+
+  /* "numpy.pxd":204
+ *             cdef int copy_shape, i, ndim
+ *             cdef int endian_detector = 1
+ *             cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)             # <<<<<<<<<<<<<<
+ * 
+ *             ndim = PyArray_NDIM(self)
+ */
+  __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0);
+
+  /* "numpy.pxd":206
+ *             cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
+ * 
+ *             ndim = PyArray_NDIM(self)             # <<<<<<<<<<<<<<
+ * 
+ *             if sizeof(npy_intp) != sizeof(Py_ssize_t):
+ */
+  __pyx_v_ndim = PyArray_NDIM(__pyx_v_self);
+
+  /* "numpy.pxd":208
+ *             ndim = PyArray_NDIM(self)
+ * 
+ *             if sizeof(npy_intp) != sizeof(Py_ssize_t):             # <<<<<<<<<<<<<<
+ *                 copy_shape = 1
+ *             else:
+ */
+  __pyx_t_1 = ((sizeof(npy_intp)) != (sizeof(Py_ssize_t)));
+  if (__pyx_t_1) {
+
+    /* "numpy.pxd":209
+ * 
+ *             if sizeof(npy_intp) != sizeof(Py_ssize_t):
+ *                 copy_shape = 1             # <<<<<<<<<<<<<<
+ *             else:
+ *                 copy_shape = 0
+ */
+    __pyx_v_copy_shape = 1;
+    goto __pyx_L4;
+  }
+  /*else*/ {
+
+    /* "numpy.pxd":211
+ *                 copy_shape = 1
+ *             else:
+ *                 copy_shape = 0             # <<<<<<<<<<<<<<
+ * 
+ *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
+ */
+    __pyx_v_copy_shape = 0;
+  }
+  __pyx_L4:;
+
+  /* "numpy.pxd":213
+ *                 copy_shape = 0
+ * 
+ *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)             # <<<<<<<<<<<<<<
+ *                 and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)):
+ *                 raise ValueError(u"ndarray is not C contiguous")
+ */
+  __pyx_t_1 = ((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS);
+  if (__pyx_t_1) {
+
+    /* "numpy.pxd":214
+ * 
+ *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
+ *                 and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)):             # <<<<<<<<<<<<<<
+ *                 raise ValueError(u"ndarray is not C contiguous")
+ * 
+ */
+    __pyx_t_2 = (!PyArray_CHKFLAGS(__pyx_v_self, NPY_C_CONTIGUOUS));
+    __pyx_t_3 = __pyx_t_2;
+  } else {
+    __pyx_t_3 = __pyx_t_1;
+  }
+  if (__pyx_t_3) {
+
+    /* "numpy.pxd":215
+ *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
+ *                 and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)):
+ *                 raise ValueError(u"ndarray is not C contiguous")             # <<<<<<<<<<<<<<
+ * 
+ *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
+ */
+    __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_61), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    {__pyx_filename = __pyx_f[2]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    goto __pyx_L5;
+  }
+  __pyx_L5:;
+
+  /* "numpy.pxd":217
+ *                 raise ValueError(u"ndarray is not C contiguous")
+ * 
+ *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)             # <<<<<<<<<<<<<<
+ *                 and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)):
+ *                 raise ValueError(u"ndarray is not Fortran contiguous")
+ */
+  __pyx_t_3 = ((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS);
+  if (__pyx_t_3) {
+
+    /* "numpy.pxd":218
+ * 
+ *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
+ *                 and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)):             # <<<<<<<<<<<<<<
+ *                 raise ValueError(u"ndarray is not Fortran contiguous")
+ * 
+ */
+    __pyx_t_1 = (!PyArray_CHKFLAGS(__pyx_v_self, NPY_F_CONTIGUOUS));
+    __pyx_t_2 = __pyx_t_1;
+  } else {
+    __pyx_t_2 = __pyx_t_3;
+  }
+  if (__pyx_t_2) {
+
+    /* "numpy.pxd":219
+ *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
+ *                 and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)):
+ *                 raise ValueError(u"ndarray is not Fortran contiguous")             # <<<<<<<<<<<<<<
+ * 
+ *             info.buf = PyArray_DATA(self)
+ */
+    __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_63), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    {__pyx_filename = __pyx_f[2]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    goto __pyx_L6;
+  }
+  __pyx_L6:;
+
+  /* "numpy.pxd":221
+ *                 raise ValueError(u"ndarray is not Fortran contiguous")
+ * 
+ *             info.buf = PyArray_DATA(self)             # <<<<<<<<<<<<<<
+ *             info.ndim = ndim
+ *             if copy_shape:
+ */
+  __pyx_v_info->buf = PyArray_DATA(__pyx_v_self);
+
+  /* "numpy.pxd":222
+ * 
+ *             info.buf = PyArray_DATA(self)
+ *             info.ndim = ndim             # <<<<<<<<<<<<<<
+ *             if copy_shape:
+ *                 # Allocate new buffer for strides and shape info.
+ */
+  __pyx_v_info->ndim = __pyx_v_ndim;
+
+  /* "numpy.pxd":223
+ *             info.buf = PyArray_DATA(self)
+ *             info.ndim = ndim
+ *             if copy_shape:             # <<<<<<<<<<<<<<
+ *                 # Allocate new buffer for strides and shape info.
+ *                 # This is allocated as one block, strides first.
+ */
+  if (__pyx_v_copy_shape) {
+
+    /* "numpy.pxd":226
+ *                 # Allocate new buffer for strides and shape info.
+ *                 # This is allocated as one block, strides first.
+ *                 info.strides = <Py_ssize_t*>stdlib.malloc(sizeof(Py_ssize_t) * <size_t>ndim * 2)             # <<<<<<<<<<<<<<
+ *                 info.shape = info.strides + ndim
+ *                 for i in range(ndim):
+ */
+    __pyx_v_info->strides = ((Py_ssize_t *)malloc((((sizeof(Py_ssize_t)) * ((size_t)__pyx_v_ndim)) * 2)));
+
+    /* "numpy.pxd":227
+ *                 # This is allocated as one block, strides first.
+ *                 info.strides = <Py_ssize_t*>stdlib.malloc(sizeof(Py_ssize_t) * <size_t>ndim * 2)
+ *                 info.shape = info.strides + ndim             # <<<<<<<<<<<<<<
+ *                 for i in range(ndim):
+ *                     info.strides[i] = PyArray_STRIDES(self)[i]
+ */
+    __pyx_v_info->shape = (__pyx_v_info->strides + __pyx_v_ndim);
+
+    /* "numpy.pxd":228
+ *                 info.strides = <Py_ssize_t*>stdlib.malloc(sizeof(Py_ssize_t) * <size_t>ndim * 2)
+ *                 info.shape = info.strides + ndim
+ *                 for i in range(ndim):             # <<<<<<<<<<<<<<
+ *                     info.strides[i] = PyArray_STRIDES(self)[i]
+ *                     info.shape[i] = PyArray_DIMS(self)[i]
+ */
+    __pyx_t_5 = __pyx_v_ndim;
+    for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
+      __pyx_v_i = __pyx_t_6;
+
+      /* "numpy.pxd":229
+ *                 info.shape = info.strides + ndim
+ *                 for i in range(ndim):
+ *                     info.strides[i] = PyArray_STRIDES(self)[i]             # <<<<<<<<<<<<<<
+ *                     info.shape[i] = PyArray_DIMS(self)[i]
+ *             else:
+ */
+      (__pyx_v_info->strides[__pyx_v_i]) = (PyArray_STRIDES(__pyx_v_self)[__pyx_v_i]);
+
+      /* "numpy.pxd":230
+ *                 for i in range(ndim):
+ *                     info.strides[i] = PyArray_STRIDES(self)[i]
+ *                     info.shape[i] = PyArray_DIMS(self)[i]             # <<<<<<<<<<<<<<
+ *             else:
+ *                 info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
+ */
+      (__pyx_v_info->shape[__pyx_v_i]) = (PyArray_DIMS(__pyx_v_self)[__pyx_v_i]);
+    }
+    goto __pyx_L7;
+  }
+  /*else*/ {
+
+    /* "numpy.pxd":232
+ *                     info.shape[i] = PyArray_DIMS(self)[i]
+ *             else:
+ *                 info.strides = <Py_ssize_t*>PyArray_STRIDES(self)             # <<<<<<<<<<<<<<
+ *                 info.shape = <Py_ssize_t*>PyArray_DIMS(self)
+ *             info.suboffsets = NULL
+ */
+    __pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(__pyx_v_self));
+
+    /* "numpy.pxd":233
+ *             else:
+ *                 info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
+ *                 info.shape = <Py_ssize_t*>PyArray_DIMS(self)             # <<<<<<<<<<<<<<
+ *             info.suboffsets = NULL
+ *             info.itemsize = PyArray_ITEMSIZE(self)
+ */
+    __pyx_v_info->shape = ((Py_ssize_t *)PyArray_DIMS(__pyx_v_self));
+  }
+  __pyx_L7:;
+
+  /* "numpy.pxd":234
+ *                 info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
+ *                 info.shape = <Py_ssize_t*>PyArray_DIMS(self)
+ *             info.suboffsets = NULL             # <<<<<<<<<<<<<<
+ *             info.itemsize = PyArray_ITEMSIZE(self)
+ *             info.readonly = not PyArray_ISWRITEABLE(self)
+ */
+  __pyx_v_info->suboffsets = NULL;
+
+  /* "numpy.pxd":235
+ *                 info.shape = <Py_ssize_t*>PyArray_DIMS(self)
+ *             info.suboffsets = NULL
+ *             info.itemsize = PyArray_ITEMSIZE(self)             # <<<<<<<<<<<<<<
+ *             info.readonly = not PyArray_ISWRITEABLE(self)
+ * 
+ */
+  __pyx_v_info->itemsize = PyArray_ITEMSIZE(__pyx_v_self);
+
+  /* "numpy.pxd":236
+ *             info.suboffsets = NULL
+ *             info.itemsize = PyArray_ITEMSIZE(self)
+ *             info.readonly = not PyArray_ISWRITEABLE(self)             # <<<<<<<<<<<<<<
+ * 
+ *             cdef int t
+ */
+  __pyx_v_info->readonly = (!PyArray_ISWRITEABLE(__pyx_v_self));
+
+  /* "numpy.pxd":239
+ * 
+ *             cdef int t
+ *             cdef char* f = NULL             # <<<<<<<<<<<<<<
+ *             cdef dtype descr = self.descr
+ *             cdef list stack
+ */
+  __pyx_v_f = NULL;
+
+  /* "numpy.pxd":240
+ *             cdef int t
+ *             cdef char* f = NULL
+ *             cdef dtype descr = self.descr             # <<<<<<<<<<<<<<
+ *             cdef list stack
+ *             cdef int offset
+ */
+  __pyx_t_4 = ((PyObject *)__pyx_v_self->descr);
+  __Pyx_INCREF(__pyx_t_4);
+  __pyx_v_descr = ((PyArray_Descr *)__pyx_t_4);
+  __pyx_t_4 = 0;
+
+  /* "numpy.pxd":244
+ *             cdef int offset
+ * 
+ *             cdef bint hasfields = PyDataType_HASFIELDS(descr)             # <<<<<<<<<<<<<<
+ * 
+ *             if not hasfields and not copy_shape:
+ */
+  __pyx_v_hasfields = PyDataType_HASFIELDS(__pyx_v_descr);
+
+  /* "numpy.pxd":246
+ *             cdef bint hasfields = PyDataType_HASFIELDS(descr)
+ * 
+ *             if not hasfields and not copy_shape:             # <<<<<<<<<<<<<<
+ *                 # do not call releasebuffer
+ *                 info.obj = None
+ */
+  __pyx_t_2 = (!__pyx_v_hasfields);
+  if (__pyx_t_2) {
+    __pyx_t_3 = (!__pyx_v_copy_shape);
+    __pyx_t_1 = __pyx_t_3;
+  } else {
+    __pyx_t_1 = __pyx_t_2;
+  }
+  if (__pyx_t_1) {
+
+    /* "numpy.pxd":248
+ *             if not hasfields and not copy_shape:
+ *                 # do not call releasebuffer
+ *                 info.obj = None             # <<<<<<<<<<<<<<
+ *             else:
+ *                 # need to call releasebuffer
+ */
+    __Pyx_INCREF(Py_None);
+    __Pyx_GIVEREF(Py_None);
+    __Pyx_GOTREF(__pyx_v_info->obj);
+    __Pyx_DECREF(__pyx_v_info->obj);
+    __pyx_v_info->obj = Py_None;
+    goto __pyx_L10;
+  }
+  /*else*/ {
+
+    /* "numpy.pxd":251
+ *             else:
+ *                 # need to call releasebuffer
+ *                 info.obj = self             # <<<<<<<<<<<<<<
+ * 
+ *             if not hasfields:
+ */
+    __Pyx_INCREF(((PyObject *)__pyx_v_self));
+    __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
+    __Pyx_GOTREF(__pyx_v_info->obj);
+    __Pyx_DECREF(__pyx_v_info->obj);
+    __pyx_v_info->obj = ((PyObject *)__pyx_v_self);
+  }
+  __pyx_L10:;
+
+  /* "numpy.pxd":253
+ *                 info.obj = self
+ * 
+ *             if not hasfields:             # <<<<<<<<<<<<<<
+ *                 t = descr.type_num
+ *                 if ((descr.byteorder == c'>' and little_endian) or
+ */
+  __pyx_t_1 = (!__pyx_v_hasfields);
+  if (__pyx_t_1) {
+
+    /* "numpy.pxd":254
+ * 
+ *             if not hasfields:
+ *                 t = descr.type_num             # <<<<<<<<<<<<<<
+ *                 if ((descr.byteorder == c'>' and little_endian) or
+ *                     (descr.byteorder == c'<' and not little_endian)):
+ */
+    __pyx_t_5 = __pyx_v_descr->type_num;
+    __pyx_v_t = __pyx_t_5;
+
+    /* "numpy.pxd":255
+ *             if not hasfields:
+ *                 t = descr.type_num
+ *                 if ((descr.byteorder == c'>' and little_endian) or             # <<<<<<<<<<<<<<
+ *                     (descr.byteorder == c'<' and not little_endian)):
+ *                     raise ValueError(u"Non-native byte order not supported")
+ */
+    __pyx_t_1 = (__pyx_v_descr->byteorder == '>');
+    if (__pyx_t_1) {
+      __pyx_t_2 = __pyx_v_little_endian;
+    } else {
+      __pyx_t_2 = __pyx_t_1;
+    }
+    if (!__pyx_t_2) {
+
+      /* "numpy.pxd":256
+ *                 t = descr.type_num
+ *                 if ((descr.byteorder == c'>' and little_endian) or
+ *                     (descr.byteorder == c'<' and not little_endian)):             # <<<<<<<<<<<<<<
+ *                     raise ValueError(u"Non-native byte order not supported")
+ *                 if   t == NPY_BYTE:        f = "b"
+ */
+      __pyx_t_1 = (__pyx_v_descr->byteorder == '<');
+      if (__pyx_t_1) {
+        __pyx_t_3 = (!__pyx_v_little_endian);
+        __pyx_t_7 = __pyx_t_3;
+      } else {
+        __pyx_t_7 = __pyx_t_1;
+      }
+      __pyx_t_1 = __pyx_t_7;
+    } else {
+      __pyx_t_1 = __pyx_t_2;
+    }
+    if (__pyx_t_1) {
+
+      /* "numpy.pxd":257
+ *                 if ((descr.byteorder == c'>' and little_endian) or
+ *                     (descr.byteorder == c'<' and not little_endian)):
+ *                     raise ValueError(u"Non-native byte order not supported")             # <<<<<<<<<<<<<<
+ *                 if   t == NPY_BYTE:        f = "b"
+ *                 elif t == NPY_UBYTE:       f = "B"
+ */
+      __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_65), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __Pyx_Raise(__pyx_t_4, 0, 0, 0);
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      {__pyx_filename = __pyx_f[2]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      goto __pyx_L12;
+    }
+    __pyx_L12:;
+
+    /* "numpy.pxd":258
+ *                     (descr.byteorder == c'<' and not little_endian)):
+ *                     raise ValueError(u"Non-native byte order not supported")
+ *                 if   t == NPY_BYTE:        f = "b"             # <<<<<<<<<<<<<<
+ *                 elif t == NPY_UBYTE:       f = "B"
+ *                 elif t == NPY_SHORT:       f = "h"
+ */
+    __pyx_t_1 = (__pyx_v_t == NPY_BYTE);
+    if (__pyx_t_1) {
+      __pyx_v_f = __pyx_k__b;
+      goto __pyx_L13;
+    }
+
+    /* "numpy.pxd":259
+ *                     raise ValueError(u"Non-native byte order not supported")
+ *                 if   t == NPY_BYTE:        f = "b"
+ *                 elif t == NPY_UBYTE:       f = "B"             # <<<<<<<<<<<<<<
+ *                 elif t == NPY_SHORT:       f = "h"
+ *                 elif t == NPY_USHORT:      f = "H"
+ */
+    __pyx_t_1 = (__pyx_v_t == NPY_UBYTE);
+    if (__pyx_t_1) {
+      __pyx_v_f = __pyx_k__B;
+      goto __pyx_L13;
+    }
+
+    /* "numpy.pxd":260
+ *                 if   t == NPY_BYTE:        f = "b"
+ *                 elif t == NPY_UBYTE:       f = "B"
+ *                 elif t == NPY_SHORT:       f = "h"             # <<<<<<<<<<<<<<
+ *                 elif t == NPY_USHORT:      f = "H"
+ *                 elif t == NPY_INT:         f = "i"
+ */
+    __pyx_t_1 = (__pyx_v_t == NPY_SHORT);
+    if (__pyx_t_1) {
+      __pyx_v_f = __pyx_k__h;
+      goto __pyx_L13;
+    }
+
+    /* "numpy.pxd":261
+ *                 elif t == NPY_UBYTE:       f = "B"
+ *                 elif t == NPY_SHORT:       f = "h"
+ *                 elif t == NPY_USHORT:      f = "H"             # <<<<<<<<<<<<<<
+ *                 elif t == NPY_INT:         f = "i"
+ *                 elif t == NPY_UINT:        f = "I"
+ */
+    __pyx_t_1 = (__pyx_v_t == NPY_USHORT);
+    if (__pyx_t_1) {
+      __pyx_v_f = __pyx_k__H;
+      goto __pyx_L13;
+    }
+
+    /* "numpy.pxd":262
+ *                 elif t == NPY_SHORT:       f = "h"
+ *                 elif t == NPY_USHORT:      f = "H"
+ *                 elif t == NPY_INT:         f = "i"             # <<<<<<<<<<<<<<
+ *                 elif t == NPY_UINT:        f = "I"
+ *                 elif t == NPY_LONG:        f = "l"
+ */
+    __pyx_t_1 = (__pyx_v_t == NPY_INT);
+    if (__pyx_t_1) {
+      __pyx_v_f = __pyx_k__i;
+      goto __pyx_L13;
+    }
+
+    /* "numpy.pxd":263
+ *                 elif t == NPY_USHORT:      f = "H"
+ *                 elif t == NPY_INT:         f = "i"
+ *                 elif t == NPY_UINT:        f = "I"             # <<<<<<<<<<<<<<
+ *                 elif t == NPY_LONG:        f = "l"
+ *                 elif t == NPY_ULONG:       f = "L"
+ */
+    __pyx_t_1 = (__pyx_v_t == NPY_UINT);
+    if (__pyx_t_1) {
+      __pyx_v_f = __pyx_k__I;
+      goto __pyx_L13;
+    }
+
+    /* "numpy.pxd":264
+ *                 elif t == NPY_INT:         f = "i"
+ *                 elif t == NPY_UINT:        f = "I"
+ *                 elif t == NPY_LONG:        f = "l"             # <<<<<<<<<<<<<<
+ *                 elif t == NPY_ULONG:       f = "L"
+ *                 elif t == NPY_LONGLONG:    f = "q"
+ */
+    __pyx_t_1 = (__pyx_v_t == NPY_LONG);
+    if (__pyx_t_1) {
+      __pyx_v_f = __pyx_k__l;
+      goto __pyx_L13;
+    }
+
+    /* "numpy.pxd":265
+ *                 elif t == NPY_UINT:        f = "I"
+ *                 elif t == NPY_LONG:        f = "l"
+ *                 elif t == NPY_ULONG:       f = "L"             # <<<<<<<<<<<<<<
+ *                 elif t == NPY_LONGLONG:    f = "q"
+ *                 elif t == NPY_ULONGLONG:   f = "Q"
+ */
+    __pyx_t_1 = (__pyx_v_t == NPY_ULONG);
+    if (__pyx_t_1) {
+      __pyx_v_f = __pyx_k__L;
+      goto __pyx_L13;
+    }
+
+    /* "numpy.pxd":266
+ *                 elif t == NPY_LONG:        f = "l"
+ *                 elif t == NPY_ULONG:       f = "L"
+ *                 elif t == NPY_LONGLONG:    f = "q"             # <<<<<<<<<<<<<<
+ *                 elif t == NPY_ULONGLONG:   f = "Q"
+ *                 elif t == NPY_FLOAT:       f = "f"
+ */
+    __pyx_t_1 = (__pyx_v_t == NPY_LONGLONG);
+    if (__pyx_t_1) {
+      __pyx_v_f = __pyx_k__q;
+      goto __pyx_L13;
+    }
+
+    /* "numpy.pxd":267
+ *                 elif t == NPY_ULONG:       f = "L"
+ *                 elif t == NPY_LONGLONG:    f = "q"
+ *                 elif t == NPY_ULONGLONG:   f = "Q"             # <<<<<<<<<<<<<<
+ *                 elif t == NPY_FLOAT:       f = "f"
+ *                 elif t == NPY_DOUBLE:      f = "d"
+ */
+    __pyx_t_1 = (__pyx_v_t == NPY_ULONGLONG);
+    if (__pyx_t_1) {
+      __pyx_v_f = __pyx_k__Q;
+      goto __pyx_L13;
+    }
+
+    /* "numpy.pxd":268
+ *                 elif t == NPY_LONGLONG:    f = "q"
+ *                 elif t == NPY_ULONGLONG:   f = "Q"
+ *                 elif t == NPY_FLOAT:       f = "f"             # <<<<<<<<<<<<<<
+ *                 elif t == NPY_DOUBLE:      f = "d"
+ *                 elif t == NPY_LONGDOUBLE:  f = "g"
+ */
+    __pyx_t_1 = (__pyx_v_t == NPY_FLOAT);
+    if (__pyx_t_1) {
+      __pyx_v_f = __pyx_k__f;
+      goto __pyx_L13;
+    }
+
+    /* "numpy.pxd":269
+ *                 elif t == NPY_ULONGLONG:   f = "Q"
+ *                 elif t == NPY_FLOAT:       f = "f"
+ *                 elif t == NPY_DOUBLE:      f = "d"             # <<<<<<<<<<<<<<
+ *                 elif t == NPY_LONGDOUBLE:  f = "g"
+ *                 elif t == NPY_CFLOAT:      f = "Zf"
+ */
+    __pyx_t_1 = (__pyx_v_t == NPY_DOUBLE);
+    if (__pyx_t_1) {
+      __pyx_v_f = __pyx_k__d;
+      goto __pyx_L13;
+    }
+
+    /* "numpy.pxd":270
+ *                 elif t == NPY_FLOAT:       f = "f"
+ *                 elif t == NPY_DOUBLE:      f = "d"
+ *                 elif t == NPY_LONGDOUBLE:  f = "g"             # <<<<<<<<<<<<<<
+ *                 elif t == NPY_CFLOAT:      f = "Zf"
+ *                 elif t == NPY_CDOUBLE:     f = "Zd"
+ */
+    __pyx_t_1 = (__pyx_v_t == NPY_LONGDOUBLE);
+    if (__pyx_t_1) {
+      __pyx_v_f = __pyx_k__g;
+      goto __pyx_L13;
+    }
+
+    /* "numpy.pxd":271
+ *                 elif t == NPY_DOUBLE:      f = "d"
+ *                 elif t == NPY_LONGDOUBLE:  f = "g"
+ *                 elif t == NPY_CFLOAT:      f = "Zf"             # <<<<<<<<<<<<<<
+ *                 elif t == NPY_CDOUBLE:     f = "Zd"
+ *                 elif t == NPY_CLONGDOUBLE: f = "Zg"
+ */
+    __pyx_t_1 = (__pyx_v_t == NPY_CFLOAT);
+    if (__pyx_t_1) {
+      __pyx_v_f = __pyx_k__Zf;
+      goto __pyx_L13;
+    }
+
+    /* "numpy.pxd":272
+ *                 elif t == NPY_LONGDOUBLE:  f = "g"
+ *                 elif t == NPY_CFLOAT:      f = "Zf"
+ *                 elif t == NPY_CDOUBLE:     f = "Zd"             # <<<<<<<<<<<<<<
+ *                 elif t == NPY_CLONGDOUBLE: f = "Zg"
+ *                 elif t == NPY_OBJECT:      f = "O"
+ */
+    __pyx_t_1 = (__pyx_v_t == NPY_CDOUBLE);
+    if (__pyx_t_1) {
+      __pyx_v_f = __pyx_k__Zd;
+      goto __pyx_L13;
+    }
+
+    /* "numpy.pxd":273
+ *                 elif t == NPY_CFLOAT:      f = "Zf"
+ *                 elif t == NPY_CDOUBLE:     f = "Zd"
+ *                 elif t == NPY_CLONGDOUBLE: f = "Zg"             # <<<<<<<<<<<<<<
+ *                 elif t == NPY_OBJECT:      f = "O"
+ *                 else:
+ */
+    __pyx_t_1 = (__pyx_v_t == NPY_CLONGDOUBLE);
+    if (__pyx_t_1) {
+      __pyx_v_f = __pyx_k__Zg;
+      goto __pyx_L13;
+    }
+
+    /* "numpy.pxd":274
+ *                 elif t == NPY_CDOUBLE:     f = "Zd"
+ *                 elif t == NPY_CLONGDOUBLE: f = "Zg"
+ *                 elif t == NPY_OBJECT:      f = "O"             # <<<<<<<<<<<<<<
+ *                 else:
+ *                     raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
+ */
+    __pyx_t_1 = (__pyx_v_t == NPY_OBJECT);
+    if (__pyx_t_1) {
+      __pyx_v_f = __pyx_k__O;
+      goto __pyx_L13;
+    }
+    /*else*/ {
+
+      /* "numpy.pxd":276
+ *                 elif t == NPY_OBJECT:      f = "O"
+ *                 else:
+ *                     raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)             # <<<<<<<<<<<<<<
+ *                 info.format = f
+ *                 return
+ */
+      __pyx_t_4 = PyInt_FromLong(__pyx_v_t); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __pyx_t_8 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_66), __pyx_t_4); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(((PyObject *)__pyx_t_8));
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_8));
+      __Pyx_GIVEREF(((PyObject *)__pyx_t_8));
+      __pyx_t_8 = 0;
+      __pyx_t_8 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_8);
+      __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
+      __Pyx_Raise(__pyx_t_8, 0, 0, 0);
+      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+      {__pyx_filename = __pyx_f[2]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    __pyx_L13:;
+
+    /* "numpy.pxd":277
+ *                 else:
+ *                     raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
+ *                 info.format = f             # <<<<<<<<<<<<<<
+ *                 return
+ *             else:
+ */
+    __pyx_v_info->format = __pyx_v_f;
+
+    /* "numpy.pxd":278
+ *                     raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
+ *                 info.format = f
+ *                 return             # <<<<<<<<<<<<<<
+ *             else:
+ *                 info.format = <char*>stdlib.malloc(_buffer_format_string_len)
+ */
+    __pyx_r = 0;
+    goto __pyx_L0;
+    goto __pyx_L11;
+  }
+  /*else*/ {
+
+    /* "numpy.pxd":280
+ *                 return
+ *             else:
+ *                 info.format = <char*>stdlib.malloc(_buffer_format_string_len)             # <<<<<<<<<<<<<<
+ *                 info.format[0] = c'^' # Native data types, manual alignment
+ *                 offset = 0
+ */
+    __pyx_v_info->format = ((char *)malloc(255));
+
+    /* "numpy.pxd":281
+ *             else:
+ *                 info.format = <char*>stdlib.malloc(_buffer_format_string_len)
+ *                 info.format[0] = c'^' # Native data types, manual alignment             # <<<<<<<<<<<<<<
+ *                 offset = 0
+ *                 f = _util_dtypestring(descr, info.format + 1,
+ */
+    (__pyx_v_info->format[0]) = '^';
+
+    /* "numpy.pxd":282
+ *                 info.format = <char*>stdlib.malloc(_buffer_format_string_len)
+ *                 info.format[0] = c'^' # Native data types, manual alignment
+ *                 offset = 0             # <<<<<<<<<<<<<<
+ *                 f = _util_dtypestring(descr, info.format + 1,
+ *                                       info.format + _buffer_format_string_len,
+ */
+    __pyx_v_offset = 0;
+
+    /* "numpy.pxd":285
+ *                 f = _util_dtypestring(descr, info.format + 1,
+ *                                       info.format + _buffer_format_string_len,
+ *                                       &offset)             # <<<<<<<<<<<<<<
+ *                 f[0] = c'\0' # Terminate format string
+ * 
+ */
+    __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 255), (&__pyx_v_offset)); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_v_f = __pyx_t_9;
+
+    /* "numpy.pxd":286
+ *                                       info.format + _buffer_format_string_len,
+ *                                       &offset)
+ *                 f[0] = c'\0' # Terminate format string             # <<<<<<<<<<<<<<
+ * 
+ *         def __releasebuffer__(ndarray self, Py_buffer* info):
+ */
+    (__pyx_v_f[0]) = '\x00';
+  }
+  __pyx_L11:;
+
+  __pyx_r = 0;
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_XDECREF(__pyx_t_8);
+  __Pyx_AddTraceback("numpy.ndarray.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
+  if (__pyx_v_info != NULL && __pyx_v_info->obj != NULL) {
+    __Pyx_GOTREF(__pyx_v_info->obj);
+    __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = NULL;
+  }
+  goto __pyx_L2;
+  __pyx_L0:;
+  if (__pyx_v_info != NULL && __pyx_v_info->obj == Py_None) {
+    __Pyx_GOTREF(Py_None);
+    __Pyx_DECREF(Py_None); __pyx_v_info->obj = NULL;
+  }
+  __pyx_L2:;
+  __Pyx_XDECREF((PyObject *)__pyx_v_descr);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info); /*proto*/
+static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info) {
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__releasebuffer__ (wrapper)", 0);
+  __pyx_pf_5numpy_7ndarray_2__releasebuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info));
+  __Pyx_RefNannyFinishContext();
+}
+
+/* "numpy.pxd":288
+ *                 f[0] = c'\0' # Terminate format string
+ * 
+ *         def __releasebuffer__(ndarray self, Py_buffer* info):             # <<<<<<<<<<<<<<
+ *             if PyArray_HASFIELDS(self):
+ *                 stdlib.free(info.format)
+ */
+
+static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info) {
+  __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
+  __Pyx_RefNannySetupContext("__releasebuffer__", 0);
+
+  /* "numpy.pxd":289
+ * 
+ *         def __releasebuffer__(ndarray self, Py_buffer* info):
+ *             if PyArray_HASFIELDS(self):             # <<<<<<<<<<<<<<
+ *                 stdlib.free(info.format)
+ *             if sizeof(npy_intp) != sizeof(Py_ssize_t):
+ */
+  __pyx_t_1 = PyArray_HASFIELDS(__pyx_v_self);
+  if (__pyx_t_1) {
+
+    /* "numpy.pxd":290
+ *         def __releasebuffer__(ndarray self, Py_buffer* info):
+ *             if PyArray_HASFIELDS(self):
+ *                 stdlib.free(info.format)             # <<<<<<<<<<<<<<
+ *             if sizeof(npy_intp) != sizeof(Py_ssize_t):
+ *                 stdlib.free(info.strides)
+ */
+    free(__pyx_v_info->format);
+    goto __pyx_L3;
+  }
+  __pyx_L3:;
+
+  /* "numpy.pxd":291
+ *             if PyArray_HASFIELDS(self):
+ *                 stdlib.free(info.format)
+ *             if sizeof(npy_intp) != sizeof(Py_ssize_t):             # <<<<<<<<<<<<<<
+ *                 stdlib.free(info.strides)
+ *                 # info.shape was stored after info.strides in the same block
+ */
+  __pyx_t_1 = ((sizeof(npy_intp)) != (sizeof(Py_ssize_t)));
+  if (__pyx_t_1) {
+
+    /* "numpy.pxd":292
+ *                 stdlib.free(info.format)
+ *             if sizeof(npy_intp) != sizeof(Py_ssize_t):
+ *                 stdlib.free(info.strides)             # <<<<<<<<<<<<<<
+ *                 # info.shape was stored after info.strides in the same block
+ * 
+ */
+    free(__pyx_v_info->strides);
+    goto __pyx_L4;
+  }
+  __pyx_L4:;
+
+  __Pyx_RefNannyFinishContext();
+}
+
+/* "numpy.pxd":768
+ * ctypedef npy_cdouble     complex_t
+ * 
+ * cdef inline object PyArray_MultiIterNew1(a):             # <<<<<<<<<<<<<<
+ *     return PyArray_MultiIterNew(1, <void*>a)
+ * 
+ */
+
+static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0);
+
+  /* "numpy.pxd":769
+ * 
+ * cdef inline object PyArray_MultiIterNew1(a):
+ *     return PyArray_MultiIterNew(1, <void*>a)             # <<<<<<<<<<<<<<
+ * 
+ * cdef inline object PyArray_MultiIterNew2(a, b):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 769; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew1", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = 0;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "numpy.pxd":771
+ *     return PyArray_MultiIterNew(1, <void*>a)
+ * 
+ * cdef inline object PyArray_MultiIterNew2(a, b):             # <<<<<<<<<<<<<<
+ *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)
+ * 
+ */
+
+static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0);
+
+  /* "numpy.pxd":772
+ * 
+ * cdef inline object PyArray_MultiIterNew2(a, b):
+ *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)             # <<<<<<<<<<<<<<
+ * 
+ * cdef inline object PyArray_MultiIterNew3(a, b, c):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 772; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew2", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = 0;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "numpy.pxd":774
+ *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)
+ * 
+ * cdef inline object PyArray_MultiIterNew3(a, b, c):             # <<<<<<<<<<<<<<
+ *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
+ * 
+ */
+
+static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0);
+
+  /* "numpy.pxd":775
+ * 
+ * cdef inline object PyArray_MultiIterNew3(a, b, c):
+ *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)             # <<<<<<<<<<<<<<
+ * 
+ * cdef inline object PyArray_MultiIterNew4(a, b, c, d):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew3", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = 0;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "numpy.pxd":777
+ *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
+ * 
+ * cdef inline object PyArray_MultiIterNew4(a, b, c, d):             # <<<<<<<<<<<<<<
+ *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
+ * 
+ */
+
+static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0);
+
+  /* "numpy.pxd":778
+ * 
+ * cdef inline object PyArray_MultiIterNew4(a, b, c, d):
+ *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)             # <<<<<<<<<<<<<<
+ * 
+ * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew4", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = 0;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "numpy.pxd":780
+ *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
+ * 
+ * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):             # <<<<<<<<<<<<<<
+ *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
+ * 
+ */
+
+static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d, PyObject *__pyx_v_e) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0);
+
+  /* "numpy.pxd":781
+ * 
+ * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
+ *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)             # <<<<<<<<<<<<<<
+ * 
+ * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL:
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 781; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew5", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = 0;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "numpy.pxd":783
+ *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
+ * 
+ * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL:             # <<<<<<<<<<<<<<
+ *     # Recursive utility function used in __getbuffer__ to get format
+ *     # string. The new location in the format string is returned.
+ */
+
+static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_descr, char *__pyx_v_f, char *__pyx_v_end, int *__pyx_v_offset) {
+  PyArray_Descr *__pyx_v_child = 0;
+  int __pyx_v_endian_detector;
+  int __pyx_v_little_endian;
+  PyObject *__pyx_v_fields = 0;
+  PyObject *__pyx_v_childname = NULL;
+  PyObject *__pyx_v_new_offset = NULL;
+  PyObject *__pyx_v_t = NULL;
+  char *__pyx_r;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  Py_ssize_t __pyx_t_2;
+  PyObject *__pyx_t_3 = NULL;
+  PyObject *__pyx_t_4 = NULL;
+  PyObject *__pyx_t_5 = NULL;
+  PyObject *(*__pyx_t_6)(PyObject *);
+  int __pyx_t_7;
+  int __pyx_t_8;
+  int __pyx_t_9;
+  int __pyx_t_10;
+  long __pyx_t_11;
+  char *__pyx_t_12;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("_util_dtypestring", 0);
+
+  /* "numpy.pxd":790
+ *     cdef int delta_offset
+ *     cdef tuple i
+ *     cdef int endian_detector = 1             # <<<<<<<<<<<<<<
+ *     cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
+ *     cdef tuple fields
+ */
+  __pyx_v_endian_detector = 1;
+
+  /* "numpy.pxd":791
+ *     cdef tuple i
+ *     cdef int endian_detector = 1
+ *     cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)             # <<<<<<<<<<<<<<
+ *     cdef tuple fields
+ * 
+ */
+  __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0);
+
+  /* "numpy.pxd":794
+ *     cdef tuple fields
+ * 
+ *     for childname in descr.names:             # <<<<<<<<<<<<<<
+ *         fields = descr.fields[childname]
+ *         child, new_offset = fields
+ */
+  if (unlikely(((PyObject *)__pyx_v_descr->names) == Py_None)) {
+    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
+    {__pyx_filename = __pyx_f[2]; __pyx_lineno = 794; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __pyx_t_1 = ((PyObject *)__pyx_v_descr->names); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
+  for (;;) {
+    if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
+    #if CYTHON_COMPILING_IN_CPYTHON
+    __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 794; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    #else
+    __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 794; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    #endif
+    __Pyx_XDECREF(__pyx_v_childname);
+    __pyx_v_childname = __pyx_t_3;
+    __pyx_t_3 = 0;
+
+    /* "numpy.pxd":795
+ * 
+ *     for childname in descr.names:
+ *         fields = descr.fields[childname]             # <<<<<<<<<<<<<<
+ *         child, new_offset = fields
+ * 
+ */
+    __pyx_t_3 = PyObject_GetItem(__pyx_v_descr->fields, __pyx_v_childname); if (!__pyx_t_3) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 795; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    if (!(likely(PyTuple_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected tuple, got %.200s", Py_TYPE(__pyx_t_3)->tp_name), 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 795; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_XDECREF(((PyObject *)__pyx_v_fields));
+    __pyx_v_fields = ((PyObject*)__pyx_t_3);
+    __pyx_t_3 = 0;
+
+    /* "numpy.pxd":796
+ *     for childname in descr.names:
+ *         fields = descr.fields[childname]
+ *         child, new_offset = fields             # <<<<<<<<<<<<<<
+ * 
+ *         if (end - f) - (new_offset - offset[0]) < 15:
+ */
+    if (likely(PyTuple_CheckExact(((PyObject *)__pyx_v_fields)))) {
+      PyObject* sequence = ((PyObject *)__pyx_v_fields);
+      #if CYTHON_COMPILING_IN_CPYTHON
+      Py_ssize_t size = Py_SIZE(sequence);
+      #else
+      Py_ssize_t size = PySequence_Size(sequence);
+      #endif
+      if (unlikely(size != 2)) {
+        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
+        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+        {__pyx_filename = __pyx_f[2]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+      #if CYTHON_COMPILING_IN_CPYTHON
+      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
+      __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); 
+      __Pyx_INCREF(__pyx_t_3);
+      __Pyx_INCREF(__pyx_t_4);
+      #else
+      __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      #endif
+    } else if (1) {
+      __Pyx_RaiseNoneNotIterableError(); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    } else
+    {
+      Py_ssize_t index = -1;
+      __pyx_t_5 = PyObject_GetIter(((PyObject *)__pyx_v_fields)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __pyx_t_6 = Py_TYPE(__pyx_t_5)->tp_iternext;
+      index = 0; __pyx_t_3 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_3)) goto __pyx_L5_unpacking_failed;
+      __Pyx_GOTREF(__pyx_t_3);
+      index = 1; __pyx_t_4 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L5_unpacking_failed;
+      __Pyx_GOTREF(__pyx_t_4);
+      if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_6 = NULL;
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      goto __pyx_L6_unpacking_done;
+      __pyx_L5_unpacking_failed:;
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      __pyx_t_6 = NULL;
+      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+      {__pyx_filename = __pyx_f[2]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_L6_unpacking_done:;
+    }
+    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_XDECREF(((PyObject *)__pyx_v_child));
+    __pyx_v_child = ((PyArray_Descr *)__pyx_t_3);
+    __pyx_t_3 = 0;
+    __Pyx_XDECREF(__pyx_v_new_offset);
+    __pyx_v_new_offset = __pyx_t_4;
+    __pyx_t_4 = 0;
+
+    /* "numpy.pxd":798
+ *         child, new_offset = fields
+ * 
+ *         if (end - f) - (new_offset - offset[0]) < 15:             # <<<<<<<<<<<<<<
+ *             raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
+ * 
+ */
+    __pyx_t_4 = PyInt_FromLong((__pyx_v_end - __pyx_v_f)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_3 = PyInt_FromLong((__pyx_v_offset[0])); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_5 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_t_3 = PyNumber_Subtract(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_int_15, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    if (__pyx_t_7) {
+
+      /* "numpy.pxd":799
+ * 
+ *         if (end - f) - (new_offset - offset[0]) < 15:
+ *             raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")             # <<<<<<<<<<<<<<
+ * 
+ *         if ((child.byteorder == c'>' and little_endian) or
+ */
+      __pyx_t_5 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_68), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __Pyx_Raise(__pyx_t_5, 0, 0, 0);
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      {__pyx_filename = __pyx_f[2]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      goto __pyx_L7;
+    }
+    __pyx_L7:;
+
+    /* "numpy.pxd":801
+ *             raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
+ * 
+ *         if ((child.byteorder == c'>' and little_endian) or             # <<<<<<<<<<<<<<
+ *             (child.byteorder == c'<' and not little_endian)):
+ *             raise ValueError(u"Non-native byte order not supported")
+ */
+    __pyx_t_7 = (__pyx_v_child->byteorder == '>');
+    if (__pyx_t_7) {
+      __pyx_t_8 = __pyx_v_little_endian;
+    } else {
+      __pyx_t_8 = __pyx_t_7;
+    }
+    if (!__pyx_t_8) {
+
+      /* "numpy.pxd":802
+ * 
+ *         if ((child.byteorder == c'>' and little_endian) or
+ *             (child.byteorder == c'<' and not little_endian)):             # <<<<<<<<<<<<<<
+ *             raise ValueError(u"Non-native byte order not supported")
+ *             # One could encode it in the format string and have Cython
+ */
+      __pyx_t_7 = (__pyx_v_child->byteorder == '<');
+      if (__pyx_t_7) {
+        __pyx_t_9 = (!__pyx_v_little_endian);
+        __pyx_t_10 = __pyx_t_9;
+      } else {
+        __pyx_t_10 = __pyx_t_7;
+      }
+      __pyx_t_7 = __pyx_t_10;
+    } else {
+      __pyx_t_7 = __pyx_t_8;
+    }
+    if (__pyx_t_7) {
+
+      /* "numpy.pxd":803
+ *         if ((child.byteorder == c'>' and little_endian) or
+ *             (child.byteorder == c'<' and not little_endian)):
+ *             raise ValueError(u"Non-native byte order not supported")             # <<<<<<<<<<<<<<
+ *             # One could encode it in the format string and have Cython
+ *             # complain instead, BUT: < and > in format strings also imply
+ */
+      __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_69), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __Pyx_Raise(__pyx_t_5, 0, 0, 0);
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      {__pyx_filename = __pyx_f[2]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      goto __pyx_L8;
+    }
+    __pyx_L8:;
+
+    /* "numpy.pxd":813
+ * 
+ *         # Output padding bytes
+ *         while offset[0] < new_offset:             # <<<<<<<<<<<<<<
+ *             f[0] = 120 # "x"; pad byte
+ *             f += 1
+ */
+    while (1) {
+      __pyx_t_5 = PyInt_FromLong((__pyx_v_offset[0])); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __pyx_t_3 = PyObject_RichCompare(__pyx_t_5, __pyx_v_new_offset, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      if (!__pyx_t_7) break;
+
+      /* "numpy.pxd":814
+ *         # Output padding bytes
+ *         while offset[0] < new_offset:
+ *             f[0] = 120 # "x"; pad byte             # <<<<<<<<<<<<<<
+ *             f += 1
+ *             offset[0] += 1
+ */
+      (__pyx_v_f[0]) = 120;
+
+      /* "numpy.pxd":815
+ *         while offset[0] < new_offset:
+ *             f[0] = 120 # "x"; pad byte
+ *             f += 1             # <<<<<<<<<<<<<<
+ *             offset[0] += 1
+ * 
+ */
+      __pyx_v_f = (__pyx_v_f + 1);
+
+      /* "numpy.pxd":816
+ *             f[0] = 120 # "x"; pad byte
+ *             f += 1
+ *             offset[0] += 1             # <<<<<<<<<<<<<<
+ * 
+ *         offset[0] += child.itemsize
+ */
+      __pyx_t_11 = 0;
+      (__pyx_v_offset[__pyx_t_11]) = ((__pyx_v_offset[__pyx_t_11]) + 1);
+    }
+
+    /* "numpy.pxd":818
+ *             offset[0] += 1
+ * 
+ *         offset[0] += child.itemsize             # <<<<<<<<<<<<<<
+ * 
+ *         if not PyDataType_HASFIELDS(child):
+ */
+    __pyx_t_11 = 0;
+    (__pyx_v_offset[__pyx_t_11]) = ((__pyx_v_offset[__pyx_t_11]) + __pyx_v_child->elsize);
+
+    /* "numpy.pxd":820
+ *         offset[0] += child.itemsize
+ * 
+ *         if not PyDataType_HASFIELDS(child):             # <<<<<<<<<<<<<<
+ *             t = child.type_num
+ *             if end - f < 5:
+ */
+    __pyx_t_7 = (!PyDataType_HASFIELDS(__pyx_v_child));
+    if (__pyx_t_7) {
+
+      /* "numpy.pxd":821
+ * 
+ *         if not PyDataType_HASFIELDS(child):
+ *             t = child.type_num             # <<<<<<<<<<<<<<
+ *             if end - f < 5:
+ *                 raise RuntimeError(u"Format string allocated too short.")
+ */
+      __pyx_t_3 = PyInt_FromLong(__pyx_v_child->type_num); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __Pyx_XDECREF(__pyx_v_t);
+      __pyx_v_t = __pyx_t_3;
+      __pyx_t_3 = 0;
+
+      /* "numpy.pxd":822
+ *         if not PyDataType_HASFIELDS(child):
+ *             t = child.type_num
+ *             if end - f < 5:             # <<<<<<<<<<<<<<
+ *                 raise RuntimeError(u"Format string allocated too short.")
+ * 
+ */
+      __pyx_t_7 = ((__pyx_v_end - __pyx_v_f) < 5);
+      if (__pyx_t_7) {
+
+        /* "numpy.pxd":823
+ *             t = child.type_num
+ *             if end - f < 5:
+ *                 raise RuntimeError(u"Format string allocated too short.")             # <<<<<<<<<<<<<<
+ * 
+ *             # Until ticket #99 is fixed, use integers to avoid warnings
+ */
+        __pyx_t_3 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_71), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_3);
+        __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+        {__pyx_filename = __pyx_f[2]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        goto __pyx_L12;
+      }
+      __pyx_L12:;
+
+      /* "numpy.pxd":826
+ * 
+ *             # Until ticket #99 is fixed, use integers to avoid warnings
+ *             if   t == NPY_BYTE:        f[0] =  98 #"b"             # <<<<<<<<<<<<<<
+ *             elif t == NPY_UBYTE:       f[0] =  66 #"B"
+ *             elif t == NPY_SHORT:       f[0] = 104 #"h"
+ */
+      __pyx_t_3 = PyInt_FromLong(NPY_BYTE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      if (__pyx_t_7) {
+        (__pyx_v_f[0]) = 98;
+        goto __pyx_L13;
+      }
+
+      /* "numpy.pxd":827
+ *             # Until ticket #99 is fixed, use integers to avoid warnings
+ *             if   t == NPY_BYTE:        f[0] =  98 #"b"
+ *             elif t == NPY_UBYTE:       f[0] =  66 #"B"             # <<<<<<<<<<<<<<
+ *             elif t == NPY_SHORT:       f[0] = 104 #"h"
+ *             elif t == NPY_USHORT:      f[0] =  72 #"H"
+ */
+      __pyx_t_5 = PyInt_FromLong(NPY_UBYTE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      if (__pyx_t_7) {
+        (__pyx_v_f[0]) = 66;
+        goto __pyx_L13;
+      }
+
+      /* "numpy.pxd":828
+ *             if   t == NPY_BYTE:        f[0] =  98 #"b"
+ *             elif t == NPY_UBYTE:       f[0] =  66 #"B"
+ *             elif t == NPY_SHORT:       f[0] = 104 #"h"             # <<<<<<<<<<<<<<
+ *             elif t == NPY_USHORT:      f[0] =  72 #"H"
+ *             elif t == NPY_INT:         f[0] = 105 #"i"
+ */
+      __pyx_t_3 = PyInt_FromLong(NPY_SHORT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      if (__pyx_t_7) {
+        (__pyx_v_f[0]) = 104;
+        goto __pyx_L13;
+      }
+
+      /* "numpy.pxd":829
+ *             elif t == NPY_UBYTE:       f[0] =  66 #"B"
+ *             elif t == NPY_SHORT:       f[0] = 104 #"h"
+ *             elif t == NPY_USHORT:      f[0] =  72 #"H"             # <<<<<<<<<<<<<<
+ *             elif t == NPY_INT:         f[0] = 105 #"i"
+ *             elif t == NPY_UINT:        f[0] =  73 #"I"
+ */
+      __pyx_t_5 = PyInt_FromLong(NPY_USHORT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      if (__pyx_t_7) {
+        (__pyx_v_f[0]) = 72;
+        goto __pyx_L13;
+      }
+
+      /* "numpy.pxd":830
+ *             elif t == NPY_SHORT:       f[0] = 104 #"h"
+ *             elif t == NPY_USHORT:      f[0] =  72 #"H"
+ *             elif t == NPY_INT:         f[0] = 105 #"i"             # <<<<<<<<<<<<<<
+ *             elif t == NPY_UINT:        f[0] =  73 #"I"
+ *             elif t == NPY_LONG:        f[0] = 108 #"l"
+ */
+      __pyx_t_3 = PyInt_FromLong(NPY_INT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      if (__pyx_t_7) {
+        (__pyx_v_f[0]) = 105;
+        goto __pyx_L13;
+      }
+
+      /* "numpy.pxd":831
+ *             elif t == NPY_USHORT:      f[0] =  72 #"H"
+ *             elif t == NPY_INT:         f[0] = 105 #"i"
+ *             elif t == NPY_UINT:        f[0] =  73 #"I"             # <<<<<<<<<<<<<<
+ *             elif t == NPY_LONG:        f[0] = 108 #"l"
+ *             elif t == NPY_ULONG:       f[0] = 76  #"L"
+ */
+      __pyx_t_5 = PyInt_FromLong(NPY_UINT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      if (__pyx_t_7) {
+        (__pyx_v_f[0]) = 73;
+        goto __pyx_L13;
+      }
+
+      /* "numpy.pxd":832
+ *             elif t == NPY_INT:         f[0] = 105 #"i"
+ *             elif t == NPY_UINT:        f[0] =  73 #"I"
+ *             elif t == NPY_LONG:        f[0] = 108 #"l"             # <<<<<<<<<<<<<<
+ *             elif t == NPY_ULONG:       f[0] = 76  #"L"
+ *             elif t == NPY_LONGLONG:    f[0] = 113 #"q"
+ */
+      __pyx_t_3 = PyInt_FromLong(NPY_LONG); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      if (__pyx_t_7) {
+        (__pyx_v_f[0]) = 108;
+        goto __pyx_L13;
+      }
+
+      /* "numpy.pxd":833
+ *             elif t == NPY_UINT:        f[0] =  73 #"I"
+ *             elif t == NPY_LONG:        f[0] = 108 #"l"
+ *             elif t == NPY_ULONG:       f[0] = 76  #"L"             # <<<<<<<<<<<<<<
+ *             elif t == NPY_LONGLONG:    f[0] = 113 #"q"
+ *             elif t == NPY_ULONGLONG:   f[0] = 81  #"Q"
+ */
+      __pyx_t_5 = PyInt_FromLong(NPY_ULONG); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      if (__pyx_t_7) {
+        (__pyx_v_f[0]) = 76;
+        goto __pyx_L13;
+      }
+
+      /* "numpy.pxd":834
+ *             elif t == NPY_LONG:        f[0] = 108 #"l"
+ *             elif t == NPY_ULONG:       f[0] = 76  #"L"
+ *             elif t == NPY_LONGLONG:    f[0] = 113 #"q"             # <<<<<<<<<<<<<<
+ *             elif t == NPY_ULONGLONG:   f[0] = 81  #"Q"
+ *             elif t == NPY_FLOAT:       f[0] = 102 #"f"
+ */
+      __pyx_t_3 = PyInt_FromLong(NPY_LONGLONG); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      if (__pyx_t_7) {
+        (__pyx_v_f[0]) = 113;
+        goto __pyx_L13;
+      }
+
+      /* "numpy.pxd":835
+ *             elif t == NPY_ULONG:       f[0] = 76  #"L"
+ *             elif t == NPY_LONGLONG:    f[0] = 113 #"q"
+ *             elif t == NPY_ULONGLONG:   f[0] = 81  #"Q"             # <<<<<<<<<<<<<<
+ *             elif t == NPY_FLOAT:       f[0] = 102 #"f"
+ *             elif t == NPY_DOUBLE:      f[0] = 100 #"d"
+ */
+      __pyx_t_5 = PyInt_FromLong(NPY_ULONGLONG); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      if (__pyx_t_7) {
+        (__pyx_v_f[0]) = 81;
+        goto __pyx_L13;
+      }
+
+      /* "numpy.pxd":836
+ *             elif t == NPY_LONGLONG:    f[0] = 113 #"q"
+ *             elif t == NPY_ULONGLONG:   f[0] = 81  #"Q"
+ *             elif t == NPY_FLOAT:       f[0] = 102 #"f"             # <<<<<<<<<<<<<<
+ *             elif t == NPY_DOUBLE:      f[0] = 100 #"d"
+ *             elif t == NPY_LONGDOUBLE:  f[0] = 103 #"g"
+ */
+      __pyx_t_3 = PyInt_FromLong(NPY_FLOAT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      if (__pyx_t_7) {
+        (__pyx_v_f[0]) = 102;
+        goto __pyx_L13;
+      }
+
+      /* "numpy.pxd":837
+ *             elif t == NPY_ULONGLONG:   f[0] = 81  #"Q"
+ *             elif t == NPY_FLOAT:       f[0] = 102 #"f"
+ *             elif t == NPY_DOUBLE:      f[0] = 100 #"d"             # <<<<<<<<<<<<<<
+ *             elif t == NPY_LONGDOUBLE:  f[0] = 103 #"g"
+ *             elif t == NPY_CFLOAT:      f[0] = 90; f[1] = 102; f += 1 # Zf
+ */
+      __pyx_t_5 = PyInt_FromLong(NPY_DOUBLE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      if (__pyx_t_7) {
+        (__pyx_v_f[0]) = 100;
+        goto __pyx_L13;
+      }
+
+      /* "numpy.pxd":838
+ *             elif t == NPY_FLOAT:       f[0] = 102 #"f"
+ *             elif t == NPY_DOUBLE:      f[0] = 100 #"d"
+ *             elif t == NPY_LONGDOUBLE:  f[0] = 103 #"g"             # <<<<<<<<<<<<<<
+ *             elif t == NPY_CFLOAT:      f[0] = 90; f[1] = 102; f += 1 # Zf
+ *             elif t == NPY_CDOUBLE:     f[0] = 90; f[1] = 100; f += 1 # Zd
+ */
+      __pyx_t_3 = PyInt_FromLong(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      if (__pyx_t_7) {
+        (__pyx_v_f[0]) = 103;
+        goto __pyx_L13;
+      }
+
+      /* "numpy.pxd":839
+ *             elif t == NPY_DOUBLE:      f[0] = 100 #"d"
+ *             elif t == NPY_LONGDOUBLE:  f[0] = 103 #"g"
+ *             elif t == NPY_CFLOAT:      f[0] = 90; f[1] = 102; f += 1 # Zf             # <<<<<<<<<<<<<<
+ *             elif t == NPY_CDOUBLE:     f[0] = 90; f[1] = 100; f += 1 # Zd
+ *             elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
+ */
+      __pyx_t_5 = PyInt_FromLong(NPY_CFLOAT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      if (__pyx_t_7) {
+        (__pyx_v_f[0]) = 90;
+        (__pyx_v_f[1]) = 102;
+        __pyx_v_f = (__pyx_v_f + 1);
+        goto __pyx_L13;
+      }
+
+      /* "numpy.pxd":840
+ *             elif t == NPY_LONGDOUBLE:  f[0] = 103 #"g"
+ *             elif t == NPY_CFLOAT:      f[0] = 90; f[1] = 102; f += 1 # Zf
+ *             elif t == NPY_CDOUBLE:     f[0] = 90; f[1] = 100; f += 1 # Zd             # <<<<<<<<<<<<<<
+ *             elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
+ *             elif t == NPY_OBJECT:      f[0] = 79 #"O"
+ */
+      __pyx_t_3 = PyInt_FromLong(NPY_CDOUBLE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      if (__pyx_t_7) {
+        (__pyx_v_f[0]) = 90;
+        (__pyx_v_f[1]) = 100;
+        __pyx_v_f = (__pyx_v_f + 1);
+        goto __pyx_L13;
+      }
+
+      /* "numpy.pxd":841
+ *             elif t == NPY_CFLOAT:      f[0] = 90; f[1] = 102; f += 1 # Zf
+ *             elif t == NPY_CDOUBLE:     f[0] = 90; f[1] = 100; f += 1 # Zd
+ *             elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg             # <<<<<<<<<<<<<<
+ *             elif t == NPY_OBJECT:      f[0] = 79 #"O"
+ *             else:
+ */
+      __pyx_t_5 = PyInt_FromLong(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      if (__pyx_t_7) {
+        (__pyx_v_f[0]) = 90;
+        (__pyx_v_f[1]) = 103;
+        __pyx_v_f = (__pyx_v_f + 1);
+        goto __pyx_L13;
+      }
+
+      /* "numpy.pxd":842
+ *             elif t == NPY_CDOUBLE:     f[0] = 90; f[1] = 100; f += 1 # Zd
+ *             elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
+ *             elif t == NPY_OBJECT:      f[0] = 79 #"O"             # <<<<<<<<<<<<<<
+ *             else:
+ *                 raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
+ */
+      __pyx_t_3 = PyInt_FromLong(NPY_OBJECT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      if (__pyx_t_7) {
+        (__pyx_v_f[0]) = 79;
+        goto __pyx_L13;
+      }
+      /*else*/ {
+
+        /* "numpy.pxd":844
+ *             elif t == NPY_OBJECT:      f[0] = 79 #"O"
+ *             else:
+ *                 raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)             # <<<<<<<<<<<<<<
+ *             f += 1
+ *         else:
+ */
+        __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_66), __pyx_v_t); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(((PyObject *)__pyx_t_5));
+        __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_3);
+        PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_5));
+        __Pyx_GIVEREF(((PyObject *)__pyx_t_5));
+        __pyx_t_5 = 0;
+        __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_5);
+        __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
+        __Pyx_Raise(__pyx_t_5, 0, 0, 0);
+        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+        {__pyx_filename = __pyx_f[2]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+      __pyx_L13:;
+
+      /* "numpy.pxd":845
+ *             else:
+ *                 raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
+ *             f += 1             # <<<<<<<<<<<<<<
+ *         else:
+ *             # Cython ignores struct boundary information ("T{...}"),
+ */
+      __pyx_v_f = (__pyx_v_f + 1);
+      goto __pyx_L11;
+    }
+    /*else*/ {
+
+      /* "numpy.pxd":849
+ *             # Cython ignores struct boundary information ("T{...}"),
+ *             # so don't output it
+ *             f = _util_dtypestring(child, f, end, offset)             # <<<<<<<<<<<<<<
+ *     return f
+ * 
+ */
+      __pyx_t_12 = __pyx_f_5numpy__util_dtypestring(__pyx_v_child, __pyx_v_f, __pyx_v_end, __pyx_v_offset); if (unlikely(__pyx_t_12 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 849; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_v_f = __pyx_t_12;
+    }
+    __pyx_L11:;
+  }
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "numpy.pxd":850
+ *             # so don't output it
+ *             f = _util_dtypestring(child, f, end, offset)
+ *     return f             # <<<<<<<<<<<<<<
+ * 
+ * 
+ */
+  __pyx_r = __pyx_v_f;
+  goto __pyx_L0;
+
+  __pyx_r = 0;
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_XDECREF(__pyx_t_5);
+  __Pyx_AddTraceback("numpy._util_dtypestring", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XDECREF((PyObject *)__pyx_v_child);
+  __Pyx_XDECREF(__pyx_v_fields);
+  __Pyx_XDECREF(__pyx_v_childname);
+  __Pyx_XDECREF(__pyx_v_new_offset);
+  __Pyx_XDECREF(__pyx_v_t);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "numpy.pxd":965
+ * 
+ * 
+ * cdef inline void set_array_base(ndarray arr, object base):             # <<<<<<<<<<<<<<
+ *      cdef PyObject* baseptr
+ *      if base is None:
+ */
+
+static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) {
+  PyObject *__pyx_v_baseptr;
+  __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
+  __Pyx_RefNannySetupContext("set_array_base", 0);
+
+  /* "numpy.pxd":967
+ * cdef inline void set_array_base(ndarray arr, object base):
+ *      cdef PyObject* baseptr
+ *      if base is None:             # <<<<<<<<<<<<<<
+ *          baseptr = NULL
+ *      else:
+ */
+  __pyx_t_1 = (__pyx_v_base == Py_None);
+  if (__pyx_t_1) {
+
+    /* "numpy.pxd":968
+ *      cdef PyObject* baseptr
+ *      if base is None:
+ *          baseptr = NULL             # <<<<<<<<<<<<<<
+ *      else:
+ *          Py_INCREF(base) # important to do this before decref below!
+ */
+    __pyx_v_baseptr = NULL;
+    goto __pyx_L3;
+  }
+  /*else*/ {
+
+    /* "numpy.pxd":970
+ *          baseptr = NULL
+ *      else:
+ *          Py_INCREF(base) # important to do this before decref below!             # <<<<<<<<<<<<<<
+ *          baseptr = <PyObject*>base
+ *      Py_XDECREF(arr.base)
+ */
+    Py_INCREF(__pyx_v_base);
+
+    /* "numpy.pxd":971
+ *      else:
+ *          Py_INCREF(base) # important to do this before decref below!
+ *          baseptr = <PyObject*>base             # <<<<<<<<<<<<<<
+ *      Py_XDECREF(arr.base)
+ *      arr.base = baseptr
+ */
+    __pyx_v_baseptr = ((PyObject *)__pyx_v_base);
+  }
+  __pyx_L3:;
+
+  /* "numpy.pxd":972
+ *          Py_INCREF(base) # important to do this before decref below!
+ *          baseptr = <PyObject*>base
+ *      Py_XDECREF(arr.base)             # <<<<<<<<<<<<<<
+ *      arr.base = baseptr
+ * 
+ */
+  Py_XDECREF(__pyx_v_arr->base);
+
+  /* "numpy.pxd":973
+ *          baseptr = <PyObject*>base
+ *      Py_XDECREF(arr.base)
+ *      arr.base = baseptr             # <<<<<<<<<<<<<<
+ * 
+ * cdef inline object get_array_base(ndarray arr):
+ */
+  __pyx_v_arr->base = __pyx_v_baseptr;
+
+  __Pyx_RefNannyFinishContext();
+}
+
+/* "numpy.pxd":975
+ *      arr.base = baseptr
+ * 
+ * cdef inline object get_array_base(ndarray arr):             # <<<<<<<<<<<<<<
+ *     if arr.base is NULL:
+ *         return None
+ */
+
+static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__pyx_v_arr) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
+  __Pyx_RefNannySetupContext("get_array_base", 0);
+
+  /* "numpy.pxd":976
+ * 
+ * cdef inline object get_array_base(ndarray arr):
+ *     if arr.base is NULL:             # <<<<<<<<<<<<<<
+ *         return None
+ *     else:
+ */
+  __pyx_t_1 = (__pyx_v_arr->base == NULL);
+  if (__pyx_t_1) {
+
+    /* "numpy.pxd":977
+ * cdef inline object get_array_base(ndarray arr):
+ *     if arr.base is NULL:
+ *         return None             # <<<<<<<<<<<<<<
+ *     else:
+ *         return <object>arr.base
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __Pyx_INCREF(Py_None);
+    __pyx_r = Py_None;
+    goto __pyx_L0;
+    goto __pyx_L3;
+  }
+  /*else*/ {
+
+    /* "numpy.pxd":979
+ *         return None
+ *     else:
+ *         return <object>arr.base             # <<<<<<<<<<<<<<
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __Pyx_INCREF(((PyObject *)__pyx_v_arr->base));
+    __pyx_r = ((PyObject *)__pyx_v_arr->base);
+    goto __pyx_L0;
+  }
+  __pyx_L3:;
+
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+static struct __pyx_vtabstruct_6pyfftw_6pyfftw_FFTW __pyx_vtable_6pyfftw_6pyfftw_FFTW;
+
+static PyObject *__pyx_tp_new_6pyfftw_6pyfftw_FFTW(PyTypeObject *t, PyObject *a, PyObject *k) {
+  struct __pyx_obj_6pyfftw_6pyfftw_FFTW *p;
+  PyObject *o = (*t->tp_alloc)(t, 0);
+  if (!o) return 0;
+  p = ((struct __pyx_obj_6pyfftw_6pyfftw_FFTW *)o);
+  p->__pyx_vtab = __pyx_vtabptr_6pyfftw_6pyfftw_FFTW;
+  p->__pyx___input_array = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
+  p->__pyx___output_array = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
+  p->__pyx___input_strides = Py_None; Py_INCREF(Py_None);
+  p->__pyx___input_byte_strides = Py_None; Py_INCREF(Py_None);
+  p->__pyx___output_strides = Py_None; Py_INCREF(Py_None);
+  p->__pyx___output_byte_strides = Py_None; Py_INCREF(Py_None);
+  p->__pyx___input_shape = Py_None; Py_INCREF(Py_None);
+  p->__pyx___output_shape = Py_None; Py_INCREF(Py_None);
+  p->__pyx___input_dtype = Py_None; Py_INCREF(Py_None);
+  p->__pyx___output_dtype = Py_None; Py_INCREF(Py_None);
+  p->__pyx___flags_used = Py_None; Py_INCREF(Py_None);
+  if (__pyx_pw_6pyfftw_6pyfftw_4FFTW_11__cinit__(o, a, k) < 0) {
+    Py_DECREF(o); o = 0;
+  }
+  return o;
+}
+
+static void __pyx_tp_dealloc_6pyfftw_6pyfftw_FFTW(PyObject *o) {
+  struct __pyx_obj_6pyfftw_6pyfftw_FFTW *p = (struct __pyx_obj_6pyfftw_6pyfftw_FFTW *)o;
+  PyObject_GC_UnTrack(o);
+  {
+    PyObject *etype, *eval, *etb;
+    PyErr_Fetch(&etype, &eval, &etb);
+    ++Py_REFCNT(o);
+    __pyx_pw_6pyfftw_6pyfftw_4FFTW_15__dealloc__(o);
+    if (PyErr_Occurred()) PyErr_WriteUnraisable(o);
+    --Py_REFCNT(o);
+    PyErr_Restore(etype, eval, etb);
+  }
+  Py_CLEAR(p->__pyx___input_array);
+  Py_CLEAR(p->__pyx___output_array);
+  Py_CLEAR(p->__pyx___input_strides);
+  Py_CLEAR(p->__pyx___input_byte_strides);
+  Py_CLEAR(p->__pyx___output_strides);
+  Py_CLEAR(p->__pyx___output_byte_strides);
+  Py_CLEAR(p->__pyx___input_shape);
+  Py_CLEAR(p->__pyx___output_shape);
+  Py_CLEAR(p->__pyx___input_dtype);
+  Py_CLEAR(p->__pyx___output_dtype);
+  Py_CLEAR(p->__pyx___flags_used);
+  PyObject_GC_Track(o);
+  (*Py_TYPE(o)->tp_free)(o);
+}
+
+static int __pyx_tp_traverse_6pyfftw_6pyfftw_FFTW(PyObject *o, visitproc v, void *a) {
+  int e;
+  struct __pyx_obj_6pyfftw_6pyfftw_FFTW *p = (struct __pyx_obj_6pyfftw_6pyfftw_FFTW *)o;
+  if (p->__pyx___input_array) {
+    e = (*v)(((PyObject*)p->__pyx___input_array), a); if (e) return e;
+  }
+  if (p->__pyx___output_array) {
+    e = (*v)(((PyObject*)p->__pyx___output_array), a); if (e) return e;
+  }
+  if (p->__pyx___input_strides) {
+    e = (*v)(p->__pyx___input_strides, a); if (e) return e;
+  }
+  if (p->__pyx___input_byte_strides) {
+    e = (*v)(p->__pyx___input_byte_strides, a); if (e) return e;
+  }
+  if (p->__pyx___output_strides) {
+    e = (*v)(p->__pyx___output_strides, a); if (e) return e;
+  }
+  if (p->__pyx___output_byte_strides) {
+    e = (*v)(p->__pyx___output_byte_strides, a); if (e) return e;
+  }
+  if (p->__pyx___input_shape) {
+    e = (*v)(p->__pyx___input_shape, a); if (e) return e;
+  }
+  if (p->__pyx___output_shape) {
+    e = (*v)(p->__pyx___output_shape, a); if (e) return e;
+  }
+  if (p->__pyx___input_dtype) {
+    e = (*v)(p->__pyx___input_dtype, a); if (e) return e;
+  }
+  if (p->__pyx___output_dtype) {
+    e = (*v)(p->__pyx___output_dtype, a); if (e) return e;
+  }
+  if (p->__pyx___flags_used) {
+    e = (*v)(p->__pyx___flags_used, a); if (e) return e;
+  }
+  return 0;
+}
+
+static int __pyx_tp_clear_6pyfftw_6pyfftw_FFTW(PyObject *o) {
+  struct __pyx_obj_6pyfftw_6pyfftw_FFTW *p = (struct __pyx_obj_6pyfftw_6pyfftw_FFTW *)o;
+  PyObject* tmp;
+  tmp = ((PyObject*)p->__pyx___input_array);
+  p->__pyx___input_array = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
+  Py_XDECREF(tmp);
+  tmp = ((PyObject*)p->__pyx___output_array);
+  p->__pyx___output_array = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
+  Py_XDECREF(tmp);
+  tmp = ((PyObject*)p->__pyx___input_strides);
+  p->__pyx___input_strides = Py_None; Py_INCREF(Py_None);
+  Py_XDECREF(tmp);
+  tmp = ((PyObject*)p->__pyx___input_byte_strides);
+  p->__pyx___input_byte_strides = Py_None; Py_INCREF(Py_None);
+  Py_XDECREF(tmp);
+  tmp = ((PyObject*)p->__pyx___output_strides);
+  p->__pyx___output_strides = Py_None; Py_INCREF(Py_None);
+  Py_XDECREF(tmp);
+  tmp = ((PyObject*)p->__pyx___output_byte_strides);
+  p->__pyx___output_byte_strides = Py_None; Py_INCREF(Py_None);
+  Py_XDECREF(tmp);
+  tmp = ((PyObject*)p->__pyx___input_shape);
+  p->__pyx___input_shape = Py_None; Py_INCREF(Py_None);
+  Py_XDECREF(tmp);
+  tmp = ((PyObject*)p->__pyx___output_shape);
+  p->__pyx___output_shape = Py_None; Py_INCREF(Py_None);
+  Py_XDECREF(tmp);
+  tmp = ((PyObject*)p->__pyx___input_dtype);
+  p->__pyx___input_dtype = Py_None; Py_INCREF(Py_None);
+  Py_XDECREF(tmp);
+  tmp = ((PyObject*)p->__pyx___output_dtype);
+  p->__pyx___output_dtype = Py_None; Py_INCREF(Py_None);
+  Py_XDECREF(tmp);
+  tmp = ((PyObject*)p->__pyx___flags_used);
+  p->__pyx___flags_used = Py_None; Py_INCREF(Py_None);
+  Py_XDECREF(tmp);
+  return 0;
+}
+
+static PyMethodDef __pyx_methods_6pyfftw_6pyfftw_FFTW[] = {
+  {__Pyx_NAMESTR("__get_N"), (PyCFunction)__pyx_pw_6pyfftw_6pyfftw_4FFTW_1__get_N, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_6pyfftw_6pyfftw_4FFTW___get_N)},
+  {__Pyx_NAMESTR("__get_simd_aligned"), (PyCFunction)__pyx_pw_6pyfftw_6pyfftw_4FFTW_3__get_simd_aligned, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_6pyfftw_6pyfftw_4FFTW_2__get_simd_aligned)},
+  {__Pyx_NAMESTR("__get_input_alignment"), (PyCFunction)__pyx_pw_6pyfftw_6pyfftw_4FFTW_5__get_input_alignment, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_6pyfftw_6pyfftw_4FFTW_4__get_input_alignment)},
+  {__Pyx_NAMESTR("__get_output_alignment"), (PyCFunction)__pyx_pw_6pyfftw_6pyfftw_4FFTW_7__get_output_alignment, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_6pyfftw_6pyfftw_4FFTW_6__get_output_alignment)},
+  {__Pyx_NAMESTR("__get_flags_used"), (PyCFunction)__pyx_pw_6pyfftw_6pyfftw_4FFTW_9__get_flags_used, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_6pyfftw_6pyfftw_4FFTW_8__get_flags_used)},
+  {__Pyx_NAMESTR("update_arrays"), (PyCFunction)__pyx_pw_6pyfftw_6pyfftw_4FFTW_19update_arrays, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pyfftw_6pyfftw_4FFTW_18update_arrays)},
+  {__Pyx_NAMESTR("get_input_array"), (PyCFunction)__pyx_pw_6pyfftw_6pyfftw_4FFTW_21get_input_array, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_6pyfftw_6pyfftw_4FFTW_20get_input_array)},
+  {__Pyx_NAMESTR("get_output_array"), (PyCFunction)__pyx_pw_6pyfftw_6pyfftw_4FFTW_23get_output_array, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_6pyfftw_6pyfftw_4FFTW_22get_output_array)},
+  {__Pyx_NAMESTR("execute"), (PyCFunction)__pyx_pw_6pyfftw_6pyfftw_4FFTW_25execute, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_6pyfftw_6pyfftw_4FFTW_24execute)},
+  {0, 0, 0, 0}
+};
+
+static PyNumberMethods __pyx_tp_as_number_FFTW = {
+  0, /*nb_add*/
+  0, /*nb_subtract*/
+  0, /*nb_multiply*/
+  #if PY_MAJOR_VERSION < 3
+  0, /*nb_divide*/
+  #endif
+  0, /*nb_remainder*/
+  0, /*nb_divmod*/
+  0, /*nb_power*/
+  0, /*nb_negative*/
+  0, /*nb_positive*/
+  0, /*nb_absolute*/
+  0, /*nb_nonzero*/
+  0, /*nb_invert*/
+  0, /*nb_lshift*/
+  0, /*nb_rshift*/
+  0, /*nb_and*/
+  0, /*nb_xor*/
+  0, /*nb_or*/
+  #if PY_MAJOR_VERSION < 3
+  0, /*nb_coerce*/
+  #endif
+  0, /*nb_int*/
+  #if PY_MAJOR_VERSION < 3
+  0, /*nb_long*/
+  #else
+  0, /*reserved*/
+  #endif
+  0, /*nb_float*/
+  #if PY_MAJOR_VERSION < 3
+  0, /*nb_oct*/
+  #endif
+  #if PY_MAJOR_VERSION < 3
+  0, /*nb_hex*/
+  #endif
+  0, /*nb_inplace_add*/
+  0, /*nb_inplace_subtract*/
+  0, /*nb_inplace_multiply*/
+  #if PY_MAJOR_VERSION < 3
+  0, /*nb_inplace_divide*/
+  #endif
+  0, /*nb_inplace_remainder*/
+  0, /*nb_inplace_power*/
+  0, /*nb_inplace_lshift*/
+  0, /*nb_inplace_rshift*/
+  0, /*nb_inplace_and*/
+  0, /*nb_inplace_xor*/
+  0, /*nb_inplace_or*/
+  0, /*nb_floor_divide*/
+  0, /*nb_true_divide*/
+  0, /*nb_inplace_floor_divide*/
+  0, /*nb_inplace_true_divide*/
+  #if PY_VERSION_HEX >= 0x02050000
+  0, /*nb_index*/
+  #endif
+};
+
+static PySequenceMethods __pyx_tp_as_sequence_FFTW = {
+  0, /*sq_length*/
+  0, /*sq_concat*/
+  0, /*sq_repeat*/
+  0, /*sq_item*/
+  0, /*sq_slice*/
+  0, /*sq_ass_item*/
+  0, /*sq_ass_slice*/
+  0, /*sq_contains*/
+  0, /*sq_inplace_concat*/
+  0, /*sq_inplace_repeat*/
+};
+
+static PyMappingMethods __pyx_tp_as_mapping_FFTW = {
+  0, /*mp_length*/
+  0, /*mp_subscript*/
+  0, /*mp_ass_subscript*/
+};
+
+static PyBufferProcs __pyx_tp_as_buffer_FFTW = {
+  #if PY_MAJOR_VERSION < 3
+  0, /*bf_getreadbuffer*/
+  #endif
+  #if PY_MAJOR_VERSION < 3
+  0, /*bf_getwritebuffer*/
+  #endif
+  #if PY_MAJOR_VERSION < 3
+  0, /*bf_getsegcount*/
+  #endif
+  #if PY_MAJOR_VERSION < 3
+  0, /*bf_getcharbuffer*/
+  #endif
+  #if PY_VERSION_HEX >= 0x02060000
+  0, /*bf_getbuffer*/
+  #endif
+  #if PY_VERSION_HEX >= 0x02060000
+  0, /*bf_releasebuffer*/
+  #endif
+};
+
+static PyTypeObject __pyx_type_6pyfftw_6pyfftw_FFTW = {
+  PyVarObject_HEAD_INIT(0, 0)
+  __Pyx_NAMESTR("pyfftw.pyfftw.FFTW"), /*tp_name*/
+  sizeof(struct __pyx_obj_6pyfftw_6pyfftw_FFTW), /*tp_basicsize*/
+  0, /*tp_itemsize*/
+  __pyx_tp_dealloc_6pyfftw_6pyfftw_FFTW, /*tp_dealloc*/
+  0, /*tp_print*/
+  0, /*tp_getattr*/
+  0, /*tp_setattr*/
+  #if PY_MAJOR_VERSION < 3
+  0, /*tp_compare*/
+  #else
+  0, /*reserved*/
+  #endif
+  0, /*tp_repr*/
+  &__pyx_tp_as_number_FFTW, /*tp_as_number*/
+  &__pyx_tp_as_sequence_FFTW, /*tp_as_sequence*/
+  &__pyx_tp_as_mapping_FFTW, /*tp_as_mapping*/
+  0, /*tp_hash*/
+  __pyx_pw_6pyfftw_6pyfftw_4FFTW_17__call__, /*tp_call*/
+  0, /*tp_str*/
+  0, /*tp_getattro*/
+  0, /*tp_setattro*/
+  &__pyx_tp_as_buffer_FFTW, /*tp_as_buffer*/
+  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+  __Pyx_DOCSTR("\n    FFTW is a class for computing the complex N-Dimensional DFT or\n    inverse DFT of an array using the FFTW library. The interface is \n    designed to be somewhat pythonic, with the correct transform being \n    inferred from the dtypes of the passed arrays.\n\n    On instantiation, the dtypes and relative shapes of the input array and\n    output arrays are compared to the set of valid (and implemented)\n    :ref:`FFTW schemes <scheme_table>`.  If a match is found, [...]
+  __pyx_tp_traverse_6pyfftw_6pyfftw_FFTW, /*tp_traverse*/
+  __pyx_tp_clear_6pyfftw_6pyfftw_FFTW, /*tp_clear*/
+  0, /*tp_richcompare*/
+  0, /*tp_weaklistoffset*/
+  0, /*tp_iter*/
+  0, /*tp_iternext*/
+  __pyx_methods_6pyfftw_6pyfftw_FFTW, /*tp_methods*/
+  0, /*tp_members*/
+  0, /*tp_getset*/
+  0, /*tp_base*/
+  0, /*tp_dict*/
+  0, /*tp_descr_get*/
+  0, /*tp_descr_set*/
+  0, /*tp_dictoffset*/
+  __pyx_pw_6pyfftw_6pyfftw_4FFTW_13__init__, /*tp_init*/
+  0, /*tp_alloc*/
+  __pyx_tp_new_6pyfftw_6pyfftw_FFTW, /*tp_new*/
+  0, /*tp_free*/
+  0, /*tp_is_gc*/
+  0, /*tp_bases*/
+  0, /*tp_mro*/
+  0, /*tp_cache*/
+  0, /*tp_subclasses*/
+  0, /*tp_weaklist*/
+  0, /*tp_del*/
+  #if PY_VERSION_HEX >= 0x02060000
+  0, /*tp_version_tag*/
+  #endif
+};
+
+static PyMethodDef __pyx_methods[] = {
+  {__Pyx_NAMESTR("n_byte_align_empty"), (PyCFunction)__pyx_pw_6pyfftw_6pyfftw_1n_byte_align_empty, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pyfftw_6pyfftw_n_byte_align_empty)},
+  {__Pyx_NAMESTR("n_byte_align"), (PyCFunction)__pyx_pw_6pyfftw_6pyfftw_3n_byte_align, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pyfftw_6pyfftw_2n_byte_align)},
+  {__Pyx_NAMESTR("is_n_byte_aligned"), (PyCFunction)__pyx_pw_6pyfftw_6pyfftw_5is_n_byte_aligned, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pyfftw_6pyfftw_4is_n_byte_aligned)},
+  {0, 0, 0, 0}
+};
+
+#if PY_MAJOR_VERSION >= 3
+static struct PyModuleDef __pyx_moduledef = {
+    PyModuleDef_HEAD_INIT,
+    __Pyx_NAMESTR("pyfftw"),
+    0, /* m_doc */
+    -1, /* m_size */
+    __pyx_methods /* m_methods */,
+    NULL, /* m_reload */
+    NULL, /* m_traverse */
+    NULL, /* m_clear */
+    NULL /* m_free */
+};
+#endif
+
+static __Pyx_StringTabEntry __pyx_string_tab[] = {
+  {&__pyx_kp_s_1, __pyx_k_1, sizeof(__pyx_k_1), 0, 0, 1, 0},
+  {&__pyx_kp_s_11, __pyx_k_11, sizeof(__pyx_k_11), 0, 0, 1, 0},
+  {&__pyx_n_s_129, __pyx_k_129, sizeof(__pyx_k_129), 0, 0, 1, 1},
+  {&__pyx_kp_s_13, __pyx_k_13, sizeof(__pyx_k_13), 0, 0, 1, 0},
+  {&__pyx_n_s_130, __pyx_k_130, sizeof(__pyx_k_130), 0, 0, 1, 1},
+  {&__pyx_n_s_15, __pyx_k_15, sizeof(__pyx_k_15), 0, 0, 1, 1},
+  {&__pyx_kp_s_16, __pyx_k_16, sizeof(__pyx_k_16), 0, 0, 1, 0},
+  {&__pyx_kp_s_17, __pyx_k_17, sizeof(__pyx_k_17), 0, 0, 1, 0},
+  {&__pyx_kp_s_18, __pyx_k_18, sizeof(__pyx_k_18), 0, 0, 1, 0},
+  {&__pyx_kp_s_20, __pyx_k_20, sizeof(__pyx_k_20), 0, 0, 1, 0},
+  {&__pyx_kp_s_22, __pyx_k_22, sizeof(__pyx_k_22), 0, 0, 1, 0},
+  {&__pyx_kp_s_24, __pyx_k_24, sizeof(__pyx_k_24), 0, 0, 1, 0},
+  {&__pyx_kp_s_26, __pyx_k_26, sizeof(__pyx_k_26), 0, 0, 1, 0},
+  {&__pyx_kp_s_28, __pyx_k_28, sizeof(__pyx_k_28), 0, 0, 1, 0},
+  {&__pyx_kp_s_29, __pyx_k_29, sizeof(__pyx_k_29), 0, 0, 1, 0},
+  {&__pyx_kp_s_3, __pyx_k_3, sizeof(__pyx_k_3), 0, 0, 1, 0},
+  {&__pyx_kp_s_30, __pyx_k_30, sizeof(__pyx_k_30), 0, 0, 1, 0},
+  {&__pyx_kp_s_31, __pyx_k_31, sizeof(__pyx_k_31), 0, 0, 1, 0},
+  {&__pyx_kp_s_32, __pyx_k_32, sizeof(__pyx_k_32), 0, 0, 1, 0},
+  {&__pyx_kp_s_33, __pyx_k_33, sizeof(__pyx_k_33), 0, 0, 1, 0},
+  {&__pyx_kp_s_34, __pyx_k_34, sizeof(__pyx_k_34), 0, 0, 1, 0},
+  {&__pyx_kp_s_35, __pyx_k_35, sizeof(__pyx_k_35), 0, 0, 1, 0},
+  {&__pyx_kp_s_36, __pyx_k_36, sizeof(__pyx_k_36), 0, 0, 1, 0},
+  {&__pyx_kp_s_37, __pyx_k_37, sizeof(__pyx_k_37), 0, 0, 1, 0},
+  {&__pyx_kp_s_41, __pyx_k_41, sizeof(__pyx_k_41), 0, 0, 1, 0},
+  {&__pyx_kp_s_43, __pyx_k_43, sizeof(__pyx_k_43), 0, 0, 1, 0},
+  {&__pyx_kp_s_45, __pyx_k_45, sizeof(__pyx_k_45), 0, 0, 1, 0},
+  {&__pyx_kp_s_47, __pyx_k_47, sizeof(__pyx_k_47), 0, 0, 1, 0},
+  {&__pyx_kp_s_48, __pyx_k_48, sizeof(__pyx_k_48), 0, 0, 1, 0},
+  {&__pyx_kp_s_49, __pyx_k_49, sizeof(__pyx_k_49), 0, 0, 1, 0},
+  {&__pyx_kp_s_51, __pyx_k_51, sizeof(__pyx_k_51), 0, 0, 1, 0},
+  {&__pyx_kp_s_54, __pyx_k_54, sizeof(__pyx_k_54), 0, 0, 1, 0},
+  {&__pyx_kp_s_56, __pyx_k_56, sizeof(__pyx_k_56), 0, 0, 1, 0},
+  {&__pyx_kp_s_58, __pyx_k_58, sizeof(__pyx_k_58), 0, 0, 1, 0},
+  {&__pyx_kp_u_60, __pyx_k_60, sizeof(__pyx_k_60), 0, 1, 0, 0},
+  {&__pyx_kp_u_62, __pyx_k_62, sizeof(__pyx_k_62), 0, 1, 0, 0},
+  {&__pyx_kp_u_64, __pyx_k_64, sizeof(__pyx_k_64), 0, 1, 0, 0},
+  {&__pyx_kp_u_66, __pyx_k_66, sizeof(__pyx_k_66), 0, 1, 0, 0},
+  {&__pyx_kp_u_67, __pyx_k_67, sizeof(__pyx_k_67), 0, 1, 0, 0},
+  {&__pyx_kp_s_7, __pyx_k_7, sizeof(__pyx_k_7), 0, 0, 1, 0},
+  {&__pyx_kp_u_70, __pyx_k_70, sizeof(__pyx_k_70), 0, 1, 0, 0},
+  {&__pyx_n_s_76, __pyx_k_76, sizeof(__pyx_k_76), 0, 0, 1, 1},
+  {&__pyx_kp_s_77, __pyx_k_77, sizeof(__pyx_k_77), 0, 0, 1, 0},
+  {&__pyx_n_s_78, __pyx_k_78, sizeof(__pyx_k_78), 0, 0, 1, 1},
+  {&__pyx_n_s_81, __pyx_k_81, sizeof(__pyx_k_81), 0, 0, 1, 1},
+  {&__pyx_kp_s_9, __pyx_k_9, sizeof(__pyx_k_9), 0, 0, 1, 0},
+  {&__pyx_kp_s__32, __pyx_k__32, sizeof(__pyx_k__32), 0, 0, 1, 0},
+  {&__pyx_kp_s__64, __pyx_k__64, sizeof(__pyx_k__64), 0, 0, 1, 0},
+  {&__pyx_n_s__C, __pyx_k__C, sizeof(__pyx_k__C), 0, 0, 1, 1},
+  {&__pyx_n_s__FFTW_BACKWARD, __pyx_k__FFTW_BACKWARD, sizeof(__pyx_k__FFTW_BACKWARD), 0, 0, 1, 1},
+  {&__pyx_n_s__FFTW_DESTROY_INPUT, __pyx_k__FFTW_DESTROY_INPUT, sizeof(__pyx_k__FFTW_DESTROY_INPUT), 0, 0, 1, 1},
+  {&__pyx_n_s__FFTW_ESTIMATE, __pyx_k__FFTW_ESTIMATE, sizeof(__pyx_k__FFTW_ESTIMATE), 0, 0, 1, 1},
+  {&__pyx_n_s__FFTW_EXHAUSTIVE, __pyx_k__FFTW_EXHAUSTIVE, sizeof(__pyx_k__FFTW_EXHAUSTIVE), 0, 0, 1, 1},
+  {&__pyx_n_s__FFTW_FORWARD, __pyx_k__FFTW_FORWARD, sizeof(__pyx_k__FFTW_FORWARD), 0, 0, 1, 1},
+  {&__pyx_n_s__FFTW_MEASURE, __pyx_k__FFTW_MEASURE, sizeof(__pyx_k__FFTW_MEASURE), 0, 0, 1, 1},
+  {&__pyx_n_s__FFTW_PATIENT, __pyx_k__FFTW_PATIENT, sizeof(__pyx_k__FFTW_PATIENT), 0, 0, 1, 1},
+  {&__pyx_n_s__FFTW_UNALIGNED, __pyx_k__FFTW_UNALIGNED, sizeof(__pyx_k__FFTW_UNALIGNED), 0, 0, 1, 1},
+  {&__pyx_n_s__IndexError, __pyx_k__IndexError, sizeof(__pyx_k__IndexError), 0, 0, 1, 1},
+  {&__pyx_n_s__KeyError, __pyx_k__KeyError, sizeof(__pyx_k__KeyError), 0, 0, 1, 1},
+  {&__pyx_n_s__MemoryError, __pyx_k__MemoryError, sizeof(__pyx_k__MemoryError), 0, 0, 1, 1},
+  {&__pyx_n_s__N, __pyx_k__N, sizeof(__pyx_k__N), 0, 0, 1, 1},
+  {&__pyx_n_s__RuntimeError, __pyx_k__RuntimeError, sizeof(__pyx_k__RuntimeError), 0, 0, 1, 1},
+  {&__pyx_n_s__TypeError, __pyx_k__TypeError, sizeof(__pyx_k__TypeError), 0, 0, 1, 1},
+  {&__pyx_n_s__ValueError, __pyx_k__ValueError, sizeof(__pyx_k__ValueError), 0, 0, 1, 1},
+  {&__pyx_n_s____class__, __pyx_k____class__, sizeof(__pyx_k____class__), 0, 0, 1, 1},
+  {&__pyx_n_s____get_N, __pyx_k____get_N, sizeof(__pyx_k____get_N), 0, 0, 1, 1},
+  {&__pyx_n_s____get_flags_used, __pyx_k____get_flags_used, sizeof(__pyx_k____get_flags_used), 0, 0, 1, 1},
+  {&__pyx_n_s____get_simd_aligned, __pyx_k____get_simd_aligned, sizeof(__pyx_k____get_simd_aligned), 0, 0, 1, 1},
+  {&__pyx_n_s____main__, __pyx_k____main__, sizeof(__pyx_k____main__), 0, 0, 1, 1},
+  {&__pyx_n_s____test__, __pyx_k____test__, sizeof(__pyx_k____test__), 0, 0, 1, 1},
+  {&__pyx_n_s___flag_dict, __pyx_k___flag_dict, sizeof(__pyx_k___flag_dict), 0, 0, 1, 1},
+  {&__pyx_n_s__alignment, __pyx_k__alignment, sizeof(__pyx_k__alignment), 0, 0, 1, 1},
+  {&__pyx_n_s__array, __pyx_k__array, sizeof(__pyx_k__array), 0, 0, 1, 1},
+  {&__pyx_n_s__asanyarray, __pyx_k__asanyarray, sizeof(__pyx_k__asanyarray), 0, 0, 1, 1},
+  {&__pyx_n_s__axes, __pyx_k__axes, sizeof(__pyx_k__axes), 0, 0, 1, 1},
+  {&__pyx_n_s__c2c, __pyx_k__c2c, sizeof(__pyx_k__c2c), 0, 0, 1, 1},
+  {&__pyx_n_s__c2r, __pyx_k__c2r, sizeof(__pyx_k__c2r), 0, 0, 1, 1},
+  {&__pyx_n_s__c_wisdom, __pyx_k__c_wisdom, sizeof(__pyx_k__c_wisdom), 0, 0, 1, 1},
+  {&__pyx_n_s__c_wisdom_ptr, __pyx_k__c_wisdom_ptr, sizeof(__pyx_k__c_wisdom_ptr), 0, 0, 1, 1},
+  {&__pyx_n_s__c_wisdomf, __pyx_k__c_wisdomf, sizeof(__pyx_k__c_wisdomf), 0, 0, 1, 1},
+  {&__pyx_n_s__c_wisdomf_ptr, __pyx_k__c_wisdomf_ptr, sizeof(__pyx_k__c_wisdomf_ptr), 0, 0, 1, 1},
+  {&__pyx_n_s__c_wisdoml, __pyx_k__c_wisdoml, sizeof(__pyx_k__c_wisdoml), 0, 0, 1, 1},
+  {&__pyx_n_s__c_wisdoml_ptr, __pyx_k__c_wisdoml_ptr, sizeof(__pyx_k__c_wisdoml_ptr), 0, 0, 1, 1},
+  {&__pyx_n_s__clongdouble, __pyx_k__clongdouble, sizeof(__pyx_k__clongdouble), 0, 0, 1, 1},
+  {&__pyx_n_s__complex128, __pyx_k__complex128, sizeof(__pyx_k__complex128), 0, 0, 1, 1},
+  {&__pyx_n_s__complex64, __pyx_k__complex64, sizeof(__pyx_k__complex64), 0, 0, 1, 1},
+  {&__pyx_n_s__copy, __pyx_k__copy, sizeof(__pyx_k__copy), 0, 0, 1, 1},
+  {&__pyx_n_s__counter, __pyx_k__counter, sizeof(__pyx_k__counter), 0, 0, 1, 1},
+  {&__pyx_n_s__counterf, __pyx_k__counterf, sizeof(__pyx_k__counterf), 0, 0, 1, 1},
+  {&__pyx_n_s__counterl, __pyx_k__counterl, sizeof(__pyx_k__counterl), 0, 0, 1, 1},
+  {&__pyx_n_s__data, __pyx_k__data, sizeof(__pyx_k__data), 0, 0, 1, 1},
+  {&__pyx_n_s__direction, __pyx_k__direction, sizeof(__pyx_k__direction), 0, 0, 1, 1},
+  {&__pyx_n_s__dtype, __pyx_k__dtype, sizeof(__pyx_k__dtype), 0, 0, 1, 1},
+  {&__pyx_n_s__empty, __pyx_k__empty, sizeof(__pyx_k__empty), 0, 0, 1, 1},
+  {&__pyx_n_s__execute, __pyx_k__execute, sizeof(__pyx_k__execute), 0, 0, 1, 1},
+  {&__pyx_n_s__executor, __pyx_k__executor, sizeof(__pyx_k__executor), 0, 0, 1, 1},
+  {&__pyx_n_s__export_wisdom, __pyx_k__export_wisdom, sizeof(__pyx_k__export_wisdom), 0, 0, 1, 1},
+  {&__pyx_n_s__fft_shape_lookup, __pyx_k__fft_shape_lookup, sizeof(__pyx_k__fft_shape_lookup), 0, 0, 1, 1},
+  {&__pyx_n_s__flags, __pyx_k__flags, sizeof(__pyx_k__flags), 0, 0, 1, 1},
+  {&__pyx_n_s__float32, __pyx_k__float32, sizeof(__pyx_k__float32), 0, 0, 1, 1},
+  {&__pyx_n_s__float64, __pyx_k__float64, sizeof(__pyx_k__float64), 0, 0, 1, 1},
+  {&__pyx_n_s__forget_wisdom, __pyx_k__forget_wisdom, sizeof(__pyx_k__forget_wisdom), 0, 0, 1, 1},
+  {&__pyx_n_s__frombuffer, __pyx_k__frombuffer, sizeof(__pyx_k__frombuffer), 0, 0, 1, 1},
+  {&__pyx_n_s__generic_precision, __pyx_k__generic_precision, sizeof(__pyx_k__generic_precision), 0, 0, 1, 1},
+  {&__pyx_n_s__import_wisdom, __pyx_k__import_wisdom, sizeof(__pyx_k__import_wisdom), 0, 0, 1, 1},
+  {&__pyx_n_s__input_alignment, __pyx_k__input_alignment, sizeof(__pyx_k__input_alignment), 0, 0, 1, 1},
+  {&__pyx_n_s__input_array, __pyx_k__input_array, sizeof(__pyx_k__input_array), 0, 0, 1, 1},
+  {&__pyx_n_s__int8, __pyx_k__int8, sizeof(__pyx_k__int8), 0, 0, 1, 1},
+  {&__pyx_n_s__integer, __pyx_k__integer, sizeof(__pyx_k__integer), 0, 0, 1, 1},
+  {&__pyx_n_s__itemsize, __pyx_k__itemsize, sizeof(__pyx_k__itemsize), 0, 0, 1, 1},
+  {&__pyx_n_s__ld, __pyx_k__ld, sizeof(__pyx_k__ld), 0, 0, 1, 1},
+  {&__pyx_n_s__longdouble, __pyx_k__longdouble, sizeof(__pyx_k__longdouble), 0, 0, 1, 1},
+  {&__pyx_n_s__n, __pyx_k__n, sizeof(__pyx_k__n), 0, 0, 1, 1},
+  {&__pyx_n_s__new_input_array, __pyx_k__new_input_array, sizeof(__pyx_k__new_input_array), 0, 0, 1, 1},
+  {&__pyx_n_s__new_output_array, __pyx_k__new_output_array, sizeof(__pyx_k__new_output_array), 0, 0, 1, 1},
+  {&__pyx_n_s__normalise_idft, __pyx_k__normalise_idft, sizeof(__pyx_k__normalise_idft), 0, 0, 1, 1},
+  {&__pyx_n_s__np, __pyx_k__np, sizeof(__pyx_k__np), 0, 0, 1, 1},
+  {&__pyx_n_s__numpy, __pyx_k__numpy, sizeof(__pyx_k__numpy), 0, 0, 1, 1},
+  {&__pyx_n_s__order, __pyx_k__order, sizeof(__pyx_k__order), 0, 0, 1, 1},
+  {&__pyx_n_s__output_alignment, __pyx_k__output_alignment, sizeof(__pyx_k__output_alignment), 0, 0, 1, 1},
+  {&__pyx_n_s__output_array, __pyx_k__output_array, sizeof(__pyx_k__output_array), 0, 0, 1, 1},
+  {&__pyx_n_s__planner, __pyx_k__planner, sizeof(__pyx_k__planner), 0, 0, 1, 1},
+  {&__pyx_n_s__planning_timelimit, __pyx_k__planning_timelimit, sizeof(__pyx_k__planning_timelimit), 0, 0, 1, 1},
+  {&__pyx_n_s__property, __pyx_k__property, sizeof(__pyx_k__property), 0, 0, 1, 1},
+  {&__pyx_n_s__py_wisdom, __pyx_k__py_wisdom, sizeof(__pyx_k__py_wisdom), 0, 0, 1, 1},
+  {&__pyx_n_s__py_wisdomf, __pyx_k__py_wisdomf, sizeof(__pyx_k__py_wisdomf), 0, 0, 1, 1},
+  {&__pyx_n_s__py_wisdoml, __pyx_k__py_wisdoml, sizeof(__pyx_k__py_wisdoml), 0, 0, 1, 1},
+  {&__pyx_n_s__r2c, __pyx_k__r2c, sizeof(__pyx_k__r2c), 0, 0, 1, 1},
+  {&__pyx_n_s__range, __pyx_k__range, sizeof(__pyx_k__range), 0, 0, 1, 1},
+  {&__pyx_n_s__reshape, __pyx_k__reshape, sizeof(__pyx_k__reshape), 0, 0, 1, 1},
+  {&__pyx_n_s__shape, __pyx_k__shape, sizeof(__pyx_k__shape), 0, 0, 1, 1},
+  {&__pyx_n_s__simd_aligned, __pyx_k__simd_aligned, sizeof(__pyx_k__simd_aligned), 0, 0, 1, 1},
+  {&__pyx_n_s__simd_alignment, __pyx_k__simd_alignment, sizeof(__pyx_k__simd_alignment), 0, 0, 1, 1},
+  {&__pyx_n_s__strides, __pyx_k__strides, sizeof(__pyx_k__strides), 0, 0, 1, 1},
+  {&__pyx_n_s__success, __pyx_k__success, sizeof(__pyx_k__success), 0, 0, 1, 1},
+  {&__pyx_n_s__successf, __pyx_k__successf, sizeof(__pyx_k__successf), 0, 0, 1, 1},
+  {&__pyx_n_s__successl, __pyx_k__successl, sizeof(__pyx_k__successl), 0, 0, 1, 1},
+  {&__pyx_n_s__threads, __pyx_k__threads, sizeof(__pyx_k__threads), 0, 0, 1, 1},
+  {&__pyx_n_s__type, __pyx_k__type, sizeof(__pyx_k__type), 0, 0, 1, 1},
+  {&__pyx_n_s__update, __pyx_k__update, sizeof(__pyx_k__update), 0, 0, 1, 1},
+  {&__pyx_n_s__update_arrays, __pyx_k__update_arrays, sizeof(__pyx_k__update_arrays), 0, 0, 1, 1},
+  {&__pyx_n_s__validator, __pyx_k__validator, sizeof(__pyx_k__validator), 0, 0, 1, 1},
+  {&__pyx_n_s__view, __pyx_k__view, sizeof(__pyx_k__view), 0, 0, 1, 1},
+  {&__pyx_n_s__wisdom, __pyx_k__wisdom, sizeof(__pyx_k__wisdom), 0, 0, 1, 1},
+  {0, 0, 0, 0, 0, 0, 0}
+};
+static int __Pyx_InitCachedBuiltins(void) {
+  __pyx_builtin_property = __Pyx_GetName(__pyx_b, __pyx_n_s__property); if (!__pyx_builtin_property) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_TypeError = __Pyx_GetName(__pyx_b, __pyx_n_s__TypeError); if (!__pyx_builtin_TypeError) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_range = __Pyx_GetName(__pyx_b, __pyx_n_s__range); if (!__pyx_builtin_range) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_ValueError = __Pyx_GetName(__pyx_b, __pyx_n_s__ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 720; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_KeyError = __Pyx_GetName(__pyx_b, __pyx_n_s__KeyError); if (!__pyx_builtin_KeyError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 733; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_IndexError = __Pyx_GetName(__pyx_b, __pyx_n_s__IndexError); if (!__pyx_builtin_IndexError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_MemoryError = __Pyx_GetName(__pyx_b, __pyx_n_s__MemoryError); if (!__pyx_builtin_MemoryError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_RuntimeError = __Pyx_GetName(__pyx_b, __pyx_n_s__RuntimeError); if (!__pyx_builtin_RuntimeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 975; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  return 0;
+  __pyx_L1_error:;
+  return -1;
+}
+
+static int __Pyx_InitCachedConstants(void) {
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
+
+  /* "/home/whg21/Projects/github/pyFFTW/pyfftw/utils.pxi":88
+ * 
+ *     if not isinstance(array, np.ndarray):
+ *         raise TypeError('Invalid array: n_byte_align requires a subclass '             # <<<<<<<<<<<<<<
+ *                 'of ndarray')
+ * 
+ */
+  __pyx_k_tuple_2 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_k_tuple_2);
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_1));
+  PyTuple_SET_ITEM(__pyx_k_tuple_2, 0, ((PyObject *)__pyx_kp_s_1));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_1));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_2));
+
+  /* "/home/whg21/Projects/github/pyFFTW/pyfftw/utils.pxi":120
+ *     '''
+ *     if not isinstance(array, np.ndarray):
+ *         raise TypeError('Invalid array: is_n_byte_aligned requires a subclass '             # <<<<<<<<<<<<<<
+ *                 'of ndarray')
+ * 
+ */
+  __pyx_k_tuple_4 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_k_tuple_4);
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_3));
+  PyTuple_SET_ITEM(__pyx_k_tuple_4, 0, ((PyObject *)__pyx_kp_s_3));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_3));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_4));
+
+  /* "pyfftw/pyfftw.pyx":694
+ *     flags = property(__get_flags_used)
+ * 
+ *     def __cinit__(self, input_array, output_array, axes=(-1,),             # <<<<<<<<<<<<<<
+ *             direction='FFTW_FORWARD', flags=('FFTW_MEASURE',),
+ *             unsigned int threads=1, planning_timelimit=None,
+ */
+  __pyx_k_tuple_5 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_k_tuple_5);
+  __Pyx_INCREF(__pyx_int_neg_1);
+  PyTuple_SET_ITEM(__pyx_k_tuple_5, 0, __pyx_int_neg_1);
+  __Pyx_GIVEREF(__pyx_int_neg_1);
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_5));
+
+  /* "pyfftw/pyfftw.pyx":695
+ * 
+ *     def __cinit__(self, input_array, output_array, axes=(-1,),
+ *             direction='FFTW_FORWARD', flags=('FFTW_MEASURE',),             # <<<<<<<<<<<<<<
+ *             unsigned int threads=1, planning_timelimit=None,
+ *             *args, **kwargs):
+ */
+  __pyx_k_tuple_6 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_k_tuple_6);
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__FFTW_MEASURE));
+  PyTuple_SET_ITEM(__pyx_k_tuple_6, 0, ((PyObject *)__pyx_n_s__FFTW_MEASURE));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__FFTW_MEASURE));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_6));
+
+  /* "pyfftw/pyfftw.pyx":716
+ *                 _planning_timelimit = planning_timelimit
+ *             except TypeError:
+ *                 raise TypeError('Invalid planning timelimit: '             # <<<<<<<<<<<<<<
+ *                         'The planning timelimit needs to be a float.')
+ * 
+ */
+  __pyx_k_tuple_8 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 716; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_k_tuple_8);
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_7));
+  PyTuple_SET_ITEM(__pyx_k_tuple_8, 0, ((PyObject *)__pyx_kp_s_7));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_7));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_8));
+
+  /* "pyfftw/pyfftw.pyx":720
+ * 
+ *         if not isinstance(input_array, np.ndarray):
+ *             raise ValueError('Invalid input array: '             # <<<<<<<<<<<<<<
+ *                     'The input array needs to be an instance '
+ *                     'of numpy.ndarray')
+ */
+  __pyx_k_tuple_10 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 720; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_k_tuple_10);
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_9));
+  PyTuple_SET_ITEM(__pyx_k_tuple_10, 0, ((PyObject *)__pyx_kp_s_9));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_9));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_10));
+
+  /* "pyfftw/pyfftw.pyx":725
+ * 
+ *         if not isinstance(output_array, np.ndarray):
+ *             raise ValueError('Invalid output array: '             # <<<<<<<<<<<<<<
+ *                     'The output array needs to be an instance '
+ *                     'of numpy.ndarray')
+ */
+  __pyx_k_tuple_12 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_k_tuple_12);
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_11));
+  PyTuple_SET_ITEM(__pyx_k_tuple_12, 0, ((PyObject *)__pyx_kp_s_11));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_11));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_12));
+
+  /* "pyfftw/pyfftw.pyx":734
+ *             scheme = fftw_schemes[(input_dtype, output_dtype)]
+ *         except KeyError:
+ *             raise ValueError('Invalid scheme: '             # <<<<<<<<<<<<<<
+ *                     'The output array and input array dtypes '
+ *                     'do not correspond to a valid fftw scheme.')
+ */
+  __pyx_k_tuple_14 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 734; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_k_tuple_14);
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_13));
+  PyTuple_SET_ITEM(__pyx_k_tuple_14, 0, ((PyObject *)__pyx_kp_s_13));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_13));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_14));
+
+  /* "pyfftw/pyfftw.pyx":803
+ * 
+ *         if not direction in scheme_directions[scheme]:
+ *             raise ValueError('Invalid direction: '             # <<<<<<<<<<<<<<
+ *                     'The direction is not valid for the scheme. '
+ *                     'Try setting it explicitly if it is not already.')
+ */
+  __pyx_k_tuple_19 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_k_tuple_19);
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_18));
+  PyTuple_SET_ITEM(__pyx_k_tuple_19, 0, ((PyObject *)__pyx_kp_s_18));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_18));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_19));
+
+  /* "pyfftw/pyfftw.pyx":827
+ * 
+ *             if self.__axes[n] >= array_dimension or self.__axes[n] < 0:
+ *                 raise IndexError('Invalid axes: '             # <<<<<<<<<<<<<<
+ *                     'The axes list cannot contain invalid axes.')
+ * 
+ */
+  __pyx_k_tuple_21 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_k_tuple_21);
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_20));
+  PyTuple_SET_ITEM(__pyx_k_tuple_21, 0, ((PyObject *)__pyx_kp_s_20));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_20));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_21));
+
+  /* "pyfftw/pyfftw.pyx":845
+ *         for n in range(unique_axes_length):
+ *             if self.__input_shape[self.__axes[n]] == 0:
+ *                 raise ValueError('Zero length array: '             # <<<<<<<<<<<<<<
+ *                     'The input array should have no zero length'
+ *                     'axes over which the FFT is to be taken')
+ */
+  __pyx_k_tuple_23 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_k_tuple_23);
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_22));
+  PyTuple_SET_ITEM(__pyx_k_tuple_23, 0, ((PyObject *)__pyx_kp_s_22));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_22));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_23));
+
+  /* "pyfftw/pyfftw.pyx":862
+ *         if functions['validator'] == -1:
+ *             if not (output_array.shape == input_array.shape):
+ *                 raise ValueError('Invalid shapes: '             # <<<<<<<<<<<<<<
+ *                         'The output array should be the same shape as the '
+ *                         'input array for the given array dtypes.')
+ */
+  __pyx_k_tuple_25 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 862; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_k_tuple_25);
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_24));
+  PyTuple_SET_ITEM(__pyx_k_tuple_25, 0, ((PyObject *)__pyx_kp_s_24));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_24));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_25));
+
+  /* "pyfftw/pyfftw.pyx":869
+ *             if not _validator(input_array, output_array,
+ *                     self.__axes, self.__not_axes, unique_axes_length):
+ *                 raise ValueError('Invalid shapes: '             # <<<<<<<<<<<<<<
+ *                         'The input array and output array are invalid '
+ *                         'complementary shapes for their dtypes.')
+ */
+  __pyx_k_tuple_27 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_27)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 869; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_k_tuple_27);
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_26));
+  PyTuple_SET_ITEM(__pyx_k_tuple_27, 0, ((PyObject *)__pyx_kp_s_26));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_26));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_27));
+
+  /* "pyfftw/pyfftw.pyx":978
+ *                     'to the planner returning NULL. This is a bug.')
+ * 
+ *     def __init__(self, input_array, output_array, axes=(-1,),             # <<<<<<<<<<<<<<
+ *             direction='FFTW_FORWARD', flags=('FFTW_MEASURE',),
+ *             int threads=1, planning_timelimit=None,
+ */
+  __pyx_k_tuple_38 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_38)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 978; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_k_tuple_38);
+  __Pyx_INCREF(__pyx_int_neg_1);
+  PyTuple_SET_ITEM(__pyx_k_tuple_38, 0, __pyx_int_neg_1);
+  __Pyx_GIVEREF(__pyx_int_neg_1);
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_38));
+
+  /* "pyfftw/pyfftw.pyx":979
+ * 
+ *     def __init__(self, input_array, output_array, axes=(-1,),
+ *             direction='FFTW_FORWARD', flags=('FFTW_MEASURE',),             # <<<<<<<<<<<<<<
+ *             int threads=1, planning_timelimit=None,
+ *             *args, **kwargs):
+ */
+  __pyx_k_tuple_39 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_39)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 979; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_k_tuple_39);
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__FFTW_MEASURE));
+  PyTuple_SET_ITEM(__pyx_k_tuple_39, 0, ((PyObject *)__pyx_n_s__FFTW_MEASURE));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__FFTW_MEASURE));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_39));
+
+  /* "pyfftw/pyfftw.pyx":1277
+ * 
+ *                 if not input_array.shape == self.__input_shape:
+ *                     raise ValueError('Invalid input shape: '             # <<<<<<<<<<<<<<
+ *                             'The new input array should be the same shape '
+ *                             'as the input array used to instantiate the '
+ */
+  __pyx_k_tuple_42 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_42)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1277; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_k_tuple_42);
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_41));
+  PyTuple_SET_ITEM(__pyx_k_tuple_42, 0, ((PyObject *)__pyx_kp_s_41));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_41));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_42));
+
+  /* "pyfftw/pyfftw.pyx":1324
+ *         '''
+ *         if not isinstance(new_input_array, np.ndarray):
+ *             raise ValueError('Invalid input array: '             # <<<<<<<<<<<<<<
+ *                     'The new input array needs to be an instance '
+ *                     'of numpy.ndarray')
+ */
+  __pyx_k_tuple_44 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_44)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_k_tuple_44);
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_43));
+  PyTuple_SET_ITEM(__pyx_k_tuple_44, 0, ((PyObject *)__pyx_kp_s_43));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_43));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_44));
+
+  /* "pyfftw/pyfftw.pyx":1329
+ * 
+ *         if not isinstance(new_output_array, np.ndarray):
+ *             raise ValueError('Invalid output array '             # <<<<<<<<<<<<<<
+ *                     'The new output array needs to be an instance '
+ *                     'of numpy.ndarray')
+ */
+  __pyx_k_tuple_46 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_46)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1329; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_k_tuple_46);
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_45));
+  PyTuple_SET_ITEM(__pyx_k_tuple_46, 0, ((PyObject *)__pyx_kp_s_45));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_45));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_46));
+
+  /* "pyfftw/pyfftw.pyx":1348
+ * 
+ *         if not new_input_array.dtype == self.__input_dtype:
+ *             raise ValueError('Invalid input dtype: '             # <<<<<<<<<<<<<<
+ *                     'The new input array is not of the same '
+ *                     'dtype as was originally planned for.')
+ */
+  __pyx_k_tuple_50 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_50)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_k_tuple_50);
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_49));
+  PyTuple_SET_ITEM(__pyx_k_tuple_50, 0, ((PyObject *)__pyx_kp_s_49));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_49));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_50));
+
+  /* "pyfftw/pyfftw.pyx":1353
+ * 
+ *         if not new_output_array.dtype == self.__output_dtype:
+ *             raise ValueError('Invalid output dtype: '             # <<<<<<<<<<<<<<
+ *                     'The new output array is not of the same '
+ *                     'dtype as was originally planned for.')
+ */
+  __pyx_k_tuple_52 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_52)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_k_tuple_52);
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_51));
+  PyTuple_SET_ITEM(__pyx_k_tuple_52, 0, ((PyObject *)__pyx_kp_s_51));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_51));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_52));
+
+  /* "pyfftw/pyfftw.pyx":1364
+ * 
+ *         if not new_input_shape == self.__input_shape:
+ *             raise ValueError('Invalid input shape: '             # <<<<<<<<<<<<<<
+ *                     'The new input array should be the same shape as '
+ *                     'the input array used to instantiate the object.')
+ */
+  __pyx_k_tuple_53 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_53)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_k_tuple_53);
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_41));
+  PyTuple_SET_ITEM(__pyx_k_tuple_53, 0, ((PyObject *)__pyx_kp_s_41));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_41));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_53));
+
+  /* "pyfftw/pyfftw.pyx":1369
+ * 
+ *         if not new_output_shape == self.__output_shape:
+ *             raise ValueError('Invalid output shape: '             # <<<<<<<<<<<<<<
+ *                     'The new output array should be the same shape as '
+ *                     'the output array used to instantiate the object.')
+ */
+  __pyx_k_tuple_55 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_55)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_k_tuple_55);
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_54));
+  PyTuple_SET_ITEM(__pyx_k_tuple_55, 0, ((PyObject *)__pyx_kp_s_54));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_54));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_55));
+
+  /* "pyfftw/pyfftw.pyx":1374
+ * 
+ *         if not new_input_strides == self.__input_byte_strides:
+ *             raise ValueError('Invalid input striding: '             # <<<<<<<<<<<<<<
+ *                     'The strides should be identical for the new '
+ *                     'input array as for the old.')
+ */
+  __pyx_k_tuple_57 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_57)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_k_tuple_57);
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_56));
+  PyTuple_SET_ITEM(__pyx_k_tuple_57, 0, ((PyObject *)__pyx_kp_s_56));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_56));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_57));
+
+  /* "pyfftw/pyfftw.pyx":1379
+ * 
+ *         if not new_output_strides == self.__output_byte_strides:
+ *             raise ValueError('Invalid output striding: '             # <<<<<<<<<<<<<<
+ *                     'The strides should be identical for the new '
+ *                     'output array as for the old.')
+ */
+  __pyx_k_tuple_59 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_59)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1379; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_k_tuple_59);
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_58));
+  PyTuple_SET_ITEM(__pyx_k_tuple_59, 0, ((PyObject *)__pyx_kp_s_58));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_58));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_59));
+
+  /* "numpy.pxd":215
+ *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
+ *                 and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)):
+ *                 raise ValueError(u"ndarray is not C contiguous")             # <<<<<<<<<<<<<<
+ * 
+ *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
+ */
+  __pyx_k_tuple_61 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_61)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_k_tuple_61);
+  __Pyx_INCREF(((PyObject *)__pyx_kp_u_60));
+  PyTuple_SET_ITEM(__pyx_k_tuple_61, 0, ((PyObject *)__pyx_kp_u_60));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_60));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_61));
+
+  /* "numpy.pxd":219
+ *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
+ *                 and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)):
+ *                 raise ValueError(u"ndarray is not Fortran contiguous")             # <<<<<<<<<<<<<<
+ * 
+ *             info.buf = PyArray_DATA(self)
+ */
+  __pyx_k_tuple_63 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_63)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_k_tuple_63);
+  __Pyx_INCREF(((PyObject *)__pyx_kp_u_62));
+  PyTuple_SET_ITEM(__pyx_k_tuple_63, 0, ((PyObject *)__pyx_kp_u_62));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_62));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_63));
+
+  /* "numpy.pxd":257
+ *                 if ((descr.byteorder == c'>' and little_endian) or
+ *                     (descr.byteorder == c'<' and not little_endian)):
+ *                     raise ValueError(u"Non-native byte order not supported")             # <<<<<<<<<<<<<<
+ *                 if   t == NPY_BYTE:        f = "b"
+ *                 elif t == NPY_UBYTE:       f = "B"
+ */
+  __pyx_k_tuple_65 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_65)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_k_tuple_65);
+  __Pyx_INCREF(((PyObject *)__pyx_kp_u_64));
+  PyTuple_SET_ITEM(__pyx_k_tuple_65, 0, ((PyObject *)__pyx_kp_u_64));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_64));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_65));
+
+  /* "numpy.pxd":799
+ * 
+ *         if (end - f) - (new_offset - offset[0]) < 15:
+ *             raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")             # <<<<<<<<<<<<<<
+ * 
+ *         if ((child.byteorder == c'>' and little_endian) or
+ */
+  __pyx_k_tuple_68 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_68)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_k_tuple_68);
+  __Pyx_INCREF(((PyObject *)__pyx_kp_u_67));
+  PyTuple_SET_ITEM(__pyx_k_tuple_68, 0, ((PyObject *)__pyx_kp_u_67));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_67));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_68));
+
+  /* "numpy.pxd":803
+ *         if ((child.byteorder == c'>' and little_endian) or
+ *             (child.byteorder == c'<' and not little_endian)):
+ *             raise ValueError(u"Non-native byte order not supported")             # <<<<<<<<<<<<<<
+ *             # One could encode it in the format string and have Cython
+ *             # complain instead, BUT: < and > in format strings also imply
+ */
+  __pyx_k_tuple_69 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_69)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_k_tuple_69);
+  __Pyx_INCREF(((PyObject *)__pyx_kp_u_64));
+  PyTuple_SET_ITEM(__pyx_k_tuple_69, 0, ((PyObject *)__pyx_kp_u_64));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_64));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_69));
+
+  /* "numpy.pxd":823
+ *             t = child.type_num
+ *             if end - f < 5:
+ *                 raise RuntimeError(u"Format string allocated too short.")             # <<<<<<<<<<<<<<
+ * 
+ *             # Until ticket #99 is fixed, use integers to avoid warnings
+ */
+  __pyx_k_tuple_71 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_71)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_k_tuple_71);
+  __Pyx_INCREF(((PyObject *)__pyx_kp_u_70));
+  PyTuple_SET_ITEM(__pyx_k_tuple_71, 0, ((PyObject *)__pyx_kp_u_70));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_70));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_71));
+
+  /* "/home/whg21/Projects/github/pyFFTW/pyfftw/utils.pxi":31
+ * #: A tuple of simd alignments that make sense for this cpu
+ * if _simd_alignment == 16:
+ *     _valid_simd_alignments = (16,)             # <<<<<<<<<<<<<<
+ * 
+ * elif _simd_alignment == 32:
+ */
+  __pyx_k_tuple_72 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_72)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_k_tuple_72);
+  __Pyx_INCREF(__pyx_int_16);
+  PyTuple_SET_ITEM(__pyx_k_tuple_72, 0, __pyx_int_16);
+  __Pyx_GIVEREF(__pyx_int_16);
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_72));
+
+  /* "/home/whg21/Projects/github/pyFFTW/pyfftw/utils.pxi":34
+ * 
+ * elif _simd_alignment == 32:
+ *     _valid_simd_alignments = (16, 32)             # <<<<<<<<<<<<<<
+ * 
+ * else:
+ */
+  __pyx_k_tuple_73 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_73)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_k_tuple_73);
+  __Pyx_INCREF(__pyx_int_16);
+  PyTuple_SET_ITEM(__pyx_k_tuple_73, 0, __pyx_int_16);
+  __Pyx_GIVEREF(__pyx_int_16);
+  __Pyx_INCREF(__pyx_int_32);
+  PyTuple_SET_ITEM(__pyx_k_tuple_73, 1, __pyx_int_32);
+  __Pyx_GIVEREF(__pyx_int_32);
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_73));
+
+  /* "pyfftw/pyfftw.pyx":380
+ * # Shape lookup functions
+ * # ======================
+ * def _lookup_shape_r2c_arrays(input_array, output_array):             # <<<<<<<<<<<<<<
+ *     return input_array.shape
+ * 
+ */
+  __pyx_k_tuple_74 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_74)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_k_tuple_74);
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__input_array));
+  PyTuple_SET_ITEM(__pyx_k_tuple_74, 0, ((PyObject *)__pyx_n_s__input_array));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__input_array));
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__output_array));
+  PyTuple_SET_ITEM(__pyx_k_tuple_74, 1, ((PyObject *)__pyx_n_s__output_array));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__output_array));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_74));
+  __pyx_k_codeobj_75 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_74, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_77, __pyx_n_s_76, 380, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_75)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "pyfftw/pyfftw.pyx":383
+ *     return input_array.shape
+ * 
+ * def _lookup_shape_c2r_arrays(input_array, output_array):             # <<<<<<<<<<<<<<
+ *     return output_array.shape
+ * 
+ */
+  __pyx_k_tuple_79 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_79)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_k_tuple_79);
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__input_array));
+  PyTuple_SET_ITEM(__pyx_k_tuple_79, 0, ((PyObject *)__pyx_n_s__input_array));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__input_array));
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__output_array));
+  PyTuple_SET_ITEM(__pyx_k_tuple_79, 1, ((PyObject *)__pyx_n_s__output_array));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__output_array));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_79));
+  __pyx_k_codeobj_80 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_79, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_77, __pyx_n_s_81, 383, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_80)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "pyfftw/pyfftw.pyx":418
+ * cdef object fftw_schemes
+ * fftw_schemes = {
+ *         (np.dtype('complex128'), np.dtype('complex128')): ('c2c', '64'),             # <<<<<<<<<<<<<<
+ *         (np.dtype('complex64'), np.dtype('complex64')): ('c2c', '32'),
+ *         (np.dtype('float64'), np.dtype('complex128')): ('r2c', '64'),
+ */
+  __pyx_k_tuple_82 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_82)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 418; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_k_tuple_82);
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__complex128));
+  PyTuple_SET_ITEM(__pyx_k_tuple_82, 0, ((PyObject *)__pyx_n_s__complex128));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__complex128));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_82));
+  __pyx_k_tuple_83 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_83)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 418; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_k_tuple_83);
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__complex128));
+  PyTuple_SET_ITEM(__pyx_k_tuple_83, 0, ((PyObject *)__pyx_n_s__complex128));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__complex128));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_83));
+  __pyx_k_tuple_84 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_84)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 418; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_k_tuple_84);
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__c2c));
+  PyTuple_SET_ITEM(__pyx_k_tuple_84, 0, ((PyObject *)__pyx_n_s__c2c));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__c2c));
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s__64));
+  PyTuple_SET_ITEM(__pyx_k_tuple_84, 1, ((PyObject *)__pyx_kp_s__64));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s__64));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_84));
+
+  /* "pyfftw/pyfftw.pyx":419
+ * fftw_schemes = {
+ *         (np.dtype('complex128'), np.dtype('complex128')): ('c2c', '64'),
+ *         (np.dtype('complex64'), np.dtype('complex64')): ('c2c', '32'),             # <<<<<<<<<<<<<<
+ *         (np.dtype('float64'), np.dtype('complex128')): ('r2c', '64'),
+ *         (np.dtype('float32'), np.dtype('complex64')): ('r2c', '32'),
+ */
+  __pyx_k_tuple_85 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_85)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_k_tuple_85);
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__complex64));
+  PyTuple_SET_ITEM(__pyx_k_tuple_85, 0, ((PyObject *)__pyx_n_s__complex64));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__complex64));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_85));
+  __pyx_k_tuple_86 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_86)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_k_tuple_86);
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__complex64));
+  PyTuple_SET_ITEM(__pyx_k_tuple_86, 0, ((PyObject *)__pyx_n_s__complex64));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__complex64));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_86));
+  __pyx_k_tuple_87 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_87)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_k_tuple_87);
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__c2c));
+  PyTuple_SET_ITEM(__pyx_k_tuple_87, 0, ((PyObject *)__pyx_n_s__c2c));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__c2c));
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s__32));
+  PyTuple_SET_ITEM(__pyx_k_tuple_87, 1, ((PyObject *)__pyx_kp_s__32));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s__32));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_87));
+
+  /* "pyfftw/pyfftw.pyx":420
+ *         (np.dtype('complex128'), np.dtype('complex128')): ('c2c', '64'),
+ *         (np.dtype('complex64'), np.dtype('complex64')): ('c2c', '32'),
+ *         (np.dtype('float64'), np.dtype('complex128')): ('r2c', '64'),             # <<<<<<<<<<<<<<
+ *         (np.dtype('float32'), np.dtype('complex64')): ('r2c', '32'),
+ *         (np.dtype('complex128'), np.dtype('float64')): ('c2r', '64'),
+ */
+  __pyx_k_tuple_88 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_88)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_k_tuple_88);
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__float64));
+  PyTuple_SET_ITEM(__pyx_k_tuple_88, 0, ((PyObject *)__pyx_n_s__float64));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__float64));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_88));
+  __pyx_k_tuple_89 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_89)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_k_tuple_89);
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__complex128));
+  PyTuple_SET_ITEM(__pyx_k_tuple_89, 0, ((PyObject *)__pyx_n_s__complex128));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__complex128));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_89));
+  __pyx_k_tuple_90 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_90)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_k_tuple_90);
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__r2c));
+  PyTuple_SET_ITEM(__pyx_k_tuple_90, 0, ((PyObject *)__pyx_n_s__r2c));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__r2c));
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s__64));
+  PyTuple_SET_ITEM(__pyx_k_tuple_90, 1, ((PyObject *)__pyx_kp_s__64));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s__64));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_90));
+
+  /* "pyfftw/pyfftw.pyx":421
+ *         (np.dtype('complex64'), np.dtype('complex64')): ('c2c', '32'),
+ *         (np.dtype('float64'), np.dtype('complex128')): ('r2c', '64'),
+ *         (np.dtype('float32'), np.dtype('complex64')): ('r2c', '32'),             # <<<<<<<<<<<<<<
+ *         (np.dtype('complex128'), np.dtype('float64')): ('c2r', '64'),
+ *         (np.dtype('complex64'), np.dtype('float32')): ('c2r', '32')}
+ */
+  __pyx_k_tuple_91 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_91)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_k_tuple_91);
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__float32));
+  PyTuple_SET_ITEM(__pyx_k_tuple_91, 0, ((PyObject *)__pyx_n_s__float32));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__float32));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_91));
+  __pyx_k_tuple_92 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_92)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_k_tuple_92);
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__complex64));
+  PyTuple_SET_ITEM(__pyx_k_tuple_92, 0, ((PyObject *)__pyx_n_s__complex64));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__complex64));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_92));
+  __pyx_k_tuple_93 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_93)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_k_tuple_93);
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__r2c));
+  PyTuple_SET_ITEM(__pyx_k_tuple_93, 0, ((PyObject *)__pyx_n_s__r2c));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__r2c));
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s__32));
+  PyTuple_SET_ITEM(__pyx_k_tuple_93, 1, ((PyObject *)__pyx_kp_s__32));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s__32));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_93));
+
+  /* "pyfftw/pyfftw.pyx":422
+ *         (np.dtype('float64'), np.dtype('complex128')): ('r2c', '64'),
+ *         (np.dtype('float32'), np.dtype('complex64')): ('r2c', '32'),
+ *         (np.dtype('complex128'), np.dtype('float64')): ('c2r', '64'),             # <<<<<<<<<<<<<<
+ *         (np.dtype('complex64'), np.dtype('float32')): ('c2r', '32')}
+ * 
+ */
+  __pyx_k_tuple_94 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_94)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_k_tuple_94);
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__complex128));
+  PyTuple_SET_ITEM(__pyx_k_tuple_94, 0, ((PyObject *)__pyx_n_s__complex128));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__complex128));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_94));
+  __pyx_k_tuple_95 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_95)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_k_tuple_95);
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__float64));
+  PyTuple_SET_ITEM(__pyx_k_tuple_95, 0, ((PyObject *)__pyx_n_s__float64));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__float64));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_95));
+  __pyx_k_tuple_96 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_96)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_k_tuple_96);
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__c2r));
+  PyTuple_SET_ITEM(__pyx_k_tuple_96, 0, ((PyObject *)__pyx_n_s__c2r));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__c2r));
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s__64));
+  PyTuple_SET_ITEM(__pyx_k_tuple_96, 1, ((PyObject *)__pyx_kp_s__64));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s__64));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_96));
+
+  /* "pyfftw/pyfftw.pyx":423
+ *         (np.dtype('float32'), np.dtype('complex64')): ('r2c', '32'),
+ *         (np.dtype('complex128'), np.dtype('float64')): ('c2r', '64'),
+ *         (np.dtype('complex64'), np.dtype('float32')): ('c2r', '32')}             # <<<<<<<<<<<<<<
+ * 
+ * if np.dtype('longdouble') != np.dtype('float64'):
+ */
+  __pyx_k_tuple_97 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_97)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_k_tuple_97);
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__complex64));
+  PyTuple_SET_ITEM(__pyx_k_tuple_97, 0, ((PyObject *)__pyx_n_s__complex64));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__complex64));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_97));
+  __pyx_k_tuple_98 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_98)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_k_tuple_98);
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__float32));
+  PyTuple_SET_ITEM(__pyx_k_tuple_98, 0, ((PyObject *)__pyx_n_s__float32));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__float32));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_98));
+  __pyx_k_tuple_99 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_99)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_k_tuple_99);
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__c2r));
+  PyTuple_SET_ITEM(__pyx_k_tuple_99, 0, ((PyObject *)__pyx_n_s__c2r));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__c2r));
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s__32));
+  PyTuple_SET_ITEM(__pyx_k_tuple_99, 1, ((PyObject *)__pyx_kp_s__32));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s__32));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_99));
+
+  /* "pyfftw/pyfftw.pyx":425
+ *         (np.dtype('complex64'), np.dtype('float32')): ('c2r', '32')}
+ * 
+ * if np.dtype('longdouble') != np.dtype('float64'):             # <<<<<<<<<<<<<<
+ *     fftw_schemes.update({
+ *         (np.dtype('clongdouble'), np.dtype('clongdouble')): ('c2c', 'ld'),
+ */
+  __pyx_k_tuple_100 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_100)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_k_tuple_100);
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__longdouble));
+  PyTuple_SET_ITEM(__pyx_k_tuple_100, 0, ((PyObject *)__pyx_n_s__longdouble));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__longdouble));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_100));
+  __pyx_k_tuple_101 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_101)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_k_tuple_101);
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__float64));
+  PyTuple_SET_ITEM(__pyx_k_tuple_101, 0, ((PyObject *)__pyx_n_s__float64));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__float64));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_101));
+
+  /* "pyfftw/pyfftw.pyx":427
+ * if np.dtype('longdouble') != np.dtype('float64'):
+ *     fftw_schemes.update({
+ *         (np.dtype('clongdouble'), np.dtype('clongdouble')): ('c2c', 'ld'),             # <<<<<<<<<<<<<<
+ *         (np.dtype('longdouble'), np.dtype('clongdouble')): ('r2c', 'ld'),
+ *         (np.dtype('clongdouble'), np.dtype('longdouble')): ('c2r', 'ld')})
+ */
+  __pyx_k_tuple_102 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_102)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_k_tuple_102);
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__clongdouble));
+  PyTuple_SET_ITEM(__pyx_k_tuple_102, 0, ((PyObject *)__pyx_n_s__clongdouble));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__clongdouble));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_102));
+  __pyx_k_tuple_103 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_103)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_k_tuple_103);
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__clongdouble));
+  PyTuple_SET_ITEM(__pyx_k_tuple_103, 0, ((PyObject *)__pyx_n_s__clongdouble));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__clongdouble));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_103));
+  __pyx_k_tuple_104 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_104)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_k_tuple_104);
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__c2c));
+  PyTuple_SET_ITEM(__pyx_k_tuple_104, 0, ((PyObject *)__pyx_n_s__c2c));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__c2c));
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__ld));
+  PyTuple_SET_ITEM(__pyx_k_tuple_104, 1, ((PyObject *)__pyx_n_s__ld));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ld));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_104));
+
+  /* "pyfftw/pyfftw.pyx":428
+ *     fftw_schemes.update({
+ *         (np.dtype('clongdouble'), np.dtype('clongdouble')): ('c2c', 'ld'),
+ *         (np.dtype('longdouble'), np.dtype('clongdouble')): ('r2c', 'ld'),             # <<<<<<<<<<<<<<
+ *         (np.dtype('clongdouble'), np.dtype('longdouble')): ('c2r', 'ld')})
+ * 
+ */
+  __pyx_k_tuple_105 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_105)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_k_tuple_105);
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__longdouble));
+  PyTuple_SET_ITEM(__pyx_k_tuple_105, 0, ((PyObject *)__pyx_n_s__longdouble));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__longdouble));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_105));
+  __pyx_k_tuple_106 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_106)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_k_tuple_106);
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__clongdouble));
+  PyTuple_SET_ITEM(__pyx_k_tuple_106, 0, ((PyObject *)__pyx_n_s__clongdouble));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__clongdouble));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_106));
+  __pyx_k_tuple_107 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_107)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_k_tuple_107);
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__r2c));
+  PyTuple_SET_ITEM(__pyx_k_tuple_107, 0, ((PyObject *)__pyx_n_s__r2c));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__r2c));
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__ld));
+  PyTuple_SET_ITEM(__pyx_k_tuple_107, 1, ((PyObject *)__pyx_n_s__ld));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ld));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_107));
+
+  /* "pyfftw/pyfftw.pyx":429
+ *         (np.dtype('clongdouble'), np.dtype('clongdouble')): ('c2c', 'ld'),
+ *         (np.dtype('longdouble'), np.dtype('clongdouble')): ('r2c', 'ld'),
+ *         (np.dtype('clongdouble'), np.dtype('longdouble')): ('c2r', 'ld')})             # <<<<<<<<<<<<<<
+ * 
+ * 
+ */
+  __pyx_k_tuple_108 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_108)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_k_tuple_108);
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__clongdouble));
+  PyTuple_SET_ITEM(__pyx_k_tuple_108, 0, ((PyObject *)__pyx_n_s__clongdouble));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__clongdouble));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_108));
+  __pyx_k_tuple_109 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_109)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_k_tuple_109);
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__longdouble));
+  PyTuple_SET_ITEM(__pyx_k_tuple_109, 0, ((PyObject *)__pyx_n_s__longdouble));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__longdouble));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_109));
+  __pyx_k_tuple_110 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_110)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_k_tuple_110);
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__c2r));
+  PyTuple_SET_ITEM(__pyx_k_tuple_110, 0, ((PyObject *)__pyx_n_s__c2r));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__c2r));
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__ld));
+  PyTuple_SET_ITEM(__pyx_k_tuple_110, 1, ((PyObject *)__pyx_n_s__ld));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ld));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_110));
+
+  /* "pyfftw/pyfftw.pyx":434
+ * cdef object scheme_directions
+ * scheme_directions = {
+ *         ('c2c', '64'): ['FFTW_FORWARD', 'FFTW_BACKWARD'],             # <<<<<<<<<<<<<<
+ *         ('c2c', '32'): ['FFTW_FORWARD', 'FFTW_BACKWARD'],
+ *         ('c2c', 'ld'): ['FFTW_FORWARD', 'FFTW_BACKWARD'],
+ */
+  __pyx_k_tuple_111 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_111)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_k_tuple_111);
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__c2c));
+  PyTuple_SET_ITEM(__pyx_k_tuple_111, 0, ((PyObject *)__pyx_n_s__c2c));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__c2c));
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s__64));
+  PyTuple_SET_ITEM(__pyx_k_tuple_111, 1, ((PyObject *)__pyx_kp_s__64));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s__64));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_111));
+
+  /* "pyfftw/pyfftw.pyx":435
+ * scheme_directions = {
+ *         ('c2c', '64'): ['FFTW_FORWARD', 'FFTW_BACKWARD'],
+ *         ('c2c', '32'): ['FFTW_FORWARD', 'FFTW_BACKWARD'],             # <<<<<<<<<<<<<<
+ *         ('c2c', 'ld'): ['FFTW_FORWARD', 'FFTW_BACKWARD'],
+ *         ('r2c', '64'): ['FFTW_FORWARD'],
+ */
+  __pyx_k_tuple_112 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_112)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_k_tuple_112);
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__c2c));
+  PyTuple_SET_ITEM(__pyx_k_tuple_112, 0, ((PyObject *)__pyx_n_s__c2c));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__c2c));
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s__32));
+  PyTuple_SET_ITEM(__pyx_k_tuple_112, 1, ((PyObject *)__pyx_kp_s__32));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s__32));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_112));
+
+  /* "pyfftw/pyfftw.pyx":436
+ *         ('c2c', '64'): ['FFTW_FORWARD', 'FFTW_BACKWARD'],
+ *         ('c2c', '32'): ['FFTW_FORWARD', 'FFTW_BACKWARD'],
+ *         ('c2c', 'ld'): ['FFTW_FORWARD', 'FFTW_BACKWARD'],             # <<<<<<<<<<<<<<
+ *         ('r2c', '64'): ['FFTW_FORWARD'],
+ *         ('r2c', '32'): ['FFTW_FORWARD'],
+ */
+  __pyx_k_tuple_113 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_113)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_k_tuple_113);
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__c2c));
+  PyTuple_SET_ITEM(__pyx_k_tuple_113, 0, ((PyObject *)__pyx_n_s__c2c));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__c2c));
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__ld));
+  PyTuple_SET_ITEM(__pyx_k_tuple_113, 1, ((PyObject *)__pyx_n_s__ld));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ld));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_113));
+
+  /* "pyfftw/pyfftw.pyx":437
+ *         ('c2c', '32'): ['FFTW_FORWARD', 'FFTW_BACKWARD'],
+ *         ('c2c', 'ld'): ['FFTW_FORWARD', 'FFTW_BACKWARD'],
+ *         ('r2c', '64'): ['FFTW_FORWARD'],             # <<<<<<<<<<<<<<
+ *         ('r2c', '32'): ['FFTW_FORWARD'],
+ *         ('r2c', 'ld'): ['FFTW_FORWARD'],
+ */
+  __pyx_k_tuple_114 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_114)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_k_tuple_114);
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__r2c));
+  PyTuple_SET_ITEM(__pyx_k_tuple_114, 0, ((PyObject *)__pyx_n_s__r2c));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__r2c));
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s__64));
+  PyTuple_SET_ITEM(__pyx_k_tuple_114, 1, ((PyObject *)__pyx_kp_s__64));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s__64));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_114));
+
+  /* "pyfftw/pyfftw.pyx":438
+ *         ('c2c', 'ld'): ['FFTW_FORWARD', 'FFTW_BACKWARD'],
+ *         ('r2c', '64'): ['FFTW_FORWARD'],
+ *         ('r2c', '32'): ['FFTW_FORWARD'],             # <<<<<<<<<<<<<<
+ *         ('r2c', 'ld'): ['FFTW_FORWARD'],
+ *         ('c2r', '64'): ['FFTW_BACKWARD'],
+ */
+  __pyx_k_tuple_115 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_115)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_k_tuple_115);
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__r2c));
+  PyTuple_SET_ITEM(__pyx_k_tuple_115, 0, ((PyObject *)__pyx_n_s__r2c));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__r2c));
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s__32));
+  PyTuple_SET_ITEM(__pyx_k_tuple_115, 1, ((PyObject *)__pyx_kp_s__32));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s__32));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_115));
+
+  /* "pyfftw/pyfftw.pyx":439
+ *         ('r2c', '64'): ['FFTW_FORWARD'],
+ *         ('r2c', '32'): ['FFTW_FORWARD'],
+ *         ('r2c', 'ld'): ['FFTW_FORWARD'],             # <<<<<<<<<<<<<<
+ *         ('c2r', '64'): ['FFTW_BACKWARD'],
+ *         ('c2r', '32'): ['FFTW_BACKWARD'],
+ */
+  __pyx_k_tuple_116 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_116)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_k_tuple_116);
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__r2c));
+  PyTuple_SET_ITEM(__pyx_k_tuple_116, 0, ((PyObject *)__pyx_n_s__r2c));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__r2c));
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__ld));
+  PyTuple_SET_ITEM(__pyx_k_tuple_116, 1, ((PyObject *)__pyx_n_s__ld));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ld));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_116));
+
+  /* "pyfftw/pyfftw.pyx":440
+ *         ('r2c', '32'): ['FFTW_FORWARD'],
+ *         ('r2c', 'ld'): ['FFTW_FORWARD'],
+ *         ('c2r', '64'): ['FFTW_BACKWARD'],             # <<<<<<<<<<<<<<
+ *         ('c2r', '32'): ['FFTW_BACKWARD'],
+ *         ('c2r', 'ld'): ['FFTW_BACKWARD']}
+ */
+  __pyx_k_tuple_117 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_117)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_k_tuple_117);
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__c2r));
+  PyTuple_SET_ITEM(__pyx_k_tuple_117, 0, ((PyObject *)__pyx_n_s__c2r));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__c2r));
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s__64));
+  PyTuple_SET_ITEM(__pyx_k_tuple_117, 1, ((PyObject *)__pyx_kp_s__64));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s__64));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_117));
+
+  /* "pyfftw/pyfftw.pyx":441
+ *         ('r2c', 'ld'): ['FFTW_FORWARD'],
+ *         ('c2r', '64'): ['FFTW_BACKWARD'],
+ *         ('c2r', '32'): ['FFTW_BACKWARD'],             # <<<<<<<<<<<<<<
+ *         ('c2r', 'ld'): ['FFTW_BACKWARD']}
+ * 
+ */
+  __pyx_k_tuple_118 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_118)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_k_tuple_118);
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__c2r));
+  PyTuple_SET_ITEM(__pyx_k_tuple_118, 0, ((PyObject *)__pyx_n_s__c2r));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__c2r));
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s__32));
+  PyTuple_SET_ITEM(__pyx_k_tuple_118, 1, ((PyObject *)__pyx_kp_s__32));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s__32));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_118));
+
+  /* "pyfftw/pyfftw.pyx":442
+ *         ('c2r', '64'): ['FFTW_BACKWARD'],
+ *         ('c2r', '32'): ['FFTW_BACKWARD'],
+ *         ('c2r', 'ld'): ['FFTW_BACKWARD']}             # <<<<<<<<<<<<<<
+ * 
+ * # In the following, -1 denotes using the default. A segfault has been
+ */
+  __pyx_k_tuple_119 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_119)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 442; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_k_tuple_119);
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__c2r));
+  PyTuple_SET_ITEM(__pyx_k_tuple_119, 0, ((PyObject *)__pyx_n_s__c2r));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__c2r));
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__ld));
+  PyTuple_SET_ITEM(__pyx_k_tuple_119, 1, ((PyObject *)__pyx_n_s__ld));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ld));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_119));
+
+  /* "pyfftw/pyfftw.pyx":450
+ * cdef object scheme_functions
+ * scheme_functions = {
+ *     ('c2c', '64'): {'planner': 0, 'executor':0, 'generic_precision':0,             # <<<<<<<<<<<<<<
+ *         'validator': -1, 'fft_shape_lookup': -1},
+ *     ('c2c', '32'): {'planner':1, 'executor':1, 'generic_precision':1,
+ */
+  __pyx_k_tuple_120 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_120)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_k_tuple_120);
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__c2c));
+  PyTuple_SET_ITEM(__pyx_k_tuple_120, 0, ((PyObject *)__pyx_n_s__c2c));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__c2c));
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s__64));
+  PyTuple_SET_ITEM(__pyx_k_tuple_120, 1, ((PyObject *)__pyx_kp_s__64));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s__64));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_120));
+
+  /* "pyfftw/pyfftw.pyx":452
+ *     ('c2c', '64'): {'planner': 0, 'executor':0, 'generic_precision':0,
+ *         'validator': -1, 'fft_shape_lookup': -1},
+ *     ('c2c', '32'): {'planner':1, 'executor':1, 'generic_precision':1,             # <<<<<<<<<<<<<<
+ *         'validator': -1, 'fft_shape_lookup': -1},
+ *     ('c2c', 'ld'): {'planner':2, 'executor':2, 'generic_precision':2,
+ */
+  __pyx_k_tuple_121 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_121)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_k_tuple_121);
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__c2c));
+  PyTuple_SET_ITEM(__pyx_k_tuple_121, 0, ((PyObject *)__pyx_n_s__c2c));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__c2c));
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s__32));
+  PyTuple_SET_ITEM(__pyx_k_tuple_121, 1, ((PyObject *)__pyx_kp_s__32));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s__32));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_121));
+
+  /* "pyfftw/pyfftw.pyx":454
+ *     ('c2c', '32'): {'planner':1, 'executor':1, 'generic_precision':1,
+ *         'validator': -1, 'fft_shape_lookup': -1},
+ *     ('c2c', 'ld'): {'planner':2, 'executor':2, 'generic_precision':2,             # <<<<<<<<<<<<<<
+ *         'validator': -1, 'fft_shape_lookup': -1},
+ *     ('r2c', '64'): {'planner':3, 'executor':3, 'generic_precision':0,
+ */
+  __pyx_k_tuple_122 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_122)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_k_tuple_122);
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__c2c));
+  PyTuple_SET_ITEM(__pyx_k_tuple_122, 0, ((PyObject *)__pyx_n_s__c2c));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__c2c));
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__ld));
+  PyTuple_SET_ITEM(__pyx_k_tuple_122, 1, ((PyObject *)__pyx_n_s__ld));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ld));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_122));
+
+  /* "pyfftw/pyfftw.pyx":456
+ *     ('c2c', 'ld'): {'planner':2, 'executor':2, 'generic_precision':2,
+ *         'validator': -1, 'fft_shape_lookup': -1},
+ *     ('r2c', '64'): {'planner':3, 'executor':3, 'generic_precision':0,             # <<<<<<<<<<<<<<
+ *         'validator': 0,
+ *         'fft_shape_lookup': _lookup_shape_r2c_arrays},
+ */
+  __pyx_k_tuple_123 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_123)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_k_tuple_123);
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__r2c));
+  PyTuple_SET_ITEM(__pyx_k_tuple_123, 0, ((PyObject *)__pyx_n_s__r2c));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__r2c));
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s__64));
+  PyTuple_SET_ITEM(__pyx_k_tuple_123, 1, ((PyObject *)__pyx_kp_s__64));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s__64));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_123));
+
+  /* "pyfftw/pyfftw.pyx":459
+ *         'validator': 0,
+ *         'fft_shape_lookup': _lookup_shape_r2c_arrays},
+ *     ('r2c', '32'): {'planner':4, 'executor':4, 'generic_precision':1,             # <<<<<<<<<<<<<<
+ *         'validator': 0,
+ *         'fft_shape_lookup': _lookup_shape_r2c_arrays},
+ */
+  __pyx_k_tuple_124 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_124)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 459; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_k_tuple_124);
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__r2c));
+  PyTuple_SET_ITEM(__pyx_k_tuple_124, 0, ((PyObject *)__pyx_n_s__r2c));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__r2c));
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s__32));
+  PyTuple_SET_ITEM(__pyx_k_tuple_124, 1, ((PyObject *)__pyx_kp_s__32));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s__32));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_124));
+
+  /* "pyfftw/pyfftw.pyx":462
+ *         'validator': 0,
+ *         'fft_shape_lookup': _lookup_shape_r2c_arrays},
+ *     ('r2c', 'ld'): {'planner':5, 'executor':5, 'generic_precision':2,             # <<<<<<<<<<<<<<
+ *         'validator': 0,
+ *         'fft_shape_lookup': _lookup_shape_r2c_arrays},
+ */
+  __pyx_k_tuple_125 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_125)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_k_tuple_125);
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__r2c));
+  PyTuple_SET_ITEM(__pyx_k_tuple_125, 0, ((PyObject *)__pyx_n_s__r2c));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__r2c));
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__ld));
+  PyTuple_SET_ITEM(__pyx_k_tuple_125, 1, ((PyObject *)__pyx_n_s__ld));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ld));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_125));
+
+  /* "pyfftw/pyfftw.pyx":465
+ *         'validator': 0,
+ *         'fft_shape_lookup': _lookup_shape_r2c_arrays},
+ *     ('c2r', '64'): {'planner':6, 'executor':6, 'generic_precision':0,             # <<<<<<<<<<<<<<
+ *         'validator': 1,
+ *         'fft_shape_lookup': _lookup_shape_c2r_arrays},
+ */
+  __pyx_k_tuple_126 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_126)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 465; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_k_tuple_126);
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__c2r));
+  PyTuple_SET_ITEM(__pyx_k_tuple_126, 0, ((PyObject *)__pyx_n_s__c2r));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__c2r));
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s__64));
+  PyTuple_SET_ITEM(__pyx_k_tuple_126, 1, ((PyObject *)__pyx_kp_s__64));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s__64));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_126));
+
+  /* "pyfftw/pyfftw.pyx":468
+ *         'validator': 1,
+ *         'fft_shape_lookup': _lookup_shape_c2r_arrays},
+ *     ('c2r', '32'): {'planner':7, 'executor':7, 'generic_precision':1,             # <<<<<<<<<<<<<<
+ *         'validator': 1,
+ *         'fft_shape_lookup': _lookup_shape_c2r_arrays},
+ */
+  __pyx_k_tuple_127 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_127)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_k_tuple_127);
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__c2r));
+  PyTuple_SET_ITEM(__pyx_k_tuple_127, 0, ((PyObject *)__pyx_n_s__c2r));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__c2r));
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s__32));
+  PyTuple_SET_ITEM(__pyx_k_tuple_127, 1, ((PyObject *)__pyx_kp_s__32));
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s__32));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_127));
+
+  /* "pyfftw/pyfftw.pyx":471
+ *         'validator': 1,
+ *         'fft_shape_lookup': _lookup_shape_c2r_arrays},
+ *     ('c2r', 'ld'): {'planner':8, 'executor':8, 'generic_precision':2,             # <<<<<<<<<<<<<<
+ *         'validator': 1,
+ *         'fft_shape_lookup': _lookup_shape_c2r_arrays}}
+ */
+  __pyx_k_tuple_128 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_128)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_k_tuple_128);
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__c2r));
+  PyTuple_SET_ITEM(__pyx_k_tuple_128, 0, ((PyObject *)__pyx_n_s__c2r));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__c2r));
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__ld));
+  PyTuple_SET_ITEM(__pyx_k_tuple_128, 1, ((PyObject *)__pyx_n_s__ld));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ld));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_128));
+
+  /* "pyfftw/pyfftw.pyx":1458
+ * 
+ * 
+ * def export_wisdom():             # <<<<<<<<<<<<<<
+ *     '''export_wisdom()
+ * 
+ */
+  __pyx_k_tuple_131 = PyTuple_New(12); if (unlikely(!__pyx_k_tuple_131)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1458; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_k_tuple_131);
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__py_wisdom));
+  PyTuple_SET_ITEM(__pyx_k_tuple_131, 0, ((PyObject *)__pyx_n_s__py_wisdom));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__py_wisdom));
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__py_wisdomf));
+  PyTuple_SET_ITEM(__pyx_k_tuple_131, 1, ((PyObject *)__pyx_n_s__py_wisdomf));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__py_wisdomf));
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__py_wisdoml));
+  PyTuple_SET_ITEM(__pyx_k_tuple_131, 2, ((PyObject *)__pyx_n_s__py_wisdoml));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__py_wisdoml));
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__counter));
+  PyTuple_SET_ITEM(__pyx_k_tuple_131, 3, ((PyObject *)__pyx_n_s__counter));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__counter));
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__counterf));
+  PyTuple_SET_ITEM(__pyx_k_tuple_131, 4, ((PyObject *)__pyx_n_s__counterf));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__counterf));
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__counterl));
+  PyTuple_SET_ITEM(__pyx_k_tuple_131, 5, ((PyObject *)__pyx_n_s__counterl));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__counterl));
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__c_wisdom));
+  PyTuple_SET_ITEM(__pyx_k_tuple_131, 6, ((PyObject *)__pyx_n_s__c_wisdom));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__c_wisdom));
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__c_wisdomf));
+  PyTuple_SET_ITEM(__pyx_k_tuple_131, 7, ((PyObject *)__pyx_n_s__c_wisdomf));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__c_wisdomf));
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__c_wisdoml));
+  PyTuple_SET_ITEM(__pyx_k_tuple_131, 8, ((PyObject *)__pyx_n_s__c_wisdoml));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__c_wisdoml));
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__c_wisdom_ptr));
+  PyTuple_SET_ITEM(__pyx_k_tuple_131, 9, ((PyObject *)__pyx_n_s__c_wisdom_ptr));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__c_wisdom_ptr));
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__c_wisdomf_ptr));
+  PyTuple_SET_ITEM(__pyx_k_tuple_131, 10, ((PyObject *)__pyx_n_s__c_wisdomf_ptr));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__c_wisdomf_ptr));
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__c_wisdoml_ptr));
+  PyTuple_SET_ITEM(__pyx_k_tuple_131, 11, ((PyObject *)__pyx_n_s__c_wisdoml_ptr));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__c_wisdoml_ptr));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_131));
+  __pyx_k_codeobj_132 = (PyObject*)__Pyx_PyCode_New(0, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_131, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_77, __pyx_n_s__export_wisdom, 1458, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_132)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1458; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "pyfftw/pyfftw.pyx":1517
+ *     return (py_wisdom, py_wisdomf, py_wisdoml)
+ * 
+ * def import_wisdom(wisdom):             # <<<<<<<<<<<<<<
+ *     '''import_wisdom(wisdom)
+ * 
+ */
+  __pyx_k_tuple_133 = PyTuple_New(7); if (unlikely(!__pyx_k_tuple_133)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_k_tuple_133);
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__wisdom));
+  PyTuple_SET_ITEM(__pyx_k_tuple_133, 0, ((PyObject *)__pyx_n_s__wisdom));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__wisdom));
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__c_wisdom));
+  PyTuple_SET_ITEM(__pyx_k_tuple_133, 1, ((PyObject *)__pyx_n_s__c_wisdom));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__c_wisdom));
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__c_wisdomf));
+  PyTuple_SET_ITEM(__pyx_k_tuple_133, 2, ((PyObject *)__pyx_n_s__c_wisdomf));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__c_wisdomf));
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__c_wisdoml));
+  PyTuple_SET_ITEM(__pyx_k_tuple_133, 3, ((PyObject *)__pyx_n_s__c_wisdoml));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__c_wisdoml));
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__success));
+  PyTuple_SET_ITEM(__pyx_k_tuple_133, 4, ((PyObject *)__pyx_n_s__success));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__success));
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__successf));
+  PyTuple_SET_ITEM(__pyx_k_tuple_133, 5, ((PyObject *)__pyx_n_s__successf));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__successf));
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__successl));
+  PyTuple_SET_ITEM(__pyx_k_tuple_133, 6, ((PyObject *)__pyx_n_s__successl));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__successl));
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_133));
+  __pyx_k_codeobj_134 = (PyObject*)__Pyx_PyCode_New(1, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_133, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_77, __pyx_n_s__import_wisdom, 1517, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_134)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "pyfftw/pyfftw.pyx":1633
+ * #    return (success, successf, successl)
+ * 
+ * def forget_wisdom():             # <<<<<<<<<<<<<<
+ *     '''forget_wisdom()
+ * 
+ */
+  __pyx_k_codeobj_135 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_77, __pyx_n_s__forget_wisdom, 1633, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_135)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1633; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_RefNannyFinishContext();
+  return 0;
+  __pyx_L1_error:;
+  __Pyx_RefNannyFinishContext();
+  return -1;
+}
+
+static int __Pyx_InitGlobals(void) {
+  if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __pyx_int_4 = PyInt_FromLong(4); if (unlikely(!__pyx_int_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __pyx_int_5 = PyInt_FromLong(5); if (unlikely(!__pyx_int_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __pyx_int_6 = PyInt_FromLong(6); if (unlikely(!__pyx_int_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __pyx_int_7 = PyInt_FromLong(7); if (unlikely(!__pyx_int_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __pyx_int_8 = PyInt_FromLong(8); if (unlikely(!__pyx_int_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __pyx_int_15 = PyInt_FromLong(15); if (unlikely(!__pyx_int_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __pyx_int_16 = PyInt_FromLong(16); if (unlikely(!__pyx_int_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __pyx_int_32 = PyInt_FromLong(32); if (unlikely(!__pyx_int_32)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  return 0;
+  __pyx_L1_error:;
+  return -1;
+}
+
+#if PY_MAJOR_VERSION < 3
+PyMODINIT_FUNC initpyfftw(void); /*proto*/
+PyMODINIT_FUNC initpyfftw(void)
+#else
+PyMODINIT_FUNC PyInit_pyfftw(void); /*proto*/
+PyMODINIT_FUNC PyInit_pyfftw(void)
+#endif
+{
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  PyObject *__pyx_t_4 = NULL;
+  int __pyx_t_5;
+  PyObject *__pyx_t_6 = NULL;
+  __Pyx_RefNannyDeclarations
+  #if CYTHON_REFNANNY
+  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
+  if (!__Pyx_RefNanny) {
+      PyErr_Clear();
+      __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
+      if (!__Pyx_RefNanny)
+          Py_FatalError("failed to import 'refnanny' module");
+  }
+  #endif
+  __Pyx_RefNannySetupContext("PyMODINIT_FUNC PyInit_pyfftw(void)", 0);
+  if ( __Pyx_check_binary_version() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  #ifdef __Pyx_CyFunction_USED
+  if (__Pyx_CyFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  #endif
+  #ifdef __Pyx_FusedFunction_USED
+  if (__pyx_FusedFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  #endif
+  #ifdef __Pyx_Generator_USED
+  if (__pyx_Generator_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  #endif
+  /*--- Library function declarations ---*/
+  /*--- Threads initialization code ---*/
+  #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
+  #ifdef WITH_THREAD /* Python build with threading support? */
+  PyEval_InitThreads();
+  #endif
+  #endif
+  /*--- Module creation code ---*/
+  #if PY_MAJOR_VERSION < 3
+  __pyx_m = Py_InitModule4(__Pyx_NAMESTR("pyfftw"), __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
+  #else
+  __pyx_m = PyModule_Create(&__pyx_moduledef);
+  #endif
+  if (unlikely(!__pyx_m)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  #if PY_MAJOR_VERSION >= 3
+  {
+    PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (!PyDict_GetItemString(modules, "pyfftw.pyfftw")) {
+      if (unlikely(PyDict_SetItemString(modules, "pyfftw.pyfftw", __pyx_m) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+  }
+  #endif
+  __pyx_b = PyImport_AddModule(__Pyx_NAMESTR(__Pyx_BUILTIN_MODULE_NAME)); if (unlikely(!__pyx_b)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  #if CYTHON_COMPILING_IN_PYPY
+  Py_INCREF(__pyx_b);
+  #endif
+  if (__Pyx_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  /*--- Initialize various global constants etc. ---*/
+  if (unlikely(__Pyx_InitGlobals() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_module_is_main_pyfftw__pyfftw) {
+    if (__Pyx_SetAttrString(__pyx_m, "__name__", __pyx_n_s____main__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  }
+  /*--- Builtin init code ---*/
+  if (unlikely(__Pyx_InitCachedBuiltins() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  /*--- Constants init code ---*/
+  if (unlikely(__Pyx_InitCachedConstants() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  /*--- Global init code ---*/
+  __pyx_v_6pyfftw_6pyfftw_directions = Py_None; Py_INCREF(Py_None);
+  __pyx_v_6pyfftw_6pyfftw_flag_dict = Py_None; Py_INCREF(Py_None);
+  __pyx_v_6pyfftw_6pyfftw_fftw_schemes = Py_None; Py_INCREF(Py_None);
+  __pyx_v_6pyfftw_6pyfftw_scheme_directions = Py_None; Py_INCREF(Py_None);
+  __pyx_v_6pyfftw_6pyfftw_scheme_functions = Py_None; Py_INCREF(Py_None);
+  /*--- Variable export code ---*/
+  /*--- Function export code ---*/
+  /*--- Type init code ---*/
+  __pyx_vtabptr_6pyfftw_6pyfftw_FFTW = &__pyx_vtable_6pyfftw_6pyfftw_FFTW;
+  __pyx_vtable_6pyfftw_6pyfftw_FFTW.update_arrays = (PyObject *(*)(struct __pyx_obj_6pyfftw_6pyfftw_FFTW *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_6pyfftw_6pyfftw_4FFTW_update_arrays;
+  __pyx_vtable_6pyfftw_6pyfftw_FFTW._update_arrays = (PyObject *(*)(struct __pyx_obj_6pyfftw_6pyfftw_FFTW *, PyArrayObject *, PyArrayObject *))__pyx_f_6pyfftw_6pyfftw_4FFTW__update_arrays;
+  __pyx_vtable_6pyfftw_6pyfftw_FFTW.execute = (PyObject *(*)(struct __pyx_obj_6pyfftw_6pyfftw_FFTW *, int __pyx_skip_dispatch))__pyx_f_6pyfftw_6pyfftw_4FFTW_execute;
+  if (PyType_Ready(&__pyx_type_6pyfftw_6pyfftw_FFTW) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 568; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  #if CYTHON_COMPILING_IN_CPYTHON
+  {
+    PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_6pyfftw_6pyfftw_FFTW, "__init__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 568; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
+      __pyx_wrapperbase_6pyfftw_6pyfftw_4FFTW_12__init__ = *((PyWrapperDescrObject *)wrapper)->d_base;
+      __pyx_wrapperbase_6pyfftw_6pyfftw_4FFTW_12__init__.doc = __pyx_doc_6pyfftw_6pyfftw_4FFTW_12__init__;
+      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_6pyfftw_6pyfftw_4FFTW_12__init__;
+    }
+  }
+  #endif
+  #if CYTHON_COMPILING_IN_CPYTHON
+  {
+    PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_6pyfftw_6pyfftw_FFTW, "__call__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 568; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
+      __pyx_wrapperbase_6pyfftw_6pyfftw_4FFTW_16__call__ = *((PyWrapperDescrObject *)wrapper)->d_base;
+      __pyx_wrapperbase_6pyfftw_6pyfftw_4FFTW_16__call__.doc = __pyx_doc_6pyfftw_6pyfftw_4FFTW_16__call__;
+      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_6pyfftw_6pyfftw_4FFTW_16__call__;
+    }
+  }
+  #endif
+  if (__Pyx_SetVtable(__pyx_type_6pyfftw_6pyfftw_FFTW.tp_dict, __pyx_vtabptr_6pyfftw_6pyfftw_FFTW) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 568; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__Pyx_SetAttrString(__pyx_m, "FFTW", (PyObject *)&__pyx_type_6pyfftw_6pyfftw_FFTW) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 568; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_ptype_6pyfftw_6pyfftw_FFTW = &__pyx_type_6pyfftw_6pyfftw_FFTW;
+  /*--- Type import code ---*/
+  __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "type", 
+  #if CYTHON_COMPILING_IN_PYPY
+  sizeof(PyTypeObject),
+  #else
+  sizeof(PyHeapTypeObject),
+  #endif
+  0); if (unlikely(!__pyx_ptype_7cpython_4type_type)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_ptype_5numpy_dtype = __Pyx_ImportType("numpy", "dtype", sizeof(PyArray_Descr), 0); if (unlikely(!__pyx_ptype_5numpy_dtype)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_ptype_5numpy_flatiter = __Pyx_ImportType("numpy", "flatiter", sizeof(PyArrayIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_flatiter)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_ptype_5numpy_broadcast = __Pyx_ImportType("numpy", "broadcast", sizeof(PyArrayMultiIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_broadcast)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_ptype_5numpy_ndarray = __Pyx_ImportType("numpy", "ndarray", sizeof(PyArrayObject), 0); if (unlikely(!__pyx_ptype_5numpy_ndarray)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_ptype_5numpy_ufunc = __Pyx_ImportType("numpy", "ufunc", sizeof(PyUFuncObject), 0); if (unlikely(!__pyx_ptype_5numpy_ufunc)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 861; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  /*--- Variable import code ---*/
+  /*--- Function import code ---*/
+  /*--- Execution code ---*/
+
+  /* "pyfftw/pyfftw.pyx":19
+ * # along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ * 
+ * import numpy as np             # <<<<<<<<<<<<<<
+ * cimport numpy as np
+ * from libc.stdlib cimport calloc, malloc, free
+ */
+  __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__numpy), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__np, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "/home/whg21/Projects/github/pyFFTW/pyfftw/utils.pxi":24
+ * 
+ * 
+ * cdef int _simd_alignment = cpu.simd_alignment()             # <<<<<<<<<<<<<<
+ * 
+ * #: The optimum SIMD alignment in bytes, found by inspecting the CPU.
+ */
+  __pyx_v_6pyfftw_6pyfftw__simd_alignment = simd_alignment();
+
+  /* "/home/whg21/Projects/github/pyFFTW/pyfftw/utils.pxi":27
+ * 
+ * #: The optimum SIMD alignment in bytes, found by inspecting the CPU.
+ * simd_alignment = _simd_alignment             # <<<<<<<<<<<<<<
+ * 
+ * #: A tuple of simd alignments that make sense for this cpu
+ */
+  __pyx_t_1 = PyInt_FromLong(__pyx_v_6pyfftw_6pyfftw__simd_alignment); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__simd_alignment, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "/home/whg21/Projects/github/pyFFTW/pyfftw/utils.pxi":33
+ *     _valid_simd_alignments = (16,)
+ * 
+ * elif _simd_alignment == 32:             # <<<<<<<<<<<<<<
+ *     _valid_simd_alignments = (16, 32)
+ * 
+ */
+  switch (__pyx_v_6pyfftw_6pyfftw__simd_alignment) {
+
+    /* "/home/whg21/Projects/github/pyFFTW/pyfftw/utils.pxi":30
+ * 
+ * #: A tuple of simd alignments that make sense for this cpu
+ * if _simd_alignment == 16:             # <<<<<<<<<<<<<<
+ *     _valid_simd_alignments = (16,)
+ * 
+ */
+    case 16:
+
+    /* "/home/whg21/Projects/github/pyFFTW/pyfftw/utils.pxi":31
+ * #: A tuple of simd alignments that make sense for this cpu
+ * if _simd_alignment == 16:
+ *     _valid_simd_alignments = (16,)             # <<<<<<<<<<<<<<
+ * 
+ * elif _simd_alignment == 32:
+ */
+    if (PyObject_SetAttr(__pyx_m, __pyx_n_s_15, ((PyObject *)__pyx_k_tuple_72)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    break;
+
+    /* "/home/whg21/Projects/github/pyFFTW/pyfftw/utils.pxi":33
+ *     _valid_simd_alignments = (16,)
+ * 
+ * elif _simd_alignment == 32:             # <<<<<<<<<<<<<<
+ *     _valid_simd_alignments = (16, 32)
+ * 
+ */
+    case 32:
+
+    /* "/home/whg21/Projects/github/pyFFTW/pyfftw/utils.pxi":34
+ * 
+ * elif _simd_alignment == 32:
+ *     _valid_simd_alignments = (16, 32)             # <<<<<<<<<<<<<<
+ * 
+ * else:
+ */
+    if (PyObject_SetAttr(__pyx_m, __pyx_n_s_15, ((PyObject *)__pyx_k_tuple_73)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    break;
+    default:
+
+    /* "/home/whg21/Projects/github/pyFFTW/pyfftw/utils.pxi":37
+ * 
+ * else:
+ *     _valid_simd_alignments = ()             # <<<<<<<<<<<<<<
+ * 
+ * cpdef n_byte_align_empty(shape, n, dtype='float64', order='C'):
+ */
+    if (PyObject_SetAttr(__pyx_m, __pyx_n_s_15, ((PyObject *)__pyx_empty_tuple)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    break;
+  }
+
+  /* "pyfftw/pyfftw.pyx":31
+ * 
+ * cdef object directions
+ * directions = {'FFTW_FORWARD': FFTW_FORWARD,             # <<<<<<<<<<<<<<
+ *         'FFTW_BACKWARD': FFTW_BACKWARD}
+ * 
+ */
+  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
+  __pyx_t_2 = PyInt_FromLong(__pyx_e_6pyfftw_6pyfftw_FFTW_FORWARD); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__FFTW_FORWARD), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+  /* "pyfftw/pyfftw.pyx":32
+ * cdef object directions
+ * directions = {'FFTW_FORWARD': FFTW_FORWARD,
+ *         'FFTW_BACKWARD': FFTW_BACKWARD}             # <<<<<<<<<<<<<<
+ * 
+ * cdef object flag_dict
+ */
+  __pyx_t_2 = PyInt_FromLong(__pyx_e_6pyfftw_6pyfftw_FFTW_BACKWARD); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__FFTW_BACKWARD), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __Pyx_XGOTREF(__pyx_v_6pyfftw_6pyfftw_directions);
+  __Pyx_DECREF(__pyx_v_6pyfftw_6pyfftw_directions);
+  __Pyx_GIVEREF(((PyObject *)__pyx_t_1));
+  __pyx_v_6pyfftw_6pyfftw_directions = ((PyObject *)__pyx_t_1);
+  __pyx_t_1 = 0;
+
+  /* "pyfftw/pyfftw.pyx":35
+ * 
+ * cdef object flag_dict
+ * flag_dict = {'FFTW_MEASURE': FFTW_MEASURE,             # <<<<<<<<<<<<<<
+ *         'FFTW_EXHAUSTIVE': FFTW_EXHAUSTIVE,
+ *         'FFTW_PATIENT': FFTW_PATIENT,
+ */
+  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
+  __pyx_t_2 = PyInt_FromLong(__pyx_e_6pyfftw_6pyfftw_FFTW_MEASURE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__FFTW_MEASURE), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+  /* "pyfftw/pyfftw.pyx":36
+ * cdef object flag_dict
+ * flag_dict = {'FFTW_MEASURE': FFTW_MEASURE,
+ *         'FFTW_EXHAUSTIVE': FFTW_EXHAUSTIVE,             # <<<<<<<<<<<<<<
+ *         'FFTW_PATIENT': FFTW_PATIENT,
+ *         'FFTW_ESTIMATE': FFTW_ESTIMATE,
+ */
+  __pyx_t_2 = PyInt_FromLong(__pyx_e_6pyfftw_6pyfftw_FFTW_EXHAUSTIVE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__FFTW_EXHAUSTIVE), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+  /* "pyfftw/pyfftw.pyx":37
+ * flag_dict = {'FFTW_MEASURE': FFTW_MEASURE,
+ *         'FFTW_EXHAUSTIVE': FFTW_EXHAUSTIVE,
+ *         'FFTW_PATIENT': FFTW_PATIENT,             # <<<<<<<<<<<<<<
+ *         'FFTW_ESTIMATE': FFTW_ESTIMATE,
+ *         'FFTW_UNALIGNED': FFTW_UNALIGNED,
+ */
+  __pyx_t_2 = PyInt_FromLong(__pyx_e_6pyfftw_6pyfftw_FFTW_PATIENT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__FFTW_PATIENT), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+  /* "pyfftw/pyfftw.pyx":38
+ *         'FFTW_EXHAUSTIVE': FFTW_EXHAUSTIVE,
+ *         'FFTW_PATIENT': FFTW_PATIENT,
+ *         'FFTW_ESTIMATE': FFTW_ESTIMATE,             # <<<<<<<<<<<<<<
+ *         'FFTW_UNALIGNED': FFTW_UNALIGNED,
+ *         'FFTW_DESTROY_INPUT': FFTW_DESTROY_INPUT}
+ */
+  __pyx_t_2 = PyInt_FromLong(__pyx_e_6pyfftw_6pyfftw_FFTW_ESTIMATE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__FFTW_ESTIMATE), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+  /* "pyfftw/pyfftw.pyx":39
+ *         'FFTW_PATIENT': FFTW_PATIENT,
+ *         'FFTW_ESTIMATE': FFTW_ESTIMATE,
+ *         'FFTW_UNALIGNED': FFTW_UNALIGNED,             # <<<<<<<<<<<<<<
+ *         'FFTW_DESTROY_INPUT': FFTW_DESTROY_INPUT}
+ * 
+ */
+  __pyx_t_2 = PyInt_FromLong(__pyx_e_6pyfftw_6pyfftw_FFTW_UNALIGNED); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__FFTW_UNALIGNED), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+  /* "pyfftw/pyfftw.pyx":40
+ *         'FFTW_ESTIMATE': FFTW_ESTIMATE,
+ *         'FFTW_UNALIGNED': FFTW_UNALIGNED,
+ *         'FFTW_DESTROY_INPUT': FFTW_DESTROY_INPUT}             # <<<<<<<<<<<<<<
+ * 
+ * _flag_dict = flag_dict.copy()
+ */
+  __pyx_t_2 = PyInt_FromLong(__pyx_e_6pyfftw_6pyfftw_FFTW_DESTROY_INPUT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__FFTW_DESTROY_INPUT), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __Pyx_XGOTREF(__pyx_v_6pyfftw_6pyfftw_flag_dict);
+  __Pyx_DECREF(__pyx_v_6pyfftw_6pyfftw_flag_dict);
+  __Pyx_GIVEREF(((PyObject *)__pyx_t_1));
+  __pyx_v_6pyfftw_6pyfftw_flag_dict = ((PyObject *)__pyx_t_1);
+  __pyx_t_1 = 0;
+
+  /* "pyfftw/pyfftw.pyx":42
+ *         'FFTW_DESTROY_INPUT': FFTW_DESTROY_INPUT}
+ * 
+ * _flag_dict = flag_dict.copy()             # <<<<<<<<<<<<<<
+ * 
+ * # Function wrappers
+ */
+  __pyx_t_1 = PyObject_GetAttr(__pyx_v_6pyfftw_6pyfftw_flag_dict, __pyx_n_s__copy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  if (PyObject_SetAttr(__pyx_m, __pyx_n_s___flag_dict, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+  /* "pyfftw/pyfftw.pyx":380
+ * # Shape lookup functions
+ * # ======================
+ * def _lookup_shape_r2c_arrays(input_array, output_array):             # <<<<<<<<<<<<<<
+ *     return input_array.shape
+ * 
+ */
+  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pyfftw_6pyfftw_7_lookup_shape_r2c_arrays, NULL, __pyx_n_s_78); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_76, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+  /* "pyfftw/pyfftw.pyx":383
+ *     return input_array.shape
+ * 
+ * def _lookup_shape_c2r_arrays(input_array, output_array):             # <<<<<<<<<<<<<<
+ *     return output_array.shape
+ * 
+ */
+  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pyfftw_6pyfftw_9_lookup_shape_c2r_arrays, NULL, __pyx_n_s_78); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_81, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+  /* "pyfftw/pyfftw.pyx":417
+ * 
+ * cdef object fftw_schemes
+ * fftw_schemes = {             # <<<<<<<<<<<<<<
+ *         (np.dtype('complex128'), np.dtype('complex128')): ('c2c', '64'),
+ *         (np.dtype('complex64'), np.dtype('complex64')): ('c2c', '32'),
+ */
+  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
+
+  /* "pyfftw/pyfftw.pyx":418
+ * cdef object fftw_schemes
+ * fftw_schemes = {
+ *         (np.dtype('complex128'), np.dtype('complex128')): ('c2c', '64'),             # <<<<<<<<<<<<<<
+ *         (np.dtype('complex64'), np.dtype('complex64')): ('c2c', '32'),
+ *         (np.dtype('float64'), np.dtype('complex128')): ('r2c', '64'),
+ */
+  __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5numpy_dtype)), ((PyObject *)__pyx_k_tuple_82), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 418; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5numpy_dtype)), ((PyObject *)__pyx_k_tuple_83), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 418; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 418; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
+  __Pyx_GIVEREF(__pyx_t_1);
+  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
+  __Pyx_GIVEREF(__pyx_t_3);
+  __pyx_t_1 = 0;
+  __pyx_t_3 = 0;
+  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_k_tuple_84)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
+
+  /* "pyfftw/pyfftw.pyx":419
+ * fftw_schemes = {
+ *         (np.dtype('complex128'), np.dtype('complex128')): ('c2c', '64'),
+ *         (np.dtype('complex64'), np.dtype('complex64')): ('c2c', '32'),             # <<<<<<<<<<<<<<
+ *         (np.dtype('float64'), np.dtype('complex128')): ('r2c', '64'),
+ *         (np.dtype('float32'), np.dtype('complex64')): ('r2c', '32'),
+ */
+  __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5numpy_dtype)), ((PyObject *)__pyx_k_tuple_85), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5numpy_dtype)), ((PyObject *)__pyx_k_tuple_86), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4);
+  __Pyx_GIVEREF(__pyx_t_4);
+  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3);
+  __Pyx_GIVEREF(__pyx_t_3);
+  __pyx_t_4 = 0;
+  __pyx_t_3 = 0;
+  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_t_1), ((PyObject *)__pyx_k_tuple_87)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
+
+  /* "pyfftw/pyfftw.pyx":420
+ *         (np.dtype('complex128'), np.dtype('complex128')): ('c2c', '64'),
+ *         (np.dtype('complex64'), np.dtype('complex64')): ('c2c', '32'),
+ *         (np.dtype('float64'), np.dtype('complex128')): ('r2c', '64'),             # <<<<<<<<<<<<<<
+ *         (np.dtype('float32'), np.dtype('complex64')): ('r2c', '32'),
+ *         (np.dtype('complex128'), np.dtype('float64')): ('c2r', '64'),
+ */
+  __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5numpy_dtype)), ((PyObject *)__pyx_k_tuple_88), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5numpy_dtype)), ((PyObject *)__pyx_k_tuple_89), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
+  __Pyx_GIVEREF(__pyx_t_1);
+  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
+  __Pyx_GIVEREF(__pyx_t_3);
+  __pyx_t_1 = 0;
+  __pyx_t_3 = 0;
+  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_k_tuple_90)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
+
+  /* "pyfftw/pyfftw.pyx":421
+ *         (np.dtype('complex64'), np.dtype('complex64')): ('c2c', '32'),
+ *         (np.dtype('float64'), np.dtype('complex128')): ('r2c', '64'),
+ *         (np.dtype('float32'), np.dtype('complex64')): ('r2c', '32'),             # <<<<<<<<<<<<<<
+ *         (np.dtype('complex128'), np.dtype('float64')): ('c2r', '64'),
+ *         (np.dtype('complex64'), np.dtype('float32')): ('c2r', '32')}
+ */
+  __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5numpy_dtype)), ((PyObject *)__pyx_k_tuple_91), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5numpy_dtype)), ((PyObject *)__pyx_k_tuple_92), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4);
+  __Pyx_GIVEREF(__pyx_t_4);
+  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3);
+  __Pyx_GIVEREF(__pyx_t_3);
+  __pyx_t_4 = 0;
+  __pyx_t_3 = 0;
+  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_t_1), ((PyObject *)__pyx_k_tuple_93)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
+
+  /* "pyfftw/pyfftw.pyx":422
+ *         (np.dtype('float64'), np.dtype('complex128')): ('r2c', '64'),
+ *         (np.dtype('float32'), np.dtype('complex64')): ('r2c', '32'),
+ *         (np.dtype('complex128'), np.dtype('float64')): ('c2r', '64'),             # <<<<<<<<<<<<<<
+ *         (np.dtype('complex64'), np.dtype('float32')): ('c2r', '32')}
+ * 
+ */
+  __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5numpy_dtype)), ((PyObject *)__pyx_k_tuple_94), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5numpy_dtype)), ((PyObject *)__pyx_k_tuple_95), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
+  __Pyx_GIVEREF(__pyx_t_1);
+  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
+  __Pyx_GIVEREF(__pyx_t_3);
+  __pyx_t_1 = 0;
+  __pyx_t_3 = 0;
+  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_k_tuple_96)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
+
+  /* "pyfftw/pyfftw.pyx":423
+ *         (np.dtype('float32'), np.dtype('complex64')): ('r2c', '32'),
+ *         (np.dtype('complex128'), np.dtype('float64')): ('c2r', '64'),
+ *         (np.dtype('complex64'), np.dtype('float32')): ('c2r', '32')}             # <<<<<<<<<<<<<<
+ * 
+ * if np.dtype('longdouble') != np.dtype('float64'):
+ */
+  __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5numpy_dtype)), ((PyObject *)__pyx_k_tuple_97), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5numpy_dtype)), ((PyObject *)__pyx_k_tuple_98), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4);
+  __Pyx_GIVEREF(__pyx_t_4);
+  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3);
+  __Pyx_GIVEREF(__pyx_t_3);
+  __pyx_t_4 = 0;
+  __pyx_t_3 = 0;
+  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_t_1), ((PyObject *)__pyx_k_tuple_99)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
+  __Pyx_XGOTREF(__pyx_v_6pyfftw_6pyfftw_fftw_schemes);
+  __Pyx_DECREF(__pyx_v_6pyfftw_6pyfftw_fftw_schemes);
+  __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
+  __pyx_v_6pyfftw_6pyfftw_fftw_schemes = ((PyObject *)__pyx_t_2);
+  __pyx_t_2 = 0;
+
+  /* "pyfftw/pyfftw.pyx":425
+ *         (np.dtype('complex64'), np.dtype('float32')): ('c2r', '32')}
+ * 
+ * if np.dtype('longdouble') != np.dtype('float64'):             # <<<<<<<<<<<<<<
+ *     fftw_schemes.update({
+ *         (np.dtype('clongdouble'), np.dtype('clongdouble')): ('c2c', 'ld'),
+ */
+  __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5numpy_dtype)), ((PyObject *)__pyx_k_tuple_100), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5numpy_dtype)), ((PyObject *)__pyx_k_tuple_101), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  if (__pyx_t_5) {
+
+    /* "pyfftw/pyfftw.pyx":426
+ * 
+ * if np.dtype('longdouble') != np.dtype('float64'):
+ *     fftw_schemes.update({             # <<<<<<<<<<<<<<
+ *         (np.dtype('clongdouble'), np.dtype('clongdouble')): ('c2c', 'ld'),
+ *         (np.dtype('longdouble'), np.dtype('clongdouble')): ('r2c', 'ld'),
+ */
+    __pyx_t_3 = PyObject_GetAttr(__pyx_v_6pyfftw_6pyfftw_fftw_schemes, __pyx_n_s__update); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
+
+    /* "pyfftw/pyfftw.pyx":427
+ * if np.dtype('longdouble') != np.dtype('float64'):
+ *     fftw_schemes.update({
+ *         (np.dtype('clongdouble'), np.dtype('clongdouble')): ('c2c', 'ld'),             # <<<<<<<<<<<<<<
+ *         (np.dtype('longdouble'), np.dtype('clongdouble')): ('r2c', 'ld'),
+ *         (np.dtype('clongdouble'), np.dtype('longdouble')): ('c2r', 'ld')})
+ */
+    __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5numpy_dtype)), ((PyObject *)__pyx_k_tuple_102), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5numpy_dtype)), ((PyObject *)__pyx_k_tuple_103), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2);
+    __Pyx_GIVEREF(__pyx_t_2);
+    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_4);
+    __Pyx_GIVEREF(__pyx_t_4);
+    __pyx_t_2 = 0;
+    __pyx_t_4 = 0;
+    if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_t_6), ((PyObject *)__pyx_k_tuple_104)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
+
+    /* "pyfftw/pyfftw.pyx":428
+ *     fftw_schemes.update({
+ *         (np.dtype('clongdouble'), np.dtype('clongdouble')): ('c2c', 'ld'),
+ *         (np.dtype('longdouble'), np.dtype('clongdouble')): ('r2c', 'ld'),             # <<<<<<<<<<<<<<
+ *         (np.dtype('clongdouble'), np.dtype('longdouble')): ('c2r', 'ld')})
+ * 
+ */
+    __pyx_t_6 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5numpy_dtype)), ((PyObject *)__pyx_k_tuple_105), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5numpy_dtype)), ((PyObject *)__pyx_k_tuple_106), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_6);
+    __Pyx_GIVEREF(__pyx_t_6);
+    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4);
+    __Pyx_GIVEREF(__pyx_t_4);
+    __pyx_t_6 = 0;
+    __pyx_t_4 = 0;
+    if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_k_tuple_107)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+
+    /* "pyfftw/pyfftw.pyx":429
+ *         (np.dtype('clongdouble'), np.dtype('clongdouble')): ('c2c', 'ld'),
+ *         (np.dtype('longdouble'), np.dtype('clongdouble')): ('r2c', 'ld'),
+ *         (np.dtype('clongdouble'), np.dtype('longdouble')): ('c2r', 'ld')})             # <<<<<<<<<<<<<<
+ * 
+ * 
+ */
+    __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5numpy_dtype)), ((PyObject *)__pyx_k_tuple_108), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5numpy_dtype)), ((PyObject *)__pyx_k_tuple_109), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2);
+    __Pyx_GIVEREF(__pyx_t_2);
+    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_4);
+    __Pyx_GIVEREF(__pyx_t_4);
+    __pyx_t_2 = 0;
+    __pyx_t_4 = 0;
+    if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_t_6), ((PyObject *)__pyx_k_tuple_110)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
+    __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_t_1));
+    __Pyx_GIVEREF(((PyObject *)__pyx_t_1));
+    __pyx_t_1 = 0;
+    __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    goto __pyx_L2;
+  }
+  __pyx_L2:;
+
+  /* "pyfftw/pyfftw.pyx":433
+ * 
+ * cdef object scheme_directions
+ * scheme_directions = {             # <<<<<<<<<<<<<<
+ *         ('c2c', '64'): ['FFTW_FORWARD', 'FFTW_BACKWARD'],
+ *         ('c2c', '32'): ['FFTW_FORWARD', 'FFTW_BACKWARD'],
+ */
+  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
+
+  /* "pyfftw/pyfftw.pyx":434
+ * cdef object scheme_directions
+ * scheme_directions = {
+ *         ('c2c', '64'): ['FFTW_FORWARD', 'FFTW_BACKWARD'],             # <<<<<<<<<<<<<<
+ *         ('c2c', '32'): ['FFTW_FORWARD', 'FFTW_BACKWARD'],
+ *         ('c2c', 'ld'): ['FFTW_FORWARD', 'FFTW_BACKWARD'],
+ */
+  __pyx_t_6 = PyList_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__FFTW_FORWARD));
+  PyList_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_n_s__FFTW_FORWARD));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__FFTW_FORWARD));
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__FFTW_BACKWARD));
+  PyList_SET_ITEM(__pyx_t_6, 1, ((PyObject *)__pyx_n_s__FFTW_BACKWARD));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__FFTW_BACKWARD));
+  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_k_tuple_111), ((PyObject *)__pyx_t_6)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
+
+  /* "pyfftw/pyfftw.pyx":435
+ * scheme_directions = {
+ *         ('c2c', '64'): ['FFTW_FORWARD', 'FFTW_BACKWARD'],
+ *         ('c2c', '32'): ['FFTW_FORWARD', 'FFTW_BACKWARD'],             # <<<<<<<<<<<<<<
+ *         ('c2c', 'ld'): ['FFTW_FORWARD', 'FFTW_BACKWARD'],
+ *         ('r2c', '64'): ['FFTW_FORWARD'],
+ */
+  __pyx_t_6 = PyList_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__FFTW_FORWARD));
+  PyList_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_n_s__FFTW_FORWARD));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__FFTW_FORWARD));
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__FFTW_BACKWARD));
+  PyList_SET_ITEM(__pyx_t_6, 1, ((PyObject *)__pyx_n_s__FFTW_BACKWARD));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__FFTW_BACKWARD));
+  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_k_tuple_112), ((PyObject *)__pyx_t_6)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
+
+  /* "pyfftw/pyfftw.pyx":436
+ *         ('c2c', '64'): ['FFTW_FORWARD', 'FFTW_BACKWARD'],
+ *         ('c2c', '32'): ['FFTW_FORWARD', 'FFTW_BACKWARD'],
+ *         ('c2c', 'ld'): ['FFTW_FORWARD', 'FFTW_BACKWARD'],             # <<<<<<<<<<<<<<
+ *         ('r2c', '64'): ['FFTW_FORWARD'],
+ *         ('r2c', '32'): ['FFTW_FORWARD'],
+ */
+  __pyx_t_6 = PyList_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__FFTW_FORWARD));
+  PyList_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_n_s__FFTW_FORWARD));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__FFTW_FORWARD));
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__FFTW_BACKWARD));
+  PyList_SET_ITEM(__pyx_t_6, 1, ((PyObject *)__pyx_n_s__FFTW_BACKWARD));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__FFTW_BACKWARD));
+  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_k_tuple_113), ((PyObject *)__pyx_t_6)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
+
+  /* "pyfftw/pyfftw.pyx":437
+ *         ('c2c', '32'): ['FFTW_FORWARD', 'FFTW_BACKWARD'],
+ *         ('c2c', 'ld'): ['FFTW_FORWARD', 'FFTW_BACKWARD'],
+ *         ('r2c', '64'): ['FFTW_FORWARD'],             # <<<<<<<<<<<<<<
+ *         ('r2c', '32'): ['FFTW_FORWARD'],
+ *         ('r2c', 'ld'): ['FFTW_FORWARD'],
+ */
+  __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__FFTW_FORWARD));
+  PyList_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_n_s__FFTW_FORWARD));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__FFTW_FORWARD));
+  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_k_tuple_114), ((PyObject *)__pyx_t_6)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
+
+  /* "pyfftw/pyfftw.pyx":438
+ *         ('c2c', 'ld'): ['FFTW_FORWARD', 'FFTW_BACKWARD'],
+ *         ('r2c', '64'): ['FFTW_FORWARD'],
+ *         ('r2c', '32'): ['FFTW_FORWARD'],             # <<<<<<<<<<<<<<
+ *         ('r2c', 'ld'): ['FFTW_FORWARD'],
+ *         ('c2r', '64'): ['FFTW_BACKWARD'],
+ */
+  __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__FFTW_FORWARD));
+  PyList_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_n_s__FFTW_FORWARD));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__FFTW_FORWARD));
+  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_k_tuple_115), ((PyObject *)__pyx_t_6)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
+
+  /* "pyfftw/pyfftw.pyx":439
+ *         ('r2c', '64'): ['FFTW_FORWARD'],
+ *         ('r2c', '32'): ['FFTW_FORWARD'],
+ *         ('r2c', 'ld'): ['FFTW_FORWARD'],             # <<<<<<<<<<<<<<
+ *         ('c2r', '64'): ['FFTW_BACKWARD'],
+ *         ('c2r', '32'): ['FFTW_BACKWARD'],
+ */
+  __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__FFTW_FORWARD));
+  PyList_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_n_s__FFTW_FORWARD));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__FFTW_FORWARD));
+  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_k_tuple_116), ((PyObject *)__pyx_t_6)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
+
+  /* "pyfftw/pyfftw.pyx":440
+ *         ('r2c', '32'): ['FFTW_FORWARD'],
+ *         ('r2c', 'ld'): ['FFTW_FORWARD'],
+ *         ('c2r', '64'): ['FFTW_BACKWARD'],             # <<<<<<<<<<<<<<
+ *         ('c2r', '32'): ['FFTW_BACKWARD'],
+ *         ('c2r', 'ld'): ['FFTW_BACKWARD']}
+ */
+  __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__FFTW_BACKWARD));
+  PyList_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_n_s__FFTW_BACKWARD));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__FFTW_BACKWARD));
+  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_k_tuple_117), ((PyObject *)__pyx_t_6)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
+
+  /* "pyfftw/pyfftw.pyx":441
+ *         ('r2c', 'ld'): ['FFTW_FORWARD'],
+ *         ('c2r', '64'): ['FFTW_BACKWARD'],
+ *         ('c2r', '32'): ['FFTW_BACKWARD'],             # <<<<<<<<<<<<<<
+ *         ('c2r', 'ld'): ['FFTW_BACKWARD']}
+ * 
+ */
+  __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__FFTW_BACKWARD));
+  PyList_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_n_s__FFTW_BACKWARD));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__FFTW_BACKWARD));
+  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_k_tuple_118), ((PyObject *)__pyx_t_6)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
+
+  /* "pyfftw/pyfftw.pyx":442
+ *         ('c2r', '64'): ['FFTW_BACKWARD'],
+ *         ('c2r', '32'): ['FFTW_BACKWARD'],
+ *         ('c2r', 'ld'): ['FFTW_BACKWARD']}             # <<<<<<<<<<<<<<
+ * 
+ * # In the following, -1 denotes using the default. A segfault has been
+ */
+  __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 442; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  __Pyx_INCREF(((PyObject *)__pyx_n_s__FFTW_BACKWARD));
+  PyList_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_n_s__FFTW_BACKWARD));
+  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__FFTW_BACKWARD));
+  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_k_tuple_119), ((PyObject *)__pyx_t_6)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
+  __Pyx_XGOTREF(__pyx_v_6pyfftw_6pyfftw_scheme_directions);
+  __Pyx_DECREF(__pyx_v_6pyfftw_6pyfftw_scheme_directions);
+  __Pyx_GIVEREF(((PyObject *)__pyx_t_1));
+  __pyx_v_6pyfftw_6pyfftw_scheme_directions = ((PyObject *)__pyx_t_1);
+  __pyx_t_1 = 0;
+
+  /* "pyfftw/pyfftw.pyx":449
+ * # that scheme_functions is an internal cdef object.
+ * cdef object scheme_functions
+ * scheme_functions = {             # <<<<<<<<<<<<<<
+ *     ('c2c', '64'): {'planner': 0, 'executor':0, 'generic_precision':0,
+ *         'validator': -1, 'fft_shape_lookup': -1},
+ */
+  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
+
+  /* "pyfftw/pyfftw.pyx":450
+ * cdef object scheme_functions
+ * scheme_functions = {
+ *     ('c2c', '64'): {'planner': 0, 'executor':0, 'generic_precision':0,             # <<<<<<<<<<<<<<
+ *         'validator': -1, 'fft_shape_lookup': -1},
+ *     ('c2c', '32'): {'planner':1, 'executor':1, 'generic_precision':1,
+ */
+  __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_6));
+  if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__planner), __pyx_int_0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__executor), __pyx_int_0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__generic_precision), __pyx_int_0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__validator), __pyx_int_neg_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__fft_shape_lookup), __pyx_int_neg_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_k_tuple_120), ((PyObject *)__pyx_t_6)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
+
+  /* "pyfftw/pyfftw.pyx":452
+ *     ('c2c', '64'): {'planner': 0, 'executor':0, 'generic_precision':0,
+ *         'validator': -1, 'fft_shape_lookup': -1},
+ *     ('c2c', '32'): {'planner':1, 'executor':1, 'generic_precision':1,             # <<<<<<<<<<<<<<
+ *         'validator': -1, 'fft_shape_lookup': -1},
+ *     ('c2c', 'ld'): {'planner':2, 'executor':2, 'generic_precision':2,
+ */
+  __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_6));
+  if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__planner), __pyx_int_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__executor), __pyx_int_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__generic_precision), __pyx_int_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__validator), __pyx_int_neg_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__fft_shape_lookup), __pyx_int_neg_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_k_tuple_121), ((PyObject *)__pyx_t_6)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
+
+  /* "pyfftw/pyfftw.pyx":454
+ *     ('c2c', '32'): {'planner':1, 'executor':1, 'generic_precision':1,
+ *         'validator': -1, 'fft_shape_lookup': -1},
+ *     ('c2c', 'ld'): {'planner':2, 'executor':2, 'generic_precision':2,             # <<<<<<<<<<<<<<
+ *         'validator': -1, 'fft_shape_lookup': -1},
+ *     ('r2c', '64'): {'planner':3, 'executor':3, 'generic_precision':0,
+ */
+  __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_6));
+  if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__planner), __pyx_int_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__executor), __pyx_int_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__generic_precision), __pyx_int_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__validator), __pyx_int_neg_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__fft_shape_lookup), __pyx_int_neg_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_k_tuple_122), ((PyObject *)__pyx_t_6)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
+
+  /* "pyfftw/pyfftw.pyx":456
+ *     ('c2c', 'ld'): {'planner':2, 'executor':2, 'generic_precision':2,
+ *         'validator': -1, 'fft_shape_lookup': -1},
+ *     ('r2c', '64'): {'planner':3, 'executor':3, 'generic_precision':0,             # <<<<<<<<<<<<<<
+ *         'validator': 0,
+ *         'fft_shape_lookup': _lookup_shape_r2c_arrays},
+ */
+  __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_6));
+  if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__planner), __pyx_int_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__executor), __pyx_int_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__generic_precision), __pyx_int_0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__validator), __pyx_int_0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "pyfftw/pyfftw.pyx":458
+ *     ('r2c', '64'): {'planner':3, 'executor':3, 'generic_precision':0,
+ *         'validator': 0,
+ *         'fft_shape_lookup': _lookup_shape_r2c_arrays},             # <<<<<<<<<<<<<<
+ *     ('r2c', '32'): {'planner':4, 'executor':4, 'generic_precision':1,
+ *         'validator': 0,
+ */
+  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s_76); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 458; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__fft_shape_lookup), __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_k_tuple_123), ((PyObject *)__pyx_t_6)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
+
+  /* "pyfftw/pyfftw.pyx":459
+ *         'validator': 0,
+ *         'fft_shape_lookup': _lookup_shape_r2c_arrays},
+ *     ('r2c', '32'): {'planner':4, 'executor':4, 'generic_precision':1,             # <<<<<<<<<<<<<<
+ *         'validator': 0,
+ *         'fft_shape_lookup': _lookup_shape_r2c_arrays},
+ */
+  __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 459; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_6));
+  if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__planner), __pyx_int_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 459; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__executor), __pyx_int_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 459; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__generic_precision), __pyx_int_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 459; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__validator), __pyx_int_0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 459; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "pyfftw/pyfftw.pyx":461
+ *     ('r2c', '32'): {'planner':4, 'executor':4, 'generic_precision':1,
+ *         'validator': 0,
+ *         'fft_shape_lookup': _lookup_shape_r2c_arrays},             # <<<<<<<<<<<<<<
+ *     ('r2c', 'ld'): {'planner':5, 'executor':5, 'generic_precision':2,
+ *         'validator': 0,
+ */
+  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s_76); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__fft_shape_lookup), __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 459; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_k_tuple_124), ((PyObject *)__pyx_t_6)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
+
+  /* "pyfftw/pyfftw.pyx":462
+ *         'validator': 0,
+ *         'fft_shape_lookup': _lookup_shape_r2c_arrays},
+ *     ('r2c', 'ld'): {'planner':5, 'executor':5, 'generic_precision':2,             # <<<<<<<<<<<<<<
+ *         'validator': 0,
+ *         'fft_shape_lookup': _lookup_shape_r2c_arrays},
+ */
+  __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_6));
+  if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__planner), __pyx_int_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__executor), __pyx_int_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__generic_precision), __pyx_int_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__validator), __pyx_int_0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "pyfftw/pyfftw.pyx":464
+ *     ('r2c', 'ld'): {'planner':5, 'executor':5, 'generic_precision':2,
+ *         'validator': 0,
+ *         'fft_shape_lookup': _lookup_shape_r2c_arrays},             # <<<<<<<<<<<<<<
+ *     ('c2r', '64'): {'planner':6, 'executor':6, 'generic_precision':0,
+ *         'validator': 1,
+ */
+  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s_76); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__fft_shape_lookup), __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_k_tuple_125), ((PyObject *)__pyx_t_6)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
+
+  /* "pyfftw/pyfftw.pyx":465
+ *         'validator': 0,
+ *         'fft_shape_lookup': _lookup_shape_r2c_arrays},
+ *     ('c2r', '64'): {'planner':6, 'executor':6, 'generic_precision':0,             # <<<<<<<<<<<<<<
+ *         'validator': 1,
+ *         'fft_shape_lookup': _lookup_shape_c2r_arrays},
+ */
+  __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 465; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_6));
+  if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__planner), __pyx_int_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 465; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__executor), __pyx_int_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 465; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__generic_precision), __pyx_int_0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 465; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__validator), __pyx_int_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 465; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "pyfftw/pyfftw.pyx":467
+ *     ('c2r', '64'): {'planner':6, 'executor':6, 'generic_precision':0,
+ *         'validator': 1,
+ *         'fft_shape_lookup': _lookup_shape_c2r_arrays},             # <<<<<<<<<<<<<<
+ *     ('c2r', '32'): {'planner':7, 'executor':7, 'generic_precision':1,
+ *         'validator': 1,
+ */
+  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s_81); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__fft_shape_lookup), __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 465; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_k_tuple_126), ((PyObject *)__pyx_t_6)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
+
+  /* "pyfftw/pyfftw.pyx":468
+ *         'validator': 1,
+ *         'fft_shape_lookup': _lookup_shape_c2r_arrays},
+ *     ('c2r', '32'): {'planner':7, 'executor':7, 'generic_precision':1,             # <<<<<<<<<<<<<<
+ *         'validator': 1,
+ *         'fft_shape_lookup': _lookup_shape_c2r_arrays},
+ */
+  __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_6));
+  if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__planner), __pyx_int_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__executor), __pyx_int_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__generic_precision), __pyx_int_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__validator), __pyx_int_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "pyfftw/pyfftw.pyx":470
+ *     ('c2r', '32'): {'planner':7, 'executor':7, 'generic_precision':1,
+ *         'validator': 1,
+ *         'fft_shape_lookup': _lookup_shape_c2r_arrays},             # <<<<<<<<<<<<<<
+ *     ('c2r', 'ld'): {'planner':8, 'executor':8, 'generic_precision':2,
+ *         'validator': 1,
+ */
+  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s_81); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 470; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__fft_shape_lookup), __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_k_tuple_127), ((PyObject *)__pyx_t_6)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
+
+  /* "pyfftw/pyfftw.pyx":471
+ *         'validator': 1,
+ *         'fft_shape_lookup': _lookup_shape_c2r_arrays},
+ *     ('c2r', 'ld'): {'planner':8, 'executor':8, 'generic_precision':2,             # <<<<<<<<<<<<<<
+ *         'validator': 1,
+ *         'fft_shape_lookup': _lookup_shape_c2r_arrays}}
+ */
+  __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_6));
+  if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__planner), __pyx_int_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__executor), __pyx_int_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__generic_precision), __pyx_int_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__validator), __pyx_int_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "pyfftw/pyfftw.pyx":473
+ *     ('c2r', 'ld'): {'planner':8, 'executor':8, 'generic_precision':2,
+ *         'validator': 1,
+ *         'fft_shape_lookup': _lookup_shape_c2r_arrays}}             # <<<<<<<<<<<<<<
+ * 
+ * # Initialize the module
+ */
+  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s_81); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__fft_shape_lookup), __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_k_tuple_128), ((PyObject *)__pyx_t_6)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
+  __Pyx_XGOTREF(__pyx_v_6pyfftw_6pyfftw_scheme_functions);
+  __Pyx_DECREF(__pyx_v_6pyfftw_6pyfftw_scheme_functions);
+  __Pyx_GIVEREF(((PyObject *)__pyx_t_1));
+  __pyx_v_6pyfftw_6pyfftw_scheme_functions = ((PyObject *)__pyx_t_1);
+  __pyx_t_1 = 0;
+
+  /* "pyfftw/pyfftw.pyx":478
+ * 
+ * # Define the functions
+ * _build_planner_list()             # <<<<<<<<<<<<<<
+ * _build_destroyer_list()
+ * _build_executor_list()
+ */
+  __pyx_f_6pyfftw_6pyfftw__build_planner_list();
+
+  /* "pyfftw/pyfftw.pyx":479
+ * # Define the functions
+ * _build_planner_list()
+ * _build_destroyer_list()             # <<<<<<<<<<<<<<
+ * _build_executor_list()
+ * _build_nthreads_plan_setters_list()
+ */
+  __pyx_f_6pyfftw_6pyfftw__build_destroyer_list();
+
+  /* "pyfftw/pyfftw.pyx":480
+ * _build_planner_list()
+ * _build_destroyer_list()
+ * _build_executor_list()             # <<<<<<<<<<<<<<
+ * _build_nthreads_plan_setters_list()
+ * _build_validators_list()
+ */
+  __pyx_f_6pyfftw_6pyfftw__build_executor_list();
+
+  /* "pyfftw/pyfftw.pyx":481
+ * _build_destroyer_list()
+ * _build_executor_list()
+ * _build_nthreads_plan_setters_list()             # <<<<<<<<<<<<<<
+ * _build_validators_list()
+ * _build_set_timelimit_funcs_list()
+ */
+  __pyx_f_6pyfftw_6pyfftw__build_nthreads_plan_setters_list();
+
+  /* "pyfftw/pyfftw.pyx":482
+ * _build_executor_list()
+ * _build_nthreads_plan_setters_list()
+ * _build_validators_list()             # <<<<<<<<<<<<<<
+ * _build_set_timelimit_funcs_list()
+ * 
+ */
+  __pyx_f_6pyfftw_6pyfftw__build_validators_list();
+
+  /* "pyfftw/pyfftw.pyx":483
+ * _build_nthreads_plan_setters_list()
+ * _build_validators_list()
+ * _build_set_timelimit_funcs_list()             # <<<<<<<<<<<<<<
+ * 
+ * fftw_init_threads()
+ */
+  __pyx_f_6pyfftw_6pyfftw__build_set_timelimit_funcs_list();
+
+  /* "pyfftw/pyfftw.pyx":485
+ * _build_set_timelimit_funcs_list()
+ * 
+ * fftw_init_threads()             # <<<<<<<<<<<<<<
+ * fftwf_init_threads()
+ * fftwl_init_threads()
+ */
+  fftw_init_threads();
+
+  /* "pyfftw/pyfftw.pyx":486
+ * 
+ * fftw_init_threads()
+ * fftwf_init_threads()             # <<<<<<<<<<<<<<
+ * fftwl_init_threads()
+ * 
+ */
+  fftwf_init_threads();
+
+  /* "pyfftw/pyfftw.pyx":487
+ * fftw_init_threads()
+ * fftwf_init_threads()
+ * fftwl_init_threads()             # <<<<<<<<<<<<<<
+ * 
+ * # Set the cleanup routine
+ */
+  fftwl_init_threads();
+
+  /* "pyfftw/pyfftw.pyx":498
+ *     fftwl_cleanup_threads()
+ * 
+ * Py_AtExit(_cleanup)             # <<<<<<<<<<<<<<
+ * 
+ * # Helper functions
+ */
+  Py_AtExit(__pyx_f_6pyfftw_6pyfftw__cleanup);
+
+  /* "pyfftw/pyfftw.pyx":647
+ *         return self.__N
+ * 
+ *     N = property(__get_N)             # <<<<<<<<<<<<<<
+ * 
+ *     def __get_simd_aligned(self):
+ */
+  __pyx_t_1 = __Pyx_GetName((PyObject *)__pyx_ptype_6pyfftw_6pyfftw_FFTW, __pyx_n_s____get_N); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
+  __Pyx_GIVEREF(__pyx_t_1);
+  __pyx_t_1 = 0;
+  __pyx_t_1 = PyObject_Call(__pyx_builtin_property, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
+  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyfftw_6pyfftw_FFTW->tp_dict, __pyx_n_s__N, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  PyType_Modified(__pyx_ptype_6pyfftw_6pyfftw_FFTW);
+
+  /* "pyfftw/pyfftw.pyx":656
+ *         return self.__simd_allowed
+ * 
+ *     simd_aligned = property(__get_simd_aligned)             # <<<<<<<<<<<<<<
+ * 
+ *     def __get_input_alignment(self):
+ */
+  __pyx_t_1 = __Pyx_GetName((PyObject *)__pyx_ptype_6pyfftw_6pyfftw_FFTW, __pyx_n_s____get_simd_aligned); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
+  __Pyx_GIVEREF(__pyx_t_1);
+  __pyx_t_1 = 0;
+  __pyx_t_1 = PyObject_Call(__pyx_builtin_property, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
+  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyfftw_6pyfftw_FFTW->tp_dict, __pyx_n_s__simd_aligned, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  PyType_Modified(__pyx_ptype_6pyfftw_6pyfftw_FFTW);
+
+  /* "pyfftw/pyfftw.pyx":670
+ *         return self.__input_array_alignment
+ * 
+ *     input_alignment = property(__get_input_alignment)             # <<<<<<<<<<<<<<
+ * 
+ *     def __get_output_alignment(self):
+ */
+  __pyx_t_1 = __Pyx_GetName((PyObject *)__pyx_ptype_6pyfftw_6pyfftw_FFTW, __pyx_n_s_129); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
+  __Pyx_GIVEREF(__pyx_t_1);
+  __pyx_t_1 = 0;
+  __pyx_t_1 = PyObject_Call(__pyx_builtin_property, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
+  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyfftw_6pyfftw_FFTW->tp_dict, __pyx_n_s__input_alignment, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  PyType_Modified(__pyx_ptype_6pyfftw_6pyfftw_FFTW);
+
+  /* "pyfftw/pyfftw.pyx":682
+ *         return self.__output_array_alignment
+ * 
+ *     output_alignment = property(__get_output_alignment)             # <<<<<<<<<<<<<<
+ * 
+ *     def __get_flags_used(self):
+ */
+  __pyx_t_1 = __Pyx_GetName((PyObject *)__pyx_ptype_6pyfftw_6pyfftw_FFTW, __pyx_n_s_130); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
+  __Pyx_GIVEREF(__pyx_t_1);
+  __pyx_t_1 = 0;
+  __pyx_t_1 = PyObject_Call(__pyx_builtin_property, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
+  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyfftw_6pyfftw_FFTW->tp_dict, __pyx_n_s__output_alignment, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  PyType_Modified(__pyx_ptype_6pyfftw_6pyfftw_FFTW);
+
+  /* "pyfftw/pyfftw.pyx":692
+ *         return tuple(self.__flags_used)
+ * 
+ *     flags = property(__get_flags_used)             # <<<<<<<<<<<<<<
+ * 
+ *     def __cinit__(self, input_array, output_array, axes=(-1,),
+ */
+  __pyx_t_1 = __Pyx_GetName((PyObject *)__pyx_ptype_6pyfftw_6pyfftw_FFTW, __pyx_n_s____get_flags_used); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
+  __Pyx_GIVEREF(__pyx_t_1);
+  __pyx_t_1 = 0;
+  __pyx_t_1 = PyObject_Call(__pyx_builtin_property, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
+  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pyfftw_6pyfftw_FFTW->tp_dict, __pyx_n_s__flags, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  PyType_Modified(__pyx_ptype_6pyfftw_6pyfftw_FFTW);
+
+  /* "pyfftw/pyfftw.pyx":1194
+ * 
+ *     def __call__(self, input_array=None, output_array=None,
+ *             normalise_idft=True):             # <<<<<<<<<<<<<<
+ *         '''__call__(input_array=None, output_array=None, normalise_idft=True)
+ * 
+ */
+  __pyx_t_1 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_k_40 = __pyx_t_1;
+  __Pyx_GIVEREF(__pyx_t_1);
+  __pyx_t_1 = 0;
+
+  /* "pyfftw/pyfftw.pyx":1458
+ * 
+ * 
+ * def export_wisdom():             # <<<<<<<<<<<<<<
+ *     '''export_wisdom()
+ * 
+ */
+  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6pyfftw_6pyfftw_11export_wisdom, NULL, __pyx_n_s_78); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1458; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__export_wisdom, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1458; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "pyfftw/pyfftw.pyx":1517
+ *     return (py_wisdom, py_wisdomf, py_wisdoml)
+ * 
+ * def import_wisdom(wisdom):             # <<<<<<<<<<<<<<
+ *     '''import_wisdom(wisdom)
+ * 
+ */
+  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6pyfftw_6pyfftw_13import_wisdom, NULL, __pyx_n_s_78); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__import_wisdom, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "pyfftw/pyfftw.pyx":1633
+ * #    return (success, successf, successl)
+ * 
+ * def forget_wisdom():             # <<<<<<<<<<<<<<
+ *     '''forget_wisdom()
+ * 
+ */
+  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6pyfftw_6pyfftw_15forget_wisdom, NULL, __pyx_n_s_78); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1633; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__forget_wisdom, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1633; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "pyfftw/pyfftw.pyx":1
+ * # Copyright 2012 Knowledge Economy Developments Ltd             # <<<<<<<<<<<<<<
+ * #
+ * # Henry Gomersall
+ */
+  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
+  if (PyObject_SetAttr(__pyx_m, __pyx_n_s____test__, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
+
+  /* "numpy.pxd":975
+ *      arr.base = baseptr
+ * 
+ * cdef inline object get_array_base(ndarray arr):             # <<<<<<<<<<<<<<
+ *     if arr.base is NULL:
+ *         return None
+ */
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_XDECREF(__pyx_t_6);
+  if (__pyx_m) {
+    __Pyx_AddTraceback("init pyfftw.pyfftw", __pyx_clineno, __pyx_lineno, __pyx_filename);
+    Py_DECREF(__pyx_m); __pyx_m = 0;
+  } else if (!PyErr_Occurred()) {
+    PyErr_SetString(PyExc_ImportError, "init pyfftw.pyfftw");
+  }
+  __pyx_L0:;
+  __Pyx_RefNannyFinishContext();
+  #if PY_MAJOR_VERSION < 3
+  return;
+  #else
+  return __pyx_m;
+  #endif
+}
+
+/* Runtime support code */
+#if CYTHON_REFNANNY
+static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
+    PyObject *m = NULL, *p = NULL;
+    void *r = NULL;
+    m = PyImport_ImportModule((char *)modname);
+    if (!m) goto end;
+    p = PyObject_GetAttrString(m, (char *)"RefNannyAPI");
+    if (!p) goto end;
+    r = PyLong_AsVoidPtr(p);
+end:
+    Py_XDECREF(p);
+    Py_XDECREF(m);
+    return (__Pyx_RefNannyAPIStruct *)r;
+}
+#endif /* CYTHON_REFNANNY */
+
+static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name) {
+    PyObject *result;
+    result = PyObject_GetAttr(dict, name);
+    if (!result) {
+        if (dict != __pyx_b) {
+            PyErr_Clear();
+            result = PyObject_GetAttr(__pyx_b, name);
+        }
+        if (!result) {
+            PyErr_SetObject(PyExc_NameError, name);
+        }
+    }
+    return result;
+}
+
+static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
+    if (unlikely(!type)) {
+        PyErr_Format(PyExc_SystemError, "Missing type object");
+        return 0;
+    }
+    if (likely(PyObject_TypeCheck(obj, type)))
+        return 1;
+    PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s",
+                 Py_TYPE(obj)->tp_name, type->tp_name);
+    return 0;
+}
+
+static void __Pyx_RaiseArgtupleInvalid(
+    const char* func_name,
+    int exact,
+    Py_ssize_t num_min,
+    Py_ssize_t num_max,
+    Py_ssize_t num_found)
+{
+    Py_ssize_t num_expected;
+    const char *more_or_less;
+    if (num_found < num_min) {
+        num_expected = num_min;
+        more_or_less = "at least";
+    } else {
+        num_expected = num_max;
+        more_or_less = "at most";
+    }
+    if (exact) {
+        more_or_less = "exactly";
+    }
+    PyErr_Format(PyExc_TypeError,
+                 "%s() takes %s %" CYTHON_FORMAT_SSIZE_T "d positional argument%s (%" CYTHON_FORMAT_SSIZE_T "d given)",
+                 func_name, more_or_less, num_expected,
+                 (num_expected == 1) ? "" : "s", num_found);
+}
+
+static void __Pyx_RaiseDoubleKeywordsError(
+    const char* func_name,
+    PyObject* kw_name)
+{
+    PyErr_Format(PyExc_TypeError,
+        #if PY_MAJOR_VERSION >= 3
+        "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
+        #else
+        "%s() got multiple values for keyword argument '%s'", func_name,
+        PyString_AsString(kw_name));
+        #endif
+}
+
+static int __Pyx_ParseOptionalKeywords(
+    PyObject *kwds,
+    PyObject **argnames[],
+    PyObject *kwds2,
+    PyObject *values[],
+    Py_ssize_t num_pos_args,
+    const char* function_name)
+{
+    PyObject *key = 0, *value = 0;
+    Py_ssize_t pos = 0;
+    PyObject*** name;
+    PyObject*** first_kw_arg = argnames + num_pos_args;
+    while (PyDict_Next(kwds, &pos, &key, &value)) {
+        name = first_kw_arg;
+        while (*name && (**name != key)) name++;
+        if (*name) {
+            values[name-argnames] = value;
+            continue;
+        }
+        name = first_kw_arg;
+        #if PY_MAJOR_VERSION < 3
+        if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) {
+            while (*name) {
+                if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
+                        && _PyString_Eq(**name, key)) {
+                    values[name-argnames] = value;
+                    break;
+                }
+                name++;
+            }
+            if (*name) continue;
+            else {
+                PyObject*** argname = argnames;
+                while (argname != first_kw_arg) {
+                    if ((**argname == key) || (
+                            (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
+                             && _PyString_Eq(**argname, key))) {
+                        goto arg_passed_twice;
+                    }
+                    argname++;
+                }
+            }
+        } else
+        #endif
+        if (likely(PyUnicode_Check(key))) {
+            while (*name) {
+                int cmp = (**name == key) ? 0 :
+                #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
+                    (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
+                #endif
+                    PyUnicode_Compare(**name, key);
+                if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
+                if (cmp == 0) {
+                    values[name-argnames] = value;
+                    break;
+                }
+                name++;
+            }
+            if (*name) continue;
+            else {
+                PyObject*** argname = argnames;
+                while (argname != first_kw_arg) {
+                    int cmp = (**argname == key) ? 0 :
+                    #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
+                        (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
+                    #endif
+                        PyUnicode_Compare(**argname, key);
+                    if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
+                    if (cmp == 0) goto arg_passed_twice;
+                    argname++;
+                }
+            }
+        } else
+            goto invalid_keyword_type;
+        if (kwds2) {
+            if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
+        } else {
+            goto invalid_keyword;
+        }
+    }
+    return 0;
+arg_passed_twice:
+    __Pyx_RaiseDoubleKeywordsError(function_name, key);
+    goto bad;
+invalid_keyword_type:
+    PyErr_Format(PyExc_TypeError,
+        "%s() keywords must be strings", function_name);
+    goto bad;
+invalid_keyword:
+    PyErr_Format(PyExc_TypeError,
+    #if PY_MAJOR_VERSION < 3
+        "%s() got an unexpected keyword argument '%s'",
+        function_name, PyString_AsString(key));
+    #else
+        "%s() got an unexpected keyword argument '%U'",
+        function_name, key);
+    #endif
+bad:
+    return -1;
+}
+
+static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) {
+#if CYTHON_COMPILING_IN_CPYTHON
+    PyObject *tmp_type, *tmp_value, *tmp_tb;
+    PyThreadState *tstate = PyThreadState_GET();
+    tmp_type = tstate->curexc_type;
+    tmp_value = tstate->curexc_value;
+    tmp_tb = tstate->curexc_traceback;
+    tstate->curexc_type = type;
+    tstate->curexc_value = value;
+    tstate->curexc_traceback = tb;
+    Py_XDECREF(tmp_type);
+    Py_XDECREF(tmp_value);
+    Py_XDECREF(tmp_tb);
+#else
+    PyErr_Restore(type, value, tb);
+#endif
+}
+static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) {
+#if CYTHON_COMPILING_IN_CPYTHON
+    PyThreadState *tstate = PyThreadState_GET();
+    *type = tstate->curexc_type;
+    *value = tstate->curexc_value;
+    *tb = tstate->curexc_traceback;
+    tstate->curexc_type = 0;
+    tstate->curexc_value = 0;
+    tstate->curexc_traceback = 0;
+#else
+    PyErr_Fetch(type, value, tb);
+#endif
+}
+
+#if PY_MAJOR_VERSION < 3
+static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
+                        CYTHON_UNUSED PyObject *cause) {
+    Py_XINCREF(type);
+    if (!value || value == Py_None)
+        value = NULL;
+    else
+        Py_INCREF(value);
+    if (!tb || tb == Py_None)
+        tb = NULL;
+    else {
+        Py_INCREF(tb);
+        if (!PyTraceBack_Check(tb)) {
+            PyErr_SetString(PyExc_TypeError,
+                "raise: arg 3 must be a traceback or None");
+            goto raise_error;
+        }
+    }
+    #if PY_VERSION_HEX < 0x02050000
+    if (PyClass_Check(type)) {
+    #else
+    if (PyType_Check(type)) {
+    #endif
+#if CYTHON_COMPILING_IN_PYPY
+        if (!value) {
+            Py_INCREF(Py_None);
+            value = Py_None;
+        }
+#endif
+        PyErr_NormalizeException(&type, &value, &tb);
+    } else {
+        if (value) {
+            PyErr_SetString(PyExc_TypeError,
+                "instance exception may not have a separate value");
+            goto raise_error;
+        }
+        value = type;
+        #if PY_VERSION_HEX < 0x02050000
+            if (PyInstance_Check(type)) {
+                type = (PyObject*) ((PyInstanceObject*)type)->in_class;
+                Py_INCREF(type);
+            }
+            else {
+                type = 0;
+                PyErr_SetString(PyExc_TypeError,
+                    "raise: exception must be an old-style class or instance");
+                goto raise_error;
+            }
+        #else
+            type = (PyObject*) Py_TYPE(type);
+            Py_INCREF(type);
+            if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
+                PyErr_SetString(PyExc_TypeError,
+                    "raise: exception class must be a subclass of BaseException");
+                goto raise_error;
+            }
+        #endif
+    }
+    __Pyx_ErrRestore(type, value, tb);
+    return;
+raise_error:
+    Py_XDECREF(value);
+    Py_XDECREF(type);
+    Py_XDECREF(tb);
+    return;
+}
+#else /* Python 3+ */
+static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
+    PyObject* owned_instance = NULL;
+    if (tb == Py_None) {
+        tb = 0;
+    } else if (tb && !PyTraceBack_Check(tb)) {
+        PyErr_SetString(PyExc_TypeError,
+            "raise: arg 3 must be a traceback or None");
+        goto bad;
+    }
+    if (value == Py_None)
+        value = 0;
+    if (PyExceptionInstance_Check(type)) {
+        if (value) {
+            PyErr_SetString(PyExc_TypeError,
+                "instance exception may not have a separate value");
+            goto bad;
+        }
+        value = type;
+        type = (PyObject*) Py_TYPE(value);
+    } else if (PyExceptionClass_Check(type)) {
+        PyObject *args;
+        if (!value)
+            args = PyTuple_New(0);
+        else if (PyTuple_Check(value)) {
+            Py_INCREF(value);
+            args = value;
+        }
+        else
+            args = PyTuple_Pack(1, value);
+        if (!args)
+            goto bad;
+        owned_instance = PyEval_CallObject(type, args);
+        Py_DECREF(args);
+        if (!owned_instance)
+            goto bad;
+        value = owned_instance;
+        if (!PyExceptionInstance_Check(value)) {
+            PyErr_Format(PyExc_TypeError,
+                         "calling %R should have returned an instance of "
+                         "BaseException, not %R",
+                         type, Py_TYPE(value));
+            goto bad;
+        }
+    } else {
+        PyErr_SetString(PyExc_TypeError,
+            "raise: exception class must be a subclass of BaseException");
+        goto bad;
+    }
+    if (cause && cause != Py_None) {
+        PyObject *fixed_cause;
+        if (PyExceptionClass_Check(cause)) {
+            fixed_cause = PyObject_CallObject(cause, NULL);
+            if (fixed_cause == NULL)
+                goto bad;
+        }
+        else if (PyExceptionInstance_Check(cause)) {
+            fixed_cause = cause;
+            Py_INCREF(fixed_cause);
+        }
+        else {
+            PyErr_SetString(PyExc_TypeError,
+                            "exception causes must derive from "
+                            "BaseException");
+            goto bad;
+        }
+        PyException_SetCause(value, fixed_cause);
+    }
+    PyErr_SetObject(type, value);
+    if (tb) {
+        PyThreadState *tstate = PyThreadState_GET();
+        PyObject* tmp_tb = tstate->curexc_traceback;
+        if (tb != tmp_tb) {
+            Py_INCREF(tb);
+            tstate->curexc_traceback = tb;
+            Py_XDECREF(tmp_tb);
+        }
+    }
+bad:
+    Py_XDECREF(owned_instance);
+    return;
+}
+#endif
+
+static CYTHON_INLINE long __Pyx_div_long(long a, long b) {
+    long q = a / b;
+    long r = a - q*b;
+    q -= ((r != 0) & ((r ^ b) < 0));
+    return q;
+}
+
+static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) {
+    PyObject *local_type, *local_value, *local_tb;
+#if CYTHON_COMPILING_IN_CPYTHON
+    PyObject *tmp_type, *tmp_value, *tmp_tb;
+    PyThreadState *tstate = PyThreadState_GET();
+    local_type = tstate->curexc_type;
+    local_value = tstate->curexc_value;
+    local_tb = tstate->curexc_traceback;
+    tstate->curexc_type = 0;
+    tstate->curexc_value = 0;
+    tstate->curexc_traceback = 0;
+#else
+    PyErr_Fetch(&local_type, &local_value, &local_tb);
+#endif
+    PyErr_NormalizeException(&local_type, &local_value, &local_tb);
+#if CYTHON_COMPILING_IN_CPYTHON
+    if (unlikely(tstate->curexc_type))
+#else
+    if (unlikely(PyErr_Occurred()))
+#endif
+        goto bad;
+    #if PY_MAJOR_VERSION >= 3
+    if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
+        goto bad;
+    #endif
+    Py_INCREF(local_type);
+    Py_INCREF(local_value);
+    Py_INCREF(local_tb);
+    *type = local_type;
+    *value = local_value;
+    *tb = local_tb;
+#if CYTHON_COMPILING_IN_CPYTHON
+    tmp_type = tstate->exc_type;
+    tmp_value = tstate->exc_value;
+    tmp_tb = tstate->exc_traceback;
+    tstate->exc_type = local_type;
+    tstate->exc_value = local_value;
+    tstate->exc_traceback = local_tb;
+    /* Make sure tstate is in a consistent state when we XDECREF
+       these objects (DECREF may run arbitrary code). */
+    Py_XDECREF(tmp_type);
+    Py_XDECREF(tmp_value);
+    Py_XDECREF(tmp_tb);
+#else
+    PyErr_SetExcInfo(local_type, local_value, local_tb);
+#endif
+    return 0;
+bad:
+    *type = 0;
+    *value = 0;
+    *tb = 0;
+    Py_XDECREF(local_type);
+    Py_XDECREF(local_value);
+    Py_XDECREF(local_tb);
+    return -1;
+}
+
+static CYTHON_INLINE intptr_t __Pyx_mod_intptr_t(intptr_t a, intptr_t b) {
+    intptr_t r = a % b;
+    r += ((r != 0) & ((r ^ b) < 0)) * b;
+    return r;
+}
+
+static double __Pyx__PyObject_AsDouble(PyObject* obj) {
+    PyObject* float_value;
+#if CYTHON_COMPILING_IN_PYPY
+    float_value = PyNumber_Float(obj);
+#else
+    if (Py_TYPE(obj)->tp_as_number && Py_TYPE(obj)->tp_as_number->nb_float) {
+        return PyFloat_AsDouble(obj);
+    } else if (PyUnicode_CheckExact(obj) || PyBytes_CheckExact(obj)) {
+#if PY_MAJOR_VERSION >= 3
+        float_value = PyFloat_FromString(obj);
+#else
+        float_value = PyFloat_FromString(obj, 0);
+#endif
+    } else {
+        PyObject* args = PyTuple_New(1);
+        if (unlikely(!args)) goto bad;
+        PyTuple_SET_ITEM(args, 0, obj);
+        float_value = PyObject_Call((PyObject*)&PyFloat_Type, args, 0);
+        PyTuple_SET_ITEM(args, 0, 0);
+        Py_DECREF(args);
+    }
+#endif
+    if (likely(float_value)) {
+        double value = PyFloat_AS_DOUBLE(float_value);
+        Py_DECREF(float_value);
+        return value;
+    }
+bad:
+    return (double)-1;
+}
+
+static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
+    PyErr_Format(PyExc_ValueError,
+                 "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
+}
+
+static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
+    PyErr_Format(PyExc_ValueError,
+                 "need more than %" CYTHON_FORMAT_SSIZE_T "d value%s to unpack",
+                 index, (index == 1) ? "" : "s");
+}
+
+static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) {
+    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
+}
+
+static CYTHON_INLINE int __Pyx_IterFinish(void) {
+#if CYTHON_COMPILING_IN_CPYTHON
+    PyThreadState *tstate = PyThreadState_GET();
+    PyObject* exc_type = tstate->curexc_type;
+    if (unlikely(exc_type)) {
+        if (likely(exc_type == PyExc_StopIteration) || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)) {
+            PyObject *exc_value, *exc_tb;
+            exc_value = tstate->curexc_value;
+            exc_tb = tstate->curexc_traceback;
+            tstate->curexc_type = 0;
+            tstate->curexc_value = 0;
+            tstate->curexc_traceback = 0;
+            Py_DECREF(exc_type);
+            Py_XDECREF(exc_value);
+            Py_XDECREF(exc_tb);
+            return 0;
+        } else {
+            return -1;
+        }
+    }
+    return 0;
+#else
+    if (unlikely(PyErr_Occurred())) {
+        if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) {
+            PyErr_Clear();
+            return 0;
+        } else {
+            return -1;
+        }
+    }
+    return 0;
+#endif
+}
+
+static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
+    if (unlikely(retval)) {
+        Py_DECREF(retval);
+        __Pyx_RaiseTooManyValuesError(expected);
+        return -1;
+    } else {
+        return __Pyx_IterFinish();
+    }
+    return 0;
+}
+
+static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb) {
+#if CYTHON_COMPILING_IN_CPYTHON
+    PyThreadState *tstate = PyThreadState_GET();
+    *type = tstate->exc_type;
+    *value = tstate->exc_value;
+    *tb = tstate->exc_traceback;
+    Py_XINCREF(*type);
+    Py_XINCREF(*value);
+    Py_XINCREF(*tb);
+#else
+    PyErr_GetExcInfo(type, value, tb);
+#endif
+}
+static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb) {
+#if CYTHON_COMPILING_IN_CPYTHON
+    PyObject *tmp_type, *tmp_value, *tmp_tb;
+    PyThreadState *tstate = PyThreadState_GET();
+    tmp_type = tstate->exc_type;
+    tmp_value = tstate->exc_value;
+    tmp_tb = tstate->exc_traceback;
+    tstate->exc_type = type;
+    tstate->exc_value = value;
+    tstate->exc_traceback = tb;
+    Py_XDECREF(tmp_type);
+    Py_XDECREF(tmp_value);
+    Py_XDECREF(tmp_tb);
+#else
+    PyErr_SetExcInfo(type, value, tb);
+#endif
+}
+
+static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, long level) {
+    PyObject *py_import = 0;
+    PyObject *empty_list = 0;
+    PyObject *module = 0;
+    PyObject *global_dict = 0;
+    PyObject *empty_dict = 0;
+    PyObject *list;
+    py_import = __Pyx_GetAttrString(__pyx_b, "__import__");
+    if (!py_import)
+        goto bad;
+    if (from_list)
+        list = from_list;
+    else {
+        empty_list = PyList_New(0);
+        if (!empty_list)
+            goto bad;
+        list = empty_list;
+    }
+    global_dict = PyModule_GetDict(__pyx_m);
+    if (!global_dict)
+        goto bad;
+    empty_dict = PyDict_New();
+    if (!empty_dict)
+        goto bad;
+    #if PY_VERSION_HEX >= 0x02050000
+    {
+        #if PY_MAJOR_VERSION >= 3
+        if (level == -1) {
+            if (strchr(__Pyx_MODULE_NAME, '.')) {
+                /* try package relative import first */
+                PyObject *py_level = PyInt_FromLong(1);
+                if (!py_level)
+                    goto bad;
+                module = PyObject_CallFunctionObjArgs(py_import,
+                    name, global_dict, empty_dict, list, py_level, NULL);
+                Py_DECREF(py_level);
+                if (!module) {
+                    if (!PyErr_ExceptionMatches(PyExc_ImportError))
+                        goto bad;
+                    PyErr_Clear();
+                }
+            }
+            level = 0; /* try absolute import on failure */
+        }
+        #endif
+        if (!module) {
+            PyObject *py_level = PyInt_FromLong(level);
+            if (!py_level)
+                goto bad;
+            module = PyObject_CallFunctionObjArgs(py_import,
+                name, global_dict, empty_dict, list, py_level, NULL);
+            Py_DECREF(py_level);
+        }
+    }
+    #else
+    if (level>0) {
+        PyErr_SetString(PyExc_RuntimeError, "Relative import is not supported for Python <=2.4.");
+        goto bad;
+    }
+    module = PyObject_CallFunctionObjArgs(py_import,
+        name, global_dict, empty_dict, list, NULL);
+    #endif
+bad:
+    Py_XDECREF(empty_list);
+    Py_XDECREF(py_import);
+    Py_XDECREF(empty_dict);
+    return module;
+}
+
+static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_int64_t(int64_t val) {
+    const int64_t neg_one = (int64_t)-1, const_zero = (int64_t)0;
+    const int is_unsigned = const_zero < neg_one;
+    if ((sizeof(int64_t) == sizeof(char))  ||
+        (sizeof(int64_t) == sizeof(short))) {
+        return PyInt_FromLong((long)val);
+    } else if ((sizeof(int64_t) == sizeof(int)) ||
+               (sizeof(int64_t) == sizeof(long))) {
+        if (is_unsigned)
+            return PyLong_FromUnsignedLong((unsigned long)val);
+        else
+            return PyInt_FromLong((long)val);
+    } else if (sizeof(int64_t) == sizeof(PY_LONG_LONG)) {
+        if (is_unsigned)
+            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG)val);
+        else
+            return PyLong_FromLongLong((PY_LONG_LONG)val);
+    } else {
+        int one = 1; int little = (int)*(unsigned char *)&one;
+        unsigned char *bytes = (unsigned char *)&val;
+        return _PyLong_FromByteArray(bytes, sizeof(int64_t),
+                                     little, !is_unsigned);
+    }
+}
+
+static CYTHON_INLINE int64_t __Pyx_PyInt_from_py_int64_t(PyObject* x) {
+    const int64_t neg_one = (int64_t)-1, const_zero = (int64_t)0;
+    const int is_unsigned = const_zero < neg_one;
+    if (sizeof(int64_t) == sizeof(char)) {
+        if (is_unsigned)
+            return (int64_t)__Pyx_PyInt_AsUnsignedChar(x);
+        else
+            return (int64_t)__Pyx_PyInt_AsSignedChar(x);
+    } else if (sizeof(int64_t) == sizeof(short)) {
+        if (is_unsigned)
+            return (int64_t)__Pyx_PyInt_AsUnsignedShort(x);
+        else
+            return (int64_t)__Pyx_PyInt_AsSignedShort(x);
+    } else if (sizeof(int64_t) == sizeof(int)) {
+        if (is_unsigned)
+            return (int64_t)__Pyx_PyInt_AsUnsignedInt(x);
+        else
+            return (int64_t)__Pyx_PyInt_AsSignedInt(x);
+    } else if (sizeof(int64_t) == sizeof(long)) {
+        if (is_unsigned)
+            return (int64_t)__Pyx_PyInt_AsUnsignedLong(x);
+        else
+            return (int64_t)__Pyx_PyInt_AsSignedLong(x);
+    } else if (sizeof(int64_t) == sizeof(PY_LONG_LONG)) {
+        if (is_unsigned)
+            return (int64_t)__Pyx_PyInt_AsUnsignedLongLong(x);
+        else
+            return (int64_t)__Pyx_PyInt_AsSignedLongLong(x);
+    }  else {
+        #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
+        PyErr_SetString(PyExc_RuntimeError,
+                        "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
+        #else
+        int64_t val;
+        PyObject *v = __Pyx_PyNumber_Int(x);
+        #if PY_VERSION_HEX < 0x03000000
+        if (likely(v) && !PyLong_Check(v)) {
+            PyObject *tmp = v;
+            v = PyNumber_Long(tmp);
+            Py_DECREF(tmp);
+        }
+        #endif
+        if (likely(v)) {
+            int one = 1; int is_little = (int)*(unsigned char *)&one;
+            unsigned char *bytes = (unsigned char *)&val;
+            int ret = _PyLong_AsByteArray((PyLongObject *)v,
+                                          bytes, sizeof(val),
+                                          is_little, !is_unsigned);
+            Py_DECREF(v);
+            if (likely(!ret))
+                return val;
+        }
+        #endif
+        return (int64_t)-1;
+    }
+}
+
+#if CYTHON_CCOMPLEX
+  #ifdef __cplusplus
+    static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
+      return ::std::complex< float >(x, y);
+    }
+  #else
+    static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
+      return x + y*(__pyx_t_float_complex)_Complex_I;
+    }
+  #endif
+#else
+    static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
+      __pyx_t_float_complex z;
+      z.real = x;
+      z.imag = y;
+      return z;
+    }
+#endif
+
+#if CYTHON_CCOMPLEX
+#else
+    static CYTHON_INLINE int __Pyx_c_eqf(__pyx_t_float_complex a, __pyx_t_float_complex b) {
+       return (a.real == b.real) && (a.imag == b.imag);
+    }
+    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sumf(__pyx_t_float_complex a, __pyx_t_float_complex b) {
+        __pyx_t_float_complex z;
+        z.real = a.real + b.real;
+        z.imag = a.imag + b.imag;
+        return z;
+    }
+    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_difff(__pyx_t_float_complex a, __pyx_t_float_complex b) {
+        __pyx_t_float_complex z;
+        z.real = a.real - b.real;
+        z.imag = a.imag - b.imag;
+        return z;
+    }
+    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prodf(__pyx_t_float_complex a, __pyx_t_float_complex b) {
+        __pyx_t_float_complex z;
+        z.real = a.real * b.real - a.imag * b.imag;
+        z.imag = a.real * b.imag + a.imag * b.real;
+        return z;
+    }
+    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quotf(__pyx_t_float_complex a, __pyx_t_float_complex b) {
+        __pyx_t_float_complex z;
+        float denom = b.real * b.real + b.imag * b.imag;
+        z.real = (a.real * b.real + a.imag * b.imag) / denom;
+        z.imag = (a.imag * b.real - a.real * b.imag) / denom;
+        return z;
+    }
+    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_negf(__pyx_t_float_complex a) {
+        __pyx_t_float_complex z;
+        z.real = -a.real;
+        z.imag = -a.imag;
+        return z;
+    }
+    static CYTHON_INLINE int __Pyx_c_is_zerof(__pyx_t_float_complex a) {
+       return (a.real == 0) && (a.imag == 0);
+    }
+    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conjf(__pyx_t_float_complex a) {
+        __pyx_t_float_complex z;
+        z.real =  a.real;
+        z.imag = -a.imag;
+        return z;
+    }
+    #if 1
+        static CYTHON_INLINE float __Pyx_c_absf(__pyx_t_float_complex z) {
+          #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
+            return sqrtf(z.real*z.real + z.imag*z.imag);
+          #else
+            return hypotf(z.real, z.imag);
+          #endif
+        }
+        static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_powf(__pyx_t_float_complex a, __pyx_t_float_complex b) {
+            __pyx_t_float_complex z;
+            float r, lnr, theta, z_r, z_theta;
+            if (b.imag == 0 && b.real == (int)b.real) {
+                if (b.real < 0) {
+                    float denom = a.real * a.real + a.imag * a.imag;
+                    a.real = a.real / denom;
+                    a.imag = -a.imag / denom;
+                    b.real = -b.real;
+                }
+                switch ((int)b.real) {
+                    case 0:
+                        z.real = 1;
+                        z.imag = 0;
+                        return z;
+                    case 1:
+                        return a;
+                    case 2:
+                        z = __Pyx_c_prodf(a, a);
+                        return __Pyx_c_prodf(a, a);
+                    case 3:
+                        z = __Pyx_c_prodf(a, a);
+                        return __Pyx_c_prodf(z, a);
+                    case 4:
+                        z = __Pyx_c_prodf(a, a);
+                        return __Pyx_c_prodf(z, z);
+                }
+            }
+            if (a.imag == 0) {
+                if (a.real == 0) {
+                    return a;
+                }
+                r = a.real;
+                theta = 0;
+            } else {
+                r = __Pyx_c_absf(a);
+                theta = atan2f(a.imag, a.real);
+            }
+            lnr = logf(r);
+            z_r = expf(lnr * b.real - theta * b.imag);
+            z_theta = theta * b.real + lnr * b.imag;
+            z.real = z_r * cosf(z_theta);
+            z.imag = z_r * sinf(z_theta);
+            return z;
+        }
+    #endif
+#endif
+
+#if CYTHON_CCOMPLEX
+  #ifdef __cplusplus
+    static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
+      return ::std::complex< double >(x, y);
+    }
+  #else
+    static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
+      return x + y*(__pyx_t_double_complex)_Complex_I;
+    }
+  #endif
+#else
+    static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
+      __pyx_t_double_complex z;
+      z.real = x;
+      z.imag = y;
+      return z;
+    }
+#endif
+
+#if CYTHON_CCOMPLEX
+#else
+    static CYTHON_INLINE int __Pyx_c_eq(__pyx_t_double_complex a, __pyx_t_double_complex b) {
+       return (a.real == b.real) && (a.imag == b.imag);
+    }
+    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum(__pyx_t_double_complex a, __pyx_t_double_complex b) {
+        __pyx_t_double_complex z;
+        z.real = a.real + b.real;
+        z.imag = a.imag + b.imag;
+        return z;
+    }
+    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff(__pyx_t_double_complex a, __pyx_t_double_complex b) {
+        __pyx_t_double_complex z;
+        z.real = a.real - b.real;
+        z.imag = a.imag - b.imag;
+        return z;
+    }
+    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod(__pyx_t_double_complex a, __pyx_t_double_complex b) {
+        __pyx_t_double_complex z;
+        z.real = a.real * b.real - a.imag * b.imag;
+        z.imag = a.real * b.imag + a.imag * b.real;
+        return z;
+    }
+    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot(__pyx_t_double_complex a, __pyx_t_double_complex b) {
+        __pyx_t_double_complex z;
+        double denom = b.real * b.real + b.imag * b.imag;
+        z.real = (a.real * b.real + a.imag * b.imag) / denom;
+        z.imag = (a.imag * b.real - a.real * b.imag) / denom;
+        return z;
+    }
+    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg(__pyx_t_double_complex a) {
+        __pyx_t_double_complex z;
+        z.real = -a.real;
+        z.imag = -a.imag;
+        return z;
+    }
+    static CYTHON_INLINE int __Pyx_c_is_zero(__pyx_t_double_complex a) {
+       return (a.real == 0) && (a.imag == 0);
+    }
+    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj(__pyx_t_double_complex a) {
+        __pyx_t_double_complex z;
+        z.real =  a.real;
+        z.imag = -a.imag;
+        return z;
+    }
+    #if 1
+        static CYTHON_INLINE double __Pyx_c_abs(__pyx_t_double_complex z) {
+          #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
+            return sqrt(z.real*z.real + z.imag*z.imag);
+          #else
+            return hypot(z.real, z.imag);
+          #endif
+        }
+        static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow(__pyx_t_double_complex a, __pyx_t_double_complex b) {
+            __pyx_t_double_complex z;
+            double r, lnr, theta, z_r, z_theta;
+            if (b.imag == 0 && b.real == (int)b.real) {
+                if (b.real < 0) {
+                    double denom = a.real * a.real + a.imag * a.imag;
+                    a.real = a.real / denom;
+                    a.imag = -a.imag / denom;
+                    b.real = -b.real;
+                }
+                switch ((int)b.real) {
+                    case 0:
+                        z.real = 1;
+                        z.imag = 0;
+                        return z;
+                    case 1:
+                        return a;
+                    case 2:
+                        z = __Pyx_c_prod(a, a);
+                        return __Pyx_c_prod(a, a);
+                    case 3:
+                        z = __Pyx_c_prod(a, a);
+                        return __Pyx_c_prod(z, a);
+                    case 4:
+                        z = __Pyx_c_prod(a, a);
+                        return __Pyx_c_prod(z, z);
+                }
+            }
+            if (a.imag == 0) {
+                if (a.real == 0) {
+                    return a;
+                }
+                r = a.real;
+                theta = 0;
+            } else {
+                r = __Pyx_c_abs(a);
+                theta = atan2(a.imag, a.real);
+            }
+            lnr = log(r);
+            z_r = exp(lnr * b.real - theta * b.imag);
+            z_theta = theta * b.real + lnr * b.imag;
+            z.real = z_r * cos(z_theta);
+            z.imag = z_r * sin(z_theta);
+            return z;
+        }
+    #endif
+#endif
+
+static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject* x) {
+    const unsigned char neg_one = (unsigned char)-1, const_zero = 0;
+    const int is_unsigned = neg_one > const_zero;
+    if (sizeof(unsigned char) < sizeof(long)) {
+        long val = __Pyx_PyInt_AsLong(x);
+        if (unlikely(val != (long)(unsigned char)val)) {
+            if (!unlikely(val == -1 && PyErr_Occurred())) {
+                PyErr_SetString(PyExc_OverflowError,
+                    (is_unsigned && unlikely(val < 0)) ?
+                    "can't convert negative value to unsigned char" :
+                    "value too large to convert to unsigned char");
+            }
+            return (unsigned char)-1;
+        }
+        return (unsigned char)val;
+    }
+    return (unsigned char)__Pyx_PyInt_AsUnsignedLong(x);
+}
+
+static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject* x) {
+    const unsigned short neg_one = (unsigned short)-1, const_zero = 0;
+    const int is_unsigned = neg_one > const_zero;
+    if (sizeof(unsigned short) < sizeof(long)) {
+        long val = __Pyx_PyInt_AsLong(x);
+        if (unlikely(val != (long)(unsigned short)val)) {
+            if (!unlikely(val == -1 && PyErr_Occurred())) {
+                PyErr_SetString(PyExc_OverflowError,
+                    (is_unsigned && unlikely(val < 0)) ?
+                    "can't convert negative value to unsigned short" :
+                    "value too large to convert to unsigned short");
+            }
+            return (unsigned short)-1;
+        }
+        return (unsigned short)val;
+    }
+    return (unsigned short)__Pyx_PyInt_AsUnsignedLong(x);
+}
+
+static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject* x) {
+    const unsigned int neg_one = (unsigned int)-1, const_zero = 0;
+    const int is_unsigned = neg_one > const_zero;
+    if (sizeof(unsigned int) < sizeof(long)) {
+        long val = __Pyx_PyInt_AsLong(x);
+        if (unlikely(val != (long)(unsigned int)val)) {
+            if (!unlikely(val == -1 && PyErr_Occurred())) {
+                PyErr_SetString(PyExc_OverflowError,
+                    (is_unsigned && unlikely(val < 0)) ?
+                    "can't convert negative value to unsigned int" :
+                    "value too large to convert to unsigned int");
+            }
+            return (unsigned int)-1;
+        }
+        return (unsigned int)val;
+    }
+    return (unsigned int)__Pyx_PyInt_AsUnsignedLong(x);
+}
+
+static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject* x) {
+    const char neg_one = (char)-1, const_zero = 0;
+    const int is_unsigned = neg_one > const_zero;
+    if (sizeof(char) < sizeof(long)) {
+        long val = __Pyx_PyInt_AsLong(x);
+        if (unlikely(val != (long)(char)val)) {
+            if (!unlikely(val == -1 && PyErr_Occurred())) {
+                PyErr_SetString(PyExc_OverflowError,
+                    (is_unsigned && unlikely(val < 0)) ?
+                    "can't convert negative value to char" :
+                    "value too large to convert to char");
+            }
+            return (char)-1;
+        }
+        return (char)val;
+    }
+    return (char)__Pyx_PyInt_AsLong(x);
+}
+
+static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject* x) {
+    const short neg_one = (short)-1, const_zero = 0;
+    const int is_unsigned = neg_one > const_zero;
+    if (sizeof(short) < sizeof(long)) {
+        long val = __Pyx_PyInt_AsLong(x);
+        if (unlikely(val != (long)(short)val)) {
+            if (!unlikely(val == -1 && PyErr_Occurred())) {
+                PyErr_SetString(PyExc_OverflowError,
+                    (is_unsigned && unlikely(val < 0)) ?
+                    "can't convert negative value to short" :
+                    "value too large to convert to short");
+            }
+            return (short)-1;
+        }
+        return (short)val;
+    }
+    return (short)__Pyx_PyInt_AsLong(x);
+}
+
+static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject* x) {
+    const int neg_one = (int)-1, const_zero = 0;
+    const int is_unsigned = neg_one > const_zero;
+    if (sizeof(int) < sizeof(long)) {
+        long val = __Pyx_PyInt_AsLong(x);
+        if (unlikely(val != (long)(int)val)) {
+            if (!unlikely(val == -1 && PyErr_Occurred())) {
+                PyErr_SetString(PyExc_OverflowError,
+                    (is_unsigned && unlikely(val < 0)) ?
+                    "can't convert negative value to int" :
+                    "value too large to convert to int");
+            }
+            return (int)-1;
+        }
+        return (int)val;
+    }
+    return (int)__Pyx_PyInt_AsLong(x);
+}
+
+static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject* x) {
+    const signed char neg_one = (signed char)-1, const_zero = 0;
+    const int is_unsigned = neg_one > const_zero;
+    if (sizeof(signed char) < sizeof(long)) {
+        long val = __Pyx_PyInt_AsLong(x);
+        if (unlikely(val != (long)(signed char)val)) {
+            if (!unlikely(val == -1 && PyErr_Occurred())) {
+                PyErr_SetString(PyExc_OverflowError,
+                    (is_unsigned && unlikely(val < 0)) ?
+                    "can't convert negative value to signed char" :
+                    "value too large to convert to signed char");
+            }
+            return (signed char)-1;
+        }
+        return (signed char)val;
+    }
+    return (signed char)__Pyx_PyInt_AsSignedLong(x);
+}
+
+static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject* x) {
+    const signed short neg_one = (signed short)-1, const_zero = 0;
+    const int is_unsigned = neg_one > const_zero;
+    if (sizeof(signed short) < sizeof(long)) {
+        long val = __Pyx_PyInt_AsLong(x);
+        if (unlikely(val != (long)(signed short)val)) {
+            if (!unlikely(val == -1 && PyErr_Occurred())) {
+                PyErr_SetString(PyExc_OverflowError,
+                    (is_unsigned && unlikely(val < 0)) ?
+                    "can't convert negative value to signed short" :
+                    "value too large to convert to signed short");
+            }
+            return (signed short)-1;
+        }
+        return (signed short)val;
+    }
+    return (signed short)__Pyx_PyInt_AsSignedLong(x);
+}
+
+static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject* x) {
+    const signed int neg_one = (signed int)-1, const_zero = 0;
+    const int is_unsigned = neg_one > const_zero;
+    if (sizeof(signed int) < sizeof(long)) {
+        long val = __Pyx_PyInt_AsLong(x);
+        if (unlikely(val != (long)(signed int)val)) {
+            if (!unlikely(val == -1 && PyErr_Occurred())) {
+                PyErr_SetString(PyExc_OverflowError,
+                    (is_unsigned && unlikely(val < 0)) ?
+                    "can't convert negative value to signed int" :
+                    "value too large to convert to signed int");
+            }
+            return (signed int)-1;
+        }
+        return (signed int)val;
+    }
+    return (signed int)__Pyx_PyInt_AsSignedLong(x);
+}
+
+static CYTHON_INLINE int __Pyx_PyInt_AsLongDouble(PyObject* x) {
+    const int neg_one = (int)-1, const_zero = 0;
+    const int is_unsigned = neg_one > const_zero;
+    if (sizeof(int) < sizeof(long)) {
+        long val = __Pyx_PyInt_AsLong(x);
+        if (unlikely(val != (long)(int)val)) {
+            if (!unlikely(val == -1 && PyErr_Occurred())) {
+                PyErr_SetString(PyExc_OverflowError,
+                    (is_unsigned && unlikely(val < 0)) ?
+                    "can't convert negative value to int" :
+                    "value too large to convert to int");
+            }
+            return (int)-1;
+        }
+        return (int)val;
+    }
+    return (int)__Pyx_PyInt_AsLong(x);
+}
+
+static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) {
+    const unsigned long neg_one = (unsigned long)-1, const_zero = 0;
+    const int is_unsigned = neg_one > const_zero;
+#if PY_VERSION_HEX < 0x03000000
+    if (likely(PyInt_Check(x))) {
+        long val = PyInt_AS_LONG(x);
+        if (is_unsigned && unlikely(val < 0)) {
+            PyErr_SetString(PyExc_OverflowError,
+                            "can't convert negative value to unsigned long");
+            return (unsigned long)-1;
+        }
+        return (unsigned long)val;
+    } else
+#endif
+    if (likely(PyLong_Check(x))) {
+        if (is_unsigned) {
+            if (unlikely(Py_SIZE(x) < 0)) {
+                PyErr_SetString(PyExc_OverflowError,
+                                "can't convert negative value to unsigned long");
+                return (unsigned long)-1;
+            }
+            return (unsigned long)PyLong_AsUnsignedLong(x);
+        } else {
+            return (unsigned long)PyLong_AsLong(x);
+        }
+    } else {
+        unsigned long val;
+        PyObject *tmp = __Pyx_PyNumber_Int(x);
+        if (!tmp) return (unsigned long)-1;
+        val = __Pyx_PyInt_AsUnsignedLong(tmp);
+        Py_DECREF(tmp);
+        return val;
+    }
+}
+
+static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject* x) {
+    const unsigned PY_LONG_LONG neg_one = (unsigned PY_LONG_LONG)-1, const_zero = 0;
+    const int is_unsigned = neg_one > const_zero;
+#if PY_VERSION_HEX < 0x03000000
+    if (likely(PyInt_Check(x))) {
+        long val = PyInt_AS_LONG(x);
+        if (is_unsigned && unlikely(val < 0)) {
+            PyErr_SetString(PyExc_OverflowError,
+                            "can't convert negative value to unsigned PY_LONG_LONG");
+            return (unsigned PY_LONG_LONG)-1;
+        }
+        return (unsigned PY_LONG_LONG)val;
+    } else
+#endif
+    if (likely(PyLong_Check(x))) {
+        if (is_unsigned) {
+            if (unlikely(Py_SIZE(x) < 0)) {
+                PyErr_SetString(PyExc_OverflowError,
+                                "can't convert negative value to unsigned PY_LONG_LONG");
+                return (unsigned PY_LONG_LONG)-1;
+            }
+            return (unsigned PY_LONG_LONG)PyLong_AsUnsignedLongLong(x);
+        } else {
+            return (unsigned PY_LONG_LONG)PyLong_AsLongLong(x);
+        }
+    } else {
+        unsigned PY_LONG_LONG val;
+        PyObject *tmp = __Pyx_PyNumber_Int(x);
+        if (!tmp) return (unsigned PY_LONG_LONG)-1;
+        val = __Pyx_PyInt_AsUnsignedLongLong(tmp);
+        Py_DECREF(tmp);
+        return val;
+    }
+}
+
+static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject* x) {
+    const long neg_one = (long)-1, const_zero = 0;
+    const int is_unsigned = neg_one > const_zero;
+#if PY_VERSION_HEX < 0x03000000
+    if (likely(PyInt_Check(x))) {
+        long val = PyInt_AS_LONG(x);
+        if (is_unsigned && unlikely(val < 0)) {
+            PyErr_SetString(PyExc_OverflowError,
+                            "can't convert negative value to long");
+            return (long)-1;
+        }
+        return (long)val;
+    } else
+#endif
+    if (likely(PyLong_Check(x))) {
+        if (is_unsigned) {
+            if (unlikely(Py_SIZE(x) < 0)) {
+                PyErr_SetString(PyExc_OverflowError,
+                                "can't convert negative value to long");
+                return (long)-1;
+            }
+            return (long)PyLong_AsUnsignedLong(x);
+        } else {
+            return (long)PyLong_AsLong(x);
+        }
+    } else {
+        long val;
+        PyObject *tmp = __Pyx_PyNumber_Int(x);
+        if (!tmp) return (long)-1;
+        val = __Pyx_PyInt_AsLong(tmp);
+        Py_DECREF(tmp);
+        return val;
+    }
+}
+
+static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) {
+    const PY_LONG_LONG neg_one = (PY_LONG_LONG)-1, const_zero = 0;
+    const int is_unsigned = neg_one > const_zero;
+#if PY_VERSION_HEX < 0x03000000
+    if (likely(PyInt_Check(x))) {
+        long val = PyInt_AS_LONG(x);
+        if (is_unsigned && unlikely(val < 0)) {
+            PyErr_SetString(PyExc_OverflowError,
+                            "can't convert negative value to PY_LONG_LONG");
+            return (PY_LONG_LONG)-1;
+        }
+        return (PY_LONG_LONG)val;
+    } else
+#endif
+    if (likely(PyLong_Check(x))) {
+        if (is_unsigned) {
+            if (unlikely(Py_SIZE(x) < 0)) {
+                PyErr_SetString(PyExc_OverflowError,
+                                "can't convert negative value to PY_LONG_LONG");
+                return (PY_LONG_LONG)-1;
+            }
+            return (PY_LONG_LONG)PyLong_AsUnsignedLongLong(x);
+        } else {
+            return (PY_LONG_LONG)PyLong_AsLongLong(x);
+        }
+    } else {
+        PY_LONG_LONG val;
+        PyObject *tmp = __Pyx_PyNumber_Int(x);
+        if (!tmp) return (PY_LONG_LONG)-1;
+        val = __Pyx_PyInt_AsLongLong(tmp);
+        Py_DECREF(tmp);
+        return val;
+    }
+}
+
+static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) {
+    const signed long neg_one = (signed long)-1, const_zero = 0;
+    const int is_unsigned = neg_one > const_zero;
+#if PY_VERSION_HEX < 0x03000000
+    if (likely(PyInt_Check(x))) {
+        long val = PyInt_AS_LONG(x);
+        if (is_unsigned && unlikely(val < 0)) {
+            PyErr_SetString(PyExc_OverflowError,
+                            "can't convert negative value to signed long");
+            return (signed long)-1;
+        }
+        return (signed long)val;
+    } else
+#endif
+    if (likely(PyLong_Check(x))) {
+        if (is_unsigned) {
+            if (unlikely(Py_SIZE(x) < 0)) {
+                PyErr_SetString(PyExc_OverflowError,
+                                "can't convert negative value to signed long");
+                return (signed long)-1;
+            }
+            return (signed long)PyLong_AsUnsignedLong(x);
+        } else {
+            return (signed long)PyLong_AsLong(x);
+        }
+    } else {
+        signed long val;
+        PyObject *tmp = __Pyx_PyNumber_Int(x);
+        if (!tmp) return (signed long)-1;
+        val = __Pyx_PyInt_AsSignedLong(tmp);
+        Py_DECREF(tmp);
+        return val;
+    }
+}
+
+static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject* x) {
+    const signed PY_LONG_LONG neg_one = (signed PY_LONG_LONG)-1, const_zero = 0;
+    const int is_unsigned = neg_one > const_zero;
+#if PY_VERSION_HEX < 0x03000000
+    if (likely(PyInt_Check(x))) {
+        long val = PyInt_AS_LONG(x);
+        if (is_unsigned && unlikely(val < 0)) {
+            PyErr_SetString(PyExc_OverflowError,
+                            "can't convert negative value to signed PY_LONG_LONG");
+            return (signed PY_LONG_LONG)-1;
+        }
+        return (signed PY_LONG_LONG)val;
+    } else
+#endif
+    if (likely(PyLong_Check(x))) {
+        if (is_unsigned) {
+            if (unlikely(Py_SIZE(x) < 0)) {
+                PyErr_SetString(PyExc_OverflowError,
+                                "can't convert negative value to signed PY_LONG_LONG");
+                return (signed PY_LONG_LONG)-1;
+            }
+            return (signed PY_LONG_LONG)PyLong_AsUnsignedLongLong(x);
+        } else {
+            return (signed PY_LONG_LONG)PyLong_AsLongLong(x);
+        }
+    } else {
+        signed PY_LONG_LONG val;
+        PyObject *tmp = __Pyx_PyNumber_Int(x);
+        if (!tmp) return (signed PY_LONG_LONG)-1;
+        val = __Pyx_PyInt_AsSignedLongLong(tmp);
+        Py_DECREF(tmp);
+        return val;
+    }
+}
+
+static int __Pyx_check_binary_version(void) {
+    char ctversion[4], rtversion[4];
+    PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
+    PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
+    if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
+        char message[200];
+        PyOS_snprintf(message, sizeof(message),
+                      "compiletime version %s of module '%.100s' "
+                      "does not match runtime version %s",
+                      ctversion, __Pyx_MODULE_NAME, rtversion);
+        #if PY_VERSION_HEX < 0x02050000
+        return PyErr_Warn(NULL, message);
+        #else
+        return PyErr_WarnEx(NULL, message, 1);
+        #endif
+    }
+    return 0;
+}
+
+static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
+#if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3&&PY_MINOR_VERSION==0)
+    PyObject *ob = PyCapsule_New(vtable, 0, 0);
+#else
+    PyObject *ob = PyCObject_FromVoidPtr(vtable, 0);
+#endif
+    if (!ob)
+        goto bad;
+    if (PyDict_SetItemString(dict, "__pyx_vtable__", ob) < 0)
+        goto bad;
+    Py_DECREF(ob);
+    return 0;
+bad:
+    Py_XDECREF(ob);
+    return -1;
+}
+
+#ifndef __PYX_HAVE_RT_ImportModule
+#define __PYX_HAVE_RT_ImportModule
+static PyObject *__Pyx_ImportModule(const char *name) {
+    PyObject *py_name = 0;
+    PyObject *py_module = 0;
+    py_name = __Pyx_PyIdentifier_FromString(name);
+    if (!py_name)
+        goto bad;
+    py_module = PyImport_Import(py_name);
+    Py_DECREF(py_name);
+    return py_module;
+bad:
+    Py_XDECREF(py_name);
+    return 0;
+}
+#endif
+
+#ifndef __PYX_HAVE_RT_ImportType
+#define __PYX_HAVE_RT_ImportType
+static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name,
+    size_t size, int strict)
+{
+    PyObject *py_module = 0;
+    PyObject *result = 0;
+    PyObject *py_name = 0;
+    char warning[200];
+    py_module = __Pyx_ImportModule(module_name);
+    if (!py_module)
+        goto bad;
+    py_name = __Pyx_PyIdentifier_FromString(class_name);
+    if (!py_name)
+        goto bad;
+    result = PyObject_GetAttr(py_module, py_name);
+    Py_DECREF(py_name);
+    py_name = 0;
+    Py_DECREF(py_module);
+    py_module = 0;
+    if (!result)
+        goto bad;
+    if (!PyType_Check(result)) {
+        PyErr_Format(PyExc_TypeError,
+            "%s.%s is not a type object",
+            module_name, class_name);
+        goto bad;
+    }
+    if (!strict && (size_t)((PyTypeObject *)result)->tp_basicsize > size) {
+        PyOS_snprintf(warning, sizeof(warning),
+            "%s.%s size changed, may indicate binary incompatibility",
+            module_name, class_name);
+        #if PY_VERSION_HEX < 0x02050000
+        if (PyErr_Warn(NULL, warning) < 0) goto bad;
+        #else
+        if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad;
+        #endif
+    }
+    else if ((size_t)((PyTypeObject *)result)->tp_basicsize != size) {
+        PyErr_Format(PyExc_ValueError,
+            "%s.%s has the wrong size, try recompiling",
+            module_name, class_name);
+        goto bad;
+    }
+    return (PyTypeObject *)result;
+bad:
+    Py_XDECREF(py_module);
+    Py_XDECREF(result);
+    return NULL;
+}
+#endif
+
+static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
+    int start = 0, mid = 0, end = count - 1;
+    if (end >= 0 && code_line > entries[end].code_line) {
+        return count;
+    }
+    while (start < end) {
+        mid = (start + end) / 2;
+        if (code_line < entries[mid].code_line) {
+            end = mid;
+        } else if (code_line > entries[mid].code_line) {
+             start = mid + 1;
+        } else {
+            return mid;
+        }
+    }
+    if (code_line <= entries[mid].code_line) {
+        return mid;
+    } else {
+        return mid + 1;
+    }
+}
+static PyCodeObject *__pyx_find_code_object(int code_line) {
+    PyCodeObject* code_object;
+    int pos;
+    if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
+        return NULL;
+    }
+    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
+    if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
+        return NULL;
+    }
+    code_object = __pyx_code_cache.entries[pos].code_object;
+    Py_INCREF(code_object);
+    return code_object;
+}
+static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
+    int pos, i;
+    __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
+    if (unlikely(!code_line)) {
+        return;
+    }
+    if (unlikely(!entries)) {
+        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
+        if (likely(entries)) {
+            __pyx_code_cache.entries = entries;
+            __pyx_code_cache.max_count = 64;
+            __pyx_code_cache.count = 1;
+            entries[0].code_line = code_line;
+            entries[0].code_object = code_object;
+            Py_INCREF(code_object);
+        }
+        return;
+    }
+    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
+    if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
+        PyCodeObject* tmp = entries[pos].code_object;
+        entries[pos].code_object = code_object;
+        Py_DECREF(tmp);
+        return;
+    }
+    if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
+        int new_max = __pyx_code_cache.max_count + 64;
+        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
+            __pyx_code_cache.entries, new_max*sizeof(__Pyx_CodeObjectCacheEntry));
+        if (unlikely(!entries)) {
+            return;
+        }
+        __pyx_code_cache.entries = entries;
+        __pyx_code_cache.max_count = new_max;
+    }
+    for (i=__pyx_code_cache.count; i>pos; i--) {
+        entries[i] = entries[i-1];
+    }
+    entries[pos].code_line = code_line;
+    entries[pos].code_object = code_object;
+    __pyx_code_cache.count++;
+    Py_INCREF(code_object);
+}
+
+#include "compile.h"
+#include "frameobject.h"
+#include "traceback.h"
+static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
+            const char *funcname, int c_line,
+            int py_line, const char *filename) {
+    PyCodeObject *py_code = 0;
+    PyObject *py_srcfile = 0;
+    PyObject *py_funcname = 0;
+    #if PY_MAJOR_VERSION < 3
+    py_srcfile = PyString_FromString(filename);
+    #else
+    py_srcfile = PyUnicode_FromString(filename);
+    #endif
+    if (!py_srcfile) goto bad;
+    if (c_line) {
+        #if PY_MAJOR_VERSION < 3
+        py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
+        #else
+        py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
+        #endif
+    }
+    else {
+        #if PY_MAJOR_VERSION < 3
+        py_funcname = PyString_FromString(funcname);
+        #else
+        py_funcname = PyUnicode_FromString(funcname);
+        #endif
+    }
+    if (!py_funcname) goto bad;
+    py_code = __Pyx_PyCode_New(
+        0,            /*int argcount,*/
+        0,            /*int kwonlyargcount,*/
+        0,            /*int nlocals,*/
+        0,            /*int stacksize,*/
+        0,            /*int flags,*/
+        __pyx_empty_bytes, /*PyObject *code,*/
+        __pyx_empty_tuple, /*PyObject *consts,*/
+        __pyx_empty_tuple, /*PyObject *names,*/
+        __pyx_empty_tuple, /*PyObject *varnames,*/
+        __pyx_empty_tuple, /*PyObject *freevars,*/
+        __pyx_empty_tuple, /*PyObject *cellvars,*/
+        py_srcfile,   /*PyObject *filename,*/
+        py_funcname,  /*PyObject *name,*/
+        py_line,      /*int firstlineno,*/
+        __pyx_empty_bytes  /*PyObject *lnotab*/
+    );
+    Py_DECREF(py_srcfile);
+    Py_DECREF(py_funcname);
+    return py_code;
+bad:
+    Py_XDECREF(py_srcfile);
+    Py_XDECREF(py_funcname);
+    return NULL;
+}
+static void __Pyx_AddTraceback(const char *funcname, int c_line,
+                               int py_line, const char *filename) {
+    PyCodeObject *py_code = 0;
+    PyObject *py_globals = 0;
+    PyFrameObject *py_frame = 0;
+    py_code = __pyx_find_code_object(c_line ? c_line : py_line);
+    if (!py_code) {
+        py_code = __Pyx_CreateCodeObjectForTraceback(
+            funcname, c_line, py_line, filename);
+        if (!py_code) goto bad;
+        __pyx_insert_code_object(c_line ? c_line : py_line, py_code);
+    }
+    py_globals = PyModule_GetDict(__pyx_m);
+    if (!py_globals) goto bad;
+    py_frame = PyFrame_New(
+        PyThreadState_GET(), /*PyThreadState *tstate,*/
+        py_code,             /*PyCodeObject *code,*/
+        py_globals,          /*PyObject *globals,*/
+        0                    /*PyObject *locals*/
+    );
+    if (!py_frame) goto bad;
+    py_frame->f_lineno = py_line;
+    PyTraceBack_Here(py_frame);
+bad:
+    Py_XDECREF(py_code);
+    Py_XDECREF(py_frame);
+}
+
+static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
+    while (t->p) {
+        #if PY_MAJOR_VERSION < 3
+        if (t->is_unicode) {
+            *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
+        } else if (t->intern) {
+            *t->p = PyString_InternFromString(t->s);
+        } else {
+            *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
+        }
+        #else  /* Python 3+ has unicode identifiers */
+        if (t->is_unicode | t->is_str) {
+            if (t->intern) {
+                *t->p = PyUnicode_InternFromString(t->s);
+            } else if (t->encoding) {
+                *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
+            } else {
+                *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
+            }
+        } else {
+            *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
+        }
+        #endif
+        if (!*t->p)
+            return -1;
+        ++t;
+    }
+    return 0;
+}
+
+
+/* Type Conversion Functions */
+
+static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
+   int is_true = x == Py_True;
+   if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
+   else return PyObject_IsTrue(x);
+}
+
+static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) {
+  PyNumberMethods *m;
+  const char *name = NULL;
+  PyObject *res = NULL;
+#if PY_VERSION_HEX < 0x03000000
+  if (PyInt_Check(x) || PyLong_Check(x))
+#else
+  if (PyLong_Check(x))
+#endif
+    return Py_INCREF(x), x;
+  m = Py_TYPE(x)->tp_as_number;
+#if PY_VERSION_HEX < 0x03000000
+  if (m && m->nb_int) {
+    name = "int";
+    res = PyNumber_Int(x);
+  }
+  else if (m && m->nb_long) {
+    name = "long";
+    res = PyNumber_Long(x);
+  }
+#else
+  if (m && m->nb_int) {
+    name = "int";
+    res = PyNumber_Long(x);
+  }
+#endif
+  if (res) {
+#if PY_VERSION_HEX < 0x03000000
+    if (!PyInt_Check(res) && !PyLong_Check(res)) {
+#else
+    if (!PyLong_Check(res)) {
+#endif
+      PyErr_Format(PyExc_TypeError,
+                   "__%s__ returned non-%s (type %.200s)",
+                   name, name, Py_TYPE(res)->tp_name);
+      Py_DECREF(res);
+      return NULL;
+    }
+  }
+  else if (!PyErr_Occurred()) {
+    PyErr_SetString(PyExc_TypeError,
+                    "an integer is required");
+  }
+  return res;
+}
+
+static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
+  Py_ssize_t ival;
+  PyObject* x = PyNumber_Index(b);
+  if (!x) return -1;
+  ival = PyInt_AsSsize_t(x);
+  Py_DECREF(x);
+  return ival;
+}
+
+static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
+#if PY_VERSION_HEX < 0x02050000
+   if (ival <= LONG_MAX)
+       return PyInt_FromLong((long)ival);
+   else {
+       unsigned char *bytes = (unsigned char *) &ival;
+       int one = 1; int little = (int)*(unsigned char*)&one;
+       return _PyLong_FromByteArray(bytes, sizeof(size_t), little, 0);
+   }
+#else
+   return PyInt_FromSize_t(ival);
+#endif
+}
+
+static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject* x) {
+   unsigned PY_LONG_LONG val = __Pyx_PyInt_AsUnsignedLongLong(x);
+   if (unlikely(val == (unsigned PY_LONG_LONG)-1 && PyErr_Occurred())) {
+       return (size_t)-1;
+   } else if (unlikely(val != (unsigned PY_LONG_LONG)(size_t)val)) {
+       PyErr_SetString(PyExc_OverflowError,
+                       "value too large to convert to size_t");
+       return (size_t)-1;
+   }
+   return (size_t)val;
+}
+
+
+#endif /* Py_PYTHON_H */
diff --git a/pyfftw/pyfftw.pxd b/pyfftw/pyfftw.pxd
new file mode 100644
index 0000000..12cfd2f
--- /dev/null
+++ b/pyfftw/pyfftw.pxd
@@ -0,0 +1,261 @@
+# Copyright 2012 Knowledge Economy Developments Ltd
+# 
+# Henry Gomersall
+# heng at kedevelopments.co.uk
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+cimport numpy as np
+from libc.stdint cimport int64_t
+
+ctypedef struct _fftw_iodim:
+    int _n
+    int _is
+    int _os
+
+cdef extern from 'pyfftw_complex.h':
+    
+    ctypedef float cfloat[2]
+    ctypedef double cdouble[2]
+    ctypedef long double clongdouble[2]
+
+cdef extern from 'fftw3.h':
+    
+    # Double precision plans
+    ctypedef struct fftw_plan_struct:
+        pass
+
+    ctypedef fftw_plan_struct *fftw_plan
+
+    # Single precision plans
+    ctypedef struct fftwf_plan_struct:
+        pass
+
+    ctypedef fftwf_plan_struct *fftwf_plan
+
+    # Long double precision plans
+    ctypedef struct fftwl_plan_struct:
+        pass
+
+    ctypedef fftwl_plan_struct *fftwl_plan
+
+    # The stride info structure. I think that strictly
+    # speaking, this should be defined with a type suffix
+    # on fftw (ie fftw, fftwf or fftwl), but since the
+    # definition is transparent and is defined as _fftw_iodim,
+    # we ignore the distinction in order to simplify the code.
+    ctypedef struct fftw_iodim:
+        pass
+    
+    # Double precision complex planner
+    fftw_plan fftw_plan_guru_dft(
+            int rank, fftw_iodim *dims,
+            int howmany_rank, fftw_iodim *howmany_dims,
+            cdouble *_in, cdouble *_out,
+            int sign, unsigned flags)
+    
+    # Single precision complex planner
+    fftwf_plan fftwf_plan_guru_dft(
+            int rank, fftw_iodim *dims,
+            int howmany_rank, fftw_iodim *howmany_dims,
+            cfloat *_in, cfloat *_out,
+            int sign, unsigned flags)
+
+    # Single precision complex planner
+    fftwl_plan fftwl_plan_guru_dft(
+            int rank, fftw_iodim *dims,
+            int howmany_rank, fftw_iodim *howmany_dims,
+            clongdouble *_in, clongdouble *_out,
+            int sign, unsigned flags)
+    
+    # Double precision real to complex planner
+    fftw_plan fftw_plan_guru_dft_r2c(
+            int rank, fftw_iodim *dims,
+            int howmany_rank, fftw_iodim *howmany_dims,
+            double *_in, cdouble *_out,
+            unsigned flags)
+    
+    # Single precision real to complex planner
+    fftwf_plan fftwf_plan_guru_dft_r2c(
+            int rank, fftw_iodim *dims,
+            int howmany_rank, fftw_iodim *howmany_dims,
+            float *_in, cfloat *_out,
+            unsigned flags)
+
+    # Single precision real to complex planner
+    fftwl_plan fftwl_plan_guru_dft_r2c(
+            int rank, fftw_iodim *dims,
+            int howmany_rank, fftw_iodim *howmany_dims,
+            long double *_in, clongdouble *_out,
+            unsigned flags)
+
+    # Double precision complex to real planner
+    fftw_plan fftw_plan_guru_dft_c2r(
+            int rank, fftw_iodim *dims,
+            int howmany_rank, fftw_iodim *howmany_dims,
+            cdouble *_in, double *_out,
+            unsigned flags)
+    
+    # Single precision complex to real planner
+    fftwf_plan fftwf_plan_guru_dft_c2r(
+            int rank, fftw_iodim *dims,
+            int howmany_rank, fftw_iodim *howmany_dims,
+            cfloat *_in, float *_out,
+            unsigned flags)
+
+    # Single precision complex to real planner
+    fftwl_plan fftwl_plan_guru_dft_c2r(
+            int rank, fftw_iodim *dims,
+            int howmany_rank, fftw_iodim *howmany_dims,
+            clongdouble *_in, long double *_out,
+            unsigned flags)
+
+    # Double precision complex new array execute
+    void fftw_execute_dft(fftw_plan,
+          cdouble *_in, cdouble *_out) nogil
+    
+    # Single precision complex new array execute    
+    void fftwf_execute_dft(fftwf_plan,
+          cfloat *_in, cfloat *_out) nogil
+
+    # Long double precision complex new array execute    
+    void fftwl_execute_dft(fftwl_plan,
+          clongdouble *_in, clongdouble *_out) nogil
+   
+    # Double precision real to complex new array execute
+    void fftw_execute_dft_r2c(fftw_plan,
+          double *_in, cdouble *_out) nogil
+    
+    # Single precision real to complex new array execute    
+    void fftwf_execute_dft_r2c(fftwf_plan,
+          float *_in, cfloat *_out) nogil
+
+    # Long double precision real to complex new array execute    
+    void fftwl_execute_dft_r2c(fftwl_plan,
+          long double *_in, clongdouble *_out) nogil
+
+    # Double precision complex to real new array execute
+    void fftw_execute_dft_c2r(fftw_plan,
+          cdouble *_in, double *_out) nogil
+    
+    # Single precision complex to real new array execute    
+    void fftwf_execute_dft_c2r(fftwf_plan,
+          cfloat *_in, float *_out) nogil
+
+    # Long double precision complex to real new array execute    
+    void fftwl_execute_dft_c2r(fftwl_plan,
+          clongdouble *_in, long double *_out) nogil
+
+    # Double precision plan destroyer
+    void fftw_destroy_plan(fftw_plan)
+
+    # Single precision plan destroyer
+    void fftwf_destroy_plan(fftwf_plan)
+
+    # Long double precision plan destroyer
+    void fftwl_destroy_plan(fftwl_plan)
+
+    # Double precision set timelimit
+    void fftw_set_timelimit(double seconds)
+
+    # Single precision set timelimit
+    void fftwf_set_timelimit(double seconds)
+
+    # Long double precision set timelimit
+    void fftwl_set_timelimit(double seconds)
+
+    # Threading routines
+    # Double precision
+    void fftw_init_threads()
+    void fftw_plan_with_nthreads(int n)
+
+    # Single precision
+    void fftwf_init_threads()
+    void fftwf_plan_with_nthreads(int n)
+
+    # Long double precision
+    void fftwl_init_threads()
+    void fftwl_plan_with_nthreads(int n)
+
+    # cleanup routines
+    void fftw_cleanup()
+    void fftwf_cleanup()
+    void fftwl_cleanup()
+    void fftw_cleanup_threads()
+    void fftwf_cleanup_threads()
+    void fftwl_cleanup_threads()
+
+    # wisdom functions
+    void fftw_export_wisdom(void (*write_char)(char c, void *), void *data)
+    void fftwf_export_wisdom(void (*write_char)(char c, void *), void *data)
+    void fftwl_export_wisdom(void (*write_char)(char c, void *), void *data)
+
+    int fftw_import_wisdom_from_string(char *input_string)
+    int fftwf_import_wisdom_from_string(char *input_string)
+    int fftwl_import_wisdom_from_string(char *input_string)
+
+    #int fftw_export_wisdom_to_filename(char *filename)
+    #int fftwf_export_wisdom_to_filename(char *filename)
+    #int fftwl_export_wisdom_to_filename(char *filename)
+    #
+    #int fftw_import_wisdom_from_filename(char *filename)
+    #int fftwf_import_wisdom_from_filename(char *filename)
+    #int fftwl_import_wisdom_from_filename(char *filename)
+
+    void fftw_forget_wisdom()
+    void fftwf_forget_wisdom()
+    void fftwl_forget_wisdom()
+
+    double FFTW_NO_TIMELIMIT
+
+# Define function pointers that can act as a placeholder
+# for whichever dtype is used (the problem being that fftw
+# has different function names and signatures for all the 
+# different precisions and dft types).
+ctypedef void * (*fftw_generic_plan_guru)(
+        int rank, fftw_iodim *dims,
+        int howmany_rank, fftw_iodim *howmany_dims,
+        void *_in, void *_out,
+        int sign, int flags)
+
+ctypedef void (*fftw_generic_execute)(void *_plan, void *_in, void *_out) nogil
+
+ctypedef void (*fftw_generic_destroy_plan)(void *_plan)
+
+ctypedef void (*fftw_generic_init_threads)()
+
+ctypedef void (*fftw_generic_plan_with_nthreads)(int n)
+
+ctypedef void (*fftw_generic_set_timelimit)(double seconds)
+
+ctypedef bint (*validator)(np.ndarray input_array, 
+        np.ndarray output_array, int64_t *axes, int64_t *not_axes, 
+        int64_t axes_length)
+
+# Direction enum
+cdef enum:
+    FFTW_FORWARD = -1
+    FFTW_BACKWARD = 1
+
+# Documented flags
+cdef enum:
+    FFTW_MEASURE = 0
+    FFTW_DESTROY_INPUT = 1
+    FFTW_UNALIGNED = 2
+    FFTW_CONSERVE_MEMORY = 4
+    FFTW_EXHAUSTIVE = 8
+    FFTW_PRESERVE_INPUT = 16
+    FFTW_PATIENT = 32
+    FFTW_ESTIMATE = 64
+
diff --git a/pyfftw/pyfftw.pyx b/pyfftw/pyfftw.pyx
new file mode 100644
index 0000000..61d2407
--- /dev/null
+++ b/pyfftw/pyfftw.pyx
@@ -0,0 +1,1639 @@
+# Copyright 2012 Knowledge Economy Developments Ltd
+# 
+# Henry Gomersall
+# heng at kedevelopments.co.uk
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+import numpy as np
+cimport numpy as np
+from libc.stdlib cimport calloc, malloc, free
+from libc.stdint cimport intptr_t, int64_t
+from libc cimport limits
+
+include 'utils.pxi'
+
+cdef extern from *:
+    int Py_AtExit(void (*callback)()) 
+
+cdef object directions
+directions = {'FFTW_FORWARD': FFTW_FORWARD,
+        'FFTW_BACKWARD': FFTW_BACKWARD}
+
+cdef object flag_dict
+flag_dict = {'FFTW_MEASURE': FFTW_MEASURE,
+        'FFTW_EXHAUSTIVE': FFTW_EXHAUSTIVE,
+        'FFTW_PATIENT': FFTW_PATIENT,
+        'FFTW_ESTIMATE': FFTW_ESTIMATE,
+        'FFTW_UNALIGNED': FFTW_UNALIGNED,
+        'FFTW_DESTROY_INPUT': FFTW_DESTROY_INPUT}
+
+_flag_dict = flag_dict.copy()
+
+# Function wrappers
+# =================
+# All of these have the same signature as the fftw_generic functions
+# defined in the .pxd file. The arguments and return values are
+# cast as required in order to call the actual fftw functions.
+# 
+# The wrapper function names are simply the fftw names prefixed
+# with a single underscore.
+
+#     Planners
+#     ========
+#
+# Complex double precision
+cdef void* _fftw_plan_guru_dft(
+            int rank, fftw_iodim *dims,
+            int howmany_rank, fftw_iodim *howmany_dims,
+            void *_in, void *_out,
+            int sign, int flags):
+
+    return <void *>fftw_plan_guru_dft(rank, dims,
+            howmany_rank, howmany_dims,
+            <cdouble *>_in, <cdouble *>_out,
+            sign, flags)
+
+# Complex single precision
+cdef void* _fftwf_plan_guru_dft(
+            int rank, fftw_iodim *dims,
+            int howmany_rank, fftw_iodim *howmany_dims,
+            void *_in, void *_out,
+            int sign, int flags):
+
+    return <void *>fftwf_plan_guru_dft(rank, dims,
+            howmany_rank, howmany_dims,
+            <cfloat *>_in, <cfloat *>_out,
+            sign, flags)
+
+# Complex long double precision
+cdef void* _fftwl_plan_guru_dft(
+            int rank, fftw_iodim *dims,
+            int howmany_rank, fftw_iodim *howmany_dims,
+            void *_in, void *_out,
+            int sign, int flags):
+
+    return <void *>fftwl_plan_guru_dft(rank, dims,
+            howmany_rank, howmany_dims,
+            <clongdouble *>_in, <clongdouble *>_out,
+            sign, flags)
+
+# real to complex double precision
+cdef void* _fftw_plan_guru_dft_r2c(
+            int rank, fftw_iodim *dims,
+            int howmany_rank, fftw_iodim *howmany_dims,
+            void *_in, void *_out,
+            int sign, int flags):
+
+    return <void *>fftw_plan_guru_dft_r2c(rank, dims,
+            howmany_rank, howmany_dims,
+            <double *>_in, <cdouble *>_out,
+            flags)
+
+# real to complex single precision
+cdef void* _fftwf_plan_guru_dft_r2c(
+            int rank, fftw_iodim *dims,
+            int howmany_rank, fftw_iodim *howmany_dims,
+            void *_in, void *_out,
+            int sign, int flags):
+
+    return <void *>fftwf_plan_guru_dft_r2c(rank, dims,
+            howmany_rank, howmany_dims,
+            <float *>_in, <cfloat *>_out,
+            flags)
+
+# real to complex long double precision
+cdef void* _fftwl_plan_guru_dft_r2c(
+            int rank, fftw_iodim *dims,
+            int howmany_rank, fftw_iodim *howmany_dims,
+            void *_in, void *_out,
+            int sign, int flags):
+
+    return <void *>fftwl_plan_guru_dft_r2c(rank, dims,
+            howmany_rank, howmany_dims,
+            <long double *>_in, <clongdouble *>_out,
+            flags)
+
+# complex to real double precision
+cdef void* _fftw_plan_guru_dft_c2r(
+            int rank, fftw_iodim *dims,
+            int howmany_rank, fftw_iodim *howmany_dims,
+            void *_in, void *_out,
+            int sign, int flags):
+
+    return <void *>fftw_plan_guru_dft_c2r(rank, dims,
+            howmany_rank, howmany_dims,
+            <cdouble *>_in, <double *>_out,
+            flags)
+
+# complex to real single precision
+cdef void* _fftwf_plan_guru_dft_c2r(
+            int rank, fftw_iodim *dims,
+            int howmany_rank, fftw_iodim *howmany_dims,
+            void *_in, void *_out,
+            int sign, int flags):
+
+    return <void *>fftwf_plan_guru_dft_c2r(rank, dims,
+            howmany_rank, howmany_dims,
+            <cfloat *>_in, <float *>_out,
+            flags)
+
+# complex to real long double precision
+cdef void* _fftwl_plan_guru_dft_c2r(
+            int rank, fftw_iodim *dims,
+            int howmany_rank, fftw_iodim *howmany_dims,
+            void *_in, void *_out,
+            int sign, int flags):
+
+    return <void *>fftwl_plan_guru_dft_c2r(rank, dims,
+            howmany_rank, howmany_dims,
+            <clongdouble *>_in, <long double *>_out,
+            flags)
+
+#    Executors
+#    =========
+#
+# Complex double precision
+cdef void _fftw_execute_dft(void *_plan, void *_in, void *_out) nogil:
+
+    fftw_execute_dft(<fftw_plan>_plan, 
+            <cdouble *>_in, <cdouble *>_out)
+
+# Complex single precision
+cdef void _fftwf_execute_dft(void *_plan, void *_in, void *_out) nogil:
+
+    fftwf_execute_dft(<fftwf_plan>_plan, 
+            <cfloat *>_in, <cfloat *>_out)
+
+# Complex long double precision
+cdef void _fftwl_execute_dft(void *_plan, void *_in, void *_out) nogil:
+
+    fftwl_execute_dft(<fftwl_plan>_plan, 
+            <clongdouble *>_in, <clongdouble *>_out)
+
+# real to complex double precision
+cdef void _fftw_execute_dft_r2c(void *_plan, void *_in, void *_out) nogil:
+
+    fftw_execute_dft_r2c(<fftw_plan>_plan, 
+            <double *>_in, <cdouble *>_out)
+
+# real to complex single precision
+cdef void _fftwf_execute_dft_r2c(void *_plan, void *_in, void *_out) nogil:
+
+    fftwf_execute_dft_r2c(<fftwf_plan>_plan, 
+            <float *>_in, <cfloat *>_out)
+
+# real to complex long double precision
+cdef void _fftwl_execute_dft_r2c(void *_plan, void *_in, void *_out) nogil:
+
+    fftwl_execute_dft_r2c(<fftwl_plan>_plan, 
+            <long double *>_in, <clongdouble *>_out)
+
+# complex to real double precision
+cdef void _fftw_execute_dft_c2r(void *_plan, void *_in, void *_out) nogil:
+
+    fftw_execute_dft_c2r(<fftw_plan>_plan, 
+            <cdouble *>_in, <double *>_out)
+
+# complex to real single precision
+cdef void _fftwf_execute_dft_c2r(void *_plan, void *_in, void *_out) nogil:
+
+    fftwf_execute_dft_c2r(<fftwf_plan>_plan, 
+            <cfloat *>_in, <float *>_out)
+
+# complex to real long double precision
+cdef void _fftwl_execute_dft_c2r(void *_plan, void *_in, void *_out) nogil:
+
+    fftwl_execute_dft_c2r(<fftwl_plan>_plan, 
+            <clongdouble *>_in, <long double *>_out)
+
+#    Destroyers
+#    ==========
+#
+# Double precision
+cdef void _fftw_destroy_plan(void *_plan):
+
+    fftw_destroy_plan(<fftw_plan>_plan)
+
+# Single precision
+cdef void _fftwf_destroy_plan(void *_plan):
+
+    fftwf_destroy_plan(<fftwf_plan>_plan)
+
+# Long double precision
+cdef void _fftwl_destroy_plan(void *_plan):
+
+    fftwl_destroy_plan(<fftwl_plan>_plan)
+
+
+# Function lookup tables
+# ======================
+
+# Planner table (of side the number of planners).
+cdef fftw_generic_plan_guru planners[9]
+
+cdef fftw_generic_plan_guru * _build_planner_list():
+
+    planners[0] = <fftw_generic_plan_guru>&_fftw_plan_guru_dft
+    planners[1] = <fftw_generic_plan_guru>&_fftwf_plan_guru_dft
+    planners[2] = <fftw_generic_plan_guru>&_fftwl_plan_guru_dft
+    planners[3] = <fftw_generic_plan_guru>&_fftw_plan_guru_dft_r2c
+    planners[4] = <fftw_generic_plan_guru>&_fftwf_plan_guru_dft_r2c
+    planners[5] = <fftw_generic_plan_guru>&_fftwl_plan_guru_dft_r2c
+    planners[6] = <fftw_generic_plan_guru>&_fftw_plan_guru_dft_c2r
+    planners[7] = <fftw_generic_plan_guru>&_fftwf_plan_guru_dft_c2r
+    planners[8] = <fftw_generic_plan_guru>&_fftwl_plan_guru_dft_c2r
+
+# Executor table (of size the number of executors)
+cdef fftw_generic_execute executors[9]
+
+cdef fftw_generic_execute * _build_executor_list():
+
+    executors[0] = <fftw_generic_execute>&_fftw_execute_dft
+    executors[1] = <fftw_generic_execute>&_fftwf_execute_dft
+    executors[2] = <fftw_generic_execute>&_fftwl_execute_dft
+    executors[3] = <fftw_generic_execute>&_fftw_execute_dft_r2c
+    executors[4] = <fftw_generic_execute>&_fftwf_execute_dft_r2c
+    executors[5] = <fftw_generic_execute>&_fftwl_execute_dft_r2c
+    executors[6] = <fftw_generic_execute>&_fftw_execute_dft_c2r
+    executors[7] = <fftw_generic_execute>&_fftwf_execute_dft_c2r
+    executors[8] = <fftw_generic_execute>&_fftwl_execute_dft_c2r
+
+# Destroyer table (of size the number of destroyers)
+cdef fftw_generic_destroy_plan destroyers[3]
+
+cdef fftw_generic_destroy_plan * _build_destroyer_list():
+
+    destroyers[0] = <fftw_generic_destroy_plan>&_fftw_destroy_plan
+    destroyers[1] = <fftw_generic_destroy_plan>&_fftwf_destroy_plan
+    destroyers[2] = <fftw_generic_destroy_plan>&_fftwl_destroy_plan
+
+
+# nthreads plan setters table
+cdef fftw_generic_plan_with_nthreads nthreads_plan_setters[3]
+
+cdef fftw_generic_plan_with_nthreads * _build_nthreads_plan_setters_list():
+    nthreads_plan_setters[0] = (
+            <fftw_generic_plan_with_nthreads>&fftw_plan_with_nthreads)
+    nthreads_plan_setters[1] = (
+            <fftw_generic_plan_with_nthreads>&fftwf_plan_with_nthreads)
+    nthreads_plan_setters[2] = (
+            <fftw_generic_plan_with_nthreads>&fftwl_plan_with_nthreads)
+
+# Set planner timelimits
+cdef fftw_generic_set_timelimit set_timelimit_funcs[3]
+
+cdef fftw_generic_set_timelimit * _build_set_timelimit_funcs_list():
+    set_timelimit_funcs[0] = (
+            <fftw_generic_set_timelimit>&fftw_set_timelimit)
+    set_timelimit_funcs[1] = (
+            <fftw_generic_set_timelimit>&fftwf_set_timelimit)
+    set_timelimit_funcs[2] = (
+            <fftw_generic_set_timelimit>&fftwl_set_timelimit)
+
+
+# Data validators table
+cdef validator validators[2]
+
+cdef validator * _build_validators_list():
+    validators[0] = &_validate_r2c_arrays
+    validators[1] = &_validate_c2r_arrays
+
+# Validator functions
+# ===================
+cdef bint _validate_r2c_arrays(np.ndarray input_array, 
+        np.ndarray output_array, int64_t *axes, int64_t *not_axes, 
+        int64_t axes_length):
+    ''' Validates the input and output array to check for
+    a valid real to complex transform.
+    '''
+    # We firstly need to confirm that the dimenions of the arrays
+    # are the same
+    if not (input_array.ndim == output_array.ndim):
+        return False
+
+    in_shape = input_array.shape
+    out_shape = output_array.shape
+
+    for n in range(axes_length - 1):
+        if not out_shape[axes[n]] == in_shape[axes[n]]:
+            return False
+    
+    # The critical axis is the last of those over which the 
+    # FFT is taken.
+    if not (out_shape[axes[axes_length-1]]
+            == in_shape[axes[axes_length-1]]//2 + 1):
+        return False
+
+    for n in range(input_array.ndim - axes_length):
+        if not out_shape[not_axes[n]] == in_shape[not_axes[n]]:
+            return False
+
+    return True
+
+
+cdef bint _validate_c2r_arrays(np.ndarray input_array, 
+        np.ndarray output_array, int64_t *axes, int64_t *not_axes, 
+        int64_t axes_length):
+    ''' Validates the input and output array to check for
+    a valid complex to real transform.
+    '''
+
+    # We firstly need to confirm that the dimenions of the arrays
+    # are the same
+    if not (input_array.ndim == output_array.ndim):
+        return False
+
+    in_shape = input_array.shape
+    out_shape = output_array.shape
+
+    for n in range(axes_length - 1):
+        if not in_shape[axes[n]] == out_shape[axes[n]]:
+            return False
+    
+    # The critical axis is the last of those over which the 
+    # FFT is taken.
+    if not (in_shape[axes[axes_length-1]] 
+            == out_shape[axes[axes_length-1]]//2 + 1):
+        return False
+
+    for n in range(input_array.ndim - axes_length):
+        if not in_shape[not_axes[n]] == out_shape[not_axes[n]]:
+            return False
+
+    return True
+
+
+# Shape lookup functions
+# ======================
+def _lookup_shape_r2c_arrays(input_array, output_array):
+    return input_array.shape
+
+def _lookup_shape_c2r_arrays(input_array, output_array):
+    return output_array.shape
+
+# fftw_schemes is a dictionary with a mapping from a keys,
+# which are a tuple of the string representation of numpy
+# dtypes to a scheme name.
+#
+# scheme_functions is a dictionary of functions, either 
+# an index to the array of functions in the case of 
+# 'planner', 'executor' and 'generic_precision' or a callable
+# in the case of 'validator' (generic_precision is a catchall for
+# functions that only change based on the precision changing - 
+# i.e the prefix fftw, fftwl and fftwf is the only bit that changes).
+#
+# The array indices refer to the relevant functions for each scheme,
+# the tables to which are defined above.
+#
+# The 'validator' function is a callable for validating the arrays
+# that has the following signature:
+# bool callable(ndarray in_array, ndarray out_array, axes, not_axes)
+# and checks that the arrays are a valid pair. If it is set to None,
+# then the default check is applied, which confirms that the arrays
+# have the same shape.
+# 
+# The 'fft_shape_lookup' function is a callable for returning the
+# FFT shape - that is, an array that describes the length of the 
+# fft along each axis. It has the following signature:
+# fft_shape = fft_shape_lookup(in_array, out_array) 
+# (note that this does not correspond to the lengths of the FFT that is 
+# actually taken, it's the lengths of the FFT that *could* be taken
+# along each axis. It's necessary because the real FFT has a length
+# that is different to the length of the input array).
+
+cdef object fftw_schemes
+fftw_schemes = {
+        (np.dtype('complex128'), np.dtype('complex128')): ('c2c', '64'),
+        (np.dtype('complex64'), np.dtype('complex64')): ('c2c', '32'),
+        (np.dtype('float64'), np.dtype('complex128')): ('r2c', '64'),
+        (np.dtype('float32'), np.dtype('complex64')): ('r2c', '32'),
+        (np.dtype('complex128'), np.dtype('float64')): ('c2r', '64'),
+        (np.dtype('complex64'), np.dtype('float32')): ('c2r', '32')}
+
+if np.dtype('longdouble') != np.dtype('float64'):
+    fftw_schemes.update({
+        (np.dtype('clongdouble'), np.dtype('clongdouble')): ('c2c', 'ld'),
+        (np.dtype('longdouble'), np.dtype('clongdouble')): ('r2c', 'ld'),
+        (np.dtype('clongdouble'), np.dtype('longdouble')): ('c2r', 'ld')})
+
+
+cdef object scheme_directions
+scheme_directions = {
+        ('c2c', '64'): ['FFTW_FORWARD', 'FFTW_BACKWARD'],
+        ('c2c', '32'): ['FFTW_FORWARD', 'FFTW_BACKWARD'],
+        ('c2c', 'ld'): ['FFTW_FORWARD', 'FFTW_BACKWARD'],
+        ('r2c', '64'): ['FFTW_FORWARD'],
+        ('r2c', '32'): ['FFTW_FORWARD'],
+        ('r2c', 'ld'): ['FFTW_FORWARD'],
+        ('c2r', '64'): ['FFTW_BACKWARD'],
+        ('c2r', '32'): ['FFTW_BACKWARD'],
+        ('c2r', 'ld'): ['FFTW_BACKWARD']}
+
+# In the following, -1 denotes using the default. A segfault has been
+# reported on some systems when this is set to None. It seems 
+# sufficiently trivial to use -1 in place of None, especially given 
+# that scheme_functions is an internal cdef object.
+cdef object scheme_functions
+scheme_functions = {
+    ('c2c', '64'): {'planner': 0, 'executor':0, 'generic_precision':0,
+        'validator': -1, 'fft_shape_lookup': -1},
+    ('c2c', '32'): {'planner':1, 'executor':1, 'generic_precision':1,
+        'validator': -1, 'fft_shape_lookup': -1},
+    ('c2c', 'ld'): {'planner':2, 'executor':2, 'generic_precision':2,
+        'validator': -1, 'fft_shape_lookup': -1},
+    ('r2c', '64'): {'planner':3, 'executor':3, 'generic_precision':0,
+        'validator': 0, 
+        'fft_shape_lookup': _lookup_shape_r2c_arrays},
+    ('r2c', '32'): {'planner':4, 'executor':4, 'generic_precision':1,
+        'validator': 0, 
+        'fft_shape_lookup': _lookup_shape_r2c_arrays},
+    ('r2c', 'ld'): {'planner':5, 'executor':5, 'generic_precision':2,
+        'validator': 0, 
+        'fft_shape_lookup': _lookup_shape_r2c_arrays},
+    ('c2r', '64'): {'planner':6, 'executor':6, 'generic_precision':0, 
+        'validator': 1, 
+        'fft_shape_lookup': _lookup_shape_c2r_arrays},
+    ('c2r', '32'): {'planner':7, 'executor':7, 'generic_precision':1, 
+        'validator': 1, 
+        'fft_shape_lookup': _lookup_shape_c2r_arrays},
+    ('c2r', 'ld'): {'planner':8, 'executor':8, 'generic_precision':2,
+        'validator': 1, 
+        'fft_shape_lookup': _lookup_shape_c2r_arrays}}
+
+# Initialize the module
+
+# Define the functions        
+_build_planner_list()
+_build_destroyer_list()
+_build_executor_list()
+_build_nthreads_plan_setters_list()
+_build_validators_list()
+_build_set_timelimit_funcs_list()
+
+fftw_init_threads()
+fftwf_init_threads()
+fftwl_init_threads()
+
+# Set the cleanup routine
+cdef void _cleanup():
+    fftw_cleanup()
+    fftwf_cleanup()
+    fftwl_cleanup()
+    fftw_cleanup_threads()
+    fftwf_cleanup_threads()
+    fftwl_cleanup_threads()
+
+Py_AtExit(_cleanup)
+
+# Helper functions
+cdef void make_axes_unique(int64_t *axes, int64_t axes_length, 
+        int64_t **unique_axes, int64_t **not_axes, int64_t dimensions, 
+        int64_t *unique_axes_length):
+    ''' Takes an array of axes and makes that array unique, returning
+    the unique array in unique_axes. It also creates and fills another 
+    array, not_axes, with those axes that are not included in unique_axes.
+
+    unique_axes_length is updated with the length of unique_axes.
+
+    dimensions is the number of dimensions to which the axes array
+    might refer.
+
+    It is the responsibility of the caller to free unique_axes and not_axes.
+    '''
+
+    cdef int64_t unique_axes_count = 0
+    cdef int64_t holding_offset = 0
+
+    cdef int64_t *axes_holding = (
+            <int64_t *>calloc(dimensions, sizeof(int64_t)))
+    cdef int64_t *axes_holding_offset = (
+            <int64_t *>calloc(dimensions, sizeof(int64_t)))
+
+    for n in range(dimensions):
+        axes_holding[n] = -1
+
+    # Iterate over all the axes and store each index if it hasn't already
+    # been stored (this keeps one and only one and the first index to axes
+    # i.e. storing the unique set of entries).
+    #
+    # axes_holding_offset holds the shift due to repeated axes
+    for n in range(axes_length):
+        if axes_holding[axes[n]] == -1:
+            axes_holding[axes[n]] = n
+            axes_holding_offset[axes[n]] = holding_offset
+            unique_axes_count += 1
+        else:
+            holding_offset += 1
+
+    unique_axes[0] = <int64_t *>malloc(
+            unique_axes_count * sizeof(int64_t))
+
+    not_axes[0] = <int64_t *>malloc(
+            (dimensions - unique_axes_count) * sizeof(int64_t))
+
+    # Now we need to write back the unique axes to a tmp axes
+    cdef int64_t not_axes_count = 0
+
+    for n in range(dimensions):
+        if axes_holding[n] != -1:
+            unique_axes[0][axes_holding[n] - axes_holding_offset[n]] = (
+                    axes[axes_holding[n]])
+
+        else:
+            not_axes[0][not_axes_count] = n
+            not_axes_count += 1
+
+    free(axes_holding)
+    free(axes_holding_offset)
+
+    unique_axes_length[0] = unique_axes_count
+
+    return
+
+# The External Interface
+# ======================
+#
+cdef class FFTW:
+    '''
+    FFTW is a class for computing the complex N-Dimensional DFT or
+    inverse DFT of an array using the FFTW library. The interface is 
+    designed to be somewhat pythonic, with the correct transform being 
+    inferred from the dtypes of the passed arrays.
+
+    On instantiation, the dtypes and relative shapes of the input array and
+    output arrays are compared to the set of valid (and implemented)
+    :ref:`FFTW schemes <scheme_table>`.  If a match is found, the plan that
+    corresponds to that scheme is created, operating on the arrays that are
+    passed in. If no scheme can be created, then ``ValueError`` is raised.
+
+    The actual FFT or iFFT is performed by calling the 
+    :meth:`~pyfftw.FFTW.execute` method.
+    
+    The arrays can be updated by calling the 
+    :meth:`~pyfftw.FFTW.update_arrays` method.
+
+    The created instance of the class is itself callable, and can perform
+    the execution of the FFT, both with or without array updates, returning
+    the result of the FFT. Unlike calling the :meth:`~pyfftw.FFTW.execute`
+    method, calling the class instance will also optionally normalise the
+    output as necessary. Additionally, calling with an input array update
+    will also coerce that array to be the correct dtype. 
+    
+    See the documentation on the :meth:`~pyfftw.FFTW.__call__` method 
+    for more information.
+    '''
+    # Each of these function pointers simply
+    # points to a chosen fftw wrapper function
+    cdef fftw_generic_plan_guru __fftw_planner
+    cdef fftw_generic_execute __fftw_execute
+    cdef fftw_generic_destroy_plan __fftw_destroy
+    cdef fftw_generic_plan_with_nthreads __nthreads_plan_setter
+
+    # The plan is typecast when it is created or used
+    # within the wrapper functions
+    cdef void *__plan
+
+    cdef np.ndarray __input_array
+    cdef np.ndarray __output_array
+    cdef int __direction
+    cdef int __flags
+
+    cdef bint __simd_allowed
+    cdef int __input_array_alignment
+    cdef int __output_array_alignment    
+    cdef bint __use_threads
+
+    cdef object __input_strides
+    cdef object __input_byte_strides
+    cdef object __output_strides
+    cdef object __output_byte_strides
+    cdef object __input_shape
+    cdef object __output_shape
+    cdef object __input_dtype
+    cdef object __output_dtype
+    cdef object __flags_used
+
+    cdef float __normalisation_scaling
+
+    cdef int __rank
+    cdef _fftw_iodim *__dims
+    cdef int __howmany_rank
+    cdef _fftw_iodim *__howmany_dims
+
+    cdef int64_t *__axes
+    cdef int64_t *__not_axes
+
+    cdef int __N
+    def __get_N(self):
+        '''
+        The product of the lengths of the DFT over all DFT axes.
+        1/N is the normalisation constant. For any input array A, 
+        and for any set of axes, 1/N * ifft(fft(A)) = A
+        '''
+        return self.__N
+
+    N = property(__get_N)
+
+    def __get_simd_aligned(self):
+        '''
+        Return whether or not this FFTW object requires simd aligned
+        input and output data.
+        '''
+        return self.__simd_allowed
+
+    simd_aligned = property(__get_simd_aligned)
+
+    def __get_input_alignment(self):
+        '''
+        Returns the byte alignment of the input arrays for which the
+        :class:`~pyfftw.FFTW` object was created.
+
+        Input array updates with arrays that are not aligned on this
+        byte boundary will result in a ValueError being raised, or
+        a copy being made if the :meth:`~pyfftw.FFTW.__call__` 
+        interface is used.
+        '''
+        return self.__input_array_alignment
+
+    input_alignment = property(__get_input_alignment)
+
+    def __get_output_alignment(self):
+        '''
+        Returns the byte alignment of the output arrays for which the
+        :class:`~pyfftw.FFTW` object was created.
+
+        Output array updates with arrays that are not aligned on this
+        byte boundary will result in a ValueError being raised.
+        '''
+        return self.__output_array_alignment
+
+    output_alignment = property(__get_output_alignment)
+
+    def __get_flags_used(self):
+        '''
+        Return which flags were used to construct the FFTW object.
+        
+        This includes flags that were added during initialisation.
+        '''
+        return tuple(self.__flags_used)
+
+    flags = property(__get_flags_used)
+
+    def __cinit__(self, input_array, output_array, axes=(-1,),
+            direction='FFTW_FORWARD', flags=('FFTW_MEASURE',), 
+            unsigned int threads=1, planning_timelimit=None,
+            *args, **kwargs):
+        
+        # Initialise the pointers that need to be freed
+        self.__plan = NULL
+        self.__dims = NULL
+        self.__howmany_dims = NULL
+
+        self.__axes = NULL
+        self.__not_axes = NULL
+
+        flags = list(flags)
+
+        cdef double _planning_timelimit
+        if planning_timelimit is None:
+            _planning_timelimit = FFTW_NO_TIMELIMIT
+        else:
+            try:
+                _planning_timelimit = planning_timelimit
+            except TypeError:
+                raise TypeError('Invalid planning timelimit: '
+                        'The planning timelimit needs to be a float.')
+
+        if not isinstance(input_array, np.ndarray):
+            raise ValueError('Invalid input array: '
+                    'The input array needs to be an instance '
+                    'of numpy.ndarray')
+
+        if not isinstance(output_array, np.ndarray):
+            raise ValueError('Invalid output array: '
+                    'The output array needs to be an instance '
+                    'of numpy.ndarray')
+
+        try:
+            input_dtype = input_array.dtype
+            output_dtype = output_array.dtype
+            scheme = fftw_schemes[(input_dtype, output_dtype)]
+        except KeyError:
+            raise ValueError('Invalid scheme: '
+                    'The output array and input array dtypes '
+                    'do not correspond to a valid fftw scheme.')
+
+        self.__input_dtype = input_dtype
+        self.__output_dtype = output_dtype
+        
+        functions = scheme_functions[scheme]
+        
+        self.__fftw_planner = planners[functions['planner']]
+        self.__fftw_execute = executors[functions['executor']]
+        self.__fftw_destroy = destroyers[functions['generic_precision']]
+
+        self.__nthreads_plan_setter = (
+                nthreads_plan_setters[functions['generic_precision']])
+
+        cdef fftw_generic_set_timelimit set_timelimit_func = (
+                set_timelimit_funcs[functions['generic_precision']])
+
+        # If either of the arrays is not aligned on a 16-byte boundary,
+        # we set the FFTW_UNALIGNED flag. This disables SIMD.
+        # (16 bytes is assumed to be the minimal alignment)
+        if 'FFTW_UNALIGNED' in flags:
+            self.__simd_allowed = False
+            self.__input_array_alignment = self.__input_dtype.alignment
+            self.__output_array_alignment = self.__output_dtype.alignment
+
+        else:
+
+            self.__input_array_alignment = -1
+            self.__output_array_alignment = -1
+
+            for each_alignment in _valid_simd_alignments:
+                if (<intptr_t>np.PyArray_DATA(input_array) % 
+                        each_alignment == 0 and
+                        <intptr_t>np.PyArray_DATA(output_array) % 
+                        each_alignment == 0):
+
+                    self.__simd_allowed = True
+
+                    self.__input_array_alignment = each_alignment
+                    self.__output_array_alignment = each_alignment
+
+                    break
+
+            if (self.__input_array_alignment == -1 or
+                    self.__output_array_alignment == -1):
+
+                self.__simd_allowed = False
+
+                self.__input_array_alignment = (
+                        self.__input_dtype.alignment)
+                self.__output_array_alignment = (
+                        self.__output_dtype.alignment)
+                flags.append('FFTW_UNALIGNED')
+
+        if (not (<intptr_t>np.PyArray_DATA(input_array)
+            % self.__input_array_alignment == 0)):
+            raise ValueError('Invalid input alignment: '
+                    'The input array is expected to lie on a %d '
+                    'byte boundary.' % self.__input_array_alignment)
+
+        if (not (<intptr_t>np.PyArray_DATA(output_array)
+            % self.__output_array_alignment == 0)):
+            raise ValueError('Invalid output alignment: '
+                    'The output array is expected to lie on a %d '
+                    'byte boundary.' % self.__output_array_alignment)
+
+        if not direction in scheme_directions[scheme]:
+            raise ValueError('Invalid direction: '
+                    'The direction is not valid for the scheme. '
+                    'Try setting it explicitly if it is not already.')
+
+        self.__direction = directions[direction]
+        self.__input_shape = input_array.shape
+        self.__output_shape = output_array.shape
+        
+        self.__input_array = input_array
+        self.__output_array = output_array
+
+        self.__axes = <int64_t *>malloc(len(axes)*sizeof(int64_t))
+        for n in range(len(axes)):
+            self.__axes[n] = axes[n]
+
+        # Set the negative entries to their actual index (use the size
+        # of the shape array for this)
+        cdef int64_t array_dimension = len(self.__input_shape)
+
+        for n in range(len(axes)):
+            if self.__axes[n] < 0:
+                self.__axes[n] = self.__axes[n] + array_dimension
+
+            if self.__axes[n] >= array_dimension or self.__axes[n] < 0:
+                raise IndexError('Invalid axes: '
+                    'The axes list cannot contain invalid axes.')
+
+        cdef int64_t unique_axes_length
+        cdef int64_t *unique_axes
+        cdef int64_t *not_axes
+        
+        make_axes_unique(self.__axes, len(axes), &unique_axes,
+                &not_axes, array_dimension, &unique_axes_length)
+
+        # and assign axes and not_axes to the filled arrays
+        free(self.__axes)
+        self.__axes = unique_axes
+        self.__not_axes = not_axes
+
+        total_N = 1
+        for n in range(unique_axes_length):
+            if self.__input_shape[self.__axes[n]] == 0:
+                raise ValueError('Zero length array: '
+                    'The input array should have no zero length'
+                    'axes over which the FFT is to be taken')
+
+            if self.__direction == FFTW_FORWARD:
+                total_N *= self.__input_shape[self.__axes[n]]
+            else:
+                total_N *= self.__output_shape[self.__axes[n]]
+
+        self.__N = total_N
+        self.__normalisation_scaling = 1/float(self.N)
+
+        # Now we can validate the array shapes
+        cdef validator _validator
+
+        if functions['validator'] == -1:
+            if not (output_array.shape == input_array.shape):
+                raise ValueError('Invalid shapes: '
+                        'The output array should be the same shape as the '
+                        'input array for the given array dtypes.')
+        else:
+            _validator = validators[functions['validator']]
+            if not _validator(input_array, output_array, 
+                    self.__axes, self.__not_axes, unique_axes_length):
+                raise ValueError('Invalid shapes: '
+                        'The input array and output array are invalid '
+                        'complementary shapes for their dtypes.')
+
+        self.__rank = unique_axes_length
+        self.__howmany_rank = self.__input_array.ndim - unique_axes_length
+        
+        self.__flags = 0
+        self.__flags_used = []
+        for each_flag in flags:
+            try:
+                self.__flags |= flag_dict[each_flag]
+                self.__flags_used.append(each_flag)
+            except KeyError:
+                raise ValueError('Invalid flag: ' + '\'' + 
+                        each_flag + '\' is not a valid planner flag.')
+
+        
+        if ('FFTW_DESTROY_INPUT' not in flags) and (
+                (scheme[0] != 'c2r') or not self.__rank > 1):
+            # The default in all possible cases is to preserve the input
+            # This is not possible for r2c arrays with rank > 1
+            self.__flags |= FFTW_PRESERVE_INPUT
+
+        # Set up the arrays of structs for holding the stride shape 
+        # information
+        self.__dims = <_fftw_iodim *>malloc(
+                self.__rank * sizeof(_fftw_iodim))
+        self.__howmany_dims = <_fftw_iodim *>malloc(
+                self.__howmany_rank * sizeof(_fftw_iodim))
+
+        if self.__dims == NULL or self.__howmany_dims == NULL:
+            # Not much else to do than raise an exception
+            raise MemoryError
+
+        # Find the strides for all the axes of both arrays in terms of the 
+        # number of elements (as opposed to the number of bytes).
+        self.__input_byte_strides = input_array.strides        
+        self.__input_strides = tuple([stride/input_array.itemsize 
+            for stride in input_array.strides])
+        self.__output_byte_strides = output_array.strides
+        self.__output_strides = tuple([stride/output_array.itemsize 
+            for stride in output_array.strides])
+
+        # Make sure that the arrays are not too big for fftw
+        # This is hard to test, so we cross our fingers and hope for the 
+        # best (any suggestions, please get in touch).
+        cdef int i
+        for i in range(0, len(self.__input_shape)):
+            if self.__input_shape[i] >= <Py_ssize_t> limits.INT_MAX:
+                raise ValueError('Dimensions of the input array must be ' +
+                        'less than ', str(limits.INT_MAX))
+
+            if self.__input_strides[i] >= <Py_ssize_t> limits.INT_MAX:
+                raise ValueError('Strides of the input array must be ' +
+                        'less than ', str(limits.INT_MAX))
+
+        for i in range(0, len(self.__output_shape)):
+            if self.__output_shape[i] >= <Py_ssize_t> limits.INT_MAX:
+                raise ValueError('Dimensions of the output array must be ' +
+                        'less than ', str(limits.INT_MAX))
+
+            if self.__output_strides[i] >= <Py_ssize_t> limits.INT_MAX:
+                raise ValueError('Strides of the output array must be ' +
+                        'less than ', str(limits.INT_MAX))
+
+        fft_shape_lookup = functions['fft_shape_lookup']
+        if fft_shape_lookup == -1:
+            fft_shape = self.__input_shape
+        else:
+            fft_shape = fft_shape_lookup(input_array, output_array)
+
+        # Fill in the stride and shape information
+        input_strides_array = self.__input_strides
+        output_strides_array = self.__output_strides
+        for i in range(0, self.__rank):
+            self.__dims[i]._n = fft_shape[self.__axes[i]]
+            self.__dims[i]._is = input_strides_array[self.__axes[i]]
+            self.__dims[i]._os = output_strides_array[self.__axes[i]]
+
+        for i in range(0, self.__howmany_rank):
+            self.__howmany_dims[i]._n = fft_shape[self.__not_axes[i]]
+            self.__howmany_dims[i]._is = input_strides_array[self.__not_axes[i]]
+            self.__howmany_dims[i]._os = output_strides_array[self.__not_axes[i]]
+
+        ## Point at which FFTW calls are made
+        ## (and none should be made before this)
+        if threads > 1:
+            self.__use_threads = True
+            self.__nthreads_plan_setter(threads)
+        else:
+            self.__use_threads = False
+            self.__nthreads_plan_setter(1)
+
+        # Set the timelimit
+        set_timelimit_func(_planning_timelimit)
+
+        # Finally, construct the plan
+        self.__plan = self.__fftw_planner(
+            self.__rank, <fftw_iodim *>self.__dims,
+            self.__howmany_rank, <fftw_iodim *>self.__howmany_dims,
+            <void *>np.PyArray_DATA(self.__input_array),
+            <void *>np.PyArray_DATA(self.__output_array),
+            self.__direction, self.__flags)
+
+        if self.__plan == NULL:
+            raise RuntimeError('The data has an uncaught error that led '+
+                    'to the planner returning NULL. This is a bug.')
+
+    def __init__(self, input_array, output_array, axes=(-1,), 
+            direction='FFTW_FORWARD', flags=('FFTW_MEASURE',), 
+            int threads=1, planning_timelimit=None, 
+            *args, **kwargs):
+        '''
+        **Arguments**:
+
+        * ``input_array`` and ``output_array`` should be numpy arrays.
+          The contents of these arrays will be destroyed by the planning 
+          process during initialisation. Information on supported 
+          dtypes for the arrays is :ref:`given below <scheme_table>`.
+        
+        * ``axes`` describes along which axes the DFT should be taken.
+          This should be a valid list of axes. Repeated axes are 
+          only transformed once. Invalid axes will raise an ``IndexError`` 
+          exception. This argument is equivalent to the same
+          argument in :func:`numpy.fft.fftn`, except for the fact that
+          the behaviour of repeated axes is different (``numpy.fft``
+          will happily take the fft of the same axis if it is repeated
+          in the ``axes`` argument). Rudimentary testing has suggested
+          this is down to the underlying FFTW library and so unlikely 
+          to be fixed in these wrappers.
+
+        * ``direction`` should be a string and one of ``'FFTW_FORWARD'`` 
+          or ``'FFTW_BACKWARD'``, which dictate whether to take the
+          DFT (forwards) or the inverse DFT (backwards) respectively 
+          (specifically, it dictates the sign of the exponent in the 
+          DFT formulation).
+
+          Note that only the Complex schemes allow a free choice
+          for ``direction``. The direction *must* agree with the 
+          the :ref:`table below <scheme_table>` if a Real scheme 
+          is used, otherwise a ``ValueError`` is raised.
+
+        .. _FFTW_flags:
+
+        * ``flags`` is a list of strings and is a subset of the 
+          flags that FFTW allows for the planners:
+
+          * ``'FFTW_ESTIMATE'``, ``'FFTW_MEASURE'``, ``'FFTW_PATIENT'`` and 
+            ``'FFTW_EXHAUSTIVE'`` are supported. These describe the 
+            increasing amount of effort spent during the planning 
+            stage to create the fastest possible transform. 
+            Usually ``'FFTW_MEASURE'`` is a good compromise. If no flag
+            is passed, the default ``'FFTW_MEASURE'`` is used.
+          * ``'FFTW_UNALIGNED'`` is supported. 
+            This tells FFTW not to assume anything about the 
+            alignment of the data and disabling any SIMD capability 
+            (see below).
+          * ``'FFTW_DESTROY_INPUT'`` is supported.
+            This tells FFTW that the input array can be destroyed during
+            the transform, sometimes allowing a faster algorithm to be
+            used. The default behaviour is, if possible, to preserve the
+            input. In the case of the 1D Backwards Real transform, this 
+            may result in a performance hit. In the case of a backwards
+            real transform for greater than one dimension, it is not
+            possible to preserve the input, making this flag implicit
+            in that case. A little more on this is given 
+            :ref:`below<scheme_table>`.
+
+          The `FFTW planner flags documentation 
+          <http://www.fftw.org/fftw3_doc/Planner-Flags.html#Planner-Flags>`_
+          has more information about the various flags and their impact.
+          Note that only the flags documented here are supported.
+
+        * ``threads`` tells the wrapper how many threads to use
+          when invoking FFTW, with a default of 1. If the number
+          of threads is greater than 1, then the GIL is released
+          by necessity.
+
+        * ``planning_timelimit`` is a floating point number that 
+          indicates to the underlying FFTW planner the maximum number of
+          seconds it should spend planning the FFT. This is a rough
+          estimate and corresponds to calling of ``fftw_set_timelimit()``
+          (or an equivalent dependent on type) in the underlying FFTW
+          library. If ``None`` is set, the planner will run indefinitely
+          until all the planning modes allowed by the flags have been
+          tried. See the `FFTW planner flags page
+          <http://www.fftw.org/fftw3_doc/Planner-Flags.html#Planner-Flags>`_
+          for more information on this.
+
+        .. _fftw_schemes:
+
+        **Schemes**
+
+        The currently supported schemes are as follows:
+
+        .. _scheme_table:
+
+        +----------------+-----------------------+------------------------+-----------+
+        | Type           | ``input_array.dtype`` | ``output_array.dtype`` | Direction |
+        +================+=======================+========================+===========+
+        | Complex        | ``complex64``         | ``complex64``          | Both      |
+        +----------------+-----------------------+------------------------+-----------+
+        | Complex        | ``complex128``        | ``complex128``         | Both      |
+        +----------------+-----------------------+------------------------+-----------+
+        | Complex        | ``clongdouble``       | ``clongdouble``        | Both      |
+        +----------------+-----------------------+------------------------+-----------+
+        | Real           | ``float32``           | ``complex64``          | Forwards  |
+        +----------------+-----------------------+------------------------+-----------+
+        | Real           | ``float64``           | ``complex128``         | Forwards  |
+        +----------------+-----------------------+------------------------+-----------+
+        | Real           | ``longdouble``        | ``clongdouble``        | Forwards  |
+        +----------------+-----------------------+------------------------+-----------+
+        | Real\ :sup:`1` | ``complex64``         | ``float32``            | Backwards |
+        +----------------+-----------------------+------------------------+-----------+
+        | Real\ :sup:`1` | ``complex128``        | ``float64``            | Backwards |
+        +----------------+-----------------------+------------------------+-----------+
+        | Real\ :sup:`1` | ``clongdouble``       | ``longdouble``         | Backwards |
+        +----------------+-----------------------+------------------------+-----------+
+
+        \ :sup:`1`  Note that the Backwards Real transform for the case
+        in which the dimensionality of the transform is greater than 1
+        will destroy the input array. This is inherent to FFTW and the only
+        general work-around for this is to copy the array prior to
+        performing the transform. In the case where the dimensionality
+        of the transform is 1, the default is to preserve the input array.
+        This is different from the default in the underlying library, and
+        some speed gain may be achieved by allowing the input array to
+        be destroyed by passing the ``'FFTW_DESTROY_INPUT'`` 
+        :ref:`flag <FFTW_flags>`.
+
+        ``clongdouble`` typically maps directly to ``complex256``
+        or ``complex192``, and ``longdouble`` to ``float128`` or
+        ``float96``, dependent on platform.
+
+        The relative shapes of the arrays should be as follows:
+
+        * For a Complex transform, ``output_array.shape == input_array.shape``
+        * For a Real transform in the Forwards direction, both the following 
+          should be true:
+
+          * ``output_array.shape[axes][-1] == input_array.shape[axes][-1]//2 + 1``
+          * All the other axes should be equal in length.
+
+        * For a Real transform in the Backwards direction, both the following 
+          should be true:
+
+          * ``input_array.shape[axes][-1] == output_array.shape[axes][-1]//2 + 1``
+          * All the other axes should be equal in length.
+
+        In the above expressions for the Real transform, the ``axes`` 
+        arguments denotes the unique set of axes on which we are taking
+        the FFT, in the order passed. It is the last of these axes that 
+        is subject to the special case shown.
+
+        The shapes for the real transforms corresponds to those
+        stipulated by the FFTW library. Further information can be
+        found in the FFTW documentation on the `real DFT
+        <http://www.fftw.org/fftw3_doc/Guru-Real_002ddata-DFTs.html>`_.
+
+        The actual arrangement in memory is arbitrary and the scheme
+        can be planned for any set of strides on either the input
+        or the output. The user should not have to worry about this
+        and any valid numpy array should work just fine.
+
+        What is calculated is exactly what FFTW calculates. 
+        Notably, this is an unnormalized transform so should 
+        be scaled as necessary (fft followed by ifft will scale 
+        the input by N, the product of the dimensions along which
+        the DFT is taken). For further information, see the 
+        `FFTW documentation
+        <http://www.fftw.org/fftw3_doc/What-FFTW-Really-Computes.html>`_.
+
+        The FFTW library benefits greatly from the beginning of each
+        DFT axes being aligned on the correct byte boundary, enabling
+        SIMD instructions. By default, if the data begins on such a
+        boundary, then FFTW will be allowed to try and enable
+        SIMD instructions. This means that all future changes to
+        the data arrays will be checked for similar alignment. SIMD
+        instructions can be explicitly disabled by setting the
+        FFTW_UNALIGNED flags, to allow for updates with unaligned
+        data.
+        
+        :func:`~pyfftw.n_byte_align` and 
+        :func:`~pyfftw.n_byte_align_empty` are two methods
+        included with this module for producing aligned arrays.
+
+        The optimum alignment for the running platform is provided
+        by :data:`pyfftw.simd_alignment`, though a different alignment
+        may still result in some performance improvement. For example,
+        if the processor supports AVX (requiring 32-byte alignment) as
+        well as SSE (requiring 16-byte alignment), then if the array
+        is 16-byte aligned, SSE will still be used.
+
+        It's worth noting that just being aligned may not be sufficient
+        to create the fastest possible transform. For example, if the
+        array is not contiguous (i.e. certain axes are displaced in
+        memory), it may be faster to plan a transform for a contiguous
+        array, and then rely on the array being copied in before the
+        transform (which :class:`pyfftw.FFTW` will handle for you when
+        accessed through :meth:`~pyfftw.FFTW.__call__`).
+        '''
+        pass
+
+    def __dealloc__(self):
+
+        if not self.__axes == NULL:
+            free(self.__axes)
+
+        if not self.__not_axes == NULL:
+            free(self.__not_axes)
+
+        if not self.__plan == NULL:
+            self.__fftw_destroy(self.__plan)
+
+        if not self.__dims == NULL:
+            free(self.__dims)
+
+        if not self.__howmany_dims == NULL:
+            free(self.__howmany_dims)
+
+    def __call__(self, input_array=None, output_array=None, 
+            normalise_idft=True):
+        '''__call__(input_array=None, output_array=None, normalise_idft=True)
+
+        Calling the class instance (optionally) updates the arrays, then
+        calls :meth:`~pyfftw.FFTW.execute`, before optionally normalising 
+        the output and returning the output array.
+
+        It has some built-in helpers to make life simpler for the calling
+        functions (as distinct from manually updating the arrays and
+        calling :meth:`~pyfftw.FFTW.execute`).
+
+        If ``normalise_idft`` is ``True`` (the default), then the output from 
+        an inverse DFT (i.e. when the direction flag is ``'FFTW_BACKWARD'``) is
+        scaled by 1/N, where N is the product of the lengths of input array on
+        which the FFT is taken. If the direction is ``'FFTW_FORWARD'``, this
+        flag makes no difference to the output array.
+        
+        When ``input_array`` is something other than None, then the passed in
+        array is coerced to be the same dtype as the input array used when the
+        class was instantiated, the byte-alignment of the passed in array is
+        made consistent with the expected byte-alignment and the striding is 
+        made consistent with the expected striding. All this may, but not 
+        necessarily, require a copy to be made.
+
+        As noted in the :ref:`scheme table<scheme_table>`, if the FFTW 
+        instance describes a backwards real transform of more than one
+        dimension, the contents of the input array will be destroyed. It is
+        up to the calling function to make a copy if it is necessary to
+        maintain the input array.
+
+        ``output_array`` is always used as-is if possible. If the dtype, the 
+        alignment or the striding is incorrect for the FFTW object, then a
+        ``ValueError`` is raised.
+        
+        The coerced input array and the output array (as appropriate) are 
+        then passed as arguments to
+        :meth:`~pyfftw.FFTW.update_arrays`, after which
+        :meth:`~pyfftw.FFTW.execute` is called, and then normalisation
+        is applied to the output array if that is desired.
+        
+        Note that it is possible to pass some data structure that can be
+        converted to an array, such as a list, so long as it fits the data
+        requirements of the class instance, such as array shape.
+
+        Other than the dtype and the alignment of the passed in arrays, the 
+        rest of the requirements on the arrays mandated by
+        :meth:`~pyfftw.FFTW.update_arrays` are enforced.
+
+        A ``None`` argument to either keyword means that that array is not 
+        updated.
+
+        The result of the FFT is returned. This is the same array that is used
+        internally and will be overwritten again on subsequent calls. If you
+        need the data to persist longer than a subsequent call, you should
+        copy the returned array.
+        '''
+
+        if input_array is not None or output_array is not None:
+
+            if input_array is None:
+                input_array = self.__input_array
+
+            if output_array is None:
+                output_array = self.__output_array
+
+            if not isinstance(input_array, np.ndarray):
+                copy_needed = True
+            elif (not input_array.dtype == self.__input_dtype):
+                copy_needed = True
+            elif (not input_array.strides == self.__input_byte_strides):
+                copy_needed = True
+            elif not (<intptr_t>np.PyArray_DATA(input_array) 
+                    % self.input_alignment == 0):
+                copy_needed = True
+            else:
+                copy_needed = False
+
+            if copy_needed:
+
+                if not isinstance(input_array, np.ndarray):
+                    input_array = np.asanyarray(input_array)
+
+                if not input_array.shape == self.__input_shape:
+                    raise ValueError('Invalid input shape: '
+                            'The new input array should be the same shape '
+                            'as the input array used to instantiate the '
+                            'object.')
+                
+                self.__input_array[:] = input_array
+                
+                if output_array is not None:
+                    # No point wasting time if no update is necessary
+                    # (which the copy above may have avoided)
+                    input_array = self.__input_array
+                    self.update_arrays(input_array, output_array)
+
+            else:
+                self.update_arrays(input_array, output_array)
+
+        self.execute()
+
+        if self.__direction == FFTW_BACKWARD and normalise_idft:
+            self.__output_array *= self.__normalisation_scaling
+
+        return self.__output_array
+
+    cpdef update_arrays(self, 
+            new_input_array, new_output_array):
+        '''update_arrays(new_input_array, new_output_array)
+
+        Update the arrays upon which the DFT is taken.
+
+        The new arrays should be of the same dtypes as the originals, the same
+        shapes as the originals and should have the same strides between axes.
+        If the original data was aligned so as to allow SIMD instructions
+        (e.g. by being aligned on a 16-byte boundary), then the new array must
+        also be aligned so as to allow SIMD instructions (assuming, of
+        course, that the ``FFTW_UNALIGNED`` flag was not enabled).
+        
+        The byte alignment requirement extends to requiring natural
+        alignment in the non-SIMD cases as well, but this is much less
+        stringent as it simply means avoiding arrays shifted by, say,
+        a single byte (which invariably takes some effort to
+        achieve!).
+
+        If all these conditions are not met, a ``ValueError`` will
+        be raised and the data will *not* be updated (though the 
+        object will still be in a sane state).
+        '''
+        if not isinstance(new_input_array, np.ndarray):
+            raise ValueError('Invalid input array: '
+                    'The new input array needs to be an instance '
+                    'of numpy.ndarray')
+
+        if not isinstance(new_output_array, np.ndarray):
+            raise ValueError('Invalid output array '
+                    'The new output array needs to be an instance '
+                    'of numpy.ndarray')
+
+        if not (<intptr_t>np.PyArray_DATA(new_input_array) % 
+                self.input_alignment == 0):
+            raise ValueError('Invalid input alignment: '
+                    'The original arrays were %d-byte aligned. It is '
+                    'necessary that the update input array is similarly '
+                    'aligned.' % self.input_alignment)
+
+        if not (<intptr_t>np.PyArray_DATA(new_output_array) % 
+                self.output_alignment == 0):
+            raise ValueError('Invalid output alignment: '
+                    'The original arrays were %d-byte aligned. It is '
+                    'necessary that the update output array is similarly '
+                    'aligned.' % self.output_alignment)
+
+        if not new_input_array.dtype == self.__input_dtype:
+            raise ValueError('Invalid input dtype: '
+                    'The new input array is not of the same '
+                    'dtype as was originally planned for.')
+
+        if not new_output_array.dtype == self.__output_dtype:
+            raise ValueError('Invalid output dtype: '
+                    'The new output array is not of the same '
+                    'dtype as was originally planned for.')
+
+        new_input_shape = new_input_array.shape
+        new_output_shape = new_output_array.shape
+
+        new_input_strides = new_input_array.strides
+        new_output_strides = new_output_array.strides
+
+        if not new_input_shape == self.__input_shape:
+            raise ValueError('Invalid input shape: '
+                    'The new input array should be the same shape as '
+                    'the input array used to instantiate the object.')
+
+        if not new_output_shape == self.__output_shape:
+            raise ValueError('Invalid output shape: '
+                    'The new output array should be the same shape as '
+                    'the output array used to instantiate the object.')
+        
+        if not new_input_strides == self.__input_byte_strides:
+            raise ValueError('Invalid input striding: '
+                    'The strides should be identical for the new '
+                    'input array as for the old.')
+        
+        if not new_output_strides == self.__output_byte_strides:
+            raise ValueError('Invalid output striding: '
+                    'The strides should be identical for the new '
+                    'output array as for the old.')
+
+        self._update_arrays(new_input_array, new_output_array)
+
+    cdef _update_arrays(self, 
+            np.ndarray new_input_array, np.ndarray new_output_array):
+        ''' A C interface to the update_arrays method that does not
+        perform any checks on strides being correct and so on.
+        '''
+        self.__input_array = new_input_array
+        self.__output_array = new_output_array
+
+    def get_input_array(self):
+        '''get_input_array()
+
+        Return the input array that is associated with the FFTW 
+        instance.
+        '''
+        return self.__input_array
+
+    def get_output_array(self):
+        '''get_output_array()
+
+        Return the output array that is associated with the FFTW
+        instance.
+        '''
+        return self.__output_array
+
+    cpdef execute(self):
+        '''execute()
+
+        Execute the planned operation, taking the correct kind of FFT of
+        the input array (what is returned by :meth:`get_input_array`), 
+        and putting the result in the output array (what is returned by
+        :meth:`get_output_array`).
+        '''
+        cdef void *input_pointer = (
+                <void *>np.PyArray_DATA(self.__input_array))
+        cdef void *output_pointer = (
+                <void *>np.PyArray_DATA(self.__output_array))
+        
+        cdef void *plan = self.__plan
+        cdef fftw_generic_execute fftw_execute = self.__fftw_execute
+        
+        if self.__use_threads:
+            with nogil:
+                fftw_execute(plan, input_pointer, output_pointer)
+        else:
+            fftw_execute(self.__plan, input_pointer, output_pointer)
+
+cdef void count_char(char c, void *counter_ptr):
+    '''
+    On every call, increment the derefenced counter_ptr.
+    '''
+    (<int *>counter_ptr)[0] += 1
+
+
+cdef void write_char_to_string(char c, void *string_location_ptr):
+    '''
+    Write the passed character c to the memory location
+    pointed to by the contents of string_location_ptr (i.e. a pointer
+    to a pointer), then increment the contents of string_location_ptr 
+    (i.e. move to the next byte in memory).
+
+    In other words, for every character that is passed, we write that
+    to a string that is referenced by the dereferenced value of 
+    string_location_ptr.
+
+    If the derefenced value of string_location points to an
+    unallocated piece of memory, a segfault will likely occur.
+    '''
+    cdef char *write_location = <char *>((<intptr_t *>string_location_ptr)[0])
+    write_location[0] = c
+
+    (<intptr_t *>string_location_ptr)[0] += 1
+
+
+def export_wisdom():
+    '''export_wisdom()
+
+    Return the FFTW wisdom as a tuple of strings.
+
+    The first string in the tuple is the string for the double
+    precision wisdom. The second string in the tuple is the string 
+    for the single precision wisdom. The third string in the tuple 
+    is the string for the long double precision wisdom.
+
+    The tuple that is returned from this function can be used as the
+    argument to :func:`~pyfftw.import_wisdom`.
+    '''
+
+    cdef bytes py_wisdom
+    cdef bytes py_wisdomf
+    cdef bytes py_wisdoml
+
+    cdef int counter = 0
+    cdef int counterf = 0
+    cdef int counterl = 0
+
+    fftw_export_wisdom(&count_char, <void *>&counter)
+    fftwf_export_wisdom(&count_char, <void *>&counterf)
+    fftwl_export_wisdom(&count_char, <void *>&counterl)
+
+    cdef char* c_wisdom = <char *>malloc(sizeof(char)*(counter + 1))
+    cdef char* c_wisdomf = <char *>malloc(sizeof(char)*(counterf + 1))
+    cdef char* c_wisdoml = <char *>malloc(sizeof(char)*(counterl + 1))
+
+    if c_wisdom == NULL or c_wisdomf == NULL or c_wisdoml == NULL:
+        raise MemoryError
+
+    # Set the pointers to the string pointers
+    cdef intptr_t c_wisdom_ptr = <intptr_t>c_wisdom
+    cdef intptr_t c_wisdomf_ptr = <intptr_t>c_wisdomf
+    cdef intptr_t c_wisdoml_ptr = <intptr_t>c_wisdoml
+
+    fftw_export_wisdom(&write_char_to_string, <void *>&c_wisdom_ptr)
+    fftwf_export_wisdom(&write_char_to_string, <void *>&c_wisdomf_ptr)
+    fftwl_export_wisdom(&write_char_to_string, <void *>&c_wisdoml_ptr)
+
+    # Write the last byte as the null byte
+    c_wisdom[counter] = 0
+    c_wisdomf[counterf] = 0
+    c_wisdoml[counterl] = 0
+
+    try:
+        py_wisdom = c_wisdom
+        py_wisdomf = c_wisdomf
+        py_wisdoml = c_wisdoml
+
+    finally:
+        free(c_wisdom)
+        free(c_wisdomf)
+        free(c_wisdoml)
+
+    return (py_wisdom, py_wisdomf, py_wisdoml)
+
+def import_wisdom(wisdom):
+    '''import_wisdom(wisdom)
+
+    Function that imports wisdom from the passed tuple
+    of strings.
+
+    The first string in the tuple is the string for the double
+    precision wisdom. The second string in the tuple is the string 
+    for the single precision wisdom. The third string in the tuple 
+    is the string for the long double precision wisdom.
+
+    The tuple that is returned from :func:`~pyfftw.export_wisdom`
+    can be used as the argument to this function.
+
+    This function returns a tuple of boolean values indicating
+    the success of loading each of the wisdom types (double, float 
+    and long double, in that order).
+    '''
+
+    cdef char* c_wisdom = wisdom[0]
+    cdef char* c_wisdomf = wisdom[1]
+    cdef char* c_wisdoml = wisdom[2]
+
+    cdef bint success = fftw_import_wisdom_from_string(c_wisdom)
+    cdef bint successf = fftwf_import_wisdom_from_string(c_wisdomf)
+    cdef bint successl = fftwl_import_wisdom_from_string(c_wisdoml)
+
+    return (success, successf, successl)
+
+#def export_wisdom_to_files(
+#        double_wisdom_file=None,
+#        single_wisdom_file=None, 
+#        long_double_wisdom_file=None):
+#    '''export_wisdom_to_file(double_wisdom_file=None, single_wisdom_file=None, long_double_wisdom_file=None)
+#
+#    Export the wisdom to the passed files.
+#
+#    The double precision wisdom is written to double_wisdom_file. 
+#    The single precision wisdom is written to single_wisdom_file.
+#    The long double precision wisdom is written to 
+#    long_double_wisdom_file.
+#
+#    If any of the arguments are None, then nothing is done for that
+#    file.
+#
+#    This function returns a tuple of boolean values indicating
+#    the success of storing each of the wisdom types (double, float 
+#    and long double, in that order).
+#    '''
+#    cdef bint success = True
+#    cdef bint successf = True
+#    cdef bint successl = True
+#
+#    cdef char *_double_wisdom_file
+#    cdef char *_single_wisdom_file
+#    cdef char *_long_double_wisdom_file
+#
+#
+#    if double_wisdom_file is not None:
+#        _double_wisdom_file = double_wisdom_file
+#        success = fftw_export_wisdom_to_filename(_double_wisdom_file)
+#
+#    if single_wisdom_file is not None:
+#        _single_wisdom_file = single_wisdom_file
+#        successf = fftwf_export_wisdom_to_filename(_single_wisdom_file)
+#
+#    if long_double_wisdom_file is not None:
+#        _long_double_wisdom_file = long_double_wisdom_file
+#        successl = fftwl_export_wisdom_to_filename(
+#                _long_double_wisdom_file)
+#
+#    return (success, successf, successl)
+#
+#def import_wisdom_to_files(
+#        double_wisdom_file=None,
+#        single_wisdom_file=None, 
+#        long_double_wisdom_file=None):
+#    '''import_wisdom_to_file(double_wisdom_file=None, single_wisdom_file=None, long_double_wisdom_file=None)
+#
+#    import the wisdom to the passed files.
+#
+#    The double precision wisdom is imported from double_wisdom_file. 
+#    The single precision wisdom is imported from single_wisdom_file.
+#    The long double precision wisdom is imported from 
+#    long_double_wisdom_file.
+#
+#    If any of the arguments are None, then nothing is done for that
+#    file.
+#
+#    This function returns a tuple of boolean values indicating
+#    the success of loading each of the wisdom types (double, float 
+#    and long double, in that order).
+#    '''
+#    cdef bint success = True
+#    cdef bint successf = True
+#    cdef bint successl = True
+#
+#    cdef char *_double_wisdom_file
+#    cdef char *_single_wisdom_file
+#    cdef char *_long_double_wisdom_file
+#
+#    if double_wisdom_file is not None:
+#        _double_wisdom_file = double_wisdom_file
+#        success = fftw_import_wisdom_from_filename(_double_wisdom_file)
+#
+#    if single_wisdom_file is not None:
+#        _single_wisdom_file = single_wisdom_file
+#        successf = fftwf_import_wisdom_from_filename(_single_wisdom_file)
+#
+#    if long_double_wisdom_file is not None:
+#        _long_double_wisdom_file = long_double_wisdom_file
+#        successl = fftwl_import_wisdom_from_filename(
+#                _long_double_wisdom_file)
+#
+#    return (success, successf, successl)
+
+def forget_wisdom():
+    '''forget_wisdom()
+
+    Forget all the accumulated wisdom.
+    '''
+    fftw_forget_wisdom()
+    fftwf_forget_wisdom()
+    fftwl_forget_wisdom()
+
+
diff --git a/pyfftw/utils.pxi b/pyfftw/utils.pxi
new file mode 100644
index 0000000..27359d4
--- /dev/null
+++ b/pyfftw/utils.pxi
@@ -0,0 +1,126 @@
+# Copyright 2012 Knowledge Economy Developments Ltd
+# 
+# Henry Gomersall
+# heng at kedevelopments.co.uk
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+cimport numpy as np
+cimport cpu
+from libc.stdint cimport intptr_t
+
+
+cdef int _simd_alignment = cpu.simd_alignment()
+
+#: The optimum SIMD alignment in bytes, found by inspecting the CPU.
+simd_alignment = _simd_alignment
+
+#: A tuple of simd alignments that make sense for this cpu
+if _simd_alignment == 16:
+    _valid_simd_alignments = (16,)
+
+elif _simd_alignment == 32:
+    _valid_simd_alignments = (16, 32)
+
+else:
+    _valid_simd_alignments = ()
+
+cpdef n_byte_align_empty(shape, n, dtype='float64', order='C'):
+    '''n_byte_align_empty(shape, n, dtype='float64', order='C')
+
+    Function that returns an empty numpy array
+    that is n-byte aligned.
+
+    The alignment is given by the second argument, ``n``.
+    The rest of the arguments are as per :func:`numpy.empty`.
+    '''
+    
+    itemsize = np.dtype(dtype).itemsize
+
+    # Apparently there is an issue with numpy.prod wrapping around on 32-bits
+    # on Windows 64-bit. This shouldn't happen, but the following code 
+    # alleviates the problem.
+    if not isinstance(shape, (int, np.integer)):
+        array_length = 1
+        for each_dimension in shape:
+            array_length *= each_dimension
+    
+    else:
+        array_length = shape
+
+    # Allocate a new array that will contain the aligned data
+    _array_aligned = np.empty(array_length*itemsize+n, dtype='int8')
+    
+    # We now need to know how to offset _array_aligned 
+    # so it is correctly aligned
+    _array_aligned_offset = (n-<intptr_t>np.PyArray_DATA(_array_aligned))%n
+
+    array = np.frombuffer(
+            _array_aligned[_array_aligned_offset:_array_aligned_offset-n].data,
+            dtype=dtype).reshape(shape, order=order)
+    
+    return array
+
+cpdef n_byte_align(array, n, dtype=None):
+    ''' n_byte_align(array, n, dtype=None)
+
+    Function that takes a numpy array and checks it is aligned on an n-byte
+    boundary, where ``n`` is a passed parameter. If it is, the array is
+    returned without further ado.  If it is not, a new array is created and
+    the data copied in, but aligned on the n-byte boundary.
+
+    ``dtype`` is an optional argument that forces the resultant array to be
+    of that dtype.
+    '''
+    
+    if not isinstance(array, np.ndarray):
+        raise TypeError('Invalid array: n_byte_align requires a subclass '
+                'of ndarray')
+
+    if dtype is not None:
+        if not array.dtype == dtype:
+            update_dtype = True
+    
+    else:
+        dtype = array.dtype
+        update_dtype = False
+    
+    # See if we're already n byte aligned. If so, do nothing.
+    offset = <intptr_t>np.PyArray_DATA(array) %n
+
+    if offset is not 0 or update_dtype:
+
+        _array_aligned = n_byte_align_empty(array.shape, n, dtype)
+
+        _array_aligned[:] = array
+
+        array = _array_aligned.view(type=array.__class__)
+    
+    return array
+
+cpdef is_n_byte_aligned(array, n):
+    ''' is_n_byte_aligned(array, n)
+
+    Function that takes a numpy array and checks it is aligned on an n-byte
+    boundary, where ``n`` is a passed parameter, returning ``True`` if it is,
+    and ``False`` if it is not.
+    '''
+    if not isinstance(array, np.ndarray):
+        raise TypeError('Invalid array: is_n_byte_aligned requires a subclass '
+                'of ndarray')
+
+    # See if we're n byte aligned.
+    offset = <intptr_t>np.PyArray_DATA(array) %n
+
+    return not bool(offset)
diff --git a/requirements.txt b/requirements.txt
new file mode 100644
index 0000000..0c4c1b0
--- /dev/null
+++ b/requirements.txt
@@ -0,0 +1,2 @@
+numpy>=1.6
+scipy>=0.12.0
diff --git a/setup.py b/setup.py
new file mode 100644
index 0000000..e024f62
--- /dev/null
+++ b/setup.py
@@ -0,0 +1,180 @@
+# Copyright 2012 Knowledge Economy Developments Ltd
+# 
+# Henry Gomersall
+# heng at kedevelopments.co.uk
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+from distutils.core import setup, Command
+from distutils.extension import Extension
+from distutils.util import get_platform
+from distutils.ccompiler import get_default_compiler
+
+import os
+import numpy
+import sys
+
+# Get the version string in rather a roundabout way.
+# We can't import it directly as the module may not yet be
+# built in pyfftw.
+import imp
+ver_file, ver_pathname, ver_description = imp.find_module(
+            '_version', ['pyfftw'])
+try:
+    _version = imp.load_module('version', ver_file, ver_pathname, 
+            ver_description)
+finally:
+    ver_file.close()
+
+version = _version.version
+
+try:
+    from Cython.Distutils import build_ext as build_ext
+    sources = [os.path.join(os.getcwd(), 'pyfftw', 'pyfftw.pyx')]
+except ImportError as e:
+    sources = [os.path.join(os.getcwd(), 'pyfftw', 'pyfftw.c')]
+    if not os.path.exists(sources[0]):
+        raise ImportError(str(e) + '. ' +
+                'Cython is required to build the initial .c file.')
+
+    # We can't cythonize, but that's ok as it's been done already.
+    from distutils.command.build_ext import build_ext
+
+include_dirs = [os.path.join(os.getcwd(), 'include'), 
+        os.path.join(os.getcwd(), 'pyfftw'),
+        numpy.get_include()]
+library_dirs = []
+package_data = {}
+
+if get_platform() in ('win32', 'win-amd64'):
+    libraries = ['libfftw3-3', 'libfftw3f-3', 'libfftw3l-3']
+    include_dirs.append(os.path.join(os.getcwd(), 'include', 'win'))
+    library_dirs.append(os.path.join(os.getcwd(), 'pyfftw'))
+    package_data['pyfftw'] = [
+            'libfftw3-3.dll', 'libfftw3l-3.dll', 'libfftw3f-3.dll']
+else:
+    libraries = ['fftw3', 'fftw3f', 'fftw3l', 'fftw3_threads', 
+            'fftw3f_threads', 'fftw3l_threads']
+
+class custom_build_ext(build_ext):
+    def finalize_options(self):
+
+        build_ext.finalize_options(self)
+
+        if self.compiler is None:
+            compiler = get_default_compiler()
+        else:
+            compiler = self.compiler
+
+        if compiler == 'msvc':
+            # Add msvc specific hacks
+            
+            if (sys.version_info.major, sys.version_info.minor) < (3, 3):
+                # The check above is a nasty hack. We're using the python
+                # version as a proxy for the MSVC version. 2008 doesn't
+                # have stdint.h, so is needed. 2010 does.
+                #
+                # We need to add the path to msvc includes
+                include_dirs.append(os.path.join(os.getcwd(), 
+                    'include', 'msvc_2008'))
+
+            # We need to prepend lib to all the library names
+            _libraries = []
+            for each_lib in self.libraries:
+                _libraries.append('lib' + each_lib)
+
+            self.libraries = _libraries
+
+ext_modules = [Extension('pyfftw.pyfftw',
+    sources=sources,
+    libraries=libraries,
+    library_dirs=library_dirs,
+    include_dirs=include_dirs)]
+
+long_description = '''
+pyFFTW is a pythonic wrapper around `FFTW <http://www.fftw.org/>`_, the
+speedy FFT library. The ultimate aim is to present a unified interface for all
+the possible transforms that FFTW can perform.
+
+Both the complex DFT and the real DFT are supported, as well as arbitrary
+axes of abitrary shaped and strided arrays, which makes it almost
+feature equivalent to standard and real FFT functions of ``numpy.fft`` 
+(indeed, it supports the ``clongdouble`` dtype which ``numpy.fft`` does not).
+
+Operating FFTW in multithreaded mode is supported.
+
+A comprehensive unittest suite can be found with the source on the github 
+repository.
+
+To build for windows from source, download the fftw dlls for your system
+and the header file from here (they're in a zip file):
+http://www.fftw.org/install/windows.html and place them in the pyfftw
+directory. The files are libfftw3-3.dll, libfftw3l-3.dll, libfftw3f-3.dll 
+and libfftw3.h.
+
+Under linux, to build from source, the FFTW library must be installed already.
+This should probably work for OSX, though I've not tried it.
+
+Numpy is a dependency for both.
+
+The documentation can be found 
+`here <http://hgomersall.github.com/pyFFTW/>`_, and the source
+is on `github <https://github.com/hgomersall/pyFFTW>`_.
+'''
+
+class TestCommand(Command):
+    user_options = []
+
+    def initialize_options(self):
+        pass
+
+    def finalize_options(self):
+        pass
+
+    def run(self):
+        import sys, subprocess
+        errno = subprocess.call([sys.executable, '-m', 'unittest', 
+            'discover'])
+        raise SystemExit(errno)
+
+setup_args = {
+        'name': 'pyFFTW',
+        'version': version,
+        'author': 'Henry Gomersall',
+        'author_email': 'heng at kedevelopments.co.uk',
+        'description': 'A pythonic wrapper around FFTW, the FFT library, presenting a unified interface for all the supported transforms.',
+        'url': 'http://hgomersall.github.com/pyFFTW/',
+        'long_description': long_description,
+        'classifiers': [
+            'Programming Language :: Python',
+            'Programming Language :: Python :: 3',
+            'Development Status :: 4 - Beta',
+            'License :: OSI Approved :: GNU General Public License (GPL)',
+            'Operating System :: OS Independent',
+            'Intended Audience :: Developers',
+            'Intended Audience :: Science/Research',
+            'Topic :: Scientific/Engineering',
+            'Topic :: Scientific/Engineering :: Mathematics',
+            'Topic :: Multimedia :: Sound/Audio :: Analysis',
+            ],
+        'packages':['pyfftw', 'pyfftw.builders', 'pyfftw.interfaces'],
+        'ext_modules': ext_modules,
+        'include_dirs': include_dirs,
+        'package_data': package_data,
+        'cmdclass': {'test': TestCommand,
+            'build_ext': custom_build_ext},
+  }
+
+if __name__ == '__main__':
+    setup(**setup_args)
diff --git a/test/__init__.py b/test/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/test/test_pyfftw_base.py b/test/test_pyfftw_base.py
new file mode 100644
index 0000000..ec6aec5
--- /dev/null
+++ b/test/test_pyfftw_base.py
@@ -0,0 +1,199 @@
+# Copyright 2012 Knowledge Economy Developments Ltd
+# 
+# Henry Gomersall
+# heng at kedevelopments.co.uk
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+from pyfftw import FFTW, n_byte_align, n_byte_align_empty
+import numpy
+import struct
+from timeit import Timer
+
+import unittest
+
+class FFTWBaseTest(unittest.TestCase):
+    
+    def reference_fftn(self, a, axes):
+        return numpy.fft.fftn(a, axes=axes)
+
+    def __init__(self, *args, **kwargs):
+
+        super(FFTWBaseTest, self).__init__(*args, **kwargs)
+        self.make_shapes()
+
+        if not hasattr(self, 'assertRaisesRegex'):
+            self.assertRaisesRegex = self.assertRaisesRegexp
+
+    def setUp(self):
+        
+        self.input_dtype = numpy.complex64
+        self.output_dtype = numpy.complex64
+        self.np_fft_comparison = numpy.fft.fft
+
+        self.direction = 'FFTW_FORWARD'
+        return
+
+    def tearDown(self):
+        
+        return
+
+    def get_input_dtype_alignment(self):
+        return numpy.dtype(self.input_dtype).alignment
+
+    def get_output_dtype_alignment(self):
+        return numpy.dtype(self.output_dtype).alignment
+
+    def make_shapes(self):
+        self.input_shapes = {
+                'small_1d': (16,),
+                '1d': (2048,),
+                '2d': (256, 2048),
+                '3d': (5, 256, 2048)}
+
+        self.output_shapes = {
+                'small_1d': (16,),
+                '1d': (2048,),
+                '2d': (256, 2048),
+                '3d': (5, 256, 2048)}
+
+    def create_test_arrays(self, input_shape, output_shape, axes=None):
+        a = self.input_dtype(numpy.random.randn(*input_shape)
+                +1j*numpy.random.randn(*input_shape))
+
+        b = self.output_dtype(numpy.random.randn(*output_shape)
+                +1j*numpy.random.randn(*output_shape))
+
+        return a, b
+
+    def timer_routine(self, pyfftw_callable, numpy_fft_callable,
+            comparison_string='numpy.fft'):
+
+        N = 100
+
+        t = Timer(stmt=pyfftw_callable)
+        t_numpy_fft = Timer(stmt=numpy_fft_callable)
+    
+        t_str = ("%.2f" % (1000.0/N*t.timeit(N)))+' ms'
+        t_numpy_str = ("%.2f" % (1000.0/N*t_numpy_fft.timeit(N)))+' ms'
+
+        print('One run: '+ t_str + \
+                ' (versus ' + t_numpy_str + ' for ' + comparison_string + \
+                ')')
+
+
+    def run_validate_fft(self, a, b, axes, fft=None, ifft=None, 
+            force_unaligned_data=False, create_array_copies=True, 
+            threads=1, flags=('FFTW_ESTIMATE',)):
+        ''' Run a validation of the FFTW routines for the passed pair
+        of arrays, a and b, and the axes argument.
+
+        a and b are assumed to be the same shape (but not necessarily
+        the same layout in memory).
+
+        fft and ifft, if passed, should be instantiated FFTW objects.
+
+        If force_unaligned_data is True, the flag FFTW_UNALIGNED
+        will be passed to the fftw routines.
+
+        The threads argument runs the validation with multiple threads.
+
+        flags is passed to the creation of the FFTW object.
+        '''
+
+        if create_array_copies:
+            # Don't corrupt the original mutable arrays
+            a = a.copy()
+            b = b.copy()
+
+        a_orig = a.copy()
+
+        flags = list(flags)
+
+        if force_unaligned_data:
+            flags.append('FFTW_UNALIGNED')
+        
+        if fft == None:
+            fft = FFTW(a,b,axes=axes, direction='FFTW_FORWARD',
+                    flags=flags, threads=threads)
+        else:
+            fft.update_arrays(a,b)
+
+        if ifft == None:
+            ifft = FFTW(b, a, axes=axes, direction='FFTW_BACKWARD',
+                    flags=flags, threads=threads)
+        else:
+            ifft.update_arrays(b,a)
+
+
+        a[:] = a_orig
+
+        # Test the forward FFT by comparing it to the result from numpy.fft
+        fft.execute()
+        ref_b = self.reference_fftn(a, axes=axes)
+
+        # This is actually quite a poor relative error, but it still
+        # sometimes fails. I assume that numpy.fft has different internals
+        # to fftw.
+        self.assertTrue(numpy.allclose(b, ref_b, rtol=1e-2, atol=1e-3))
+        
+        # Test the inverse FFT by comparing the result to the starting
+        # value (which is scaled as per FFTW being unnormalised).
+        ifft.execute()
+        # The scaling is the product of the lengths of the fft along
+        # the axes along which the fft is taken.
+        scaling = numpy.prod(numpy.array(a.shape)[list(axes)])
+        
+        self.assertEqual(ifft.N, scaling)
+        self.assertEqual(fft.N, scaling)
+
+        self.assertTrue(numpy.allclose(a/scaling, a_orig, rtol=1e-2, atol=1e-3))
+        return fft, ifft
+
+
+def run_test_suites(test_suites, run_tests=None):
+    '''From each test case (derived from TestCase) in test_suites,
+    load and run all the test cases within.
+
+    If run_tests is not None, then it should be a dictionary with
+    keys being the test suite class name, and the values being
+    a list of test methods to run. Alternatively, the key can
+    be 'all' in which case all the test suites will be run with 
+    the provided list of test suites.
+    '''
+    suite = unittest.TestSuite()
+
+    for test_class in test_suites:
+        tests = unittest.TestLoader().loadTestsFromTestCase(test_class)
+        
+        if run_tests is not None:
+            if test_class.__name__ in run_tests:
+                this_suite_run = set(run_tests[test_class.__name__])
+            else:
+                this_suite_run = set()
+
+            if 'all' in run_tests:
+                this_suite_run = this_suite_run.union(run_tests['all'])
+
+            _tests = []
+            for each_test in tests:
+                if (each_test.id().split('.')[-1] in this_suite_run):
+                    _tests.append(each_test)
+
+            tests = _tests
+
+        suite.addTests(tests)
+
+    
+    unittest.TextTestRunner(verbosity=2).run(suite)
diff --git a/test/test_pyfftw_builders.py b/test/test_pyfftw_builders.py
new file mode 100644
index 0000000..844617e
--- /dev/null
+++ b/test/test_pyfftw_builders.py
@@ -0,0 +1,1231 @@
+# Copyright 2012 Knowledge Economy Developments Ltd
+# 
+# Henry Gomersall
+# heng at kedevelopments.co.uk
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+from pyfftw import builders, n_byte_align_empty, n_byte_align, FFTW
+from pyfftw.builders import _utils as utils
+from .test_pyfftw_base import run_test_suites
+
+import unittest
+import numpy
+from numpy import fft as np_fft
+import copy
+import inspect
+import warnings
+warnings.filterwarnings('always')
+
+complex_dtypes = (numpy.complex64, numpy.complex128, numpy.clongdouble)
+real_dtypes = (numpy.float32, numpy.float64, numpy.longdouble)
+
+def make_complex_data(shape, dtype):
+    ar, ai = dtype(numpy.random.randn(2, *shape))
+    return ar + 1j*ai
+
+def make_real_data(shape, dtype):
+    return dtype(numpy.random.randn(*shape))
+
+
+io_dtypes = {
+    'complex': (complex_dtypes, make_complex_data),
+    'r2c': (real_dtypes, make_real_data),
+    'c2r': (complex_dtypes, make_complex_data)}
+
+functions = {
+        'fft': 'complex',
+        'ifft': 'complex', 
+        'rfft': 'r2c',
+        'irfft': 'c2r',
+        'rfftn': 'r2c',
+        'irfftn': 'c2r',
+        'rfft2': 'r2c',
+        'irfft2': 'c2r',
+        'fft2': 'complex',
+        'ifft2': 'complex',
+        'fftn': 'complex',
+        'ifftn': 'complex'}
+
+
+class BuildersTestFFT(unittest.TestCase):
+
+    func = 'fft'
+    axes_kw = 'axis'
+    test_shapes = (
+            ((100,), {}),
+            ((128, 64), {'axis': 0}),
+            ((128, 32), {'axis': -1}),
+            ((59, 100), {}),
+            ((32, 32, 4), {'axis': 1}),
+            ((64, 128, 16), {}),
+            )
+
+    # invalid_s_shapes is:
+    # (size, invalid_args, error_type, error_string)
+    invalid_args = (
+            ((100,), ((100, 200),), TypeError, ''),
+            ((100, 200), ((100, 200),), TypeError, ''),
+            ((100,), (100, (-2, -1)), TypeError, ''),
+            ((100,), (100, -20), IndexError, ''))
+
+    realinv = False
+
+    def __init__(self, *args, **kwargs):
+
+        super(BuildersTestFFT, self).__init__(*args, **kwargs)
+
+        if not hasattr(self, 'assertRaisesRegex'):
+            self.assertRaisesRegex = self.assertRaisesRegexp
+
+    @property
+    def test_data(self):
+        for test_shape, kwargs in self.test_shapes:
+            axes = self.axes_from_kwargs(kwargs)
+            s = self.s_from_kwargs(test_shape, kwargs)
+
+            if self.realinv:
+                test_shape = list(test_shape)
+                test_shape[axes[-1]] = test_shape[axes[-1]]//2 + 1
+                test_shape = tuple(test_shape)
+
+            yield test_shape, s, kwargs
+
+    def validate_pyfftw_object(self, array_type, test_shape, dtype, 
+            s, kwargs):
+
+        input_array = array_type(test_shape, dtype)
+        
+        if input_array.dtype == 'clongdouble':
+            np_input_array = numpy.complex128(input_array)
+
+        elif input_array.dtype == 'longdouble':
+            np_input_array = numpy.float64(input_array)
+
+        else:
+            np_input_array = input_array
+
+        with warnings.catch_warnings(record=True) as w:
+            # We catch the warnings so as to pick up on when
+            # a complex array is turned into a real array
+
+            FFTW_object = getattr(builders, self.func)(
+                    input_array.copy(), s, **kwargs)
+
+            # We run FFT twice to check two operations don't
+            # yield different results (which they might if 
+            # the state is buggered up).
+            output_array = FFTW_object(input_array.copy())
+            output_array_2 = FFTW_object(input_array.copy())
+
+
+            if 'axes' in kwargs:
+                axes = {'axes': kwargs['axes']}
+            elif 'axis' in kwargs:
+                axes = {'axis': kwargs['axis']}
+            else:
+                axes = {}
+
+            test_out_array = getattr(np_fft, self.func)(
+                    np_input_array.copy(), s, **axes)
+
+            if (functions[self.func] == 'r2c'):
+                if numpy.iscomplexobj(input_array):
+                    if len(w) > 0:
+                        # Make sure a warning is raised
+                        self.assertIs(
+                                w[-1].category, numpy.ComplexWarning)
+        
+        self.assertTrue(
+                numpy.allclose(output_array, test_out_array, 
+                    rtol=1e-2, atol=1e-4))
+
+        self.assertTrue(
+                numpy.allclose(output_array_2, test_out_array, 
+                    rtol=1e-2, atol=1e-4))
+
+        return FFTW_object
+
+    def axes_from_kwargs(self, kwargs):
+        
+        argspec = inspect.getargspec(getattr(builders, self.func))
+        default_args = dict(list(zip(
+            argspec.args[-len(argspec.defaults):], argspec.defaults)))
+
+        if 'axis' in kwargs:
+            axes = (kwargs['axis'],)
+
+        elif 'axes' in kwargs:
+            axes = kwargs['axes']
+            if axes is None:
+                axes = default_args['axes']
+
+        else:
+            if 'axis' in default_args:
+                # default 1D
+                axes = (default_args['axis'],)
+            else:
+                # default nD
+                axes = default_args['axes']
+
+        if axes is None:
+            axes = (-1,)
+
+        return axes
+
+    def s_from_kwargs(self, test_shape, kwargs):
+        ''' Return either a scalar s or a tuple depending on
+        whether axis or axes is specified
+        '''
+        argspec = inspect.getargspec(getattr(builders, self.func))
+        default_args = dict(list(zip(
+            argspec.args[-len(argspec.defaults):], argspec.defaults)))
+
+        if 'axis' in kwargs:
+            s = test_shape[kwargs['axis']]
+
+        elif 'axes' in kwargs:
+            axes = kwargs['axes']
+            if axes is not None:
+                s = []
+                for each_axis in axes:
+                    s.append(test_shape[each_axis])
+            else:
+                # default nD
+                s = []
+                try:
+                    for each_axis in default_args['axes']:
+                        s.append(test_shape[each_axis])
+                except TypeError:
+                    s = [test_shape[-1]]
+
+        else:
+            if 'axis' in default_args:
+                # default 1D
+                s = test_shape[default_args['axis']]
+            else:
+                # default nD
+                s = []
+                try:
+                    for each_axis in default_args['axes']:
+                        s.append(test_shape[each_axis])
+                except TypeError:
+                    s = None
+
+        return s
+
+    def test_valid(self):
+        dtype_tuple = io_dtypes[functions[self.func]]
+        
+        for dtype in dtype_tuple[0]:
+            for test_shape, s, kwargs in self.test_data:
+                s = None
+
+                FFTW_object = self.validate_pyfftw_object(dtype_tuple[1], 
+                        test_shape, dtype, s, kwargs)
+
+                self.assertTrue(type(FFTW_object) == FFTW)
+
+    def test_fail_on_invalid_s_or_axes(self):
+        dtype_tuple = io_dtypes[functions[self.func]]
+        
+        for dtype in dtype_tuple[0]:
+
+            for test_shape, args, exception, e_str in self.invalid_args:
+                input_array = dtype_tuple[1](test_shape, dtype)
+                
+                self.assertRaisesRegex(exception, e_str,
+                        getattr(builders, self.func), 
+                        *((input_array,) + args))
+
+
+    def test_same_sized_s(self):
+        dtype_tuple = io_dtypes[functions[self.func]]
+        for dtype in dtype_tuple[0]:
+            for test_shape, s, kwargs in self.test_data:
+
+                FFTW_object = self.validate_pyfftw_object(dtype_tuple[1], 
+                        test_shape, dtype, s, kwargs)
+
+                self.assertTrue(type(FFTW_object) == FFTW)
+
+    def test_bigger_s_overwrite_input(self):
+        '''Test that FFTWWrapper deals with a destroyed input properly.
+        '''
+        dtype_tuple = io_dtypes[functions[self.func]]
+        for dtype in dtype_tuple[0]:
+            for test_shape, s, kwargs in self.test_data:
+
+                try:
+                    for each_axis, length in enumerate(s):
+                        s[each_axis] += 2
+                except TypeError:
+                    s += 2
+
+                _kwargs = kwargs.copy()
+
+                if self.func not in ('irfft2', 'irfftn'):
+                    # They implicitly overwrite the input anyway
+                    _kwargs['overwrite_input'] = True
+
+                FFTW_object = self.validate_pyfftw_object(dtype_tuple[1], 
+                        test_shape, dtype, s, _kwargs)
+
+                self.assertTrue(
+                        type(FFTW_object) == utils._FFTWWrapper)
+    
+    def test_bigger_s(self):
+        dtype_tuple = io_dtypes[functions[self.func]]
+        for dtype in dtype_tuple[0]:
+            for test_shape, s, kwargs in self.test_data:
+
+                try:
+                    for each_axis, length in enumerate(s):
+                        s[each_axis] += 2
+                except TypeError:
+                    s += 2
+
+                FFTW_object = self.validate_pyfftw_object(dtype_tuple[1], 
+                        test_shape, dtype, s, kwargs)
+
+                self.assertTrue(
+                        type(FFTW_object) == utils._FFTWWrapper)
+
+    def test_smaller_s(self):
+        dtype_tuple = io_dtypes[functions[self.func]]
+        for dtype in dtype_tuple[0]:
+            for test_shape, s, kwargs in self.test_data:
+
+                try:
+                    for each_axis, length in enumerate(s):
+                        s[each_axis] -= 2
+                except TypeError:
+                    s -= 2
+
+                FFTW_object = self.validate_pyfftw_object(dtype_tuple[1], 
+                        test_shape, dtype, s, kwargs)
+
+                self.assertTrue(
+                        type(FFTW_object) == utils._FFTWWrapper)                
+
+    def test_bigger_and_smaller_s(self):
+        dtype_tuple = io_dtypes[functions[self.func]]
+        for dtype in dtype_tuple[0]:
+            i = -1
+            for test_shape, s, kwargs in self.test_data:
+
+                try:
+                    for each_axis, length in enumerate(s):
+                        s[each_axis] += i * 2
+                        i *= i
+                except TypeError:
+                    s += i * 2
+                    i *= i
+
+                FFTW_object = self.validate_pyfftw_object(dtype_tuple[1], 
+                        test_shape, dtype, s, kwargs)
+
+                self.assertTrue(
+                        type(FFTW_object) == utils._FFTWWrapper)
+    
+    def test_auto_contiguous_input(self):
+        dtype_tuple = io_dtypes[functions[self.func]]
+        
+        for dtype in dtype_tuple[0]:
+            for test_shape, s, kwargs in self.test_data:
+                _kwargs = kwargs.copy()
+                s1 = None
+                s2 = copy.copy(s)
+                try:
+                    for each_axis, length in enumerate(s):
+                        s2[each_axis] += 2
+                except TypeError:
+                    s2 += 2
+
+                _test_shape = []
+                slices = []
+                for each_dim in test_shape:
+                    _test_shape.append(each_dim*2)
+                    slices.append(slice(None, None, 2))
+
+                input_array = dtype_tuple[1](_test_shape, dtype)[slices]
+                # check the input is non contiguous
+                self.assertFalse(input_array.flags['C_CONTIGUOUS'] or 
+                    input_array.flags['F_CONTIGUOUS'])
+
+
+                # Firstly check the non-contiguous case (for both
+                # FFTW and _FFTWWrapper)
+                _kwargs['auto_contiguous'] = False
+                
+                # We also need to make sure we're not copying due
+                # to a trivial misalignment
+                _kwargs['auto_align_input'] = False
+
+                FFTW_object = getattr(builders, self.func)(
+                        input_array, s1, **_kwargs)
+
+                internal_input_array = FFTW_object.get_input_array()
+                flags = internal_input_array.flags
+                self.assertTrue(input_array is internal_input_array)
+                self.assertFalse(flags['C_CONTIGUOUS'] or 
+                    flags['F_CONTIGUOUS'])
+
+                FFTW_object = getattr(builders, self.func)(
+                        input_array, s2, **_kwargs)
+
+                internal_input_array = FFTW_object.get_input_array()
+                flags = internal_input_array.flags
+                # We actually expect the _FFTWWrapper to be C_CONTIGUOUS
+                self.assertTrue(flags['C_CONTIGUOUS'])
+
+                # Now for the contiguous case (for both
+                # FFTW and _FFTWWrapper)
+                _kwargs['auto_contiguous'] = True
+                FFTW_object = getattr(builders, self.func)(
+                        input_array, s1, **_kwargs)
+
+                internal_input_array = FFTW_object.get_input_array()
+                flags = internal_input_array.flags
+                self.assertTrue(flags['C_CONTIGUOUS'] or 
+                    flags['F_CONTIGUOUS'])
+                
+                FFTW_object = getattr(builders, self.func)(
+                        input_array, s2, **_kwargs)
+
+                internal_input_array = FFTW_object.get_input_array()
+                flags = internal_input_array.flags
+                # as above
+                self.assertTrue(flags['C_CONTIGUOUS'])
+
+
+    def test_auto_align_input(self):
+        dtype_tuple = io_dtypes[functions[self.func]]
+        
+        for dtype in dtype_tuple[0]:
+            for test_shape, s, kwargs in self.test_data:
+                _kwargs = kwargs.copy()
+                s1 = None
+                s2 = copy.copy(s)
+                try:
+                    for each_axis, length in enumerate(s):
+                        s2[each_axis] += 2
+                except TypeError:
+                    s2 += 2
+
+                input_array = dtype_tuple[1](test_shape, dtype)
+
+                # Firstly check the unaligned case (for both
+                # FFTW and _FFTWWrapper)
+                _kwargs['auto_align_input'] = False
+                FFTW_object = getattr(builders, self.func)(
+                        input_array.copy(), s1, **_kwargs)
+
+                self.assertFalse(FFTW_object.simd_aligned)
+
+                FFTW_object = getattr(builders, self.func)(
+                        input_array.copy(), s2, **_kwargs)
+
+                self.assertFalse(FFTW_object.simd_aligned)
+
+                # Now for the aligned case (for both
+                # FFTW and _FFTWWrapper)
+                _kwargs['auto_align_input'] = True
+                FFTW_object = getattr(builders, self.func)(
+                        input_array.copy(), s1, **_kwargs)
+
+                self.assertTrue(FFTW_object.simd_aligned)
+
+                self.assertTrue('FFTW_UNALIGNED' not in FFTW_object.flags)                
+                FFTW_object = getattr(builders, self.func)(
+                        input_array.copy(), s2, **_kwargs)
+
+                self.assertTrue(FFTW_object.simd_aligned)
+
+                self.assertTrue('FFTW_UNALIGNED' not in FFTW_object.flags)
+
+    def test_dtype_coercian(self):
+        # Make sure we input a dtype that needs to be coerced
+        if functions[self.func] == 'r2c':
+            dtype_tuple = io_dtypes['complex']
+        else:
+            dtype_tuple = io_dtypes['r2c']
+
+        for dtype in dtype_tuple[0]:
+            for test_shape, s, kwargs in self.test_data:
+                s = None
+
+                FFTW_object = self.validate_pyfftw_object(dtype_tuple[1], 
+                        test_shape, dtype, s, kwargs)
+
+                self.assertTrue(type(FFTW_object) == FFTW)
+
+    def test_persistent_padding(self):
+        '''Test to confirm the padding it not touched after creation.
+        '''
+        dtype_tuple = io_dtypes[functions[self.func]]
+        for dtype in dtype_tuple[0]:
+            for test_shape, s, kwargs in self.test_data:
+
+                n_add = 2
+                # these slicers get the padding
+                # from the internal input array
+                padding_slicer = [slice(None)] * len(test_shape)
+                axes = self.axes_from_kwargs(kwargs)
+                try:
+                    for each_axis, length in enumerate(s):
+                        s[each_axis] += n_add
+                        padding_slicer[axes[each_axis]] = (
+                                slice(s[each_axis], None))
+
+                except TypeError:
+                    s += n_add
+                    padding_slicer[axes[0]] = slice(s, None)
+
+                # Get a valid object
+                FFTW_object = self.validate_pyfftw_object(dtype_tuple[1], 
+                        test_shape, dtype, s, kwargs)
+
+                internal_array = FFTW_object.get_input_array()
+                padding = internal_array[padding_slicer]
+
+                # Fill the padding with garbage
+                initial_padding = dtype_tuple[1](padding.shape, dtype)
+
+                padding[:] = initial_padding
+
+                # Now confirm that nothing is done to the padding
+                FFTW_object()
+
+                final_padding = FFTW_object.get_input_array()[padding_slicer]
+
+                self.assertTrue(numpy.all(final_padding == initial_padding))
+
+    def test_planner_effort(self):
+        '''Test the planner effort arg
+        '''
+        dtype_tuple = io_dtypes[functions[self.func]]
+        test_shape = (16,)
+        
+        for dtype in dtype_tuple[0]:
+            s = None
+            if self.axes_kw == 'axis':
+                kwargs = {'axis': -1}
+            else:
+                kwargs = {'axes': (-1,)}
+
+            for each_effort in ('FFTW_ESTIMATE', 'FFTW_MEASURE', 
+                    'FFTW_PATIENT', 'FFTW_EXHAUSTIVE'):
+                
+                kwargs['planner_effort'] = each_effort
+                
+                FFTW_object = self.validate_pyfftw_object(
+                        dtype_tuple[1], test_shape, dtype, s, kwargs)
+
+                self.assertTrue(each_effort in FFTW_object.flags)
+
+            kwargs['planner_effort'] = 'garbage'
+
+            self.assertRaisesRegex(ValueError, 'Invalid planner effort',
+                    self.validate_pyfftw_object, 
+                    *(dtype_tuple[1], test_shape, dtype, s, kwargs))
+
+    def test_threads_arg(self):
+        '''Test the threads argument
+        '''
+        dtype_tuple = io_dtypes[functions[self.func]]
+        test_shape = (16,)
+        
+        for dtype in dtype_tuple[0]:
+            s = None
+            if self.axes_kw == 'axis':
+                kwargs = {'axis': -1}
+            else:
+                kwargs = {'axes': (-1,)}
+
+            kwargs['threads'] = 2
+            
+            # Should just work
+            FFTW_object = self.validate_pyfftw_object(
+                    dtype_tuple[1], test_shape, dtype, s, kwargs)
+
+            kwargs['threads'] = 'bleh'
+            
+            # Should not work
+            self.assertRaises(TypeError,
+                    self.validate_pyfftw_object, 
+                    *(dtype_tuple[1], test_shape, dtype, s, kwargs))
+
+
+    def test_overwrite_input(self):
+        '''Test the overwrite_input flag
+        '''
+        dtype_tuple = io_dtypes[functions[self.func]]
+        
+        for dtype in dtype_tuple[0]:
+            for test_shape, s, _kwargs in self.test_data:
+                s = None
+
+                kwargs = _kwargs.copy()
+                FFTW_object = self.validate_pyfftw_object(dtype_tuple[1], 
+                        test_shape, dtype, s, kwargs)
+
+                if self.func not in ('irfft2', 'irfftn'):
+                    self.assertTrue(
+                            'FFTW_DESTROY_INPUT' not in FFTW_object.flags)
+
+                    kwargs['overwrite_input'] = True
+
+                    FFTW_object = self.validate_pyfftw_object(
+                            dtype_tuple[1], test_shape, dtype, s, kwargs)
+
+                self.assertTrue('FFTW_DESTROY_INPUT' in FFTW_object.flags)
+
+
+    def test_input_maintained(self):
+        '''Test to make sure the input is maintained
+        '''
+        dtype_tuple = io_dtypes[functions[self.func]]
+        for dtype in dtype_tuple[0]:
+            for test_shape, s, kwargs in self.test_data:
+
+                input_array = dtype_tuple[1](test_shape, dtype)
+                
+                FFTW_object = getattr(
+                        builders, self.func)(input_array, s, **kwargs)
+
+                final_input_array = FFTW_object.get_input_array()
+
+                self.assertTrue(
+                        numpy.alltrue(input_array == final_input_array))
+
+    def test_avoid_copy(self):
+        '''Test the avoid_copy flag
+        '''
+        dtype_tuple = io_dtypes[functions[self.func]]
+        
+        for dtype in dtype_tuple[0]:
+            for test_shape, s, kwargs in self.test_data:
+                _kwargs = kwargs.copy()
+
+                _kwargs['avoid_copy'] = True
+
+                s2 = copy.copy(s)
+                try:
+                    for each_axis, length in enumerate(s):
+                        s2[each_axis] += 2
+                except TypeError:
+                    s2 += 2
+
+                input_array = dtype_tuple[1](test_shape, dtype)
+
+                self.assertRaisesRegex(ValueError, 
+                        'Cannot avoid copy.*transform shape.*',
+                        getattr(builders, self.func),
+                        input_array, s2, **_kwargs)
+
+                non_contiguous_shape = [
+                        each_dim * 2 for each_dim in test_shape]
+                non_contiguous_slices = (
+                        [slice(None, None, 2)] * len(test_shape))
+
+                misaligned_input_array = dtype_tuple[1](
+                        non_contiguous_shape, dtype)[non_contiguous_slices]
+
+                self.assertRaisesRegex(ValueError, 
+                        'Cannot avoid copy.*not contiguous.*',
+                        getattr(builders, self.func),
+                        misaligned_input_array, s, **_kwargs)
+
+                # Offset by one from 16 byte aligned to guarantee it's not
+                # 16 byte aligned
+                _input_array = n_byte_align_empty(
+                        numpy.prod(test_shape)*input_array.itemsize+1, 
+                        16, dtype='int8')
+    
+                misaligned_input_array = _input_array[1:].view(
+                         dtype=input_array.dtype).reshape(*test_shape)
+
+                self.assertRaisesRegex(ValueError, 
+                        'Cannot avoid copy.*not aligned.*',
+                        getattr(builders, self.func),
+                        misaligned_input_array, s, **_kwargs)
+
+                _input_array = n_byte_align(input_array.copy(), 16)
+                FFTW_object = getattr(builders, self.func)(
+                        _input_array, s, **_kwargs)
+
+                # A catch all to make sure the internal array
+                # is not a copy
+                self.assertTrue(FFTW_object.get_input_array() is
+                        _input_array)
+
+
+class BuildersTestIFFT(BuildersTestFFT):
+    func = 'ifft'
+
+class BuildersTestRFFT(BuildersTestFFT):
+    func = 'rfft'
+
+class BuildersTestIRFFT(BuildersTestFFT):
+    func = 'irfft'
+    realinv = True    
+
+class BuildersTestFFT2(BuildersTestFFT):
+    axes_kw = 'axes'    
+    func = 'ifft2'
+    test_shapes = (
+            ((128, 64), {'axes': None}),
+            ((128, 32), {'axes': None}),
+            ((128, 32, 4), {'axes': (0, 2)}),
+            ((59, 100), {'axes': (-2, -1)}),
+            ((64, 128, 16), {'axes': (0, 2)}),
+            ((4, 6, 8, 4), {'axes': (0, 3)}),
+            )
+    
+    invalid_args = (
+            ((100,), ((100, 200),), ValueError, 'Shape error'),
+            ((100, 200), ((100, 200, 100),), ValueError, 'Shape error'),
+            ((100,), ((100, 200), (-3, -2, -1)), ValueError, 'Shape error'),
+            ((100, 200), (100, -1), TypeError, ''),
+            ((100, 200), ((100, 200), (-3, -2)), IndexError, 'Invalid axes'),
+            ((100, 200), ((100,), (-3,)), IndexError, 'Invalid axes'))
+
+
+class BuildersTestIFFT2(BuildersTestFFT2):
+    func = 'ifft2'
+
+class BuildersTestRFFT2(BuildersTestFFT2):
+    func = 'rfft2'
+
+class BuildersTestIRFFT2(BuildersTestFFT2):
+    func = 'irfft2'
+    realinv = True    
+
+class BuildersTestFFTN(BuildersTestFFT2):
+    func = 'ifftn'
+    test_shapes = (
+            ((128, 32, 4), {'axes': None}),
+            ((64, 128, 16), {'axes': (0, 1, 2)}),
+            ((4, 6, 8, 4), {'axes': (0, 3, 1)}),
+            ((4, 6, 8, 4), {'axes': (0, 3, 1, 2)}),
+            )
+
+class BuildersTestIFFTN(BuildersTestFFTN):
+    func = 'ifftn'
+
+class BuildersTestRFFTN(BuildersTestFFTN):
+    func = 'rfftn'
+
+class BuildersTestIRFFTN(BuildersTestFFTN):
+    func = 'irfftn'
+    realinv = True    
+
+
+class BuildersTestFFTWWrapper(unittest.TestCase):
+    '''This basically reimplements the FFTW.__call__ tests, with
+    a few tweaks.
+    '''
+
+    def __init__(self, *args, **kwargs):
+
+        super(BuildersTestFFTWWrapper, self).__init__(*args, **kwargs)
+
+        if not hasattr(self, 'assertRaisesRegex'):
+            self.assertRaisesRegex = self.assertRaisesRegexp
+
+    def setUp(self):
+
+        self.input_array_slicer = [slice(None), slice(256)]
+        self.FFTW_array_slicer = [slice(128), slice(None)]
+        
+        self.input_array = n_byte_align_empty((128, 512), 16, 
+                dtype='complex128')
+        self.output_array = n_byte_align_empty((256, 256), 16,
+                dtype='complex128')
+
+        self.internal_array = n_byte_align_empty((256, 256), 16, 
+                dtype='complex128')
+
+        self.fft = utils._FFTWWrapper(self.internal_array, 
+                self.output_array,
+                input_array_slicer=self.input_array_slicer,
+                FFTW_array_slicer=self.FFTW_array_slicer)
+
+        self.input_array[:] = (numpy.random.randn(*self.input_array.shape) 
+                + 1j*numpy.random.randn(*self.input_array.shape))
+
+        self.internal_array[:] = 0
+        self.internal_array[self.FFTW_array_slicer] = (
+                self.input_array[self.input_array_slicer])
+
+    def update_arrays(self, input_array, output_array):
+        '''Does what the internal update arrays does for an FFTW
+        object but with a reslicing.
+        '''
+        internal_input_array = self.fft.get_input_array()
+        internal_output_array = self.fft.get_output_array()
+
+        internal_input_array[self.FFTW_array_slicer] = (
+                input_array[self.input_array_slicer])
+
+        self.fft(output_array=output_array)
+
+    def test_call(self):
+        '''Test a call to an instance of the class.
+        '''
+
+        self.input_array[:] = (numpy.random.randn(*self.input_array.shape) 
+                + 1j*numpy.random.randn(*self.input_array.shape))
+
+        output_array = self.fft()
+
+        self.assertTrue(numpy.alltrue(output_array == self.output_array))
+
+    
+    def test_call_with_positional_input_update(self):
+        '''Test the class call with a positional input update.
+        '''
+
+        input_array = n_byte_align(
+                (numpy.random.randn(*self.input_array.shape) 
+                    + 1j*numpy.random.randn(*self.input_array.shape)), 16)
+
+        output_array = self.fft(n_byte_align(input_array.copy(), 16)).copy()
+
+        self.update_arrays(input_array, self.output_array)
+        self.fft.execute()
+
+        self.assertTrue(numpy.alltrue(output_array == self.output_array))
+
+        
+    def test_call_with_keyword_input_update(self):
+        '''Test the class call with a keyword input update.
+        '''
+        input_array = n_byte_align(
+                numpy.random.randn(*self.input_array.shape) 
+                    + 1j*numpy.random.randn(*self.input_array.shape), 16)
+
+        output_array = self.fft(
+            input_array=n_byte_align(input_array.copy(), 16)).copy()
+
+        self.update_arrays(input_array, self.output_array)
+        self.fft.execute()
+
+        self.assertTrue(numpy.alltrue(output_array == self.output_array))
+    
+        
+    def test_call_with_keyword_output_update(self):
+        '''Test the class call with a keyword output update.
+        '''
+        output_array = n_byte_align(
+            (numpy.random.randn(*self.output_array.shape) 
+                + 1j*numpy.random.randn(*self.output_array.shape)), 16)
+
+        returned_output_array = self.fft(
+                output_array=n_byte_align(output_array.copy(), 16)).copy()
+
+        
+        self.update_arrays(self.input_array, output_array)
+        self.fft.execute()
+
+        self.assertTrue(
+                numpy.alltrue(returned_output_array == output_array))
+
+    def test_call_with_positional_updates(self):
+        '''Test the class call with a positional array updates.
+        '''
+        
+        input_array = n_byte_align((numpy.random.randn(*self.input_array.shape) 
+            + 1j*numpy.random.randn(*self.input_array.shape)), 16)
+
+        output_array = n_byte_align((numpy.random.randn(*self.output_array.shape) 
+            + 1j*numpy.random.randn(*self.output_array.shape)), 16)
+
+        returned_output_array = self.fft(
+            n_byte_align(input_array.copy(), 16),
+            n_byte_align(output_array.copy(), 16)).copy()
+
+        self.update_arrays(input_array, output_array)
+        self.fft.execute()
+
+        self.assertTrue(numpy.alltrue(returned_output_array == output_array))
+
+    def test_call_with_keyword_updates(self):
+        '''Test the class call with a positional output update.
+        '''
+        
+        input_array = n_byte_align(
+                (numpy.random.randn(*self.input_array.shape) 
+                    + 1j*numpy.random.randn(*self.input_array.shape)), 16)
+
+        output_array = n_byte_align(
+                (numpy.random.randn(*self.output_array.shape)
+                    + 1j*numpy.random.randn(*self.output_array.shape)), 16)
+
+        returned_output_array = self.fft(
+                output_array=n_byte_align(output_array.copy(), 16),
+                input_array=n_byte_align(input_array.copy(), 16)).copy()
+
+        self.update_arrays(input_array, output_array)
+        self.fft.execute()
+
+        self.assertTrue(numpy.alltrue(returned_output_array == output_array))
+    
+    def test_call_with_different_input_dtype(self):
+        '''Test the class call with an array with a different input dtype
+        '''
+        input_array = n_byte_align(numpy.complex64(
+                numpy.random.randn(*self.input_array.shape) 
+                + 1j*numpy.random.randn(*self.input_array.shape)), 16)
+
+        output_array = self.fft(n_byte_align(input_array.copy(), 16)).copy()
+
+        _input_array = numpy.asarray(input_array,
+                dtype=self.input_array.dtype)
+
+        self.update_arrays(_input_array, self.output_array)
+        self.fft.execute()
+
+        self.assertTrue(numpy.alltrue(output_array == self.output_array))
+    
+    def test_call_with_list_input(self):
+        '''Test the class call with a list rather than an array
+        '''
+
+        output_array = self.fft().copy()
+
+        test_output_array = self.fft(self.input_array.tolist()).copy()
+
+        self.assertTrue(numpy.alltrue(output_array == test_output_array))
+
+
+    def test_call_with_invalid_update(self):
+        '''Test the class call with an invalid update.
+        '''
+
+        new_shape = self.input_array.shape + (2, )
+        invalid_array = (numpy.random.randn(*new_shape) 
+                + 1j*numpy.random.randn(*new_shape))
+        
+        self.assertRaises(ValueError, self.fft, 
+                *(),
+                **{'output_array':invalid_array})
+
+        self.assertRaises(ValueError, self.fft, 
+                *(),
+                **{'input_array':invalid_array})
+
+    
+    def test_call_with_invalid_output_striding(self):
+        '''Test the class call with an invalid strided output update.
+        '''
+        # Add an extra dimension to bugger up the striding
+        new_shape = self.output_array.shape + (2,)
+        output_array = n_byte_align(numpy.random.randn(*new_shape) 
+                + 1j*numpy.random.randn(*new_shape), 16)
+
+        self.assertRaisesRegex(ValueError, 'Invalid output striding',
+                self.fft, **{'output_array': output_array[:,:,1]})
+
+    def test_call_with_different_striding(self):
+        '''Test the input update with different strides to internal array.
+        '''
+        input_array_shape = self.input_array.shape + (2,)
+        internal_array_shape = self.internal_array.shape
+
+        internal_array = n_byte_align(
+                numpy.random.randn(*internal_array_shape) 
+                + 1j*numpy.random.randn(*internal_array_shape), 16)
+
+        fft =  utils._FFTWWrapper(internal_array, self.output_array,
+                input_array_slicer=self.input_array_slicer,
+                FFTW_array_slicer=self.FFTW_array_slicer)
+        
+        test_output_array = fft().copy()
+
+        new_input_array = n_byte_align_empty(input_array_shape, 16,
+                dtype=internal_array.dtype)
+        new_input_array[:] = 0
+
+        new_input_array[:,:,0][self.input_array_slicer] = (
+                internal_array[self.FFTW_array_slicer])
+
+        new_output = fft(new_input_array[:,:,0]).copy()
+
+        # Test the test!
+        self.assertTrue(
+                new_input_array[:,:,0].strides != internal_array.strides)
+
+        self.assertTrue(numpy.alltrue(test_output_array == new_output))
+
+    def test_call_with_copy_with_missized_array_error(self):
+        '''Force an input copy with a missized array.
+        '''
+        shape = list(self.input_array.shape + (2,))
+        shape[0] += 1
+
+        input_array = n_byte_align(numpy.random.randn(*shape) 
+                + 1j*numpy.random.randn(*shape), 16)
+
+        self.assertRaisesRegex(ValueError, 'Invalid input shape',
+                self.fft, **{'input_array': input_array[:,:,0]})
+
+    def test_call_with_normalisation_on(self):
+        _input_array = n_byte_align_empty(self.internal_array.shape, 16,
+                dtype='complex128')
+        
+        ifft = utils._FFTWWrapper(self.output_array, _input_array, 
+                direction='FFTW_BACKWARD',
+                input_array_slicer=slice(None),
+                FFTW_array_slicer=slice(None))
+
+        self.fft(normalise_idft=True) # Shouldn't make any difference
+        ifft(normalise_idft=True)
+
+        self.assertTrue(numpy.allclose(
+            self.input_array[self.input_array_slicer], 
+            _input_array[self.FFTW_array_slicer]))
+
+    def test_call_with_normalisation_off(self):
+        
+        _input_array = n_byte_align_empty(self.internal_array.shape, 16,
+                dtype='complex128')
+
+        ifft = utils._FFTWWrapper(self.output_array, _input_array, 
+                direction='FFTW_BACKWARD',
+                input_array_slicer=slice(None),
+                FFTW_array_slicer=slice(None))
+
+        self.fft(normalise_idft=True) # Shouldn't make any difference
+        ifft(normalise_idft=False)
+
+        _input_array /= ifft.N
+
+        self.assertTrue(numpy.allclose(
+            self.input_array[self.input_array_slicer], 
+            _input_array[self.FFTW_array_slicer]))
+
+    def test_call_with_normalisation_default(self):
+        _input_array = n_byte_align_empty(self.internal_array.shape, 16,
+                dtype='complex128')
+
+        ifft = utils._FFTWWrapper(self.output_array, _input_array, 
+                direction='FFTW_BACKWARD',
+                input_array_slicer=slice(None),
+                FFTW_array_slicer=slice(None))
+
+        self.fft()
+        ifft()
+
+        # Scaling is performed by default
+        self.assertTrue(numpy.allclose(
+            self.input_array[self.input_array_slicer], 
+            _input_array[self.FFTW_array_slicer]))
+
+
+class BuildersTestUtilities(unittest.TestCase):
+
+    def __init__(self, *args, **kwargs):
+
+        super(BuildersTestUtilities, self).__init__(*args, **kwargs)
+
+        if not hasattr(self, 'assertRaisesRegex'):
+            self.assertRaisesRegex = self.assertRaisesRegexp
+
+    def test_setup_input_slicers(self):
+        inputs = (
+                ((4, 5), (4, 5)),
+                ((4, 4), (3, 5)),
+                ((4, 5), (3, 5)),
+                )
+
+        outputs = (
+                ([slice(0, 4), slice(0, 5)], [slice(None), slice(None)]),
+                ([slice(0, 3), slice(0, 4)], [slice(None), slice(0, 4)]),
+                ([slice(0, 3), slice(0, 5)], [slice(None), slice(None)]),
+                )
+
+        for _input, _output in zip(inputs, outputs):
+            self.assertEqual(
+                    utils._setup_input_slicers(*_input),
+                    _output)
+
+
+
+    def test_compute_array_shapes(self):
+        # inputs are:
+        # (a.shape, s, axes, inverse, real)
+        inputs = (
+                ((4, 5), (4, 5), (-2, -1), False, False),
+                ((4, 5), (4, 5), (-1, -2), False, False),
+                ((4, 5), (4, 5), (-1, -2), True, False),
+                ((4, 5), (4, 5), (-1, -2), True, True),
+                ((4, 5), (4, 5), (-2, -1), True, True),
+                ((4, 5), (4, 5), (-2, -1), False, True),
+                ((4, 5), (4, 5), (-1, -2), False, True),
+                ((4, 5, 6), (4, 5), (-2, -1), False, False),
+                ((4, 5, 6), (5, 6), (-2, -1), False, False),
+                ((4, 5, 6), (3, 5), (-3, -1), False, False),
+                ((4, 5, 6), (4, 5), (-2, -1), True, False),
+                ((4, 5, 6), (3, 5), (-3, -1), True, False),
+                ((4, 5, 6), (4, 5), (-2, -1), True, True),
+                ((4, 5, 6), (3, 5), (-3, -1), True, True),
+                ((4, 5, 6), (4, 5), (-2, -1), False, True),
+                ((4, 5, 6), (3, 5), (-3, -1), False, True),
+                )
+
+        outputs = (
+                ((4, 5), (4, 5)),
+                ((5, 4), (5, 4)),
+                ((5, 4), (5, 4)),
+                ((3, 4), (5, 4)),
+                ((4, 3), (4, 5)),
+                ((4, 5), (4, 3)),
+                ((5, 4), (3, 4)),
+                ((4, 4, 5), (4, 4, 5)),
+                ((4, 5, 6), (4, 5, 6)),
+                ((3, 5, 5), (3, 5, 5)),
+                ((4, 4, 5), (4, 4, 5)),
+                ((3, 5, 5), (3, 5, 5)),
+                ((4, 4, 3), (4, 4, 5)),
+                ((3, 5, 3), (3, 5, 5)),
+                ((4, 4, 5), (4, 4, 3)),
+                ((3, 5, 5), (3, 5, 3)),
+                )
+
+        for _input, output in zip(inputs, outputs):
+            shape, s, axes, inverse, real = _input
+            a = numpy.empty(shape)
+
+            self.assertEqual(
+                    utils._compute_array_shapes(a, s, axes, inverse, real),
+                    output)
+
+    def test_compute_array_shapes_invalid_axes(self):
+
+        a = numpy.zeros((3, 4))
+        s = (3, 4)
+        test_axes = ((1, 2, 3),)
+
+        for each_axes in test_axes:
+
+            args = (a, s, each_axes, False, False)
+            self.assertRaisesRegex(IndexError, 'Invalid axes', 
+                    utils._compute_array_shapes, *args)
+
+    def _call_cook_nd_args(self, arg_tuple):
+        a = numpy.zeros(arg_tuple[0])
+        args = ('s', 'axes', 'invreal')
+        arg_dict = {'a': a}
+        for arg_name, arg in zip(args, arg_tuple[1:]):
+            if arg is not None:
+                arg_dict[arg_name] = arg
+
+        return utils._cook_nd_args(**arg_dict)
+
+    def test_cook_nd_args_normal(self):
+        # inputs are (a.shape, s, axes, invreal)
+        # None corresponds to no argument
+        inputs = (
+                ((2, 3), None, (-1,), False),
+                ((2, 3), (5, 6), (-2, -1), False),
+                ((2, 3), (5, 6), (-1, -2), False),
+                ((2, 3), None, (-1, -2), False),
+                ((2, 3, 5), (5, 6), (-1, -2), False),
+                ((2, 3, 5), (5, 6), None, False),
+                ((2, 3, 5), None, (-1, -2), False),
+                ((2, 3, 5), None, (-1, -3), False))
+
+        outputs = (
+                ((3,), (-1,)),
+                ((5, 6), (-2, -1)),
+                ((5, 6), (-1, -2)),
+                ((3, 2), (-1, -2)),
+                ((5, 6), (-1, -2)),
+                ((5, 6), (-2, -1)),
+                ((5, 3), (-1, -2)),
+                ((5, 2), (-1, -3))
+                )
+
+        for each_input, each_output in zip(inputs, outputs):
+            self.assertEqual(self._call_cook_nd_args(each_input),
+                    each_output)
+    
+    def test_cook_nd_args_invreal(self):
+
+        # inputs are (a.shape, s, axes, invreal)
+        # None corresponds to no argument
+        inputs = (
+                ((2, 3), None, (-1,), True),
+                ((2, 3), (5, 6), (-2, -1), True),
+                ((2, 3), (5, 6), (-1, -2), True),
+                ((2, 3), None, (-1, -2), True),
+                ((2, 3, 5), (5, 6), (-1, -2), True),
+                ((2, 3, 5), (5, 6), None, True),
+                ((2, 3, 5), None, (-1, -2), True),
+                ((2, 3, 5), None, (-1, -3), True))
+
+        outputs = (
+                ((4,), (-1,)),
+                ((5, 6), (-2, -1)),
+                ((5, 6), (-1, -2)),
+                ((3, 2), (-1, -2)),
+                ((5, 6), (-1, -2)),
+                ((5, 6), (-2, -1)),
+                ((5, 4), (-1, -2)),
+                ((5, 2), (-1, -3))
+                )
+
+        for each_input, each_output in zip(inputs, outputs):
+            self.assertEqual(self._call_cook_nd_args(each_input),
+                    each_output)
+
+
+    def test_cook_nd_args_invalid_inputs(self):
+        # inputs are (a.shape, s, axes, invreal)
+        # None corresponds to no argument
+        inputs = (
+                ((2, 3), (1,), (-1, -2), None),
+                ((2, 3), (2, 3, 4), (-3, -2, -1), None),
+                )
+
+        # all the inputs should yield an error
+        for each_input in inputs:
+            self.assertRaisesRegex(ValueError, 'Shape error', 
+                    self._call_cook_nd_args, *(each_input,))
+
+test_cases = (
+        BuildersTestFFTWWrapper,
+        BuildersTestUtilities,
+        BuildersTestFFT,
+        BuildersTestIFFT,
+        BuildersTestRFFT,
+        BuildersTestIRFFT,
+        BuildersTestFFT2,
+        BuildersTestIFFT2,
+        BuildersTestRFFT2,
+        BuildersTestIRFFT2,
+        BuildersTestFFTN,
+        BuildersTestIFFTN,
+        BuildersTestRFFTN,
+        BuildersTestIRFFTN)
+
+#test_set = {'BuildersTestRFFTN': ['test_dtype_coercian']}
+test_set = None
+
+
+if __name__ == '__main__':
+
+    run_test_suites(test_cases, test_set)
diff --git a/test/test_pyfftw_call.py b/test/test_pyfftw_call.py
new file mode 100644
index 0000000..7abd021
--- /dev/null
+++ b/test/test_pyfftw_call.py
@@ -0,0 +1,389 @@
+# Copyright 2012 Knowledge Economy Developments Ltd
+# 
+# Henry Gomersall
+# heng at kedevelopments.co.uk
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+from pyfftw import (
+        FFTW, n_byte_align_empty, n_byte_align)
+
+from .test_pyfftw_base import run_test_suites
+import numpy
+import unittest
+
+class FFTWCallTest(unittest.TestCase):
+
+    def __init__(self, *args, **kwargs):
+
+        super(FFTWCallTest, self).__init__(*args, **kwargs)
+
+        if not hasattr(self, 'assertRaisesRegex'):
+            self.assertRaisesRegex = self.assertRaisesRegexp
+   
+    def setUp(self):
+
+        self.input_array = n_byte_align_empty((256, 512), 16, 
+                dtype='complex128')
+        self.output_array = n_byte_align_empty((256, 512), 16,
+                dtype='complex128')
+
+        self.fft = FFTW(self.input_array, self.output_array)
+
+        self.input_array[:] = (numpy.random.randn(*self.input_array.shape) 
+                + 1j*numpy.random.randn(*self.input_array.shape))
+
+    
+    def test_call(self):
+        '''Test a call to an instance of the class.
+        '''
+
+        self.input_array[:] = (numpy.random.randn(*self.input_array.shape) 
+                + 1j*numpy.random.randn(*self.input_array.shape))
+
+        output_array = self.fft()
+
+        self.assertTrue(numpy.alltrue(output_array == self.output_array))
+
+    
+    def test_call_with_positional_input_update(self):
+        '''Test the class call with a positional input update.
+        '''
+
+        input_array = n_byte_align(
+                (numpy.random.randn(*self.input_array.shape) 
+                    + 1j*numpy.random.randn(*self.input_array.shape)), 16)
+
+        output_array = self.fft(n_byte_align(input_array.copy(), 16)).copy()
+
+        self.fft.update_arrays(input_array, self.output_array)
+        self.fft.execute()
+
+        self.assertTrue(numpy.alltrue(output_array == self.output_array))
+        
+    def test_call_with_keyword_input_update(self):
+        '''Test the class call with a keyword input update.
+        '''
+        input_array = n_byte_align(
+                numpy.random.randn(*self.input_array.shape) 
+                    + 1j*numpy.random.randn(*self.input_array.shape), 16)
+
+        output_array = self.fft(
+            input_array=n_byte_align(input_array.copy(), 16)).copy()
+
+        self.fft.update_arrays(input_array, self.output_array)
+        self.fft.execute()
+
+        self.assertTrue(numpy.alltrue(output_array == self.output_array))
+    
+        
+    def test_call_with_keyword_output_update(self):
+        '''Test the class call with a keyword output update.
+        '''
+        output_array = n_byte_align(
+            (numpy.random.randn(*self.output_array.shape) 
+                + 1j*numpy.random.randn(*self.output_array.shape)), 16)
+
+        returned_output_array = self.fft(
+                output_array=n_byte_align(output_array.copy(), 16)).copy()
+
+        self.fft.update_arrays(self.input_array, output_array)
+        self.fft.execute()
+
+        self.assertTrue(
+                numpy.alltrue(returned_output_array == output_array))
+
+    def test_call_with_positional_updates(self):
+        '''Test the class call with a positional array updates.
+        '''
+        
+        input_array = n_byte_align((numpy.random.randn(*self.input_array.shape) 
+            + 1j*numpy.random.randn(*self.input_array.shape)), 16)
+
+        output_array = n_byte_align((numpy.random.randn(*self.output_array.shape) 
+            + 1j*numpy.random.randn(*self.output_array.shape)), 16)
+
+        returned_output_array = self.fft(
+            n_byte_align(input_array.copy(), 16),
+            n_byte_align(output_array.copy(), 16)).copy()
+
+        self.fft.update_arrays(input_array, output_array)
+        self.fft.execute()
+
+        self.assertTrue(numpy.alltrue(returned_output_array == output_array))
+
+    def test_call_with_keyword_updates(self):
+        '''Test the class call with a positional output update.
+        '''
+        
+        input_array = n_byte_align(
+                (numpy.random.randn(*self.input_array.shape) 
+                    + 1j*numpy.random.randn(*self.input_array.shape)), 16)
+
+        output_array = n_byte_align(
+                (numpy.random.randn(*self.output_array.shape)
+                    + 1j*numpy.random.randn(*self.output_array.shape)), 16)
+
+        returned_output_array = self.fft(
+                output_array=n_byte_align(output_array.copy(), 16),
+                input_array=n_byte_align(input_array.copy(), 16)).copy()
+
+        self.fft.update_arrays(input_array, output_array)
+        self.fft.execute()
+
+        self.assertTrue(numpy.alltrue(returned_output_array == output_array))
+    
+    def test_call_with_different_input_dtype(self):
+        '''Test the class call with an array with a different input dtype
+        '''
+        input_array = n_byte_align(numpy.complex64(
+                numpy.random.randn(*self.input_array.shape) 
+                + 1j*numpy.random.randn(*self.input_array.shape)), 16)
+
+        output_array = self.fft(n_byte_align(input_array.copy(), 16)).copy()
+
+        _input_array = n_byte_align(numpy.asarray(input_array,
+                dtype=self.input_array.dtype), 16)
+
+        self.assertTrue(_input_array.dtype != input_array.dtype)
+
+        self.fft.update_arrays(_input_array, self.output_array)
+        self.fft.execute()
+
+        self.assertTrue(numpy.alltrue(output_array == self.output_array))
+    
+    def test_call_with_list_input(self):
+        '''Test the class call with a list rather than an array
+        '''
+
+        output_array = self.fft().copy()
+
+        test_output_array = self.fft(self.input_array.tolist()).copy()
+
+        self.assertTrue(numpy.alltrue(output_array == test_output_array))
+
+
+    def test_call_with_invalid_update(self):
+        '''Test the class call with an invalid update.
+        '''
+
+        new_shape = self.input_array.shape + (2, )
+        invalid_array = (numpy.random.randn(*new_shape) 
+                + 1j*numpy.random.randn(*new_shape))
+        
+        self.assertRaises(ValueError, self.fft, 
+                *(),
+                **{'output_array':invalid_array})
+
+        self.assertRaises(ValueError, self.fft, 
+                *(),
+                **{'input_array':invalid_array})
+
+    def test_call_with_auto_input_alignment(self):
+        '''Test the class call with a keyword input update.
+        '''
+        input_array = (numpy.random.randn(*self.input_array.shape) 
+                + 1j*numpy.random.randn(*self.input_array.shape))
+
+        output_array = self.fft(
+                input_array=n_byte_align(input_array.copy(), 16)).copy()
+
+        # Offset by one from 16 byte aligned to guarantee it's not
+        # 16 byte aligned
+        a = input_array
+        a__ = n_byte_align_empty(
+                numpy.prod(a.shape)*a.itemsize+1, 16, dtype='int8')
+        
+        a_ = a__[1:].view(dtype=a.dtype).reshape(*a.shape)
+        a_[:] = a
+
+        # Just confirm that a usual update will fail
+        self.assertRaisesRegex(ValueError, 'Invalid input alignment', 
+                self.fft.update_arrays, *(a_, self.output_array))
+        
+        self.fft(a_, self.output_array)
+        
+        self.assertTrue(numpy.alltrue(output_array == self.output_array))
+
+        # now try with a single byte offset and SIMD off
+        ar, ai = numpy.float32(numpy.random.randn(2, 257))
+        a = ar[1:] + 1j*ai[1:]
+
+        b = a.copy()
+
+        a_size = len(a.ravel())*a.itemsize
+
+        update_array = numpy.frombuffer(
+                numpy.zeros(a_size + 1, dtype='int8')[1:].data, 
+                dtype=a.dtype).reshape(a.shape)
+
+        fft = FFTW(a, b, flags=('FFTW_UNALIGNED',))
+        # Confirm that a usual update will fail (it's not on the
+        # byte boundary)
+        self.assertRaisesRegex(ValueError, 'Invalid input alignment', 
+                fft.update_arrays, *(update_array, b))
+
+        fft(update_array, b)
+
+    def test_call_with_invalid_output_striding(self):
+        '''Test the class call with an invalid strided output update.
+        '''
+        # Add an extra dimension to bugger up the striding
+        new_shape = self.output_array.shape + (2,)
+        output_array = n_byte_align(numpy.random.randn(*new_shape) 
+                + 1j*numpy.random.randn(*new_shape), 16)
+
+        self.assertRaisesRegex(ValueError, 'Invalid output striding',
+                self.fft, **{'output_array': output_array[:,:,1]})
+
+    def test_call_with_different_striding(self):
+        '''Test the input update with different strides to internal array.
+        '''
+        shape = self.input_array.shape + (2,)
+
+        input_array = n_byte_align(numpy.random.randn(*shape) 
+                + 1j*numpy.random.randn(*shape), 16)
+
+        fft = FFTW(input_array[:,:,0], self.output_array)
+        
+        test_output_array = fft().copy()
+
+        new_input_array = n_byte_align(
+                input_array[:, :, 0].copy(), 16)
+
+        new_output = fft(new_input_array).copy()
+
+        # Test the test!
+        self.assertTrue(new_input_array.strides != input_array[:,:,0].strides)
+
+        self.assertTrue(numpy.alltrue(test_output_array == new_output))
+
+    def test_call_with_copy_with_missized_array_error(self):
+        '''Force an input copy with a missized array.
+        '''
+        shape = list(self.input_array.shape + (2,))
+        shape[0] += 1
+
+        input_array = n_byte_align(numpy.random.randn(*shape) 
+                + 1j*numpy.random.randn(*shape), 16)
+
+        fft = FFTW(self.input_array, self.output_array)
+        
+        self.assertRaisesRegex(ValueError, 'Invalid input shape',
+                self.fft, **{'input_array': input_array[:,:,0]})
+
+    def test_call_with_unaligned(self):
+        '''Make sure the right thing happens with unaligned data.
+        '''
+        input_array = (numpy.random.randn(*self.input_array.shape) 
+                + 1j*numpy.random.randn(*self.input_array.shape))
+
+        output_array = self.fft(
+                input_array=n_byte_align(input_array.copy(), 16)).copy()
+
+        input_array = n_byte_align(input_array, 16)
+        output_array = n_byte_align(output_array, 16)
+
+        # Offset by one from 16 byte aligned to guarantee it's not
+        # 16 byte aligned
+        a = n_byte_align(input_array.copy(), 16)
+        a__ = n_byte_align_empty(
+                numpy.prod(a.shape)*a.itemsize+1, 16, dtype='int8')
+        
+        a_ = a__[1:].view(dtype=a.dtype).reshape(*a.shape)
+        a_[:] = a
+
+        # Create a different second array the same way
+        b = n_byte_align(output_array.copy(), 16)
+        b__ = n_byte_align_empty(
+                numpy.prod(b.shape)*a.itemsize+1, 16, dtype='int8')
+        
+        b_ = b__[1:].view(dtype=b.dtype).reshape(*b.shape)
+        b_[:] = a
+
+        # Set up for the first array
+        fft = FFTW(input_array, output_array)
+        a_[:] = a
+        output_array = fft().copy()
+
+        # Check a_ is not aligned...
+        self.assertRaisesRegex(ValueError, 'Invalid input alignment', 
+                self.fft.update_arrays, *(a_, output_array))
+
+        # and b_ too
+        self.assertRaisesRegex(ValueError, 'Invalid output alignment', 
+                self.fft.update_arrays, *(input_array, b_))
+        
+        # But it should still work with the a_
+        fft(a_)
+
+        # However, trying to update the output will raise an error
+        self.assertRaisesRegex(ValueError, 'Invalid output alignment', 
+                self.fft.update_arrays, *(input_array, b_))
+
+        # Same with SIMD off
+        fft = FFTW(input_array, output_array, flags=('FFTW_UNALIGNED',))
+        fft(a_)
+        self.assertRaisesRegex(ValueError, 'Invalid output alignment', 
+                self.fft.update_arrays, *(input_array, b_))
+
+    def test_call_with_normalisation_on(self):
+        _input_array = n_byte_align_empty((256, 512), 16,
+                dtype='complex128')
+
+        ifft = FFTW(self.output_array, _input_array, 
+                direction='FFTW_BACKWARD')
+
+        self.fft(normalise_idft=True) # Shouldn't make any difference
+        ifft(normalise_idft=True)
+
+        self.assertTrue(numpy.allclose(self.input_array, _input_array))
+
+    def test_call_with_normalisation_off(self):
+        _input_array = n_byte_align_empty((256, 512), 16,
+                dtype='complex128')
+
+        ifft = FFTW(self.output_array, _input_array, 
+                direction='FFTW_BACKWARD')
+
+        self.fft(normalise_idft=True) # Shouldn't make any difference
+        ifft(normalise_idft=False)
+
+        _input_array /= ifft.N
+
+        self.assertTrue(numpy.allclose(self.input_array, _input_array))
+
+    def test_call_with_normalisation_default(self):
+        _input_array = n_byte_align_empty((256, 512), 16,
+                dtype='complex128')
+
+        ifft = FFTW(self.output_array, _input_array, 
+                direction='FFTW_BACKWARD')
+
+        self.fft()
+        ifft()
+
+        # Scaling is performed by default
+        self.assertTrue(numpy.allclose(self.input_array, _input_array))
+
+        
+test_cases = (
+        FFTWCallTest,)
+
+test_set = None
+
+if __name__ == '__main__':
+
+    run_test_suites(test_cases, test_set)
+
diff --git a/test/test_pyfftw_class_misc.py b/test/test_pyfftw_class_misc.py
new file mode 100644
index 0000000..535d0d8
--- /dev/null
+++ b/test/test_pyfftw_class_misc.py
@@ -0,0 +1,210 @@
+# heng at kedevelopments.co.uk
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+from pyfftw import (
+        FFTW, n_byte_align_empty, is_n_byte_aligned, simd_alignment)
+import pyfftw
+
+from .test_pyfftw_base import run_test_suites
+
+import unittest
+import numpy
+
+# FFTW tests that don't seem to fit anywhere else
+
+class FFTWMiscTest(unittest.TestCase):
+    
+    def __init__(self, *args, **kwargs):
+
+        super(FFTWMiscTest, self).__init__(*args, **kwargs)
+
+        # Assume python 3, but keep backwards compatibility
+        if not hasattr(self, 'assertRaisesRegex'):
+            self.assertRaisesRegex = self.assertRaisesRegexp
+
+
+    def setUp(self):
+
+        self.input_array = n_byte_align_empty((256, 512), 16, 
+                dtype='complex128')
+        self.output_array = n_byte_align_empty((256, 512), 16,
+                dtype='complex128')
+
+        self.fft = FFTW(self.input_array, self.output_array)
+
+        self.output_array[:] = (numpy.random.randn(*self.output_array.shape) 
+                + 1j*numpy.random.randn(*self.output_array.shape))
+
+    def test_aligned_flag(self):
+        '''Test to see if the aligned flag is correct
+        '''
+        fft = FFTW(self.input_array, self.output_array)
+        self.assertTrue(fft.simd_aligned)
+
+        fft = FFTW(self.input_array, self.output_array, 
+                flags=('FFTW_UNALIGNED',))
+
+        self.assertFalse(fft.simd_aligned)
+
+    def test_flags(self):
+        '''Test to see if the flags are correct
+        '''
+        fft = FFTW(self.input_array, self.output_array)
+        self.assertEqual(fft.flags, ('FFTW_MEASURE',))
+
+        fft = FFTW(self.input_array, self.output_array, 
+                flags=('FFTW_DESTROY_INPUT', 'FFTW_UNALIGNED'))
+        self.assertEqual(fft.flags, ('FFTW_DESTROY_INPUT', 'FFTW_UNALIGNED'))
+
+        # Test an implicit flag
+        _input_array = n_byte_align_empty(256, 16, dtype='complex64')
+        _output_array = n_byte_align_empty(256, 16, dtype='complex64')
+
+        # These are guaranteed to be misaligned (due to dtype size == 8)
+        input_array = _input_array[:-1]
+        output_array = _output_array[:-1]
+        u_input_array = _input_array[1:]
+        u_output_array = _output_array[1:]
+
+        fft = FFTW(input_array, u_output_array)
+        self.assertEqual(fft.flags, ('FFTW_MEASURE', 'FFTW_UNALIGNED'))
+
+        fft = FFTW(u_input_array, output_array)
+        self.assertEqual(fft.flags, ('FFTW_MEASURE', 'FFTW_UNALIGNED'))
+
+        fft = FFTW(u_input_array, u_output_array)
+        self.assertEqual(fft.flags, ('FFTW_MEASURE', 'FFTW_UNALIGNED'))
+
+    def test_differing_aligned_arrays_update(self):
+        '''Test to see if the alignment code is working as expected
+        '''
+
+        # Start by creating arrays that are only on various byte 
+        # alignments (4, 16 and 32)
+        _input_array = n_byte_align_empty(
+                len(self.input_array.ravel())*2+5,
+                32, dtype='float32')
+        _output_array = n_byte_align_empty(
+                len(self.output_array.ravel())*2+5,
+                32, dtype='float32')
+
+        _input_array[:] = 0
+        _output_array[:] = 0
+
+        input_array_4 = (
+                numpy.frombuffer(_input_array[1:-4].data, dtype='complex64')
+                .reshape(self.input_array.shape))
+        output_array_4 = (
+                numpy.frombuffer(_output_array[1:-4].data, dtype='complex64')
+                .reshape(self.output_array.shape))
+
+        input_array_16 = (
+                numpy.frombuffer(_input_array[4:-1].data, dtype='complex64')
+                .reshape(self.input_array.shape))
+        output_array_16 = (
+                numpy.frombuffer(_output_array[4:-1].data, dtype='complex64')
+                .reshape(self.output_array.shape))
+
+        input_array_32 = (
+                numpy.frombuffer(_input_array[:-5].data, dtype='complex64')
+                .reshape(self.input_array.shape))
+        output_array_32 = (
+                numpy.frombuffer(_output_array[:-5].data, dtype='complex64')
+                .reshape(self.output_array.shape))
+
+        input_arrays = {4: input_array_4,
+                16: input_array_16,
+                32: input_array_32}
+
+        output_arrays = {4: output_array_4,
+                16: output_array_16,
+                32: output_array_32}
+
+        alignments = (4, 16, 32)
+
+        # Test the arrays are aligned on 4 bytes...
+        self.assertTrue(is_n_byte_aligned(input_arrays[4], 4))
+        self.assertTrue(is_n_byte_aligned(output_arrays[4], 4))
+
+        # ...and on 16...
+        self.assertFalse(is_n_byte_aligned(input_arrays[4], 16))
+        self.assertFalse(is_n_byte_aligned(output_arrays[4], 16))
+        self.assertTrue(is_n_byte_aligned(input_arrays[16], 16))
+        self.assertTrue(is_n_byte_aligned(output_arrays[16], 16))
+
+        # ...and on 32...
+        self.assertFalse(is_n_byte_aligned(input_arrays[16], 32))
+        self.assertFalse(is_n_byte_aligned(output_arrays[16], 32))
+        self.assertTrue(is_n_byte_aligned(input_arrays[32], 32))
+        self.assertTrue(is_n_byte_aligned(output_arrays[32], 32))
+
+        if len(pyfftw.pyfftw._valid_simd_alignments) > 0:
+            max_align = pyfftw.pyfftw._valid_simd_alignments[0]
+        else:
+            max_align = simd_alignment
+
+        for in_align in alignments:
+            for out_align in alignments:
+                expected_align = min(in_align, out_align, max_align)
+                fft = FFTW(input_arrays[in_align], output_arrays[out_align])
+
+                self.assertTrue(fft.input_alignment == expected_align)
+                self.assertTrue(fft.output_alignment == expected_align)
+
+                for update_align in alignments:
+
+                    if update_align < expected_align:
+                        # This should fail (not aligned properly)
+                        self.assertRaisesRegex(ValueError,
+                                'Invalid input alignment',
+                                fft.update_arrays,
+                                input_arrays[update_align],
+                                output_arrays[out_align])
+
+                        self.assertRaisesRegex(ValueError,
+                                'Invalid output alignment',
+                                fft.update_arrays,
+                                input_arrays[in_align],
+                                output_arrays[update_align])
+
+                    else:
+                        # This should work (and not segfault!)
+                        fft.update_arrays(input_arrays[update_align], 
+                                output_arrays[out_align])
+                        fft.update_arrays(input_arrays[in_align], 
+                                output_arrays[update_align])
+                        fft.execute()
+
+
+    def test_get_input_array(self):
+        '''Test to see the get_input_array method returns the correct thing
+        '''
+
+        self.assertIs(self.input_array, self.fft.get_input_array())
+
+    def test_get_output_array(self):
+        '''Test to see the get_output_array method returns the correct thing
+        '''
+
+        self.assertIs(self.output_array, self.fft.get_output_array())
+
+test_cases = (
+        FFTWMiscTest,)
+
+test_set = None
+
+if __name__ == '__main__':
+
+    run_test_suites(test_cases, test_set)
diff --git a/test/test_pyfftw_complex.py b/test/test_pyfftw_complex.py
new file mode 100644
index 0000000..258ddec
--- /dev/null
+++ b/test/test_pyfftw_complex.py
@@ -0,0 +1,731 @@
+# Copyright 2012 Knowledge Economy Developments Ltd
+# 
+# Henry Gomersall
+# heng at kedevelopments.co.uk
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+from pyfftw import FFTW, n_byte_align, n_byte_align_empty, forget_wisdom
+import pyfftw
+import numpy
+from timeit import Timer
+import time
+
+import unittest
+
+from .test_pyfftw_base import FFTWBaseTest, run_test_suites
+
+# We make this 1D case not inherit from FFTWBaseTest.
+# It needs to be combined with FFTWBaseTest to work.
+# This allows us to separate out tests that are use
+# in multiple locations.
+class Complex64FFTW1DTest(object):
+
+    def test_time(self):
+        
+        in_shape = self.input_shapes['2d']
+        out_shape = self.output_shapes['2d']
+        
+        axes=(-1,)
+        a, b = self.create_test_arrays(in_shape, out_shape)
+
+        fft, ifft = self.run_validate_fft(a, b, axes)
+
+        self.timer_routine(fft.execute, 
+                lambda: self.np_fft_comparison(a))
+        self.assertTrue(True)
+
+    def test_1d(self):
+        in_shape = self.input_shapes['1d']
+        out_shape = self.output_shapes['1d']
+
+        axes=(0,)
+        a, b = self.create_test_arrays(in_shape, out_shape)
+
+        self.run_validate_fft(a, b, axes)
+
+    def test_multiple_1d(self):
+        in_shape = self.input_shapes['2d']
+        out_shape = self.output_shapes['2d']
+        
+        axes=(-1,)
+        a, b = self.create_test_arrays(in_shape, out_shape)
+
+        self.run_validate_fft(a, b, axes)
+
+    def test_default_args(self):
+        in_shape = self.input_shapes['2d']
+        out_shape = self.output_shapes['2d']
+        
+        a, b = self.create_test_arrays(in_shape, out_shape)
+        
+        fft = FFTW(a,b)
+        fft.execute()
+        ref_b = self.reference_fftn(a, axes=(-1,))
+        self.assertTrue(numpy.allclose(b, ref_b, rtol=1e-2, atol=1e-3))
+
+    def test_time_with_array_update(self):
+        in_shape = self.input_shapes['2d']
+        out_shape = self.output_shapes['2d']
+        
+        axes=(-1,)
+        a, b = self.create_test_arrays(in_shape, out_shape)
+
+        fft, ifft = self.run_validate_fft(a, b, axes)
+        
+        def fftw_callable():
+            fft.update_arrays(a,b)
+            fft.execute()
+
+        self.timer_routine(fftw_callable, 
+                lambda: self.np_fft_comparison(a))
+
+        self.assertTrue(True)
+        
+    def test_planning_time_limit(self):
+        in_shape = self.input_shapes['1d']
+        out_shape = self.output_shapes['1d']
+
+        axes=(0,)
+        a, b = self.create_test_arrays(in_shape, out_shape)
+
+        # run this a few times
+        runs = 10
+        t1 = time.time()
+        for n in range(runs):
+            forget_wisdom()
+            fft = FFTW(a, b, axes=axes)
+
+        unlimited_time = (time.time() - t1)/runs
+
+        time_limit = (unlimited_time)/8
+
+        # Now do it again but with an upper limit on the time
+        t1 = time.time()
+        for n in range(runs):
+            forget_wisdom()
+            fft = FFTW(a, b, axes=axes, planning_timelimit=time_limit)
+
+        limited_time = (time.time() - t1)/runs
+
+        import sys
+        if sys.platform == 'win32':
+            # Give a 4x margin on windows. The timers are low
+            # precision and FFTW seems to take longer anyway
+            self.assertTrue(limited_time < time_limit*4)
+        else:
+            # Otherwise have a 2x margin
+            self.assertTrue(limited_time < time_limit*2)
+
+    def test_invalid_planning_time_limit(self):
+        in_shape = self.input_shapes['1d']
+        out_shape = self.output_shapes['1d']
+
+        axes=(0,)
+        a, b = self.create_test_arrays(in_shape, out_shape)
+
+        self.assertRaisesRegex(TypeError, 'Invalid planning timelimit',
+                FFTW, *(a,b, axes), **{'planning_timelimit': 'foo'})
+    
+    def test_planner_flags(self):
+        '''Test all the planner flags on a small array
+        '''
+        in_shape = self.input_shapes['small_1d']
+        out_shape = self.output_shapes['small_1d']
+        
+        axes=(0,)
+        a, b = self.create_test_arrays(in_shape, out_shape)
+
+        for each_flag in pyfftw.pyfftw._flag_dict:
+            fft, ifft = self.run_validate_fft(a, b, axes, 
+                    flags=(each_flag,))
+
+            self.assertTrue(each_flag in fft.flags)
+            self.assertTrue(each_flag in ifft.flags)
+
+        # also, test no flags (which should still work)
+        fft, ifft = self.run_validate_fft(a, b, axes, 
+                    flags=())
+
+    def test_destroy_input(self):
+        '''Test the destroy input flag
+        '''
+        # We can't really test it actually destroys the input, as it might
+        # not (plus it's not exactly something we want).
+        # It's enough just to check it runs ok with that flag.
+        in_shape = self.input_shapes['1d']
+        out_shape = self.output_shapes['1d']
+
+        axes=(0,)
+        a, b = self.create_test_arrays(in_shape, out_shape)
+
+        self.run_validate_fft(a, b, axes, 
+                flags=('FFTW_ESTIMATE','FFTW_DESTROY_INPUT'))
+
+    def test_invalid_flag_fail(self):
+        '''Test passing a garbage flag fails
+        '''
+        in_shape = self.input_shapes['1d']
+        out_shape = self.output_shapes['1d']
+
+        axes=(0,)
+        a, b = self.create_test_arrays(in_shape, out_shape)
+
+        self.assertRaisesRegex(ValueError, 'Invalid flag', 
+                self.run_validate_fft, *(a, b, axes), 
+                **{'flags':('garbage',)})
+
+    def test_alignment(self):
+        '''Test to see if the alignment is returned correctly
+        '''
+        in_shape = self.input_shapes['2d']
+        out_shape = self.output_shapes['2d']
+
+        input_dtype_alignment = self.get_input_dtype_alignment()
+        output_dtype_alignment = self.get_output_dtype_alignment()
+        
+        axes=(-1,)
+        a, b = self.create_test_arrays(in_shape, out_shape)
+
+        a = n_byte_align(a, 16)
+        b = n_byte_align(b, 16)
+
+        fft, ifft = self.run_validate_fft(a, b, axes, 
+                force_unaligned_data=True)
+
+        a, b = self.create_test_arrays(in_shape, out_shape)
+
+        a = n_byte_align(a, 16)
+        b = n_byte_align(b, 16)
+
+        a_orig = a.copy()
+        b_orig = b.copy()
+
+        # Offset from 16 byte aligned to guarantee it's not
+        # 16 byte aligned
+        a__ = n_byte_align_empty(
+                numpy.prod(in_shape)*a.itemsize + input_dtype_alignment, 
+                16, dtype='int8')
+        
+        a_ = (a__[input_dtype_alignment:]
+                .view(dtype=self.input_dtype).reshape(*in_shape))
+        a_[:] = a 
+        
+        b__ = n_byte_align_empty(
+                numpy.prod(out_shape)*b.itemsize + input_dtype_alignment, 
+                16, dtype='int8')
+        
+        b_ = (b__[input_dtype_alignment:]
+                .view(dtype=self.output_dtype).reshape(*out_shape))
+        b_[:] = b
+
+        a[:] = a_orig        
+        fft, ifft = self.run_validate_fft(a, b, axes, 
+                create_array_copies=False)
+
+        self.assertTrue(fft.input_alignment == 16)
+        self.assertTrue(fft.output_alignment == 16)
+
+        a[:] = a_orig
+        fft, ifft = self.run_validate_fft(a, b_, axes, 
+                create_array_copies=False)
+
+        self.assertTrue(fft.input_alignment == input_dtype_alignment)
+        self.assertTrue(fft.output_alignment == output_dtype_alignment)
+
+        a_[:] = a_orig        
+        fft, ifft = self.run_validate_fft(a_, b, axes, 
+                create_array_copies=False)        
+        self.assertTrue(fft.input_alignment == input_dtype_alignment)
+        self.assertTrue(fft.output_alignment == output_dtype_alignment)
+
+        a_[:] = a_orig        
+        fft, ifft = self.run_validate_fft(a_, b_, axes, 
+                create_array_copies=False)        
+        self.assertTrue(fft.input_alignment == input_dtype_alignment)
+        self.assertTrue(fft.output_alignment == output_dtype_alignment)
+
+        a[:] = a_orig        
+        fft, ifft = self.run_validate_fft(a, b, axes, 
+                create_array_copies=False, force_unaligned_data=True)
+        self.assertTrue(fft.input_alignment == input_dtype_alignment)
+        self.assertTrue(fft.output_alignment == output_dtype_alignment)
+    
+    def test_incorrect_byte_alignment_fails(self):
+        in_shape = self.input_shapes['2d']
+        out_shape = self.output_shapes['2d']
+
+        input_dtype_alignment = self.get_input_dtype_alignment()
+        
+        axes=(-1,)
+        a, b = self.create_test_arrays(in_shape, out_shape)
+
+        a = n_byte_align(a, 16)
+        b = n_byte_align(b, 16)
+
+        fft, ifft = self.run_validate_fft(a, b, axes, 
+                force_unaligned_data=True)
+
+        a, b = self.create_test_arrays(in_shape, out_shape)
+
+        # Offset from 16 byte aligned to guarantee it's not
+        # 16 byte aligned
+        a__ = n_byte_align_empty(
+                numpy.prod(in_shape)*a.itemsize + 1, 
+                16, dtype='int8')
+        
+        a_ = a__[1:].view(dtype=self.input_dtype).reshape(*in_shape)
+        a_[:] = a 
+        
+        b__ = n_byte_align_empty(
+                numpy.prod(out_shape)*b.itemsize + 1, 
+                16, dtype='int8')
+        
+        b_ = b__[1:].view(dtype=self.output_dtype).reshape(*out_shape)
+        b_[:] = b
+
+        self.assertRaisesRegex(ValueError, 'Invalid output alignment',
+                FFTW, *(a, b_))
+
+        self.assertRaisesRegex(ValueError, 'Invalid input alignment',
+                FFTW, *(a_, b))
+
+        self.assertRaisesRegex(ValueError, 'Invalid input alignment',
+                FFTW, *(a_, b_))
+
+    def test_zero_length_fft_axis_fail(self):
+        
+        in_shape = (1024, 0)
+        out_shape = in_shape
+
+        axes = (-1,)
+
+        a, b = self.create_test_arrays(in_shape, out_shape)
+
+        self.assertRaisesRegex(ValueError, 'Zero length array',
+                self.run_validate_fft, *(a,b, axes))
+
+    def test_missized_fail(self):
+        in_shape = self.input_shapes['2d']
+        _out_shape = self.output_shapes['2d']
+
+        out_shape = (_out_shape[0]+1, _out_shape[1])
+        
+        axes=(0,)
+        a, b = self.create_test_arrays(in_shape, out_shape)
+    
+        with self.assertRaisesRegex(ValueError, 'Invalid shapes'):
+                FFTW(a, b, axes, direction=self.direction)
+
+    def test_missized_nonfft_axes_fail(self):
+        in_shape = self.input_shapes['3d']
+        _out_shape = self.output_shapes['3d']
+        out_shape = (_out_shape[0], _out_shape[1]+1, _out_shape[2])
+        
+        axes=(2,)
+        a, b = self.create_test_arrays(in_shape, out_shape)
+
+        with self.assertRaisesRegex(ValueError, 'Invalid shapes'):
+                FFTW(a, b, direction=self.direction)
+
+    def test_extra_dimension_fail(self):
+        in_shape = self.input_shapes['2d']
+        _out_shape = self.output_shapes['2d']        
+        out_shape = (2, _out_shape[0], _out_shape[1])
+        
+        axes=(1,)
+        a, b = self.create_test_arrays(in_shape, out_shape)
+    
+        with self.assertRaisesRegex(ValueError, 'Invalid shapes'):
+                FFTW(a, b, direction=self.direction)
+        
+    def test_f_contiguous_1d(self):
+        in_shape = self.input_shapes['2d']
+        out_shape = self.output_shapes['2d']
+        
+        axes=(0,)
+        a, b = self.create_test_arrays(in_shape, out_shape)
+
+        # Taking the transpose just makes the array F contiguous
+        a = a.transpose()
+        b = b.transpose()
+
+        self.run_validate_fft(a, b, axes, create_array_copies=False)
+
+    def test_different_dtypes_fail(self):
+        in_shape = self.input_shapes['2d']
+        out_shape = self.output_shapes['2d']
+        
+        axes=(-1,)
+        a, b = self.create_test_arrays(in_shape, out_shape)
+
+        a_ = numpy.complex64(a)
+        b_ = numpy.complex128(b)
+        self.assertRaisesRegex(ValueError, 'Invalid scheme',
+                FFTW, *(a_,b_))
+
+        a_ = numpy.complex128(a)
+        b_ = numpy.complex64(b)
+        self.assertRaisesRegex(ValueError, 'Invalid scheme',
+                FFTW, *(a_,b_))
+        
+    def test_update_data(self):
+        in_shape = self.input_shapes['2d']
+        out_shape = self.output_shapes['2d']
+        
+        axes=(-1,)
+        a, b = self.create_test_arrays(in_shape, out_shape)
+
+        fft, ifft = self.run_validate_fft(a, b, axes)
+
+        a, b = self.create_test_arrays(in_shape, out_shape)
+        
+        self.run_validate_fft(a, b, axes, fft=fft, ifft=ifft)
+    
+    def test_with_not_ndarray_error(self):
+        in_shape = self.input_shapes['2d']
+        out_shape = self.output_shapes['2d']
+        
+        a, b = self.create_test_arrays(in_shape, out_shape)
+
+        self.assertRaisesRegex(ValueError, 'Invalid output array',
+                FFTW, *(a,10))
+
+        self.assertRaisesRegex(ValueError, 'Invalid input array',
+                FFTW, *(10,b))
+
+    def test_update_data_with_not_ndarray_error(self):
+        in_shape = self.input_shapes['2d']
+        out_shape = self.output_shapes['2d']
+        
+        axes=(-1,)
+        a, b = self.create_test_arrays(in_shape, out_shape)
+
+        fft, ifft = self.run_validate_fft(a, b, axes, 
+                create_array_copies=False)
+
+        self.assertRaisesRegex(ValueError, 'Invalid output array',
+                fft.update_arrays, *(a,10))
+
+        self.assertRaisesRegex(ValueError, 'Invalid input array',
+                fft.update_arrays, *(10,b))
+
+    def test_update_data_with_stride_error(self):
+        in_shape = self.input_shapes['2d']
+        out_shape = self.output_shapes['2d']
+        
+        axes=(-1,)
+        a, b = self.create_test_arrays(in_shape, out_shape)
+
+        fft, ifft = self.run_validate_fft(a, b, axes, 
+                create_array_copies=False)
+
+        # We offset by 16 to make sure the byte alignment is still correct.
+        in_shape = (in_shape[0]+16, in_shape[1]+16)
+        out_shape = (out_shape[0]+16, out_shape[1]+16)
+
+        a_, b_ = self.create_test_arrays(in_shape, out_shape)
+
+        a_ = a_[16:,16:]
+        b_ = b_[16:,16:]
+
+        with self.assertRaisesRegex(ValueError, 'Invalid input striding'):
+            self.run_validate_fft(a_, b, axes, 
+                    fft=fft, ifft=ifft, create_array_copies=False)
+
+        with self.assertRaisesRegex(ValueError, 'Invalid output striding'):
+            self.run_validate_fft(a, b_, axes, 
+                    fft=fft, ifft=ifft, create_array_copies=False)
+
+    def test_update_data_with_shape_error(self):
+        in_shape = self.input_shapes['2d']
+        out_shape = self.output_shapes['2d']
+        
+        axes=(-1,)
+        a, b = self.create_test_arrays(in_shape, out_shape)
+
+        fft, ifft = self.run_validate_fft(a, b, axes)
+
+        in_shape = (in_shape[0]-10, in_shape[1])
+        out_shape = (out_shape[0], out_shape[1]+5)
+
+        a_, b_ = self.create_test_arrays(in_shape, out_shape)
+
+        with self.assertRaisesRegex(ValueError, 'Invalid input shape'):
+            self.run_validate_fft(a_, b, axes, 
+                    fft=fft, ifft=ifft, create_array_copies=False)
+
+        with self.assertRaisesRegex(ValueError, 'Invalid output shape'):
+            self.run_validate_fft(a, b_, axes, 
+                    fft=fft, ifft=ifft, create_array_copies=False)
+
+    def test_update_unaligned_data_with_FFTW_UNALIGNED(self):
+        in_shape = self.input_shapes['2d']
+        out_shape = self.output_shapes['2d']
+
+        input_dtype_alignment = self.get_input_dtype_alignment()
+        
+        axes=(-1,)
+        a, b = self.create_test_arrays(in_shape, out_shape)
+
+        a = n_byte_align(a, 16)
+        b = n_byte_align(b, 16)
+
+        fft, ifft = self.run_validate_fft(a, b, axes, 
+                force_unaligned_data=True)
+
+        a, b = self.create_test_arrays(in_shape, out_shape)
+
+        # Offset from 16 byte aligned to guarantee it's not
+        # 16 byte aligned
+        a__ = n_byte_align_empty(
+                numpy.prod(in_shape)*a.itemsize + input_dtype_alignment, 
+                16, dtype='int8')
+        
+        a_ = (a__[input_dtype_alignment:]
+                .view(dtype=self.input_dtype).reshape(*in_shape))
+        a_[:] = a 
+        
+        b__ = n_byte_align_empty(
+                numpy.prod(out_shape)*b.itemsize + input_dtype_alignment, 
+                16, dtype='int8')
+        
+        b_ = (b__[input_dtype_alignment:]
+                .view(dtype=self.output_dtype).reshape(*out_shape))
+        b_[:] = b
+
+        self.run_validate_fft(a, b_, axes, fft=fft, ifft=ifft)
+        self.run_validate_fft(a_, b, axes, fft=fft, ifft=ifft)
+        self.run_validate_fft(a_, b_, axes, fft=fft, ifft=ifft)
+
+    def test_update_data_with_unaligned_original(self):
+        in_shape = self.input_shapes['2d']
+        out_shape = self.output_shapes['2d']
+
+        input_dtype_alignment = self.get_input_dtype_alignment()
+        
+        axes=(-1,)
+        a, b = self.create_test_arrays(in_shape, out_shape)
+
+        # Offset from 16 byte aligned to guarantee it's not
+        # 16 byte aligned
+        a__ = n_byte_align_empty(
+                numpy.prod(in_shape)*a.itemsize + input_dtype_alignment,
+                16, dtype='int8')
+        
+        a_ = a__[input_dtype_alignment:].view(dtype=self.input_dtype).reshape(*in_shape)
+        a_[:] = a
+        
+        b__ = n_byte_align_empty(
+                numpy.prod(out_shape)*b.itemsize + input_dtype_alignment, 
+                16, dtype='int8')
+        
+        b_ = b__[input_dtype_alignment:].view(dtype=self.output_dtype).reshape(*out_shape)
+        b_[:] = b
+        
+        fft, ifft = self.run_validate_fft(a_, b_, axes, 
+                force_unaligned_data=True)
+        
+        self.run_validate_fft(a, b_, axes, fft=fft, ifft=ifft)
+        self.run_validate_fft(a_, b, axes, fft=fft, ifft=ifft)
+        self.run_validate_fft(a_, b_, axes, fft=fft, ifft=ifft)
+
+
+    def test_update_data_with_alignment_error(self):
+        in_shape = self.input_shapes['2d']
+        out_shape = self.output_shapes['2d']
+
+        byte_error = 1
+        
+        axes=(-1,)
+        a, b = self.create_test_arrays(in_shape, out_shape)
+
+        a = n_byte_align(a, 16)
+        b = n_byte_align(b, 16)
+
+        fft, ifft = self.run_validate_fft(a, b, axes)
+        
+        a, b = self.create_test_arrays(in_shape, out_shape)
+
+        # Offset from 16 byte aligned to guarantee it's not
+        # 16 byte aligned
+        a__ = n_byte_align_empty(
+                numpy.prod(in_shape)*a.itemsize+byte_error, 
+                16, dtype='int8')
+        
+        a_ = (a__[byte_error:]
+                .view(dtype=self.input_dtype).reshape(*in_shape))
+        a_[:] = a 
+        
+        b__ = n_byte_align_empty(
+                numpy.prod(out_shape)*b.itemsize+byte_error, 
+                16, dtype='int8')
+        
+        b_ = (b__[byte_error:]
+                .view(dtype=self.output_dtype).reshape(*out_shape))
+        b_[:] = b
+     
+        with self.assertRaisesRegex(ValueError, 'Invalid output alignment'):
+            self.run_validate_fft(a, b_, axes, fft=fft, ifft=ifft, 
+                    create_array_copies=False)
+
+        with self.assertRaisesRegex(ValueError, 'Invalid input alignment'):
+            self.run_validate_fft(a_, b, axes, fft=fft, ifft=ifft, 
+                    create_array_copies=False)
+
+        # Should also be true for the unaligned case
+        fft, ifft = self.run_validate_fft(a, b, axes, 
+                force_unaligned_data=True)
+
+        with self.assertRaisesRegex(ValueError, 'Invalid output alignment'):
+            self.run_validate_fft(a, b_, axes, fft=fft, ifft=ifft, 
+                    create_array_copies=False)
+
+        with self.assertRaisesRegex(ValueError, 'Invalid input alignment'):
+            self.run_validate_fft(a_, b, axes, fft=fft, ifft=ifft, 
+                    create_array_copies=False)
+
+    def test_invalid_axes(self):
+        in_shape = self.input_shapes['2d']
+        out_shape = self.output_shapes['2d']
+        
+        axes=(-3,)
+        a, b = self.create_test_arrays(in_shape, out_shape)
+
+        with self.assertRaisesRegex(IndexError, 'Invalid axes'):
+                FFTW(a, b, axes, direction=self.direction)
+
+        axes=(10,)
+        with self.assertRaisesRegex(IndexError, 'Invalid axes'):
+                FFTW(a, b, axes, direction=self.direction)
+
+
+class Complex64FFTWTest(Complex64FFTW1DTest, FFTWBaseTest):
+        
+    def test_2d(self):
+        in_shape = self.input_shapes['2d']
+        out_shape = self.output_shapes['2d']
+        
+        axes=(-2,-1)
+        a, b = self.create_test_arrays(in_shape, out_shape)
+
+        self.run_validate_fft(a, b, axes, create_array_copies=False)
+           
+    def test_multiple_2d(self):
+        in_shape = self.input_shapes['3d']
+        out_shape = self.output_shapes['3d']
+        
+        axes=(-2,-1)
+        a, b = self.create_test_arrays(in_shape, out_shape)
+
+        self.run_validate_fft(a, b, axes, create_array_copies=False)
+        
+    def test_3d(self):
+        in_shape = self.input_shapes['3d']
+        out_shape = self.output_shapes['3d']
+        
+        axes=(0, 1, 2)
+        a, b = self.create_test_arrays(in_shape, out_shape)
+
+        self.run_validate_fft(a, b, axes, create_array_copies=False)
+        
+    def test_non_monotonic_increasing_axes(self):
+        '''Test the case where the axes arg does not monotonically increase.
+        '''
+        axes=(1, 0)
+
+        # We still need the shapes to work!
+        in_shape = numpy.asarray(self.input_shapes['2d'])[list(axes)]
+        out_shape = numpy.asarray(self.output_shapes['2d'])[list(axes)]
+        
+        a, b = self.create_test_arrays(in_shape, out_shape, axes=axes)
+
+        self.run_validate_fft(a, b, axes, create_array_copies=False)
+        
+    def test_non_contiguous_2d(self):
+        in_shape = self.input_shapes['2d']
+        out_shape = self.output_shapes['2d']
+        
+        axes=(-2,-1)
+        a, b = self.create_test_arrays(in_shape, out_shape)
+
+        # Some arbitrary and crazy slicing
+        a_sliced = a[12:200:3, 300:2041:9]
+        # b needs to be the same size
+        b_sliced = b[20:146:2, 100:1458:7]
+
+        self.run_validate_fft(a_sliced, b_sliced, axes, create_array_copies=False)
+        
+    def test_non_contiguous_2d_in_3d(self):
+        in_shape = (256, 4, 2048)
+        out_shape = in_shape
+        axes=(0,2)
+        a, b = self.create_test_arrays(in_shape, out_shape)
+
+        # Some arbitrary and crazy slicing
+        a_sliced = a[12:200:3, :, 300:2041:9]
+        # b needs to be the same size
+        b_sliced = b[20:146:2, :, 100:1458:7]
+
+        self.run_validate_fft(a_sliced, b_sliced, axes, create_array_copies=False)
+
+
+class Complex128FFTWTest(Complex64FFTWTest):
+    
+    def setUp(self):
+
+        self.input_dtype = numpy.complex128
+        self.output_dtype = numpy.complex128
+        self.np_fft_comparison = numpy.fft.fft
+
+        self.direction = 'FFTW_FORWARD'
+        return
+
+class ComplexLongDoubleFFTWTest(Complex64FFTWTest):
+    
+    def setUp(self):
+
+        self.input_dtype = numpy.clongdouble
+        self.output_dtype = numpy.clongdouble
+        self.np_fft_comparison = self.reference_fftn
+
+        self.direction = 'FFTW_FORWARD'        
+        return
+
+    def reference_fftn(self, a, axes):
+
+        # numpy.fft.fftn doesn't support complex256 type,
+        # so we need to compare to a lower precision type.
+        a = numpy.complex128(a)
+        return numpy.fft.fftn(a, axes=axes)
+
+    @unittest.skip('numpy.fft has issues with this dtype.')
+    def test_time(self):
+        pass
+
+    @unittest.skip('numpy.fft has issues with this dtype.')    
+    def test_time_with_array_update(self):
+        pass
+
+test_cases = (
+        Complex64FFTWTest,
+        Complex128FFTWTest,
+        ComplexLongDoubleFFTWTest,)
+
+test_set = None
+#test_set = {'all':['test_alignment', 'test_incorrect_byte_alignment_fails']}
+
+if __name__ == '__main__':
+    run_test_suites(test_cases, test_set)
+
diff --git a/test/test_pyfftw_interfaces_cache.py b/test/test_pyfftw_interfaces_cache.py
new file mode 100644
index 0000000..7281906
--- /dev/null
+++ b/test/test_pyfftw_interfaces_cache.py
@@ -0,0 +1,339 @@
+# Copyright 2012 Knowledge Economy Developments Ltd
+# 
+# Henry Gomersall
+# heng at kedevelopments.co.uk
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+from pyfftw import interfaces, builders
+import numpy
+
+import unittest
+from .test_pyfftw_base import run_test_suites
+from .test_pyfftw_numpy_interface import InterfacesNumpyFFTTestFFT
+
+import threading
+import time
+
+'''Test the caching functionality of the interfaces package.
+'''
+
+class InterfacesNumpyFFTCacheTestFFT(InterfacesNumpyFFTTestFFT):
+    test_shapes = (
+            ((100,), {}),
+            ((128, 64), {'axis': 0}),
+            ((128, 32), {'axis': -1}),
+            ((32, 64), {}),
+            )
+
+    def validate(self, array_type, test_shape, dtype, 
+            s, kwargs):
+
+        # Do it with the cache
+        interfaces.cache.enable()        
+        output = self._validate(array_type, test_shape, dtype, s, kwargs)
+        output2 = self._validate(array_type, test_shape, dtype, s, kwargs)
+
+        self.assertIsNot(output, output2) 
+
+        # Turn it off to finish
+        interfaces.cache.disable()
+
+class CacheSpecificInterfacesUtils(unittest.TestCase):
+
+    def test_slow_lookup_no_race_condition(self):
+        '''Checks that lookups in _utils longer than the keepalive time are ok.
+        '''
+        # Any old size, it doesn't matter
+        data_shape = (128,)
+
+        # Monkey patch the module with a custom _Cache object
+        _Cache_class = interfaces.cache._Cache        
+        class _SlowLookupCache(_Cache_class):
+
+            def _lookup(self, key):
+                return _Cache_class.lookup(self, key)
+
+            def lookup(self, key):
+                time.sleep(0.1)
+                return self._lookup(key)
+
+        try:
+            interfaces.cache._Cache = _SlowLookupCache
+
+            interfaces.cache.enable()
+
+            # something shortish
+            interfaces.cache.set_keepalive_time(0.001)
+
+            ar, ai = numpy.random.randn(*(2,) + data_shape)
+            a = ar + 1j*ai
+
+            # Both the following should work without exception
+            # (even if it fails to get from the cache)
+            interfaces.numpy_fft.fft(a)
+            interfaces.numpy_fft.fft(a)
+
+            interfaces.cache.disable()
+
+        finally:
+            # Revert the monkey patching
+            interfaces.cache._Cache = _Cache_class
+    
+
+class InterfacesCacheTest(unittest.TestCase):
+    
+    def test_missing_threading(self):
+        self.assertIs(interfaces.cache._fftw_cache, None)
+
+        mod_threading = interfaces.cache._threading
+        interfaces.cache._threading = None
+
+        with self.assertRaises(ImportError):
+            interfaces.cache.enable()
+
+        interfaces.cache._threading = mod_threading        
+
+    def test_is_enabled(self):
+        self.assertIs(interfaces.cache._fftw_cache, None)
+
+        interfaces.cache.enable()
+        self.assertTrue(interfaces.cache.is_enabled())
+
+        interfaces.cache.disable()
+        self.assertFalse(interfaces.cache.is_enabled())
+
+    def test_cache_enable_disable(self):
+
+        self.assertIs(interfaces.cache._fftw_cache, None)
+
+        interfaces.cache.enable()
+        self.assertIsInstance(
+                interfaces.cache._fftw_cache, interfaces.cache._Cache)
+
+        interfaces.cache.disable()
+        self.assertIs(interfaces.cache._fftw_cache, None)
+
+    def test_set_keepalive_time(self):
+        with self.assertRaises(interfaces.cache.CacheError):
+            interfaces.cache.set_keepalive_time(10)
+
+        interfaces.cache.enable()
+        interfaces.cache.set_keepalive_time(10)
+
+        self.assertTrue(
+                interfaces.cache._fftw_cache.keepalive_time == 10.0)
+
+        interfaces.cache.disable()
+
+
+class CacheTest(unittest.TestCase):
+
+    def test_cache_parent_thread_ended(self):
+        '''Test ending cache parent thread ends cache thread.
+        '''
+        self.assertTrue(threading.active_count() == 1)
+
+        def cache_parent_thread():
+            cache = interfaces.cache._Cache()
+            time.sleep(0.2)
+
+        parent_t = threading.Thread(target=cache_parent_thread)
+        parent_t.start()
+        
+        time.sleep(0.1)                
+        # Check it's running
+        self.assertTrue(threading.active_count() == 3)
+
+        parent_t.join()
+        time.sleep(0.1)
+        # Check both threads have exited properly
+        self.assertTrue(threading.active_count() == 1)
+
+    def test_delete_cache_object(self):
+        '''Test deleting a cache object ends cache thread.
+        '''
+        self.assertTrue(threading.active_count() == 1)
+
+        _cache = interfaces.cache._Cache()
+        time.sleep(0.1)
+        self.assertTrue(threading.active_count() == 2)
+
+        del _cache
+        time.sleep(0.1)
+        self.assertTrue(threading.active_count() == 1)
+
+    def test_insert_and_lookup_item(self):
+        _cache = interfaces.cache._Cache()
+
+        key = 'the key'
+
+        test_array = numpy.random.randn(16)
+        obj = builders.fft(test_array)
+        _cache.insert(obj, key)
+
+        self.assertIs(_cache.lookup(key), obj)
+
+    def test_invalid_lookup(self):
+        _cache = interfaces.cache._Cache()
+
+        key = 'the key'
+
+        test_array = numpy.random.randn(16)
+        obj = builders.fft(test_array)
+        _cache.insert(obj, key)
+
+        self.assertRaises(KeyError, _cache.lookup, 'wrong_key')
+
+    def test_keepalive_time_update(self):
+        _cache = interfaces.cache._Cache()
+
+        # The default
+        self.assertEqual(_cache.keepalive_time, 0.1)
+
+        _cache.set_keepalive_time(0.3)
+        self.assertEqual(_cache.keepalive_time, 0.3)
+
+        _cache.set_keepalive_time(10.0)
+        self.assertEqual(_cache.keepalive_time, 10.0)
+
+        _cache.set_keepalive_time('0.2')
+        self.assertEqual(_cache.keepalive_time, 0.2)
+
+        with self.assertRaises(ValueError):
+            _cache.set_keepalive_time('foo')
+
+        with self.assertRaises(TypeError):
+            _cache.set_keepalive_time([])
+
+    def test_contains(self):
+        _cache = interfaces.cache._Cache()
+
+        key = 'the key'
+
+        test_array = numpy.random.randn(16)
+        obj = builders.fft(test_array)
+        _cache.insert(obj, key)
+
+        self.assertTrue(key in _cache)
+        self.assertFalse('Not a key' in _cache)
+
+    def test_objects_removed_after_keepalive(self):
+        _cache = interfaces.cache._Cache()
+
+        key = 'the key'
+
+        test_array = numpy.random.randn(16)
+        obj = builders.fft(test_array)
+        _cache.insert(obj, key)
+
+        self.assertIs(_cache.lookup(key), obj)
+
+        keepalive_time = _cache.keepalive_time
+
+        time.sleep(_cache.keepalive_time*3)
+        self.assertRaises(KeyError, _cache.lookup, key)
+
+        _cache.insert(obj, key)
+        old_keepalive_time = _cache.keepalive_time
+        _cache.set_keepalive_time(old_keepalive_time * 4)
+
+        self.assertIs(_cache.lookup(key), obj)
+
+        time.sleep(old_keepalive_time * 3)
+        self.assertIs(_cache.lookup(key), obj)
+
+        time.sleep(old_keepalive_time * 8)
+        self.assertRaises(KeyError, _cache.lookup, key)
+
+class InterfacesNumpyFFTCacheTestIFFT(InterfacesNumpyFFTCacheTestFFT):
+    func = 'ifft'
+
+class InterfacesNumpyFFTCacheTestRFFT(InterfacesNumpyFFTCacheTestFFT):
+    func = 'rfft'
+
+class InterfacesNumpyFFTCacheTestIRFFT(InterfacesNumpyFFTCacheTestFFT):
+    func = 'irfft'
+    realinv = True    
+
+class InterfacesNumpyFFTCacheTestFFT2(InterfacesNumpyFFTCacheTestFFT):
+    axes_kw = 'axes'    
+    func = 'ifft2'
+    test_shapes = (
+            ((128, 64), {'axes': None}),
+            ((128, 32), {'axes': None}),
+            ((32, 64), {'axes': (-2, -1)}),
+            ((4, 6, 8, 4), {'axes': (0, 3)}),
+            )
+    
+    invalid_args = (
+            ((100,), ((100, 200),), ValueError, 'Shape error'),
+            ((100, 200), ((100, 200, 100),), ValueError, 'Shape error'),
+            ((100,), ((100, 200), (-3, -2, -1)), ValueError, 'Shape error'),
+            ((100, 200), (100, -1), TypeError, ''),
+            ((100, 200), ((100, 200), (-3, -2)), IndexError, 'Invalid axes'),
+            ((100, 200), ((100,), (-3,)), IndexError, 'Invalid axes'))
+
+
+class InterfacesNumpyFFTCacheTestIFFT2(InterfacesNumpyFFTCacheTestFFT2):
+    func = 'ifft2'
+
+class InterfacesNumpyFFTCacheTestRFFT2(InterfacesNumpyFFTCacheTestFFT2):
+    func = 'rfft2'
+
+class InterfacesNumpyFFTCacheTestIRFFT2(InterfacesNumpyFFTCacheTestFFT2):
+    func = 'irfft2'
+    realinv = True    
+
+class InterfacesNumpyFFTCacheTestFFTN(InterfacesNumpyFFTCacheTestFFT2):
+    func = 'ifftn'
+    test_shapes = (
+            ((128, 32, 4), {'axes': None}),
+            ((64, 128, 16), {'axes': (0, 1, 2)}),
+            ((4, 6, 8, 4), {'axes': (0, 3, 1)}),
+            ((4, 6, 8, 4), {'axes': (0, 3, 1, 2)}),
+            )
+
+class InterfacesNumpyFFTCacheTestIFFTN(InterfacesNumpyFFTCacheTestFFTN):
+    func = 'ifftn'
+
+class InterfacesNumpyFFTCacheTestRFFTN(InterfacesNumpyFFTCacheTestFFTN):
+    func = 'rfftn'
+
+class InterfacesNumpyFFTCacheTestIRFFTN(InterfacesNumpyFFTCacheTestFFTN):
+    func = 'irfftn'
+    realinv = True
+
+test_cases = (
+        CacheTest,
+        InterfacesCacheTest,
+        CacheSpecificInterfacesUtils,
+        InterfacesNumpyFFTCacheTestFFT,
+        InterfacesNumpyFFTCacheTestIFFT,
+        InterfacesNumpyFFTCacheTestRFFT,
+        InterfacesNumpyFFTCacheTestIRFFT,
+        InterfacesNumpyFFTCacheTestFFT2,
+        InterfacesNumpyFFTCacheTestIFFT2,
+        InterfacesNumpyFFTCacheTestRFFT2,
+        InterfacesNumpyFFTCacheTestIRFFT2,
+        InterfacesNumpyFFTCacheTestFFTN,
+        InterfacesNumpyFFTCacheTestIFFTN,
+        InterfacesNumpyFFTCacheTestRFFTN,
+        InterfacesNumpyFFTCacheTestIRFFTN,)
+
+test_set = None
+
+if __name__ == '__main__':
+
+    run_test_suites(test_cases, test_set)
diff --git a/test/test_pyfftw_multithreaded.py b/test/test_pyfftw_multithreaded.py
new file mode 100644
index 0000000..c6c01f8
--- /dev/null
+++ b/test/test_pyfftw_multithreaded.py
@@ -0,0 +1,93 @@
+# Copyright 2012 Knowledge Economy Developments Ltd
+# 
+# Henry Gomersall
+# heng at kedevelopments.co.uk
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+from pyfftw import FFTW, n_byte_align, n_byte_align_empty
+import numpy
+from timeit import Timer
+
+from .test_pyfftw_base import run_test_suites
+
+import unittest
+
+from .test_pyfftw_base import FFTWBaseTest
+
+class Complex64MultiThreadedTest(FFTWBaseTest):
+    
+    def run_multithreaded_test(self, threads):
+        in_shape = self.input_shapes['2d'];
+        out_shape = self.output_shapes['2d']
+        
+        axes=(-1,)
+        a, b = self.create_test_arrays(in_shape, out_shape)
+
+        fft, ifft = self.run_validate_fft(a, b, axes, threads=threads)
+
+        fft_, ifft_ = self.run_validate_fft(a, b, axes, threads=1)
+
+        self.timer_routine(fft.execute, fft_.execute, 
+                comparison_string='singled threaded')
+        self.assertTrue(True)
+
+
+    def test_2_threads(self):
+        self.run_multithreaded_test(2)
+
+    def test_4_threads(self):
+        self.run_multithreaded_test(4)
+
+    def test_7_threads(self):
+        self.run_multithreaded_test(7)        
+
+    def test_25_threads(self):
+        self.run_multithreaded_test(25)        
+
+class Complex128MultiThreadedTest(Complex64MultiThreadedTest):
+    
+    def setUp(self):
+
+        self.input_dtype = numpy.complex128
+        self.output_dtype = numpy.complex128
+        self.np_fft_comparison = numpy.fft.fft        
+        return
+
+class ComplexLongDoubleMultiThreadedTest(Complex64MultiThreadedTest):
+    
+    def setUp(self):
+
+        self.input_dtype = numpy.clongdouble
+        self.output_dtype = numpy.clongdouble
+        self.np_fft_comparison = self.reference_fftn       
+        return
+
+    def reference_fftn(self, a, axes):
+
+        # numpy.fft.fftn doesn't support complex256 type,
+        # so we need to compare to a lower precision type.
+        a = numpy.complex128(a)
+        return numpy.fft.fftn(a, axes=axes)
+
+test_cases = (
+        Complex64MultiThreadedTest,
+        Complex128MultiThreadedTest,
+        ComplexLongDoubleMultiThreadedTest,)
+
+test_set = None
+
+if __name__ == '__main__':
+
+    run_test_suites(test_cases, test_set)
diff --git a/test/test_pyfftw_nbyte_align.py b/test/test_pyfftw_nbyte_align.py
new file mode 100644
index 0000000..d6dcbd1
--- /dev/null
+++ b/test/test_pyfftw_nbyte_align.py
@@ -0,0 +1,163 @@
+# Copyright 2012 Knowledge Economy Developments Ltd
+# 
+# Henry Gomersall
+# heng at kedevelopments.co.uk
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+from pyfftw import n_byte_align, n_byte_align_empty, is_n_byte_aligned
+import numpy
+from timeit import Timer
+
+from .test_pyfftw_base import run_test_suites
+
+import unittest
+
+class NByteAlignTest(unittest.TestCase):
+
+    def __init__(self, *args, **kwargs):
+
+        super(NByteAlignTest, self).__init__(*args, **kwargs)
+
+        if not hasattr(self, 'assertRaisesRegex'):
+            self.assertRaisesRegex = self.assertRaisesRegexp
+
+    def setUp(self):
+
+        return
+
+    def tearDown(self):
+        
+        return
+
+    def test_n_byte_align_empty(self):
+        shape = (10,10)
+        # Test a few alignments and dtypes
+        for each in [(3, 'float64'),
+                (7, 'float64'),
+                (9, 'float32'),
+                (16, 'int64'),
+                (24, 'bool'),
+                (23, 'complex64'),
+                (63, 'complex128'),
+                (64, 'int8')]:
+
+            n = each[0]
+            b = n_byte_align_empty(shape, n, dtype=each[1])
+            self.assertTrue(b.ctypes.data%n == 0)
+            self.assertTrue(b.dtype == each[1])            
+
+    def test_n_byte_align(self):
+        shape = (10,10)
+        a = numpy.random.randn(*shape)
+        # Test a few alignments
+        for n in [3, 7, 9, 16, 24, 23, 63, 64]:
+            b = n_byte_align(a, n)
+            self.assertTrue(b.ctypes.data%n == 0)
+
+    def test_integer_shape(self):
+        shape = 100
+        a = numpy.random.randn(shape)
+        # Test a few alignments
+        for n in [3, 7, 9, 16, 24, 23, 63, 64]:
+            b = n_byte_align(a, n)
+            self.assertTrue(b.ctypes.data%n == 0)
+
+    def test_is_n_byte_aligned(self):
+        a = n_byte_align_empty(100, 16)
+        self.assertTrue(is_n_byte_aligned(a, 16))
+
+        a = n_byte_align_empty(100, 5)
+        self.assertTrue(is_n_byte_aligned(a, 5))
+
+        a = n_byte_align_empty(100, 16, dtype='float32')[1:]
+        self.assertFalse(is_n_byte_aligned(a, 16))
+        self.assertTrue(is_n_byte_aligned(a, 4))
+
+    def test_is_n_byte_aligned_fail_with_non_array(self):
+
+        a = [1, 2, 3, 4]
+        self.assertRaisesRegex(TypeError, 'Invalid array',
+                is_n_byte_aligned, a, 16)
+
+    def test_n_byte_align_fail_with_non_array(self):
+
+        a = [1, 2, 3, 4]
+        self.assertRaisesRegex(TypeError, 'Invalid array',
+                n_byte_align, a, 16)
+
+    def test_n_byte_align_consistent_data(self):
+        shape = (10,10)
+        a = numpy.int16(numpy.random.randn(*shape)*16000)
+        b = numpy.float64(numpy.random.randn(*shape))
+        c = numpy.int8(numpy.random.randn(*shape)*255)
+
+        # Test a few alignments
+        for n in [3, 7, 9, 16, 24, 23, 63, 64]:
+            d = n_byte_align(a, n)
+            self.assertTrue(numpy.array_equal(a, d))
+
+            d = n_byte_align(b, n)
+            self.assertTrue(numpy.array_equal(b, d))
+
+            d = n_byte_align(c, n)
+            self.assertTrue(numpy.array_equal(c, d))
+
+    def test_n_byte_align_different_dtypes(self):
+        shape = (10,10)
+        a = numpy.int16(numpy.random.randn(*shape)*16000)
+        b = numpy.float64(numpy.random.randn(*shape))
+        c = numpy.int8(numpy.random.randn(*shape)*255)
+        # Test a few alignments
+        for n in [3, 7, 9, 16, 24, 23, 63, 64]:
+            d = n_byte_align(a, n)
+            self.assertTrue(d.ctypes.data%n == 0)
+            self.assertTrue(d.__class__ == a.__class__)
+
+            d = n_byte_align(b, n)
+            self.assertTrue(d.ctypes.data%n == 0)
+            self.assertTrue(d.__class__ == b.__class__)
+
+            d = n_byte_align(c, n)
+            self.assertTrue(d.ctypes.data%n == 0)
+            self.assertTrue(d.__class__ == c.__class__)
+
+    def test_n_byte_align_set_dtype(self):
+        shape = (10,10)
+        a = numpy.int16(numpy.random.randn(*shape)*16000)
+        b = numpy.float64(numpy.random.randn(*shape))
+        c = numpy.int8(numpy.random.randn(*shape)*255)
+        # Test a few alignments
+        for n in [3, 7, 9, 16, 24, 23, 63, 64]:
+            d = n_byte_align(a, n, dtype='float32')
+            self.assertTrue(d.ctypes.data%n == 0)
+            self.assertTrue(d.dtype == 'float32')
+
+            d = n_byte_align(b, n, dtype='float32')
+            self.assertTrue(d.ctypes.data%n == 0)
+            self.assertTrue(d.dtype == 'float32')
+
+            d = n_byte_align(c, n, dtype='float64')
+            self.assertTrue(d.ctypes.data%n == 0)
+            self.assertTrue(d.dtype == 'float64')
+
+
+test_cases = (
+        NByteAlignTest,)
+
+test_set = None
+
+if __name__ == '__main__':
+
+    run_test_suites(test_cases, test_set)
diff --git a/test/test_pyfftw_numpy_interface.py b/test/test_pyfftw_numpy_interface.py
new file mode 100644
index 0000000..c1016b3
--- /dev/null
+++ b/test/test_pyfftw_numpy_interface.py
@@ -0,0 +1,566 @@
+# Copyright 2012 Knowledge Economy Developments Ltd
+# 
+# Henry Gomersall
+# heng at kedevelopments.co.uk
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+from pyfftw import n_byte_align_empty, n_byte_align, interfaces
+
+from .test_pyfftw_base import run_test_suites
+
+import unittest
+import numpy
+from numpy import fft as np_fft
+import inspect
+import warnings
+warnings.filterwarnings('always')
+
+complex_dtypes = (numpy.complex64, numpy.complex128, numpy.clongdouble)
+real_dtypes = (numpy.float32, numpy.float64, numpy.longdouble)
+
+def make_complex_data(shape, dtype):
+    ar, ai = dtype(numpy.random.randn(2, *shape))
+    return ar + 1j*ai
+
+def make_real_data(shape, dtype):
+    return dtype(numpy.random.randn(*shape))
+
+
+io_dtypes = {
+    'complex': (complex_dtypes, make_complex_data),
+    'r2c': (real_dtypes, make_real_data),
+    'c2r': (complex_dtypes, make_complex_data)}
+
+functions = {
+        'fft': 'complex',
+        'ifft': 'complex', 
+        'rfft': 'r2c',
+        'irfft': 'c2r',
+        'rfftn': 'r2c',
+        'irfftn': 'c2r',
+        'rfft2': 'r2c',
+        'irfft2': 'c2r',
+        'fft2': 'complex',
+        'ifft2': 'complex',
+        'fftn': 'complex',
+        'ifftn': 'complex'}
+
+acquired_names = ('hfft', 'ihfft', 'fftfreq', 'fftshift', 'ifftshift')
+
+class InterfacesNumpyFFTTestModule(unittest.TestCase):
+    ''' A really simple test suite to check the module works as expected.
+    '''
+
+    def test_acquired_names(self):
+        for each_name in acquired_names:
+
+            numpy_fft_attr = getattr(numpy.fft, each_name)
+            acquired_attr = getattr(interfaces.numpy_fft, each_name)
+
+            self.assertIs(numpy_fft_attr, acquired_attr)
+
+
+class InterfacesNumpyFFTTestFFT(unittest.TestCase):
+
+    func = 'fft'
+    axes_kw = 'axis'
+    test_shapes = (
+            ((100,), {}),
+            ((128, 64), {'axis': 0}),
+            ((128, 32), {'axis': -1}),
+            ((59, 100), {}),
+            ((32, 32, 4), {'axis': 1}),
+            ((64, 128, 16), {}),
+            )
+
+    # invalid_s_shapes is:
+    # (size, invalid_args, error_type, error_string)
+    invalid_args = (
+            ((100,), ((100, 200),), TypeError, ''),
+            ((100, 200), ((100, 200),), TypeError, ''),
+            ((100,), (100, (-2, -1)), TypeError, ''),
+            ((100,), (100, -20), IndexError, ''))
+
+    realinv = False
+
+    @property
+    def test_data(self):
+        for test_shape, kwargs in self.test_shapes:
+            axes = self.axes_from_kwargs(kwargs)
+            s = self.s_from_kwargs(test_shape, kwargs)
+
+            if self.realinv:
+                test_shape = list(test_shape)
+                test_shape[axes[-1]] = test_shape[axes[-1]]//2 + 1
+                test_shape = tuple(test_shape)
+
+            yield test_shape, s, kwargs
+
+    def __init__(self, *args, **kwargs):
+
+        super(InterfacesNumpyFFTTestFFT, self).__init__(*args, **kwargs)
+
+        # Assume python 3, but keep backwards compatibility
+        if not hasattr(self, 'assertRaisesRegex'):
+            self.assertRaisesRegex = self.assertRaisesRegexp
+
+    def validate(self, array_type, test_shape, dtype, 
+            s, kwargs):
+
+        # Do it without the cache
+
+        # without:
+        interfaces.cache.disable()
+        self._validate(array_type, test_shape, dtype, s, kwargs)
+
+    def _validate(self, array_type, test_shape, dtype, 
+            s, kwargs):
+
+        input_array = array_type(test_shape, dtype)
+        orig_input_array = input_array.copy()
+
+        if input_array.dtype == 'clongdouble':
+            np_input_array = numpy.complex128(input_array)
+
+        elif input_array.dtype == 'longdouble':
+            np_input_array = numpy.float64(input_array)
+
+        else:
+            np_input_array = input_array
+
+        with warnings.catch_warnings(record=True) as w:
+            # We catch the warnings so as to pick up on when
+            # a complex array is turned into a real array
+
+            output_array = getattr(interfaces.numpy_fft, self.func)(
+                    input_array.copy(), s, **kwargs)
+
+            if 'axes' in kwargs:
+                axes = {'axes': kwargs['axes']}
+            elif 'axis' in kwargs:
+                axes = {'axis': kwargs['axis']}
+            else:
+                axes = {}
+
+            test_out_array = getattr(np_fft, self.func)(
+                    np_input_array.copy(), s, **axes)
+
+            if (functions[self.func] == 'r2c'):
+                if numpy.iscomplexobj(input_array):
+                    if len(w) > 0:
+                        # Make sure a warning is raised
+                        self.assertIs(
+                                w[-1].category, numpy.ComplexWarning)
+        
+        self.assertTrue(
+                numpy.allclose(output_array, test_out_array, 
+                    rtol=1e-2, atol=1e-4))
+
+        if (not 'overwrite_input' in kwargs or 
+                not kwargs['overwrite_input']):
+            self.assertTrue(numpy.allclose(input_array,
+                orig_input_array))
+
+        return output_array
+
+    def axes_from_kwargs(self, kwargs):
+        
+        argspec = inspect.getargspec(getattr(interfaces.numpy_fft, self.func))
+        default_args = dict(list(zip(
+            argspec.args[-len(argspec.defaults):], argspec.defaults)))
+
+        if 'axis' in kwargs:
+            axes = (kwargs['axis'],)
+
+        elif 'axes' in kwargs:
+            axes = kwargs['axes']
+            if axes is None:
+                axes = default_args['axes']
+
+        else:
+            if 'axis' in default_args:
+                # default 1D
+                axes = (default_args['axis'],)
+            else:
+                # default nD
+                axes = default_args['axes']
+
+        if axes is None:
+            axes = (-1,)
+
+        return axes
+
+    def s_from_kwargs(self, test_shape, kwargs):
+        ''' Return either a scalar s or a tuple depending on
+        whether axis or axes is specified
+        '''
+        argspec = inspect.getargspec(getattr(interfaces.numpy_fft, self.func))
+        default_args = dict(list(zip(
+            argspec.args[-len(argspec.defaults):], argspec.defaults)))
+
+        if 'axis' in kwargs:
+            s = test_shape[kwargs['axis']]
+
+        elif 'axes' in kwargs:
+            axes = kwargs['axes']
+            if axes is not None:
+                s = []
+                for each_axis in axes:
+                    s.append(test_shape[each_axis])
+            else:
+                # default nD
+                s = []
+                try:
+                    for each_axis in default_args['axes']:
+                        s.append(test_shape[each_axis])
+                except TypeError:
+                    s = [test_shape[-1]]
+
+        else:
+            if 'axis' in default_args:
+                # default 1D
+                s = test_shape[default_args['axis']]
+            else:
+                # default nD
+                s = []
+                try:
+                    for each_axis in default_args['axes']:
+                        s.append(test_shape[each_axis])
+                except TypeError:
+                    s = None
+
+        return s
+
+    def test_valid(self):
+        dtype_tuple = io_dtypes[functions[self.func]]
+        
+        for dtype in dtype_tuple[0]:
+            for test_shape, s, kwargs in self.test_data:
+                s = None
+
+                self.validate(dtype_tuple[1], 
+                        test_shape, dtype, s, kwargs)
+
+
+    def test_fail_on_invalid_s_or_axes(self):
+        dtype_tuple = io_dtypes[functions[self.func]]
+        
+        for dtype in dtype_tuple[0]:
+
+            for test_shape, args, exception, e_str in self.invalid_args:
+                input_array = dtype_tuple[1](test_shape, dtype)
+                
+                self.assertRaisesRegex(exception, e_str,
+                        getattr(interfaces.numpy_fft, self.func), 
+                        *((input_array,) + args))
+
+
+    def test_same_sized_s(self):
+        dtype_tuple = io_dtypes[functions[self.func]]
+        for dtype in dtype_tuple[0]:
+            for test_shape, s, kwargs in self.test_data:
+
+                self.validate(dtype_tuple[1], 
+                        test_shape, dtype, s, kwargs)
+
+    def test_bigger_s(self):
+        dtype_tuple = io_dtypes[functions[self.func]]
+        for dtype in dtype_tuple[0]:
+            for test_shape, s, kwargs in self.test_data:
+
+                try:
+                    for each_axis, length in enumerate(s):
+                        s[each_axis] += 2
+                except TypeError:
+                    s += 2
+
+                self.validate(dtype_tuple[1], 
+                        test_shape, dtype, s, kwargs)
+
+
+    def test_smaller_s(self):
+        dtype_tuple = io_dtypes[functions[self.func]]
+        for dtype in dtype_tuple[0]:
+            for test_shape, s, kwargs in self.test_data:
+
+                try:
+                    for each_axis, length in enumerate(s):
+                        s[each_axis] -= 2
+                except TypeError:
+                    s -= 2
+
+                self.validate(dtype_tuple[1], 
+                        test_shape, dtype, s, kwargs)
+
+    def check_arg(self, arg, arg_test_values, array_type, test_shape, 
+            dtype, s, kwargs):
+        '''Check that the correct arg is passed to the builder'''
+        # We trust the builders to work as expected when passed
+        # the correct arg (the builders have their own unittests).
+
+        return_values = []
+        input_array = array_type(test_shape, dtype)
+
+        def fake_fft(*args, **kwargs):
+            return_values.append((args, kwargs))
+            return (args, kwargs)
+
+        try:
+
+            # Replace the function that is to be used
+            real_fft = getattr(interfaces.numpy_fft, self.func)
+            setattr(interfaces.numpy_fft, self.func, fake_fft)
+
+            _kwargs = kwargs.copy()
+
+            for each_value in arg_test_values:
+                _kwargs[arg] = each_value
+                builder_args = getattr(interfaces.numpy_fft, self.func)(
+                input_array.copy(), s, **_kwargs)
+                
+                self.assertTrue(builder_args[1][arg] == each_value)
+
+            # make sure it was called
+            self.assertTrue(len(return_values) > 0)
+        except:
+            raise
+        
+        finally:
+            # Make sure we set it back
+            setattr(interfaces.numpy_fft, self.func, real_fft)
+
+        # Validate it aswell        
+        for each_value in arg_test_values:
+            _kwargs[arg] = each_value
+            builder_args = getattr(interfaces.numpy_fft, self.func)(
+            input_array.copy(), s, **_kwargs)
+
+            self.validate(array_type, test_shape, dtype, s, _kwargs)
+
+    def test_auto_align_input(self):
+        dtype_tuple = io_dtypes[functions[self.func]]
+
+        for dtype in dtype_tuple[0]:
+            for test_shape, s, kwargs in self.test_data:
+                self.check_arg('auto_align_input', (True, False),
+                        dtype_tuple[1], test_shape, dtype, s, kwargs)
+
+    def test_auto_contiguous_input(self):
+        dtype_tuple = io_dtypes[functions[self.func]]
+
+        for dtype in dtype_tuple[0]:
+            for test_shape, s, kwargs in self.test_data:
+                self.check_arg('auto_contiguous', (True, False), 
+                        dtype_tuple[1], test_shape, dtype, s, kwargs)
+
+    def test_bigger_and_smaller_s(self):
+        dtype_tuple = io_dtypes[functions[self.func]]
+        for dtype in dtype_tuple[0]:
+            i = -1
+            for test_shape, s, kwargs in self.test_data:
+
+                try:
+                    for each_axis, length in enumerate(s):
+                        s[each_axis] += i * 2
+                        i *= i
+                except TypeError:
+                    s += i * 2
+                    i *= i
+
+                self.validate(dtype_tuple[1], 
+                        test_shape, dtype, s, kwargs)
+
+
+    def test_dtype_coercian(self):
+        # Make sure we input a dtype that needs to be coerced
+        if functions[self.func] == 'r2c':
+            dtype_tuple = io_dtypes['complex']
+        else:
+            dtype_tuple = io_dtypes['r2c']
+
+        for dtype in dtype_tuple[0]:
+            for test_shape, s, kwargs in self.test_data:
+                s = None
+
+                self.validate(dtype_tuple[1], 
+                        test_shape, dtype, s, kwargs)
+
+
+    def test_planner_effort(self):
+        '''Test the planner effort arg
+        '''
+        dtype_tuple = io_dtypes[functions[self.func]]
+        test_shape = (16,)
+        
+        for dtype in dtype_tuple[0]:
+            s = None
+            if self.axes_kw == 'axis':
+                kwargs = {'axis': -1}
+            else:
+                kwargs = {'axes': (-1,)}
+
+            for each_effort in ('FFTW_ESTIMATE', 'FFTW_MEASURE', 
+                    'FFTW_PATIENT', 'FFTW_EXHAUSTIVE'):
+                
+                kwargs['planner_effort'] = each_effort
+                
+                self.validate(
+                        dtype_tuple[1], test_shape, dtype, s, kwargs)
+
+            kwargs['planner_effort'] = 'garbage'
+
+            self.assertRaisesRegex(ValueError, 'Invalid planner effort',
+                    self.validate, 
+                    *(dtype_tuple[1], test_shape, dtype, s, kwargs))
+
+    def test_threads_arg(self):
+        '''Test the threads argument
+        '''
+        dtype_tuple = io_dtypes[functions[self.func]]
+        test_shape = (16,)
+        
+        for dtype in dtype_tuple[0]:
+            s = None
+            if self.axes_kw == 'axis':
+                kwargs = {'axis': -1}
+            else:
+                kwargs = {'axes': (-1,)}
+
+            self.check_arg('threads', (1, 2, 5, 10), 
+                        dtype_tuple[1], test_shape, dtype, s, kwargs)
+
+            kwargs['threads'] = 'bleh'
+            
+            # Should not work
+            self.assertRaises(TypeError,
+                    self.validate, 
+                    *(dtype_tuple[1], test_shape, dtype, s, kwargs))
+
+
+    def test_overwrite_input(self):
+        '''Test the overwrite_input flag
+        '''
+        dtype_tuple = io_dtypes[functions[self.func]]
+        
+        for dtype in dtype_tuple[0]:
+            for test_shape, s, _kwargs in self.test_data:
+                s = None
+
+                kwargs = _kwargs.copy()
+                self.validate(dtype_tuple[1], test_shape, dtype, s, kwargs)
+                
+                self.check_arg('overwrite_input', (True, False),
+                        dtype_tuple[1], test_shape, dtype, s, kwargs)
+
+    def test_input_maintained(self):
+        '''Test to make sure the input is maintained by default.
+        '''
+        dtype_tuple = io_dtypes[functions[self.func]]
+        for dtype in dtype_tuple[0]:
+            for test_shape, s, kwargs in self.test_data:
+
+                input_array = dtype_tuple[1](test_shape, dtype)
+
+                orig_input_array = input_array.copy()
+                
+                getattr(interfaces.numpy_fft, self.func)(
+                        input_array, s, **kwargs)
+
+                self.assertTrue(
+                        numpy.alltrue(input_array == orig_input_array))
+
+
+class InterfacesNumpyFFTTestIFFT(InterfacesNumpyFFTTestFFT):
+    func = 'ifft'
+
+class InterfacesNumpyFFTTestRFFT(InterfacesNumpyFFTTestFFT):
+    func = 'rfft'
+
+class InterfacesNumpyFFTTestIRFFT(InterfacesNumpyFFTTestFFT):
+    func = 'irfft'
+    realinv = True    
+
+class InterfacesNumpyFFTTestFFT2(InterfacesNumpyFFTTestFFT):
+    axes_kw = 'axes'    
+    func = 'ifft2'
+    test_shapes = (
+            ((128, 64), {'axes': None}),
+            ((128, 32), {'axes': None}),
+            ((128, 32, 4), {'axes': (0, 2)}),
+            ((59, 100), {'axes': (-2, -1)}),
+            ((64, 128, 16), {'axes': (0, 2)}),
+            ((4, 6, 8, 4), {'axes': (0, 3)}),
+            )
+    
+    invalid_args = (
+            ((100,), ((100, 200),), ValueError, 'Shape error'),
+            ((100, 200), ((100, 200, 100),), ValueError, 'Shape error'),
+            ((100,), ((100, 200), (-3, -2, -1)), ValueError, 'Shape error'),
+            ((100, 200), (100, -1), TypeError, ''),
+            ((100, 200), ((100, 200), (-3, -2)), IndexError, 'Invalid axes'),
+            ((100, 200), ((100,), (-3,)), IndexError, 'Invalid axes'))
+
+
+class InterfacesNumpyFFTTestIFFT2(InterfacesNumpyFFTTestFFT2):
+    func = 'ifft2'
+
+class InterfacesNumpyFFTTestRFFT2(InterfacesNumpyFFTTestFFT2):
+    func = 'rfft2'
+
+class InterfacesNumpyFFTTestIRFFT2(InterfacesNumpyFFTTestFFT2):
+    func = 'irfft2'
+    realinv = True    
+
+class InterfacesNumpyFFTTestFFTN(InterfacesNumpyFFTTestFFT2):
+    func = 'ifftn'
+    test_shapes = (
+            ((128, 32, 4), {'axes': None}),
+            ((64, 128, 16), {'axes': (0, 1, 2)}),
+            ((4, 6, 8, 4), {'axes': (0, 3, 1)}),
+            ((4, 6, 8, 4), {'axes': (0, 3, 1, 2)}),
+            )
+
+class InterfacesNumpyFFTTestIFFTN(InterfacesNumpyFFTTestFFTN):
+    func = 'ifftn'
+
+class InterfacesNumpyFFTTestRFFTN(InterfacesNumpyFFTTestFFTN):
+    func = 'rfftn'
+
+class InterfacesNumpyFFTTestIRFFTN(InterfacesNumpyFFTTestFFTN):
+    func = 'irfftn'
+    realinv = True    
+
+
+test_cases = (
+        InterfacesNumpyFFTTestModule,
+        InterfacesNumpyFFTTestFFT,
+        InterfacesNumpyFFTTestIFFT,
+        InterfacesNumpyFFTTestRFFT,
+        InterfacesNumpyFFTTestIRFFT,
+        InterfacesNumpyFFTTestFFT2,
+        InterfacesNumpyFFTTestIFFT2,
+        InterfacesNumpyFFTTestRFFT2,
+        InterfacesNumpyFFTTestIRFFT2,
+        InterfacesNumpyFFTTestFFTN,
+        InterfacesNumpyFFTTestIFFTN,
+        InterfacesNumpyFFTTestRFFTN,
+        InterfacesNumpyFFTTestIRFFTN)
+
+#test_set = {'InterfacesNumpyFFTTestIRFFT2': ('test_bigger_s',)}
+test_set = None
+
+if __name__ == '__main__':
+
+    run_test_suites(test_cases, test_set)
diff --git a/test/test_pyfftw_real_backward.py b/test/test_pyfftw_real_backward.py
new file mode 100644
index 0000000..359fd42
--- /dev/null
+++ b/test/test_pyfftw_real_backward.py
@@ -0,0 +1,330 @@
+# Copyright 2012 Knowledge Economy Developments Ltd
+# 
+# Henry Gomersall
+# heng at kedevelopments.co.uk
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+from pyfftw import FFTW, n_byte_align, n_byte_align_empty, forget_wisdom
+import numpy
+from timeit import Timer
+import time
+
+from .test_pyfftw_base import run_test_suites
+
+import unittest
+
+from .test_pyfftw_complex import Complex64FFTWTest
+
+class RealBackwardDoubleFFTWTest(Complex64FFTWTest):
+    
+    def setUp(self):
+
+        self.input_dtype = numpy.complex128
+        self.output_dtype = numpy.float64
+        self.np_fft_comparison = numpy.fft.irfft
+
+        self.direction = 'FFTW_BACKWARD'
+    
+    def make_shapes(self):
+
+        self.input_shapes = {
+                'small_1d': (9,),
+                '1d': (1025,),
+                '2d': (256, 1025),
+                '3d': (5, 256, 1025)}
+
+        self.output_shapes = {
+                'small_1d': (16,),
+                '1d': (2048,),
+                '2d': (256, 2048),
+                '3d': (5, 256, 2048)}
+
+    def create_test_arrays(self, input_shape, output_shape, axes=None):
+
+        a = self.input_dtype(numpy.random.randn(*input_shape)
+                +1j*numpy.random.randn(*input_shape))
+        
+        b = self.output_dtype(numpy.random.randn(*output_shape))
+
+        # We fill a by doing the forward FFT from b.
+        # This means that the relevant bits that should be purely
+        # real will be (for example the zero freq component). 
+        # This is easier than writing a complicate system to work it out.
+        try:
+            if axes == None:
+                fft = FFTW(b,a,direction='FFTW_FORWARD')
+            else:
+                fft = FFTW(b,a,direction='FFTW_FORWARD', axes=axes)
+
+            b[:] = self.output_dtype(numpy.random.randn(*output_shape))
+            
+            fft.execute()
+            
+            scaling = numpy.prod(numpy.array(a.shape))
+            a = self.input_dtype(a/scaling)
+
+        except ValueError:
+            # In this case, we assume that it was meant to error,
+            # so we can return what we want.
+            pass
+
+        b = self.output_dtype(numpy.random.randn(*output_shape))
+        
+        return a, b
+
+    def run_validate_fft(self, a, b, axes, fft=None, ifft=None, 
+            force_unaligned_data=False, create_array_copies=True,
+            threads=1, flags=('FFTW_ESTIMATE',)):
+        ''' *** EVERYTHING IS FLIPPED AROUND BECAUSE WE ARE
+        VALIDATING AN INVERSE FFT ***
+        
+        Run a validation of the FFTW routines for the passed pair
+        of arrays, a and b, and the axes argument.
+
+        a and b are assumed to be the same shape (but not necessarily
+        the same layout in memory).
+
+        fft and ifft, if passed, should be instantiated FFTW objects.
+
+        If force_unaligned_data is True, the flag FFTW_UNALIGNED
+        will be passed to the fftw routines.
+        '''
+        if create_array_copies:
+            # Don't corrupt the original mutable arrays
+            a = a.copy()
+            b = b.copy()
+
+        a_orig = a.copy()
+
+        flags = list(flags)
+
+        if force_unaligned_data:
+            flags.append('FFTW_UNALIGNED')
+
+        if ifft == None:
+            ifft = FFTW(a, b, axes=axes, direction='FFTW_BACKWARD',
+                    flags=flags, threads=threads)
+        else:
+            ifft.update_arrays(a,b)
+
+        if fft == None:
+            fft = FFTW(b, a, axes=axes, direction='FFTW_FORWARD',
+                    flags=flags, threads=threads)
+        else:
+            fft.update_arrays(b,a)
+
+
+        a[:] = a_orig
+        # Test the inverse FFT by comparing it to the result from numpy.fft
+        ifft.execute()
+
+        a[:] = a_orig
+        ref_b = self.reference_fftn(a, axes=axes)
+
+        # The scaling is the product of the lengths of the fft along
+        # the axes along which the fft is taken.
+        scaling = numpy.prod(numpy.array(b.shape)[list(axes)])
+        self.assertEqual(ifft.N, scaling)
+        self.assertEqual(fft.N, scaling)
+
+        # This is actually quite a poor relative error, but it still
+        # sometimes fails. I assume that numpy.fft has different internals
+        # to fftw.
+        self.assertTrue(numpy.allclose(b/scaling, ref_b, rtol=1e-2, atol=1e-3))
+        
+        # Test the FFT by comparing the result to the starting
+        # value (which is scaled as per FFTW being unnormalised).
+        fft.execute()
+
+        self.assertTrue(numpy.allclose(a/scaling, a_orig, rtol=1e-2, atol=1e-3))
+        return fft, ifft
+
+    def test_time_with_array_update(self):
+        in_shape = self.input_shapes['2d']
+        out_shape = self.output_shapes['2d']
+        
+        axes=(-1,)
+        a, b = self.create_test_arrays(in_shape, out_shape)
+
+        fft, ifft = self.run_validate_fft(a, b, axes)
+
+        def fftw_callable():
+            fft.update_arrays(b,a)
+            fft.execute()
+
+        self.timer_routine(fftw_callable, 
+                lambda: self.np_fft_comparison(a))
+
+        self.assertTrue(True)
+    
+    def reference_fftn(self, a, axes):
+        # This needs to be an inverse
+        return numpy.fft.irfftn(a, axes=axes)
+    
+    def test_wrong_direction_fail(self):
+        in_shape = self.input_shapes['2d']
+        out_shape = self.output_shapes['2d']
+        
+        axes=(-1,)
+        a, b = self.create_test_arrays(in_shape, out_shape)
+
+        with self.assertRaisesRegex(ValueError, 'Invalid direction'):
+            FFTW(a, b, direction='FFTW_FORWARD')
+
+    def test_planning_time_limit(self):
+        in_shape = self.input_shapes['1d']
+        out_shape = self.output_shapes['1d']
+
+        axes=(0,)
+        a, b = self.create_test_arrays(in_shape, out_shape)
+
+        # run this a few times
+        runs = 10
+        t1 = time.time()
+        for n in range(runs):
+            forget_wisdom()
+            fft = FFTW(b, a, axes=axes)
+
+        unlimited_time = (time.time() - t1)/runs
+
+        time_limit = (unlimited_time)/8
+
+        # Now do it again but with an upper limit on the time
+        t1 = time.time()
+        for n in range(runs):
+            forget_wisdom()
+            fft = FFTW(b, a, axes=axes, planning_timelimit=time_limit)
+
+        limited_time = (time.time() - t1)/runs
+
+        import sys
+        if sys.platform == 'win32':
+            # Give a 4x margin on windows. The timers are low
+            # precision and FFTW seems to take longer anyway
+            self.assertTrue(limited_time < time_limit*4)
+        else:
+            # Otherwise have a 2x margin
+            self.assertTrue(limited_time < time_limit*2)
+
+    def test_invalid_planning_time_limit(self):
+        in_shape = self.input_shapes['1d']
+        out_shape = self.output_shapes['1d']
+
+        axes=(0,)
+        a, b = self.create_test_arrays(in_shape, out_shape)
+
+        self.assertRaisesRegex(TypeError, 'Invalid planning timelimit',
+                FFTW, *(b, a, axes), **{'planning_timelimit': 'foo'})
+
+    def test_default_args(self):
+        in_shape = self.input_shapes['2d']
+        out_shape = self.output_shapes['2d']
+        
+        a, b = self.create_test_arrays(in_shape, out_shape)
+        
+        # default args should fail for backwards transforms
+        # (as the default is FFTW_FORWARD)
+        with self.assertRaisesRegex(ValueError, 'Invalid direction'):
+            FFTW(a, b)
+
+    def test_non_contiguous_2d(self):
+        in_shape = self.input_shapes['2d']
+        out_shape = self.output_shapes['2d']
+        
+        axes=(-2,-1)
+        a, b = self.create_test_arrays(in_shape, out_shape)
+
+        # Some arbitrary and crazy slicing
+        a_sliced = a[20:146:2, 100:786:7]
+        # b needs to be compatible
+        b_sliced = b[12:200:3, 300:2041:9]
+
+        self.run_validate_fft(a_sliced, b_sliced, axes, create_array_copies=False)
+
+    @unittest.skipIf(numpy.version.version <= '1.6.2',
+            'numpy.fft <= 1.6.2 has a bug that causes this test to fail.')
+    def test_non_contiguous_2d_in_3d(self):
+        in_shape = (256, 4, 1025)
+        out_shape = (256, 4, 2048)
+        axes=(0,2)
+        a, b = self.create_test_arrays(in_shape, out_shape)
+
+        # Some arbitrary and crazy slicing
+        a_sliced = a[20:146:2, :, 100:786:7]
+        # b needs to be compatible
+        b_sliced = b[12:200:3, :, 300:2041:9]
+        
+        # The data doesn't work, so we need to generate it for the 
+        # correct size
+        a_, b_ = self.create_test_arrays(a_sliced.shape, b_sliced.shape, axes=axes)
+
+        # And then copy it into the non contiguous array
+        a_sliced[:] = a_
+        b_sliced[:] = b_
+        
+        self.run_validate_fft(a_sliced, b_sliced, axes, create_array_copies=False)
+
+    @unittest.skipIf(numpy.version.version <= '1.6.2',
+            'numpy.fft <= 1.6.2 has a bug that causes this test to fail.')
+    def test_non_monotonic_increasing_axes(self):
+        super(RealBackwardDoubleFFTWTest, 
+                self).test_non_monotonic_increasing_axes()
+
+class RealBackwardSingleFFTWTest(RealBackwardDoubleFFTWTest):
+    
+    def setUp(self):
+
+        self.input_dtype = numpy.complex64
+        self.output_dtype = numpy.float32 
+        self.np_fft_comparison = numpy.fft.irfft
+
+        self.direction = 'FFTW_BACKWARD'        
+
+class RealBackwardLongDoubleFFTWTest(RealBackwardDoubleFFTWTest):
+    
+    def setUp(self):
+
+        self.input_dtype = numpy.clongdouble
+        self.output_dtype = numpy.longdouble 
+        self.np_fft_comparison = numpy.fft.irfft
+
+        self.direction = 'FFTW_BACKWARD'        
+
+    def reference_fftn(self, a, axes):
+
+        a = numpy.complex128(a)
+        return numpy.fft.irfftn(a, axes=axes)
+
+    @unittest.skip('numpy.fft has issues with this dtype.')
+    def test_time(self):
+        pass
+
+    @unittest.skip('numpy.fft has issues with this dtype.')    
+    def test_time_with_array_update(self):
+        pass
+
+test_cases = (
+        RealBackwardDoubleFFTWTest,
+        RealBackwardSingleFFTWTest,
+        RealBackwardLongDoubleFFTWTest,)
+
+test_set = None
+
+if __name__ == '__main__':
+
+    run_test_suites(test_cases, test_set)
+
+del Complex64FFTWTest
+
diff --git a/test/test_pyfftw_real_forward.py b/test/test_pyfftw_real_forward.py
new file mode 100644
index 0000000..c53d6f9
--- /dev/null
+++ b/test/test_pyfftw_real_forward.py
@@ -0,0 +1,145 @@
+# Copyright 2012 Knowledge Economy Developments Ltd
+# 
+# Henry Gomersall
+# heng at kedevelopments.co.uk
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+from pyfftw import FFTW, n_byte_align, n_byte_align_empty
+import numpy
+from timeit import Timer
+
+from .test_pyfftw_base import run_test_suites
+
+import unittest
+
+from .test_pyfftw_complex import Complex64FFTWTest
+
+class RealForwardDoubleFFTWTest(Complex64FFTWTest):
+    
+    def setUp(self):
+
+        self.input_dtype = numpy.float64
+        self.output_dtype = numpy.complex128 
+        self.np_fft_comparison = numpy.fft.rfft
+
+        self.direction = 'FFTW_FORWARD'
+    
+    def make_shapes(self):
+        self.input_shapes = {
+                'small_1d': (16,),
+                '1d': (2048,),
+                '2d': (256, 2048),
+                '3d': (5, 256, 2048)}
+
+        self.output_shapes = {
+                'small_1d': (9,),
+                '1d': (1025,),
+                '2d': (256, 1025),
+                '3d': (5, 256, 1025)}
+
+    def create_test_arrays(self, input_shape, output_shape, axes=None):
+        a = self.input_dtype(numpy.random.randn(*input_shape))
+
+        b = self.output_dtype(numpy.random.randn(*output_shape)
+                +1j*numpy.random.randn(*output_shape))
+
+        return a, b
+    
+    def reference_fftn(self, a, axes):
+
+        return numpy.fft.rfftn(a, axes=axes)
+    
+    def test_wrong_direction_fail(self):
+        in_shape = self.input_shapes['2d']
+        out_shape = self.output_shapes['2d']
+        
+        axes=(-1,)
+        a, b = self.create_test_arrays(in_shape, out_shape)
+
+        with self.assertRaisesRegex(ValueError, 'Invalid direction'):
+            FFTW(a, b, direction='FFTW_BACKWARD')
+
+    def test_non_contiguous_2d(self):
+        in_shape = self.input_shapes['2d']
+        out_shape = self.output_shapes['2d']
+        
+        axes=(-2,-1)
+        a, b = self.create_test_arrays(in_shape, out_shape)
+
+        # Some arbitrary and crazy slicing
+        a_sliced = a[12:200:3, 300:2041:9]
+        # b needs to be compatible
+        b_sliced = b[20:146:2, 100:786:7]
+
+        self.run_validate_fft(a_sliced, b_sliced, axes, create_array_copies=False)
+
+    def test_non_contiguous_2d_in_3d(self):
+        in_shape = (256, 4, 2048)
+        out_shape = in_shape
+        axes=(0,2)
+        a, b = self.create_test_arrays(in_shape, out_shape)
+
+        # Some arbitrary and crazy slicing
+        a_sliced = a[12:200:3, :, 300:2041:9]
+        # b needs to be compatible
+        b_sliced = b[20:146:2, :, 100:786:7]
+
+        self.run_validate_fft(a_sliced, b_sliced, axes, create_array_copies=False)
+
+class RealForwardSingleFFTWTest(RealForwardDoubleFFTWTest):
+    
+    def setUp(self):
+
+        self.input_dtype = numpy.float32
+        self.output_dtype = numpy.complex64
+        self.np_fft_comparison = numpy.fft.rfft        
+        
+        self.direction = 'FFTW_FORWARD'
+
+class RealForwardLongDoubleFFTWTest(RealForwardDoubleFFTWTest):
+    
+    def setUp(self):
+
+        self.input_dtype = numpy.longdouble
+        self.output_dtype = numpy.clongdouble 
+        self.np_fft_comparison = numpy.fft.rfft
+
+        self.direction = 'FFTW_FORWARD'
+
+    @unittest.skip('numpy.fft has issues with this dtype.')
+    def test_time(self):
+        pass
+
+    @unittest.skip('numpy.fft has issues with this dtype.')    
+    def test_time_with_array_update(self):
+        pass
+
+    def reference_fftn(self, a, axes):
+
+        a = numpy.float64(a)
+        return numpy.fft.rfftn(a, axes=axes)
+
+test_cases = (
+        RealForwardDoubleFFTWTest,
+        RealForwardSingleFFTWTest,
+        RealForwardLongDoubleFFTWTest,)
+
+test_set = None
+
+if __name__ == '__main__':
+
+    run_test_suites(test_cases, test_set)
+
+del Complex64FFTWTest
diff --git a/test/test_pyfftw_scipy_interface.py b/test/test_pyfftw_scipy_interface.py
new file mode 100644
index 0000000..293ca42
--- /dev/null
+++ b/test/test_pyfftw_scipy_interface.py
@@ -0,0 +1,122 @@
+# Copyright 2012 Knowledge Economy Developments Ltd
+# 
+# Henry Gomersall
+# heng at kedevelopments.co.uk
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+from pyfftw.interfaces import scipy_fftpack
+import pyfftw
+import numpy
+import scipy
+import scipy.fftpack
+import scipy.signal
+
+import unittest
+from .test_pyfftw_base import run_test_suites
+
+
+'''pyfftw.interfaces.scipy_fftpack just wraps pyfftw.interfaces.numpy_fft.
+
+All the tests here just check that the call is made correctly.
+'''
+
+funcs = ('fft','ifft', 'fft2', 'ifft2', 'fftn', 'ifftn', 
+           'rfft', 'irfft')
+
+acquired_names = ('dct', 'idct', 'diff', 'tilbert', 'itilbert', 'hilbert', 
+        'ihilbert', 'cs_diff', 'sc_diff', 'ss_diff', 'cc_diff', 'shift', 
+        'fftshift', 'ifftshift', 'fftfreq', 'rfftfreq', 'convolve', 
+        '_fftpack')
+
+def numpy_fft_replacement(a, s, axes, overwrite_input, planner_effort, 
+        threads, auto_align_input, auto_contiguous):
+
+    return (a, s, axes, overwrite_input, planner_effort, 
+        threads, auto_align_input, auto_contiguous)
+
+class InterfacesScipyFFTPackTestFFT(unittest.TestCase):
+    ''' A really simple test suite to check simple implementation.
+    '''
+
+    def test_scipy_overwrite(self):
+        scipy_fftn = scipy.signal.signaltools.fftn
+        scipy_ifftn = scipy.signal.signaltools.ifftn
+
+        a = pyfftw.n_byte_align_empty((128, 64), 16, dtype='complex128')
+        b = pyfftw.n_byte_align_empty((128, 64), 16, dtype='complex128')
+
+        a[:] = (numpy.random.randn(*a.shape) + 
+                1j*numpy.random.randn(*a.shape))
+        b[:] = (numpy.random.randn(*b.shape) + 
+                1j*numpy.random.randn(*b.shape))
+
+
+        scipy_c = scipy.signal.fftconvolve(a, b)
+
+        scipy.signal.signaltools.fftn = scipy_fftpack.fftn
+        scipy.signal.signaltools.ifftn = scipy_fftpack.ifftn
+
+        scipy_replaced_c = scipy.signal.fftconvolve(a, b)
+
+        self.assertTrue(numpy.allclose(scipy_c, scipy_replaced_c))
+
+        scipy.signal.signaltools.fftn = scipy_fftn
+        scipy.signal.signaltools.ifftn = scipy_ifftn
+
+    def test_funcs(self):
+
+        for each_func in funcs:
+            func_being_replaced = getattr(scipy_fftpack, each_func)
+
+            #create args (8 of them)
+            args = []
+            for n in range(8):
+                args.append(object())
+
+            args = tuple(args)
+
+            try:
+                setattr(scipy_fftpack, each_func, 
+                        numpy_fft_replacement)
+
+                return_args = getattr(scipy_fftpack, each_func)(*args)
+                for n, each_arg in enumerate(args):
+                    # Check that what comes back is what is sent
+                    # (which it should be)
+                    self.assertIs(each_arg, return_args[n])
+            except:
+                raise
+
+            finally:
+                setattr(scipy_fftpack, each_func, 
+                        func_being_replaced)
+
+    def test_acquired_names(self):
+        for each_name in acquired_names: 
+
+            fftpack_attr = getattr(scipy.fftpack, each_name)
+            acquired_attr = getattr(scipy_fftpack, each_name)
+
+            self.assertIs(fftpack_attr, acquired_attr)
+
+
+test_cases = (
+        InterfacesScipyFFTPackTestFFT,)
+
+test_set = None
+
+if __name__ == '__main__':
+
+    run_test_suites(test_cases, test_set)
diff --git a/test/test_pyfftw_utils.py b/test/test_pyfftw_utils.py
new file mode 100644
index 0000000..e458a88
--- /dev/null
+++ b/test/test_pyfftw_utils.py
@@ -0,0 +1,83 @@
+# Copyright 2012 Knowledge Economy Developments Ltd
+# 
+# Henry Gomersall
+# heng at kedevelopments.co.uk
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+
+from .test_pyfftw_base import run_test_suites
+
+import unittest
+import pyfftw
+import platform
+import os
+
+def get_cpus_info():
+    
+    if 'Linux' in platform.system():
+        # A simple /proc/cpuinfo parser
+        with open(os.path.join('/', 'proc','cpuinfo'), 'r') as f:
+
+            cpus_info = []
+            idx = 0
+            for line in f.readlines():
+                if line.find(':') < 0:
+                    idx += 1
+                    continue
+
+                key, values = [each.strip() for each in line.split(':')]
+
+                try:
+                    cpus_info[idx][key] = values
+                except IndexError:
+                    cpus_info.append({key: values})
+
+    else:
+        cpus_info = None
+
+    return cpus_info
+
+class UtilsTest(unittest.TestCase):
+
+    def setUp(self):
+
+        return
+
+    def tearDown(self):
+        
+        return
+    
+    @unittest.skipIf('Linux' not in platform.system(),
+            'Skipping as we only have it set up for Linux at present.')
+    def test_get_alignment(self):
+        cpus_info = get_cpus_info()
+        
+        for each_cpu in cpus_info:
+            if 'avx' in each_cpu['flags']:
+                self.assertTrue(pyfftw.simd_alignment == 32)
+            elif 'sse' in each_cpu['flags']:
+                self.assertTrue(pyfftw.simd_alignment == 16)
+            else:
+                self.assertTrue(pyfftw.simd_alignment == 1)
+
+test_cases = (
+        UtilsTest,)
+
+test_set = None
+
+if __name__ == '__main__':
+
+    run_test_suites(test_cases, test_set)
+
diff --git a/test/test_pyfftw_wisdom.py b/test/test_pyfftw_wisdom.py
new file mode 100644
index 0000000..849f2cc
--- /dev/null
+++ b/test/test_pyfftw_wisdom.py
@@ -0,0 +1,81 @@
+# Copyright 2012 Knowledge Economy Developments Ltd
+# 
+# Henry Gomersall
+# heng at kedevelopments.co.uk
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+from pyfftw import (
+        FFTW, n_byte_align_empty, 
+        export_wisdom, import_wisdom, forget_wisdom)
+
+from .test_pyfftw_base import run_test_suites
+
+import numpy
+import pickle
+
+import unittest
+
+class FFTWWisdomTest(unittest.TestCase):
+    
+    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):
+            self.assertNotEqual(before_wisdom[n], after_wisdom[n])
+    
+    def test_import(self):
+
+        forget_wisdom()
+
+        self.generate_wisdom()
+
+        after_wisdom = export_wisdom()
+
+        forget_wisdom()
+        before_wisdom = export_wisdom()
+
+        success = import_wisdom(after_wisdom)
+
+        for n in range(0,2):
+            self.assertNotEqual(before_wisdom[n], after_wisdom[n])
+
+        self.assertEqual(success, (True, True, True))
+
+
+test_cases = (
+        FFTWWisdomTest,)
+
+test_set = None
+
+if __name__ == '__main__':
+
+    run_test_suites(test_cases, test_set)
+

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/pyfftw.git



More information about the debian-science-commits mailing list