Skip to content

Commit

Permalink
readme updated
Browse files Browse the repository at this point in the history
  • Loading branch information
pravirkr committed Apr 9, 2024
1 parent d3fdc73 commit a4c2344
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,26 @@ or you can:
python setup.py install
```

### Test call
### Usage

```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)
b = numbits.unpack(a, nbits=2, bitorder="big", parallel=False)
>>> 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)
```

### Benchmarks
| | |
| --------- | --------- |
| ![](tests/benchmarks/benchmark_unpack_1bit_little.png) | ![](tests/benchmarks/benchmark_unpack_1bit_big.png) |
| ![](tests/benchmarks/benchmark_pack_1bit_little.png) | ![](tests/benchmarks/benchmark_pack_1bit_big.png) |



[tests]: https://github.com/telegraphic/numbits/actions/workflows/tests.yaml/badge.svg
[pybind]: https://github.com/pybind/pybind11
[sigpyproc]: https://github.com/FRBs/sigpyproc3

0 comments on commit a4c2344

Please sign in to comment.