scipy-yli/yli/config.py

33 lines
1.2 KiB
Python
Raw Normal View History

2022-10-15 23:11:22 +11:00
# scipy-yli: Helpful SciPy utilities and recipes
# Copyright © 2022 Lee Yingtong Li (RunasSudo)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
class Config:
"""Stores global configuration for the library"""
def __init__(self):
# Display at least this many decimal places for p values
self.pvalue_min_dps = 2
# Display at most this many decimal places for p values
self.pvalue_max_dps = 3
# Display a leading zero for p values
self.pvalue_leading_zero = True
# Alpha level for significance tests, confidence intervals
self.alpha = 0.05
"""Global config singleton"""
config = Config()