Skip to content

Instantly share code, notes, and snippets.

@thomasjpfan
Last active December 26, 2023 19:55
Show Gist options
  • Save thomasjpfan/6997465eea97c6eff8cb7786e21ea1b4 to your computer and use it in GitHub Desktop.
Save thomasjpfan/6997465eea97c6eff8cb7786e21ea1b4 to your computer and use it in GitHub Desktop.
rustimport in Jupyter!
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"id": "df322752-dd05-49bc-9dbf-93e13845cacc",
"metadata": {},
"outputs": [],
"source": [
"%load_ext rustimport"
]
},
{
"cell_type": "markdown",
"id": "bb5b6e33-3ee5-415a-bbdd-670170f8adb7",
"metadata": {},
"source": [
"## Default `rustimport` use case"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "79ca210d-cffb-406c-93c0-708f6041cd00",
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"\u001b[1m\u001b[32m Updating\u001b[0m crates.io index\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m target-lexicon v0.12.12\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m autocfg v1.1.0\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m proc-macro2 v1.0.71\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m once_cell v1.19.0\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m libc v0.2.151\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m unicode-ident v1.0.12\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m syn v1.0.109\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m parking_lot_core v0.9.9\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m scopeguard v1.2.0\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m cfg-if v1.0.0\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m smallvec v1.11.2\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m indoc v1.0.9\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m unindent v0.1.11\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m lock_api v0.4.11\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m memoffset v0.8.0\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m quote v1.0.33\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m parking_lot v0.12.1\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m pyo3-build-config v0.18.3\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m pyo3-ffi v0.18.3\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m pyo3 v0.18.3\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m pyo3-macros-backend v0.18.3\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m pyo3-macros v0.18.3\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m _rustimport_magic_e5dfadfc5bb39e0238e3c32f2ec401a15c04e323aa278ac5c164151552d5c987 v0.1.0 (/private/var/folders/9l/pvs3_wlj23z_qxd4m8dv9w300000gn/T/rustimport/_rustimport_magic_e5dfadfc5bb39e0238e3c32f2ec401a15c04e323aa278ac5c164151552d5c987-3c096ee00616eb579a14ff61b7a567a1/_rustimport_magic_e5dfadfc5bb39e0238e3c32f2ec401a15c04e323aa278ac5c164151552d5c987)\n",
"\u001b[1m\u001b[32m Finished\u001b[0m dev [unoptimized + debuginfo] target(s) in 4.09s\n"
]
}
],
"source": [
"%%rustimport\n",
"use pyo3::prelude::*;\n",
"\n",
"#[pyfunction]\n",
"fn square(x: i32) -> i32 {\n",
" x * x\n",
"}"
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "1f2d18b6-ec5a-4a02-9217-d34cbaf64ffe",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"81"
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"square(9)"
]
},
{
"cell_type": "markdown",
"id": "72d72379-9d6d-49e1-a1a8-aecc2a914816",
"metadata": {},
"source": [
"## Release mode"
]
},
{
"cell_type": "code",
"execution_count": 4,
"id": "aef1c50a-56e4-499d-8cca-c4cae559b77f",
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"\u001b[1m\u001b[32m Updating\u001b[0m crates.io index\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m target-lexicon v0.12.12\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m autocfg v1.1.0\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m once_cell v1.19.0\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m proc-macro2 v1.0.71\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m unicode-ident v1.0.12\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m libc v0.2.151\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m syn v1.0.109\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m parking_lot_core v0.9.9\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m scopeguard v1.2.0\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m smallvec v1.11.2\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m cfg-if v1.0.0\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m unindent v0.1.11\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m indoc v1.0.9\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m lock_api v0.4.11\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m memoffset v0.8.0\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m quote v1.0.33\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m pyo3-build-config v0.18.3\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m parking_lot v0.12.1\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m pyo3-ffi v0.18.3\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m pyo3 v0.18.3\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m pyo3-macros-backend v0.18.3\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m pyo3-macros v0.18.3\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m _rustimport_magic_533e0793f61ab2884b58b9463f00917f60772d0f9af2a1f62e1cd56024142137 v0.1.0 (/private/var/folders/9l/pvs3_wlj23z_qxd4m8dv9w300000gn/T/rustimport/_rustimport_magic_533e0793f61ab2884b58b9463f00917f60772d0f9af2a1f62e1cd56024142137-d11019df226c010dc75ffe845b9039b3/_rustimport_magic_533e0793f61ab2884b58b9463f00917f60772d0f9af2a1f62e1cd56024142137)\n",
"\u001b[1m\u001b[32m Finished\u001b[0m release [optimized] target(s) in 3.91s\n"
]
}
],
"source": [
"%%rustimport --release\n",
"use pyo3::prelude::*;\n",
"\n",
"#[pyfunction]\n",
"fn square(x: i32) -> i32 {\n",
" x * x\n",
"}"
]
},
{
"cell_type": "code",
"execution_count": 5,
"id": "ddcf7625-f569-4147-9ced-b7280b55adb8",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"144"
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"square(12)"
]
},
{
"cell_type": "markdown",
"id": "37c60adc-7d8b-4044-8b5d-6a0ad6cf7e29",
"metadata": {},
"source": [
"## Polars with `module-path-variable`"
]
},
{
"cell_type": "code",
"execution_count": 6,
"id": "70e016e1-3611-4ee9-8068-1d9357ad58bd",
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"\u001b[1m\u001b[32m Updating\u001b[0m crates.io index\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m autocfg v1.1.0\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m version_check v0.9.4\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m proc-macro2 v1.0.71\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m unicode-ident v1.0.12\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m cfg-if v1.0.0\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m libc v0.2.151\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m libm v0.2.8\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m once_cell v1.19.0\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m crossbeam-utils v0.8.18\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m rayon-core v1.12.0\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m thiserror v1.0.52\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m either v1.9.0\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m zerocopy v0.7.32\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m simdutf8 v0.1.4\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m target-features v0.1.5\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m allocator-api2 v0.2.16\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m syn v1.0.109\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m static_assertions v1.1.0\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m equivalent v1.0.1\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m memchr v2.6.4\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m fast-float v0.2.0\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m regex-syntax v0.8.2\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m atoi_simd v0.15.5\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m num-traits v0.2.17\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m ahash v0.8.6\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m smartstring v1.0.1\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m polars-utils v0.35.4\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m dyn-clone v1.0.16\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m itoa v1.0.10\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m strength_reduce v0.2.4\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m ethnum v1.5.0\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m streaming-iterator v0.1.9\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m aho-corasick v1.1.2\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m ppv-lite86 v0.2.17\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m foreign_vec v0.1.0\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m ryu v1.0.16\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m bitflags v2.4.1\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m heck v0.4.1\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m lock_api v0.4.11\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m parking_lot_core v0.9.9\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m rustversion v1.0.14\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m xxhash-rust v0.8.8\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m crossbeam-epoch v0.9.17\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m core-foundation-sys v0.8.6\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m quote v1.0.33\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m crossbeam-deque v0.8.4\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m syn v2.0.43\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m getrandom v0.2.11\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m smallvec v1.11.2\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m scopeguard v1.2.0\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m rand_core v0.6.4\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m iana-time-zone v0.1.58\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m target-lexicon v0.12.12\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m polars-core v0.35.4\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m rand_chacha v0.3.1\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m strum v0.25.0\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m regex-automata v0.4.3\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m unicode-width v0.1.11\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m rayon v1.8.0\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m rand v0.8.5\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m chrono v0.4.31\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m memmap2 v0.7.1\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m polars-ops v0.35.4\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m parking_lot v0.12.1\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m home v0.5.9\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m percent-encoding v2.3.1\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m bytes v1.5.0\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m crossterm v0.27.0\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m rand_distr v0.4.3\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m pyo3-build-config v0.20.0\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m argminmax v0.6.1\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m atoi v2.0.0\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m polars-plan v0.35.4\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m num-integer v0.1.45\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m memoffset v0.9.0\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m num-bigint v0.4.4\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m serde v1.0.193\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m now v0.1.3\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m polars v0.35.4\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m iter-read v0.3.1\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m indoc v2.0.4\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m unindent v0.2.3\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m byteorder v1.5.0\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m hashbrown v0.14.3\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m regex v1.10.2\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m pyo3-macros-backend v0.20.0\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m indexmap v2.1.0\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m pyo3-ffi v0.20.0\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m pyo3 v0.20.0\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m thiserror-impl v1.0.52\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m bytemuck_derive v1.5.0\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m strum_macros v0.25.3\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m serde_derive v1.0.193\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m multiversion-macros v0.7.3\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m bytemuck v1.14.0\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m polars-error v0.35.4\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m pyo3-macros v0.20.0\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m multiversion v0.7.3\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m comfy-table v7.1.0\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m polars-arrow v0.35.4\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m serde-pickle v1.1.1\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m polars-row v0.35.4\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m polars-io v0.35.4\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m polars-ffi v0.35.4\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m polars-time v0.35.4\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m pyo3-polars-derive v0.3.0\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m pyo3-polars v0.9.0\n",
"\u001b[1m\u001b[32m Compiling\u001b[0m _rustimport_magic_06db38430432e27188575ce1c14b39f1ee27ff352d9f7fdca865871363b2c279 v0.1.0 (/private/var/folders/9l/pvs3_wlj23z_qxd4m8dv9w300000gn/T/rustimport/_rustimport_magic_06db38430432e27188575ce1c14b39f1ee27ff352d9f7fdca865871363b2c279-dd4054a82e7839ab4eb7d2fa369d2b2f/_rustimport_magic_06db38430432e27188575ce1c14b39f1ee27ff352d9f7fdca865871363b2c279)\n",
"warning: unused variable: `m`\n",
" --> src/lib.rs:28:100\n",
" |\n",
"28 | fn _rustimport_magic_06db38430432e27188575ce1c14b39f1ee27ff352d9f7fdca865871363b2c279(_py: Python, m: &PyModule) -> PyResult<()> {\n",
" | ^ help: if this is intentional, prefix it with an underscore: `_m`\n",
" |\n",
" = note: `#[warn(unused_variables)]` on by default\n",
"\n",
"warning: 1 warning emitted\n",
"\n",
"\u001b[1m\u001b[32m Finished\u001b[0m dev [unoptimized + debuginfo] target(s) in 22.63s\n"
]
}
],
"source": [
"%%rustimport --module-path-variable=polars_lib\n",
"//: [dependencies]\n",
"//: polars = { version = \"*\" }\n",
"//: pyo3 = { version = \"*\", features = [\"extension-module\"] }\n",
"//: pyo3-polars = { version = \"0.9\", features = [\"derive\"] }\n",
"//: serde = { version = \"*\", features = [\"derive\"] }\n",
"\n",
"use pyo3::prelude::*;\n",
"use polars::prelude::*;\n",
"use pyo3_polars::derive::polars_expr;\n",
"use std::fmt::Write;\n",
"\n",
"fn pig_latin_str(value: &str, output: &mut String) {\n",
" if let Some(first_char) = value.chars().next() {\n",
" write!(output, \"{}{}ay\", &value[1..], first_char).unwrap()\n",
" }\n",
"}\n",
"\n",
"#[polars_expr(output_type=Utf8)]\n",
"fn pig_latinnify(inputs: &[Series]) -> PolarsResult<Series> {\n",
" let ca = inputs[0].utf8()?;\n",
" let out: Utf8Chunked = ca.apply_to_buffer(pig_latin_str);\n",
" Ok(out.into_series())\n",
"}"
]
},
{
"cell_type": "code",
"execution_count": 8,
"id": "e491f660-1af3-4214-a707-9e46687f9014",
"metadata": {},
"outputs": [],
"source": [
"import polars as pl\n",
"from polars.type_aliases import IntoExpr\n",
"\n",
"@pl.api.register_expr_namespace(\"language\")\n",
"class Language:\n",
" def __init__(self, expr: pl.Expr):\n",
" self._expr = expr\n",
"\n",
" def pig_latinnify(self) -> pl.Expr:\n",
" return self._expr.register_plugin(\n",
" lib=polars_lib,\n",
" symbol=\"pig_latinnify\",\n",
" is_elementwise=True,\n",
" )"
]
},
{
"cell_type": "code",
"execution_count": 9,
"id": "d421b07d-ff34-4abd-b9f2-158d9c2377f8",
"metadata": {},
"outputs": [],
"source": [
"import polars as pl\n",
"\n",
"df = pl.DataFrame(\n",
" {\n",
" \"convert\": [\"pig\", \"latin\", \"is\", \"silly\"],\n",
" }\n",
")\n",
"\n",
"out = df.with_columns(\n",
" pig_latin=pl.col(\"convert\").language.pig_latinnify(),\n",
")"
]
},
{
"cell_type": "code",
"execution_count": 10,
"id": "212d095c-f23a-441f-8072-bae360473c3f",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div><style>\n",
".dataframe > thead > tr,\n",
".dataframe > tbody > tr {\n",
" text-align: right;\n",
" white-space: pre-wrap;\n",
"}\n",
"</style>\n",
"<small>shape: (4, 2)</small><table border=\"1\" class=\"dataframe\"><thead><tr><th>convert</th><th>pig_latin</th></tr><tr><td>str</td><td>str</td></tr></thead><tbody><tr><td>&quot;pig&quot;</td><td>&quot;igpay&quot;</td></tr><tr><td>&quot;latin&quot;</td><td>&quot;atinlay&quot;</td></tr><tr><td>&quot;is&quot;</td><td>&quot;siay&quot;</td></tr><tr><td>&quot;silly&quot;</td><td>&quot;illysay&quot;</td></tr></tbody></table></div>"
],
"text/plain": [
"shape: (4, 2)\n",
"┌─────────┬───────────┐\n",
"│ convert ┆ pig_latin │\n",
"│ --- ┆ --- │\n",
"│ str ┆ str │\n",
"╞═════════╪═══════════╡\n",
"│ pig ┆ igpay │\n",
"│ latin ┆ atinlay │\n",
"│ is ┆ siay │\n",
"│ silly ┆ illysay │\n",
"└─────────┴───────────┘"
]
},
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"out"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "rustimport-dev (python3)",
"language": "python",
"name": "conda-env-rustimport-dev-py"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.13"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment