{ "info": { "author": "Alex Deich", "author_email": "", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Natural Language :: English", "Programming Language :: Python" ], "description": "# npdoc.py\n\nI do a lot of work entirely in an IPython notebook and it can be annoying to switch back and forth from a browser to the command line to look up function usage. I therefore wrote this little utility. Given a numpy function name, it will look up the function's source on GitHub, and parse the usage comment at the top of the function.\n\nThis code requires the BeautifulSoup 4 library, which is readily pip'd.\n\nHere's an example:\n\n```\n>> import npdoc\n\n>> npd('meshgrid')\n\n>> Return coordinate matrices from coordinate vectors.\n\n Make N-D coordinate arrays for vectorized evaluations of\n N-D scalar/vector fields over N-D grids, given\n one-dimensional coordinate arrays x1, x2,..., xn.\n\n .. versionchanged:: 1.9\n 1-D and 0-D cases are allowed.\n\n...\n```\n(Not showing the full output because there's a lot)\n\nYou can also specify to only see the first or last lines with the ```nl``` argument. A positive argument gives the first N lines:\n```\n>> import npdoc\n\n>> npd('meshgrid', nl = 4)\n\n>> Return coordinate matrices from coordinate vectors.\n\n Make N-D coordinate arrays for vectorized evaluations of\n N-D scalar/vector fields over N-D grids, given\n```\n\nAnd a negative argument gives the last N lines:\n```\n>> import npdoc\n\n>> npd('meshgrid', nl = -4)\n\n>> >>> y = np.arange(-5, 5, 0.1)\n >>> xx, yy = np.meshgrid(x, y, sparse=True)\n >>> z = np.sin(xx**2 + yy**2) / (xx**2 + yy**2)\n >>> h = plt.contourf(x,y,z)\n```\n\nNote: in the case of the base NumPy functions, like ```np.array```, the source is more difficult to get to and to parse (those functions are written in C, too), so in that case, ```npd()``` will just open a browser with the formatted webpage. If you just want to go straight to the formatted webpage anyway, just do ```npd('meshgrid', browser = True)```.", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/deichdeich/npdoc", "keywords": "", "license": "3-clause BSD style license", "maintainer": "", "maintainer_email": "", "name": "npdoc", "package_url": "https://pypi.org/project/npdoc/", "platform": "any", "project_url": "https://pypi.org/project/npdoc/", "project_urls": { "Homepage": "https://github.com/deichdeich/npdoc" }, "release_url": "https://pypi.org/project/npdoc/1.0.1/", "requires_dist": null, "requires_python": "", "summary": "In-notebook NumPy man pages", "version": "1.0.1" }, "last_serial": 3618176, "releases": { "1.0.1": [ { "comment_text": "", "digests": { "md5": "95d23671916d9ff3d837f0f49814db11", "sha256": "80649f4afad548f0fa666b4d122ddcd8284ac2dce3b2a1dee0c66cae707aad69" }, "downloads": -1, "filename": "npdoc-1.0.1.tar.gz", "has_sig": false, "md5_digest": "95d23671916d9ff3d837f0f49814db11", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2020, "upload_time": "2018-02-26T17:31:34", "url": "https://files.pythonhosted.org/packages/a1/b2/2e0ddedbe5cdcbe825708142fe858fa179fe3e61ac514ececd00ce9333fd/npdoc-1.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "95d23671916d9ff3d837f0f49814db11", "sha256": "80649f4afad548f0fa666b4d122ddcd8284ac2dce3b2a1dee0c66cae707aad69" }, "downloads": -1, "filename": "npdoc-1.0.1.tar.gz", "has_sig": false, "md5_digest": "95d23671916d9ff3d837f0f49814db11", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2020, "upload_time": "2018-02-26T17:31:34", "url": "https://files.pythonhosted.org/packages/a1/b2/2e0ddedbe5cdcbe825708142fe858fa179fe3e61ac514ececd00ce9333fd/npdoc-1.0.1.tar.gz" } ] }