Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python 3 fixes #16

Merged
merged 5 commits into from
Apr 28, 2017
Merged

Python 3 fixes #16

merged 5 commits into from
Apr 28, 2017

Conversation

takluyver
Copy link
Contributor

This PR is against the Python3-Support branch.

  • print() functions in the examples, so I can run them in Python 3. Uses from __future__ import print_function so they still work for Python 2 as well.
  • Fixed one instance where integer division was needed in pyKriging.samplingplan

I also profiled the sampling plan stage, and found a simple way to make it much faster - on my machine the 2D_model_convergence.py sample planning stage went from about 3 minutes to 10 seconds.

The version of the code in this PR requires numpy 1.9 or above (for the return_counts parameter in numpy.unique). 1.9 was released in September 2014, so most users should have a new enough version. If you want to support older versions of numpy, the last-but-one commit is almost as fast.

This was referenced Apr 26, 2017
@takluyver
Copy link
Contributor Author

Ping @dronecfd

@takluyver
Copy link
Contributor Author

Results from running 2D_simple_train.py on Python 3.5:

kriged_py3

And on Python 2.7:

kriged_py2

@capaulson capaulson merged commit f7ed958 into capaulson:Python3-Support Apr 28, 2017
@takluyver takluyver deleted the py3-tk branch May 1, 2017 18:33
@takluyver
Copy link
Contributor Author

Thanks @capaulson :-). What are the prospects for merging Python3-Support into master and doing a new release?

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.

2 participants