Metadata-Version: 1.1
Name: ndarray-listener
Version: 1.0.15
Summary: Implementation of the Observer pattern for NumPy arrays.
Home-page: https://github.com/Horta/ndarray_listener
Author: Danilo Horta
Author-email: horta@ebi.ac.uk
License: MIT
Description: # ndarray_listener
        
        [![PyPIl](https://img.shields.io/pypi/l/ndarray-listener.svg?style=flat-square)](https://pypi.python.org/pypi/ndarray-listener/)
        [![PyPIv](https://img.shields.io/pypi/v/ndarray-listener.svg?style=flat-square)](https://pypi.python.org/pypi/ndarray-listener/)
        [![Anaconda-Server Badge](https://anaconda.org/conda-forge/ndarray_listener/badges/version.svg)](https://anaconda.org/conda-forge/ndarray_listener)
        
        Implementation of the [Observer pattern](https://en.wikipedia.org/wiki/Observer_pattern)
        for [NumPy](http://www.numpy.org) arrays.
        
        ## Example
        
        ```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)
        ```bash
        conda install -c conda-forge ndarray_listener
        ```
        
        An alternative way would be via pip
        ```bash
        pip install ndarray_listener
        ```
        
        
        ## Running the tests
        
        After installation, you can test it
        ```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](https://github.com/Horta)
        
        ## License
        
        This project is licensed under the MIT License - see the
        [LICENSE](LICENSE) file for details
        
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
Classifier: Framework :: Pytest
