[pyoperators] 01/03: Imported Upstream version 0.13.6

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Fri Jul 3 07:19:07 UTC 2015


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

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

commit 6ff915e3a47f239e4346f78a4b85ac388efe52d3
Author: Ghislain Antony Vaillant <ghisvail at gmail.com>
Date:   Fri Jul 3 08:00:48 2015 +0100

    Imported Upstream version 0.13.6
---
 .gitignore                                  |  11 -
 LICENCE_FR                                  | 519 ----------------------------
 LICENSE                                     | 515 ---------------------------
 MANIFEST.in                                 |   3 -
 PKG-INFO                                    | 128 +++++++
 pyoperators/{__init__.py.in => __init__.py} |   2 +
 pyoperators/fft.py                          |   2 +-
 pyoperators/linear.py                       |   9 +-
 pyoperators/utils/misc.py                   | 176 +++++++++-
 test/__init__.py                            |   0
 test/common.py                              | 168 ---------
 test/test_broadcastingoperators.py          |   4 +-
 test/test_utils.py                          | 148 +++++++-
 13 files changed, 428 insertions(+), 1257 deletions(-)

diff --git a/.gitignore b/.gitignore
deleted file mode 100644
index 3def2b9..0000000
--- a/.gitignore
+++ /dev/null
@@ -1,11 +0,0 @@
-*.pyc
-*.so
-.coverage
-MANIFEST
-build
-dist
-_site
-htmlcov
-pyoperators/__init__.py
-pyoperators/utils/ufuncs.c
-__pycache__
diff --git a/LICENCE_FR b/LICENCE_FR
deleted file mode 100644
index 355f45e..0000000
--- a/LICENCE_FR
+++ /dev/null
@@ -1,519 +0,0 @@
-
-CONTRAT DE LICENCE DE LOGICIEL LIBRE CeCILL-B
-
-
-    Avertissement
-
-Ce contrat est une licence de logiciel libre issue d'une concertation
-entre ses auteurs afin que le respect de deux grands principes pr�side �
-sa r�daction:
-
-    * d'une part, le respect des principes de diffusion des logiciels
-      libres: acc�s au code source, droits �tendus conf�r�s aux
-      utilisateurs,
-    * d'autre part, la d�signation d'un droit applicable, le droit
-      fran�ais, auquel elle est conforme, tant au regard du droit de la
-      responsabilit� civile que du droit de la propri�t� intellectuelle
-      et de la protection qu'il offre aux auteurs et titulaires des
-      droits patrimoniaux sur un logiciel.
-
-Les auteurs de la licence CeCILL-B (pour Ce[a] C[nrs] I[nria] L[ogiciel]
-L[ibre]) sont:
-
-Commissariat � l'Energie Atomique - CEA, �tablissement public de
-recherche � caract�re scientifique, technique et industriel, dont le
-si�ge est situ� 25 rue Leblanc, immeuble Le Ponant D, 75015 Paris.
-
-Centre National de la Recherche Scientifique - CNRS, �tablissement
-public � caract�re scientifique et technologique, dont le si�ge est
-situ� 3 rue Michel-Ange, 75794 Paris cedex 16.
-
-Institut National de Recherche en Informatique et en Automatique -
-INRIA, �tablissement public � caract�re scientifique et technologique,
-dont le si�ge est situ� Domaine de Voluceau, Rocquencourt, BP 105, 78153
-Le Chesnay cedex.
-
-
-    Pr�ambule
-
-Ce contrat est une licence de logiciel libre dont l'objectif est de
-conf�rer aux utilisateurs une tr�s large libert� de modification et de
-redistribution du logiciel r�gi par cette licence.
-
-L'exercice de cette libert� est assorti d'une obligation forte de
-citation � la charge de ceux qui distribueraient un logiciel incorporant
-un logiciel r�gi par la pr�sente licence afin d'assurer que les
-contributions de tous soient correctement identifi�es et reconnues.
-
-L'accessibilit� au code source et les droits de copie, de modification
-et de redistribution qui d�coulent de ce contrat ont pour contrepartie
-de n'offrir aux utilisateurs qu'une garantie limit�e et de ne faire
-peser sur l'auteur du logiciel, le titulaire des droits patrimoniaux et
-les conc�dants successifs qu'une responsabilit� restreinte.
-
-A cet �gard l'attention de l'utilisateur est attir�e sur les risques
-associ�s au chargement, � l'utilisation, � la modification et/ou au
-d�veloppement et � la reproduction du logiciel par l'utilisateur �tant
-donn� sa sp�cificit� de logiciel libre, qui peut le rendre complexe �
-manipuler et qui le r�serve donc � des d�veloppeurs ou des
-professionnels avertis poss�dant des connaissances informatiques
-approfondies. Les utilisateurs sont donc invit�s � charger et tester
-l'ad�quation du logiciel � leurs besoins dans des conditions permettant
-d'assurer la s�curit� de leurs syst�mes et/ou de leurs donn�es et, plus
-g�n�ralement, � l'utiliser et l'exploiter dans les m�mes conditions de
-s�curit�. Ce contrat peut �tre reproduit et diffus� librement, sous
-r�serve de le conserver en l'�tat, sans ajout ni suppression de clauses.
-
-Ce contrat est susceptible de s'appliquer � tout logiciel dont le
-titulaire des droits patrimoniaux d�cide de soumettre l'exploitation aux
-dispositions qu'il contient.
-
-
-    Article 1 - DEFINITIONS
-
-Dans ce contrat, les termes suivants, lorsqu'ils seront �crits avec une
-lettre capitale, auront la signification suivante:
-
-Contrat: d�signe le pr�sent contrat de licence, ses �ventuelles versions
-post�rieures et annexes.
-
-Logiciel: d�signe le logiciel sous sa forme de Code Objet et/ou de Code
-Source et le cas �ch�ant sa documentation, dans leur �tat au moment de
-l'acceptation du Contrat par le Licenci�.
-
-Logiciel Initial: d�signe le Logiciel sous sa forme de Code Source et
-�ventuellement de Code Objet et le cas �ch�ant sa documentation, dans
-leur �tat au moment de leur premi�re diffusion sous les termes du Contrat.
-
-Logiciel Modifi�: d�signe le Logiciel modifi� par au moins une
-Contribution.
-
-Code Source: d�signe l'ensemble des instructions et des lignes de
-programme du Logiciel et auquel l'acc�s est n�cessaire en vue de
-modifier le Logiciel.
-
-Code Objet: d�signe les fichiers binaires issus de la compilation du
-Code Source.
-
-Titulaire: d�signe le ou les d�tenteurs des droits patrimoniaux d'auteur
-sur le Logiciel Initial.
-
-Licenci�: d�signe le ou les utilisateurs du Logiciel ayant accept� le
-Contrat.
-
-Contributeur: d�signe le Licenci� auteur d'au moins une Contribution.
-
-Conc�dant: d�signe le Titulaire ou toute personne physique ou morale
-distribuant le Logiciel sous le Contrat.
-
-Contribution: d�signe l'ensemble des modifications, corrections,
-traductions, adaptations et/ou nouvelles fonctionnalit�s int�gr�es dans
-le Logiciel par tout Contributeur, ainsi que tout Module Interne.
-
-Module: d�signe un ensemble de fichiers sources y compris leur
-documentation qui permet de r�aliser des fonctionnalit�s ou services
-suppl�mentaires � ceux fournis par le Logiciel.
-
-Module Externe: d�signe tout Module, non d�riv� du Logiciel, tel que ce
-Module et le Logiciel s'ex�cutent dans des espaces d'adressage
-diff�rents, l'un appelant l'autre au moment de leur ex�cution.
-
-Module Interne: d�signe tout Module li� au Logiciel de telle sorte
-qu'ils s'ex�cutent dans le m�me espace d'adressage.
-
-Parties: d�signe collectivement le Licenci� et le Conc�dant.
-
-Ces termes s'entendent au singulier comme au pluriel.
-
-
-    Article 2 - OBJET
-
-Le Contrat a pour objet la concession par le Conc�dant au Licenci� d'une
-licence non exclusive, cessible et mondiale du Logiciel telle que
-d�finie ci-apr�s � l'article 5 pour toute la dur�e de protection des droits 
-portant sur ce Logiciel. 
-
-
-    Article 3 - ACCEPTATION
-
-3.1 L'acceptation par le Licenci� des termes du Contrat est r�put�e
-acquise du fait du premier des faits suivants:
-
-    * (i) le chargement du Logiciel par tout moyen notamment par
-      t�l�chargement � partir d'un serveur distant ou par chargement �
-      partir d'un support physique;
-    * (ii) le premier exercice par le Licenci� de l'un quelconque des
-      droits conc�d�s par le Contrat.
-
-3.2 Un exemplaire du Contrat, contenant notamment un avertissement
-relatif aux sp�cificit�s du Logiciel, � la restriction de garantie et �
-la limitation � un usage par des utilisateurs exp�riment�s a �t� mis �
-disposition du Licenci� pr�alablement � son acceptation telle que
-d�finie � l'article 3.1 ci dessus et le Licenci� reconna�t en avoir pris
-connaissance.
-
-
-    Article 4 - ENTREE EN VIGUEUR ET DUREE
-
-
-      4.1 ENTREE EN VIGUEUR
-
-Le Contrat entre en vigueur � la date de son acceptation par le Licenci�
-telle que d�finie en 3.1.
-
-
-      4.2 DUREE
-
-Le Contrat produira ses effets pendant toute la dur�e l�gale de
-protection des droits patrimoniaux portant sur le Logiciel.
-
-
-    Article 5 - ETENDUE DES DROITS CONCEDES
-
-Le Conc�dant conc�de au Licenci�, qui accepte, les droits suivants sur
-le Logiciel pour toutes destinations et pour la dur�e du Contrat dans
-les conditions ci-apr�s d�taill�es.
-
-Par ailleurs, si le Conc�dant d�tient ou venait � d�tenir un ou
-plusieurs brevets d'invention prot�geant tout ou partie des
-fonctionnalit�s du Logiciel ou de ses composants, il s'engage � ne pas
-opposer les �ventuels droits conf�r�s par ces brevets aux Licenci�s
-successifs qui utiliseraient, exploiteraient ou modifieraient le
-Logiciel. En cas de cession de ces brevets, le Conc�dant s'engage �
-faire reprendre les obligations du pr�sent alin�a aux cessionnaires.
-
-
-      5.1 DROIT D'UTILISATION
-
-Le Licenci� est autoris� � utiliser le Logiciel, sans restriction quant
-aux domaines d'application, �tant ci-apr�s pr�cis� que cela comporte:
-
-   1. la reproduction permanente ou provisoire du Logiciel en tout ou
-      partie par tout moyen et sous toute forme.
-
-   2. le chargement, l'affichage, l'ex�cution, ou le stockage du
-      Logiciel sur tout support.
-
-   3. la possibilit� d'en observer, d'en �tudier, ou d'en tester le
-      fonctionnement afin de d�terminer les id�es et principes qui sont
-      � la base de n'importe quel �l�ment de ce Logiciel; et ceci,
-      lorsque le Licenci� effectue toute op�ration de chargement,
-      d'affichage, d'ex�cution, de transmission ou de stockage du
-      Logiciel qu'il est en droit d'effectuer en vertu du Contrat.
-
-
-      5.2 DROIT D'APPORTER DES CONTRIBUTIONS
-
-Le droit d'apporter des Contributions comporte le droit de traduire,
-d'adapter, d'arranger ou d'apporter toute autre modification au Logiciel
-et le droit de reproduire le logiciel en r�sultant.
-
-Le Licenci� est autoris� � apporter toute Contribution au Logiciel sous
-r�serve de mentionner, de fa�on explicite, son nom en tant qu'auteur de
-cette Contribution et la date de cr�ation de celle-ci.
-
-
-      5.3 DROIT DE DISTRIBUTION
-
-Le droit de distribution comporte notamment le droit de diffuser, de
-transmettre et de communiquer le Logiciel au public sur tout support et
-par tout moyen ainsi que le droit de mettre sur le march� � titre
-on�reux ou gratuit, un ou des exemplaires du Logiciel par tout proc�d�.
-
-Le Licenci� est autoris� � distribuer des copies du Logiciel, modifi� ou
-non, � des tiers dans les conditions ci-apr�s d�taill�es.
-
-
-        5.3.1 DISTRIBUTION DU LOGICIEL SANS MODIFICATION
-
-Le Licenci� est autoris� � distribuer des copies conformes du Logiciel,
-sous forme de Code Source ou de Code Objet, � condition que cette
-distribution respecte les dispositions du Contrat dans leur totalit� et
-soit accompagn�e:
-
-   1. d'un exemplaire du Contrat,
-
-   2. d'un avertissement relatif � la restriction de garantie et de
-      responsabilit� du Conc�dant telle que pr�vue aux articles 8
-      et 9,
-
-et que, dans le cas o� seul le Code Objet du Logiciel est redistribu�,
-le Licenci� permette un acc�s effectif au Code Source complet du
-Logiciel pendant au moins toute la dur�e de sa distribution du Logiciel,
-�tant entendu que le co�t additionnel d'acquisition du Code Source ne
-devra pas exc�der le simple co�t de transfert des donn�es.
-
-
-        5.3.2 DISTRIBUTION DU LOGICIEL MODIFIE
-
-Lorsque le Licenci� apporte une Contribution au Logiciel, le Logiciel
-Modifi� peut �tre distribu� sous un contrat de licence autre que le
-pr�sent Contrat sous r�serve du respect des dispositions de l'article
-5.3.4.
-
-
-        5.3.3 DISTRIBUTION DES MODULES EXTERNES
-
-Lorsque le Licenci� a d�velopp� un Module Externe les conditions du
-Contrat ne s'appliquent pas � ce Module Externe, qui peut �tre distribu�
-sous un contrat de licence diff�rent.
-
-
-        5.3.4 CITATIONS
-
-Le Licenci� qui distribue un Logiciel Modifi� s'engage express�ment:
-
-   1. � indiquer dans sa documentation qu'il a �t� r�alis� � partir du
-      Logiciel r�gi par le Contrat, en reproduisant les mentions de
-      propri�t� intellectuelle du Logiciel,
-
-   2. � faire en sorte que l'utilisation du Logiciel, ses mentions de
-      propri�t� intellectuelle et le fait qu'il est r�gi par le Contrat
-      soient indiqu�s dans un texte facilement accessible depuis
-      l'interface du Logiciel Modifi�,
-
-   3. � mentionner, sur un site Web librement accessible d�crivant le
-      Logiciel Modifi�, et pendant au moins toute la dur�e de sa
-      distribution, qu'il a �t� r�alis� � partir du Logiciel r�gi par le
-      Contrat, en reproduisant les mentions de propri�t� intellectuelle
-      du Logiciel,
-
-   4. lorsqu'il le distribue � un tiers susceptible de distribuer
-      lui-m�me un Logiciel Modifi�, sans avoir � en distribuer le code
-      source, � faire ses meilleurs efforts pour que les obligations du
-      pr�sent article 5.3.4 soient reprises par le dit tiers.
-
-Lorsque le Logiciel modifi� ou non est distribu� avec un Module Externe
-qui a �t� con�u pour l'utiliser, le Licenci� doit soumettre le dit
-Module Externe aux obligations pr�c�dentes.
-
-
-        5.3.5 COMPATIBILITE AVEC LES LICENCES CeCILL et CeCILL-C
-
-Lorsqu'un Logiciel Modifi� contient une Contribution soumise au contrat
-de licence CeCILL, les stipulations pr�vues � l'article 5.3.4 sont 
-facultatives.
-
-Un Logiciel Modifi� peut �tre distribu� sous le contrat de licence
-CeCILL-C. Les stipulations pr�vues � l'article 5.3.4 sont alors 
-facultatives.
-
-
-    Article 6 - PROPRIETE INTELLECTUELLE
-
-
-      6.1 SUR LE LOGICIEL INITIAL
-
-Le Titulaire est d�tenteur des droits patrimoniaux sur le Logiciel
-Initial. Toute utilisation du Logiciel Initial est soumise au respect
-des conditions dans lesquelles le Titulaire a choisi de diffuser son
-oeuvre et nul autre n'a la facult� de modifier les conditions de
-diffusion de ce Logiciel Initial.
-
-Le Titulaire s'engage � ce que le Logiciel Initial reste au moins r�gi
-par le Contrat et ce, pour la dur�e vis�e � l'article 4.2.
-
-
-      6.2 SUR LES CONTRIBUTIONS
-
-Le Licenci� qui a d�velopp� une Contribution est titulaire sur celle-ci
-des droits de propri�t� intellectuelle dans les conditions d�finies par
-la l�gislation applicable.
-
-
-      6.3 SUR LES MODULES EXTERNES
-
-Le Licenci� qui a d�velopp� un Module Externe est titulaire sur celui-ci
-des droits de propri�t� intellectuelle dans les conditions d�finies par
-la l�gislation applicable et reste libre du choix du contrat r�gissant
-sa diffusion.
-
-
-      6.4 DISPOSITIONS COMMUNES
-
-Le Licenci� s'engage express�ment:
-
-   1. � ne pas supprimer ou modifier de quelque mani�re que ce soit les
-      mentions de propri�t� intellectuelle appos�es sur le Logiciel;
-
-   2. � reproduire � l'identique lesdites mentions de propri�t�
-      intellectuelle sur les copies du Logiciel modifi� ou non.
-
-Le Licenci� s'engage � ne pas porter atteinte, directement ou
-indirectement, aux droits de propri�t� intellectuelle du Titulaire et/ou
-des Contributeurs sur le Logiciel et � prendre, le cas �ch�ant, �
-l'�gard de son personnel toutes les mesures n�cessaires pour assurer le
-respect des dits droits de propri�t� intellectuelle du Titulaire et/ou
-des Contributeurs.
-
-
-    Article 7 - SERVICES ASSOCIES
-
-7.1 Le Contrat n'oblige en aucun cas le Conc�dant � la r�alisation de
-prestations d'assistance technique ou de maintenance du Logiciel.
-
-Cependant le Conc�dant reste libre de proposer ce type de services. Les
-termes et conditions d'une telle assistance technique et/ou d'une telle
-maintenance seront alors d�termin�s dans un acte s�par�. Ces actes de
-maintenance et/ou assistance technique n'engageront que la seule
-responsabilit� du Conc�dant qui les propose.
-
-7.2 De m�me, tout Conc�dant est libre de proposer, sous sa seule
-responsabilit�, � ses licenci�s une garantie, qui n'engagera que lui,
-lors de la redistribution du Logiciel et/ou du Logiciel Modifi� et ce,
-dans les conditions qu'il souhaite. Cette garantie et les modalit�s
-financi�res de son application feront l'objet d'un acte s�par� entre le
-Conc�dant et le Licenci�.
-
-
-    Article 8 - RESPONSABILITE
-
-8.1 Sous r�serve des dispositions de l'article 8.2, le Licenci� a la 
-facult�, sous r�serve de prouver la faute du Conc�dant concern�, de
-solliciter la r�paration du pr�judice direct qu'il subirait du fait du
-Logiciel et dont il apportera la preuve.
-
-8.2 La responsabilit� du Conc�dant est limit�e aux engagements pris en
-application du Contrat et ne saurait �tre engag�e en raison notamment:
-(i) des dommages dus � l'inex�cution, totale ou partielle, de ses
-obligations par le Licenci�, (ii) des dommages directs ou indirects
-d�coulant de l'utilisation ou des performances du Logiciel subis par le
-Licenci� et (iii) plus g�n�ralement d'un quelconque dommage indirect. En
-particulier, les Parties conviennent express�ment que tout pr�judice
-financier ou commercial (par exemple perte de donn�es, perte de
-b�n�fices, perte d'exploitation, perte de client�le ou de commandes,
-manque � gagner, trouble commercial quelconque) ou toute action dirig�e
-contre le Licenci� par un tiers, constitue un dommage indirect et
-n'ouvre pas droit � r�paration par le Conc�dant.
-
-
-    Article 9 - GARANTIE
-
-9.1 Le Licenci� reconna�t que l'�tat actuel des connaissances
-scientifiques et techniques au moment de la mise en circulation du
-Logiciel ne permet pas d'en tester et d'en v�rifier toutes les
-utilisations ni de d�tecter l'existence d'�ventuels d�fauts. L'attention
-du Licenci� a �t� attir�e sur ce point sur les risques associ�s au
-chargement, � l'utilisation, la modification et/ou au d�veloppement et �
-la reproduction du Logiciel qui sont r�serv�s � des utilisateurs avertis.
-
-Il rel�ve de la responsabilit� du Licenci� de contr�ler, par tous
-moyens, l'ad�quation du produit � ses besoins, son bon fonctionnement et
-de s'assurer qu'il ne causera pas de dommages aux personnes et aux biens.
-
-9.2 Le Conc�dant d�clare de bonne foi �tre en droit de conc�der
-l'ensemble des droits attach�s au Logiciel (comprenant notamment les
-droits vis�s � l'article 5).
-
-9.3 Le Licenci� reconna�t que le Logiciel est fourni "en l'�tat" par le
-Conc�dant sans autre garantie, expresse ou tacite, que celle pr�vue �
-l'article 9.2 et notamment sans aucune garantie sur sa valeur commerciale,
-son caract�re s�curis�, innovant ou pertinent.
-
-En particulier, le Conc�dant ne garantit pas que le Logiciel est exempt
-d'erreur, qu'il fonctionnera sans interruption, qu'il sera compatible
-avec l'�quipement du Licenci� et sa configuration logicielle ni qu'il
-remplira les besoins du Licenci�.
-
-9.4 Le Conc�dant ne garantit pas, de mani�re expresse ou tacite, que le
-Logiciel ne porte pas atteinte � un quelconque droit de propri�t�
-intellectuelle d'un tiers portant sur un brevet, un logiciel ou sur tout
-autre droit de propri�t�. Ainsi, le Conc�dant exclut toute garantie au
-profit du Licenci� contre les actions en contrefa�on qui pourraient �tre
-diligent�es au titre de l'utilisation, de la modification, et de la
-redistribution du Logiciel. N�anmoins, si de telles actions sont
-exerc�es contre le Licenci�, le Conc�dant lui apportera son aide
-technique et juridique pour sa d�fense. Cette aide technique et
-juridique est d�termin�e au cas par cas entre le Conc�dant concern� et
-le Licenci� dans le cadre d'un protocole d'accord. Le Conc�dant d�gage
-toute responsabilit� quant � l'utilisation de la d�nomination du
-Logiciel par le Licenci�. Aucune garantie n'est apport�e quant �
-l'existence de droits ant�rieurs sur le nom du Logiciel et sur
-l'existence d'une marque.
-
-
-    Article 10 - RESILIATION
-
-10.1 En cas de manquement par le Licenci� aux obligations mises � sa
-charge par le Contrat, le Conc�dant pourra r�silier de plein droit le
-Contrat trente (30) jours apr�s notification adress�e au Licenci� et
-rest�e sans effet.
-
-10.2 Le Licenci� dont le Contrat est r�sili� n'est plus autoris� �
-utiliser, modifier ou distribuer le Logiciel. Cependant, toutes les
-licences qu'il aura conc�d�es ant�rieurement � la r�siliation du Contrat
-resteront valides sous r�serve qu'elles aient �t� effectu�es en
-conformit� avec le Contrat.
-
-
-    Article 11 - DISPOSITIONS DIVERSES
-
-
-      11.1 CAUSE EXTERIEURE
-
-Aucune des Parties ne sera responsable d'un retard ou d'une d�faillance
-d'ex�cution du Contrat qui serait d� � un cas de force majeure, un cas
-fortuit ou une cause ext�rieure, telle que, notamment, le mauvais
-fonctionnement ou les interruptions du r�seau �lectrique ou de
-t�l�communication, la paralysie du r�seau li�e � une attaque
-informatique, l'intervention des autorit�s gouvernementales, les
-catastrophes naturelles, les d�g�ts des eaux, les tremblements de terre,
-le feu, les explosions, les gr�ves et les conflits sociaux, l'�tat de
-guerre...
-
-11.2 Le fait, par l'une ou l'autre des Parties, d'omettre en une ou
-plusieurs occasions de se pr�valoir d'une ou plusieurs dispositions du
-Contrat, ne pourra en aucun cas impliquer renonciation par la Partie
-int�ress�e � s'en pr�valoir ult�rieurement.
-
-11.3 Le Contrat annule et remplace toute convention ant�rieure, �crite
-ou orale, entre les Parties sur le m�me objet et constitue l'accord
-entier entre les Parties sur cet objet. Aucune addition ou modification
-aux termes du Contrat n'aura d'effet � l'�gard des Parties � moins
-d'�tre faite par �crit et sign�e par leurs repr�sentants d�ment habilit�s.
-
-11.4 Dans l'hypoth�se o� une ou plusieurs des dispositions du Contrat
-s'av�rerait contraire � une loi ou � un texte applicable, existants ou
-futurs, cette loi ou ce texte pr�vaudrait, et les Parties feraient les
-amendements n�cessaires pour se conformer � cette loi ou � ce texte.
-Toutes les autres dispositions resteront en vigueur. De m�me, la
-nullit�, pour quelque raison que ce soit, d'une des dispositions du
-Contrat ne saurait entra�ner la nullit� de l'ensemble du Contrat.
-
-
-      11.5 LANGUE
-
-Le Contrat est r�dig� en langue fran�aise et en langue anglaise, ces
-deux versions faisant �galement foi.
-
-
-    Article 12 - NOUVELLES VERSIONS DU CONTRAT
-
-12.1 Toute personne est autoris�e � copier et distribuer des copies de
-ce Contrat.
-
-12.2 Afin d'en pr�server la coh�rence, le texte du Contrat est prot�g�
-et ne peut �tre modifi� que par les auteurs de la licence, lesquels se
-r�servent le droit de publier p�riodiquement des mises � jour ou de
-nouvelles versions du Contrat, qui poss�deront chacune un num�ro
-distinct. Ces versions ult�rieures seront susceptibles de prendre en
-compte de nouvelles probl�matiques rencontr�es par les logiciels libres.
-
-12.3 Tout Logiciel diffus� sous une version donn�e du Contrat ne pourra
-faire l'objet d'une diffusion ult�rieure que sous la m�me version du
-Contrat ou une version post�rieure.
-
-
-    Article 13 - LOI APPLICABLE ET COMPETENCE TERRITORIALE
-
-13.1 Le Contrat est r�gi par la loi fran�aise. Les Parties conviennent
-de tenter de r�gler � l'amiable les diff�rends ou litiges qui
-viendraient � se produire par suite ou � l'occasion du Contrat.
-
-13.2 A d�faut d'accord amiable dans un d�lai de deux (2) mois � compter
-de leur survenance et sauf situation relevant d'une proc�dure d'urgence,
-les diff�rends ou litiges seront port�s par la Partie la plus diligente
-devant les Tribunaux comp�tents de Paris.
-
-
-Version 1.0 du 2006-09-05.
diff --git a/LICENSE b/LICENSE
deleted file mode 100644
index 3ad4dea..0000000
--- a/LICENSE
+++ /dev/null
@@ -1,515 +0,0 @@
-
-CeCILL-B FREE SOFTWARE LICENSE AGREEMENT
-
-
-    Notice
-
-This Agreement is a Free Software license agreement that is the result
-of discussions between its authors in order to ensure compliance with
-the two main principles guiding its drafting:
-
-    * firstly, compliance with the principles governing the distribution
-      of Free Software: access to source code, broad rights granted to
-      users,
-    * secondly, the election of a governing law, French law, with which
-      it is conformant, both as regards the law of torts and
-      intellectual property law, and the protection that it offers to
-      both authors and holders of the economic rights over software.
-
-The authors of the CeCILL-B (for Ce[a] C[nrs] I[nria] L[ogiciel] L[ibre])
-license are: 
-
-Commissariat � l'Energie Atomique - CEA, a public scientific, technical
-and industrial research establishment, having its principal place of
-business at 25 rue Leblanc, immeuble Le Ponant D, 75015 Paris, France.
-
-Centre National de la Recherche Scientifique - CNRS, a public scientific
-and technological establishment, having its principal place of business
-at 3 rue Michel-Ange, 75794 Paris cedex 16, France.
-
-Institut National de Recherche en Informatique et en Automatique -
-INRIA, a public scientific and technological establishment, having its
-principal place of business at Domaine de Voluceau, Rocquencourt, BP
-105, 78153 Le Chesnay cedex, France.
-
-
-    Preamble
-
-This Agreement is an open source software license intended to give users
-significant freedom to modify and redistribute the software licensed
-hereunder.
-
-The exercising of this freedom is conditional upon a strong obligation
-of giving credits for everybody that distributes a software
-incorporating a software ruled by the current license so as all
-contributions to be properly identified and acknowledged.
-
-In consideration of access to the source code and the rights to copy,
-modify and redistribute granted by the license, users are provided only
-with a limited warranty and the software's author, the holder of the
-economic rights, and the successive licensors only have limited liability.
-
-In this respect, the risks associated with loading, using, modifying
-and/or developing or reproducing the software by the user are brought to
-the user's attention, given its Free Software status, which may make it
-complicated to use, with the result that its use is reserved for
-developers and experienced professionals having in-depth computer
-knowledge. Users are therefore encouraged to load and test the
-suitability of the software as regards their requirements in conditions
-enabling the security of their systems and/or data to be ensured and,
-more generally, to use and operate it in the same conditions of
-security. This Agreement may be freely reproduced and published,
-provided it is not altered, and that no provisions are either added or
-removed herefrom.
-
-This Agreement may apply to any or all software for which the holder of
-the economic rights decides to submit the use thereof to its provisions.
-
-
-    Article 1 - DEFINITIONS
-
-For the purpose of this Agreement, when the following expressions
-commence with a capital letter, they shall have the following meaning:
-
-Agreement: means this license agreement, and its possible subsequent
-versions and annexes.
-
-Software: means the software in its Object Code and/or Source Code form
-and, where applicable, its documentation, "as is" when the Licensee
-accepts the Agreement.
-
-Initial Software: means the Software in its Source Code and possibly its
-Object Code form and, where applicable, its documentation, "as is" when
-it is first distributed under the terms and conditions of the Agreement.
-
-Modified Software: means the Software modified by at least one
-Contribution.
-
-Source Code: means all the Software's instructions and program lines to
-which access is required so as to modify the Software.
-
-Object Code: means the binary files originating from the compilation of
-the Source Code.
-
-Holder: means the holder(s) of the economic rights over the Initial
-Software.
-
-Licensee: means the Software user(s) having accepted the Agreement.
-
-Contributor: means a Licensee having made at least one Contribution.
-
-Licensor: means the Holder, or any other individual or legal entity, who
-distributes the Software under the Agreement.
-
-Contribution: means any or all modifications, corrections, translations,
-adaptations and/or new functions integrated into the Software by any or
-all Contributors, as well as any or all Internal Modules.
-
-Module: means a set of sources files including their documentation that
-enables supplementary functions or services in addition to those offered
-by the Software.
-
-External Module: means any or all Modules, not derived from the
-Software, so that this Module and the Software run in separate address
-spaces, with one calling the other when they are run.
-
-Internal Module: means any or all Module, connected to the Software so
-that they both execute in the same address space.
-
-Parties: mean both the Licensee and the Licensor.
-
-These expressions may be used both in singular and plural form.
-
-
-    Article 2 - PURPOSE
-
-The purpose of the Agreement is the grant by the Licensor to the
-Licensee of a non-exclusive, transferable and worldwide license for the
-Software as set forth in Article 5 hereinafter for the whole term of the
-protection granted by the rights over said Software.
-
-
-    Article 3 - ACCEPTANCE
-
-3.1 The Licensee shall be deemed as having accepted the terms and
-conditions of this Agreement upon the occurrence of the first of the
-following events:
-
-    * (i) loading the Software by any or all means, notably, by
-      downloading from a remote server, or by loading from a physical
-      medium;
-    * (ii) the first time the Licensee exercises any of the rights
-      granted hereunder.
-
-3.2 One copy of the Agreement, containing a notice relating to the
-characteristics of the Software, to the limited warranty, and to the
-fact that its use is restricted to experienced users has been provided
-to the Licensee prior to its acceptance as set forth in Article 3.1
-hereinabove, and the Licensee hereby acknowledges that it has read and
-understood it.
-
-
-    Article 4 - EFFECTIVE DATE AND TERM
-
-
-      4.1 EFFECTIVE DATE
-
-The Agreement shall become effective on the date when it is accepted by
-the Licensee as set forth in Article 3.1.
-
-
-      4.2 TERM
-
-The Agreement shall remain in force for the entire legal term of
-protection of the economic rights over the Software.
-
-
-    Article 5 - SCOPE OF RIGHTS GRANTED
-
-The Licensor hereby grants to the Licensee, who accepts, the following
-rights over the Software for any or all use, and for the term of the
-Agreement, on the basis of the terms and conditions set forth hereinafter.
-
-Besides, if the Licensor owns or comes to own one or more patents
-protecting all or part of the functions of the Software or of its
-components, the Licensor undertakes not to enforce the rights granted by
-these patents against successive Licensees using, exploiting or
-modifying the Software. If these patents are transferred, the Licensor
-undertakes to have the transferees subscribe to the obligations set
-forth in this paragraph.
-
-
-      5.1 RIGHT OF USE
-
-The Licensee is authorized to use the Software, without any limitation
-as to its fields of application, with it being hereinafter specified
-that this comprises:
-
-   1. permanent or temporary reproduction of all or part of the Software
-      by any or all means and in any or all form.
-
-   2. loading, displaying, running, or storing the Software on any or
-      all medium.
-
-   3. entitlement to observe, study or test its operation so as to
-      determine the ideas and principles behind any or all constituent
-      elements of said Software. This shall apply when the Licensee
-      carries out any or all loading, displaying, running, transmission
-      or storage operation as regards the Software, that it is entitled
-      to carry out hereunder.
-
-
-      5.2 ENTITLEMENT TO MAKE CONTRIBUTIONS
-
-The right to make Contributions includes the right to translate, adapt,
-arrange, or make any or all modifications to the Software, and the right
-to reproduce the resulting software.
-
-The Licensee is authorized to make any or all Contributions to the
-Software provided that it includes an explicit notice that it is the
-author of said Contribution and indicates the date of the creation thereof.
-
-
-      5.3 RIGHT OF DISTRIBUTION
-
-In particular, the right of distribution includes the right to publish,
-transmit and communicate the Software to the general public on any or
-all medium, and by any or all means, and the right to market, either in
-consideration of a fee, or free of charge, one or more copies of the
-Software by any means.
-
-The Licensee is further authorized to distribute copies of the modified
-or unmodified Software to third parties according to the terms and
-conditions set forth hereinafter.
-
-
-        5.3.1 DISTRIBUTION OF SOFTWARE WITHOUT MODIFICATION
-
-The Licensee is authorized to distribute true copies of the Software in
-Source Code or Object Code form, provided that said distribution
-complies with all the provisions of the Agreement and is accompanied by:
-
-   1. a copy of the Agreement,
-
-   2. a notice relating to the limitation of both the Licensor's
-      warranty and liability as set forth in Articles 8 and 9,
-
-and that, in the event that only the Object Code of the Software is
-redistributed, the Licensee allows effective access to the full Source
-Code of the Software at a minimum during the entire period of its
-distribution of the Software, it being understood that the additional
-cost of acquiring the Source Code shall not exceed the cost of
-transferring the data.
-
-
-        5.3.2 DISTRIBUTION OF MODIFIED SOFTWARE
-
-If the Licensee makes any Contribution to the Software, the resulting
-Modified Software may be distributed under a license agreement other
-than this Agreement subject to compliance with the provisions of Article
-5.3.4.
-
-
-        5.3.3 DISTRIBUTION OF EXTERNAL MODULES
-
-When the Licensee has developed an External Module, the terms and
-conditions of this Agreement do not apply to said External Module, that
-may be distributed under a separate license agreement.
-
-
-        5.3.4 CREDITS
-
-Any Licensee who may distribute a Modified Software hereby expressly
-agrees to:
-
-   1. indicate in the related documentation that it is based on the
-      Software licensed hereunder, and reproduce the intellectual
-      property notice for the Software,
-
-   2. ensure that written indications of the Software intended use,
-      intellectual property notice and license hereunder are included in
-      easily accessible format from the Modified Software interface,
-
-   3. mention, on a freely accessible website describing the Modified
-      Software, at least throughout the distribution term thereof, that
-      it is based on the Software licensed hereunder, and reproduce the
-      Software intellectual property notice,
-
-   4. where it is distributed to a third party that may distribute a
-      Modified Software without having to make its source code
-      available, make its best efforts to ensure that said third party
-      agrees to comply with the obligations set forth in this Article .
-
-If the Software, whether or not modified, is distributed with an
-External Module designed for use in connection with the Software, the
-Licensee shall submit said External Module to the foregoing obligations.
-
-
-        5.3.5 COMPATIBILITY WITH THE CeCILL AND CeCILL-C LICENSES
-
-Where a Modified Software contains a Contribution subject to the CeCILL
-license, the provisions set forth in Article 5.3.4 shall be optional.
-
-A Modified Software may be distributed under the CeCILL-C license. In
-such a case the provisions set forth in Article 5.3.4 shall be optional.
-
-
-    Article 6 - INTELLECTUAL PROPERTY
-
-
-      6.1 OVER THE INITIAL SOFTWARE
-
-The Holder owns the economic rights over the Initial Software. Any or
-all use of the Initial Software is subject to compliance with the terms
-and conditions under which the Holder has elected to distribute its work
-and no one shall be entitled to modify the terms and conditions for the
-distribution of said Initial Software.
-
-The Holder undertakes that the Initial Software will remain ruled at
-least by this Agreement, for the duration set forth in Article 4.2.
-
-
-      6.2 OVER THE CONTRIBUTIONS
-
-The Licensee who develops a Contribution is the owner of the
-intellectual property rights over this Contribution as defined by
-applicable law.
-
-
-      6.3 OVER THE EXTERNAL MODULES
-
-The Licensee who develops an External Module is the owner of the
-intellectual property rights over this External Module as defined by
-applicable law and is free to choose the type of agreement that shall
-govern its distribution.
-
-
-      6.4 JOINT PROVISIONS
-
-The Licensee expressly undertakes:
-
-   1. not to remove, or modify, in any manner, the intellectual property
-      notices attached to the Software;
-
-   2. to reproduce said notices, in an identical manner, in the copies
-      of the Software modified or not.
-
-The Licensee undertakes not to directly or indirectly infringe the
-intellectual property rights of the Holder and/or Contributors on the
-Software and to take, where applicable, vis-�-vis its staff, any and all
-measures required to ensure respect of said intellectual property rights
-of the Holder and/or Contributors.
-
-
-    Article 7 - RELATED SERVICES
-
-7.1 Under no circumstances shall the Agreement oblige the Licensor to
-provide technical assistance or maintenance services for the Software.
-
-However, the Licensor is entitled to offer this type of services. The
-terms and conditions of such technical assistance, and/or such
-maintenance, shall be set forth in a separate instrument. Only the
-Licensor offering said maintenance and/or technical assistance services
-shall incur liability therefor.
-
-7.2 Similarly, any Licensor is entitled to offer to its licensees, under
-its sole responsibility, a warranty, that shall only be binding upon
-itself, for the redistribution of the Software and/or the Modified
-Software, under terms and conditions that it is free to decide. Said
-warranty, and the financial terms and conditions of its application,
-shall be subject of a separate instrument executed between the Licensor
-and the Licensee.
-
-
-    Article 8 - LIABILITY
-
-8.1 Subject to the provisions of Article 8.2, the Licensee shall be
-entitled to claim compensation for any direct loss it may have suffered
-from the Software as a result of a fault on the part of the relevant
-Licensor, subject to providing evidence thereof.
-
-8.2 The Licensor's liability is limited to the commitments made under
-this Agreement and shall not be incurred as a result of in particular:
-(i) loss due the Licensee's total or partial failure to fulfill its
-obligations, (ii) direct or consequential loss that is suffered by the
-Licensee due to the use or performance of the Software, and (iii) more
-generally, any consequential loss. In particular the Parties expressly
-agree that any or all pecuniary or business loss (i.e. loss of data,
-loss of profits, operating loss, loss of customers or orders,
-opportunity cost, any disturbance to business activities) or any or all
-legal proceedings instituted against the Licensee by a third party,
-shall constitute consequential loss and shall not provide entitlement to
-any or all compensation from the Licensor.
-
-
-    Article 9 - WARRANTY
-
-9.1 The Licensee acknowledges that the scientific and technical
-state-of-the-art when the Software was distributed did not enable all
-possible uses to be tested and verified, nor for the presence of
-possible defects to be detected. In this respect, the Licensee's
-attention has been drawn to the risks associated with loading, using,
-modifying and/or developing and reproducing the Software which are
-reserved for experienced users.
-
-The Licensee shall be responsible for verifying, by any or all means,
-the suitability of the product for its requirements, its good working
-order, and for ensuring that it shall not cause damage to either persons
-or properties.
-
-9.2 The Licensor hereby represents, in good faith, that it is entitled
-to grant all the rights over the Software (including in particular the
-rights set forth in Article 5).
-
-9.3 The Licensee acknowledges that the Software is supplied "as is" by
-the Licensor without any other express or tacit warranty, other than
-that provided for in Article 9.2 and, in particular, without any warranty 
-as to its commercial value, its secured, safe, innovative or relevant 
-nature.
-
-Specifically, the Licensor does not warrant that the Software is free
-from any error, that it will operate without interruption, that it will
-be compatible with the Licensee's own equipment and software
-configuration, nor that it will meet the Licensee's requirements.
-
-9.4 The Licensor does not either expressly or tacitly warrant that the
-Software does not infringe any third party intellectual property right
-relating to a patent, software or any other property right. Therefore,
-the Licensor disclaims any and all liability towards the Licensee
-arising out of any or all proceedings for infringement that may be
-instituted in respect of the use, modification and redistribution of the
-Software. Nevertheless, should such proceedings be instituted against
-the Licensee, the Licensor shall provide it with technical and legal
-assistance for its defense. Such technical and legal assistance shall be
-decided on a case-by-case basis between the relevant Licensor and the
-Licensee pursuant to a memorandum of understanding. The Licensor
-disclaims any and all liability as regards the Licensee's use of the
-name of the Software. No warranty is given as regards the existence of
-prior rights over the name of the Software or as regards the existence
-of a trademark.
-
-
-    Article 10 - TERMINATION
-
-10.1 In the event of a breach by the Licensee of its obligations
-hereunder, the Licensor may automatically terminate this Agreement
-thirty (30) days after notice has been sent to the Licensee and has
-remained ineffective.
-
-10.2 A Licensee whose Agreement is terminated shall no longer be
-authorized to use, modify or distribute the Software. However, any
-licenses that it may have granted prior to termination of the Agreement
-shall remain valid subject to their having been granted in compliance
-with the terms and conditions hereof.
-
-
-    Article 11 - MISCELLANEOUS
-
-
-      11.1 EXCUSABLE EVENTS
-
-Neither Party shall be liable for any or all delay, or failure to
-perform the Agreement, that may be attributable to an event of force
-majeure, an act of God or an outside cause, such as defective
-functioning or interruptions of the electricity or telecommunications
-networks, network paralysis following a virus attack, intervention by
-government authorities, natural disasters, water damage, earthquakes,
-fire, explosions, strikes and labor unrest, war, etc.
-
-11.2 Any failure by either Party, on one or more occasions, to invoke
-one or more of the provisions hereof, shall under no circumstances be
-interpreted as being a waiver by the interested Party of its right to
-invoke said provision(s) subsequently.
-
-11.3 The Agreement cancels and replaces any or all previous agreements,
-whether written or oral, between the Parties and having the same
-purpose, and constitutes the entirety of the agreement between said
-Parties concerning said purpose. No supplement or modification to the
-terms and conditions hereof shall be effective as between the Parties
-unless it is made in writing and signed by their duly authorized
-representatives.
-
-11.4 In the event that one or more of the provisions hereof were to
-conflict with a current or future applicable act or legislative text,
-said act or legislative text shall prevail, and the Parties shall make
-the necessary amendments so as to comply with said act or legislative
-text. All other provisions shall remain effective. Similarly, invalidity
-of a provision of the Agreement, for any reason whatsoever, shall not
-cause the Agreement as a whole to be invalid.
-
-
-      11.5 LANGUAGE
-
-The Agreement is drafted in both French and English and both versions
-are deemed authentic.
-
-
-    Article 12 - NEW VERSIONS OF THE AGREEMENT
-
-12.1 Any person is authorized to duplicate and distribute copies of this
-Agreement.
-
-12.2 So as to ensure coherence, the wording of this Agreement is
-protected and may only be modified by the authors of the License, who
-reserve the right to periodically publish updates or new versions of the
-Agreement, each with a separate number. These subsequent versions may
-address new issues encountered by Free Software.
-
-12.3 Any Software distributed under a given version of the Agreement may
-only be subsequently distributed under the same version of the Agreement
-or a subsequent version.
-
-
-    Article 13 - GOVERNING LAW AND JURISDICTION
-
-13.1 The Agreement is governed by French law. The Parties agree to
-endeavor to seek an amicable solution to any disagreements or disputes
-that may arise during the performance of the Agreement.
-
-13.2 Failing an amicable solution within two (2) months as from their
-occurrence, and unless emergency proceedings are necessary, the
-disagreements or disputes shall be referred to the Paris Courts having
-jurisdiction, by the more diligent Party.
-
-
-Version 1.0 dated 2006-09-05.
diff --git a/MANIFEST.in b/MANIFEST.in
deleted file mode 100644
index b1e91db..0000000
--- a/MANIFEST.in
+++ /dev/null
@@ -1,3 +0,0 @@
-include .coveragerc
-include hooks.py
-include README.rst
diff --git a/PKG-INFO b/PKG-INFO
new file mode 100644
index 0000000..fad8aed
--- /dev/null
+++ b/PKG-INFO
@@ -0,0 +1,128 @@
+Metadata-Version: 1.1
+Name: pyoperators
+Version: 0.13.6
+Summary: Operators and solvers for high-performance computing.
+Home-page: http://pchanial.github.com/pyoperators
+Author: Pierre Chanial
+Author-email: pierre.chanial at gmail.com
+License: CeCILL-B
+Description: ===========
+        PyOperators
+        ===========
+        
+        The PyOperators package defines operators and solvers for high-performance computing. These operators are multi-dimensional functions with optimised and controlled memory management. If linear, they behave like matrices with a sparse storage footprint.
+        
+        More documentation can be found here: http://pchanial.github.io/pyoperators.
+        
+        Getting started
+        ===============
+        
+        To define an operator, one needs to define a direct function
+        which will replace the usual matrix-vector operation:
+        
+        >>> def f(x, out):
+        ...     out[...] = 2 * x
+        
+        Then, you can instantiate an ``Operator``:
+        
+        >>> A = pyoperators.Operator(direct=f, flags='symmetric')
+        
+        An alternative way to define an operator is to define a subclass:
+        
+        >>> from pyoperators import flags, Operator
+        ... @flags.symmetric
+        ... class MyOperator(Operator):
+        ...     def direct(x, out):
+        ...         out[...] = 2 * x
+        ...
+        ... A = MyOperator()
+        
+        This operator does not have an explicit shape, it can handle inputs of any shape:
+        
+        >>> A(np.ones(5))
+        array([ 2.,  2.,  2.,  2.,  2.])
+        >>> A(np.ones((2,3)))
+        array([[ 2.,  2.,  2.],
+               [ 2.,  2.,  2.]])
+        
+        By setting the ``symmetric`` flag, we ensure that A's transpose is A:
+        
+        >>> A.T is A
+        True
+        
+        For non-explicit shape operators, we get the corresponding dense matrix by specifying the input shape:
+        
+        >>> A.todense(shapein=2)
+        array([[2, 0],
+               [0, 2]])
+        
+        Operators do not have to be linear. Many operators are already `predefined <http://pchanial.github.io/pyoperators/2000/doc-operators/#list>`_, such as the ``IdentityOperator``, the ``DiagonalOperator`` or the nonlinear ``ClipOperator``.
+        
+        The previous ``A`` matrix could be defined more easily like this:
+        
+        >>> from pyoperators import I
+        >>> A = 2 * I
+        
+        where ``I`` is the identity operator with no explicit shape.
+        
+        Operators can be combined together by addition, element-wise multiplication or composition. Note that the operator ``*`` stands for matrix multiplication if the two operators are linear, or for element-wise multiplication otherwise:
+        
+        >>> from pyoperators import I, DiagonalOperator
+        >>> B = 2 * I + DiagonalOperator(range(3))
+        >>> B.todense()
+        array([[2, 0, 0],
+               [0, 3, 0],
+               [0, 0, 4]])
+        
+        Algebraic rules can easily be attached to operators. They are used to simplify expressions to speed up their execution. The ``B`` Operator has been reduced to:
+        
+        >>> B
+        DiagonalOperator(array([2, ..., 4], dtype=int64), broadcast='disabled', dtype=int64, shapein=3, shapeout=3)
+        
+        Many simplifications are available. For instance:
+        
+        >>> from pyoperators import Operator
+        >>> C = Operator(flags='idempotent,linear')
+        >>> C * C is C
+        True
+        >>> D = Operator(flags='involutary')
+        >>> D(D)
+        IdentityOperator()
+        
+        
+        Requirements
+        ============
+        
+        List of requirements:
+        
+        - python 2.6
+        - numpy >= 1.6
+        - scipy >= 0.9
+        
+        Optional requirements:
+        
+        - numexpr (>= 2.0 is better)
+        - PyWavelets : wavelet transforms
+        
+Keywords: scientific computing
+Platform: MacOS X
+Platform: Linux
+Platform: Solaris
+Platform: Unix
+Platform: Windows
+Classifier: Programming Language :: Python
+Classifier: Programming Language :: Python :: 2
+Classifier: Programming Language :: Python :: 2.6
+Classifier: Programming Language :: Python :: 2.7
+Classifier: Programming Language :: Python :: 3
+Classifier: Programming Language :: Python :: 3.3
+Classifier: Programming Language :: Python :: 3.4
+Classifier: Programming Language :: C
+Classifier: Programming Language :: Cython
+Classifier: Development Status :: 4 - Beta
+Classifier: Intended Audience :: Science/Research
+Classifier: Operating System :: OS Independent
+Classifier: Topic :: Scientific/Engineering
+Requires: numpy(>=1.6)
+Requires: scipy(>=0.9)
+Requires: pyfftw
diff --git a/pyoperators/__init__.py.in b/pyoperators/__init__.py
similarity index 97%
rename from pyoperators/__init__.py.in
rename to pyoperators/__init__.py
index 4765304..f74350b 100644
--- a/pyoperators/__init__.py.in
+++ b/pyoperators/__init__.py
@@ -42,3 +42,5 @@ del types
 I = IdentityOperator()
 O = ZeroOperator()
 X = Variable('X')
