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

Beginning with GPs #2

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

nicolasJouvin
Copy link
Contributor

Only the file Concrete_article_data.py is relevant.

@jouvin
Copy link
Contributor

jouvin commented Jun 5, 2016

Do not add unrelevant files then!

from sklearn import gaussian_process
import matplotlib.pyplot as plt

if __name__ == '__main__':
Copy link
Contributor

@jouvin jouvin Jun 5, 2016

Choose a reason for hiding this comment

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

One of the goal of this construct is to put everything in a funciton and avoid the potential issues with global code and especially global data... (the other goal is to make the file usable both as an imported module or an application). Thus the code should be something like:

import sys
....

def main():
    """
    Description of main()
    """
    Your current code

if __name__ == '__main__':
    sys.exit(main())

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