pytensor 2.13.1__tar.gz → 2.14.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pytensor-2.13.1 → pytensor-2.14.0}/PKG-INFO +2 -3
- {pytensor-2.13.1 → pytensor-2.14.0}/pyproject.toml +2 -2
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/_version.py +3 -3
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/compile/function/pfunc.py +105 -4
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/graph/basic.py +39 -37
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/graph/replace.py +90 -41
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/tensor/random/basic.py +60 -21
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/tensor/random/op.py +39 -86
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/tensor/random/utils.py +49 -2
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/tensor/rewriting/linalg.py +2 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor.egg-info/PKG-INFO +2 -3
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor.egg-info/requires.txt +1 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/LICENSE.txt +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/MANIFEST.in +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/README.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/bin/__init__.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/bin/pytensor-cache +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/bin/pytensor_cache.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/.templates/PLACEHOLDER +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/.templates/layout.html +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/LICENSE.txt +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/README.md +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/acknowledgement.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/bcast.png +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/bcast.svg +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/conf.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/core_development_guide.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/css.inc +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/dev_start_guide.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/environment.yml +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/extending/apply.png +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/extending/apply.svg +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/extending/apply2.svg +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/extending/creating_a_c_op.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/extending/creating_a_numba_jax_op.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/extending/creating_an_op.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/extending/ctype.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/extending/extending_faq.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/extending/extending_pytensor_solution_1.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/extending/graph_rewriting.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/extending/graphstructures.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/extending/index.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/extending/inplace.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/extending/op.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/extending/other_ops.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/extending/pics/symbolic_graph_opt.png +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/extending/pics/symbolic_graph_unopt.png +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/extending/pipeline.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/extending/scan.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/extending/tips.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/extending/type.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/extending/unittest.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/extending/using_params.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/faq.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/generate_dtype_tensor_table.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/glossary.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/images/Elman_srnn.png +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/images/PyTensor_RGB.svg +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/images/blocksparse.png +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/images/lstm.png +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/images/lstm_memorycell.png +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/images/talk2010.gif +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/images/talk2010.png +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/index.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/install.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/internal/how_to_release.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/internal/index.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/internal/metadocumentation.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/introduction.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/library/compile/debugmode.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/library/compile/function.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/library/compile/index.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/library/compile/io.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/library/compile/mode.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/library/compile/nanguardmode.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/library/compile/opfromgraph.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/library/compile/ops.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/library/compile/profilemode.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/library/compile/shared.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/library/config.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/library/d3viz/examples/d3viz/css/d3-context-menu.css +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/library/d3viz/examples/d3viz/css/d3viz.css +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/library/d3viz/examples/d3viz/js/d3-context-menu.js +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/library/d3viz/examples/d3viz/js/d3.v3.min.js +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/library/d3viz/examples/d3viz/js/d3viz.js +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/library/d3viz/examples/d3viz/js/dagre-d3.min.js +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/library/d3viz/examples/d3viz/js/graphlib-dot.min.js +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/library/d3viz/examples/mlp.html +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/library/d3viz/examples/mlp.png +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/library/d3viz/examples/mlp2.html +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/library/d3viz/examples/mlp2.pdf +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/library/d3viz/examples/mlp2.png +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/library/d3viz/examples/ofg.html +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/library/d3viz/examples/ofg2.html +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/library/d3viz/index.ipynb +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/library/d3viz/index.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/library/d3viz/index_files/index_10_0.png +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/library/d3viz/index_files/index_11_0.png +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/library/d3viz/index_files/index_24_0.png +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/library/d3viz/index_files/index_25_0.png +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/library/gradient.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/library/graph/features.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/library/graph/fgraph.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/library/graph/graph.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/library/graph/index.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/library/graph/op.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/library/graph/type.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/library/graph/utils.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/library/index.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/library/misc/pkl_utils.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/library/printing.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/library/sandbox/index.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/library/sandbox/linalg.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/library/scalar/index.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/library/scan.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/library/sparse/index.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/library/sparse/sandbox.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/library/tensor/basic.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/library/tensor/basic_opt.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/library/tensor/bcast.png +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/library/tensor/bcast.svg +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/library/tensor/conv.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/library/tensor/elemwise.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/library/tensor/extra_ops.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/library/tensor/fft.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/library/tensor/index.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/library/tensor/io.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/library/tensor/math_opt.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/library/tensor/nlinalg.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/library/tensor/plot_fft.png +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/library/tensor/random/basic.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/library/tensor/random/index.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/library/tensor/random/utils.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/library/tensor/slinalg.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/library/tensor/utils.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/library/typed_list.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/links.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/optimizations.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/pylintrc +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/sandbox/ccodegen.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/sandbox/compilation.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/sandbox/debugging_with_stepmode.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/sandbox/elemwise_compiler.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/sandbox/function.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/sandbox/functional.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/sandbox/how_to_make_ops.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/sandbox/index.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/sandbox/index2.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/sandbox/interactive_debugger.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/sandbox/logistic_regression_example.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/sandbox/performance.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/sandbox/randomnumbers.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/sandbox/rethinkccodegen.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/sandbox/sandbox.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/sandbox/software.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/sandbox/sparse.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/sandbox/tensoroptools.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/scripts/docgen.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/troubleshooting.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/tutorial/adding.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/tutorial/adding_solution_1.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/tutorial/aliasing.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/tutorial/apply.png +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/tutorial/apply.svg +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/tutorial/bcast.png +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/tutorial/broadcasting.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/tutorial/conditions.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/tutorial/debug_faq.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/tutorial/dlogistic.png +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/tutorial/examples.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/tutorial/faq_tutorial.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/tutorial/gradients.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/tutorial/index.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/tutorial/loading_and_saving.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/tutorial/logistic.gp +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/tutorial/logistic.png +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/tutorial/loop.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/tutorial/loop_solution_1.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/tutorial/modes.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/tutorial/modes_solution_1.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/tutorial/multi_cores.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/tutorial/nan_tutorial.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/tutorial/pics/d3viz.png +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/tutorial/pics/logreg_pydotprint_predict.png +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/tutorial/pics/logreg_pydotprint_prediction.png +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/tutorial/pics/logreg_pydotprint_train.png +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/tutorial/printing_drawing.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/tutorial/profiling.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/tutorial/profiling_example.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/tutorial/profiling_example_out.prof +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/tutorial/shape_info.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/tutorial/sparse.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/tutorial/symbolic_graphs.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/doc/user_guide.rst +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/__init__.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/bin/__init__.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/bin/pytensor_cache.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/breakpoint.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/compile/__init__.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/compile/builders.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/compile/compiledir.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/compile/compilelock.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/compile/debugmode.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/compile/function/__init__.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/compile/function/types.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/compile/io.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/compile/mode.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/compile/monitormode.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/compile/nanguardmode.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/compile/ops.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/compile/profiling.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/compile/sharedvalue.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/configdefaults.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/configparser.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/d3viz/__init__.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/d3viz/css/d3-context-menu.css +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/d3viz/css/d3viz.css +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/d3viz/d3viz.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/d3viz/formatting.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/d3viz/js/d3-context-menu.js +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/d3viz/js/d3.v3.min.js +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/d3viz/js/d3viz.js +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/d3viz/js/dagre-d3.min.js +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/d3viz/js/graphlib-dot.min.js +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/gradient.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/graph/__init__.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/graph/destroyhandler.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/graph/features.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/graph/fg.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/graph/null_type.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/graph/op.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/graph/rewriting/__init__.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/graph/rewriting/basic.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/graph/rewriting/db.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/graph/rewriting/kanren.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/graph/rewriting/unify.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/graph/rewriting/utils.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/graph/type.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/graph/utils.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/ifelse.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/link/__init__.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/link/basic.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/link/c/__init__.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/link/c/basic.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/link/c/c_code/lazylinker_c.c +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/link/c/c_code/pytensor_mod_helper.h +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/link/c/cmodule.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/link/c/cutils.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/link/c/cvm.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/link/c/exceptions.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/link/c/interface.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/link/c/lazylinker_c.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/link/c/op.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/link/c/params_type.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/link/c/type.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/link/jax/__init__.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/link/jax/dispatch/__init__.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/link/jax/dispatch/basic.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/link/jax/dispatch/elemwise.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/link/jax/dispatch/extra_ops.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/link/jax/dispatch/nlinalg.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/link/jax/dispatch/random.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/link/jax/dispatch/scalar.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/link/jax/dispatch/scan.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/link/jax/dispatch/shape.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/link/jax/dispatch/slinalg.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/link/jax/dispatch/sparse.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/link/jax/dispatch/subtensor.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/link/jax/dispatch/tensor_basic.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/link/jax/linker.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/link/numba/__init__.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/link/numba/dispatch/__init__.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/link/numba/dispatch/basic.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/link/numba/dispatch/cython_support.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/link/numba/dispatch/elemwise.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/link/numba/dispatch/elemwise_codegen.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/link/numba/dispatch/extra_ops.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/link/numba/dispatch/nlinalg.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/link/numba/dispatch/random.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/link/numba/dispatch/scalar.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/link/numba/dispatch/scan.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/link/numba/dispatch/sparse.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/link/numba/dispatch/tensor_basic.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/link/numba/linker.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/link/utils.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/link/vm.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/misc/__init__.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/misc/check_blas.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/misc/check_blas_many.sh +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/misc/check_duplicate_key.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/misc/elemwise_openmp_speedup.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/misc/elemwise_time_test.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/misc/frozendict.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/misc/may_share_memory.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/misc/ordered_set.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/misc/pkl_utils.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/misc/safe_asarray.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/printing.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/py.typed +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/raise_op.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/scalar/__init__.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/scalar/basic.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/scalar/c_code/Faddeeva.cc +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/scalar/c_code/Faddeeva.hh +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/scalar/c_code/gamma.c +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/scalar/loop.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/scalar/math.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/scalar/sharedvar.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/scan/__init__.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/scan/basic.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/scan/checkpoints.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/scan/op.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/scan/rewriting.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/scan/scan_perform.pyx +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/scan/scan_perform_ext.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/scan/utils.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/scan/views.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/sparse/__init__.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/sparse/basic.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/sparse/rewriting.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/sparse/sandbox/__init__.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/sparse/sandbox/sp.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/sparse/sandbox/sp2.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/sparse/sharedvar.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/sparse/type.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/sparse/utils.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/tensor/__init__.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/tensor/basic.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/tensor/blas.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/tensor/blas_c.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/tensor/blas_headers.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/tensor/blas_scipy.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/tensor/c_code/alt_blas_common.h +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/tensor/c_code/alt_blas_template.c +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/tensor/c_code/dimshuffle.c +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/tensor/conv/__init__.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/tensor/conv/abstract_conv.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/tensor/elemwise.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/tensor/elemwise_cgen.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/tensor/exceptions.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/tensor/extra_ops.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/tensor/fft.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/tensor/fourier.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/tensor/inplace.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/tensor/io.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/tensor/linalg.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/tensor/math.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/tensor/nlinalg.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/tensor/random/__init__.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/tensor/random/rewriting/__init__.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/tensor/random/rewriting/basic.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/tensor/random/rewriting/jax.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/tensor/random/type.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/tensor/random/var.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/tensor/rewriting/__init__.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/tensor/rewriting/basic.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/tensor/rewriting/blas.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/tensor/rewriting/blas_c.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/tensor/rewriting/blas_scipy.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/tensor/rewriting/elemwise.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/tensor/rewriting/extra_ops.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/tensor/rewriting/jax.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/tensor/rewriting/math.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/tensor/rewriting/shape.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/tensor/rewriting/special.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/tensor/rewriting/subtensor.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/tensor/rewriting/uncanonicalize.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/tensor/shape.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/tensor/sharedvar.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/tensor/slinalg.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/tensor/sort.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/tensor/special.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/tensor/subtensor.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/tensor/type.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/tensor/type_other.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/tensor/utils.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/tensor/var.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/tensor/xlogx.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/typed_list/__init__.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/typed_list/basic.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/typed_list/rewriting.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/typed_list/type.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/updates.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/utils.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor/version.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor.egg-info/SOURCES.txt +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor.egg-info/dependency_links.txt +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor.egg-info/entry_points.txt +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/pytensor.egg-info/top_level.txt +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/scripts/downstream_pr.sh +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/scripts/mypy-failing.txt +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/scripts/upstream_pr.sh +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/setup.cfg +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/setup.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/tests/link/c/c_code/test_cenum.h +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/tests/link/c/c_code/test_quadratic_function.c +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/tests/tensor/conv/c_code/corr3d_gemm.c +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/tests/tensor/conv/c_code/corr_gemm.c +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/tests/test_breakpoint.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/tests/test_config.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/tests/test_gradient.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/tests/test_ifelse.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/tests/test_printing.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/tests/test_raise_op.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/tests/test_rop.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/tests/test_updates.py +0 -0
- {pytensor-2.13.1 → pytensor-2.14.0}/versioneer.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: pytensor
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.14.0
|
|
4
4
|
Summary: Optimizing compiler for evaluating mathematical expressions on CPUs and GPUs.
|
|
5
5
|
Author-email: pymc-devs <pymc.devs@gmail.com>
|
|
6
6
|
License: .. _license:
|
|
@@ -66,11 +66,10 @@ Classifier: Operating System :: POSIX
|
|
|
66
66
|
Classifier: Operating System :: Unix
|
|
67
67
|
Classifier: Operating System :: MacOS
|
|
68
68
|
Classifier: Programming Language :: Python :: 3
|
|
69
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
70
69
|
Classifier: Programming Language :: Python :: 3.9
|
|
71
70
|
Classifier: Programming Language :: Python :: 3.10
|
|
72
71
|
Classifier: Programming Language :: Python :: 3.11
|
|
73
|
-
Requires-Python: >=3.
|
|
72
|
+
Requires-Python: >=3.9
|
|
74
73
|
Description-Content-Type: text/x-rst
|
|
75
74
|
Provides-Extra: complete
|
|
76
75
|
Provides-Extra: development
|
|
@@ -12,7 +12,7 @@ name = "pytensor"
|
|
|
12
12
|
dynamic = [
|
|
13
13
|
'version'
|
|
14
14
|
]
|
|
15
|
-
requires-python = ">=3.
|
|
15
|
+
requires-python = ">=3.9"
|
|
16
16
|
authors = [
|
|
17
17
|
{name = "pymc-devs", email = "pymc.devs@gmail.com"}
|
|
18
18
|
]
|
|
@@ -34,7 +34,6 @@ classifiers = [
|
|
|
34
34
|
"Operating System :: Unix",
|
|
35
35
|
"Operating System :: MacOS",
|
|
36
36
|
"Programming Language :: Python :: 3",
|
|
37
|
-
"Programming Language :: Python :: 3.8",
|
|
38
37
|
"Programming Language :: Python :: 3.9",
|
|
39
38
|
"Programming Language :: Python :: 3.10",
|
|
40
39
|
"Programming Language :: Python :: 3.11",
|
|
@@ -87,6 +86,7 @@ tests = [
|
|
|
87
86
|
"pytest-cov>=2.6.1",
|
|
88
87
|
"coverage>=5.1",
|
|
89
88
|
"pytest-benchmark",
|
|
89
|
+
"pytest-mock",
|
|
90
90
|
]
|
|
91
91
|
rtd = [
|
|
92
92
|
"sphinx>=5.1.0,<6",
|
|
@@ -8,11 +8,11 @@ import json
|
|
|
8
8
|
|
|
9
9
|
version_json = '''
|
|
10
10
|
{
|
|
11
|
-
"date": "2023-07-
|
|
11
|
+
"date": "2023-07-26T10:12:05+0200",
|
|
12
12
|
"dirty": false,
|
|
13
13
|
"error": null,
|
|
14
|
-
"full-revisionid": "
|
|
15
|
-
"version": "2.
|
|
14
|
+
"full-revisionid": "14d2454c2a1f14c0fad6e39ec098031003809220",
|
|
15
|
+
"version": "2.14.0"
|
|
16
16
|
}
|
|
17
17
|
''' # END VERSION_JSON
|
|
18
18
|
|
|
@@ -4,7 +4,7 @@ Provide a simple user friendly API.
|
|
|
4
4
|
"""
|
|
5
5
|
|
|
6
6
|
from copy import copy
|
|
7
|
-
from typing import Optional
|
|
7
|
+
from typing import Optional, Sequence, Union, overload
|
|
8
8
|
|
|
9
9
|
from pytensor.compile.function.types import Function, UnusedInputError, orig_function
|
|
10
10
|
from pytensor.compile.io import In, Out
|
|
@@ -15,8 +15,9 @@ from pytensor.graph.basic import Constant, Variable, clone_node_and_cache
|
|
|
15
15
|
from pytensor.graph.fg import FunctionGraph
|
|
16
16
|
|
|
17
17
|
|
|
18
|
+
@overload
|
|
18
19
|
def rebuild_collect_shared(
|
|
19
|
-
outputs,
|
|
20
|
+
outputs: Variable,
|
|
20
21
|
inputs=None,
|
|
21
22
|
replace=None,
|
|
22
23
|
updates=None,
|
|
@@ -24,7 +25,107 @@ def rebuild_collect_shared(
|
|
|
24
25
|
copy_inputs_over=True,
|
|
25
26
|
no_default_updates=False,
|
|
26
27
|
clone_inner_graphs=False,
|
|
27
|
-
)
|
|
28
|
+
) -> tuple[
|
|
29
|
+
list[Variable],
|
|
30
|
+
Variable,
|
|
31
|
+
tuple[
|
|
32
|
+
dict[Variable, Variable],
|
|
33
|
+
dict[SharedVariable, Variable],
|
|
34
|
+
list[Variable],
|
|
35
|
+
list[SharedVariable],
|
|
36
|
+
],
|
|
37
|
+
]:
|
|
38
|
+
...
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
@overload
|
|
42
|
+
def rebuild_collect_shared(
|
|
43
|
+
outputs: Sequence[Variable],
|
|
44
|
+
inputs=None,
|
|
45
|
+
replace=None,
|
|
46
|
+
updates=None,
|
|
47
|
+
rebuild_strict=True,
|
|
48
|
+
copy_inputs_over=True,
|
|
49
|
+
no_default_updates=False,
|
|
50
|
+
clone_inner_graphs=False,
|
|
51
|
+
) -> tuple[
|
|
52
|
+
list[Variable],
|
|
53
|
+
list[Variable],
|
|
54
|
+
tuple[
|
|
55
|
+
dict[Variable, Variable],
|
|
56
|
+
dict[SharedVariable, Variable],
|
|
57
|
+
list[Variable],
|
|
58
|
+
list[SharedVariable],
|
|
59
|
+
],
|
|
60
|
+
]:
|
|
61
|
+
...
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
@overload
|
|
65
|
+
def rebuild_collect_shared(
|
|
66
|
+
outputs: Out,
|
|
67
|
+
inputs=None,
|
|
68
|
+
replace=None,
|
|
69
|
+
updates=None,
|
|
70
|
+
rebuild_strict=True,
|
|
71
|
+
copy_inputs_over=True,
|
|
72
|
+
no_default_updates=False,
|
|
73
|
+
clone_inner_graphs=False,
|
|
74
|
+
) -> tuple[
|
|
75
|
+
list[Variable],
|
|
76
|
+
Out,
|
|
77
|
+
tuple[
|
|
78
|
+
dict[Variable, Variable],
|
|
79
|
+
dict[SharedVariable, Variable],
|
|
80
|
+
list[Variable],
|
|
81
|
+
list[SharedVariable],
|
|
82
|
+
],
|
|
83
|
+
]:
|
|
84
|
+
...
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
@overload
|
|
88
|
+
def rebuild_collect_shared(
|
|
89
|
+
outputs: Sequence[Out],
|
|
90
|
+
inputs=None,
|
|
91
|
+
replace=None,
|
|
92
|
+
updates=None,
|
|
93
|
+
rebuild_strict=True,
|
|
94
|
+
copy_inputs_over=True,
|
|
95
|
+
no_default_updates=False,
|
|
96
|
+
clone_inner_graphs=False,
|
|
97
|
+
) -> tuple[
|
|
98
|
+
list[Variable],
|
|
99
|
+
list[Out],
|
|
100
|
+
tuple[
|
|
101
|
+
dict[Variable, Variable],
|
|
102
|
+
dict[SharedVariable, Variable],
|
|
103
|
+
list[Variable],
|
|
104
|
+
list[SharedVariable],
|
|
105
|
+
],
|
|
106
|
+
]:
|
|
107
|
+
...
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
def rebuild_collect_shared(
|
|
111
|
+
outputs: Union[Sequence[Variable], Variable, Out, Sequence[Out]],
|
|
112
|
+
inputs=None,
|
|
113
|
+
replace=None,
|
|
114
|
+
updates=None,
|
|
115
|
+
rebuild_strict=True,
|
|
116
|
+
copy_inputs_over=True,
|
|
117
|
+
no_default_updates=False,
|
|
118
|
+
clone_inner_graphs=False,
|
|
119
|
+
) -> tuple[
|
|
120
|
+
list[Variable],
|
|
121
|
+
Union[list[Variable], Variable, Out, list[Out]],
|
|
122
|
+
tuple[
|
|
123
|
+
dict[Variable, Variable],
|
|
124
|
+
dict[SharedVariable, Variable],
|
|
125
|
+
list[Variable],
|
|
126
|
+
list[SharedVariable],
|
|
127
|
+
],
|
|
128
|
+
]:
|
|
28
129
|
r"""Replace subgraphs of a computational graph.
|
|
29
130
|
|
|
30
131
|
It returns a set of dictionaries and lists which collect (partial?)
|
|
@@ -260,7 +361,7 @@ def rebuild_collect_shared(
|
|
|
260
361
|
return (
|
|
261
362
|
input_variables,
|
|
262
363
|
cloned_outputs,
|
|
263
|
-
|
|
364
|
+
(clone_d, update_d, update_expr, shared_inputs),
|
|
264
365
|
)
|
|
265
366
|
|
|
266
367
|
|
|
@@ -1003,14 +1003,14 @@ def applys_between(
|
|
|
1003
1003
|
def truncated_graph_inputs(
|
|
1004
1004
|
outputs: Sequence[Variable],
|
|
1005
1005
|
ancestors_to_include: Optional[Collection[Variable]] = None,
|
|
1006
|
-
) ->
|
|
1006
|
+
) -> list[Variable]:
|
|
1007
1007
|
"""Get the truncate graph inputs.
|
|
1008
1008
|
|
|
1009
1009
|
Unlike :func:`graph_inputs` this function will return
|
|
1010
|
-
the closest
|
|
1010
|
+
the closest variables to outputs that do not depend on
|
|
1011
1011
|
``ancestors_to_include``. So given all the returned
|
|
1012
|
-
variables provided there is no missing
|
|
1013
|
-
compute the output and all
|
|
1012
|
+
variables provided there is no missing variable to
|
|
1013
|
+
compute the output and all variables are independent
|
|
1014
1014
|
from each other.
|
|
1015
1015
|
|
|
1016
1016
|
Parameters
|
|
@@ -1027,7 +1027,7 @@ def truncated_graph_inputs(
|
|
|
1027
1027
|
|
|
1028
1028
|
Examples
|
|
1029
1029
|
--------
|
|
1030
|
-
The returned
|
|
1030
|
+
The returned variables marked in (parenthesis), ancestors variables are ``c``, output variables are ``o``
|
|
1031
1031
|
|
|
1032
1032
|
* No ancestors to include
|
|
1033
1033
|
|
|
@@ -1047,7 +1047,7 @@ def truncated_graph_inputs(
|
|
|
1047
1047
|
|
|
1048
1048
|
(c) - (c) - o
|
|
1049
1049
|
|
|
1050
|
-
* Additional
|
|
1050
|
+
* Additional variables are present
|
|
1051
1051
|
|
|
1052
1052
|
.. code-block::
|
|
1053
1053
|
|
|
@@ -1076,58 +1076,60 @@ def truncated_graph_inputs(
|
|
|
1076
1076
|
|
|
1077
1077
|
"""
|
|
1078
1078
|
# simple case, no additional ancestors to include
|
|
1079
|
-
truncated_inputs = list()
|
|
1080
|
-
# blockers have known independent
|
|
1079
|
+
truncated_inputs: list[Variable] = list()
|
|
1080
|
+
# blockers have known independent variables and ancestors to include
|
|
1081
1081
|
candidates = list(outputs)
|
|
1082
1082
|
if not ancestors_to_include: # None or empty
|
|
1083
1083
|
# just filter out unique variables
|
|
1084
|
-
for
|
|
1085
|
-
if
|
|
1086
|
-
truncated_inputs.append(
|
|
1084
|
+
for variable in candidates:
|
|
1085
|
+
if variable not in truncated_inputs:
|
|
1086
|
+
truncated_inputs.append(variable)
|
|
1087
1087
|
# no more actions are needed
|
|
1088
1088
|
return truncated_inputs
|
|
1089
1089
|
|
|
1090
|
-
blockers:
|
|
1091
|
-
#
|
|
1090
|
+
blockers: set[Variable] = set(ancestors_to_include)
|
|
1091
|
+
# variables that go here are under check already, do not repeat the loop for them
|
|
1092
|
+
seen: set[Variable] = set()
|
|
1093
|
+
# enforce O(1) check for variable in ancestors to include
|
|
1092
1094
|
ancestors_to_include = blockers.copy()
|
|
1093
1095
|
|
|
1094
1096
|
while candidates:
|
|
1095
1097
|
# on any new candidate
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
if node in truncated_inputs:
|
|
1098
|
+
variable = candidates.pop()
|
|
1099
|
+
# we've looked into this variable already
|
|
1100
|
+
if variable in seen:
|
|
1100
1101
|
continue
|
|
1101
|
-
|
|
1102
|
-
#
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
# The case where node is in ancestors to include so we check if it depends on others
|
|
1102
|
+
# check if the variable is independent, never go above blockers;
|
|
1103
|
+
# blockers are independent variables and ancestors to include
|
|
1104
|
+
elif variable in ancestors_to_include:
|
|
1105
|
+
# The case where variable is in ancestors to include so we check if it depends on others
|
|
1106
1106
|
# it should be removed from the blockers to check against the rest
|
|
1107
|
-
dependent = variable_depends_on(
|
|
1107
|
+
dependent = variable_depends_on(variable, ancestors_to_include - {variable})
|
|
1108
1108
|
# ancestors to include that are present in the graph (not disconnected)
|
|
1109
1109
|
# should be added to truncated_inputs
|
|
1110
|
-
truncated_inputs.append(
|
|
1110
|
+
truncated_inputs.append(variable)
|
|
1111
1111
|
if dependent:
|
|
1112
1112
|
# if the ancestors to include is still dependent we need to go above, the search is not yet finished
|
|
1113
|
-
# owner can never be None for a dependent
|
|
1114
|
-
candidates.extend(
|
|
1113
|
+
# owner can never be None for a dependent variable
|
|
1114
|
+
candidates.extend(n for n in variable.owner.inputs if n not in seen)
|
|
1115
1115
|
else:
|
|
1116
|
-
# A regular
|
|
1117
|
-
dependent = variable_depends_on(
|
|
1118
|
-
# all regular
|
|
1116
|
+
# A regular variable to check
|
|
1117
|
+
dependent = variable_depends_on(variable, blockers)
|
|
1118
|
+
# all regular variables fall to blockers
|
|
1119
1119
|
# 1. it is dependent - further search irrelevant
|
|
1120
|
-
# 2. it is independent - the search
|
|
1121
|
-
blockers.add(
|
|
1122
|
-
# if we've found an independent
|
|
1123
|
-
# it is a new independent
|
|
1120
|
+
# 2. it is independent - the search variable is inside the closure
|
|
1121
|
+
blockers.add(variable)
|
|
1122
|
+
# if we've found an independent variable and it is not in blockers so far
|
|
1123
|
+
# it is a new independent variable not present in ancestors to include
|
|
1124
1124
|
if dependent:
|
|
1125
|
-
# populate search if it's not an independent
|
|
1126
|
-
# owner can never be None for a dependent
|
|
1127
|
-
candidates.extend(
|
|
1125
|
+
# populate search if it's not an independent variable
|
|
1126
|
+
# owner can never be None for a dependent variable
|
|
1127
|
+
candidates.extend(n for n in variable.owner.inputs if n not in seen)
|
|
1128
1128
|
else:
|
|
1129
1129
|
# otherwise, do not search beyond
|
|
1130
|
-
truncated_inputs.append(
|
|
1130
|
+
truncated_inputs.append(variable)
|
|
1131
|
+
# add variable to seen, no point in checking it once more
|
|
1132
|
+
seen.add(variable)
|
|
1131
1133
|
return truncated_inputs
|
|
1132
1134
|
|
|
1133
1135
|
|
|
@@ -1,27 +1,56 @@
|
|
|
1
1
|
from functools import partial
|
|
2
|
-
from typing import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
Iterable,
|
|
6
|
-
List,
|
|
7
|
-
Optional,
|
|
8
|
-
Sequence,
|
|
9
|
-
Tuple,
|
|
10
|
-
Union,
|
|
11
|
-
cast,
|
|
12
|
-
)
|
|
13
|
-
|
|
14
|
-
from pytensor.graph.basic import Constant, Variable, truncated_graph_inputs
|
|
2
|
+
from typing import Iterable, Optional, Sequence, Union, cast, overload
|
|
3
|
+
|
|
4
|
+
from pytensor.graph.basic import Apply, Constant, Variable, truncated_graph_inputs
|
|
15
5
|
from pytensor.graph.fg import FunctionGraph
|
|
16
6
|
|
|
17
7
|
|
|
8
|
+
ReplaceTypes = Union[Iterable[tuple[Variable, Variable]], dict[Variable, Variable]]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def _format_replace(replace: Optional[ReplaceTypes] = None) -> dict[Variable, Variable]:
|
|
12
|
+
items: dict[Variable, Variable]
|
|
13
|
+
if isinstance(replace, dict):
|
|
14
|
+
# PyLance has issues with type resolution
|
|
15
|
+
items = cast(dict[Variable, Variable], replace)
|
|
16
|
+
elif isinstance(replace, Iterable):
|
|
17
|
+
items = dict(replace)
|
|
18
|
+
elif replace is None:
|
|
19
|
+
items = {}
|
|
20
|
+
else:
|
|
21
|
+
raise ValueError(
|
|
22
|
+
"replace is neither a dictionary, list, "
|
|
23
|
+
f"tuple or None ! The value provided is {replace},"
|
|
24
|
+
f"of type {type(replace)}"
|
|
25
|
+
)
|
|
26
|
+
return items
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
@overload
|
|
30
|
+
def clone_replace(
|
|
31
|
+
output: Sequence[Variable],
|
|
32
|
+
replace: Optional[ReplaceTypes] = None,
|
|
33
|
+
**rebuild_kwds,
|
|
34
|
+
) -> list[Variable]:
|
|
35
|
+
...
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
@overload
|
|
18
39
|
def clone_replace(
|
|
19
|
-
output:
|
|
40
|
+
output: Variable,
|
|
20
41
|
replace: Optional[
|
|
21
|
-
Union[Iterable[
|
|
42
|
+
Union[Iterable[tuple[Variable, Variable]], dict[Variable, Variable]]
|
|
22
43
|
] = None,
|
|
23
44
|
**rebuild_kwds,
|
|
24
|
-
) ->
|
|
45
|
+
) -> Variable:
|
|
46
|
+
...
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def clone_replace(
|
|
50
|
+
output: Union[Sequence[Variable], Variable],
|
|
51
|
+
replace: Optional[ReplaceTypes] = None,
|
|
52
|
+
**rebuild_kwds,
|
|
53
|
+
) -> Union[list[Variable], Variable]:
|
|
25
54
|
"""Clone a graph and replace subgraphs within it.
|
|
26
55
|
|
|
27
56
|
It returns a copy of the initial subgraph with the corresponding
|
|
@@ -39,19 +68,8 @@ def clone_replace(
|
|
|
39
68
|
"""
|
|
40
69
|
from pytensor.compile.function.pfunc import rebuild_collect_shared
|
|
41
70
|
|
|
42
|
-
items
|
|
43
|
-
|
|
44
|
-
items = list(replace.items())
|
|
45
|
-
elif isinstance(replace, (list, tuple)):
|
|
46
|
-
items = replace
|
|
47
|
-
elif replace is None:
|
|
48
|
-
items = []
|
|
49
|
-
else:
|
|
50
|
-
raise ValueError(
|
|
51
|
-
"replace is neither a dictionary, list, "
|
|
52
|
-
f"tuple or None ! The value provided is {replace},"
|
|
53
|
-
f"of type {type(replace)}"
|
|
54
|
-
)
|
|
71
|
+
items = list(_format_replace(replace).items())
|
|
72
|
+
|
|
55
73
|
tmp_replace = [(x, x.type()) for x, y in items]
|
|
56
74
|
new_replace = [(x, y) for ((_, x), (_, y)) in zip(tmp_replace, items)]
|
|
57
75
|
_, _outs, _ = rebuild_collect_shared(output, [], tmp_replace, [], **rebuild_kwds)
|
|
@@ -59,20 +77,40 @@ def clone_replace(
|
|
|
59
77
|
# TODO Explain why we call it twice ?!
|
|
60
78
|
_, outs, _ = rebuild_collect_shared(_outs, [], new_replace, [], **rebuild_kwds)
|
|
61
79
|
|
|
62
|
-
return
|
|
80
|
+
return outs
|
|
63
81
|
|
|
64
82
|
|
|
83
|
+
@overload
|
|
84
|
+
def graph_replace(
|
|
85
|
+
outputs: Variable,
|
|
86
|
+
replace: Optional[ReplaceTypes] = None,
|
|
87
|
+
*,
|
|
88
|
+
strict=True,
|
|
89
|
+
) -> Variable:
|
|
90
|
+
...
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
@overload
|
|
65
94
|
def graph_replace(
|
|
66
95
|
outputs: Sequence[Variable],
|
|
67
|
-
replace:
|
|
96
|
+
replace: Optional[ReplaceTypes] = None,
|
|
97
|
+
*,
|
|
98
|
+
strict=True,
|
|
99
|
+
) -> list[Variable]:
|
|
100
|
+
...
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
def graph_replace(
|
|
104
|
+
outputs: Union[Sequence[Variable], Variable],
|
|
105
|
+
replace: Optional[ReplaceTypes] = None,
|
|
68
106
|
*,
|
|
69
107
|
strict=True,
|
|
70
|
-
) ->
|
|
108
|
+
) -> Union[list[Variable], Variable]:
|
|
71
109
|
"""Replace variables in ``outputs`` by ``replace``.
|
|
72
110
|
|
|
73
111
|
Parameters
|
|
74
112
|
----------
|
|
75
|
-
outputs: Sequence[Variable]
|
|
113
|
+
outputs: Union[Sequence[Variable], Variable]
|
|
76
114
|
Output graph
|
|
77
115
|
replace: Dict[Variable, Variable]
|
|
78
116
|
Replace mapping
|
|
@@ -83,20 +121,26 @@ def graph_replace(
|
|
|
83
121
|
|
|
84
122
|
Returns
|
|
85
123
|
-------
|
|
86
|
-
List[Variable]
|
|
87
|
-
Output graph with subgraphs replaced
|
|
124
|
+
Union[Variable, List[Variable]]
|
|
125
|
+
Output graph with subgraphs replaced, see function overload for the exact type
|
|
88
126
|
|
|
89
127
|
Raises
|
|
90
128
|
------
|
|
91
129
|
ValueError
|
|
92
|
-
If some
|
|
130
|
+
If some replacements could not be applied and strict is True
|
|
93
131
|
"""
|
|
132
|
+
as_list = False
|
|
133
|
+
if not isinstance(outputs, Sequence):
|
|
134
|
+
outputs = [outputs]
|
|
135
|
+
else:
|
|
136
|
+
as_list = True
|
|
137
|
+
replace_dict = _format_replace(replace)
|
|
94
138
|
# collect minimum graph inputs which is required to compute outputs
|
|
95
139
|
# and depend on replacements
|
|
96
140
|
# additionally remove constants, they do not matter in clone get equiv
|
|
97
141
|
conditions = [
|
|
98
142
|
c
|
|
99
|
-
for c in truncated_graph_inputs(outputs,
|
|
143
|
+
for c in truncated_graph_inputs(outputs, replace_dict)
|
|
100
144
|
if not isinstance(c, Constant)
|
|
101
145
|
]
|
|
102
146
|
# for the function graph we need the clean graph where
|
|
@@ -117,7 +161,7 @@ def graph_replace(
|
|
|
117
161
|
# replace the conditions back
|
|
118
162
|
fg_replace = {equiv[c]: c for c in conditions}
|
|
119
163
|
# add the replacements on top of input mappings
|
|
120
|
-
fg_replace.update({equiv[r]: v for r, v in
|
|
164
|
+
fg_replace.update({equiv[r]: v for r, v in replace_dict.items() if r in equiv})
|
|
121
165
|
# replacements have to be done in reverse topological order so that nested
|
|
122
166
|
# expressions get recursively replaced correctly
|
|
123
167
|
|
|
@@ -126,12 +170,14 @@ def graph_replace(
|
|
|
126
170
|
# So far FunctionGraph does these replacements inplace it is thus unsafe
|
|
127
171
|
# apply them using fg.replace, it may change the original graph
|
|
128
172
|
if strict:
|
|
129
|
-
non_fg_replace = {r: v for r, v in
|
|
173
|
+
non_fg_replace = {r: v for r, v in replace_dict.items() if r not in equiv}
|
|
130
174
|
if non_fg_replace:
|
|
131
175
|
raise ValueError(f"Some replacements were not used: {non_fg_replace}")
|
|
132
176
|
toposort = fg.toposort()
|
|
133
177
|
|
|
134
|
-
def toposort_key(
|
|
178
|
+
def toposort_key(
|
|
179
|
+
fg: FunctionGraph, ts: list[Apply], pair: tuple[Variable, Variable]
|
|
180
|
+
) -> int:
|
|
135
181
|
key, _ = pair
|
|
136
182
|
if key.owner is not None:
|
|
137
183
|
return ts.index(key.owner)
|
|
@@ -148,4 +194,7 @@ def graph_replace(
|
|
|
148
194
|
reverse=True,
|
|
149
195
|
)
|
|
150
196
|
fg.replace_all(sorted_replacements, import_missing=True)
|
|
151
|
-
|
|
197
|
+
if as_list:
|
|
198
|
+
return list(fg.outputs)
|
|
199
|
+
else:
|
|
200
|
+
return fg.outputs[0]
|
|
@@ -5,10 +5,13 @@ import numpy as np
|
|
|
5
5
|
import scipy.stats as stats
|
|
6
6
|
|
|
7
7
|
import pytensor
|
|
8
|
-
from pytensor.tensor.basic import as_tensor_variable
|
|
9
|
-
from pytensor.tensor.random.op import RandomVariable
|
|
8
|
+
from pytensor.tensor.basic import arange, as_tensor_variable
|
|
9
|
+
from pytensor.tensor.random.op import RandomVariable
|
|
10
10
|
from pytensor.tensor.random.type import RandomGeneratorType, RandomStateType
|
|
11
|
-
from pytensor.tensor.random.utils import
|
|
11
|
+
from pytensor.tensor.random.utils import (
|
|
12
|
+
broadcast_params,
|
|
13
|
+
supp_shape_from_ref_param_shape,
|
|
14
|
+
)
|
|
12
15
|
from pytensor.tensor.random.var import (
|
|
13
16
|
RandomGeneratorSharedVariable,
|
|
14
17
|
RandomStateSharedVariable,
|
|
@@ -855,6 +858,14 @@ class MvNormalRV(RandomVariable):
|
|
|
855
858
|
dtype = "floatX"
|
|
856
859
|
_print_name = ("MultivariateNormal", "\\operatorname{MultivariateNormal}")
|
|
857
860
|
|
|
861
|
+
def _supp_shape_from_params(self, dist_params, param_shapes=None):
|
|
862
|
+
return supp_shape_from_ref_param_shape(
|
|
863
|
+
ndim_supp=self.ndim_supp,
|
|
864
|
+
dist_params=dist_params,
|
|
865
|
+
param_shapes=param_shapes,
|
|
866
|
+
ref_param_idx=0,
|
|
867
|
+
)
|
|
868
|
+
|
|
858
869
|
def __call__(self, mean=None, cov=None, size=None, **kwargs):
|
|
859
870
|
r""" "Draw samples from a multivariate normal distribution.
|
|
860
871
|
|
|
@@ -933,6 +944,14 @@ class DirichletRV(RandomVariable):
|
|
|
933
944
|
dtype = "floatX"
|
|
934
945
|
_print_name = ("Dirichlet", "\\operatorname{Dirichlet}")
|
|
935
946
|
|
|
947
|
+
def _supp_shape_from_params(self, dist_params, param_shapes=None):
|
|
948
|
+
return supp_shape_from_ref_param_shape(
|
|
949
|
+
ndim_supp=self.ndim_supp,
|
|
950
|
+
dist_params=dist_params,
|
|
951
|
+
param_shapes=param_shapes,
|
|
952
|
+
ref_param_idx=0,
|
|
953
|
+
)
|
|
954
|
+
|
|
936
955
|
def __call__(self, alphas, size=None, **kwargs):
|
|
937
956
|
r"""Draw samples from a dirichlet distribution.
|
|
938
957
|
|
|
@@ -1776,9 +1795,12 @@ class MultinomialRV(RandomVariable):
|
|
|
1776
1795
|
"""
|
|
1777
1796
|
return super().__call__(n, p, size=size, **kwargs)
|
|
1778
1797
|
|
|
1779
|
-
def _supp_shape_from_params(self, dist_params,
|
|
1780
|
-
return
|
|
1781
|
-
self.ndim_supp,
|
|
1798
|
+
def _supp_shape_from_params(self, dist_params, param_shapes=None):
|
|
1799
|
+
return supp_shape_from_ref_param_shape(
|
|
1800
|
+
ndim_supp=self.ndim_supp,
|
|
1801
|
+
dist_params=dist_params,
|
|
1802
|
+
param_shapes=param_shapes,
|
|
1803
|
+
ref_param_idx=1,
|
|
1782
1804
|
)
|
|
1783
1805
|
|
|
1784
1806
|
@classmethod
|
|
@@ -2050,18 +2072,15 @@ class PermutationRV(RandomVariable):
|
|
|
2050
2072
|
|
|
2051
2073
|
@classmethod
|
|
2052
2074
|
def rng_fn(cls, rng, x, size):
|
|
2053
|
-
return rng.permutation(x
|
|
2054
|
-
|
|
2055
|
-
def
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
return (x,)
|
|
2063
|
-
else:
|
|
2064
|
-
return x_shape
|
|
2075
|
+
return rng.permutation(x)
|
|
2076
|
+
|
|
2077
|
+
def _supp_shape_from_params(self, dist_params, param_shapes=None):
|
|
2078
|
+
return supp_shape_from_ref_param_shape(
|
|
2079
|
+
ndim_supp=self.ndim_supp,
|
|
2080
|
+
dist_params=dist_params,
|
|
2081
|
+
param_shapes=param_shapes,
|
|
2082
|
+
ref_param_idx=0,
|
|
2083
|
+
)
|
|
2065
2084
|
|
|
2066
2085
|
def __call__(self, x, **kwargs):
|
|
2067
2086
|
r"""Randomly permute a sequence or a range of values.
|
|
@@ -2074,15 +2093,35 @@ class PermutationRV(RandomVariable):
|
|
|
2074
2093
|
Parameters
|
|
2075
2094
|
----------
|
|
2076
2095
|
x
|
|
2077
|
-
|
|
2078
|
-
shuffle its elements randomly.
|
|
2096
|
+
Elements to be shuffled.
|
|
2079
2097
|
|
|
2080
2098
|
"""
|
|
2081
2099
|
x = as_tensor_variable(x)
|
|
2082
2100
|
return super().__call__(x, dtype=x.dtype, **kwargs)
|
|
2083
2101
|
|
|
2084
2102
|
|
|
2085
|
-
|
|
2103
|
+
_permutation = PermutationRV()
|
|
2104
|
+
|
|
2105
|
+
|
|
2106
|
+
def permutation(x, **kwargs):
|
|
2107
|
+
r"""Randomly permute a sequence or a range of values.
|
|
2108
|
+
|
|
2109
|
+
Signature
|
|
2110
|
+
---------
|
|
2111
|
+
|
|
2112
|
+
`(x) -> (x)`
|
|
2113
|
+
|
|
2114
|
+
Parameters
|
|
2115
|
+
----------
|
|
2116
|
+
x
|
|
2117
|
+
If `x` is an integer, randomly permute `np.arange(x)`. If `x` is a sequence,
|
|
2118
|
+
shuffle its elements randomly.
|
|
2119
|
+
|
|
2120
|
+
"""
|
|
2121
|
+
x = as_tensor_variable(x)
|
|
2122
|
+
if x.type.ndim == 0:
|
|
2123
|
+
x = arange(x)
|
|
2124
|
+
return _permutation(x, **kwargs)
|
|
2086
2125
|
|
|
2087
2126
|
|
|
2088
2127
|
__all__ = [
|