+
+__version__ = u'0.13.6'
diff --git a/pyoperators/fft.py b/pyoperators/fft.py
index f79a91e..a22a647 100644
--- a/pyoperators/fft.py
+++ b/pyoperators/fft.py
@@ -438,7 +438,7 @@ def _save_wisdom():
             pass
         if len(w) == 0:
             continue
-        with open(filename, 'w') as f:
+        with open(filename, 'wb') as f:
             f.write(w)
 
 
diff --git a/pyoperators/linear.py b/pyoperators/linear.py
index 910d175..cf57824 100644
--- a/pyoperators/linear.py
+++ b/pyoperators/linear.py
@@ -21,8 +21,9 @@ from .flags import (
     update_output)
 from .memory import empty
 from .utils import (
-    broadcast_shapes, cast, complex_dtype, float_dtype, inspect_special_values,
-    isalias, pi, product, strshape, tointtuple, ufuncs, zip_broadcast)
+    broadcast_shapes, cast, complex_dtype, float_dtype, float_or_complex_dtype,
+    inspect_special_values, isalias, pi, product, strshape, tointtuple, ufuncs,
+    zip_broadcast)
 from .warnings import warn, PyOperatorsWarning
 
 __all__ = [
@@ -114,7 +115,7 @@ class DenseBase(Operator):
                 "nOperator, DenseBlockDiagonalOperator or DenseBlockRowOperato"
                 "r.".format(data.ndim, naxesin + naxesout + naxesextra))
         if dtype is None:
