https://github.com/vmchale/pybqn
BQN↔NumPy bridge
https://github.com/vmchale/pybqn
Last synced: about 1 year ago
JSON representation
BQN↔NumPy bridge
- Host: GitHub
- URL: https://github.com/vmchale/pybqn
- Owner: vmchale
- License: other
- Created: 2023-02-08T23:14:48.000Z (over 3 years ago)
- Default Branch: canon
- Last Pushed: 2025-03-15T16:18:14.000Z (about 1 year ago)
- Last Synced: 2025-04-04T08:01:36.119Z (about 1 year ago)
- Language: Jupyter Notebook
- Size: 81.1 KB
- Stars: 20
- Watchers: 3
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: COPYING
Awesome Lists containing this project
README
# BQN↔NumPy bridge
```python
>>> import numpy as np
>>> import bqn
>>> bqn.bqn('{(+´÷≠)˘7↕𝕩}',np.arange(0,10,dtype=np.int32))
array([3, 4, 5, 6], dtype=int8)
>>> bqn.bqn('¯1⊑(1⊸+⥊+)○≠(⌊`⊢⌊⊏⊸»∘⊢-0∾1+⊣)˝=⌜⟜⌽',"kitten","sitting")
3.0
```
## Installation
Install the BQN C library, `libcbqn.so` (`libcbqn.dylib` on Mac) to `/usr/local/lib`, and headers. Then:
```
pip3 install pybqn
```
## Limitations
- Only supports integer and floating-point types.
- Can't marshal Python integer scalars to BQN.
- Doesn't marshal BQN strings to Python