Metadata-Version: 2.1
Name: numbits
Version: 0.0.1
Summary: Pack and unpack 1, 2 and 4 bit data to/from 8-bit numpy arrays.
Home-page: https://github.com/telegraphic/numbits
Author: Danny Price
Author-email: dancpr@berkeley.edu
License: UNKNOWN
Project-URL: Source, https://github.com/telegraphic/numbits
Project-URL: Bug Reports, https://github.com/telegraphic/numbits/issues
Description: # numbits
        
        ![Tests][tests]
        
        ## Pack and unpack 1, 2 and 4 bit data to/from 8-bit numpy arrays
        
        Motivated by radio astronomy, where low bitwidths are common.
        
        Project built with [**pybind11**][pybind]. Pack/unpack code based on [**sigpyproc**][sigpyproc].
        
        ## Installation
        
        ### On Unix (Linux, OS X)
        
        You can either:
        
        * Install numbits from PyPI with:
        
            ```bash
            pip install numbits
            ```
        
        or you can:
        
        * Clone this repository. and then:
          
          * Build shared object .so locally, using:
        
            ```bash
            python setup.py build_ext -i
            ```
        
          * Or install the package globally, using:
        
            ```bash
            python -m pip install .
            ```
        
            or:
        
            ```bash
            python setup.py install
            ```
        
        ### Test call
        
        ```python
        import numpy as np
        import numbits
        a = np.array([0, 1, 2, 3, 4, 5, 6, 7, 8], dtype='uint8')
        b = numbits.unpack(a, nbits=2)
        
        >>> array([0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 3, 0, 0, 1, 0, 0, 0,
                   1, 1, 0, 0, 1, 2, 0, 0, 1, 3, 0, 0, 2, 0], dtype=uint8)
        ```
        
        [tests]: https://github.com/astrogewgaw/numbits/actions/workflows/tests.yaml/badge.svg
        [pybind]: https://github.com/pybind/pybind11
        [sigpyproc]: https://github.com/FRBs/sigpyproc3
        
Platform: UNKNOWN
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Topic :: Scientific/Engineering :: Astronomy
Requires-Python: >=3.5, <4
Description-Content-Type: text/markdown
