Skip to content

Commit

Permalink
Updated version
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas authored and Thomas committed Feb 27, 2025
1 parent 1ea4eee commit ad7f2e0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 155 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "righor"
version = "0.2.93"
version = "0.2.94"
edition = "2021"
license = "MIT"
repository = "https://github.com/Thopic/righor"
Expand Down
162 changes: 8 additions & 154 deletions Examples.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -45,160 +45,14 @@
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"thread '<unnamed>' panicked at /home/thomas/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ndarray-0.16.1/src/arraytraits.rs:36:5:\n",
"ndarray: index out of bounds\n",
"stack backtrace:\n",
" 0: std::panicking::begin_panic\n",
" at /rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14/library/std/src/panicking.rs:734:5\n",
" 1: ndarray::arraytraits::array_out_of_bounds\n",
" at /home/thomas/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ndarray-0.16.1/src/arraytraits.rs:36:5\n",
" 2: ndarray::arraytraits::<impl core::ops::index::Index<I> for ndarray::ArrayBase<S,D>>::index::{{closure}}\n",
" at /home/thomas/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ndarray-0.16.1/src/arraytraits.rs:67:40\n",
" 3: core::option::Option<T>::unwrap_or_else\n",
" at /rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14/library/core/src/option.rs:1010:21\n",
" 4: ndarray::arraytraits::<impl core::ops::index::Index<I> for ndarray::ArrayBase<S,D>>::index\n",
" at /home/thomas/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ndarray-0.16.1/src/arraytraits.rs:67:22\n",
" 5: righor::shared::markov_chain::DNAMarkovChain::precompute_degenerate\n",
" at ./src/shared/markov_chain.rs:228:70\n",
" 6: righor::shared::markov_chain::DNAMarkovChain::precompute\n",
" at ./src/shared/markov_chain.rs:107:9\n",
" 7: righor::shared::markov_chain::DNAMarkovChain::new\n",
" at ./src/shared/markov_chain.rs:78:9\n",
" 8: <righor::vdj::model::Model as righor::shared::model::Modelable>::uniform\n",
" at ./src/vdj/model.rs:391:39\n",
" 9: <righor::vj::model::Model as righor::shared::model::Modelable>::uniform\n",
" at ./src/vj/model.rs:291:20\n",
" 10: righor::shared::model::Model::uniform\n",
" at ./src/shared/model.rs:268:39\n",
" 11: righor::PyModel::uniform\n",
" at ./src/lib.rs:220:20\n",
" 12: righor::PyModel::__pymethod_uniform__\n",
" at ./src/lib.rs:77:1\n",
" 13: pyo3::impl_::trampoline::noargs::{{closure}}\n",
" at /home/thomas/.cargo/registry/src/index.crates.io-6f17d22bba15001f/pyo3-0.22.6/src/impl_/trampoline.rs:34:21\n",
" 14: pyo3::impl_::trampoline::trampoline::{{closure}}\n",
" at /home/thomas/.cargo/registry/src/index.crates.io-6f17d22bba15001f/pyo3-0.22.6/src/impl_/trampoline.rs:188:54\n",
" 15: std::panicking::try::do_call\n",
" at /rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14/library/std/src/panicking.rs:554:40\n",
" 16: std::panicking::try\n",
" at /rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14/library/std/src/panicking.rs:518:19\n",
" 17: std::panic::catch_unwind\n",
" at /rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14/library/std/src/panic.rs:345:14\n",
" 18: pyo3::impl_::trampoline::trampoline\n",
" at /home/thomas/.cargo/registry/src/index.crates.io-6f17d22bba15001f/pyo3-0.22.6/src/impl_/trampoline.rs:188:9\n",
" 19: pyo3::impl_::trampoline::noargs\n",
" at /home/thomas/.cargo/registry/src/index.crates.io-6f17d22bba15001f/pyo3-0.22.6/src/impl_/trampoline.rs:34:5\n",
" 20: righor::_::__INVENTORY::trampoline\n",
" at ./src/lib.rs:77:1\n",
" 21: method_vectorcall_NOARGS\n",
" at /tmp/python-build.20241021214719.82636/Python-3.12.0/Objects/descrobject.c:454:24\n",
" 22: _PyObject_VectorcallTstate\n",
" at /tmp/python-build.20241021214719.82636/Python-3.12.0/./Include/internal/pycore_call.h:92:11\n",
" 23: PyObject_Vectorcall\n",
" at /tmp/python-build.20241021214719.82636/Python-3.12.0/Objects/call.c:325:12\n",
" 24: _PyEval_EvalFrameDefault\n",
" at /tmp/python-build.20241021214719.82636/Python-3.12.0/Python/bytecodes.c:2711:19\n",
" 25: _PyEval_EvalFrame\n",
" at /tmp/python-build.20241021214719.82636/Python-3.12.0/./Include/internal/pycore_ceval.h:88:16\n",
" 26: _PyEval_Vector\n",
" at /tmp/python-build.20241021214719.82636/Python-3.12.0/Python/ceval.c:1675:12\n",
" 27: PyEval_EvalCode\n",
" at /tmp/python-build.20241021214719.82636/Python-3.12.0/Python/ceval.c:570:21\n",
" 28: builtin_exec_impl\n",
" at /tmp/python-build.20241021214719.82636/Python-3.12.0/Python/bltinmodule.c:1096:17\n",
" 29: builtin_exec\n",
" at /tmp/python-build.20241021214719.82636/Python-3.12.0/Python/clinic/bltinmodule.c.h:586:20\n",
" 30: _PyEval_EvalFrameDefault\n",
" at /tmp/python-build.20241021214719.82636/Python-3.12.0/Python/bytecodes.c:2971:19\n",
" 31: _PyEval_EvalFrame\n",
" at /tmp/python-build.20241021214719.82636/Python-3.12.0/./Include/internal/pycore_ceval.h:88:16\n",
" 32: gen_send_ex2\n",
" at /tmp/python-build.20241021214719.82636/Python-3.12.0/Objects/genobject.c:230:14\n",
" 33: gen_send_ex\n",
" at /tmp/python-build.20241021214719.82636/Python-3.12.0/Objects/genobject.c:274:9\n",
" 34: gen_send\n",
" at /tmp/python-build.20241021214719.82636/Python-3.12.0/Objects/genobject.c:297:12\n",
" 35: _PyEval_EvalFrameDefault\n",
" at /tmp/python-build.20241021214719.82636/Python-3.12.0/Python/bytecodes.c:3090:19\n",
" 36: _PyObject_VectorcallTstate\n",
" at /tmp/python-build.20241021214719.82636/Python-3.12.0/./Include/internal/pycore_call.h:92:11\n",
" 37: method_vectorcall\n",
" at /tmp/python-build.20241021214719.82636/Python-3.12.0/Objects/classobject.c:61:18\n",
" 38: _PyVectorcall_Call\n",
" at /tmp/python-build.20241021214719.82636/Python-3.12.0/Objects/call.c:283:24\n",
" 39: _PyObject_Call\n",
" at /tmp/python-build.20241021214719.82636/Python-3.12.0/Objects/call.c:354:16\n",
" 40: _PyEval_EvalFrameDefault\n",
" at /tmp/python-build.20241021214719.82636/Python-3.12.0/Python/bytecodes.c:3259:26\n",
" 41: _PyEval_EvalFrame\n",
" at /tmp/python-build.20241021214719.82636/Python-3.12.0/./Include/internal/pycore_ceval.h:88:16\n",
" 42: gen_send_ex2\n",
" at /tmp/python-build.20241021214719.82636/Python-3.12.0/Objects/genobject.c:230:14\n",
" 43: PyGen_am_send\n",
" at /tmp/python-build.20241021214719.82636/Python-3.12.0/Objects/genobject.c:267:12\n",
" 44: task_step_impl\n",
" at /tmp/python-build.20241021214719.82636/Python-3.12.0/./Modules/_asynciomodule.c:2826:22\n",
" 45: task_step\n",
" at /tmp/python-build.20241021214719.82636/Python-3.12.0/./Modules/_asynciomodule.c:3127:11\n",
" 46: cfunction_vectorcall_O\n",
" at /tmp/python-build.20241021214719.82636/Python-3.12.0/Objects/methodobject.c:509:24\n",
" 47: _PyObject_VectorcallTstate\n",
" at /tmp/python-build.20241021214719.82636/Python-3.12.0/./Include/internal/pycore_call.h:92:11\n",
" 48: context_run\n",
" at /tmp/python-build.20241021214719.82636/Python-3.12.0/Python/context.c:668:29\n",
" 49: cfunction_vectorcall_FASTCALL_KEYWORDS\n",
" at /tmp/python-build.20241021214719.82636/Python-3.12.0/Objects/methodobject.c:438:24\n",
" 50: _PyEval_EvalFrameDefault\n",
" at /tmp/python-build.20241021214719.82636/Python-3.12.0/Python/bytecodes.c:3259:26\n",
" 51: _PyEval_EvalFrame\n",
" at /tmp/python-build.20241021214719.82636/Python-3.12.0/./Include/internal/pycore_ceval.h:88:16\n",
" 52: _PyEval_Vector\n",
" at /tmp/python-build.20241021214719.82636/Python-3.12.0/Python/ceval.c:1675:12\n",
" 53: PyEval_EvalCode\n",
" at /tmp/python-build.20241021214719.82636/Python-3.12.0/Python/ceval.c:570:21\n",
" 54: builtin_exec_impl\n",
" at /tmp/python-build.20241021214719.82636/Python-3.12.0/Python/bltinmodule.c:1096:17\n",
" 55: builtin_exec\n",
" at /tmp/python-build.20241021214719.82636/Python-3.12.0/Python/clinic/bltinmodule.c.h:586:20\n",
" 56: cfunction_vectorcall_FASTCALL_KEYWORDS\n",
" at /tmp/python-build.20241021214719.82636/Python-3.12.0/Objects/methodobject.c:438:24\n",
" 57: _PyObject_VectorcallTstate\n",
" at /tmp/python-build.20241021214719.82636/Python-3.12.0/./Include/internal/pycore_call.h:92:11\n",
" 58: PyObject_Vectorcall\n",
" at /tmp/python-build.20241021214719.82636/Python-3.12.0/Objects/call.c:325:12\n",
" 59: _PyEval_EvalFrameDefault\n",
" at /tmp/python-build.20241021214719.82636/Python-3.12.0/Python/bytecodes.c:2711:19\n",
" 60: pymain_run_module\n",
" at /tmp/python-build.20241021214719.82636/Python-3.12.0/Modules/main.c:300:14\n",
" 61: pymain_run_python\n",
" at /tmp/python-build.20241021214719.82636/Python-3.12.0/Modules/main.c:604:21\n",
" 62: Py_RunMain\n",
" at /tmp/python-build.20241021214719.82636/Python-3.12.0/Modules/main.c:689:5\n",
" 63: pymain_main\n",
" at /tmp/python-build.20241021214719.82636/Python-3.12.0/Modules/main.c:719:12\n",
" 64: Py_BytesMain\n",
" at /tmp/python-build.20241021214719.82636/Python-3.12.0/Modules/main.c:743:12\n",
" 65: __libc_start_call_main\n",
" at ./csu/../sysdeps/nptl/libc_start_call_main.h:58:16\n",
" 66: __libc_start_main_impl\n",
" at ./csu/../csu/libc-start.c:360:3\n",
" 67: _start\n",
"note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.\n"
]
},
{
"ename": "PanicException",
"evalue": "ndarray: index out of bounds",
"output_type": "error",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mPanicException\u001b[0m Traceback (most recent call last)",
"Cell \u001b[0;32mIn[2], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m \u001b[43migor_model\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43muniform\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\n",
"\u001b[0;31mPanicException\u001b[0m: ndarray: index out of bounds"
]
"data": {
"text/plain": [
"<Model at 0x5cae81430d60>"
]
},
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
Expand Down

0 comments on commit ad7f2e0

Please sign in to comment.