From 4d394975c5c83de227d165a0db3255a875f31080 Mon Sep 17 00:00:00 2001 From: Fabian Joswig Date: Tue, 19 Oct 2021 10:39:12 +0100 Subject: [PATCH] README updated --- CONTRIBUTING.md | 4 ++-- README.md | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 89a82230..0eafa3bb 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -24,8 +24,8 @@ For all pull requests to the `develop` branch tests are executed for the most re ``` pytest -v ``` -and `flake8` is executed with the command +and the linter `flake8` is executed with the command ``` flake8 --ignore=E501,E722 --exclude=__init__.py pyerrors ``` -Please make sure that all tests are passed for a new pull request. +Please make sure that all tests are passed for a new pull requests. diff --git a/README.md b/README.md index 21a9f329..64efa51d 100644 --- a/README.md +++ b/README.md @@ -22,21 +22,21 @@ pip install git+https://github.com/fjosw/pyerrors.git ## Usage The basic objects of a pyerrors analysis are instances of the class `Obs`. They can be initialized with an array of Monte Carlo data (e.g. `samples1`) and a name for the given ensemble (e.g. `'ensemble1'`). The `gamma_method` can then be used to compute the statistical error, taking into account autocorrelations. The `print` method outputs a human readable result. ```python -import numpy as np import pyerrors as pe obs1 = pe.Obs([samples1], ['ensemble1']) obs1.gamma_method() obs1.print() ``` -Often one is interested in secondary observables which can be arbitrary functions of primary observables. `pyerrors` overloads most basic math operations and numpy functions such that the user can work with `Obs` objects as if they were floats +Often one is interested in secondary observables which can be arbitrary functions of primary observables. `pyerrors` overloads most basic math operations and `numpy` functions such that the user can work with `Obs` objects as if they were floats ```python +import numpy as np obs3 = 12.0 / obs1 ** 2 - np.exp(-1.0 / obs2) obs3.gamma_method() obs3.print() ``` -More detailed examples can be found in the `/examples` folder: +More detailed examples can be found in the `examples` folder: * [01_basic_example](examples/01_basic_example.ipynb) * [02_correlators](examples/02_correlators.ipynb)