38 lines
1.5 KiB
Python
38 lines
1.5 KiB
Python
# 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:
|
|
"""Global configuration for the library"""
|
|
|
|
def __init__(self):
|
|
# NOTE: If change any attributes here, must also change docs/global.rst
|
|
|
|
#: Display at least this many decimal places for *p* values (*int*)
|
|
self.pvalue_min_dps = 2
|
|
#: Display at most this many decimal places for *p* values (*int*)
|
|
self.pvalue_max_dps = 3
|
|
#: Display a leading zero for *p* values (*bool*)
|
|
self.pvalue_leading_zero = True
|
|
|
|
#: Alpha level for significance tests, confidence intervals (*float*)
|
|
self.alpha = 0.05
|
|
|
|
#: If enabled, `__repr__` on test results, etc. directly calls the ``summary`` function (*bool*)
|
|
self.repr_is_summary = True
|
|
|
|
"""Global configuration singleton"""
|
|
config = Config()
|