{"id":24054,"library":"mo-vector","title":"mo-vector","description":"mo-vector is a Python library providing efficient vector operations and support for vector data structures, built on top of mo-libs. The latest version is 0.1.13, with a focus on numerical computing and data manipulation. Development is active, with releases on PyPI.","status":"active","version":"0.1.13","language":"python","source_language":"en","source_url":"https://github.com/klahnakoski/mo-vector","tags":["vector","arrays","math","mo-libs","data-structures"],"install":[{"cmd":"pip install mo-vector","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Core dependency for data structure operations.","package":"mo-dots","optional":false},{"reason":"JSON serialization/deserialization support.","package":"mo-json","optional":false}],"imports":[{"note":"Old import path using dots instead of underscore.","wrong":"from mo.vector import vector","symbol":"vector","correct":"from mo_vector import vector"}],"quickstart":{"code":"from mo_vector import vector\n\n# Create a vector\nv = vector([1, 2, 3])\nprint(v)  # Output: [1, 2, 3]\n\n# Vector operations\nv2 = vector([4, 5, 6])\nprint(v + v2)  # Addition\nprint(v * 2)   # Scalar multiplication\n\n# Dot product\nprint(v.dot(v2))","lang":"python","description":"Basic usage of mo-vector: creating vectors and performing operations."},"warnings":[{"fix":"Use `from mo_vector import vector` instead.","message":"Version 0.1.0 changed the import structure from dot-separated packages to underscores. Old imports like `from mo.vector import vector` will break.","severity":"breaking","affected_versions":"<0.1.0"},{"fix":"If you need a list, call `list(result)` explicitly.","message":"The `vector` class's `__add__` method previously returned a new list. As of 0.1.10, it returns a `vector` object. Code relying on list output may break.","severity":"deprecated","affected_versions":"<0.1.10"},{"fix":"Use `v1 @ v2` or `v1.dot(v2)` for dot product.","message":"Vector operations (addition, multiplication) are element-wise by default, not matrix multiplication. Use `@` operator for dot product if available, or `.dot()` method.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Install mo-vector and use `from mo_vector import vector`.","cause":"Importing using incorrect dotted path instead of underscore.","error":"ModuleNotFoundError: No module named 'mo'"},{"fix":"Use `.values` attribute or `list(vector)` to get indexable object.","cause":"Attempting to index a vector like a list.","error":"TypeError: 'vector' object does not support indexing"},{"fix":"Convert the list to a vector: `vector(mylist).dot(other_vector)`.","cause":"Trying to call .dot() on a Python list instead of a mo_vector object.","error":"AttributeError: 'list' object has no attribute 'dot'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}