-            dtype = float_dtype(data.dtype)
+            dtype = float_or_complex_dtype(data.dtype)
         else:
             dtype = np.dtype(dtype)
         data = np.array(data, dtype=dtype, copy=False)
@@ -476,7 +477,7 @@ class DiagonalNumexprOperator(DiagonalBase):
         if broadcast == 'disabled':
             keywords['shapein'] = data.shape
         if dtype is None:
-            dtype = float_dtype(data.dtype)
+            dtype = float_or_complex_dtype(data.dtype)
 
         self.expr = expr
         self.var = var
diff --git a/pyoperators/utils/misc.py b/pyoperators/utils/misc.py
index 049f012..1bfaee1 100644
--- a/pyoperators/utils/misc.py
+++ b/pyoperators/utils/misc.py
@@ -23,10 +23,13 @@ __all__ = ['all_eq',
            'broadcast_shapes',
            'cast',
            'complex_dtype',
+           'complex_intrinsic_dtype',
            'deprecated',
            'first',
            'first_is_not',
            'float_dtype',
+           'float_intrinsic_dtype',
+           'float_or_complex_dtype',
            'groupbykey',
            'ifirst',
            'ifirst_is_not',
@@ -76,14 +79,43 @@ __all__ = ['all_eq',
 
 
 def deprecated(msg):
-    def decorator(func):
-        @functools.wraps(func)
+    """
+    Decorator for function of class deprecation.
+
+    Example
+    -------
+    >>> @deprecated('use mynewfunc instead.')
+    >>> def myfunc():
+    ...    pass
+
+    >>>@deprecated
+    >>>class MyClass(MyNewClass):
+    >>>    pass
+
+    """
+    def decorator(x):
+        if isinstance(x, type):
+            def __init__(self, *args, **keywords):
+                warn('Class {!r} is deprecated: {}'.format(x.__name__, msg),
+                     PyOperatorsDeprecationWarning)
+                x.__init__.__func__(self, *args, **keywords)
+            __init__.__doc__ = x.__init__.__doc__
+            return type(x.__name__, x.__bases__, {'__init__': __init__,
+                                                  '__doc__': x.__doc__})
+
+        @functools.wraps(x)
         def _(*args, **keywords):
-            warn('{!r} is deprecated: {}'.format(func.__name__, msg),
+            warn('Function {!r} is deprecated: {}'.format(x.__name__, msg),
                  PyOperatorsDeprecationWarning)
-            return func(*args, **keywords)
+            return x(*args, **keywords)
         return _
-    return decorator
+    if isinstance(msg, str):
+        return decorator
+    if not isinstance(msg, type):
+        raise TypeError('Missing deprecation message.')
+    x = msg
+    msg = "Use '{0}' instead.".format(x.__base__.__name__)
+    return decorator(x)
 
 
 # other stuff
@@ -196,6 +228,7 @@ def cast(arrays, dtype=None, order='c'):
 def complex_dtype(dtype):
     """
     Return the complex dtype associated to a numeric dtype.
+    For boolean or integer dtype, the default complex dtype is returned.
 
     Parameter
     ---------
@@ -208,24 +241,58 @@ def complex_dtype(dtype):
     dtype('complex128')
     >>> complex_dtype(np.float32)
     dtype('complex64')
-    >>> complex_dtype(np.float64)
-    dtype('complex128')
+    >>> complex_dtype('>f8')
+    dtype('>c16')
 
     """
-    dtype = float_dtype(dtype)
+    dtype = np.dtype(dtype)
     if dtype.kind == 'c':
         return dtype
-    if dtype == np.float16:
-        if not hasattr(np, 'complex32'):
-            return np.dtype(complex)
-    return np.dtype('complex{}'.format(2 * int(dtype.name[5:])))
+    if dtype.kind not in 'biuf':
+        raise TypeError('Non numerical data type.')
+    if dtype.kind != 'f' or dtype.itemsize == 2:
+        return np.dtype(complex)
+    return np.dtype('{0}c{1}'.format(dtype.str[0], dtype.itemsize * 2))
+
+
+def complex_intrinsic_dtype(dtype):
+    """
+    Return the intrinsic complex dtype (complex64 or complex128) associated
+    with a numeric dtype.
+
+    Parameter
+    ---------
+    dtype : dtype
+        The input dtype.
+
+    Example
+    -------
+    >>> complex_intrinsic_dtype(int)
+    dtype('complex128')
+    >>> complex_intrinsic_dtype(np.float32)
+    dtype('complex64')
+    >>> complex_intrinsic_dtype('>f16')
+    dtype('complex128')
+    >>> complex_intrinsic_dtype(np.float128)
+    dtype('complex128')
+    >>> complex_intrinsic_dtype(np.complex256)
+    dtype('complex128')
+
+    """
+    dtype = np.dtype(dtype)
+    if dtype.kind not in 'biufc':
+        raise TypeError('Non numerical data type.')
+    if dtype.kind in 'biu':
+        return np.dtype(complex)
+    itemsize = dtype.itemsize if dtype.kind == 'c' else dtype.itemsize * 2
+    itemsize = max(8, min(itemsize, 16))
+    return np.dtype('c{0}'.format(itemsize))
 
 
 def float_dtype(dtype):
     """
-    Return the floating dtype associated to a numeric dtype.
-    Unless the input dtype kind is float or complex, the default float dtype
-    is returned.
+    Return the floating dtype associated with a numeric dtype.
+    For boolean or integer dtype, the default float dtype is returned.
 
     Parameter
     ---------
@@ -238,7 +305,75 @@ def float_dtype(dtype):
     dtype('float64')
     >>> float_dtype(np.float32)
     dtype('float32')
+    >>> float_dtype('>f8')
+    dtype('>f8')
     >>> float_dtype(np.complex256)
+    dtype('float128')
+    >>> float_dtype('>c32')
+    dtype('>f16')
+
+    """
+    dtype = np.dtype(dtype)
+    if dtype.kind == 'f':
+        return dtype
+    if dtype.kind not in 'biuc':
+        raise TypeError('Non numerical data type.')
+    if dtype.kind != 'c':
+        return np.dtype(float)
+    return np.dtype('{0}f{1}'.format(dtype.str[0], dtype.itemsize // 2))
+
+
+def float_intrinsic_dtype(dtype):
+    """
+    Return the intrinsic floating dtype (float32 or float64) associated
+    to a numeric dtype.
+
+    Parameter
+    ---------
+    dtype : dtype
+        The input dtype.
+
+    Example
+    -------
+    >>> float_intrinsic_dtype(int)
+    dtype('float64')
+    >>> float_intrinsic_dtype(np.float32)
+    dtype('float32')
+    >>> float_intrinsic_dtype('>f8')
+    dtype('float64')
+    >>> float_intrinsic_dtype(np.float128)
+    dtype('float64')
+    >>> float_intrinsic_dtype(np.complex256)
+    dtype('float64')
+
+    """
+    dtype = np.dtype(dtype)
+    if dtype.kind not in 'biufc':
+        raise TypeError('Non numerical data type.')
+    if dtype.kind in 'biu':
+        return np.dtype(float)
+    itemsize = dtype.itemsize if dtype.kind == 'f' else dtype.itemsize // 2
+    itemsize = max(4, min(itemsize, 8))
+    return np.dtype('f{0}'.format(itemsize))
+
+
+def float_or_complex_dtype(dtype):
+    """
+    Return the float or complex dtype associated to a numeric dtype.
+    For boolean or integer dtype, the default float dtype is returned.
+
+    Parameter
+    ---------
+    dtype : dtype
+        The input dtype.
+
+    Example
+    -------
+    >>> float_or_complex_dtype(int)
+    dtype('float64')
+    >>> float_or_complex_dtype(np.float32)
+    dtype('float32')
+    >>> float_or_complex_dtype(np.complex256)
     dtype('complex256')
 
     """
@@ -608,7 +743,12 @@ def merge_none(a, b):
 
 
 class ndarraywrap(np.ndarray):
-    pass
+    def __array_finalize__(self, obj):
+        if self.ndim == 0:
+            self.__class__ = np.ndarray
+            return
+        if hasattr(obj, '__dict__'):
+            self.__dict__.update(obj.__dict__)
 
 
 def one(dtype):
@@ -1092,8 +1232,8 @@ def zip_broadcast(*args, **keywords):
         raise TypeError('Invalid keyword(s).')
     iter_str = keywords.get('iter_str', True)
     n = max(1 if not isinstance(_, collections.Iterable) or
-            isinstance(_, str) and not iter_str
-            else len(_) if hasattr(_, '__len__') else sys.maxint for _ in args)
+            isinstance(_, str) and not iter_str else len(_)
+            if hasattr(_, '__len__') else sys.maxsize for _ in args)
 
     def wrap(a):
         if not isinstance(a, collections.Iterable) or \
diff --git a/test/__init__.py b/test/__init__.py
deleted file mode 100644
index e69de29..0000000
diff --git a/test/common.py b/test/common.py
deleted file mode 100644
index ed1d049..0000000
--- a/test/common.py
+++ /dev/null
@@ -1,168 +0,0 @@
-import numpy as np
-import pyoperators
-
-from pyoperators import Operator, flags
-from pyoperators.utils.testing import assert_eq
-
-DTYPES = [np.dtype(t) for t in (np.uint8, np.int8, np.uint16, np.int16,
-          np.uint32, np.int32, np.uint64, np.int64,
-          np.float16, np.float32, np.float64, np.float128,
-          np.complex64, np.complex128, np.complex256)]
-COMPLEX_DTYPES = [np.dtype(t) for t in (np.complex64, np.complex128,
-                  np.complex256)]
-
-
-class ndarray1(np.ndarray):
-    pass
-
-
-class ndarray2(np.ndarray):
-    pass
-
-attr1 = {'attr1': True, 'attr2': True}
-attr2 = {'attr1': False, 'attr3': False}
-
-
- at flags.linear
-class ExplExpl(Operator):
-    def __init__(self, shapein=3, shapeout=4, **keywords):
-        Operator.__init__(self, shapein=shapein, shapeout=shapeout,
-                          classout=ndarray1, attrout=attr1, **keywords)
-
-    def direct(self, input, output):
-        output[0:3] = input
-        output[3] = 10.
-
-
- at flags.linear
-class UncoExpl(Operator):
-    def __init__(self, shapein=3, **keywords):
-        Operator.__init__(self, shapein=shapein, classout=ndarray1,
-                          attrout=attr1, **keywords)
-
-    def direct(self, input, output):
-        output[0:3] = 2*input
-        output[3:] = 20
-
-
- at flags.linear
-class ImplImpl(Operator):
-    def __init__(self, **keywords):
-        Operator.__init__(self, classout=ndarray1, attrout=attr1, **keywords)
-
-    def direct(self, input, output):
-        output[0:input.size] = 3*input
-        output[-1] = 30
-
-    def reshapein(self, shapein):
-        return (shapein[0] + 1,)
-
-    def reshapeout(self, shapeout):
-        return (shapeout[0] - 1,)
-
-
- at flags.linear
-class UncoImpl(Operator):
-    def __init__(self, **keywords):
-        Operator.__init__(self, classout=ndarray1, attrout=attr1, **keywords)
-
-    def direct(self, input, output):
-        output[0:output.size-1] = 4*input
-        output[-1] = 40
-
-    def reshapeout(self, shapeout):
-        return (shapeout[0] - 1,)
-
-
- at flags.linear
-class ExplUnco(Operator):
-    def __init__(self, shapeout=4, **keywords):
-        Operator.__init__(self, shapeout=shapeout, classout=ndarray1,
-                          attrout=attr1, **keywords)
-
-    def direct(self, input, output):
-        output[0:3] = 5*input[0:3]
-        output[3] = 50
-
-
- at flags.linear
-class ImplUnco(Operator):
-    def __init__(self, **keywords):
-        Operator.__init__(self, classout=ndarray1, attrout=attr1, **keywords)
-
-    def direct(self, input, output):
-        output[0:input.size] = 6*input
-        output[-1] = 60
-
-    def reshapein(self, shapein):
-        return (shapein[0] + 1,)
-
-
- at flags.linear
-class UncoUnco(Operator):
-    def __init__(self, **keywords):
-        Operator.__init__(self, classout=ndarray1, attrout=attr1, **keywords)
-
-    def direct(self, input, output):
-        output[0:3] = 7*input[0:3]
-        output[3:] = 70
-
-OPS = ExplExpl, UncoExpl, ImplImpl, UncoImpl, ExplUnco, ImplUnco, UncoUnco
-
-ALL_OPS = [eval('pyoperators.' + op) for op in dir(pyoperators) if op.endswith(
-           'Operator')]
-
-
- at flags.linear
- at flags.square
-class IdentityOutplaceOperator(Operator):
-    def direct(self, input, output):
-        output[...] = input
-
-
- at flags.linear
- at flags.real
- at flags.square
- at flags.symmetric
-class HomothetyOutplaceOperator(Operator):
-    def __init__(self, value, **keywords):
-        Operator.__init__(self, **keywords)
-        self.value = value
-
-    def direct(self, input, output):
-        output[...] = self.value * input
-
-
- at flags.linear
-class Stretch(Operator):
-    """ Stretch input array by replicating it by a factor of 2. """
-    def __init__(self, axis, **keywords):
-        self.axis = axis
-        if self.axis < 0:
-            self.slice = [Ellipsis] + (-self.axis) * [slice(None)]
-        else:
-            self.slice = (self.axis+1) * [slice(None)] + [Ellipsis]
-        Operator.__init__(self, **keywords)
-
-    def direct(self, input, output):
-        self.slice[self.axis] = slice(0, None, 2)
-        output[self.slice] = input
-        self.slice[self.axis] = slice(1, None, 2)
-        output[self.slice] = input
-
-    def reshapein(self, shape):
-        shape_ = list(shape)
-        shape_[self.axis] *= 2
-        return shape_
-
-    def reshapeout(self, shape):
-        shape_ = list(shape)
-        shape_[self.axis] //= 2
-        return shape_
-
-
-def assert_inplace_outplace(op, v, expected):
-    w = op(v)
-    assert_eq(w, expected)
-    op(v, out=w)
-    assert_eq(w, expected)
diff --git a/test/test_broadcastingoperators.py b/test/test_broadcastingoperators.py
index c11dd87..6a6f03a 100644
--- a/test/test_broadcastingoperators.py
+++ b/test/test_broadcastingoperators.py
@@ -12,7 +12,7 @@ from pyoperators import (
 from pyoperators.core import BroadcastingBase
 from pyoperators.flags import linear, square
 from pyoperators.rules import rule_manager
-from pyoperators.utils import float_dtype, product
+from pyoperators.utils import float_or_complex_dtype, product
 from pyoperators.utils.testing import (
     assert_eq, assert_is, assert_is_instance, assert_is_none, assert_is_not,
     assert_is_type, assert_not_in, assert_same)
@@ -363,7 +363,7 @@ def test_dtype():
         if c_ in (IdentityOperator, MaskOperator, ZeroOperator):
             assert_equal(op.dtype, None)
         elif c_ is DiagonalNumexprOperator:
-            assert_equal(op.dtype, float_dtype(t))
+            assert_equal(op.dtype, float_or_complex_dtype(t))
         else:
             assert_equal(op.dtype, t)
 
diff --git a/test/test_utils.py b/test/test_utils.py
index 70d0df1..469f3de 100644
--- a/test/test_utils.py
+++ b/test/test_utils.py
@@ -4,17 +4,20 @@ import os
 import time
 
 from contextlib import contextmanager
-from numpy.testing import assert_equal
+from numpy.testing import assert_equal, assert_warns
 from pyoperators import Operator
 from pyoperators.utils import (
-    broadcast_shapes, cast, complex_dtype, first, first_is_not, float_dtype,
-    ifirst, ifirst_is_not, ilast, ilast_is_not, groupbykey,
-    inspect_special_values, interruptible, isscalarlike, zip_broadcast, last,
-    last_is_not, least_greater_multiple, one, omp_num_threads, pi,
-    pool_threading, product, reshape_broadcast, setting, settingerr, split,
-    strenum, strplural, strshape, Timer, uninterruptible, zero)
+    broadcast_shapes, cast, complex_dtype, complex_intrinsic_dtype, deprecated,
+    first, first_is_not, float_dtype, float_intrinsic_dtype,
+    float_or_complex_dtype, ifirst, ifirst_is_not, ilast, ilast_is_not,
+    groupbykey, inspect_special_values, interruptible, isscalarlike,
+    zip_broadcast, last, last_is_not, least_greater_multiple, one,
+    omp_num_threads, pi, pool_threading, product, reshape_broadcast, setting,
+    settingerr, split, strenum, strplural, strshape, Timer, uninterruptible,
+    zero)
 from pyoperators.utils.testing import (
     assert_eq, assert_not_in, assert_raises, assert_same)
+from pyoperators.warnings import PyOperatorsDeprecationWarning
 
 dtypes = [np.dtype(t) for t in (np.bool8, np.uint8, np.int8, np.uint16,
           np.int16, np.uint32, np.int32, np.uint64, np.int64, np.float32,
@@ -27,6 +30,41 @@ def assert_dtype(a, d):
     assert_eq(a.dtype, d)
 
 
+def test_deprecated():
+    class mynewclass(object):
+        def __init__(self, a, b=None):
+            self.a = a
+            self.b = b
+
+    assert_raises(TypeError, deprecated, lambda x: x)
+
+
+    @deprecated('blabla')
+    def myfunc():
+        return 2
+
+
+    @deprecated
+    class myclass1(mynewclass):
+        pass
+
+
+    @deprecated('blabla2')
+    class myclass2(mynewclass):
+        pass
+
+    val = assert_warns(PyOperatorsDeprecationWarning, myfunc)
+    assert_equal(val, 2)
+
+    c = assert_warns(PyOperatorsDeprecationWarning, myclass1, 3, b=2)
+    assert_equal(c.a, 3)
+    assert_equal(c.b, 2)
+
+    c = assert_warns(PyOperatorsDeprecationWarning, myclass2, 3, b=2)
+    assert_equal(c.a, 3)
+    assert_equal(c.b, 2)
+
+
 def test_broadcast_shapes():
     shapes = [((),), ((), ()), ((), (), ()),
               ((1,),), ((), (1,)), ((), (1,), (1,)),
@@ -72,26 +110,60 @@ def test_cast():
 
 
 def test_complex_dtype():
-    dtypes = (str, bool, int, np.uint32, np.float16, np.float32, np.float64,
-              np.float128)
-    expecteds = (None, complex, complex, complex, complex, np.complex64,
-                 np.complex128, np.complex256)
+    dtypes = (str, bool, int, np.uint32,
+              np.float16, np.float32, np.float64, np.float128,
+              np.complex64, np.complex128, np.complex256,
+              '>f2', '>f4', '>f8', '>f16',
+              '>c8', '>c16', '>c32')
+    expecteds = (None, '<c16', '<c16', '<c16',
+                 '<c16', '<c8', '<c16', '<c32',
+                 '<c8', '<c16', '<c32',
+                 '<c16', '>c8', '>c16', '>c32',
+                 '>c8', '>c16', '>c32')
 
     def func(dtype, expected):
         if expected is None:
             assert_raises(TypeError, complex_dtype, dtype)
         else:
             actual = complex_dtype(dtype)
-            assert_eq(actual, expected)
+            assert_eq(actual.str, expected)
+    for dtype, expected in zip(dtypes, expecteds):
+        yield func, dtype, expected
+
+
+def test_complex_intrinsic_dtype():
+    dtypes = (str, bool, int, np.uint32,
+              np.float16, np.float32, np.float64, np.float128,
+              np.complex64, np.complex128, np.complex256,
+              '>f2', '>f4', '>f8', '>f16',
+              '>c8', '>c16', '>c32')
+    expecteds = (None, '<c16', '<c16', '<c16',
+                 '<c8', '<c8', '<c16', '<c16',
+                 '<c8', '<c16', '<c16',
+                 '<c8', '<c8', '<c16', '<c16',
+                 '<c8', '<c16', '<c16')
+
+    def func(dtype, expected):
+        if expected is None:
+            assert_raises(TypeError, complex_dtype, dtype)
+        else:
+            actual = complex_intrinsic_dtype(dtype)
+            assert_eq(actual.str, expected)
     for dtype, expected in zip(dtypes, expecteds):
         yield func, dtype, expected
 
 
 def test_float_dtype():
-    dtypes = (str, bool, int, np.uint32, np.float16, np.float32, np.float64,
-              np.float128)
-    expecteds = (None, float, float, float, np.float16, np.float32, np.float64,
-                 np.float128)
+    dtypes = (str, bool, int, np.uint32,
+              np.float16, np.float32, np.float64, np.float128,
+              np.complex64, np.complex128, np.complex256,
+              '>f2', '>f4', '>f8', '>f16',
+              '>c8', '>c16', '>c32')
+    expecteds = (None, '<f8', '<f8', '<f8',
+                 '<f2', '<f4', '<f8', '<f16',
+                 '<f4', '<f8', '<f16',
+                 '>f2', '>f4', '>f8', '>f16',
+                 '>f4', '>f8', '>f16')
 
     def func(dtype, expected):
         if expected is None:
@@ -103,6 +175,50 @@ def test_float_dtype():
         yield func, dtype, expected
 
 
+def test_float_intrinsic_dtype():
+    dtypes = (str, bool, int, np.uint32,
+              np.float16, np.float32, np.float64, np.float128,
+              np.complex64, np.complex128, np.complex256,
+              '>f2', '>f4', '>f8', '>f16',
+              '>c8', '>c16', '>c32')
+    expecteds = (None, '<f8', '<f8', '<f8',
+                 '<f4', '<f4', '<f8', '<f8',
+                 '<f4', '<f8', '<f8',
+                 '<f4', '<f4', '<f8', '<f8',
+                 '<f4', '<f8', '<f8')
+
+    def func(dtype, expected):
+        if expected is None:
+            assert_raises(TypeError, complex_dtype, dtype)
+        else:
+            actual = float_intrinsic_dtype(dtype)
+            assert_eq(actual.str, expected)
+    for dtype, expected in zip(dtypes, expecteds):
+        yield func, dtype, expected
+
+
+def test_float_or_complex_dtype():
+    dtypes = (str, bool, int, np.uint32,
+              np.float16, np.float32, np.float64, np.float128,
+              np.complex64, np.complex128, np.complex256,
+              '>f2', '>f4', '>f8', '>f16',
+              '>c8', '>c16', '>c32')
+    expecteds = (None, '<f8', '<f8', '<f8',
+                 '<f2', '<f4', '<f8', '<f16',
+                 '<c8', '<c16', '<c32',
+                 '>f2', '>f4', '>f8', '>f16',
+                 '>c8', '>c16', '>c32')
+
+    def func(dtype, expected):
+        if expected is None:
+            assert_raises(TypeError, float_dtype, dtype)
+        else:
+            actual = float_or_complex_dtype(dtype)
+            assert_eq(actual, expected)
+    for dtype, expected in zip(dtypes, expecteds):
+        yield func, dtype, expected
+
+
 def test_first1():
     assert first([1, 2, 3], lambda x: x > 1.5) == 2
     assert last([1, 2, 3], lambda x: x > 1.5) == 3

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



More information about the debian-science-commits mailing list