Metadata-Version: 2.1
Name: scikit-vectors
Version: 0.6.1
Summary: Functions to create n-dimensional vector classes
Home-page: https://github.com/t-o-k/scikit-vectors
Author: Tor Olav Kristensen
Author-email: tor.olav.k@gmail.com
License: BSD
Description: # Functions to make n-dimensional vector classes:
        
        [![Build Status](https://travis-ci.org/t-o-k/scikit-vectors.svg?branch=master)](https://travis-ci.org/t-o-k/scikit-vectors)
        
        * create_class_Fundamental_Vector
        * create_class_Simple_Vector
        * create_class_Vector
        * create_class_Cartesian_Vector
        * create_class_Cartesian_2D_Vector
        * create_class_Cartesian_3D_Vector
        * create_class_Versatile_Vector
        * create_class_Tolerant_Cartesian_Vector
        * create_class_Tolerant_Cartesian_2D_Vector
        * create_class_Tolerant_Cartesian_3D_Vector
        * create_class_Tolerant_Versatile_Vector
        
        ## Project homepage:
        
        https://github.com/t-o-k/scikit-vectors
        
        ## Installation:
        
        scikit-vectors requires Python version 3.5 or higher.
        
        ```shell
        pip install scikit-vectors
        ```
        
        ## Examples:
        
        ### Simple examples:
        
        ```python
        >>> from skvectors import create_class_Cartesian_3D_Vector
        >>> 
        >>> V3D = create_class_Cartesian_3D_Vector('V3D', 'xyz')
        >>> V3D(-1, 2, 4).cross(V3D(0, 3, -2))
        V3D(x=-16, y=-2, z=-3)
        >>> 
        ```
        
        ```python
        >>> from skvectors import create_class_Cartesian_Vector
        >>> 
        >>> V6D = create_class_Cartesian_Vector('V6D', [ 'first', 'second', 'third', 'fourth', 'fifth', 'sixth' ])
        >>> v = V6D(3.2, 1.1, 0.5, -2.9, 4.7, 2.4)
        >>> v.sixth = 9.9
        >>> v
        V6D(first=3.2, second=1.1, third=0.5, fourth=-2.9, fifth=4.7, sixth=9.9)
        >>> v.length()
        11.841030360572512
        >>> 
        ```
        
        ### Not so simple example with NumPy:
        
        ```python
        >>> from skvectors import create_class_Cartesian_3D_Vector
        >>> import numpy as np
        >>> 
        >>> NP3 = \
        ...     create_class_Cartesian_3D_Vector(
        ...         name = 'NP3',
        ...         component_names = [ chr(0x03b1)*2, chr(0x03b2)*2, chr(0x03b3)*2 ],
        ...         brackets = [ chr(0x2770)*2 + ' ', ' ' + chr(0x2771)*2 ],
        ...         sep = ', ',
        ...         cnull = np.array([ 0., 0., 0., 0., 0. ]),
        ...         cunit = np.array([ 1., 1., 1., 1., 1. ]),
        ...         functions = \
        ...             {
        ...                 'not': np.logical_not,
        ...                 'and': np.logical_and,
        ...                 'or': np.logical_or,
        ...                 'all': np.all,
        ...                 'any': np.any,
        ...                 'min': np.minimum,
        ...                 'max': np.maximum,
        ...                 'abs': np.absolute,
        ...                 'int': np.rint,
        ...                 'ceil': np.ceil,
        ...                 'copysign': np.copysign,
        ...                 'log10': np.log10,
        ...                 'cos': np.cos,
        ...                 'sin': np.sin,
        ...                 'atan2': np.arctan2,
        ...                 'pi': np.pi
        ...             }
        ...     )
        >>> NP3.component_names()
        ['αα', 'ββ', 'γγ']
        >>> v = \
        ...     NP3(
        ...         np.random.randint(0, 100, size=5),
        ...         np.random.randint(0, 100, size=5),
        ...         np.random.randint(0, 100, size=5)
        ...     )
        >>> v
        NP3(αα=array([30., 43., 71., 18., 61.]), ββ=array([98., 91., 76., 10., 92.]), γγ=array([23., 87., 76., 24., 68.]))
        >>> str(v)
        '❰❰ [30. 43. 71. 18. 61.], [98. 91. 76. 10. 92.], [23. 87. 76. 24. 68.] ❱❱'
        >>> u = NP3(1, -1, 0)
        >>> u
        NP3(αα=array([1., 1., 1., 1., 1.]), ββ=array([-1., -1., -1., -1., -1.]), γγ=array([0., 0., 0., 0., 0.]))
        >>> v.dot(u)
        array([-68., -48.,  -5.,   8., -31.])
        >>> v.axis_rotate(NP3(1, -2, 1), np.pi/4)
        NP3(αα=array([-27.33663766, -48.63172697, -15.85742691,  -2.94129394,
               -25.36927154]), ββ=array([85.27843393, 56.72182696, 52.78489506,  3.1911334 , 68.40280694]), γγ=array([ 54.89350552, 110.07538089, 116.42721703,  31.32356074,
               107.17488542]))
        >>> 
        ```
        
        Also have a look in the [examples folder](examples).
        
        Here's an image created in the Trefoil Knot Tube example:
        
        ![Trefoil Knot Tube](examples/Trefoil_Knot_230x180.png)
        
        More examples to come soon...
        
        ## Running the tests:
        
        ```shell
        cd scikit-vectors
        python3 -m unittest discover
        ```
        Here's more information:
        https://travis-ci.org/t-o-k/scikit-vectors
        
        ## License information:
        
        See the file LICENSE for information on terms & conditions for usage, and a DISCLAIMER OF ALL WARRANTIES.
        
        ## Author:
        
        Tor Olav Kristensen
        
        http://subcube.com
        
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Education
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Topic :: Multimedia :: Graphics :: 3D Modeling
Classifier: Topic :: Scientific/Engineering :: Mathematics
Classifier: Topic :: Scientific/Engineering :: Visualization
Classifier: Topic :: Software Development
Description-Content-Type: text/markdown
