Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ warn_unused_configs = true
strict = true
enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"]
warn_unreachable = true
plugins = "numpy.typing.mypy_plugin"

[[tool.mypy.overrides]]
module = [
Expand Down
5 changes: 5 additions & 0 deletions src/pyhf/tensor/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ def set_backend(

Example:
>>> import pyhf
>>> pyhf.set_backend(b"jax", precision="32b")
>>> pyhf.tensorlib.name
'jax'
>>> pyhf.tensorlib.precision
'32b'
>>> pyhf.set_backend(pyhf.tensor.numpy_backend())
>>> pyhf.tensorlib.name
'numpy'
Expand Down
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def reset_backend():
def backend(request):
# a better way to get the id? all the backends we have so far for testing
param_ids = request._fixturedef.ids
# the backend we're using: numpy, etc...
# the backend we're using: numpy, jax, etc...
param_id = param_ids[request.param_index]
# name of function being called (with params), the original name is .originalname
func_name = request._pyfuncitem.name
Expand Down
Loading