{ "info": { "author": "Matthew Marshall", "author_email": "matthew@matthewmarshall.org", "bugtrack_url": null, "classifiers": [], "description": "===========\nStructArray\n===========\n\nStructArray allows you to perform fast arithmetic operations on\narrays of structured (or unstructured) data.\n\nThis library is useful for performing the same operation on every item in an\narray.\n\nI've included an example showing a simple particle engine. It animates 10,000\nparticles without much trouble.\n\n*This is the \"release early\" part of the \"release early, release often\"\nequation. It's 80% done. I just need to finish the other 80%.*\n\nQuick Introduction\n==================\n\nHere's a quick introduction to what you can do with it:\n\n>>> import structarray, random\n\nFirst, create a ``StructArray`` with attributes for position and velocity,\nstarting with a length of 1000.\n\n>>> particles = structarray.StructArray(('x', 'y', 'dx', 'dy'), size=10000)\n\nLet's give the particles a little random motion. We can loop through each item\nand assign attributes.\n\n>>> for p in particles:\n... p.dx = random.random() * 20 - 10\n... p.dy = random.random() * 50\n\nWe can also assign values by index like this:\n\n>>> particles[0].dy = 100\n\nOr we could assign all four values to an index:\n\n>>> particles[0] = (0, 20, 5, 100) # (x, y, dx, dy)\n\nWe can assign a value to every item by assigning it directly to an attribute of\nthe array:\n\n>>> particles.x = 0 # set x to zero for every item\n\nWe can also copy the values of one attribute into another:\n\n>>> particles.y = particles.x\n\nWe can also do arithmetic while we are at it:\n\n>>> particles.y = particles.x + 10\n\nSo now, how would we go about a simulation loop?\n\n>>> particles.x += particles.dx\n>>> particles.y += particles.dy\n>>> particles.dy -= 9.81\n\nWhat's important here is that each of these three operations is applied to\n*every* item in the array. And it all happens in a tight loop in C, so it's\n*very* fast. Even for 10,000 particles.\n\nSending the data off to the video card is pretty easy:\n\n>>> glVertexPointer(2, GL_FLOAT,\n... particles.get_data_stride(),\n... particles.get_data_addr())\n\nOf course there's more to it than that to get it to display. Check out the\nsource distribution for a working example\n\n\nDownload\n========\n\nI always upload the latest version to the `StructArray page on PyPI`__.\n\n__ http://cheeseshop.python.org/pypi/StructArray/\n\n\nInstallation\n============\n\nRun this command to download and install a precompiled binary.::\n\n sudo easy_install StructArray\n\nTo compile StructArray from source, you need the python development headers\ninstalled. (This is named ``python-dev`` in debian and ubuntu distributions.\nI think rpm distros name it ``python-devel``.)\n\nThe C files are included, so you don't need Pyrex installed. However, if you\n*do* have Pyrex, I've only tested it with Pyrex-0.9.6.3. Results may vary with\nolder versions.\n\nInstalling is just like most any other python module::\n\n python setup.py build\n sudo python setup.py install\n\n\nDocumentation\n=============\n\nYou can find the `StructArray reference documentation here`__\n\n__ http://matthewmarshall.org/projects/structarray/docs/structarray/\n\nIt's also included when you download the source distribution.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://matthewmarshall.org/projects/structarray/", "keywords": null, "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "StructArray", "package_url": "https://pypi.org/project/StructArray/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/StructArray/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://matthewmarshall.org/projects/structarray/" }, "release_url": "https://pypi.org/project/StructArray/0.1/", "requires_dist": null, "requires_python": null, "summary": "Fast operations on arrays of structured data.", "version": "0.1" }, "last_serial": 785736, "releases": { "0.1": [ { "comment_text": "built on Linux-2.6.22-14-generic-i686-with-glibc2.4", "digests": { "md5": "eb3452cabe7b224cd7172613decda84f", "sha256": "57489dfca4a230420bfd0dd5fc3174fd720832b8adc604b0d6010f517bd8d595" }, "downloads": -1, "filename": "StructArray-0.1-py2.4-linux-i686.egg", "has_sig": false, "md5_digest": "eb3452cabe7b224cd7172613decda84f", "packagetype": "bdist_egg", "python_version": "2.4", "requires_python": null, "size": 93497, "upload_time": "2007-11-22T01:29:41", "url": "https://files.pythonhosted.org/packages/fd/b4/fbbee75e89240654a1e9fcd046a6b62c8c79bad78ef294fa6c1b4a17abfc/StructArray-0.1-py2.4-linux-i686.egg" }, { "comment_text": "", "digests": { "md5": "2d4b25ed2dc42d6f1d9ff5851872c5a5", "sha256": "0f85fff5b99a174206eb565d92db61b11c74af67da2c91d1bd24789a990ba456" }, "downloads": -1, "filename": "StructArray-0.1-py2.5-linux-i686.egg", "has_sig": false, "md5_digest": "2d4b25ed2dc42d6f1d9ff5851872c5a5", "packagetype": "bdist_egg", "python_version": "2.5", "requires_python": null, "size": 93961, "upload_time": "2007-11-22T01:27:53", "url": "https://files.pythonhosted.org/packages/de/f4/db23b20fd15a93b8c7d0a2882aa8ba77a75e79ed6db69e2e92c678bb1259/StructArray-0.1-py2.5-linux-i686.egg" }, { "comment_text": "", "digests": { "md5": "7a22fa01b6cb8ad8910ad700002affd0", "sha256": "41811eab348b8c08607c6036f59de3c6b805a481218be233e2fc0e78f5905266" }, "downloads": -1, "filename": "StructArray-0.1-py2.5-win32.egg", "has_sig": false, "md5_digest": "7a22fa01b6cb8ad8910ad700002affd0", "packagetype": "bdist_egg", "python_version": "2.5", "requires_python": null, "size": 35667, "upload_time": "2007-11-22T01:30:03", "url": "https://files.pythonhosted.org/packages/68/e7/d1859136057fc9427078349174b6b0f965d92abc498484e7f9504aa6ea0e/StructArray-0.1-py2.5-win32.egg" }, { "comment_text": "", "digests": { "md5": "c9b478692b9de7577b317dab7624c6d9", "sha256": "b9b508bdfa64d41b4384ab3d699f054f15c33fc0c750d7bb2fbba8b632123e7d" }, "downloads": -1, "filename": "StructArray-0.1.tar.gz", "has_sig": false, "md5_digest": "c9b478692b9de7577b317dab7624c6d9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 54066, "upload_time": "2007-11-22T01:26:21", "url": "https://files.pythonhosted.org/packages/20/6f/68aad1203fd5bae9af02b179c38bea8a053a9dbdb8a07e95b34d5678f753/StructArray-0.1.tar.gz" }, { "comment_text": "", "digests": { "md5": "ca62a41765f40a25661d87b216c3349a", "sha256": "0eeb2923c6da64182c5094cb36c8be12a3cc17fed60f5f4830a0e24a6a797ec9" }, "downloads": -1, "filename": "StructArray-0.1.win32-py2.5.exe", "has_sig": false, "md5_digest": "ca62a41765f40a25661d87b216c3349a", "packagetype": "bdist_wininst", "python_version": "2.5", "requires_python": null, "size": 100524, "upload_time": "2007-11-22T01:35:11", "url": "https://files.pythonhosted.org/packages/4d/67/6f539c20c593bbc9f714467f8a960ec6d3cb8b74e4b729eca2c3b6bd540b/StructArray-0.1.win32-py2.5.exe" } ] }, "urls": [ { "comment_text": "built on Linux-2.6.22-14-generic-i686-with-glibc2.4", "digests": { "md5": "eb3452cabe7b224cd7172613decda84f", "sha256": "57489dfca4a230420bfd0dd5fc3174fd720832b8adc604b0d6010f517bd8d595" }, "downloads": -1, "filename": "StructArray-0.1-py2.4-linux-i686.egg", "has_sig": false, "md5_digest": "eb3452cabe7b224cd7172613decda84f", "packagetype": "bdist_egg", "python_version": "2.4", "requires_python": null, "size": 93497, "upload_time": "2007-11-22T01:29:41", "url": "https://files.pythonhosted.org/packages/fd/b4/fbbee75e89240654a1e9fcd046a6b62c8c79bad78ef294fa6c1b4a17abfc/StructArray-0.1-py2.4-linux-i686.egg" }, { "comment_text": "", "digests": { "md5": "2d4b25ed2dc42d6f1d9ff5851872c5a5", "sha256": "0f85fff5b99a174206eb565d92db61b11c74af67da2c91d1bd24789a990ba456" }, "downloads": -1, "filename": "StructArray-0.1-py2.5-linux-i686.egg", "has_sig": false, "md5_digest": "2d4b25ed2dc42d6f1d9ff5851872c5a5", "packagetype": "bdist_egg", "python_version": "2.5", "requires_python": null, "size": 93961, "upload_time": "2007-11-22T01:27:53", "url": "https://files.pythonhosted.org/packages/de/f4/db23b20fd15a93b8c7d0a2882aa8ba77a75e79ed6db69e2e92c678bb1259/StructArray-0.1-py2.5-linux-i686.egg" }, { "comment_text": "", "digests": { "md5": "7a22fa01b6cb8ad8910ad700002affd0", "sha256": "41811eab348b8c08607c6036f59de3c6b805a481218be233e2fc0e78f5905266" }, "downloads": -1, "filename": "StructArray-0.1-py2.5-win32.egg", "has_sig": false, "md5_digest": "7a22fa01b6cb8ad8910ad700002affd0", "packagetype": "bdist_egg", "python_version": "2.5", "requires_python": null, "size": 35667, "upload_time": "2007-11-22T01:30:03", "url": "https://files.pythonhosted.org/packages/68/e7/d1859136057fc9427078349174b6b0f965d92abc498484e7f9504aa6ea0e/StructArray-0.1-py2.5-win32.egg" }, { "comment_text": "", "digests": { "md5": "c9b478692b9de7577b317dab7624c6d9", "sha256": "b9b508bdfa64d41b4384ab3d699f054f15c33fc0c750d7bb2fbba8b632123e7d" }, "downloads": -1, "filename": "StructArray-0.1.tar.gz", "has_sig": false, "md5_digest": "c9b478692b9de7577b317dab7624c6d9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 54066, "upload_time": "2007-11-22T01:26:21", "url": "https://files.pythonhosted.org/packages/20/6f/68aad1203fd5bae9af02b179c38bea8a053a9dbdb8a07e95b34d5678f753/StructArray-0.1.tar.gz" }, { "comment_text": "", "digests": { "md5": "ca62a41765f40a25661d87b216c3349a", "sha256": "0eeb2923c6da64182c5094cb36c8be12a3cc17fed60f5f4830a0e24a6a797ec9" }, "downloads": -1, "filename": "StructArray-0.1.win32-py2.5.exe", "has_sig": false, "md5_digest": "ca62a41765f40a25661d87b216c3349a", "packagetype": "bdist_wininst", "python_version": "2.5", "requires_python": null, "size": 100524, "upload_time": "2007-11-22T01:35:11", "url": "https://files.pythonhosted.org/packages/4d/67/6f539c20c593bbc9f714467f8a960ec6d3cb8b74e4b729eca2c3b6bd540b/StructArray-0.1.win32-py2.5.exe" } ] }