{ "info": { "author": "Guldjan Kupen", "author_email": "guldjan.kupen@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "# matrix_vector\r\nA python package for matrices and vectors operations.\r\nThe package implements two classes - Vector and Matrix.\r\n\r\n class Vector:\r\n # Vector#__init__(self, *args)\r\n Initialize a Vector object.\r\n\r\n Example:\r\n >> Vector(1, 2, 3)\r\n => \r\n\r\n Arguments:\r\n N numbers\r\n\r\n # Vector#size(self)\r\n Returns the size of the vector(number of coordinates).\r\n Example:\r\n\r\n >> Vector(1, 2, 3).size\r\n => 3\r\n\r\n Arguments:\r\n No arguments\r\n\r\n # Vector#__add__(self, other)\r\n Adds two vectors or adds a number to the elements of vector. Returns a new object.\r\n \r\n Example:\r\n >> Vector(1, 2, 3) + Vector(4, 5, 6)\r\n => Vector(5, 7, 9)\r\n \r\n Example:\r\n >> Vector(1, 2, 3) + 3\r\n => Vector(4, 5, 6)\r\n \r\n Arguments:\r\n vector : (Vector)\r\n or\r\n number : (Numeric)\r\n\r\n # Vector#__sub__(self, other)\r\n Substracts two vectors or substracts a number from the elements of the vector. Returns a new object.\r\n \r\n Example:\r\n >> Vector(1, 2, 3) - Vector(4, 5, 6)\r\n => Vector(-3, -3, -3)\r\n \r\n Example:\r\n >> Vector(1, 2, 3) - 3\r\n => Vector(-2, -1, 0)\r\n \r\n Arguments:\r\n vector : (Vector)\r\n or\r\n number : (Numeric)\r\n\r\n # Vector#__iadd__(self, other)\r\n Adds two vectors or adds a number to the elements of the vector. Changes the object.\r\n\r\n Example:\r\n >> Vector(1, 2, 3) += Vector(4, 5, 6)\r\n => Vector(5, 7, 9)\r\n\r\n Example:\r\n >> Vector(1, 2, 3) += 3\r\n => Vector(4, 5, 6)\r\n\r\n Arguments:\r\n vector : (Vector)\r\n or\r\n number : (Numeric)\r\n\r\n # Vector#__isub__(self, other)\r\n Substracts two vectors or substracts a number from the elements of the vector. Changes the object.\r\n\r\n Example:\r\n >> Vector(1, 2, 3) -= Vector(4, 5, 6)\r\n => Vector(-3, -3, -3)\r\n\r\n Example:\r\n >> Vector(1, 2, 3) -= 3\r\n => Vector(-2, -1, 0)\r\n\r\n Arguments:\r\n vector : (Vector)\r\n or\r\n number : (Numeric)\r\n\r\n # Vector#__getitem__(self, key)\r\n Access elements of the vector with [] operator\r\n\r\n Example:\r\n >> Vector(1, 2, 3)[2]\r\n => 3\r\n\r\n Arguments:\r\n number : (int)\r\n\r\n # Vector#__mul__(self, other)\r\n Depending on the argument either multiplies a number with the elements of the vector or finds the scalar product of two vectors.\r\n Example:\r\n >> Vector(1, 2, 3) * 2\r\n => Vector(2, 4, 6)\r\n\r\n Example(scalar product):\r\n >> Vector(1, 2, 3) * Vector(2, 2, 2)\r\n => 12\r\n\r\n Arguments:\r\n number : (Numeric)\r\n or\r\n vector : (Vector)\r\n\r\n # Vector#__imul__(self, other)\r\n Multiplies a number with the elements of the vector changing the object.\r\n\r\n Example:\r\n >> Vector(1, 2, 3) * 2\r\n => Vector(2, 4, 6)\r\n\r\n Arguments:\r\n number : (Numeric)\r\n\r\n # Vector#__xor__(self, other)\r\n Returns the cross product of two 3-dimension vectors. Returns new object.\r\n\r\n Example:\r\n >> Vector(1, 2, 3) ^ Vector(4, 5, 6)\r\n => Vector(-3, 6, -3)\r\n\r\n Arguments:\r\n vector : (Vector)\r\n\r\n # Vector#__ixor__(self, other)\r\n Returns the scalar product of two 3-dimension vectors. Changes the object.\r\n\r\n Example:\r\n >> Vector(1, 2, 3) ^ Vector(4, 5, 6)\r\n => Vector(-3, 6, -3)\r\n\r\n Arguments:\r\n vector : (Vector)\r\n\r\n # Vector#__truediv__(self, other)\r\n Divides the elements of the vector by a nubmer. Returns new object.\r\n\r\n Example:\r\n >> Vector(3, 9, 6) / 3\r\n => Vector(1, 3, 2)\r\n\r\n Arguments:\r\n number : (Numeric)\r\n\r\n # Vector#__itruediv__(self, other)\r\n Divides the elements of the vector by a nubmer. Changes the object.\r\n\r\n Example:\r\n >> Vector(3, 9, 6) / 3\r\n => Vector(1, 3, 2)\r\n \r\n Arguments:\r\n number : (Numeric) \r\n\r\n # Vector#length(self)\r\n Returns the length of the vector.\r\n \r\n Example:\r\n >> Vector(1, 2, 3).length\r\n => 3.7416\r\n\r\n Arguments:\r\n No arguments\r\n\r\n # Vector#normalized(self)\r\n Returns the normalized vector of the vector.\r\n\r\n Example:\r\n >> Vector(1, 2, 3).normalized()\r\n => Vector(0.2673, 0.5345, 0.8018)\r\n\r\n Arguments:\r\n No arguments\r\n\r\n # Vector#normalize(self)\r\n Normalizes the vector. Changes the object.\r\n\r\n Example:\r\n >> Vector(1, 2, 3).normalize()\r\n => Vector(0.2673, 0.5345, 0.8018)\r\n\r\n Arguments:\r\n No arguments\r\n\r\n # Vector#round(self, number):\r\n Rounds the coordinates of the vector. Changes the object.\r\n\r\n Example:\r\n >> Vector(1.345, 2.438, 3.535).round(2)\r\n => Vector(1.34, 2.44, 3.53)\r\n\r\n Arguments:\r\n number : (int)\r\n\r\n\r\n\r\n class Matrix:\r\n # Matrix#__init__(self, *rows)\r\n\t Initialize Matrix object.\r\n\r\n\t\tExample:\r\n\t\t>> Matrix([1, 2, 3], [4, 5, 6], [7, 8, 9])\r\n\t\t=> \r\n\r\n\t\tExample:\r\n\t\t>> Matrix(Vector(1, 2, 3), Vector(4, 5, 6), Vector(7, 8, 9))\r\n\t\t=> \r\n\r\n\t\tArguments:\r\n\t\tN sequences or N vectors of the same size\r\n \r\n # Matrix#rows(self)\r\n\t Returns the number of rows of the matrix.\r\n\r\n\t\tExample:\r\n\t\t>> Matrix([1, 2, 3], [4, 5, 6], [7, 8, 9]).rows()\r\n\t\t=> 3\r\n\r\n\t\tArguments:\r\n\t\tNo arguments\r\n\r\n # Matrix#colums(self)\r\n\t Returns the number of colums of the matrix.\r\n\r\n\t\tExample:\r\n\t\t>> Matrix([1, 2, 3], [4, 5, 6], [7, 8, 9]).colums()\r\n\t\t=> 3\r\n\r\n\t\tArguments:\r\n\t\tNo arguments\r\n\r\n # Matrix#get_colum(self, number)\r\n\t Returns the n-th colum of the matrix as an object of class Vector.\r\n\t\t\r\n\t\tExample:\r\n\t\t>> Matrix([1, 2, 3], [4, 5, 6], [7, 8, 9]).get_colum(1)\r\n\t\t=> Vector(2, 5, 8)\r\n\r\n\t\tArguments:\r\n\t\tnumber : (int)\r\n\r\n # Matrix#get_row(self, number)\r\n\t Returns the n-th row of the matrix as an object of class Vector.\r\n\r\n\t\tExample:\r\n\t\t>> Matrix([1, 2, 3], [4, 5, 6], [7, 8, 9]).get_row(1)\r\n\t\t=> Vector(4, 5, 6)\r\n\r\n\t\tArguments:\r\n\t\tnumber : (int)\r\n\r\n # Matrix#is_same_dimension(self, matrix)\r\n\t Boolean method checkig if two matrices have the same dimensions.\r\n\r\n\t\tExample:\r\n\t\t>> Matrix([1, 2], [4, 5]).is_same_dimension(Matrix([3, 2], [6, 7]))\r\n\t\t=> True\r\n\r\n\t\tArguments:\r\n\t\tmatrix : (Matrix)\r\n\r\n # Matrix#__add__(self, other)\r\n\t Depending on the argument either adds a number to the elements of the matrix or adds two matrices. Returns a new object.\r\n\r\n\t\tExample(number):\r\n\t\t>> Matrix([1, 2, 3], [4, 5, 6], [7, 8, 9]) + 2\r\n\t\t=> Matrix([3, 4, 5], [6, 7, 8], [9, 10, 11])\r\n\t\t\r\n\t\tExample(matrix):\r\n\t\t>> Matrix([1, 2, 3], [4, 5, 6], [7, 8, 9]) + Matrix([1, 2, 3], [4, 5, 6], [7, 8, 9])\r\n\t\t=> Matrix([2, 4, 6], [8, 10, 12], [14, 16, 18])\r\n\r\n\t\tArguments:\r\n\t\tnumber : (Numeric)\r\n\t\tor\r\n\t\tmatrix : (Matrix)\r\n\r\n # Matrix#__iadd__(self, other)\r\n\t Depending on the argument either adds a number to the elements of the matrix or adds two matrices. Changes the object.\r\n\r\n\t\tExample(number):\r\n\t\t>> Matrix([1, 2, 3], [4, 5, 6], [7, 8, 9]) + 2\r\n\t\t=> Matrix([3, 4, 5], [6, 7, 8], [9, 10, 11])\r\n\r\n\t\tExample(matrix):\r\n\t\t>> Matrix([1, 2, 3], [4, 5, 6], [7, 8, 9]) + Matrix([1, 2, 3], [4, 5, 6], [7, 8, 9])\r\n\t\t=> Matrix([2, 4, 6], [8, 10, 12], [14, 16, 18])\r\n\r\n\t\tArguments:\r\n\t\tnumber : (Numeric)\r\n\t\tor\r\n\t\tmatrix : (Matrix)\r\n\r\n # Matrix#__sub__(self, other)\r\n\t Depending on the argument either substracts a number from the elements of the matrix or substracts two matrices. Returns a new object.\r\n\t\t\r\n\t\tExample(number):\r\n\t\t>> Matrix([1, 2, 3], [4, 5, 6], [7, 8, 9]) - 2\r\n\t\t=> Matrix([-1, 0, 1], [2, 3, 4], [5, 6, 7])\r\n\r\n\t\tExample(matrix):\r\n\t\t>> Matrix([1, 2, 3], [4, 5, 6], [7, 8, 9]) - Matrix([1, 1, 3], [2, 5, 7], [2, 3, 4])\r\n\t\t=> Matrix([0, 1, 0], [2, 0, -1], [5, 5, 5])\r\n\r\n\t\tArguments:\r\n\t\tnumber : (Numeric)\r\n\t\tor\r\n\t\tmatrix : (Matrix)\r\n\r\n # Matrix#__isub__(self, other)\r\n\t Depending on the argument either substracts a number from the elements of the matrix or substracts two matrices. Changes the object.\r\n\r\n\t\tExample(number):\r\n\t\t>> Matrix([1, 2, 3], [4, 5, 6], [7, 8, 9]) - 2\r\n\t\t=> Matrix([-1, 0, 1], [2, 3, 4], [5, 6, 7])\r\n\r\n\t\tExample(matrix):\r\n\t\t>> Matrix([1, 2, 3], [4, 5, 6], [7, 8, 9]) - Matrix([1, 1, 3], [2, 5, 7], [2, 3, 4])\r\n\t\t=> Matrix([0, 1, 0], [2, 0, -1], [5, 5, 5])\r\n\r\n\t\tArguments:\r\n\t\tnumber : (Numeric)\r\n\t\tor\r\n\t\tmatrix : (Matrix)\r\n\r\n # Matrix#__getitem__(self, index)\r\n\t Access the elements of the matrix with the [] operator.\r\n\r\n\t\tExample:\r\n\t\t>> Matrix([1, 2, 3], [4, 5, 6], [7, 8, 9])[1]\r\n\t\t=> Vector(4, 5, 6)\r\n\r\n\t\tExample:\r\n\t\t>> Matrix([1, 2, 3], [4, 5, 6], [7, 8, 9])[1][2]\r\n\t\t=> 6\r\n\r\n\t\tArguments:\r\n\t\tnumber : (int)\r\n\r\n # Matrix#transposed(self)\r\n\t Tranposes a matrix. Returns a new object.\r\n\t\t\r\n\t\tExample:\r\n\t\t>> Matrix([1, 2, 3], [4, 5, 6], [7, 8, 9]).transposed()\r\n\t\t=> Matrix([1, 4, 7], [2, 5, 8], [3, 6, 9])\r\n\r\n\t\tArguments:\r\n\t\tNo arguments\r\n\r\n # Matrix#transpose(self)\r\n\t Tranposes a matrix. Changes the object.\r\n\r\n\t\tExample:\r\n\t\t>> Matrix([1, 2, 3], [4, 5, 6], [7, 8, 9]).transpose()\r\n\t\t=> Matrix([1, 4, 7], [2, 5, 8], [3, 6, 9])\r\n\t\tArguments:\r\n\t\tNo arguments\r\n\r\n # Matrix#__mul__(self, other)\r\n\t Depending on the argument eigher multiplies the matrix elements with a number or mlultiplies two matrices.\r\n\t\t\r\n\t\tExample:\r\n\t\t>> Matrix([1, 2, 3], [4, 5, 6], [7, 8, 9]) * 2\r\n\t\t=> Matrix([2, 4, 6], [8, 10, 12], [14, 16, 18])\r\n\t\t\r\n\t\tExample:\r\n\t\t>> Matrix([1, 2, 3], [4, 5, 6], [7, 8, 9]) * Matrix([1, 2, 3], [4, 5, 6], [7, 8, 9])\r\n\t\t=> Matrix([30, 36, 42], [66, 81, 96], [102, 126, 150])\r\n\t\tArguments:\r\n\t\tnumber : (Numeric)\r\n\t\tmatrix : (Matrix)\r\n\r\n # Matrix#minor(self, i, j)\r\n\t Returns a matrix without the row and the colum given as arguments.\r\n\r\n\t\tExample:\r\n\t\t>> Matrix([1, 2, 3], [4, 5, 6], [7, 8, 9]).minor(0, 1)\r\n\t\t=> Matrix([4, 6], [7, 9])\r\n\r\n\t\tArguments:\r\n\t\tnumber1 : (int)\r\n\t\tnumber2 : (int)\r\n\r\n # Matrix#determinant(self)\r\n\t Finds the determinant of a square matrix.\r\n\r\n\t\tExample:\r\n\t\t>> Matrix([1, 2, 3], [4, 5, 6], [7, 8, 9]).determinant()\r\n\t\t=> 0\r\n\r\n\t\tExample:\r\n\t\t>> Matrix([1, 3, 5], [-4, 7, 1], [5, -2, 1]).determinant()\r\n\t\t=> -99\r\n\r\n\t\tArguments:\r\n\t\tno arguments\r\n\r\n # Matrix#inversed(self)\r\n\t Finds the inverse of a square matrix.\r\n\r\n\t\tExample:\r\n\t\t>> Matrix([3, 4], [5, 2]).inversed()\r\n\t\t=> Matrix([-0.1428, 0.2857], [0.3571 ,-0.2142])\r\n\r\n\t\tArguments:\r\n\t\tno arguments\r\n\r\n # Matrix#round(self, number)\r\n\t Rounds the elements of the matrix. Changes the object.\r\n\r\n Example:\r\n >> Matrix([-0.093, 0.131, 0.323], [-0.092, 0.242, 0.211], [0.272, -0.173, -0.192]).round(2)\r\n => Matrix([-0.09, 0.13, 0.32], [-0.09, 0.24, 0.21], [0.27, -0.17, -0.19])\r\n\r\n Arguments:\r\n number : (int)", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Guldjan/matrix_vector", "keywords": null, "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "matrix_vector", "package_url": "https://pypi.org/project/matrix_vector/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/matrix_vector/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/Guldjan/matrix_vector" }, "release_url": "https://pypi.org/project/matrix_vector/0.1.2/", "requires_dist": null, "requires_python": null, "summary": "A python package for matrices and vectors operations.", "version": "0.1.2" }, "last_serial": 1628207, "releases": { "0.0.0": [ { "comment_text": "", "digests": { "md5": "6ba3dc714e3a41450c3a02046344e234", "sha256": "e00d07a14bc1d6eb4b689b7c1d0fc2271ca9cf21e3a6128c9bda7fffd2728db7" }, "downloads": -1, "filename": "matrix_vector-0.0.0-cp34-none-win_amd64.whl", "has_sig": false, "md5_digest": "6ba3dc714e3a41450c3a02046344e234", "packagetype": "bdist_wheel", "python_version": "cp34", "requires_python": null, "size": 2317, "upload_time": "2015-05-15T12:45:28", "url": "https://files.pythonhosted.org/packages/bd/a1/6fc24e4e755580bd17f2fe2e2f36f23715e9fdd95605cc4835b8ff66653b/matrix_vector-0.0.0-cp34-none-win_amd64.whl" }, { "comment_text": "", "digests": { "md5": "8893fc58341a0e1a96c12accae15e814", "sha256": "25ef53f8b6a9d96b008e58dd2fc57732874c1170323963666ecb1d8c23b6ae2e" }, "downloads": -1, "filename": "matrix_vector-0.0.0.zip", "has_sig": false, "md5_digest": "8893fc58341a0e1a96c12accae15e814", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2507, "upload_time": "2015-05-15T12:45:31", "url": "https://files.pythonhosted.org/packages/b6/9f/f4463b91e7abd8c114b6aaa23ff4e699635098a63645411509e1e96b27b2/matrix_vector-0.0.0.zip" } ], "0.0.1": [ { "comment_text": "", "digests": { "md5": "6cae9422c5e2461f62584020a8364f0a", "sha256": "53b6f8b94e3292b188566bdad2d248c71a4d31fb66abd4c5e63a40e1607737a3" }, "downloads": -1, "filename": "matrix_vector-0.0.1.zip", "has_sig": false, "md5_digest": "6cae9422c5e2461f62584020a8364f0a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6876, "upload_time": "2015-07-09T15:56:22", "url": "https://files.pythonhosted.org/packages/60/98/b14d4cf13a054b85e16ddf10c87b1c76d568408c6c5bf1758529e3c92f01/matrix_vector-0.0.1.zip" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "27e1ee28cb70960239d2771e806c346e", "sha256": "95c2a15ad17b9a45a1e63b08f01b17dd5ac9ceb15bfb02cadcbca61e639c59f8" }, "downloads": -1, "filename": "matrix_vector-0.0.2.zip", "has_sig": false, "md5_digest": "27e1ee28cb70960239d2771e806c346e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8208, "upload_time": "2015-07-09T20:18:04", "url": "https://files.pythonhosted.org/packages/7a/73/4de4543f89f53654a0153a38ba52ada833268a9831e2616facb4ac8f3430/matrix_vector-0.0.2.zip" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "2d56d6300d5ce6eafdc65c28758514c0", "sha256": "fa3e574341103aeaece4c7e4d31f8a5e95fd45e1ec37610d593e6258385877a9" }, "downloads": -1, "filename": "matrix_vector-0.1.2.zip", "has_sig": false, "md5_digest": "2d56d6300d5ce6eafdc65c28758514c0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8621, "upload_time": "2015-07-10T19:47:04", "url": "https://files.pythonhosted.org/packages/8a/5e/ee91500b316b17bf743fb79c544605e143930fc20e97cef58469a2c5c33f/matrix_vector-0.1.2.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "2d56d6300d5ce6eafdc65c28758514c0", "sha256": "fa3e574341103aeaece4c7e4d31f8a5e95fd45e1ec37610d593e6258385877a9" }, "downloads": -1, "filename": "matrix_vector-0.1.2.zip", "has_sig": false, "md5_digest": "2d56d6300d5ce6eafdc65c28758514c0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8621, "upload_time": "2015-07-10T19:47:04", "url": "https://files.pythonhosted.org/packages/8a/5e/ee91500b316b17bf743fb79c544605e143930fc20e97cef58469a2c5c33f/matrix_vector-0.1.2.zip" } ] }