Metadata-Version: 1.1
Name: ndarray-listener
Version: 1.0.16
Summary: Implementation of the Observer pattern for NumPy arrays.
Home-page: https://github.com/glimix/ndarray-listener
Author: Danilo Horta
Author-email: horta@ebi.ac.uk
License: MIT
Description: ndarray-listener
        ================
        
        |PyPIl| |PyPIv| |Anaconda-Server Badge|
        
        Implementation of the `Observer
        pattern <https://en.wikipedia.org/wiki/Observer_pattern>`__ for
        `NumPy <http://www.numpy.org>`__ arrays.
        
        Example
        -------
        
        .. code:: python
        
            from numpy import array
            from ndarray_listener import ndarray_listener as ndl
        
            a = ndl(array([-0.5, 0.1, 1.1]))
        
            class Observer(object):
              def __init__(self):
                self.called_me = False
        
              def __call__(self, _):
                self.called_me = True
        
            o = Observer()
            a.talk_to(o)
            print(o.called_me)
            a[0] = 1.2
            print(o.called_me)
        
        The output should be
        
        ::
        
            False
            True
        
        Installing
        ----------
        
        The recommended way of installing it is via
        `conda <http://conda.pydata.org/docs/index.html>`__
        
        .. code:: bash
        
            conda install -c conda-forge ndarray-listener
        
        An alternative way would be via pip
        
        .. code:: bash
        
            pip install ndarray-listener
        
        Running the tests
        -----------------
        
        After installation, you can test it
        
        .. code:: bash
        
            python -c "import ndarray_listener; ndarray_listener.test()"
        
        as long as you have `pytest <http://docs.pytest.org/en/latest/>`__.
        
        Authors
        -------
        
        -  **Danilo Horta** - https://github.com/Horta
        
        License
        -------
        
        This project is licensed under the MIT License - see the
        `LICENSE <LICENSE>`__ file for details
        
        Links
        -----
        
        -  `ndarray-listener-feedstock <https://github.com/conda-forge/ndarray-listener-feedstock>`__
        
        .. |PyPIl| image:: https://img.shields.io/pypi/l/ndarray-listener.svg?style=flat-square
           :target: https://pypi.python.org/pypi/ndarray-listener/
        .. |PyPIv| image:: https://img.shields.io/pypi/v/ndarray-listener.svg?style=flat-square
           :target: https://pypi.python.org/pypi/ndarray-listener/
        .. |Anaconda-Server Badge| image:: https://anaconda.org/conda-forge/ndarray-listener/badges/version.svg
           :target: https://anaconda.org/conda-forge/ndarray-listener
        
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Operating System :: OS Independent
