{ "info": { "author": "['Lorenzo Cavuoti', 'Francesco Sacco']", "author_email": "francesco215@live.it", "bugtrack_url": null, "classifiers": [ "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "# TexPy\n\n## Descrizione rapida della libreria \n\nQuesta libreria e' stata creata da studenti del corso di Laboratorio 3 dell'universita' di Pisa per velocizzare la stesura delle relazioni, contiene funzioni che potrebbero risultare utili pure a corsi come Laboratorio 1 e 2 \nIn particolare queste funzioni permettono di stampare una tabella in LaTeX senza dover riscrivere tutti i dati tra $ ed &\n\nAd esempio creiamo una tabella con misure ed errori:\n\n```python\n\nimport texpy as tp\nimport numpy as np\nx = np.linspace(1, 2, 10) # Genero dei dati\ny = 5*x\ndx, dy = x*0.01, y*0.01 # Suppongo che l'errore sia l'1% della misura\nmisure = [x, y] # Creo la matrice con i valori\nerrori_misure = [dx, dy] # Creo la matrice con gli errori\ntab = tp.ne(misure, errori_misure) # Crea una matrice del tipo misura +- errore come spiegato sotto\ntp.mat(tab) # Stampa la matrice, ovvero la tabella in latex\n```\n\nOutput:\n\n```latex\n\nCopia tutto quello che c'e' tra le linee\n\n--------------------------\n\\begin{tabular}{cc}\n\t\\hline\n\t% Qua mettici il titolo, ricordati di mettere le \\\\ alla fine % \n\t\\hline\n\t$1.00 \\pm 0.01$ & $5.00 \\pm 0.05$ \\\\\n\t$1.11 \\pm 0.01$ & $5.56 \\pm 0.06$ \\\\\n\t$1.22 \\pm 0.01$ & $6.11 \\pm 0.06$ \\\\\n\t$1.33 \\pm 0.01$ & $6.67 \\pm 0.07$ \\\\\n\t$1.44 \\pm 0.01$ & $7.22 \\pm 0.07$ \\\\\n\t$1.56 \\pm 0.02$ & $7.78 \\pm 0.08$ \\\\\n\t$1.67 \\pm 0.02$ & $8.33 \\pm 0.08$ \\\\\n\t$1.78 \\pm 0.02$ & $8.89 \\pm 0.09$ \\\\\n\t$1.89 \\pm 0.02$ & $9.44 \\pm 0.09$ \\\\\n\t$2.00 \\pm 0.02$ & $(1.00 \\pm 0.01) \\times 10^{1}$ \\\\\n\t\\hline\n\\end{tabular}\n\n--------------------------\n```\n\n### Installazione\n\nScrivere su terminale `pip install texpy` \n\n## Descrizione dettagliata delle funzioni\n\nTutte le funzioni sono vettorizzate, ovvero possono prendere in input numeri, vettori, matrici, tensori ecc... e li trattano secondo le regole di numpy, per maggiori informazioni: [numpy broadcasting](https://www.numpy.org/devdocs/user/theory.broadcasting.html) \nIn pratica puoi dare anche array alle funzioni e queste fanno quello che ci aspetta\n\n### Notazione scientifica con errore\n\n`ne(x, dx, unit=None)` Ritorna una stringa in latex con il valore x e l'errore ovvero \"x \\pm dx\"\nParametri:\n\n- x: valore della misura\n- dx: errore della misura\n- unit: Opzionale, serve per impostare l'unit\u00c3\u00a0 di misura di x\n\n```python\n# Es: misuro x=45.890 +- 135\n>>> import texpy as tp\n>>> tp.ne(45890,135)\n'$(4.59 \\\\pm 0.01) \\\\times 10^{4}$'\n\n>>> tp.ne(67.5, 1.6, unit=\"kg\") # Il parametro unit imposta l'unit\u00c3\u00a0 in chili\n'$68 \\\\pm 2$kg'\n\n>>> tp.ne(65000, 300, \"V\") # Se l'ordine di grandezza di x risulta multiplo di 3 la funzione\n'$65.0 \\\\pm 0.3$kV' # aggiunge automaticamente il prefisso del SI adatto: 65000 V = 65 kV\n```\n\n### Tabella per latex\n\n`mat(Matrice, titolo=None, file=None)` Stampa su terminale una matrice fatta di stringhe in formato latex\n\n- Matrice: matrice fatta di stringhe contenente i valori da stampare\n- titolo: Opzionale, il titolo della tabella\n- file: Opzionale, file in cui la matrice viene stampata (ATTENZIONE SOVRASCRIVE IL FILE!)\n\n```python\n# Esempio:\n>>> import texpy as tp\n>>> M = [['guardati', 'l\\'attacco'],\n ['dei', 'giganti']]\n>>> tp.mat(M, 'titolo & a caso')\n```\n\nOutput:\n\n```latex\nCopia tutto quello che c'\u00c3\u00a8 tra le linee\n --------------------------\n \\begin{tabular}{cc}\n \\hline\n\ttitolo & a caso\\\\ \n \\hline\n\tguardati & l'attacco \\\\\n\tdei & giganti \\\\\n \\hline\n \\end{tabular}\n--------------------------\n```\n\nSe avessi scritto `tp.mat(M, 'titolo & a caso', file=\"myfile.txt\")` l'output sopra sarebbe stato scritto nel file `myfile.txt`\n\n### Notazione scientifica con valore ed errore separati\n\n`nes(x, dx=None, unit=None)` Ritorna due stringe, una col valore e l'altro con l'errore fatte in modo che abbiano\nlo stesso ordine di grandezza, in pratica \u00c3\u00a8 come la prima funzione ma valore ed errore sono in due stringhe diverse\n\n- x: valore della misura\n- dx: Opzionale, errore della misura\n- unit: Opzionale, serve per impostare l'unit\u00c3\u00a0 di misura di x\n\n```python\n# Es: misuro x = 45.890 +- 135\n>>> tp.nes(45897,135)\n(array('$4.59 \\\\times 10^{4}$', dtype='>> tp.nes(45890)\narray('$4.59 \\\\times 10^{4}$', dtype='>> tp.ne(6750, 16, unit=\"g\") # Il parametro unit imposta l'unit\u00c3\u00a0 di misura\n(array('$6.75$kg', dtype='>> import texpy as tp\n>>> tp.ns(45890)\n'$4.59 \\\\times 10^{4}$'\n\n# Es: Porto in notazione scientifica 45.890 con l'ordine di grandezza di 135\n>>> tp.ns(45890, 135)\n'$459 \\\\times 10^{2}$'\n\n# Es: Porto in notazione scientifica 45.890 con l'ordine di grandezza di 135 e\n# scrivo i numeri dopo la virgola fino all'ordine di grandezza di 3\n>>> tp.ns(45890, 135, 3)\n'$459.90 \\\\times 10^{2}$'\n\n>>> tp.ns(45890, 135, 3, \"F\") # Il parametro unit imposta l'unit\u00c3\u00a0 di misura\n'$45890$F'\n>>> tp.ns(45890, 1000, 3, \"F\") # la funzione automaticamente converte 45.890 * 10^3 F = 45.890 kF \n'$45.890$kF'\n```\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Francesco215/menzalib", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "texpy", "package_url": "https://pypi.org/project/texpy/", "platform": "", "project_url": "https://pypi.org/project/texpy/", "project_urls": { "Homepage": "https://github.com/Francesco215/menzalib" }, "release_url": "https://pypi.org/project/texpy/1.0.3/", "requires_dist": [ "numpy" ], "requires_python": "", "summary": "Funzioni utili per lab3", "version": "1.0.3" }, "last_serial": 5576636, "releases": { "0.8.0": [ { "comment_text": "", "digests": { "md5": "a76558b6cbd6d2ef5186b5b8aab363f1", "sha256": "2db12c6d8594c598a12635cb9a2d99b201be3a462a20f2243834cca65a70c01c" }, "downloads": -1, "filename": "texpy-0.8.0-py3-none-any.whl", "has_sig": false, "md5_digest": "a76558b6cbd6d2ef5186b5b8aab363f1", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4386, "upload_time": "2019-03-27T10:38:58", "url": "https://files.pythonhosted.org/packages/59/58/57697a189fff12ac31c660ee8074415a979ec459d426dca21c27dd664b7d/texpy-0.8.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ee51729ba0256173cece3a7f399b02a7", "sha256": "e56bcf5a91f276a9c633fcb2e8d6b0da34de0f0ebccfe5f9e4b7e78840a6372e" }, "downloads": -1, "filename": "texpy-0.8.0.tar.gz", "has_sig": false, "md5_digest": "ee51729ba0256173cece3a7f399b02a7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3172, "upload_time": "2019-03-27T10:39:00", "url": "https://files.pythonhosted.org/packages/d7/ed/20c33136562117735a277dfb0812a1e6f7cea8b3561963b3d17441daf8c9/texpy-0.8.0.tar.gz" } ], "0.8.1": [ { "comment_text": "", "digests": { "md5": "03a8edddfc3a7ce2d35add93f3e77e89", "sha256": "0e324cef9ee6c57f19a51f13c7e668bd45ed2e2d467a8e2d6264a3910d0ca998" }, "downloads": -1, "filename": "texpy-0.8.1-py3-none-any.whl", "has_sig": false, "md5_digest": "03a8edddfc3a7ce2d35add93f3e77e89", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4374, "upload_time": "2019-03-27T10:42:08", "url": "https://files.pythonhosted.org/packages/f0/09/4ad5feeb45d8d934b5d37d3ee75d4ea5ef7264f178be39678f3e65121612/texpy-0.8.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d6dbb73c50945d7ef49c21d5f7d14d3c", "sha256": "b516d4f19a1ec61340e5e1e3fa141dd4f74aec21ce0c90fe9cbba68aae723e18" }, "downloads": -1, "filename": "texpy-0.8.1.tar.gz", "has_sig": false, "md5_digest": "d6dbb73c50945d7ef49c21d5f7d14d3c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3155, "upload_time": "2019-03-27T10:42:09", "url": "https://files.pythonhosted.org/packages/63/fb/d98cdedf6d0d58c03343be43f5c5a23e07f092c10ac9fb01d52db6b67db3/texpy-0.8.1.tar.gz" } ], "0.8.2": [ { "comment_text": "", "digests": { "md5": "4c598198d09c56e15086b30dfcc98915", "sha256": "40dc767d19e8353152ec8efebde7267b3f2a32a56dda520076c55abd45cbaafd" }, "downloads": -1, "filename": "texpy-0.8.2-py3-none-any.whl", "has_sig": false, "md5_digest": "4c598198d09c56e15086b30dfcc98915", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5257, "upload_time": "2019-03-27T22:11:43", "url": "https://files.pythonhosted.org/packages/da/de/619b49df02c3cfcfe8fd2e2dbbecfd19839d70e28f98f54f6a23d9e8a7b3/texpy-0.8.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a19901d8f4e1f1aa29336153cb32e7d6", "sha256": "3129ebdf5237c780cf916abb22e15475499d432871a154098288bf67918e5da8" }, "downloads": -1, "filename": "texpy-0.8.2.tar.gz", "has_sig": false, "md5_digest": "a19901d8f4e1f1aa29336153cb32e7d6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4192, "upload_time": "2019-03-27T22:11:44", "url": "https://files.pythonhosted.org/packages/e5/25/4eb5aae1aae70be3c3cafe69bb70f0f74b318c767ad5a84cfad100d56804/texpy-0.8.2.tar.gz" } ], "0.8.3": [ { "comment_text": "", "digests": { "md5": "9e47a75d0423a6c203dea99f966a822f", "sha256": "e15dbc022b6423086389d781e14f1442374f06e02a73be0f8fdb3e152f232c44" }, "downloads": -1, "filename": "texpy-0.8.3-py3-none-any.whl", "has_sig": false, "md5_digest": "9e47a75d0423a6c203dea99f966a822f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5779, "upload_time": "2019-03-27T23:07:13", "url": "https://files.pythonhosted.org/packages/19/23/fbc9252b14db31d854b82194377e4c445a3d42d4885548da5f48fd468f2d/texpy-0.8.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2e40100bd8e9e2b61590b0e9ec191605", "sha256": "a97a83f40fe9cbaf9142324ff322409ee391ba5175c82fe2155cff269f6bed18" }, "downloads": -1, "filename": "texpy-0.8.3.tar.gz", "has_sig": false, "md5_digest": "2e40100bd8e9e2b61590b0e9ec191605", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4857, "upload_time": "2019-03-27T23:07:15", "url": "https://files.pythonhosted.org/packages/d2/cd/2f1e136961fb5d289f2f9e5f65da1eea017d35ab650ca14f1eb99be0ae86/texpy-0.8.3.tar.gz" } ], "0.8.4": [ { "comment_text": "", "digests": { "md5": "35603ed3b68bb5436309523e10fa3d81", "sha256": "15cf9cae3cad50f3d39f7c851574d80e6b3345cb6c671fe41b85724a2bcaef7e" }, "downloads": -1, "filename": "texpy-0.8.4-py3-none-any.whl", "has_sig": false, "md5_digest": "35603ed3b68bb5436309523e10fa3d81", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5775, "upload_time": "2019-03-27T23:14:08", "url": "https://files.pythonhosted.org/packages/07/02/7707f8b4b26d3355e1a3e1cf2102881100abae4f7be17f041184a6969bf8/texpy-0.8.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "19c1d598d495bbc521bf1a8e678a09af", "sha256": "3a30c59213a367bea46f49d66814c5d7621e8ef2a50358a28d86fc629adb98b5" }, "downloads": -1, "filename": "texpy-0.8.4.tar.gz", "has_sig": false, "md5_digest": "19c1d598d495bbc521bf1a8e678a09af", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4856, "upload_time": "2019-03-27T23:14:10", "url": "https://files.pythonhosted.org/packages/99/83/5764f312a854f7749dcdfb1bdfebf48837e22518da7d877d4bc47612b1c5/texpy-0.8.4.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "4a01ee8477c9147e419c68eddd989fbb", "sha256": "c3b934b29c3a447859a6b295118b7970d5c4e859c5c892d8856cb3a0c544706a" }, "downloads": -1, "filename": "texpy-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "4a01ee8477c9147e419c68eddd989fbb", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7154, "upload_time": "2019-05-17T15:16:50", "url": "https://files.pythonhosted.org/packages/7f/31/be0c9d82044fab9017643346c9aa9c435b27c917bbd7fc9b30a2079b48ab/texpy-1.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ed8974bb49714f16335257843fe655c6", "sha256": "ba9a68132211ed530254f1d71e297005ded6dfc64d018cdced4b097ad4dd7b4f" }, "downloads": -1, "filename": "texpy-1.0.0.tar.gz", "has_sig": false, "md5_digest": "ed8974bb49714f16335257843fe655c6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5980, "upload_time": "2019-05-17T15:16:51", "url": "https://files.pythonhosted.org/packages/fc/f7/783c68b2033a5852a18efc88e29ff7242c01148adf88f4cdf8ca3abc0316/texpy-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "28a0fde1d27c5b8adbf972f9b92d9e34", "sha256": "5a78f25a3fbfd7bc361dae2bbaf0b91fd9c02e55bd520d1ab91239bbdd24f146" }, "downloads": -1, "filename": "texpy-1.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "28a0fde1d27c5b8adbf972f9b92d9e34", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7226, "upload_time": "2019-07-23T21:18:55", "url": "https://files.pythonhosted.org/packages/80/8d/c5730a7d99bff317893c0b4ecf5324166faa18eae77833f916461e556935/texpy-1.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "99fabcf7190c9b9a6e5cd35e27db92f7", "sha256": "87c7f895823cb70b0cb90e350ebe793ae485e85e03480373c1556a34bba27152" }, "downloads": -1, "filename": "texpy-1.0.1.tar.gz", "has_sig": false, "md5_digest": "99fabcf7190c9b9a6e5cd35e27db92f7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6050, "upload_time": "2019-07-23T21:18:57", "url": "https://files.pythonhosted.org/packages/41/4e/72dcbc89751c442cd0a39a9b68bb81c1d83679e20b91fc7c0fdd1e92d0e5/texpy-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "48b26d7a938c714cf4ac35c75d6694dd", "sha256": "d7f6269583feb7d1df76ae311210787f7f5963600ea2b9fa20c67c2a037fb590" }, "downloads": -1, "filename": "texpy-1.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "48b26d7a938c714cf4ac35c75d6694dd", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7746, "upload_time": "2019-07-24T08:49:06", "url": "https://files.pythonhosted.org/packages/7a/c2/8155e7c6eb4f3a382493b2f8521b780f47afcb210296b7c783ce931bad9b/texpy-1.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7e34360bf200df366f37f6415031c2a9", "sha256": "7ed13de2419c46cd8c62f301076652dfc868db7052971227a5a1ae8b95775ca0" }, "downloads": -1, "filename": "texpy-1.0.2.tar.gz", "has_sig": false, "md5_digest": "7e34360bf200df366f37f6415031c2a9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6630, "upload_time": "2019-07-24T08:49:07", "url": "https://files.pythonhosted.org/packages/80/9a/54aa495ba756fd371c0b8705a8b54e75c64c82424e8ccb83386e08ac0905/texpy-1.0.2.tar.gz" } ], "1.0.3": [ { "comment_text": "", "digests": { "md5": "92cd5b9e315ebb122a4c61e8fe0a107d", "sha256": "c904233e3b2fc410e19b88ddd3ec0a78e245def8e6cb1b827334cfe68a6a22ab" }, "downloads": -1, "filename": "texpy-1.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "92cd5b9e315ebb122a4c61e8fe0a107d", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7752, "upload_time": "2019-07-24T08:52:01", "url": "https://files.pythonhosted.org/packages/b2/28/11287ba130df157bdf297785d330187a94a68a8621e7a33db00909f0de3f/texpy-1.0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7697708f1a9db0131f53495c4614c7dd", "sha256": "f4c47f77c68c9d6c94645e137d8805d40906264ed08bd0343b755f2ce7183be8" }, "downloads": -1, "filename": "texpy-1.0.3.tar.gz", "has_sig": false, "md5_digest": "7697708f1a9db0131f53495c4614c7dd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6633, "upload_time": "2019-07-24T08:52:02", "url": "https://files.pythonhosted.org/packages/b0/78/b83c682d64ad2fe7ea5b5e0a73b2c5e2b1a4cb97b726097a250be6597e48/texpy-1.0.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "92cd5b9e315ebb122a4c61e8fe0a107d", "sha256": "c904233e3b2fc410e19b88ddd3ec0a78e245def8e6cb1b827334cfe68a6a22ab" }, "downloads": -1, "filename": "texpy-1.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "92cd5b9e315ebb122a4c61e8fe0a107d", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7752, "upload_time": "2019-07-24T08:52:01", "url": "https://files.pythonhosted.org/packages/b2/28/11287ba130df157bdf297785d330187a94a68a8621e7a33db00909f0de3f/texpy-1.0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7697708f1a9db0131f53495c4614c7dd", "sha256": "f4c47f77c68c9d6c94645e137d8805d40906264ed08bd0343b755f2ce7183be8" }, "downloads": -1, "filename": "texpy-1.0.3.tar.gz", "has_sig": false, "md5_digest": "7697708f1a9db0131f53495c4614c7dd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6633, "upload_time": "2019-07-24T08:52:02", "url": "https://files.pythonhosted.org/packages/b0/78/b83c682d64ad2fe7ea5b5e0a73b2c5e2b1a4cb97b726097a250be6597e48/texpy-1.0.3.tar.gz" } ] }