Skip to content

Commit

Permalink
Add default nopython kwarg (#2246)
Browse files Browse the repository at this point in the history
* Add default nopython kwarg

* Add default nopython value to tests

* update changelog

---------

Co-authored-by: Oriol (ZBook) <oriol.abril.pla@gmail.com>
  • Loading branch information
ahartikainen and OriolAbril committed Jun 10, 2023
1 parent 88f7e2a commit 8a1b37e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Expand Up @@ -7,10 +7,11 @@
- Bayes Factor plot: Use arviz's kde instead of the one from scipy ([2237](https://github.com/arviz-devs/arviz/pull/2237))

### Maintenance and fixes

- Fix numba deprecation warning ([2246](https://github.com/arviz-devs/arviz/pull/2246))
- Fixes for creating numpy object array ([2233](https://github.com/arviz-devs/arviz/pull/2233) and [2239](https://github.com/arviz-devs/arviz/pull/2239))
- Adapt histograms generated by plot_dist to input dtype ([2247](https://github.com/arviz-devs/arviz/pull/2247))


### Deprecation

### Documentation
Expand Down
2 changes: 1 addition & 1 deletion arviz/tests/base_tests/test_utils_numba.py
Expand Up @@ -48,7 +48,7 @@ def placeholder_func():

# pylint: disable=unpacking-non-sequence
function_results, wrapper_result = placeholder_func()
assert wrapper_result == {"keyword_argument": "A keyword argument"}
assert wrapper_result == {"keyword_argument": "A keyword argument", "nopython": False}
assert function_results == "output"


Expand Down
1 change: 1 addition & 0 deletions arviz/utils.py
Expand Up @@ -174,6 +174,7 @@ class maybe_numba_fn: # pylint: disable=invalid-name
def __init__(self, function, **kwargs):
"""Wrap a function and save compilation keywords."""
self.function = function
kwargs.setdefault("nopython", False)
self.kwargs = kwargs

@lazy_property
Expand Down

0 comments on commit 8a1b37e

Please sign in to comment.