Skip to content

Conversation

@mmcky
Copy link
Contributor

@mmcky mmcky commented Apr 14, 2016

This PR removes code that was written to support environments that did't have numba installed. Now that numba is a strict dependency of the package - this code can now be removed. This will simplify how code is written etc.

Updates:

  1. markov/gth_solve should we remove the following given support for Python 3.5+:
+#-TODO: Remove as we no longer support Python <3.5?
+try:
+    xrange
+except:  # python3
+    xrange = range
  1. gth_solve so as not to change the code to much, I have added a use_jit header to the function signature to allow one to optionally use numpy. @oyamad Is this ok?

Deprecations:

  1. The numba_installed package wide variable is no longer available.

@mmcky
Copy link
Contributor Author

mmcky commented Apr 14, 2016

In #246 It was resolved to remove the python2.7 range statements and to keep the use_jit adjustment for gth_solve

@coveralls
Copy link

Coverage Status

Coverage increased (+0.2%) to 86.667% when pulling f58e625 on remove-optional-numba-code into 4eade8d on master.

@mmcky
Copy link
Contributor Author

mmcky commented Apr 14, 2016

I will leave this open for a day - in case there are any comments on the final diff.

quantecon/lss.py Outdated
#-Check if Numba is Available-#
from .util import numba_installed, jit

#TODO: Should this be specified with (nopython=True?)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jit(nopython=True) will work if the line A = np.asarray(A) is removed (assuming that the input A is an numpy ndarray). (But I suspect we wouldn't get much speedup.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @oyamad Agree. Let's leave this as is.

@mmcky
Copy link
Contributor Author

mmcky commented Apr 15, 2016

Thanks for your comments @oyamad. I will now remove the #TODO statements. In the future we can revisit the @jit statements as numba improves and evolves.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.2%) to 86.667% when pulling 59bddd5 on remove-optional-numba-code into 4eade8d on master.

@mmcky mmcky merged commit 05d72ce into master Apr 15, 2016
@mmcky mmcky deleted the remove-optional-numba-code branch April 15, 2016 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants