Python extension that interacts with the J language
Project description
jruntime is a modern Python extension that interacts with the J language. It provides deep integration between Python and J in the following ways:
Takes over J engine I/O with Python I/O
Maps between J arrays and NumPy ndarrays, J boxes and Python tuples
Binds J nouns to lexical scopes using Python with statements
Handles J errors using Python exceptions
Emits the complete API document in help(jruntime)
Getting Started
Install jruntime and NumPy from PyPI:
pip install jruntime numpy
Now you can run J code and read data in NumPy arrays:
>>> import jruntime
>>> j = jruntime.Session()
>>> j.runsource('v =: 3 4 $ i.12')
>>> j['v']
array([[ 0, 1, 2, 3],
[ 4, 5, 6, 7],
[ 8, 9, 10, 11]], dtype=int64)
Or put Python data in J and run code that uses it:
>>> with j.let(title='Price', v=[.99, 1.48, 0.26]):
... j.runsource('title;+/ v')
+-----+----+
|Price|2.73|
+-----+----+
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file jruntime-0.2.0.post1-cp38-cp38-win_amd64.whl.
File metadata
- Download URL: jruntime-0.2.0.post1-cp38-cp38-win_amd64.whl
- Upload date:
- Size: 1.7 MB
- Tags: CPython 3.8, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0.post20210125 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
235371d08e689b06f5fe08b2249c022926e6c8f6187fe48b8f7b11ca1654025b
|
|
| MD5 |
a8ef5d830cd58315fbb28a558a0c9b6f
|
|
| BLAKE2b-256 |
93da2c5fc5de9bcfd28767e140adecd80056838160d297fa798c35e3d75ed144
|
File details
Details for the file jruntime-0.2.0.post1-cp38-cp38-manylinux_2_24_x86_64.whl.
File metadata
- Download URL: jruntime-0.2.0.post1-cp38-cp38-manylinux_2_24_x86_64.whl
- Upload date:
- Size: 2.3 MB
- Tags: CPython 3.8, manylinux: glibc 2.24+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0.post20210125 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e6b220ca3fe0b563615d7f9e160ef03911d27bf6e5c12c35d6624da866cd8128
|
|
| MD5 |
4d00a7293f58f353b75da3cb44d29568
|
|
| BLAKE2b-256 |
ab9382ea763d2f8ba89272cb8da05914e2d46827ef54d536e2c3c08e062edca5
|