Metadata-Version: 1.1
Name: ndarray-listener
Version: 1.1.0
Summary: Implementation of the Observer pattern for NumPy arrays
Home-page: https://github.com/limix/ndarray-listener
Author: Danilo Horta
Author-email: horta@ebi.ac.uk
License: MIT
Download-URL: https://github.com/limix/ndarray-listener
Description-Content-Type: text/markdown
Description: ndarray-listener
        ================
        
        |Travis| |AppVeyor| |Read the Docs (version)|
        
        Implementation of the `Observer
        pattern <https://en.wikipedia.org/wiki/Observer_pattern>`__ for NumPy
        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
        
        Install
        -------
        
        From command line, enter
        
        .. code:: bash
        
            pip install ndarray-listener
        
        Running the tests
        -----------------
        
        Install dependencies
        
        .. code:: bash
        
            pip install -U pytest pytest-pep8
        
        then run
        
        .. code:: python
        
            python -c "import ndarray_listener; ndarray_listener.test()"
        
        Authors
        -------
        
        -  `Danilo Horta <https://github.com/horta>`__
        
        License
        -------
        
        This project is licensed under the `MIT
        License <https://raw.githubusercontent.com/limix/ndarray-listener/master/LICENSE.md>`__.
        
        .. |Travis| image:: https://img.shields.io/travis/limix/ndarray-listener.svg?style=flat-square&label=linux%20%2F%20macos%20build
           :target: https://travis-ci.org/limix/ndarray-listener
        .. |AppVeyor| image:: https://img.shields.io/appveyor/ci/Horta/ndarray-listener.svg?style=flat-square&label=windows%20build
           :target: https://ci.appveyor.com/project/Horta/ndarray-listener
        .. |Read the Docs (version)| image:: https://img.shields.io/readthedocs/ndarray-listener/stable.svg?style=flat-square
           :target: http://ndarray-listener.readthedocs.io/
        
Keywords: numpy,listener,array
Platform: Windows
Platform: MacOS
Platform: POSIX
Platform: Linux
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
